silver has quit [Read error: Connection reset by peer]
<Evy>
how to install graphics.cma on mac osx ?
sh0t has quit [Remote host closed the connection]
virtualeyes has joined #ocaml
Simn has quit [Quit: Leaving]
<Algebr>
sigh, JS lets you do foo[thing] where foo is a supposed to be a function, silly typo doesn't raise exception, just gives undefined
<Drup>
Algebr: well, it makes sense, since you can override objects to be both arrays and functions
<Drup>
for once, it's internally consistent
<Drup>
(nonwistanding the untypedness)
<dmbaturin>
You know, it really drives me mad sometimes that in python everything is passed by reference. But then I remember that for the rest of the language design, it's the only way to be internally consistent, and internal consistency is a big deal. ;)
fre has quit [Ping timeout: 264 seconds]
jasperlu has joined #ocaml
<justin_smith>
yeah, in js foo.thing(x) can be a valid method, and foo[thing] can be a completely different value, on the same object
<jasperlu>
does anyone have experience setting up ocaml with bash on ubuntu on windows?
<dmbaturin>
Canonical is the Microsoft of the linux worls indeed.
lucasem has quit [Quit: Connection closed for inactivity]
<dmbaturin>
Calling GNU binaries "ubuntu binaries" really makes me want to interject for a moment. ;)
smondet has quit [Ping timeout: 245 seconds]
zpe has joined #ocaml
jeffmo has quit [Quit: jeffmo]
al-damiri has quit [Quit: Connection closed for inactivity]
zpe has quit [Ping timeout: 240 seconds]
rgrinberg has quit [Remote host closed the connection]
jasperlu has quit [Ping timeout: 260 seconds]
rgrinberg has joined #ocaml
copy` has quit [Quit: Connection closed for inactivity]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 255 seconds]
copy` has joined #ocaml
sz0 has quit [Quit: Connection closed for inactivity]
zv has quit [Ping timeout: 276 seconds]
virtualeyes has quit [Ping timeout: 264 seconds]
virtualeyes has joined #ocaml
mfp has quit [Ping timeout: 258 seconds]
zv has joined #ocaml
sz0 has joined #ocaml
FreeBirdLjj has joined #ocaml
\h has joined #ocaml
virtualeyes has quit [Ping timeout: 255 seconds]
virtualeyes has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
snhmib has quit [Ping timeout: 255 seconds]
maurer has joined #ocaml
govg has quit [Ping timeout: 256 seconds]
snhmib has joined #ocaml
FreeBirdLjj has joined #ocaml
Algebr has quit [Remote host closed the connection]
virtualeyes has quit [Ping timeout: 264 seconds]
govg has joined #ocaml
wtetzner has quit [Remote host closed the connection]
foo_bar has joined #ocaml
wtetzner has joined #ocaml
Flerex has joined #ocaml
wtetzner has quit [Remote host closed the connection]
snhmib has quit [Ping timeout: 240 seconds]
Flerex has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<foo_bar>
hello, anybody mind explaining why do we need lazy evaluation to make persistent queue work in okasaki's theses? as far as i see all we need is memoization
<foo_bar>
am i missing something?
copy` has quit [Quit: Connection closed for inactivity]
zv has quit [Quit: WeeChat 1.6]
FreeBirdLjj has quit [Ping timeout: 240 seconds]
zv has joined #ocaml
qmmm is now known as qmm
snhmib has joined #ocaml
nomicflux has joined #ocaml
zv has quit [Quit: WeeChat 1.6]
Algebr has joined #ocaml
ygrek_ has quit [Ping timeout: 260 seconds]
nomicflux has quit [Quit: nomicflux]
arquebus has joined #ocaml
jao has quit [Ping timeout: 276 seconds]
zv has joined #ocaml
FreeBirdLjj has joined #ocaml
MercurialAlchemi has joined #ocaml
snhmib has quit [Read error: Connection reset by peer]
mattrepl has quit [Quit: mattrepl]
arquebus has quit [Quit: Leaving]
AlexDenisov has joined #ocaml
snhmib has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 256 seconds]
<flux>
dmbaturin, no, everything is passed by value, but all objects are references ;)
MercurialAlchemi has joined #ocaml
AlexDeni_ has joined #ocaml
AlexDeni_ has quit [Client Quit]
AlexDenisov has quit [Ping timeout: 255 seconds]
snhmib has quit [Ping timeout: 245 seconds]
Simn has joined #ocaml
snhmib has joined #ocaml
jnavila has joined #ocaml
average has joined #ocaml
average has quit [Changing host]
average has joined #ocaml
obadz has quit [Ping timeout: 255 seconds]
obadz has joined #ocaml
<reynir>
foo_bar: lazy evaluation usually uses memoization
<foo_bar>
reynir: but can't we also achieve persistence with strict lists and memoization without using banker's queue
<reynir>
I don't know the example, sorry
zpe has joined #ocaml
zpe has quit [Ping timeout: 255 seconds]
Flerex has joined #ocaml
Ferwin has joined #ocaml
Ferwin has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
Ferwin has joined #ocaml
william-s has quit [Quit: WeeChat 1.7]
govg has quit [Ping timeout: 240 seconds]
rgrinberg has quit [Ping timeout: 264 seconds]
kakadu has joined #ocaml
fre has joined #ocaml
Ferwin has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
FreeBirdLjj has quit [Remote host closed the connection]
Seidakey has joined #ocaml
snowcrshd has joined #ocaml
silver has joined #ocaml
larhat has joined #ocaml
snhmib has quit [Quit: WeeChat 1.6]
dhil has joined #ocaml
larhat has quit [Quit: Leaving.]
<_andre>
hello
<_andre>
in some janestreet packages like ppx_bin_prot there's a test/jbuild file with instructions to build and run tests
larhat has joined #ocaml
<_andre>
does anyone know how to use that?
<_andre>
ie what's the proper way to call jbuilder on it?
ziyourenxiang has joined #ocaml
psacrifice has quit [Remote host closed the connection]
virtualeyes has joined #ocaml
virtualeyes has quit [Read error: Connection reset by peer]
virtualeyes has joined #ocaml
virtualeyes has quit [Ping timeout: 245 seconds]
psacrifice has joined #ocaml
sepp2k has joined #ocaml
virtualeyes has joined #ocaml
<companion_cube>
no idea, sorry
larhat has quit [Quit: Leaving.]
virtualeyes1 has joined #ocaml
virtualeyes has quit [Ping timeout: 240 seconds]
dhil has quit [Ping timeout: 255 seconds]
larhat has joined #ocaml
<rks->
_andre: just create an issue on github and diml will most likely answer you before the end of the day
virtualeyes has joined #ocaml
virtualeyes1 has quit [Ping timeout: 245 seconds]
larhat has quit [Quit: Leaving.]
psacrifice has quit [Remote host closed the connection]
<_andre>
rks-: thanks
virtualeyes has quit [Ping timeout: 276 seconds]
nomicflux has joined #ocaml
dhil has joined #ocaml
ziyourenxiang has quit [Quit: Leaving]
virtualeyes has joined #ocaml
psacrifice has joined #ocaml
nomicflux has quit [Quit: nomicflux]
rom1504 has quit [Read error: Connection reset by peer]
foo_bar has quit [Ping timeout: 260 seconds]
virtualeyes has quit [Ping timeout: 240 seconds]
virtualeyes has joined #ocaml
djellemah has quit [Remote host closed the connection]
sh0t has joined #ocaml
rgrinberg has joined #ocaml
rom1504 has joined #ocaml
rom1504 has quit [Client Quit]
rom1504 has joined #ocaml
psacrifice has quit []
jao has joined #ocaml
virtualeyes has quit [Read error: Connection reset by peer]
th5 has joined #ocaml
steve_gh has joined #ocaml
virtualeyes has joined #ocaml
<steve_gh>
Hi. I'm playing with oasis for build management, and get the following error: ocamlfind: Error from package `threads': Missing -thread or -vmthread switch
mfp_ has joined #ocaml
<steve_gh>
Am I missing a flag or similar in my _oasis file?
<companion_cube>
you need to BuildDepends: threads
infinity0_ has joined #ocaml
infinity0_ has quit [Changing host]
infinity0 is now known as Guest79546
infinity0_ has joined #ocaml
Guest79546 has quit [Killed (karatkievich.freenode.net (Nickname regained by services))]
infinity0_ is now known as infinity0
infinity0 has quit [Remote host closed the connection]
<steve_gh>
thxs
mfp has quit [Ping timeout: 240 seconds]
larhat has joined #ocaml
virtualeyes has quit [Ping timeout: 258 seconds]
Seidakey has quit [Ping timeout: 255 seconds]
MercurialAlchemi has quit [Ping timeout: 258 seconds]
tormen has quit [Ping timeout: 256 seconds]
tormen has joined #ocaml
chbatey has quit [Quit: Connection closed for inactivity]
steve_gh has quit [Ping timeout: 260 seconds]
rgrinberg has quit [Remote host closed the connection]
rgrinberg has joined #ocaml
infinity0 has joined #ocaml
tormen has quit [Ping timeout: 240 seconds]
tormen has joined #ocaml
Go-use-CTCP-S is now known as CTCP-User
emias has quit [Ping timeout: 255 seconds]
djellemah has joined #ocaml
jeffmo has joined #ocaml
wtetzner has joined #ocaml
wtetzner has quit [Remote host closed the connection]
emias has joined #ocaml
hcarty1 has joined #ocaml
wtetzner has joined #ocaml
shinnya has joined #ocaml
MercurialAlchemi has joined #ocaml
shinnya has quit [Ping timeout: 252 seconds]
roberto_ has joined #ocaml
<roberto_>
Does OCaml's GC look through an array of ints to see if there are any references to follow? Or is the memory representation similar to strings/bytes?
<companion_cube>
it looks in it, I think
<companion_cube>
there is no significant runtime difference (right now) at runtime between `int array` and `some ref array`
<roberto_>
I might start emulating int arrays using bytes then.
<zozozo>
companion_cube: couldn't the tag of an int array known at compile time be no_scan_tag ?
<companion_cube>
zozozo: you can, indeed
<companion_cube>
but that's a manual process
<zozozo>
hm.. maybe it could be added to the compiler
<companion_cube>
(note that we don't even do it in msat!)
<zozozo>
that's right, though in msat I don't think there are a lot of int arrays ?
<companion_cube>
hmm, not even the trail?
<companion_cube>
let me take a look
steve_gh has joined #ocaml
<companion_cube>
ok, 2 of them
<steve_gh>
Hi, another small oasis problem. I can build libraries and test executables just fine, but when I try and build the main executable (MainIs: sulphur.ml) I get the following:
<steve_gh>
Solver failed: Ocamlbuild knows of no rules that apply to a target named src/sulphur.mly
<companion_cube>
look at _build/_log to see what ocamlbuild tried to do
<steve_gh>
I don't have a src/sulphur.mly file (what does .mly indicate), and the executable has the same BuildDepends as a successfully building test executable
<Algebr>
steve_gh: probably some naming is wrong, maybe you told it to look in src when really its in lib
<steve_gh>
my bad - I'd moved a bunch of things around while the main .ml it was still open in the text editor
mengu has joined #ocaml
steve_gh has quit [Ping timeout: 260 seconds]
jnavila has quit [Quit: It was time]
slash^ has joined #ocaml
<zozozo>
in an opam file, is there a way to specify that some steps are only to be executed if the doc is being built ? (for isntance to install doc iff it has been built)
copy` has joined #ocaml
roberto_ has quit [Quit: Leaving]
hcarty1 has quit [Ping timeout: 255 seconds]
fre has joined #ocaml
tane has joined #ocaml
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
mengu has quit [Remote host closed the connection]
zpe has quit [Ping timeout: 240 seconds]
wtetzner has quit [Remote host closed the connection]
hcarty1 has joined #ocaml
KV has joined #ocaml
leah2 has quit [Ping timeout: 258 seconds]
Xadnem has joined #ocaml
al-damiri has joined #ocaml
<Xadnem>
Hello friends, know someone where is the ocaml lib in linux please?
<KV>
The FFI docs says "Rule 2 Local variables of type value must be declared with one of the CAMLlocal macros.". I want to read stuff from a stream and return a list of key-value pairs. How do I follow that rule if I don't know the value count?
<Xadnem>
KV: Thank you very much. It works. ( usr/lib64/ocaml )
octachron has joined #ocaml
<Algebr>
Xadnem: why not using opam?
<Algebr>
opam config var lib
<Algebr>
KV: you declare it with CAMLlocal and then caml_alloc (and their variants) when you know the size you need
<KV>
Algebr, okay. I was thinking about the values. But maybe they are not concidered local values since they are returned
<Algebr>
oh a list, well each one needs to be value as well
<Algebr>
they are stored into the list you'll make with camllocal
<KV>
Algebr, okay. That makes sense. It's not really clear in the docs though since the Rule 2 seems so definitive. Then I assume the same apply for tuples. If I want a tuple with two values, I only declare the tuple it self with camllocal, and the values I just allocate without camllocal declaration?
leah2 has joined #ocaml
ygrek_ has joined #ocaml
<KV>
Think I got it. The values of a list or tuple are not variables (although they might be in c), they are values. Let's roll with that and hope for no memory leaks
mengu has joined #ocaml
malc_ has joined #ocaml
rand__ has joined #ocaml
zpe has joined #ocaml
dhil has quit [Ping timeout: 276 seconds]
jnavila has joined #ocaml
breitenj has quit [Ping timeout: 264 seconds]
Xadnem has quit [Quit: leaving]
<octachron>
today philosophical interrogation: when will/did the feature freeze for the 4.05 compiler branch start/started?
fre2 has joined #ocaml
malc_ has quit [Quit: ERC (IRC client for Emacs 25.0.50.2)]
fre has quit [Ping timeout: 240 seconds]
<copy`>
There's a 4.04.1 milestone on github
slash^ has quit [Read error: Connection reset by peer]
snowcrshd has quit [Ping timeout: 260 seconds]
kakadu_ has joined #ocaml
<Drup>
octachron: I guess you can look if there is a branch ?
<Algebr>
what branch should you work off of if you want it to be included for the next minor release?
<Drup>
work on trunk and people will decide
<Algebr>
oh trunk doesn't build on os x, some ocamldoc error
<octachron>
Drup, once the branching is done (probably sometime in february?) , the feature freeze will have pass and gone, isn'it?
tobiasBora has quit [Quit: Kthxbye]
_y has quit [Read error: Connection reset by peer]
<Algebr>
hmm, and just building ocamldebug, then running that binary craps out with Fatal error: unknown C primitive `caml_reset_afl_instrumentation'
<Algebr>
maybe trunk isn't stable enough to work off of
_andre has quit [Quit: leaving]
<octachron>
Algebr, trunk should build, and the caml_reset_afl_instrumentation sounds really strange if you did not activate the afl integration
<Algebr>
I did ./configure and make world.opt
<Algebr>
then tried ocamldebugger since I want to make changes for ocamldebug
<Drup>
octachron: yes
<Algebr>
yea bummer, doesn't build, should I open a ticket
<octachron>
Algebr, how did you try ocamldebugger?
sz0 has quit [Quit: Connection closed for inactivity]
<Algebr>
make ocamldebugger
<Algebr>
then trying running the binary
orbifx has joined #ocaml
<octachron>
Algebr, using the in-tree ocamlrun?
<Algebr>
oh okay that works
larhat has quit [Quit: Leaving.]
MercurialAlchemi has quit [Ping timeout: 240 seconds]
octachron has quit [Quit: Leaving]
rand__ has quit [Quit: leaving]
Flerex has joined #ocaml
Flerex has quit [Ping timeout: 245 seconds]
richi235 has quit [Quit: No Ping reply in 180 seconds.]
clockish has quit [Ping timeout: 248 seconds]
richi235 has joined #ocaml
KV has quit [Ping timeout: 240 seconds]
clockish has joined #ocaml
<cheater>
i have a value that's unit : mytype Lwt.t, and a function : unit mytype -> unit Lwt.t. How do I get some 'a Lwt.t out of this? Like unit Lwt.t
<cheater>
is there a function that's 'a Lwt.t Lwt.t -> 'a Lwt.t?
<companion_cube>
>>= id, i guess
<cheater>
is there some better way to do this?
<companion_cube>
I don't know, >>= is quite fundamental in lwt
sh0t has quit [Remote host closed the connection]
jnavila has quit [Remote host closed the connection]
th5 has quit []
average has quit [Remote host closed the connection]
<rgrinberg>
This operation would usually be called join. It's available in Async
<cheater>
i have a file in my source code that has in it something like module MyModule .... val myfunc : ...
<cheater>
how do i figure out how to refer to that value? Just doing MyModule.myfunc doesn't work
<companion_cube>
rgrinberg: I'd call it Lwt.flatten
<cheater>
is there a way to dump all the module names that are defined in a project?
<cheater>
or... how do i figure out the logic that changes file name to module name?
<cheater>
so the function i mentioned is in src/foo/bar/baz.mli (and baz.ml too of course)
<companion_cube>
this will just be named Baz
<companion_cube>
by default
<cheater>
oh yeah that worked!
<cheater>
i thought it would be like Foo_bar_baz. that's what i tried and i haven't thought to just try Baz.
<cheater>
does ocaml have something like haskell's undefined?
<cheater>
a value i could just plug in so that things typecheck, but which will throw when the code is executed?
<Algebr>
assert false
<mengu>
Algebr: would () work?
<cheater>
will `assert false` assume every type it's placed in?
<cheater>
like will this work? 2 + (assert false)
<Drup>
cheater try it ? :)
<cheater>
work as in type check
<Algebr>
cheater: look at the signature of assert
<cheater>
i don't want to because i think the answer is no and i don't understand how it'll work so i don't want to guess based on behaviour i observe. you can only hurt your understanding of topics by using the try and see method when it comes to type systems
<cheater>
Algebr: ok let me look at it
<cheater>
thanks
<Drup>
cheater: no seriously, just try the expression you just typed in your top level, and you'll see
<Drup>
the type system is not a magical beast, it obeys consistent rules
<Algebr>
I think the try and see approach reinforces the intuitions behind things like 'a
<cheater>
uhm, how do i figure out where the doc for the assert function is -.-
<companion_cube>
it's in the manual, I think
<cheater>
google doesn't seem to be able to find it...
<cheater>
ok, let me try that then
<cheater>
i've had a quick gander in there but i don't know where it might be :S also searching for "assert site:http://caml.inria.fr/pub/docs/manual-ocaml/" doesn't seem to find anything
<cheater>
doing #typeof "assert";; in utop makes it say "unknown type"...
<Drup>
assert is a piece of syntax, not a function
mengu has quit [Remote host closed the connection]
mengu has joined #ocaml
<cheater>
i'm more confused than i was before :(
rgrinberg has quit [Ping timeout: 248 seconds]
<Algebr>
cheater: open utop, then do: assert;;
<dmbaturin>
Sometimes I wonder why is it syntax rather than a bool -> unit function.
<Algebr>
you will get the type signature
<hcarty1>
cheater: 'assert message' will print the given message and raise an assertion. There's some magic in the compiler which make it possible to remove assertions from compiled code but that's not enabled by default.
KV has joined #ocaml
<hcarty1>
^ dmbaturin
<Algebr>
err
<Drup>
Algebr: huh, that doesn't work ...
<Algebr>
scrtach that
<hcarty1>
I suspect because of the compiler magiks
<Drup>
it's not a function
hcarty1 is now known as hcarty
<Drup>
(the reason it's not a function is because "assert false" is specialize cased, *as specified precisely in the documentation*)
<Algebr>
learn something new everyday
tane has quit [Quit: Leaving]
<hcarty>
cheater: If you want something that works more or less the same way but maybe simpler conceptually you can use failwith
<hcarty>
1 + failwith "Ooops I need to put a number here"
<hcarty>
works
<hcarty>
Drup: Any chance you know what could cause "Lwt_unix.on_signal: unavailable signal" with Lwt on Windows? Happens immediately when starting a program.
<dmbaturin>
Lack of signals in windows? :)
<Drup>
my knowledge of windows is non existent, sorry
KV has quit [Ping timeout: 258 seconds]
sillyotter has joined #ocaml
<cheater>
hcarty: that's probably what i was looking for
<cheater>
Algebr: i did assert;; in utop and i didn't get the typesig!
<hcarty>
Drup: Mine is, for better or worse, growing by bits and pieces
<cheater>
utop # assert;;
<cheater>
Error: Parse error: [expr] expected after "assert" (in [expr])
<Algebr>
cheater: yes, we just went over that assert is not a function
<hcarty>
dmbaturin: Yeah, I think this has something to do with static linking + cross compilation (using MXE + opam-cross-windows)... but I'm not certain
<cheater>
you literally just told me to type exactly that into utop
<cheater>
what did i do wrong %S
<hcarty>
cheater: assert can be used the same way and is probably the more appropriate tool in this example
<dmbaturin>
hcarty: Well, it may also be Lwt being insufficiently cross-platform there.
<cheater>
oh, i see, you talked with Drup afterwards
<cheater>
i'm slow with reading the backlog :)
<hcarty>
dmbaturin: Possibly, or some edge-case from cross-compilation
<dmbaturin>
I'm not convinced that "assert false" warrants a special case and that is better than writing "raise (Failure ...)", but I guess that's an old library decisition that is very tricky to change.
<Drup>
yeah, assert is a bit double purpose
AltGr has left #ocaml [#ocaml]
<hcarty>
Maybe from C's assert
<dmbaturin>
When I was a kid, my parents told me not to emulate kids who exhibit undefined behaviour. :)
<Drup>
"But mooom, he's so fast, I want to be fast too"
<cheater>
ok so... failwith seems better
<cheater>
as does assert false
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
zpe has quit [Ping timeout: 255 seconds]
average has joined #ocaml
sepp2k has quit [Ping timeout: 240 seconds]
kakadu_ has quit [Remote host closed the connection]
fre2 has quit [Ping timeout: 258 seconds]
<hcarty>
dmbaturin and Drup: FWIW, the issue was on my end - I had a broken opam switch and the host wasn't properly identified as win32. So invalid signals were checked in Lwt.
<hcarty>
Lwt is playing nicely from a fresh switch
<dmbaturin>
hcarty: Oh, good to know.
<dmbaturin>
hcarty: I guess it's not nearly as embarassing as that time when for some odd reason (which has to do with aspcud not installed on my desktop) "opam install lwt" installed ridiculously old Lwt and I was wondering where's my ppx extension. ;)
wolfcore has quit [Ping timeout: 240 seconds]
<hcarty>
dmbaturin: I've definitely done that or its equivalent before... a missing aspcud is bordering on dangerous for opam
<dmbaturin>
Too bad aspcud is not in fedora repos and no one makes a ready to use RPM. I guess I have to do something about it, because yeah, bordering on dangerous is a very apt description.
KV has joined #ocaml
<hcarty>
There are/were RPMs available somewhere I thought... maybe for CentOS/RHEL
<hcarty>
The source RPMs may provide a good starting point
<dmbaturin>
hcarty: Well, if I want to get it into fedora repos, I'm not sure if writing the spec file to their guidelines is easier than adapting an existing SRPM, but we'll see.
KV has quit [Ping timeout: 240 seconds]
<hcarty>
dmbaturin: Fair point
Simn has quit [Quit: Leaving]
ski has quit [Killed (Sigyn (Spam is off topic on freenode.))]