Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

core 111.13.00 #2062

Merged
merged 2 commits into from
May 15, 2014
Merged

core 111.13.00 #2062

merged 2 commits into from
May 15, 2014

Conversation

bmillwood
Copy link
Contributor

New package: patience_diff

  • Moved Patience_diff out of Core_extended into its own library depending only on Core_kernel.

async_extra

  • For Typed_tcp.create, added a Client_id.t argument to the auth
    callback.

async_unix

  • Added Scheduler.yield_every, which returns a function that calls Scheduler.yield every n-th call.

    This is useful in circumstances where you don't have strict control over where a deferred is examined, as in a Deferred.List.iter.

bignum

  • Eliminated the dependence of Bignum on Re2, and reduced dependence from Core to Core_kernel.

  • Extended the rounding interface to bring it in line with int and float rounding.

  • Improved the performance of Bignum's binprot.

    Bignum's binprot had been to just binprot the decimal string representation. This is both slow to do and unnecessarily big in the majority of cases. Did something better in the majority of cases and fell back to this representation in the exceptional case.

    $ ./inline_benchmarks_runner
    Estimated testing time 20s (2 benchmarks x 10s). Change using -quota SECS.
    
    Name Time/Run mWd/Run Percentage
    bignum0.ml:Stable:Bignum binprot roundtrip compact 7.87us 490.00w 32.88%
    bignum0.ml:Stable:Bignum binprot roundtrip classic 23.94us 1_079.00w 100.00%

core_extended

  • Moved Patience_diff out of Core_extended into its own library.

core_kernel

  • Added a Sequence module that implements polymorphic, on-demand sequences.

    Also implemented conversion to Sequence.t from various containers.

  • Improved the explicitness and expressiveness of Binary_searchable.binary_search.

    binary_search now takes an additional (polymorphic variant) argument describing the relationship of the returned position to the element being searched for.

    val binary_search
      :  ?pos:int
      -> ?len:int
      -> t
      -> compare:(elt -> elt -> int)
      -> [ `Last_strictly_less_than         (** {v | < elt X |                       v} *)
         | `Last_less_than_or_equal_to      (** {v |      <= elt       X |           v} *)
         | `Last_equal_to                   (** {v           |   = elt X |           v} *)
         | `First_equal_to                  (** {v           | X = elt   |           v} *)
         | `First_greater_than_or_equal_to  (** {v           | X       >= elt      | v} *)
         | `First_strictly_greater_than     (** {v                       | X > elt | v} *)
         ]
      -> elt
      -> int option
    
  • Added a new function, Binary_searchable.binary_search_segmented, that can search an array consisting of two segments, rather than ordered by compare.

    (** [binary_search_segmented ?pos ?len t ~segment_of which] takes an [segment_of]
        function that divides [t] into two (possibly empty) segments:
    
        {v
          | segment_of elt = `Left | segment_of elt = `Right |
        v}
    
        [binary_search_segmented] returns the index of the element on the boundary of the
        segments as specified by [which]: [`Last_on_left] yields the index of the last
        element of the left segment, while [`First_on_right] yields the index of the first
        element of the right segment.  It returns [None] if the segment is empty.
    
        By default, [binary_search] searches the entire [t].  One can supply [?pos] or
        [?len] to search a slice of [t].
    
        [binary_search_segmented] does not check that [segment_of] segments [t] as in the
        diagram, and behavior is unspecified if [segment_of] doesn't segment [t].  Behavior
        is also unspecified if [segment_of] mutates [t]. *)
    val binary_search_segmented
      :  ?pos:int
      -> ?len:int
      -> t
      -> segment_of:(elt -> [ `Left | `Right ])
      -> [ `Last_on_left | `First_on_right ]
      -> int option
    
  • Made Queue match Binary_searchable.S1.

  • Made Gc.Stat and Gc.Control match Comparable.

  • Fixed some unit tests in Type_immediacy that were fragile due to GC.

sexplib

  • In Sexplib.Std, renamed Macro as Sexp_macro.

type_conv

  • Removed some unused-value warnings when with is used in signatures.

    Removed warnings in cases like:

    include (module_expr : sig type t with bin_io end)
    

@bmillwood bmillwood mentioned this pull request May 13, 2014
@avsm
Copy link
Member

avsm commented May 13, 2014

Fails in custom_printf on 4.02, but @diml is already aware.

@avsm
Copy link
Member

avsm commented May 14, 2014

final please

@avsm
Copy link
Member

avsm commented May 14, 2014

Are you aware of the i386 jenga build failure?

