divyanshu has quit [Remote host closed the connection]
Reshi has joined #ocaml
d0nn1e has quit [Ping timeout: 240 seconds]
d0nn1e has joined #ocaml
ocaml585 has joined #ocaml
rgrinberg has quit [Ping timeout: 250 seconds]
doecnt has joined #ocaml
<ocaml585>
Kind peeps ... i am just graduating from ocaml-top as my editor when learning ocaml, to something for my first project that might support merlin. Between Atom (easier for me to learn) and Emacs (steeper learning curve), which will give me more of Merlin?
Bahman has joined #ocaml
doecnt has quit [Ping timeout: 246 seconds]
struktured has quit [Ping timeout: 276 seconds]
misterme_ has quit [Remote host closed the connection]
ocaml585 has quit [Ping timeout: 250 seconds]
tennix has joined #ocaml
MercurialAlchemi has joined #ocaml
nicholas_ has joined #ocaml
nicholasf has quit [Ping timeout: 240 seconds]
FreeBird_ has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
rgrinberg has joined #ocaml
al-damiri has joined #ocaml
rgrinberg has quit [Ping timeout: 276 seconds]
natrium1970 has joined #ocaml
<natrium1970>
I built Bucklescript according to http://bloomberg.github.io/bucklescript, but when I run ‘bsc -I . -I $BSC_LIB -c hello.ml’ I get errors like Fatal error: exception Failure("in File \"config_util.ml\", line 69, characters 60-67, Pervasives.cmj not found ")
<natrium1970>
Actually, the first error printed is File "js_implementation.ml", line 87, characters 24-31 Compilation fatal error, stacktrace saved into bsc.dump
tmtwd has quit [Ping timeout: 276 seconds]
copy` has quit [Quit: Connection closed for inactivity]
natrium1970 has quit [Quit: natrium1970]
ril has joined #ocaml
hongxuchen has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 265 seconds]
hongxuchen has quit [Client Quit]
ungz has joined #ocaml
nicholas_ has quit [Read error: Connection reset by peer]
nicholasf has joined #ocaml
Simn has joined #ocaml
mistermetaphor has joined #ocaml
MercurialAlchemi has joined #ocaml
kolko has quit [Read error: Connection reset by peer]
mistermetaphor has quit [Ping timeout: 265 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
mj12` has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
A1977494 has joined #ocaml
toomuchtvrotsurb has joined #ocaml
A1977494 has quit [Remote host closed the connection]
mistermetaphor has joined #ocaml
mistermetaphor has quit [Ping timeout: 252 seconds]
ril has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ggole has joined #ocaml
octachron has joined #ocaml
rossberg has quit [Ping timeout: 260 seconds]
ggole_ has joined #ocaml
mj12` has joined #ocaml
orbifx has quit [Ping timeout: 260 seconds]
ggole has quit [Ping timeout: 246 seconds]
nicholasf has quit [Ping timeout: 250 seconds]
Reshi has quit [Ping timeout: 252 seconds]
mengu has joined #ocaml
rossberg has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
kolko has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
ygrek has joined #ocaml
FreeBirdLjj has joined #ocaml
mengu has quit [Remote host closed the connection]
nicholasf has joined #ocaml
ygrek_ has joined #ocaml
mengu has joined #ocaml
mengu has quit [Changing host]
mengu has joined #ocaml
ygrek has quit [Ping timeout: 252 seconds]
mengu has quit [Ping timeout: 276 seconds]
jwatzman|work has joined #ocaml
mistermetaphor has joined #ocaml
orbifx has joined #ocaml
FreeBird_ has joined #ocaml
mistermetaphor has quit [Ping timeout: 240 seconds]
FreeBirdLjj has quit [Ping timeout: 265 seconds]
Reshi has joined #ocaml
dsheets has joined #ocaml
Reshi has quit [Ping timeout: 276 seconds]
dsheets has quit [Remote host closed the connection]
dsheets has joined #ocaml
copy` has joined #ocaml
kushal has joined #ocaml
ungz has quit [Ping timeout: 250 seconds]
Reshi has joined #ocaml
martinkl_ has joined #ocaml
Bahman has quit [Ping timeout: 252 seconds]
sgnb has quit [Remote host closed the connection]
martinkl_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
A1977494 has joined #ocaml
kokee has joined #ocaml
amnn has joined #ocaml
nmdf has joined #ocaml
toomuchtvrotsurb has quit [Remote host closed the connection]
toomuchtvrotsurb has joined #ocaml
FreeBird_ has quit [Remote host closed the connection]
<mrvn>
ggole_: a dummy function that doesn't get optimized out
<ggole_>
I suppose they want to be compatible with prior versions without the ppx warning disablers?
<Drup>
yes
<mrvn>
why does flambda optimize "ignore value" away? Isn't the only use case for that to keep value alive?
amnn has quit [Read error: Connection reset by peer]
amnn has joined #ocaml
<flux>
I guess it just follows from the rest of the applications, surely there's no separate code to implement just that..
<mrvn>
it must know that ignore has no side effects
<flux>
and then if you use opaque_ignore, you lose some other optimization opportunities regarding functions that compute unuseful values
toomuchtvrotsurb has quit [Remote host closed the connection]
<mrvn>
I like my language to do what I tell it to. :(
<ggole_>
ignore doesn't keep values alive?
<ggole_>
It just muffles warnings/makes the type checker happy
<flux>
mrvn like to make unstated assumptions how compilers do their work :)
<flux>
I wonder if there should be some proper way yo do that those pieces of code are going
<flux>
even if it's just a function in the gc module doing exactly the same
<flux>
or do ephemerals actually do that?
<ggole_>
Oh, you meant in that particular bit of code. I see.
j0sh has quit [Ping timeout: 276 seconds]
<maker>
mm, in these cases where I am linking correctly to the package (in this case, "logs") but ocamlfind doesn't seem to be linking also to the module (in this case, "Logs_fmt"), what shall I do? Does it mean that I miss some optional dependency of the package ("logs")
<flux>
so I suppose the logs package has something broken
<flux>
are you using 4.03.0?
mengu has quit [Remote host closed the connection]
<maker>
0.5.0
<maker>
herp derp
<reynir>
heh
<maker>
installed-version: 0.5.0 [4.02.3]
<maker>
so I suppose I can try to update
dsheets has quit [Remote host closed the connection]
<maker>
37 to upgrade
<maker>
so lol
kushal has quit [Ping timeout: 260 seconds]
<Drup>
maker: logs.fmt
<Drup>
(for the future, "ocamlfind list | grep -i logs"
<maker>
Drup: so what's happening internally, logs has the signature of Logs_fmt but the implementation is in another package "logs.fmt"?
<maker>
Drup: thanks!
<maker>
no it cannot be the signature mm
<Drup>
what happens is that all the cmi are in the same directory, so the typechecker see them all, regardless of packages
<Drup>
(this is a very recurrent problem with ocaml packaging)
* maker
is uselessly recompiling a boatload of packages
<maker>
Drup: oh I see
j0sh has joined #ocaml
<mrvn>
ggole_: "fun _ -> ignore x" being alive used to keep x alive. with flambda no more.
nicholasf has quit [Remote host closed the connection]
<mrvn>
or let x = ... in let res = c_binding_that_use_x in ignore x; res
walter|r has joined #ocaml
dsheets has joined #ocaml
<ggole_>
An alternative view is that such variables are potential space leaks and should be eliminated where possible.
<mrvn>
ggole_: if youz wanted that you wouldn't have ignored it at the end.
dsheets has quit [Ping timeout: 246 seconds]
<ggole_>
If you need such a facility it shouldn't be ignore, it should be another construct called keep_alive or something.
<mrvn>
ggole_: or opaque_identity?
<ggole_>
That's a bit different as it returns its argument.
<ggole_>
This kind of construct is also useful for benchmarking.
<mrvn>
let keep_alive x = ignore (opaque_identity x)
<ggole_>
Sure.
rgrinberg has joined #ocaml
<mrvn>
but it's not really what one wants. Usualy you have some C value that depends on ocaml values and you want to tell the GC to keep them alive as long as the C value is without all the stub overhead.
<mrvn>
Gc.guard life_guard value
<ggole_>
These are all useful things, but I don't think using an ignore idiom for them is a good idea.
<mrvn>
Might be better to implement that directly than to wrap it in closures.
<mrvn>
ggole_: it's jut what is being used.
<ggole_>
Better to give them nice names, documentation, etc
dsheets has joined #ocaml
<mrvn>
(fun () -> let t = ref x in ()) could have been used but ingore looks simpler.
<ggole_>
I would expect the compiler to be allowed to eat that, too.
<ggole_>
But not, say, fun () -> Sys.black_hole x; ()
<mrvn>
so far the compiler always did what you wrote. no optimization.
<ggole_>
That's because the compiler has been pretty weak until now.
<ggole_>
(Maybe "straightforward" would be a more polite way to phrase that.)
<def`>
mrvn: or let x = ... in let res = c_binding_that_use_x in ignore x; res
<def`>
^ this case failed for me even before flambda
<ggole_>
Once you start to take advantage of inlining, DCE, LICM etc something like a black hole operation becomes useful.
<flux>
it really doesn't matter ;) what the implementation is, as long as it's provided by (preferably) the standard library ;)
<flux>
but regarding my previous comment, don't ephemerons really bring this kind of functionality?
<mrvn>
def`: then you didn't catch the GC moving x to the long term heap.
<flux>
"keep x alive as long as y is alive"?
<def`>
mrvn: no it is not that, it is that the GC collected the value
<mrvn>
def`: it didn't. the ignore kept the binding alive
<def`>
"ignore x" is not enough to keep alive in native mode
<def`>
mrvn: "OK"
<mrvn>
def`: at least it did for me.
<mrvn>
native mode, amd64
mal`` has quit [Quit: Leaving]
<mrvn>
flux: any docs on what those are?
<ggole_>
Looking at the output for ocamlopt 4.02.1, (fun () -> ignore x; ignore y; ()) does contain slots for x and y
<ggole_>
However, if the closure were entered and were not otherwise alive I would not expect x and y to be retained.
<ggole_>
Hmm.
<ggole_>
def`: were you talking an entry in the closure or the frame table?
<mrvn>
flux: An ephemeron with the C value as key and the ocaml values it depends on as value would work. yes.
<def`>
ignore x is really ignored by native backend, this simple testcase exhibit the problem. so your code is a buggy (and since it is just collection and not compaction, data is untouched, your C-binding might still work... until some point *)
<octachron>
kobee, you need to factor out your definition of s: "let s = if ... then ... else... in" rather than "if ... then let s = ... in else let s = ... in ..."
<kobee>
makes sens. Thank you octachron
mistermetaphor has joined #ocaml
mistermetaphor has quit [Ping timeout: 246 seconds]
kushal has quit [Ping timeout: 252 seconds]
A1977494 has joined #ocaml
rand__ has joined #ocaml
shinnya has joined #ocaml
tennix has joined #ocaml
<pierpa>
Hello. Can the Bytes module be lifted from a current version and used in 4.01?
<adrien>
pierpa: there's a compatibility findlib package
<pierpa>
thanks. will look.
mistermetaphor has joined #ocaml
misterme_ has joined #ocaml
dsheets has quit [Remote host closed the connection]
A19774941 has joined #ocaml
slash^ has joined #ocaml
dsheets has joined #ocaml
A1977494 has quit [Ping timeout: 260 seconds]
<pierpa>
Ok. It works!
mistermetaphor has quit [Ping timeout: 276 seconds]
bjorkintosh has quit [Ping timeout: 240 seconds]
bjorkintosh has joined #ocaml
Reshi has quit [Ping timeout: 252 seconds]
amnn has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tane has quit [Quit: Verlassend]
MercurialAlchemi has joined #ocaml
amnn has joined #ocaml
doecnt has joined #ocaml
wiredsister has joined #ocaml
g4143 has joined #ocaml
toomuchtvrotsurb has joined #ocaml
g4143 has quit [Client Quit]
toomuchtvrotsurb has quit [Remote host closed the connection]