adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | Current MOOC: https://huit.re/ocamlmooc | OCaml 4.04.0 release notes: http://ocaml.org/releases/4.04.html | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
shakalaka has quit [Ping timeout: 240 seconds]
shakalaka has joined #ocaml
al-damiri has quit [Quit: Connection closed for inactivity]
sh0t has quit [Remote host closed the connection]
wtetzner has joined #ocaml
nomicflux has joined #ocaml
orbifx has quit [Ping timeout: 260 seconds]
<cheater> hi
<cheater> is there a way to get a stack trace in ocaml? and better yet, get a stack trace and continue executing?
<cheater> all i really want to know is what the functions were that were called to get where i am right now
<mfp> cheater: look under Printexc
nomicflux has quit [Quit: nomicflux]
<mfp> cheater: in particular Printexc.get_callstack and the functions to print raw backtraces
<cheater> so do i just get_backtrace () somewhere?
<mfp> get_backtrace is for exceptions, you want get_callstack & co.
ziyourenxiang has joined #ocaml
<mfp> Printexc.(print_raw_backtrace stderr (get_callstack 10)) should do (make sure you compiled and linked with -g)
<cheater> i need to use a string, but yeah
<cheater> i don't know how to compile with -g though, hrm
<mfp> then raw_backtrace_to_string
<cheater> i'd need to look into the Makefile
<cheater> which is going to be a bit... annoying
<cheater> think i could just do OCAMLOPT='-g' make ?
_zim_ has quit [Ping timeout: 256 seconds]
<cheater> wait that's not what $OCAMLOPT is for is it
<mfp> you can probably just use OCAMLPARAM=-g make (make sure to make clean before)
<mfp> hmm no, that's not the right syntax in OCAMLPARAM
<mfp> OCAMLPARAM="_,g=1" make
<cheater> nice, thanks!
<cheater> hey, i've had a question
<cheater> the ocaml manual is a bit vague... https://caml.inria.fr/pub/docs/u3-ocaml/ocaml051.html
<cheater> what's the difference between arguments defined with ~ and with ?
<cheater> is ~ just named, and ? optional?
_zim_ has joined #ocaml
silver has quit [Read error: Connection reset by peer]
nomicflux has joined #ocaml
cdidd has joined #ocaml
tmtwd has joined #ocaml
infinity0_ has joined #ocaml
infinity0_ has joined #ocaml
infinity0 is now known as Guest79337
infinity0_ is now known as infinity0
infinity0 has quit [Remote host closed the connection]
Guest79337 has quit [Ping timeout: 240 seconds]
infinity0 has joined #ocaml
infinity0 has quit [Remote host closed the connection]
infinity0 has joined #ocaml
mfp has quit [Ping timeout: 240 seconds]
infinity0 has quit [Remote host closed the connection]
infinity0 has joined #ocaml
tmtwd has quit [Ping timeout: 264 seconds]
infinity0 has quit [Remote host closed the connection]
infinity0 has joined #ocaml
infinity0 has quit [Remote host closed the connection]
infinity0 has joined #ocaml
infinity0 has quit [Remote host closed the connection]
jmasseo has quit [Ping timeout: 240 seconds]
jmasseo has joined #ocaml
pierpa has quit [Ping timeout: 240 seconds]
govg has quit [Ping timeout: 240 seconds]
tmtwd has joined #ocaml
vicfred has joined #ocaml
vicfred has quit [Max SendQ exceeded]
vicfred has joined #ocaml
tmtwd has quit [Ping timeout: 256 seconds]
tmtwd has joined #ocaml
mengu has quit [Remote host closed the connection]
nahra has quit [Ping timeout: 276 seconds]
wtetzner has quit [Remote host closed the connection]
philtor has quit [Ping timeout: 258 seconds]
copy` has quit [Quit: Connection closed for inactivity]
tmtwd has quit [Ping timeout: 256 seconds]
vicfred has quit [Ping timeout: 245 seconds]
philtor has joined #ocaml
tmtwd has joined #ocaml
ygrek has quit [Ping timeout: 240 seconds]
vicfred has joined #ocaml
govg has joined #ocaml
oschwald has quit [Quit: Leaving.]
nomicflux has quit [Quit: nomicflux]
philtor has quit [Ping timeout: 240 seconds]
<cheater> guys, what does this mean? foo : type a l. a t -> int
<cheater> what does "type a l. a t" mean? what does the dot mean?
justicefries has quit []
justicefries has joined #ocaml
wtetzner has joined #ocaml
jao has quit [Ping timeout: 255 seconds]
MercurialAlchemi has joined #ocaml
chetshah has joined #ocaml
AlexDenisov has joined #ocaml
justicefries has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
wtetzner has quit [Remote host closed the connection]
Reshi has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 240 seconds]
justicefries has joined #ocaml
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
chetshah has quit [Ping timeout: 260 seconds]
Reshi has quit [Quit: WeeChat 1.5]
infinity0 has joined #ocaml
AlexDenisov has quit [Ping timeout: 255 seconds]
AlexDenisov has joined #ocaml
Siegfried has joined #ocaml
Siegfried has quit [Ping timeout: 255 seconds]
noddy has quit [Ping timeout: 256 seconds]
Siegfried has joined #ocaml
noddy has joined #ocaml
pyx has joined #ocaml
pyx has quit [Client Quit]
MercurialAlchemi has joined #ocaml
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
octachron has joined #ocaml
manizzle has joined #ocaml
<octachron> cheater, in "foo: type a. a t -> int" "type a." marks "a" as a locally abstract and explicitely polymorphic type
<freehck> cheater: ~arg means that arg is a mandatory named argument, ?arg means that arg is an optional named argument. If there's no specified default value for ?arg its value will be 'a option, and default will be None.
<octachron> cheater, this kind of type annotations is mainly used in conjunctions with GADTs (see http://caml.inria.fr/pub/docs/manual-ocaml/extn.html#sec238)
<freehck> octachron: by the way, I haven't seen examples of using GADT for real tasks. Do you know projects that are good for understanding where to use GADT?
<freehck> well the same thing with first class modules
FreeBirdLjj has joined #ocaml
frefity has quit [Ping timeout: 240 seconds]
<octachron> freehck, I find tyre (https://github.com/Drup/tyre) a quite good example
<octachron> in particular, it illustrates that it is often possible to use GADTs internally but exposes a mostly GADT-free external API
tmtwd has quit [Ping timeout: 240 seconds]
nicoo has quit [Remote host closed the connection]
nicoo has joined #ocaml
frefity has joined #ocaml
mengu has joined #ocaml
justicefries has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
mengu has quit [Ping timeout: 240 seconds]
jnavila has joined #ocaml
<companion_cube> self advertisement, but anyway: I use a lot of GADTs internally to https://github.com/c-cube/olinq/blob/master/src/OLinq.ml
FreeBirdLjj has quit [Remote host closed the connection]
dhil has joined #ocaml
Simn has joined #ocaml
FreeBirdLjj has joined #ocaml
ziyourenxiang has quit [Quit: Leaving]
AltGr has joined #ocaml
dhil has quit [Ping timeout: 252 seconds]
jnavila has quit [Quit: It was time]
Sim_n has joined #ocaml
frefity has quit [Ping timeout: 260 seconds]
Simn has quit [Ping timeout: 240 seconds]
jnavila has joined #ocaml
TarVanimelde has quit [Read error: Connection reset by peer]
nahra has joined #ocaml
mengu has joined #ocaml
mengu has quit [Ping timeout: 255 seconds]
larhat has joined #ocaml
frefity has joined #ocaml
sz0 has joined #ocaml
zpe has joined #ocaml
ia0 has quit [Quit: reboot]
jnavila has quit [Quit: It was time]
ia0 has joined #ocaml
jnavila has joined #ocaml
mfp has joined #ocaml
<n4323> hi, is it possible to build a custom toplevel that includes a native code ocaml package?
<n4323> i need interactive speed...
<companion_cube> hum, I'm not sure :3
<n4323> in the docs it explains how to include object files but not ocaml packages - i assume it can't be done
FreeBirdLjj has quit [Remote host closed the connection]
mrnugget has joined #ocaml
pierpa has joined #ocaml
<Drup> n4323: there is something called "topnat" (or nattop ?) in the compiler sources. iirc, it's not perfectly stable, so it's not installed by default
<n4323> i have heard rumors about this as a future enhancement but i have never seen it working currently. i would not know where to start trying to get it to work...
<freehck> octachron, companion_cube: thx.
<Drup> the code for furl (and the associated blog post) should be quite readable too
<Drup> (on the topic of GADTs)
<companion_cube> ah yes, I had a blog post on that too
<companion_cube> anyway
<Drup> companion_cube: we should tag all the gadt-heavy library with the "gadt" tag on github :p
<companion_cube> :D
<companion_cube> that's a nice idea
<companion_cube> ah nice, github suggests topics now
<Drup> I already did it for tyre and furl :p
<companion_cube> same for olinq
<companion_cube> ✔
iwan_ has joined #ocaml
<Drup> octachron: you should tag your rational-in-types shenanigans :D
<iwan_> With the Ocaml Format module, is there a way of tracking if a line break happened?
<iwan_> example: if a line break occured, insert a trailing sepator
silver has joined #ocaml
<Drup> where should the trailing separator go ?
<octachron> Drup, with a "Ph'nglui mglw'nafh Cthulhu R'lyeh wgah'nagl fhtagn" tag?
<iwan_> `let x = (1, 2, 3, 4,)`
<iwan_> but every item of the tuple is on a separate line
<flux> drup, in fact, opam should support tags ;-)
<Drup> iwan_: that's what boxes are for
<Drup> flux: opam does support tags
<flux> and a warning at install time: "Beware! You are about to install a library with GADT-heavy interface! Are you sure? [y/N]"
<flux> "May cause permanent changes in your brain!"
<companion_cube> github should support opam-provided tags
<flux> drup, oh, how do I see them? I just did opam show containers and didn't see any tags, before saying the idea ;)
<companion_cube> opam info containers shows them
<flux> oh, it does :-), I just missed it in "show"
<flux> well great, so the pipeline is ready!
<iwan_> Drup: with a hvbox, I probably can't insert characters only if the hvbox determined it needs to break the line?
<Drup> I don't understand what you mean
<mrnugget> Total OCaml beginner here. I'm kinda struggling with the section about polymorphic variants in Real World OCaml (https://realworldocaml.org/v1/en/html/variants.html). Can anyone recommend other resources on this particular topic?
<companion_cube> iwan_: I don't think so
<flux> I think iwan_ 's use case is to add ie … when a line is broken to continue on the next line
<Drup> iwan: you should probably read the tutorial on boxes: https://ocaml.org/learn/tutorials/format.html
<iwan_> I'll investigate
<iwan_> this is an example of what I'm after
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 245 seconds]
<Drup> yeah, that's just an hov box. You don't need any sort of "trailing separator", just ",@ "
_andre has joined #ocaml
mengu has joined #ocaml
<frefity> why does this code compile? I would it to fail on line 19 since we are using the wrong type. https://gist.github.com/ryanslade/29a2a656c25592282ec6b305230b1196
<frefity> How can I construct it so that you can mix two types (which happen to both be float)
<frefity> Sorry, typo, should be "How can I construct it so that you CAN'T mix two types, even if they have the same 'base' type"
<Drup> frefity: simply make the type abstrat by adding a module signature where the type aliases are not exposed
<frefity> Ok. Is it possible within the same module? I kind of expected that different types could never mix
<Drup> they're not different types, they are both equal to float
<Drup> to make them truly different, you need to not expose that t = float
<Drup> module Money : sig type t .... end = struct ... end
<frefity> Ok, thanks. I just made the wrong assumption
mengu has quit [Remote host closed the connection]
mengu has joined #ocaml
iwan_ has quit [Quit: Page closed]
larhat has quit [Quit: Leaving.]
<freehck> Drup: Does tyre work only for primitive types? int,float,str,bool,char? Is there some way to extend type list tyre can work with?
johnelse_ has joined #ocaml
<Drup> freehck: that's what converters are for
<Drup> look at the examples
<freehck> ah, got you.
<freehck> int,float,str,bool,char are just predefined converters...
<Drup> yes
johnelse has quit [Ping timeout: 258 seconds]
sz0 has quit [Quit: Connection closed for inactivity]
snowcrshd has joined #ocaml
larhat has joined #ocaml
mrnugget has quit [Ping timeout: 264 seconds]
Siegfried has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nahra has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
govg has quit [Ping timeout: 245 seconds]
nahra has joined #ocaml
yomimono has joined #ocaml
wolfcore has quit [Ping timeout: 264 seconds]
orbifx-m has joined #ocaml
toolslive has joined #ocaml
<orbifx-m> is there a ppx to generate a function from string to variant type? I have a really long list I don't want to type
<Drup> ppx_deriving ?
<toolslive> is there a shorthand for record access as a function ? something like let (-->) x f0 = x.f0 (but generic)
wolfcore has joined #ocaml
nomicflux has joined #ocaml
<thizanne> toolslive: no (what would its type be ?)
<toolslive> there are other things that are special cased too.
<jerith> There's "make" in ppx_deriving that goes in the opposite direction.
<cheater> octachron thank you. what is the utility of such a locally abstract, explicitly polymorphic type?
<cheater> is there an analogue in haskell that i could reason about?
<toolslive> currently it's not a problem but a typing (as in hitting the keyboard) exercise.
<cheater> (talking about this kind of code: foo: type a l. a t -> int)
<toolslive> in haskell, the name of a record field is also automatically a function which gets the value.
<companion_cube> ppx_deriving_fields or sth like that, does it
<Drup> cheater: I believe there are some examples in the manual
<toolslive> ok, thx. will have a look.
ocp has joined #ocaml
<cheater> Drup: yeah, slugging through it...
<cheater> can i paste in 5 lines from the manual here? there's something I don't understand
<freehck> toolslive: if you use "with fields" macro in type definition or defined "let field struct = struct.field" function, you can use |> for this purpose like this: struct |> field
<thizanne> !paste > cheater
<ocabot_> cheater: https://paste.isomorphis.me/
<toolslive> freechk: thx!
<cheater> ok sure i'll use a pastebin, i just thought maybe 5 lines isn't too much
<cheater> actually i'll paste in the whole section
<cheater> https://paste.isomorphis.me/0CV&ln << in the last line, what does the ellipsis (...) mean?
<cheater> is this some sort of non-technical shorthand, or is it actual ocaml syntax?
<Drup> it's non-technical shorthand
<cheater> OK
<cheater> so it means i would have to write the code of my function
<cheater> say
<cheater> (foo bar baz ; x y z ; aaaaa)
<cheater> and then follow it with : t1 * t2 list -> t1 ?
<cheater> so in the end the last line would look like:
<Drup> no, you don't need to write the second form, you should write the first form, and the rewriting is automatic
<cheater> fun (type t1) (type t2) -> ((foo bar baz ; x y z ; aaaaa) : t1 * t2 list -> t1)
<cheater> yeah but i mean
<cheater> if i were using the second form
<Drup> then yes
<cheater> OK
<cheater> i still don't understand why i would use the second form though (which i'm using to try and understand the first form)
<cheater> what does fun type a ... mean?
nomicflux has quit [Quit: nomicflux]
<Drup> it should be explained above in the documentation
ziyourenxiang has joined #ocaml
<cheater> ah there it is
<cheater> thank you
<cheater> let me read that
<cheater> also, another question, is there a difference between fun t1 -> ... and fun 't1 -> ... ?
<Drup> but honestly, you shouldn't try to understand that in isolation. Those notations have a specific purpose (in particular, writing GADT or polymorphic recursion), you should only try to understand them when you get a use for it
<cheater> i have code here which uses it and i'm trying to understand it
<cheater> so i have a use for it
<cheater> i'm not just randomly reading through the manual :)
<Drup> so, I would propose you to try to write the code without the annotation first
<Drup> and understand why it doesn't work
yomimono has quit [Ping timeout: 240 seconds]
<cheater> Drup: i can't write the code without the annotation. it's a piece of code that exists already, and it's very large.
<orbifx-m> toolslive: looked at lens?
yomimono has joined #ocaml
<toolslive> I have now ;)
bungoman has joined #ocaml
bungoman_ has quit [Ping timeout: 256 seconds]
oschwald has joined #ocaml
govg has joined #ocaml
<orbifx-m> :)
<orbifx-m> is that what you want? it's got generators too
agarwal1975 has joined #ocaml
orbifx-m has quit [Remote host closed the connection]
sh0t has joined #ocaml
fraggle_ has quit [Remote host closed the connection]
orbifx-m has joined #ocaml
<orbifx-m> Drup: ppx deriving has show which is bytes, is that what you mean?
gjaldon has joined #ocaml
fraggle_ has joined #ocaml
<orbifx-m> jerith: was your message regarding make for my question?
<jerith> orbifx-m: No, toolslive's question. :-)
<jerith> But it wasn't very helpful.
<jerith> Maybe there's something in ppx_deriving for what you need, though.
MercurialAlchemi has quit [Ping timeout: 256 seconds]
ocp has quit [Ping timeout: 240 seconds]
<orbifx-m> is Map mutable?
<Armael> no
<Armael> (e.g., Map.S.add has type key -> 'a -> 'a t -> 'a t, it takes a key, a value, a map, and returns a new map)
<Armael> (with a mutable structure, it would probably have type key -> 'a -> 'a t -> unit)
<orbifx-m> makes sense armael, thanks
shinnya has joined #ocaml
Siegfried has joined #ocaml
Siegfried has quit [Client Quit]
al-damiri has joined #ocaml
annoymouse has joined #ocaml
wtetzner has joined #ocaml
gjaldon has quit [Remote host closed the connection]
mengu has quit [Remote host closed the connection]
ziyourenxiang has quit [Quit: Leaving]
mengu has joined #ocaml
nahra has quit [Quit: ERC (IRC client for Emacs 25.1.1)]
mengu has quit [Ping timeout: 240 seconds]
tmtwd has joined #ocaml
lopex has quit [Quit: Connection closed for inactivity]
tmtwd has quit [Ping timeout: 256 seconds]
MercurialAlchemi has joined #ocaml
jnavila has quit [Quit: It was time]
th5 has joined #ocaml
gjaldon has joined #ocaml
jao has joined #ocaml
kakadu has joined #ocaml
johnelse_ is now known as johnelse
frefity has quit [Ping timeout: 245 seconds]
lopex has joined #ocaml
frefity has joined #ocaml
yomimono has quit [Ping timeout: 240 seconds]
Siegfried has joined #ocaml
Siegfried has quit [Client Quit]
lpaste_ has joined #ocaml
ryanartecona has joined #ocaml
agarwal1975 has quit [Quit: agarwal1975]
ygrek has joined #ocaml
larhat has quit [Quit: Leaving.]
larhat has joined #ocaml
larhat has quit [Client Quit]
shinnya has quit [Ping timeout: 276 seconds]
lpaste has quit [Quit: Quit]
lpaste_ is now known as lpaste
philtor has joined #ocaml
slash^ has joined #ocaml
lpaste has quit [Changing host]
lpaste has joined #ocaml
yomimono has joined #ocaml
copy` has joined #ocaml
AltGr has left #ocaml [#ocaml]
vicfred has quit [Quit: Leaving]
djellemah has quit [Ping timeout: 256 seconds]
zpe has quit [Remote host closed the connection]
jnavila_ has joined #ocaml
agarwal1975 has joined #ocaml
agarwal1975 has quit [Client Quit]
agarwal1975 has joined #ocaml
slash^ has quit [Read error: Connection reset by peer]
pwzoii has quit [*.net *.split]
peddie has quit [*.net *.split]
tobast has quit [*.net *.split]
Asmadeus has quit [*.net *.split]
dmbaturin has quit [*.net *.split]
iyy has quit [*.net *.split]
k1000_ has quit [*.net *.split]
mal`` has quit [*.net *.split]
Pepe_ has quit [*.net *.split]
adrien has quit [*.net *.split]
cheater2 has quit [*.net *.split]
fredcy has quit [*.net *.split]
Asmadeus has joined #ocaml
dmbaturin has joined #ocaml
cheater2 has joined #ocaml
iyy has joined #ocaml
Pepe_ has joined #ocaml
fold4 has quit [*.net *.split]
gallais has quit [*.net *.split]
dinosaure has quit [*.net *.split]
jeroud has quit [*.net *.split]
tobast has joined #ocaml
fredcy has joined #ocaml
gallais has joined #ocaml
vodkaInferno has quit [*.net *.split]
jkni has quit [*.net *.split]
_habnabit has quit [*.net *.split]
engil has quit [*.net *.split]
dx has quit [*.net *.split]
rks- has quit [*.net *.split]
clog has quit [*.net *.split]
sheijk_ has quit [*.net *.split]
_2can has quit [*.net *.split]
manizzle has quit [Ping timeout: 245 seconds]
sheijk has joined #ocaml
_2can has joined #ocaml
rks- has joined #ocaml
vodkaInferno has joined #ocaml
clog has joined #ocaml
_habnabit has joined #ocaml
dinosaure has joined #ocaml
mal`` has joined #ocaml
engil has joined #ocaml
dx has joined #ocaml
agarwal1975 has quit [Quit: agarwal1975]
pwzoii has joined #ocaml
fold4 has joined #ocaml
jeroud has joined #ocaml
ggherdov has quit [Ping timeout: 264 seconds]
yomimono has quit [Quit: Leaving]
annoymouse has quit [Ping timeout: 255 seconds]
annoymouse has joined #ocaml
peddie has joined #ocaml
ygrek has quit [Ping timeout: 256 seconds]
ggherdov has joined #ocaml
Siegfried has joined #ocaml
jkni has joined #ocaml
adrien has joined #ocaml
ggherdov has quit [Excess Flood]
ggherdov has joined #ocaml
agarwal1975 has joined #ocaml
nahra has joined #ocaml
<Bluddy[m]> has anyone tried running ocaml on bash on windows?
orbifx-m has quit [Ping timeout: 240 seconds]
Sim_n has quit [Ping timeout: 240 seconds]
orbifx-m has joined #ocaml
Siegfried has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ygrek has joined #ocaml
frefity has quit [Ping timeout: 255 seconds]
Siegfried has joined #ocaml
oschwald has quit [Ping timeout: 260 seconds]
justicefries has joined #ocaml
toolslive has quit [Remote host closed the connection]
justicefries has quit [Client Quit]
calculemus has quit [Read error: Connection reset by peer]
oschwald has joined #ocaml
calculemus has joined #ocaml
frefity has joined #ocaml
<frefity> hi, is there a way to check if an input or output channel has been closed?
TheLemonMan has joined #ocaml
KV has joined #ocaml
orbifx-m has quit [Ping timeout: 240 seconds]
philtor has quit [Ping timeout: 240 seconds]
KV has quit [Quit: leaving]
<th5> frefity: Try to use them and catch the exception(?)
frefity has quit [Ping timeout: 240 seconds]
xyproto has left #ocaml ["WeeChat 1.7"]
philtor has joined #ocaml
Sim_n has joined #ocaml
justicefries has joined #ocaml
Siegfried has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
snowcrshd has quit [Remote host closed the connection]
gjaldon has quit []
Siegfried has joined #ocaml
Siegfried has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
wtetzner has quit [Remote host closed the connection]
_andre has quit [Quit: leaving]
justicefries has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
hunteriam has joined #ocaml
tane has joined #ocaml
Siegfried has joined #ocaml
th5 has quit [Remote host closed the connection]
tane has quit [Ping timeout: 256 seconds]
tane has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 248 seconds]
<flux> to me it sounds a lot better idea to keep that information elsehwere, if that's important for your program's internal state :)
cdidd has quit [Ping timeout: 248 seconds]
MercurialAlchemi has joined #ocaml
<flux> soo, is one expected to use ie. Lwt.choose [Lwt_unix.sleep 1.0; Lwt_unix.recv .. ] as a good timeout mechanism?
<flux> because it's not working with Conduit's websocket (it returns eof on the next round)
simn__ has joined #ocaml
<Drup> flux: Lwt.choose doesn't cancel the other threads
<Drup> Lwt.pick does, but the notion of canceling in lwt is a bit delicate, you should read the details
<flux> right. so what would be a good way to go about that? put the waited things to references so I can reuse them?
<flux> I guess canceling would work if the thread is written that in mind?
Sim_n has quit [Ping timeout: 255 seconds]
<flux> but yes, Lwt.pick works in this case, thank you :)
cdidd has joined #ocaml
justicefries has joined #ocaml
ryanartecona has quit [Quit: ryanartecona]
MercurialAlchemi has quit [Ping timeout: 240 seconds]
mengu has joined #ocaml
Siegfried has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Siegfried has joined #ocaml
manizzle has joined #ocaml
nicoo has quit [Remote host closed the connection]
nicoo has joined #ocaml
handlex has joined #ocaml
ryanartecona has joined #ocaml
handlex has quit [Quit: handlex]
manizzle has quit [Ping timeout: 276 seconds]
handlex has joined #ocaml
justicefries has quit [Ping timeout: 260 seconds]
ryanartecona has quit [Quit: ryanartecona]
handlex has quit [Ping timeout: 255 seconds]
jnavila_ has quit [Ping timeout: 252 seconds]
<flux> hmm, is it me or is the WebSocket package not very big on closing client connections?-o
fraggle_ has quit [Ping timeout: 255 seconds]
pierpa has quit [Ping timeout: 240 seconds]
<Nazral> hi
<Nazral> how do I replace a character from a string in ocaml ?
kakadu has quit [Remote host closed the connection]
Siegfried has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<flux> well, the current answer official is "you don't", strings are going to be immutable some day soon
<flux> but, there is Bytes.t which is like strings, but you're able to modify them
<flux> I think the answer there is bytes.[2] <- '4', as it is with strings currently, but honestly I don't know if that is going to work with Bytes :-o directly
Siegfried has joined #ocaml
<flux> but the Bytes module has get/set for modifying its contents
fraggle_ has joined #ocaml
<Nazral> ok
<Nazral> thanks !
<Nazral> I will do without it then :)
Siegfried has quit [Client Quit]
fraggle_ has quit [Ping timeout: 255 seconds]
annoymouse has quit [Quit: Connection closed for inactivity]
vramana has quit [Remote host closed the connection]
fraggle_ has joined #ocaml
vramana has joined #ocaml
larhat has joined #ocaml
fraggle_ has quit [Ping timeout: 255 seconds]
<octachron> flux, unfortunately, currently "a.[x] <- y" only works with string: in other words, the syntax '.[] <-' is a absolutely unusable with the -safe-string option
* octachron grumble about prefering hypothetical solutions in hypothetical futures
<flux> leonidas, it's not quite ready yet, but it seems* to work for some testing.. https://github.com/eras/slacko/tree/rtm
<flux> it's actually 100% untested, I just copy-pasted the code there from my test app ;)
<flux> but, if it compiles, etc
<Drup> It compiles so it works™
<Leonidas> I was just about to ask what mtime is, but then turns out it is another dbuenzli time library ^^
<Leonidas> flux: I'll have a look. I'll first try to get jerith's work merged though :)
<flux> I think the most not-ready-part about it is that it has a prototype code smell to it, code-cleanliness-wise, otherwise I'm pretty happy ;)
<Leonidas> I also haven't yet looked into slack threads yet
<Leonidas> flux: I was about to say "looks pretty good" though rtm_event_source could use a tad refactoring.
<Leonidas> did I mention that the contributions from the ocaml community are hands down far better than what I get in Node.js?
<flux> do they even have more tests than ocaml community contributions?-)
<Drup> Leonidas: oh, but you are totally a celebrity, you have a project with more stars than the OCaml compiler :D
<Leonidas> I guess they can't beat raising the test count from 0 to >1 which is a solid \infty %.
* Leonidas starring the ocaml compiler
sh0t has quit [Remote host closed the connection]
TheLemonMan has quit [Remote host closed the connection]
calculemus has quit [Quit: WeeChat 1.6]
sfri has quit [Quit: No Ping reply in 180 seconds.]
wtetzner has joined #ocaml
sfri has joined #ocaml
wtetzner has quit [Read error: Connection reset by peer]
wtetzner has joined #ocaml
octachron has quit [Quit: Leaving]
simn__ has quit [Read error: Connection reset by peer]
sfri has quit [Client Quit]
sfri has joined #ocaml
mengu has quit [Remote host closed the connection]
mengu has joined #ocaml
sillyotter has joined #ocaml
mengu has quit [Ping timeout: 248 seconds]
sillyotter has quit [Quit: WeeChat 1.4]
hunteriam has quit [Quit: Connection closed for inactivity]