+ /home/avsm/.opam/4.01.0/bin/ocaml-embed-compiler -pp /home/avsm/.opam/4.01.0/bin/camlp4o.opt -pa-cmxs /home/avsm/.opam/4.01.0/lib/type_conv/pa_type_conv.cmxs -
pa-cmxs /home/avsm/.opam/4.01.0/lib/sexplib/pa_sexp_conv.cmxs -pa-cmxs /home/avsm/.opam/4.01.0/lib/bin_prot/pa_bin_prot.cmxs -pa-cmxs /home/avsm/.opam/4.01.0/lib
/fieldslib/pa_fields_conv.cmxs -pa-cmxs /home/avsm/.opam/4.01.0/lib/variantslib/pa_variants_conv.cmxs -pa-cmxs /home/avsm/.opam/4.01.0/lib/comparelib/pa_compare.
cmxs -pa-cmxs /home/avsm/.opam/4.01.0/lib/pa_pipebang/pa_pipebang.cmxs -pa-cmxs /home/avsm/.opam/4.01.0/lib/herelib/pa_herelib.cmxs -pa-cmxs /home/avsm/.opam/4.0
1.0/lib/custom_printf/pa_custom_printf.cmxs -pa-cmxs /home/avsm/.opam/4.01.0/lib/pa_test/pa_test_lib.cmxs -cc /home/avsm/.opam/4.01.0/bin/ocamlopt.opt /home/avsm
/.opam/4.01.0/lib/ocaml/pervasives.cmi lib/jenga_lib.cmi /home/avsm/.opam/4.01.0/lib/core/core.cmi /home/avsm/.opam/4.01.0/lib/core_kernel/core_kernel.cmi /home/
avsm/.opam/4.01.0/lib/async/async.cmi /home/avsm/.opam/4.01.0/lib/async_kernel/async_kernel.cmi /home/avsm/.opam/4.01.0/lib/async_unix/async_unix.cmi /home/avsm/
.opam/4.01.0/lib/sexplib/sexplib.cmi /home/avsm/.opam/4.01.0/lib/fieldslib/fieldslib.cmi /home/avsm/.opam/4.01.0/lib/ocaml_plugin/ocaml_plugin.cmi -o bin/jenga_a
rchive.c
((pid 13286) (thread_id 0) (2014-05-13 13:46:04.292322+01:00)
 "unhandled exception in Async scheduler"
 ("unhandled exception"
  ((lib/monitor.ml.Error_
    ((exn (Failure "Buffer.add: cannot grow buffer"))
     (backtrace
      ("Raised at file \"pervasives.ml\", line 20, characters 22-33"
       "Called from file \"buffer.ml\", line 69, characters 9-50"
       "Called from file \"buffer.ml\", line 86, characters 34-46"
       "Called from file \"lib/reader0.ml\", line 813, characters 19-52"
       "Called from file \"lib/deferred.ml\", line 12, characters 64-67"
       "Called from file \"lib/jobs.ml\", line 214, characters 10-13" ""))
     (monitor
      (((name Monitor.protect) (here ()) (id 345) (has_seen_error true)
        (someone_is_listening true) (kill_index 0))))))
   (Pid 13286))))
Command exited with code 1.
E: Failure("Command ''/home/avsm/.opam/4.01.0/bin/ocamlbuild' tenacious/lib/tenacious_lib.cma tenacious/lib/tenacious_lib.cmxa tenacious/lib/tenacious_lib.a tena

@bmillwood
Copy link
Contributor Author

@diml says he has a fix, but it won't make it into this release.
Final on its way.

@bmillwood bmillwood changed the title core 111.13.00-rc1 core 111.13.00 May 14, 2014
@avsm
Copy link
Member

avsm commented May 15, 2014

One last error:

=-=-= Installing patience_diff.111.13.00 =-=-=
patience_diff.111.13.00 Downloading https://ocaml.janestreet.com/ocaml-core/111.13.00/individual/patience_diff-111.13.00.tar.gz
Building patience_diff.111.13.00:
  ocaml setup.ml -configure --prefix /home/avsm/.opam/system
  make
  make install
[ERROR] The compilation of patience_diff.111.13.00 failed.
Removing patience_diff.111.13.00.
  ocamlfind remove patience_diff


===== ERROR while installing patience_diff.111.13.00 =====
# opam-version 1.1.1 (497314cbbfc2ae2ffa47c46b51aee82624ca76f4)
# os           linux
# command      ocaml setup.ml -configure --prefix /home/avsm/.opam/system
# path         /home/avsm/.opam/system/build/patience_diff.111.13.00
# compiler     system (4.01.0)
# exit-code    2
# env-file     /home/avsm/.opam/system/build/patience_diff.111.13.00/patience_diff-5996-d2d111.env
# stdout-file  /home/avsm/.opam/system/build/patience_diff.111.13.00/patience_diff-5996-d2d111.out
# stderr-file  /home/avsm/.opam/system/build/patience_diff.111.13.00/patience_diff-5996-d2d111.err
### stderr ###
# Cannot find file setup.ml.

@bmillwood
Copy link
Contributor Author

Oh, the patience_diff repo had the tag on the wrong revision. I thought I could get away with it, but it turns out to actually be significant for the tarball generation script :(
I've force-updated the public repo, I hope no-one had already cloned the wrong tag.
Uploaded a new tarball and updated the checksum.

@avsm
Copy link
Member

avsm commented May 15, 2014

thanks, merging.

avsm added a commit that referenced this pull request May 15, 2014
@avsm avsm merged commit 5b0b06b into ocaml:master May 15, 2014
bmillwood added a commit to janestreet/ocaml_plugin that referenced this pull request Jul 4, 2014
- Fixed a bug in `ocaml_embed_compiler` on 32-bit machines.

    `ocaml_embed_compiler` tries to read the full contents of the file as
    a string, but the string might be too big on 32bits:

    ocaml/opam-repository#2062 (comment)
@bmillwood bmillwood mentioned this pull request Jul 4, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants