GithubHelp home page GithubHelp logo

camlp-streams's Introduction

The Stream and Genlex libraries for use with Camlp4 and Camlp5

The camlp-streams package provides two library modules:

  • Stream: imperative streams, with in-place update and memoization of the latest element produced.
  • Genlex: a small parameterized lexical analyzer producing streams of tokens from streams of characters.

The two modules are designed for use with Camlp4 and Camlp5:

  • The stream patterns and stream expressions of Camlp4/Camlp5 consume and produce data of type 'a Stream.t.
  • The Genlex tokenizer can be used as a simple lexical analyzer for Camlp4/Camlp5-generated parsers.

The Stream module can also be used by hand-written recursive-descent parsers, but is not very convenient for this purpose.

The Stream and Genlex modules have been part of the OCaml standard library for a long time, and have been distributed as part of the core OCaml system. They will be removed from the OCaml standard library at some future point, but will be maintained and distributed separately in this camlp-streams package.

camlp-streams's People

Contributors

alainfrisch avatar avsm avatar bobot avatar damiendoligez avatar dra27 avatar et7f3 avatar gasche avatar johnwhitington avatar leonidas-from-xiv avatar lpw25 avatar nojb avatar octachron avatar pierreweis avatar roglo avatar xavierleroy avatar xclerc avatar yallop avatar zoggy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

camlp-streams's Issues

build results vary from parallelism

While working on reproducible builds for openSUSE, I found that
our ocaml-camlp-streams-5.0.1 package varied randomly unless we build with -j1 or with taskset 1 dune or in a 1-core-VM.
This indicates that a race-condition happens.

To reproduce:

cd ~/rpmbuild/BUILD/ocaml-camlp-streams-5.0.1/ && for i in $(seq 100); do rm -rf _build ; "dune" "build" "--verbose" "--for-release-of-packages=camlp-streams" "-j4" "@install" >/dev/null 2>&1 ; md5sum _build/default/.camlp_streams.objs/byte/genlex.cmti ; done |sort|uniq -c
     87 a5a708508e5844516c0252cbe4061dad  _build/default/.camlp_streams.objs/byte/genlex.cmti
     13 fcd764146f8d5cb31dccafdcf4dc77c1  _build/default/.camlp_streams.objs/byte/genlex.cmti

On another machine, I got a 99:1 distribution, so it might be tricky to reproduce.

stream.cmti is another output file that varies.

Please make build output deterministic.

Cannot link with Base on OCaml 4.06

On OCaml < 4.06 it seems not possible to link both ocamlp-streams and the stdlib's Stream modules at the same time. The stdlib's module can often be a transitive dependency, for example of base.

A small ocaml program that links to both this library and base:

let () = Stream.(empty (Stream.of_list (Base.List.join [])))
(executable
 (name test)
 (libraries base camlp-streams))

The error looks like this:

File "test.ml", line 1:
Error: The files /home/jules/.opam/4.06.1/lib/camlp-streams/stream.cmi
       and /home/jules/.opam/4.06.1/lib/base/base.cmi
       make inconsistent assumptions over interface Stream

This happens in odoc-parser: ocaml-doc/odoc-parser#6

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.