kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
neatonk has quit [Ping timeout: 252 seconds]
nicoo has joined #ocaml
al-damiri has quit [Quit: Connection closed for inactivity]
erkin has quit [Ping timeout: 252 seconds]
erkin has joined #ocaml
djellemah has quit [Ping timeout: 252 seconds]
jknick has quit [Ping timeout: 252 seconds]
jknick has joined #ocaml
djellemah has joined #ocaml
carlosdagos has joined #ocaml
nahra` has quit [Remote host closed the connection]
neatonk has joined #ocaml
rdivyanshu has joined #ocaml
rdivyanshu has quit [Ping timeout: 260 seconds]
muelleme_ has joined #ocaml
breitenj- has quit [Ping timeout: 250 seconds]
muelleme has quit [Ping timeout: 268 seconds]
Haudegen[m] has quit [Ping timeout: 276 seconds]
igitoor has quit [Ping timeout: 252 seconds]
hdurer[m] has quit [Ping timeout: 276 seconds]
Haudegen[m] has joined #ocaml
hdurer[m] has joined #ocaml
igitoor has joined #ocaml
neatonk has quit [Ping timeout: 244 seconds]
igitoor has quit [Changing host]
igitoor has joined #ocaml
neatonk has joined #ocaml
Haudegen[m] has quit [Ping timeout: 250 seconds]
remix2000[m] has quit [Ping timeout: 250 seconds]
Haudegen[m] has joined #ocaml
isaachodes[m] has quit [Ping timeout: 250 seconds]
isaachodes[m] has joined #ocaml
neatonk has quit [Ping timeout: 272 seconds]
breitenj has joined #ocaml
remix2000[m] has joined #ocaml
silver has quit [Read error: Connection reset by peer]
smondet[m] has quit [Ping timeout: 252 seconds]
regnat[m] has quit [Ping timeout: 252 seconds]
aspiwack[m] has quit [Ping timeout: 252 seconds]
aspiwack[m] has joined #ocaml
regnat[m] has joined #ocaml
smondet[m] has joined #ocaml
regnat[m] has quit [Ping timeout: 252 seconds]
kvda has joined #ocaml
ihavelotsoffries has joined #ocaml
keep_learning has joined #ocaml
rdivyanshu has joined #ocaml
regnat[m] has joined #ocaml
ihavelotsoffries has quit [Ping timeout: 250 seconds]
rdivyanshu has quit [Remote host closed the connection]
ihavelotsoffries has joined #ocaml
rdivyanshu has joined #ocaml
rdivyanshu has quit [Ping timeout: 245 seconds]
tormen has joined #ocaml
tormen_ has quit [Ping timeout: 244 seconds]
_whitelogger has joined #ocaml
rdivyanshu has joined #ocaml
ihavelotsoffries has quit [Remote host closed the connection]
ihavelotsoffries has joined #ocaml
kvda has quit [Read error: Connection reset by peer]
mfp has quit [Ping timeout: 244 seconds]
kvda has joined #ocaml
rdivyanshu has quit [Remote host closed the connection]
rdivyanshu has joined #ocaml
rdivyanshu has quit [Ping timeout: 245 seconds]
erkin has quit [Remote host closed the connection]
rdivyanshu has joined #ocaml
rdivyanshu has quit [Client Quit]
crowley95 has quit [Quit: Bye bye~]
crowley95 has joined #ocaml
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
lostman has joined #ocaml
ihavelotsoffries has quit [Ping timeout: 252 seconds]
Haudegen has joined #ocaml
Niamkik has quit [Quit: WeeChat 2.0]
Niamkik has joined #ocaml
<Niamkik>
join #steepath
<Niamkik>
youps
<Niamkik>
sorry!
kvda has joined #ocaml
Niamkik has quit [Quit: WeeChat 2.0.1]
Niamkik has joined #ocaml
sagotch has joined #ocaml
carlosdagos has quit [Quit: Connection closed for inactivity]
orbifx has joined #ocaml
orbifx has quit [Ping timeout: 252 seconds]
rwmjones has quit [Quit: ZNC - 1.6.0 - http://znc.in]
rwmjones has joined #ocaml
rand__ has joined #ocaml
freyr69 has joined #ocaml
rand__ has quit [Ping timeout: 252 seconds]
ollehar has joined #ocaml
ggole has joined #ocaml
lostman has quit [Quit: Connection closed for inactivity]
ollehar has quit [Remote host closed the connection]
rand__ has joined #ocaml
steenuil_ has quit [Ping timeout: 268 seconds]
<sagotch>
Does someone know which one of ocamlyacc/menhir is more js_of_ocaml-friendly, if there is one? I saw some issues on github mentioning stack overflow with js_of_ocaml and menhir, but none speaking of ocamlyacc
cuicui has joined #ocaml
isaachodes[m] has quit [Ping timeout: 260 seconds]
isaachodes[m] has joined #ocaml
_whitelogger has joined #ocaml
<sagotch>
Or, is there another lexer/parser combination more suited for js_of_ocaml compilation?
Haudegen[m] has quit [Ping timeout: 260 seconds]
Haudegen[m] has joined #ocaml
isaachodes[m] has quit [Ping timeout: 250 seconds]
isaachodes[m] has joined #ocaml
dl3br[m] has quit [Ping timeout: 276 seconds]
dl3br[m] has joined #ocaml
Bluddy[m] has quit [Ping timeout: 276 seconds]
Bluddy[m] has joined #ocaml
aspiwack[m] has quit [Ping timeout: 276 seconds]
aspiwack[m] has joined #ocaml
<Leonidas>
sagotch: I would assume menhir works with js_of_ocaml, since dune apprears to support it
<sagotch>
It does indeed, I already used it, but I am concern about stack overflows because of lack of tailrec optimization in browsers. It seems that it could be a problem because of the code generated by menhir, I am wondering if there is libs to write parsers which are known to work well once compiled in js
<sagotch>
I am in a webworker, and allowed stack size seems small (about half of what is authorized in main thread, if I remember correctly)
jaar has joined #ocaml
peddie1 has quit [Ping timeout: 264 seconds]
peddie1 has joined #ocaml
mfp has joined #ocaml
raphinou has joined #ocaml
raphinou has quit [Client Quit]
raphinou has joined #ocaml
raphinou has quit [Client Quit]
raphinou has joined #ocaml
nicoo has quit [Remote host closed the connection]
nicoo has joined #ocaml
rdivyanshu has joined #ocaml
raphinou has quit [Quit: WeeChat 1.9.1]
dreamer has joined #ocaml
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rdivyanshu has quit []
KeyJoo has joined #ocaml
KeyJoo has quit [Read error: Connection reset by peer]
KeyJoo has joined #ocaml
cuicui has quit [Ping timeout: 250 seconds]
cuicui has joined #ocaml
Haudegen has quit [Remote host closed the connection]
KeyJoo has quit [Remote host closed the connection]
cuicui has quit [Ping timeout: 252 seconds]
cuicui has joined #ocaml
cuicui has quit [Ping timeout: 250 seconds]
nicoo has quit [Ping timeout: 256 seconds]
nicoo has joined #ocaml
silver has joined #ocaml
cuicui has joined #ocaml
spew has joined #ocaml
<xvilka>
hi
<xvilka>
I decided to try let%bind/let%map syntax
<xvilka>
added ppx_let in (preprocess (pps (ppx_let)) in jbuild file
<xvilka>
but it complains of missing Let_syntax
<xvilka>
ppx_let README and example provides zero information about this
<Ulrar>
I have no trouble with their String module, but Libs.ExtNetdate.Netdate doesn't seem to exist
maarhart has quit [Client Quit]
Haudegen has quit [Remote host closed the connection]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
<Ulrar>
Mh, apparently that's an old doc that they never took down, and they dropped Date in newer versions. Oh well
FreeBirdLjj has quit [Ping timeout: 250 seconds]
muelleme_ has quit [Ping timeout: 252 seconds]
<companion_cube>
yes, that's an old doc :/
<companion_cube>
they really should remove it…
<Ulrar>
Any suggestions on something that would do string -> int (or float or whatever) to convert from "Thu, 11 Oct 2018 16:16:28 GMT" to a timestamp ?
<Ulrar>
thizanne: those are calls to C right ? I can't use that from mirage unfortunatly
<thizanne>
I don't know
<companion_cube>
is that a standard format for dates, btw?
<thizanne>
I just know that I used one of them some time ago and it appeared to do related things
<Ulrar>
companion_cube: Seems usual to me
<Ulrar>
it's an HTTP header
<companion_cube>
they really should use ISO8601 :/
<Ulrar>
Yeah well, joys of the web ..
<Ulrar>
Pretty sure that header is generated by whatever app they have running on the other end
<Ulrar>
so it's whatever format they feel like
<Ulrar>
That's why I'm looking for one of those fancy functions that can detect the format itself, but I've never had to do that in ocaml so I have no idea what exists
<Ulrar>
Calendar seems to be a reference
<companion_cube>
it's a datetime lib, alright, but not sure it can parse this
<companion_cube>
you should take a look at it, for sure
<spew>
whoever fails to serialize time as iso8601 is doomed to spend an eternity in hell
Denommus` has joined #ocaml
Denommus has quit [Ping timeout: 244 seconds]
<companion_cube>
^
isbromberg has joined #ocaml
isbromberg has left #ocaml [#ocaml]
Fare has joined #ocaml
Fare has quit [Ping timeout: 252 seconds]
erkin has quit [Read error: Connection reset by peer]
muelleme_ has quit [Ping timeout: 252 seconds]
Fare has joined #ocaml
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
cuicui has joined #ocaml
rotsix has joined #ocaml
kakadu_ has joined #ocaml
apostolis has joined #ocaml
<rotsix>
plop, does anyone know how to convert a string (like "\032" or "\0xab") to a char? Tried something like Char.chr(String.(sub s 1 (length s - 2))), but not working.. any idea?
<thizanne>
rotsix: is your string, written in ocaml syntax, "\032" or "\\032" ?
sigma_g has joined #ocaml
<thizanne>
in the first case, \032 in a string is *one* character given by its code
<thizanne>
then s.[0] would work
<thizanne>
in the second case, you've got an actual backslash in your string and Scanf.unescaped can help you
<thizanne>
(by transforming a string in the second case to the corresponding one in the first case)
<crowley95>
How'd you guys get into OCaml?
cuicui1 has joined #ocaml
cuicui has quit [Read error: Connection reset by peer]
<Armael>
bad acquaintances
<rotsix>
finally, my first idea worked, was missing an escaped '\', thanks!
<rotsix>
crowley95: university! my teacher developed (with his thesis' tutor) menhir!
<Armael>
oh you're a student of yann ?
cuicui1 has quit [Ping timeout: 268 seconds]
<rotsix>
yes!
<crowley95>
cool! university for me too, the famous 3110 course at my uni
<Armael>
ah, cornell I assume :)
<crowley95>
yesss
<apostolis>
Hello, if I perform force on an expression exp , who after some computation, returns a Lazy value, will the force be applied to it?
<Armael>
yes, since Lazy.force is an ordinary function it first evaluates its argument
<apostolis>
Thanks.
<rotsix>
lol, had just yesterday a course on the Lazy module
<apostolis>
I have this : let lambda x = lazy (read_int ()) and let ioBind x f = force (f x) where f = lambda
<apostolis>
So Armael's answer made it clear to me.
muelleme_ has quit [Ping timeout: 244 seconds]
Fare has quit [Ping timeout: 250 seconds]
spew has quit [Quit: going to mcsorley's]
kvda has joined #ocaml
muelleme_ has joined #ocaml
muelleme_ has quit [Ping timeout: 252 seconds]
FreeBirdLjj has joined #ocaml
Misha_B has joined #ocaml
<Misha_B>
hello, is it possible to have conditional pattern matching? like match x with | (0 > x) -> None | x -> Some x ?
<thizanne>
match x with | _ when 0 > x -> None | _ -> Some x
<Misha_B>
thanks
<thizanne>
Misha_B: to develop, `when` clauses introduce a boolean condition that will be tested if the corresponding pattern does match
<thizanne>
but the pattern itself is structural, and `x` is a pattern that will always match (and does not care if you happen to have a x variable defined)
<Armael>
on that particular example using if .. then .. else would be more natural, though.
FreeBirdLjj has quit [Ping timeout: 276 seconds]
<thizanne>
yeah that's the following part : if/then/else are more often than not a preferrable choice
<thizanne>
a point of `when` clauses is that they do not work well with the exhaustivity checker
<thizanne>
namely, a guarded clause will always be supposed as not-reachable as for the exhaustivity
<thizanne>
(I personnally use them only on or-patterns, when the behaviour on a pattern depending on a condition could be or not the same as in another pattern)
aciniglio has quit [Ping timeout: 252 seconds]
Fare has joined #ocaml
Fare has quit [Ping timeout: 252 seconds]
orbifx has quit [Ping timeout: 260 seconds]
rotsix has quit [Remote host closed the connection]
kakadu_ has quit [Remote host closed the connection]
kvda has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kvda has joined #ocaml
Denommus` has quit [Remote host closed the connection]