adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml MOOC http://1149.fr/ocaml-mooc | OCaml 4.02.3 announced http://ocaml.org/releases/4.02.html | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
BitPuffin has quit [Ping timeout: 250 seconds]
Jane-PC has quit [Quit: Leaving]
kakadu has quit [Remote host closed the connection]
Stalkr_ has quit [Quit: Leaving...]
antkong_ has joined #ocaml
tftio has joined #ocaml
ncthom91 has joined #ocaml
madroach has quit [Ping timeout: 246 seconds]
madroach has joined #ocaml
ncthom91 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tftio has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Pepe_ has quit [Ping timeout: 265 seconds]
shinnya has quit [Ping timeout: 246 seconds]
Pepe_ has joined #ocaml
exm has joined #ocaml
<Algebr``> Is there a way to get TCP states in ocaml
Denommus has quit [Ping timeout: 264 seconds]
Enjolras has joined #ocaml
FreeBirdLjj has joined #ocaml
jeffmo has quit [Quit: jeffmo]
ollehar has quit [Quit: ollehar]
cody` has joined #ocaml
Algebr`` has quit [Remote host closed the connection]
psy_ has quit [Ping timeout: 260 seconds]
aphprentice has quit [Quit: Connection closed for inactivity]
ncthom91 has joined #ocaml
ncthom91 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
d0nn1e has quit [Ping timeout: 246 seconds]
d0nn1e has joined #ocaml
rpg has quit [Quit: rpg]
struk|desk|away is now known as struk|desk2
idegen has quit [Quit: Leaving.]
Algebr has joined #ocaml
manizzle has joined #ocaml
manizzle has quit [Read error: Connection reset by peer]
manizzle has joined #ocaml
Soni has joined #ocaml
<Soni> is ocaml embeddable?
<Soni> and sandboxable?
<Algebr> you can run ocaml on android and raspberry pi
mac10688 has quit [Ping timeout: 260 seconds]
<please_help> I think he's asking if one can expose code to a sandboxed ocaml runtime embedded in e.g. a C/C++ application; as one would commonly do with, for example, lua.
<Algebr> yes, you can use ocaml as a library, call it from C
yallop has quit [Ping timeout: 240 seconds]
yallop has joined #ocaml
MercurialAlchemi has joined #ocaml
darkf has joined #ocaml
ygrek has quit [Ping timeout: 255 seconds]
JacobEdelman has quit [Quit: Connection closed for inactivity]
tmtwd has joined #ocaml
xyh has joined #ocaml
cody` has quit [Quit: Connection closed for inactivity]
Mercuria1Alchemi has joined #ocaml
govg has quit [Ping timeout: 265 seconds]
FreeBirdLjj has quit [Read error: Connection timed out]
pierpa has quit [Ping timeout: 260 seconds]
FreeBirdLjj has joined #ocaml
octachron has joined #ocaml
lokien_ has joined #ocaml
govg has joined #ocaml
sfri has quit [Ping timeout: 240 seconds]
sfri has joined #ocaml
tmtwd has quit [Ping timeout: 272 seconds]
struk|desk2 is now known as struk|desk|away
alpen- has quit [Ping timeout: 250 seconds]
freehck` has joined #ocaml
Haudegen has quit [Ping timeout: 245 seconds]
freehck` has quit [Remote host closed the connection]
freehck` has joined #ocaml
Haudegen has joined #ocaml
FreeBirdLjj has quit [Read error: Connection reset by peer]
alpen has joined #ocaml
FreeBirdLjj has joined #ocaml
zpe has joined #ocaml
rand has joined #ocaml
rand is now known as Guest72153
luz1e has joined #ocaml
zpe has quit [Remote host closed the connection]
Simn has joined #ocaml
Sorella has quit [Quit: Connection closed for inactivity]
ontologiae has joined #ocaml
xiaolin has quit [Ping timeout: 260 seconds]
xiaolin_ has joined #ocaml
sh0t has joined #ocaml
ollehar has joined #ocaml
lokien_ has quit [Quit: Connection closed for inactivity]
Mirry has quit [Ping timeout: 246 seconds]
kandu has quit [Ping timeout: 250 seconds]
larhat1 has quit [Quit: Leaving.]
Mirry has joined #ocaml
antkong_ has quit [Quit: antkong_]
damason has quit [Ping timeout: 255 seconds]
Mirry has quit [Ping timeout: 272 seconds]
jwatzman|work has joined #ocaml
Mirry has joined #ocaml
SkySkimmer has joined #ocaml
ollehar has quit [Ping timeout: 255 seconds]
<SkySkimmer> Hi. Are anonymous recursive functions a thing in ocaml?
ollehar has joined #ocaml
<companion_cube> no, they're not
<companion_cube> unless you first introduce a "fix" combinator, but it's unusual
Mirry has quit [Ping timeout: 256 seconds]
djellemah has quit [Ping timeout: 240 seconds]
djellemah has joined #ocaml
Nahra``` has joined #ocaml
Nahra``` has quit [Changing host]
Bahman has joined #ocaml
Guest72153 has quit [Ping timeout: 245 seconds]
<SkySkimmer> ok
SkySkimmer has quit [Quit: Leaving]
hannes` has joined #ocaml
hannes has quit [Read error: Connection reset by peer]
sepp2k has joined #ocaml
zpe has joined #ocaml
hannes` is now known as hannes
sh0t has quit [Ping timeout: 250 seconds]
govg has quit [Ping timeout: 272 seconds]
zpe has quit [Remote host closed the connection]
Mirry has joined #ocaml
ollehar has quit [Ping timeout: 255 seconds]
Haudegen has quit [Ping timeout: 250 seconds]
mahasamoot has quit [Ping timeout: 255 seconds]
sh0t has joined #ocaml
iorivur has joined #ocaml
mort___ has joined #ocaml
contempt has quit [Disconnected by services]
contempt has joined #ocaml
Haudegen has joined #ocaml
mort___1 has joined #ocaml
mort___ has quit [Ping timeout: 260 seconds]
mort___ has joined #ocaml
mort___1 has quit [Ping timeout: 240 seconds]
JacobEdelman has joined #ocaml
mort___1 has joined #ocaml
mort___1 has left #ocaml [#ocaml]
mort___ has quit [Ping timeout: 250 seconds]
b4283 has joined #ocaml
Haudegen has quit [Ping timeout: 264 seconds]
Haudegen has joined #ocaml
rand has joined #ocaml
Fleurety has quit [Remote host closed the connection]
rand is now known as Guest89890
<Drup> (it's not very useful either :p)
<companion_cube> yeah, unless the fix combinator adds some interesting behavior, like memoization
Algebr has quit [Ping timeout: 240 seconds]
Algebr has joined #ocaml
Algebr is now known as Guest19690
xyh has quit [Quit: ChatZilla 0.9.92 [SeaMonkey 2.39/20151206235742]]
Accidus has joined #ocaml
jwatzman|work has quit [Quit: jwatzman|work]
zoobab has joined #ocaml
<zoobab> hi
<zoobab> I have this error:
<zoobab> any idea what I should do?
<zoobab> trying to pass the -fPIC compiler option to ocamlc?
zpe has joined #ocaml
<octachron> zoobab, have you tried with an opam installed ocaml rather than the system one?
govg has joined #ocaml
<zoobab> how do I do that?
<zoobab> opam was installed with my sabayon/gentoo package distro
struk|desk|away is now known as struk|desk2
<octachron> opam switch 4.02.3
<theblatte> and "eval $(opam config env)"
antkong has joined #ocaml
Bahman has quit [Quit: Ave atque vale]
arquebus has joined #ocaml
arquebus has quit [Client Quit]
govg has quit [Ping timeout: 250 seconds]
tristero has quit [Ping timeout: 250 seconds]
govg has joined #ocaml
tristero has joined #ocaml
ggole has joined #ocaml
lostman has joined #ocaml
lostman_ has quit [Remote host closed the connection]
<zoobab> better
xyh has joined #ocaml
struk|desk2 is now known as struk|desk|away
Mirry has quit [Ping timeout: 240 seconds]
govg has quit [Ping timeout: 264 seconds]
govg has joined #ocaml
AltGr has joined #ocaml
<Soni> how do I sandbox and persist ocaml?
<Soni> (this is for computers in minecraft)
malc_ has joined #ocaml
antkong has quit [Quit: antkong]
<flux> soni, you may find some ideas for sandboxing ocaml from here: https://people.redhat.com/~rjones/xavierbot/
<Soni> > It uses Unix rlimits to prevent infinite loops or using too much memory.
<flux> and other tricks.
<Soni> I'm guessing I can't use a custom allocator with OCaml?
<flux> if by persisting you mean save state to disk and restore it, you may have three options.. 1) write two functions to your code: write and restore state to/from a file 2) use continuation passing code and Marshal.marshal the continuation to a file (but this can only be restored by the same ocaml program, enforced by md5) 3) use operating system facilities if available
<flux> you "can", just modify ocaml to use your custom allocator.. :)
<Soni> >.>
<Soni> I mean like as part of the API >.>
<Drup> not really, no
idegen has joined #ocaml
xyh is now known as hentai`
jwatzman|work has joined #ocaml
hentai` is now known as tmj
tmj is now known as xyh
FreeBirdLjj has quit [Remote host closed the connection]
Sorella has joined #ocaml
sh0t has quit [Ping timeout: 240 seconds]
idegen has quit [Quit: Leaving.]
jacquev6 has joined #ocaml
rpg has joined #ocaml
sepp2k has quit [Quit: Leaving.]
Fleurety has joined #ocaml
xm_ has joined #ocaml
<xm_> hi guys, I have installed opam, and irmin library. after eval `opam config env`, I suppose I should be able to run irmin command, but I get the error `command not found`. Any suggestion?
tftio has joined #ocaml
<edwin> xm_: the readme suggests installing irmin-unix, irmin alone probably doesn't build everything by default
tane has joined #ocaml
<xm_> how I can install irmin-unix?
<Drup> "opam install irmin-unix"
<xm_> ah, thanks. some time ago, it wasn't in opam
slash^ has joined #ocaml
zpe has quit [Remote host closed the connection]
<haesbaert> is there a popular idiom for the following:
<haesbaert> foo list = [Bar [1; 2; 3; 4]; Bar [999; 1000; 84]]
<haesbaert> I want it to become foo list = [Bar [1;2;3;4;999;1000;83]]
<Soni> ok so 2 things: 1. does ocaml support debuggers? 2. is there any way to limit memory with the API?
<haesbaert> ulimits ?
<companion_cube> haesbaert: apart from writing the quite specific function that does only that, I don't think o
<haesbaert> k
jeffmo has joined #ocaml
shinnya has joined #ocaml
<companion_cube> I mean this sounds like a `group` function, but then you'd still have to merge the sublists together
<pippijn> Soni: gdb works with ocaml
<pippijn> native code
<pippijn> valgrind also works well
<Soni> pippijn, I mean a built-in debugging API
<companion_cube> but... gdb doesn't know the symbols, does it?
<pippijn> companion_cube: it does
<Soni> like hooks
<companion_cube> oh, neat
<pippijn> Soni: there is an ocaml debugger
<pippijn> byte-code only
<Soni> like a thing that gets called for every opcode that runs
<pippijn> I don't know about that
<pippijn> but the ocaml debugger presumably does something like thta
<pippijn> that
<Drup> maybe you could hack the runtime
<Drup> (and use bytecode only)
<Drup> erk, not the runtime, ocamlrun
<Drup> the bytecode interpreter
<haesbaert> companion_cube: yep
<companion_cube> haesbaert: writing the specialized function seems like the simpler way anyway
<haesbaert> it could turn into 148 specialized functions, but I'll figure it out
<companion_cube> :D
<companion_cube> you have 148 such constructors?
<pippijn> just generate them
<haesbaert> I have a variant with now, 148 entries
<companion_cube> sounds bad
<haesbaert> yeah, not fun
<ggole> haesbaert: so you have [X list1; X list2] for a bunch of constructors X?
<ggole> And you want to transform to X (list1@list2)
<haesbaert> yep
<pippijn> haesbaert: there is a (small) limit for number of non-nullary type constructors in a non-polymorphic variants
<haesbaert> pippijn: I know, I went over, it's 246
<pippijn> right
<ggole> Will X * list rather than X list work?
<companion_cube> haesbaert: whatever you're doing, it's like, crazy, you know
<pippijn> haesbaert: you probably want to do what ggole said
<ggole> Because writing [(X,list1);(X,list2)] => [X,list1@list2] for nullary X would be quite easy.
<pippijn> lift the list out of the constructors into a common type
<haesbaert> ggole: hmm not without changing a log of code
<haesbaert> *lot
<ggole> Hmm
<haesbaert> I'll have to do somehting with each of the 146 variants anyway
<ggole> Maybe you can (blench) transform each value into int * list with ints corresponding to constructors and then compare on that
<ggole> Would be a bit fragile though
<companion_cube> I think having 148 consructors makes the code doomed already
<ggole> (And I'm assuming the list types would match, which they may not.)
<haesbaert> ggole: they do
<pippijn> Obj.tag :)
<ggole> string * list?
<haesbaert> pippijn: nevah
<ggole> Depending on how fast you don't care about being
<haesbaert> ggole: leme reduce the problem a little, and then I can formualte a better question
<ggole> k
<haesbaert> ggole: your advice was gold, I think I see it now.
<ggole> \o/
<hannes> haesbaert: is it common to have multiple date values with the same key (common enough to actually implement it, and not regard some k/v if k was already present as an error)?
<haesbaert> it's pretty common actually
contempt has quit [Disconnected by services]
<haesbaert> I now see I shouldn't have used variants
<haesbaert> but it's a bit late to go bakc
contempt has joined #ocaml
<hannes> ok (reason I asked is that other protocols regard such things as errors (TLS when you provide an extension multiple times))
<hannes> you can always go bad!
<hannes> s/bad/back/
<haesbaert> ack, actually I don't really need to do this, the protocol allows me to not care about it
<haesbaert> but I'm sure some broken clients will handle it wrong
<fds> Which protocol?
<haesbaert> basically I dont want to have 2 Routers option in a dhcp packet
<haesbaert> each option has a list of routers (so you can have multiple)
<hannes> haesbaert: I never saw a useful use of having multiple routers in the router option..
<hannes> fds: DHCP
Guest89890 has quit [Ping timeout: 264 seconds]
<haesbaert> ack me neither, but think of multiple dns servers
<haesbaert> and it's more about being correct than real I'd say
<hannes> sure, but if it is a case you don't want to handle at a higher level anyways, you can already throw up while parsing
<ggole> Or you could raise an exception.
<haesbaert> it could be handled at higher levels, didn't rule that out yet
<companion_cube> but even then, using integers seems like the correct way to do things, not variants
<hannes> correctness is the lowest common denominator of the reality (== used implementations) in network protocols
<haesbaert> hannes: agreed, but then it starts looking like dayjob
<haesbaert> companion_cube: agreed
<haesbaert> I might actually change everything to ints, fuck it
<hannes> haesbaert: ack..
octachron has quit [Quit: Leaving]
<Guest19690> Running strace on my Lwt code that has been running for a few hours now, there's a write call for 43, which succeeds with 43, then a "read(3, " at which point there nothing else
<Guest19690> I don't understand why its stuck at this point
<Guest19690> Code was running fine for many hours, then it gets stuck like this.
jeffmo has quit [Quit: jeffmo]
xyh has quit [Remote host closed the connection]
<edwin> there are a number of worker threads in Lwt (quite large by default), when they run out it falls back to blocking I think. can strace tell you what the other threads (if any) are doing? I think strace -f would do that
<Guest19690> -f doesn't seem to yield more info, same dump
ontologiae has quit [Ping timeout: 255 seconds]
badon has quit [Read error: Connection reset by peer]
zpe has joined #ocaml
badon has joined #ocaml
<Guest19690> maybe was a mistake to use lwt, perhaps should have used core.
<edwin> did you use Lwt functions everywhere for IO?
<edwin> try gdb and see if it gives you any useful info on who calls that read ('attach <pid>' and 'thread apply all bt')
<Guest19690> yes. The code worked for many hours, then does this.
<Guest19690> Most annoying is that nothing has crashed, no exceptions anywhere, just stuck.
hay207 has joined #ocaml
<edwin> what kind of file is FD 3? ls -l /proc/<pid>/fd/3, and how does your code that uses that file look like?
xyh has joined #ocaml
<Guest19690> /proc/30609/fd/3 -> socket:[7277551], this is a daemon created with lwt's daemonize
<Guest19690> the gdb suggestion yield this of limitied utility, http://pastebin.com/Q0MKuvCM
<edwin> hmm for me gdb prints at least symbol names, try telling gdb explicitly where your executable coresponding to the pid is
<edwin> (that is gdb /path/to/program and then attach)
<Guest19690> better,
<edwin> is it same process? its not stuck in read and has 2 threads
<Guest19690> sorry, this is for the OCaml daemon.
badon_ has joined #ocaml
badon has quit [Disconnected by services]
<Guest19690> because it says unix select, does this mean I could have run out of fds?
badon_ is now known as badon
<edwin> no, select is the normal way for Lwt to sleep waiting for an event to happen (either that or epoll_....)
<edwin> i.e. when it waits for a client to connect to your socket, to send more data, etc.
<edwin> can you get a stacktrace for that process that was stuck in read?
<edwin> (or did running gdb made it unstuck?)
<Guest19690> bt for that stuck process gives that uselss ?? () gdb pastebin
<Guest19690> doing strace -p 26077 on the original hung process, there are several connections to the daemon, yields this oneliner wait4(-1,
<Guest19690>
<Guest19690> there is a log message that is created that uses Unix.time, could that be it?
zpe has quit [Remote host closed the connection]
Simn has quit [Quit: Leaving]
ddosia has joined #ocaml
yomimono has joined #ocaml
<edwin> what do you use for outputing the log?
Guest19690 has quit [Ping timeout: 250 seconds]
struk|desk|away is now known as struk|desk2
NingaLeaf has joined #ocaml
Mirry has joined #ocaml
ygrek has joined #ocaml
SHODAN has quit [Ping timeout: 245 seconds]
SHODAN has joined #ocaml
hay207 has quit [Quit: Konversation terminated!]
philtor has quit [Ping timeout: 260 seconds]
mahasamoot has joined #ocaml
ggole has quit []
psy has joined #ocaml
jeffmo has joined #ocaml
jwatzman|work has quit [Quit: jwatzman|work]
Haudegen has quit [Ping timeout: 245 seconds]
Algebr` has quit [Remote host closed the connection]
xyh` has joined #ocaml
xyh has quit [Quit: ChatZilla 0.9.92 [SeaMonkey 2.39/20151206235742]]
xyh` is now known as xyh
yomimono has quit [Ping timeout: 240 seconds]
sbrouf has joined #ocaml
AltGr has left #ocaml [#ocaml]
Algebr has joined #ocaml
Algebr is now known as Guest20653
Guest20653 is now known as Algebr`
Haudegen has joined #ocaml
kakadu has joined #ocaml
<Drup> maybe that would help you trace things
<Drup> haesbaert, companion_cube: I don't think using variants for this is such a bad idea
Denommus has joined #ocaml
<Drup> ( and my first reaction to the problem was ggole's solution)
psy has quit [Disconnected by services]
<companion_cube> Drup: seriously, 200 variants?
psy_ has joined #ocaml
<Drup> companion_cube: it's not that much in the file linked
<haesbaert> (it's around 150 now)
<Drup> frankly, that's better than using ints for that.
<Drup> like, much better
<haesbaert> there is no way you can screw up like this at least
<Drup> I'm less convinced by the "option_code" struct, though :D
<haesbaert> how could I do it differently ?
<Drup> no idea
<haesbaert> take a walk on the wild side !
<haesbaert> I just wanted a name for the code
<haesbaert> and it shows up when ae sexp the packets
<haesbaert> it's handy
<Algebr`> How can I say that if there is no activity on a Lwt_stream, then Lwt ought to timeout.
jgjl has joined #ocaml
jgjl has quit [Client Quit]
jgjl has joined #ocaml
jgjl has quit [Client Quit]
xyh has quit [Read error: Connection reset by peer]
Haudegen has quit [Ping timeout: 240 seconds]
tftio has quit [Quit: Textual IRC Client: www.textualapp.com]
yth has joined #ocaml
ril has joined #ocaml
ril is now known as ril[away]
ril[away] is now known as ril
ril is now known as ril[away]
ril[away] is now known as ril
ril is now known as ril[away]
<edwin> Algebr`: add a timeout on each step http://paste.debian.net/365051/
darkf has quit [Quit: Leaving]
<edwin> timeout_stream' is shorter, but I think timeout_stream should be more efficient (but less accurate, Lwt_timeout only has ~1-2s second granularity)
<edwin> it gets more tricky on how to actually cancel the original stream
<edwin> if its a bounded_push you can #close it and have pushers fail, in some situations you can ignore it (if original stream isn't bound to a socket/file resource), but in some cases I think you just have to drain the original stream asynchronously with Lwt.junk* (I think cohttp does that)
<Algebr`> edwin: I was coming up with this, http://pastebin.com/1272sWsr
<nullcatxxx_> what property should a good lexer have? besides producing correct stream of tokens, it should associate token with perfectly precise location info? what else?
<nullcatxxx_> (i find getting perfect location info is hard...)
<Algebr`> edwin: will try yours, thank you
<edwin> I think yours reads characters from ic, then after 10s it starts writing to oc
<edwin> I'd use string Lwt_stream.t though
<edwin> instead of pushing individual characters
<Algebr`> Why?
ril[away] is now known as ril
<edwin> there is some overhead with all the bufferring/streaming/wakeups, and if you try to push gigabytes it'll start to matter
<Algebr`> I hate to say it but getting the feeling that will need to dig into lwt source code eventually =/
zpe has joined #ocaml
<Algebr`> edwin: trying to incorporate your sample with let echo ic oc = Lwt_io.(write_chars oc (read_chars ic))
slash^ has quit [Read error: Connection reset by peer]
<Algebr`> this seems decent, let echo ic oc =
<Algebr`> timeout_stream ~read_timeout:10 (Lwt_io.read_chars ic)
<Algebr`> |> Lwt_io.write_chars oc
<Algebr`>
<Algebr`> ( ignoring the chars thing for a second)
ely-se has joined #ocaml
<Algebr`> edwin: you know lwt really well.
<edwin> thanks, but there's always more to learn :)
<edwin> most of the times the docs are enough to understand how functions work, but sometimes reading the source code helps
<Algebr`> there aren't enough Lwt blog posts
octachron has joined #ocaml
malc_ has quit [Quit: leaving]
Haudegen has joined #ocaml
nullcatxxx_ has quit [Quit: bye]
sbrouf has quit [Ping timeout: 240 seconds]
d0nn1e has quit [Ping timeout: 260 seconds]
nullcatxxx_ has joined #ocaml
d0nn1e has joined #ocaml
jacquev6 has quit [Quit: jacquev6]
jacquev6 has joined #ocaml
Denommus has quit [Quit: rebooting]
mahasamoot has quit [Ping timeout: 240 seconds]
freehck` has quit [Remote host closed the connection]
ril has quit [Ping timeout: 246 seconds]
zpe has quit [Remote host closed the connection]
vpm has quit [Quit: co'o]
vpm has joined #ocaml
NingaLeaf123 has joined #ocaml
NingaLeaf123 has quit [Read error: Connection reset by peer]
NingaLeaf123 has joined #ocaml
NingaLeaf has quit [Ping timeout: 240 seconds]
vpm has quit [Client Quit]
vpm has joined #ocaml
pierpa has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 240 seconds]
mahasamoot has joined #ocaml
NingaLeaf123 has quit [Quit: Leaving]
NingaLeaf has joined #ocaml
lostman_ has joined #ocaml
<nullcatxxx_> how does one document constructor fields?
<nullcatxxx_> some examples can be found here: https://github.com/ocaml/ocaml/blob/trunk/parsing/parsetree.mli but I feel it's more like example
<nullcatxxx_> and I can't find suggestion in manual
mahasamoot has quit [Ping timeout: 265 seconds]
<octachron> With ocamldoc? By having a docstring (** doc *) just after the constructor
<Algebr`> yea, pretty sure that (** *) gets picked up for constructors.
jacquev6 has quit [Quit: jacquev6]
zpe has joined #ocaml
mahasamoot has joined #ocaml
larhat1 has joined #ocaml
haesbaert has quit [Remote host closed the connection]
<nullcatxxx_> what if i want to document each specific field
<nullcatxxx_> say type t = A of xxxxx list * yyyyyy option * zzzz list * string * int * char option
<nullcatxxx_> i would like to document each of the five fields
<nullcatxxx_> and then document this constructor
<Algebr`> oh each of the five fields of the constructor itself...I don't know about that, why not just put all that documentaiton in the constructor's doc stering?
<Algebr`> string
<nullcatxxx_> yeah... seems like this is the only way to do
<nullcatxxx_> first field is... second field is...
<nullcatxxx_> alright
<Drup> nullcatxxx_: use a record, and document the fields ? ^^'
<nullcatxxx_> yeah
<nullcatxxx_> i was just about to mention it
<nullcatxxx_> daniel used record
<nullcatxxx_> but i am defining an AST. i'd like to write in constructor. so people can more easily do pattern matching
mahasamoot has quit [Ping timeout: 265 seconds]
<octachron> Why not use record as constructor arguments?
manizzle has quit [Ping timeout: 264 seconds]
<nullcatxxx_> the new feature?
ely-se has quit [Quit: Leaving...]
mac10688 has joined #ocaml
mahasamoot has joined #ocaml
manizzle has joined #ocaml
ddosia has quit [Quit: Connection closed for inactivity]
<octachron> yes, I was thinking of inline records, but even without them you could define related records independently and use them as constructor arguments
antkong has joined #ocaml
lokien_ has joined #ocaml
mahasamoot has quit [Ping timeout: 276 seconds]
tane has quit [Quit: Verlassend]
manizzle has quit [Ping timeout: 272 seconds]
manizzle has joined #ocaml
yth has quit [Quit: WeeChat 0.3.8]
zpe has quit [Remote host closed the connection]
struk|desk2 is now known as struk|desk|away
struk|desk|away is now known as struk|desk2
Mirry has quit [Ping timeout: 240 seconds]
<Drup> I suddenly want to apply the new dead_code_analyzer to the compiler code base
<Drup> I'm not sure I should
<edwin> can you apply the dead_code_analyzer to the dead_code_analyzer? :)
<Drup> that too, but I hope they did that already
<octachron> Drup, I don't know, dead code would be in quite good company with some zombies comments or documentations in the compiler
srcerer has joined #ocaml
<Algebr`> I wonder if the new flambda improvements will directly translatae to $$$ because of faster code, ala at Jane Street, etc.
<Drup> considering they are paying for it ...
AltGr has joined #ocaml
NingaLeaf has quit [Quit: Leaving]
<Algebr`> How much faster will OCaml be on average then? any ball park metrics?
<Drup> the number thrown around was 20% to 30% on "average programs"
<Drup> which means both a lot and nothing :p
Denommus has joined #ocaml
<Algebr`> wow
<Drup> in practice, it's quite good for purely functional stuff, no improvements for C-code-as-OCaml (or numeric code)
<zozozo> does it work well when you use a lot of functors ?
<Drup> yeah
<Drup> pierre said that the first time he tried mirage, flambda didn't terminate because it was trying to inline all the functors :D
<zozozo> do you need to fine tune parameters for it to work well, or can one assume that default optimization levels will already do a decemtn amount ?
<Drup> they spend a looong time fine tuning the parameters to work well in most cases
<Drup> (there are -O flags too now, 1 2 and 3)
<zozozo> yes, i saw the levels
<zozozo> I suppose ocamlbuild will be updated accordingly ?
<Drup> err, I hope ?
<zozozo> last time I tried flambda I had to do dirty tricks to get my program to compile with -O3
<Drup> pretty sure you should report that :)
<zozozo> partly because even if you build a native executable, interfaces are compiled with ocamlc, which doesn't accept -O{1,2,3} options
<Drup> ocamlbuild updates will be fast now anyway
Mirry has joined #ocaml
struk|desk2 is now known as struk|desk|away
<pierpa> this will be in the next release, or farther in the future?
Mirry has quit [Ping timeout: 276 seconds]
<Drup> flambda ? next release
<pierpa> nice
<pierpa> good to have less excuses to resort to fortran style code :)
Mirry has joined #ocaml
rpg has quit [Quit: rpg]
Mirry has quit [Ping timeout: 240 seconds]
octachron has quit [Quit: Leaving]
<Algebr`> Why wasn't that inlining of ASM PR rejected?
<Algebr`> why was*
<Drup> aren't the messages clear enough ?
mahasamoot has joined #ocaml