inhabitedtype / bigstringaf Goto Github PK
View Code? Open in Web Editor NEWBigstring intrinsics and fast blits based on memcpy/memmove
License: Other
Bigstring intrinsics and fast blits based on memcpy/memmove
License: Other
See also janestreet/bin_prot#19 and ocaml/dune#783
PKG_CONFIG_PATH
is not set properlyjbuilder
has an issue with lazy loading of optional includesI have seen pain caused by exporting external
instead of val
in a .mli
(you cannot later define to redefine the functions in a slightly different way, for example to expose a different exception in the failure case; in general this makes the interface less flexible), and never heard of any tangible performance gain in presence of reasonable inlining.
Is it a conscious choice to expose external
s in the interface, or would you use val
just as well?
Because, it can store integers and strings (so anything after marshaling).
So, it looks terribly tempting...
Requested in inhabitedtype/angstrom#142
When compiling with js_of_ocaml, a warning is triggered:
free variables in primitive code "bigstringaf_memcmp_bigstring (/patho/to/.opam/4.07.0/lib/bigstringaf/runtime.js:57)
Which is maybe(probably?) due to the typos //Requres
instead of //Requires
line 59 and 69 of the file runtime.js: https://github.com/inhabitedtype/bigstringaf/blob/master/lib/runtime.js#L59
# Bigstringaf.of_string ~off:max_int ~len:2 "abc";;
Segmentation fault
that would be amazing
See discussion at inhabitedtype/angstrom#118.
After installed, I tried to use in ocaml.
test passed, and I can find it in ocamlfind list
Anything wrong? sorry I am new in ocaml.
>ocaml
OCaml version 4.09.0
# open Bigstringaf;;
Error: Unbound module Bigstringaf
# require "Bigstringaf";;
Error: Unbound value require
I have the same problem in mirageos.
Have this installed following:
opam pin add -n bigstringaf .
opam install --deps-only bigstringaf
opam install bigstringaf
Something like Buffer.add_bytes
but for Bigarray.
val add: ~out:t -> t -> unit
Maybe also the similar functions but from bytes and string, to be consistent with blit
functions.
(I'm looking at this library from MPR#7772.)
It sounds like a good idea to provide a safe version of all unsafe functions exposed (especially since checking for bounds without overflowing is actually tricky), and you generally do it except for the blit
and memcmp
functions. Wouldn't it make sense to provide bound-checking versions of those as well?
Hello, dear friends!
Please help to figure out what i am doing wrong here:
$ opam install bigstringaf
The following actions will be performed:
<><> Gathering sources ><><><><><><><><><><><><><><><><><><><><><><><>
[bigstringaf.0.6.1] found in cache
<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><>
[ERROR] The compilation of bigstringaf failed at "D:\cygwin64\home\root\OCaml64\home\root\.opam\ocaml-variants.4.08.0+mingw64c\bin\dune.exe build -p bigstringaf -j 7".
#=== ERROR while compiling bigstringaf.0.6.1 ==================================#
<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
+- The following actions failed
| - build bigstringaf 0.6.1
+-
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.