ChanServ changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | http://www.ocaml.org | OCaml 4.01.0 announce at http://bit.ly/1851A3R | Logs at http://irclog.whitequark.org/ocaml
studybot has quit [Remote host closed the connection]
eikke__ has quit [Ping timeout: 252 seconds]
mcclurmc has quit [Remote host closed the connection]
alpounet has quit [Remote host closed the connection]
BrainPirate has quit [Quit: BrainPirate]
testcocoon has quit [Ping timeout: 240 seconds]
racycl___ has quit [Quit: ZZZzzz…]
testcocoon has joined #ocaml
michael_lee has joined #ocaml
racycle has joined #ocaml
jwatzman|work has quit [Quit: jwatzman|work]
nikki93 has joined #ocaml
racycle has quit [Quit: ZZZzzz…]
NoNNaN has joined #ocaml
nikki93 has quit [Remote host closed the connection]
boogie has quit [Remote host closed the connection]
mcclurmc has joined #ocaml
mcclurmc has quit [Remote host closed the connection]
mcclurmc has joined #ocaml
tobiasBora has quit [Quit: Konversation terminated!]
cesar_ has joined #ocaml
cesar_ is now known as Guest30920
Guest30920 has quit [Ping timeout: 260 seconds]
ousado_ has quit [Remote host closed the connection]
ousado_ has joined #ocaml
maattdd has joined #ocaml
nikki93 has joined #ocaml
rz has quit [Ping timeout: 276 seconds]
maattdd has quit [Ping timeout: 265 seconds]
nikki93 has quit [Ping timeout: 240 seconds]
araujo has quit [Ping timeout: 240 seconds]
hhugo has quit [Quit: Leaving.]
srcerer_ has joined #ocaml
srcerer has quit [Ping timeout: 252 seconds]
strobegen has joined #ocaml
q66 has quit [Quit: Leaving]
studybot has joined #ocaml
srcerer_ is now known as srcerer
tiglionabbit has joined #ocaml
alpounet has joined #ocaml
<tiglionabbit> does anyone have an example use of macaque?
maattdd has joined #ocaml
nikki93 has joined #ocaml
<tiglionabbit> I’m new to ocaml. What does the question mark in ?log do here? https://github.com/nickretallack/macaque/blob/master/src/tests/union.ml
alpounet has quit [Ping timeout: 252 seconds]
tiglionabbit has quit [Quit: tiglionabbit]
tiglionabbit has joined #ocaml
tiglionabbit has quit [Client Quit]
maattdd has quit [Ping timeout: 252 seconds]
araujo has joined #ocaml
nikki93 has quit [Ping timeout: 252 seconds]
manizzle has quit [Ping timeout: 240 seconds]
agarwal1975 has joined #ocaml
agarwal1975 has quit [Client Quit]
cesar_ has joined #ocaml
cesar_ is now known as Guest55076
yacks has joined #ocaml
Guest55076 has quit [Ping timeout: 240 seconds]
rgrinberg has quit [Quit: Leaving.]
cross has quit [Quit: leaving]
racycle has joined #ocaml
maattdd has joined #ocaml
ygrek has joined #ocaml
cross has joined #ocaml
cross has quit [Client Quit]
nikki93 has joined #ocaml
maattdd has quit [Ping timeout: 252 seconds]
NoNNaN has quit [Remote host closed the connection]
studybot has quit [Write error: Broken pipe]
nikki93 has quit [Ping timeout: 276 seconds]
studybot has joined #ocaml
NoNNaN has joined #ocaml
cross has joined #ocaml
manizzle has joined #ocaml
huza has joined #ocaml
axiles has joined #ocaml
alpounet has joined #ocaml
maattdd has joined #ocaml
philtor_ has joined #ocaml
alpounet has quit [Ping timeout: 265 seconds]
maattdd has quit [Ping timeout: 252 seconds]
philtor_ has quit [Ping timeout: 240 seconds]
fraggle_laptop has quit [Read error: Connection reset by peer]
cesar_ has joined #ocaml
cesar_ is now known as Guest61541
huza has quit [Ping timeout: 260 seconds]
Guest61541 has quit [Ping timeout: 260 seconds]
brendan has quit [Ping timeout: 240 seconds]
brendan has joined #ocaml
johnelse has quit [Ping timeout: 240 seconds]
johnelse has joined #ocaml
johnelse is now known as Guest43223
maattdd has joined #ocaml
maattdd has quit [Ping timeout: 240 seconds]
michael_lee has quit [Quit: Ex-Chat]
ygrek has quit [Ping timeout: 240 seconds]
nikki93 has joined #ocaml
nikki93 has quit [Remote host closed the connection]
racycle has quit [Quit: ZZZzzz…]
Simn has joined #ocaml
dapz has joined #ocaml
ygrek has joined #ocaml
siddharthv has joined #ocaml
maattdd has joined #ocaml
tiglionabbit has joined #ocaml
maattdd has quit [Ping timeout: 276 seconds]
BrainPirate has joined #ocaml
siddharthv has quit [Remote host closed the connection]
cross has quit [Quit: leaving]
cross has joined #ocaml
cesar_ has joined #ocaml
cesar_ is now known as Guest7604
arj has joined #ocaml
Guest7604 has quit [Ping timeout: 240 seconds]
alpounet has joined #ocaml
nikki93 has joined #ocaml
ygrek has quit [Ping timeout: 240 seconds]
rz has joined #ocaml
nikki93 has quit [Ping timeout: 252 seconds]
nikki93 has joined #ocaml
jao has quit [Ping timeout: 252 seconds]
Kakadu has joined #ocaml
nikki93 has quit [Remote host closed the connection]
dant3 has joined #ocaml
<tiglionabbit> I wanna do this http://strauss.pas.nu/macaque-pgocaml.html but it says Error: Unbound module Sql
<tiglionabbit> do I need to make it include some cma or something?
siddharthv has joined #ocaml
huza has joined #ocaml
ollehar has joined #ocaml
<Kakadu> tiglionabbit: Sql module is from macaque package
<tiglionabbit> I installed that
<Kakadu> how do you invoke compiler?
<tiglionabbit> can I just say ocaml stuff.ml ?
<Kakadu> no
cago has joined #ocaml
<tiglionabbit> then what?
<companion_cube> well you can byt then it would require something like #require "pgocaml";; at the beginning
<companion_cube> but*
eikke__ has joined #ocaml
<Kakadu> #require "macaque";;
<tiglionabbit> unknown directive require
<adrien> #use "topfind";;
<adrien> first
<adrien> you need ocamlfind installed
<tiglionabbit> that works in the interactive console, but if it’s in a file it says “cannot find file topfind"
<Kakadu> Fellas
<Kakadu> maybe we should add tips about using camlp4 syntax extensions into link above
freling has quit [Quit: Leaving.]
freling has joined #ocaml
maattdd has joined #ocaml
tnguyen has joined #ocaml
siddharthv has quit [Remote host closed the connection]
ollehar has quit [Ping timeout: 245 seconds]
eikke__ has quit [Ping timeout: 240 seconds]
<companion_cube> maybe we should rather wait for ppx ;)
Guest43223 is now known as johnelse
<Kakadu> I don't think that camlp4 will be deprecated immediately
<companion_cube> for beginners ppx will be the thing to promote, I believe
huza has quit [Ping timeout: 252 seconds]
tnguyen has quit [Ping timeout: 255 seconds]
Averell- is now known as Averell
avsm has joined #ocaml
AltGr has joined #ocaml
<tiglionabbit> I still can’t figure out how to complie things
nikki93 has joined #ocaml
<companion_cube> tiglionabbit: for real programs I'd really advise you to use ocamlbuild for starters. Take a look at https://github.com/gasche/manual-ocamlbuild/blob/master/manual.md (and give gasche some feedback)
<tiglionabbit> I just want to do this tutorial http://strauss.pas.nu/macaque-pgocaml.html
<tiglionabbit> but it doesn’t say how to compile it
<tiglionabbit> man I don’t even know how to run a thing
tiglionabbit has quit [Quit: tiglionabbit]
cesar_ has joined #ocaml
cesar_ is now known as Guest63610
<Kakadu> tiglionabbit: it is not very good tutorial because it uses compiler patch which was not applied to upstream of compiler
<Kakadu> Ah, it seem he left
Guest63610 has quit [Ping timeout: 255 seconds]
maattdd has quit [Ping timeout: 255 seconds]
ollehar has joined #ocaml
avsm has quit [Quit: Leaving.]
rand000 has joined #ocaml
eikke__ has joined #ocaml
BitPuffin has quit [Ping timeout: 252 seconds]
<Drup> Kakadu: this tutorial shouldn't be advised to beginners anyway, nobody is calling the compiler by itself except people who write makefile
<Drup> and it's not a beginner task.
nikki93 has quit [Remote host closed the connection]
<Kakadu> I understand
<Kakadu> I haven't recommended it. He found it himself
<Drup> I know :)
<Drup> not here anymore, unfortunatly
axiles has quit [*.net *.split]
ousado_ has quit [*.net *.split]
BrainPirate has quit [*.net *.split]
bjorkintosh has quit [*.net *.split]
olasd has quit [*.net *.split]
avsm has joined #ocaml
BrainPirate has joined #ocaml
olasd has joined #ocaml
axiles has joined #ocaml
bjorkintosh has joined #ocaml
ousado_ has joined #ocaml
mort___ has joined #ocaml
avsm has quit [Quit: Leaving.]
siddharthv has joined #ocaml
avsm has joined #ocaml
nikki93_ has joined #ocaml
avsm has quit [Client Quit]
nikki93_ has quit [Remote host closed the connection]
tnguyen has joined #ocaml
tnguyen has quit [Ping timeout: 255 seconds]
yacks has quit [Quit: Leaving]
dapz has quit [Quit: Textual IRC Client: www.textualapp.com]
Hannibal_Smith has joined #ocaml
nikki93 has joined #ocaml
claudiuc has quit [Remote host closed the connection]
claudiuc has joined #ocaml
maattdd has joined #ocaml
nikki93 has quit [Ping timeout: 245 seconds]
avsm has joined #ocaml
claudiuc has quit [Ping timeout: 260 seconds]
passiveo- has quit [Quit: EliteBNC free bnc service - http://elitebnc.org - be a part of the Elite!]
ollehar has quit [Ping timeout: 276 seconds]
dsheets has joined #ocaml
huza has joined #ocaml
cesar_ has joined #ocaml
cesar_ is now known as Guest29645
ousado_ is now known as ousado
ousado has quit [Changing host]
ousado has joined #ocaml
passiveobserver has joined #ocaml
Guest29645 has quit [Ping timeout: 240 seconds]
avsm has quit [Quit: Leaving.]
tnguyen has joined #ocaml
yacks has joined #ocaml
avsm has joined #ocaml
tnguyen has quit [Ping timeout: 255 seconds]
huza has quit [Ping timeout: 252 seconds]
Thooms has joined #ocaml
avsm has quit [Quit: Leaving.]
alinab has quit [Ping timeout: 240 seconds]
alinab has joined #ocaml
j0sh has quit [Ping timeout: 240 seconds]
hhugo has joined #ocaml
j0sh has joined #ocaml
penryu has quit [Ping timeout: 276 seconds]
tnguyen has joined #ocaml
maattdd has quit [Ping timeout: 240 seconds]
penryu has joined #ocaml
Snark_ is now known as Snark
tnguyen has quit [Ping timeout: 255 seconds]
manizzle has quit [Ping timeout: 252 seconds]
maattdd has joined #ocaml
studybot has quit [Ping timeout: 272 seconds]
ggole has joined #ocaml
studybot has joined #ocaml
Thooms has quit [Quit: WeeChat 0.3.8]
_andre has joined #ocaml
kaustuv has left #ocaml ["ERC Version 5.3 (IRC client for Emacs)"]
studybot has quit [Remote host closed the connection]
studybot has joined #ocaml
Thooms has joined #ocaml
studybot has quit [Remote host closed the connection]
studybot has joined #ocaml
agarwal1975 has joined #ocaml
huza has joined #ocaml
studybot has quit [Ping timeout: 272 seconds]
ontologiae has joined #ocaml
huza has quit [Ping timeout: 240 seconds]
agarwal1975 has quit [Quit: agarwal1975]
ontologiae has quit [Ping timeout: 264 seconds]
cesar_ has joined #ocaml
cesar_ is now known as Guest24144
siddharthv is now known as siddharthv_away
Guest24144 has quit [Ping timeout: 240 seconds]
agarwal1975 has joined #ocaml
divyanshu has joined #ocaml
agarwal1975 has quit [Quit: agarwal1975]
ygrek has joined #ocaml
studybot has joined #ocaml
freling has quit [Quit: Leaving.]
freling has joined #ocaml
maattdd has quit [Ping timeout: 265 seconds]
Hannibal_Smith has quit [Quit: Sto andando via]
agarwal1975 has joined #ocaml
Tamae has joined #ocaml
huza has joined #ocaml
BitPuffin has joined #ocaml
<mk270> i understand the Str module isn't re-entrant
<mk270> (e.g., it seems to have some hidden variable for saving the results of a search, for later retrieval)
<mk270> is the new ocaml-re "Re_str" module Ok? and is the Pcre or Re_pcre module Ok?
thomasga has joined #ocaml
<mk270> what is the recommended re-entrant module for doing basic regexp operations?
ontologiae has joined #ocaml
avsm has joined #ocaml
<jpdeplaix> mk270: I don't know, but the main difference as you may know is that: Str is written in C and Re is written in pure OCaml
<whitequark> anything except Str
<whitequark> oh
<johnelse> jonludlam has been busy purging it from our code
<jonludlam> gah
<jonludlam> yes
<jonludlam> it's hidden behind what looks like a pure functional interface
<jonludlam> but turns out to be hideously not-threadsafe :-(
<jonludlam> but that's only Re_str
cago has quit [Ping timeout: 245 seconds]
<flux> if Re_str is to emulate the Str module, it must have internal state?
<flux> I suppose it should remove it from the functions that don't require the state, though, didn't look if it did that
<flux> (the Str module uses internal state even if the interface looks safe)
<flux> jonludlam, you were referring to those operations?
<jonludlam> yes
ddosia has quit [Quit: Leaving.]
<jonludlam> bounded_split_delim was the particular problem for me
<avsm> jonludlam: stringext help you?
<avsm> *does
<jonludlam> no, stringext is a bit too simple
<jonludlam> I wanted to do exactly bounded_split_delim, using a regex as a split point
<avsm> how complex are the regexps?
<avsm> (the split point regexps)
<jonludlam> not terribly, but awkward enough that it would have been several simple splits/strips/etc
<avsm> if it's just newline \r\n regexps then that's fixable
<jonludlam> I made a safe implementation of bounded_split_delim, which I can't find right now.. one sec
<flux> just copy-paste Re_str into a functor and then you can just instantiate a new module locally :)
<jonludlam> the 'sledgehammer' approach :-)
<avsm> If Thor used functors
<jonludlam> let me tell you a story about that file, and how frustrating it was to have to put that in there
<jonludlam> xapi had its own http library, which was mostly OK, but it didn't encode cookies correctly
<jonludlam> then we replaced that with cohttp, which did encode cookies correctly
<jonludlam> and had to make compat code, which undid the damage our library did, and then split them up correctly
<jonludlam> we copied the code from cohttp to split them correctly
<jonludlam> (introducing re_str at that point)
<jonludlam> then when cohttp switched to stringext, rgringberg noticed that cohttp wasn't quite correct
sagotch has joined #ocaml
<jonludlam> and allowed spaces in cookie values
<jonludlam> which xapi had depended on!
<jonludlam> so we couldn't inherit the fix, as that broke our workaround to our broken library
<jonludlam> so I had to go back to cohttp's previous solution, but use a fixed re_str.bounded_split_delim
cago has joined #ocaml
* avsm reads his scrollback with wide eyes
avsm1 has joined #ocaml
thomasga has quit [Quit: Leaving.]
dsheets has quit [Ping timeout: 240 seconds]
avsm has quit [Ping timeout: 260 seconds]
<Drup> whitequark: weirdly, I remember asking you a question following our metadata discussion, but can't find it in the backlog
<whitequark> which q?
<Drup> I read the link you gave me, I got most of it, except the main point : how do I get the metadata attached to an instruction (in "%indvar.next = add i64 %indvar, 1, !dbg !21" for example)
<whitequark> oh
<whitequark> ...
<Drup> don't tell me it's not implemented in the ocaml api, please x)
<whitequark> it is
<whitequark> but you'd wish it wouldn't
<whitequark> basically, you have to use val metadata : llvalue -> int -> llvalue option
<Drup> and which int should I gave ?
<whitequark> the `int' in question is the LLVM-internal encoding, unique for !dbg and other possible names there
<Drup> and how do I figure this int out ?
<whitequark> why, by reading LLVM sources, of course
* whitequark giggles
<whitequark> (I'll do it for you)
<Drup> and what about the metadata is not added by llvm itself ?
<Drup> what if*
<whitequark> that would depend on what the int represents, exactly
<Drup> is the number guaranteed to be the same ?
<whitequark> oh
<whitequark> actually, it's not *that* horrible
<Drup> " %.0 = phi i32 [ %x, %0 ], [ %.1, %9 ], !pagai.var !2" <-- here is my real example. If it's define in the tool in question, I can just ask the guy who did it (he's at shouting distance :D)
<whitequark> you make it from a string using Llvm.mdkind_id llctx "pagai.var"
<whitequark> why the hell it doesn't use an abstract type there, I do not know
sagotch has quit [Remote host closed the connection]
<Drup> ok ...
<Drup> that's actually usable.
<whitequark> (a patch would be very welcome)
<Drup> yeah, I can do that.
<whitequark> great!
<whitequark> call it `type llmdkind`, I think
<Drup> I would like to finish my termination checker before starting to divert my attention again
<whitequark> *nod*
divyanshu has quit [Quit: Computer has gone to sleep.]
<Drup> (if you are interested : http://pagai.forge.imag.fr/)
<adrien_oww> pagaille, sounds nice :P
<adrien_oww> might have been a name for Containers :D
Kakadu has quit [Ping timeout: 240 seconds]
<Drup> whitequark: I must say, the fact that you can't store llvm values inside metadata is a pain.
tizoc has quit [Quit: Coyote finally caught me]
tizoc has joined #ocaml
<whitequark> you can
<Drup> really ? how do you do ?
<Drup> I mean non constants one.
<whitequark> globals work too.
<Drup> ah right, but not local ones,
<whitequark> yes
<Drup> so yeah, not useful.
<whitequark> I think it's supposed to go other way.
<whitequark> so basically !yourmeta !0, then you'd iterate all uses of !0
darkf has quit [Quit: Leaving]
<Drup> yeah, that's the workaround used in pagai
thomasga has joined #ocaml
<whitequark> and to avoid !0 being merged with other metadata with same structure, don't forget to put it into itself
<whitequark> !0 = !{ !0 }
<Drup> delicious.
<whitequark> I smell sarcasm
<Drup> :D
shinnya has quit [Ping timeout: 252 seconds]
dsheets has joined #ocaml
<jonludlam> I have a problem, and I'm wondering the best way to tackle it:
alpounet has quit [Read error: Connection reset by peer]
<jonludlam> we have a daemon, xcp-networkd, that gathers info about network interfaces, which it can do by looking around in proc/sys
alpounet has joined #ocaml
<jonludlam> and we have a library, ocaml-netlink, that can do it via libnl, if we've got that installed
<jpdeplaix> gasche, are you there ?
<jonludlam> libnl isn't widely available, so we'd like to make the ocaml-netlink library optional
thomasga has quit [Quit: Leaving.]
<Drup> jonludlam: what is the issue exactly ?
<jonludlam> but networkd uses oasis, which has the library dependencies specified
<Drup> ok, I had the exact same issue
<flux> drup, how well does pagai work?
<Drup> flux : I can't really evaluate it, nor compare to other tools, as I don't really know them
<flux> drup, well, does it have lots of bugs?-)
<Drup> does seem so :)
<Drup> doesn't*
<jonludlam> Drup, to be clear, that commit removes the conditional dependency, right? but shows how it could be done?
<Drup> jonludlam: no, this commit actually had the conditional dependency
<Drup> add*
<Drup> bll
<flux> drup, is there lots of improvements to be had?
agarwal1975 has quit [Quit: agarwal1975]
<Drup> flux: it's state of the art research, there is always lot's of improvements possibles
<Drup> jonludlam: so, previously, I had a weird solution that didn't work, with two executable sections for the same executable
<Drup> it didn't actually work, one was overwritten by the other
<flux> drup, so it works in llvm level, does it work for languages other than C?
<jonludlam> Drup, ok right. lemme look more
<flux> drup, also, how do you put the annotations back to the source code?
<Drup> what I did is that I removed the extra executable section and added special ocamlbuild rules that look into the setup.data information if a flag is enabled or not and add the appropriate dependency if it is
<jonludlam> ooooh
<jonludlam> right
<jonludlam> cppo
<mk270> ok - thanks for the discussion re regexps - the answer seems to be everything is terrible?
<Drup> jonludlam: I also use cppo, yeah
<jonludlam> no wait
<jonludlam> hm
<mk270> i'm reading "Str, and anything which pretends to be Str, is broken"
<jonludlam> mk270, no, re_str in ocaml-re is terrible
<Drup> but cppo alone is not enough, you need to do the ocamlbuild thingy
<mk270> but the pcre thing is Ok
<jonludlam> oh, so the ocamlbuild.ml isn't autogenerated by oasis?
<Drup> flux: I'm not the author at all !
<flux> drup, oh
<Drup> jonludlam: this part, no
<mk270> basically, there's this "regexp -> string -> bool" function which saves some magic internal state, which you retrieve some other way
<jonludlam> I see
<mk270> and i don't trust that to play niceley with Lwt
<jonludlam> with lwt you're probably fine
<mk270> ah ok
<jonludlam> there's no yielding anywhere
<jonludlam> but for pthreads, you're not OK
<Drup> (jonludlam: there is no generated code in the myocamlbuild.ml, since it's using the dynamic setup)
<mk270> well, it still sucks and i still want to work around it - i can use Pcre?
<Drup> mk270: or you can use normals Re :p
<jonludlam> Drup, gotcha. Drat, that means trying to figure out ocamlbuild...!
<mk270> drup: i thought normal Re had the same interface problem? not so?
<Drup> jonludlam: I did most of the work :p
<jonludlam> mk270, no, just the Re_str module
* jonludlam coughs
<jonludlam> :-)
<mk270> is the documentation secret?
seanmcl has joined #ocaml
<Drup> jonludlam: I was working on something a bit more "generic" that what I'm using, let me push it
yacks has quit [Ping timeout: 260 seconds]
<jonludlam> Drup, cool
<Drup> actually, I'm not sure the "more generic" thingy is better for you x)
kaustuv has joined #ocaml
cesar_ has joined #ocaml
cesar_ is now known as Guest93634
<Drup> jonludlam: the simple version is here : https://github.com/Drup/LILiS/blob/master/myocamlbuild.ml#L37
Guest93634 has quit [Ping timeout: 252 seconds]
tnguyen has joined #ocaml
<jonludlam> thanks Drup. I'll think hard and read some docs, then probably ask for more help :-)
<Drup> yeah, sorry, it's a bit WIP
<mk270> so does anyone know if there's documentation for ocaml-re?
dsheets has quit [Ping timeout: 260 seconds]
<Drup> jonludlam: for indication "BaseEnvLight" is part of the autogenerated myocamlbuild.ml by oasis
<Drup> (and it's the part reading the setup.data)
<Drup> the rest is coming from Ocamlbuild_plugin, which documentation is available here : https://github.com/hhugo/ocamlbuild/blob/trunk/signatures.mli#L525
<Drup> flux: I can still answer a little bit, since I'm using it
<Drup> flux: it's taking llvm's bitcode as input, it should accept any language
<kaustuv> Are there any LLVM-based compilers that have a precise incremental GC?
<Drup> I don't know about annotations in the source code, but it can output an annotated bitcode, with invariants in the metadata
<Drup> (which is what I'm using)
<whitequark> kaustuv: not that I'm aware of...
<whitequark> oh, hm, the WebKit FTL JIT may count as one
<whitequark> but the problem is that the LLVM GC layer currently makes it impossible to have roots in registers
<jpdeplaix> I think the rust guys are working on that
<kaustuv> I'm not clued in on these things, but doesn't having a shadow stack solve this?
<whitequark> they have attempted it once and gave up, and now Rust has moved from GC paradigm by large
<whitequark> kaustuv: it's very expensive
<whitequark> you have to reload values *all the time*, or in best cases just around every single call
<whitequark> jpdeplaix: I think the current work with Rust and GC is more or less integrating Boehm nicely
<whitequark> Rust never had a working GC, you see
<whitequark> and there's not really much desire for it
<jpdeplaix> :/
<jpdeplaix> why « nicely » ?
<jpdeplaix> I've recently started using Boehm for cervoise
cago has quit [Quit: Leaving.]
<whitequark> I think Boehm wants to keep some thread-local data itseld
<whitequark> itself*
<jpdeplaix> mmmh ok
<whitequark> and it plays well neither with green threads (ugh) nor with pthreads, because it doesn't really *have* to care, when your type system guarantees the GC values are task-local
<whitequark> I think the trouble is mostly about green threads
<kaustuv> I'm reading the Swift programming manual, and it seems that they have made a ridiculous mess of closures because of their commitment to reference counting
<whitequark> it's not as much committment to refcounting as a commitment to full interop with ObjC, I believe
<kaustuv> Ah, that may be it. Does ObjC have concepts like "unowned references"?
<whitequark> malloc() ? :)
dsheets has joined #ocaml
johnelse has quit [Ping timeout: 252 seconds]
<whitequark> how'd you collect it?
<kaustuv> Well, in the Swift argot, an "unowned" reference is a reference managed elsewhere.
<kaustuv> Kind of like a weak reference
<whitequark> I don't know really
<def`> kaustuv: yes there is this concept
<ousado> kaustuv: what's special about closures there?
<ousado> or messy, rather
<ousado> ?
<def`> kaustuv: this essentially means not generating refcount manipularion instructions
<kaustuv> ousado: they add something called "capture list" to the type of functions that basically tell the system what kind of reference to hold to captured variables in the context
<def`> (in objc)
<ousado> kaustuv: manually?
<kaustuv> Yep.
<ousado> O_O
<ousado> sounds C++-ish
<kaustuv> Search for "Resolving Strong Reference Cycles for Closures"
thomasga has joined #ocaml
thomasga has quit [Client Quit]
<ousado> "The appropriate choice of weak or unowned depends on the relationships between the different parts of your code."
<ousado> very precise
ygrek has quit [Ping timeout: 260 seconds]
<kaustuv> I'm ready to predict that memory analysis tools to remove reference cycles will becom de rigueur in iOS/OS X
agarwal1975 has joined #ocaml
dsheets has quit [Ping timeout: 260 seconds]
huza has quit [Quit: WeeChat 0.3.8]
<ousado> wow, that chapter really is covers the sick part of swift
<kaustuv> It can basically serve as a definition for "runtime-guided language design"
<ousado> yeah
<ousado> "The compiler is optimized for performance, and the language is optimized for development, without compromising on either"
<ousado> could hardly be more wrong after reading that
agarwal1975 has quit [Quit: agarwal1975]
agarwal1975 has joined #ocaml
<ousado> I skipped the chapter initially, and apart from switches and if-else not being expressions I first thought apple did a better job than google with dart, MS with typescript and FB with hack
tizoc has quit [Quit: Coyote finally caught me]
tizoc has joined #ocaml
<kaustuv> well, *anything* would be better than Dart. I mean, their response to people pointing out that their type system is unsound (for covariant subtyping in arrays) was, "yes, but, it's more intuitive!"
<whitequark> ... WHAT
sagotch has joined #ocaml
<jpdeplaix> :DD
<Armael> kaustuv: and they add runtime checks to patch up the thing ?
<companion_cube> < whitequark> oh, hm, the WebKit FTL JIT may count as one <--- oh dear, a Faster Than Light jit compiler?
<whitequark> companion_cube: Fourth Tier Layer, also, yes.
<def`> whitequark: so the use cases should be quite limited... really hot loop ?!
<companion_cube> "unsound but not unsafe" <-- yes unsafe
<def`> or are they planning more general uses
<whitequark> def`: it's in the name. "Fourth Tier Layer"
<whitequark> works after the naive interpreter, simple codegen and optimizing codegen of JSC have worked too
<whitequark> so yeah, hot, long-lived code. emscripten-generated stuff. etc
<whitequark> also, being faster than light is not really hard
* kaustuv is struggling to make a joke about "faster than caml-light"
<companion_cube> :)
tnguyen has quit [Quit: tnguyen]
yacks has joined #ocaml
gereedy has quit [Quit: ZNC - http://znc.sourceforge.net]
arjunguha has joined #ocaml
tizoc has quit [Quit: Coyote finally caught me]
tizoc has joined #ocaml
kaustuv has left #ocaml ["ERC Version 5.3 (IRC client for Emacs)"]
ygrek has joined #ocaml
<sagotch> hi
<sagotch> I am looking for a way to disable the quotes highlighting in tuareg-mode (<< ... >>), any idea?
Nahra has quit [Remote host closed the connection]
willb1 has quit [Ping timeout: 252 seconds]
willb1 has joined #ocaml
<reynir> Armael: AFAIK the static types in dart don't mean a thing at run time
<Armael> wow
<Armael> so hum
<Armael> ok
<reynir> and type checking is optional anyway
rgrinberg has joined #ocaml
Nahra has joined #ocaml
<ousado> they have a checked mode
<ousado> where they give different runtime errors than you get in release mode
<ousado> or something
rz has quit [Quit: Ex-Chat]
nikki93 has joined #ocaml
BrainPirate_ has joined #ocaml
BrainPirate has quit [Ping timeout: 240 seconds]
BrainPirate_ is now known as BrainPirate
nikki93 has quit [Ping timeout: 240 seconds]
Hannibal_Smith has joined #ocaml
Gertm has joined #ocaml
cesar_ has joined #ocaml
cesar_ is now known as Guest47051
jwatzman|work has joined #ocaml
johnelse has joined #ocaml
Guest47051 has quit [Ping timeout: 264 seconds]
yacks has quit [Ping timeout: 264 seconds]
avsm1 has quit [Quit: Leaving.]
olauzon has joined #ocaml
avsm has joined #ocaml
eikke__ has quit [Ping timeout: 255 seconds]
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
sagotch has quit [Remote host closed the connection]
maattdd has joined #ocaml
yacks has joined #ocaml
racycle has joined #ocaml
nispaur_ is now known as nispaur
martintrojer has quit [Ping timeout: 255 seconds]
martintrojer has joined #ocaml
ygrek has quit [Ping timeout: 240 seconds]
Submarine has joined #ocaml
BitPuffin has quit [Ping timeout: 255 seconds]
slash^ has joined #ocaml
tlockney_away is now known as tlockney
ontologiae has quit [Ping timeout: 260 seconds]
boogie has joined #ocaml
arjunguh_ has joined #ocaml
arjunguha has quit [Ping timeout: 276 seconds]
arjunguh_ has quit [Client Quit]
tobiasBora has joined #ocaml
eikke__ has joined #ocaml
Submarine_ has joined #ocaml
Submarine_ has quit [Changing host]
Submarine_ has joined #ocaml
arjunguha has joined #ocaml
Submarine has quit [Ping timeout: 276 seconds]
arjunguha has quit [Client Quit]
<tobiasBora> Does anyone manage to make ocaml-gettext work ?
arjunguha has joined #ocaml
<tobiasBora> Oh c'est bon :)
Thooms has quit [Quit: WeeChat 0.3.8]
arjunguha has quit [Client Quit]
<adrien> :)
jwatzman|work has quit [Quit: jwatzman|work]
manizzle has joined #ocaml
Kakadu has joined #ocaml
rgrinberg has quit [Quit: Leaving.]
rgrinberg has joined #ocaml
<tobiasBora> There is something I don't understand : what is the difference between the "library" module and the "program" module ?
eikke__ has quit [Ping timeout: 265 seconds]
arjunguha has joined #ocaml
q66 has joined #ocaml
arjunguha has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tobiasBora has quit [Ping timeout: 265 seconds]
<adrien> have you looked inside gnu gettext's doc?
manizzle has quit [Ping timeout: 260 seconds]
tane has joined #ocaml
maattdd has quit [Ping timeout: 240 seconds]
tnguyen has joined #ocaml
jao has quit [Ping timeout: 276 seconds]
mort___ has quit [Ping timeout: 265 seconds]
seanmcl has quit [Read error: Connection reset by peer]
cesar_ has joined #ocaml
cesar_ is now known as Guest57976
Guest57976 has quit [Ping timeout: 260 seconds]
arj has quit [Quit: Leaving.]
arj has joined #ocaml
arj has quit [Quit: Leaving.]
AltGr has left #ocaml [#ocaml]
tnguyen1 has joined #ocaml
tnguyen has quit [Read error: Connection reset by peer]
arjunguha has joined #ocaml
nikki93 has joined #ocaml
manizzle has joined #ocaml
nikki93 has quit [Ping timeout: 276 seconds]
arjunguha has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
BitPuffin has joined #ocaml
alpounet has quit [Remote host closed the connection]
jsvgoncalves has joined #ocaml
yacks has quit [Ping timeout: 255 seconds]
tnguyen1 has quit [Quit: tnguyen1]
yacks has joined #ocaml
maattdd has joined #ocaml
tane has quit [Quit: Verlassend]
hhugo has quit [Quit: Leaving.]
avsm has quit [Quit: Leaving.]
rgrinberg has quit [Quit: Leaving.]
maattdd has quit [Ping timeout: 252 seconds]
keen________ has joined #ocaml
keen_______ has quit [Ping timeout: 264 seconds]
Thooms has joined #ocaml
cesar_ has joined #ocaml
cesar_ is now known as Guest38116
hhugo has joined #ocaml
Guest38116 has quit [Ping timeout: 255 seconds]
rz has joined #ocaml
shinnya has joined #ocaml
maattdd has joined #ocaml
slash^ has quit [Read error: Connection reset by peer]
Moataz-E has joined #ocaml
typedlambda has quit [Ping timeout: 252 seconds]
tobiasBora has joined #ocaml
maattdd has quit [Ping timeout: 264 seconds]
typedlambda has joined #ocaml
jsvgoncalves has quit [Remote host closed the connection]
Nahra has quit [Remote host closed the connection]
Nahra has joined #ocaml
eikke__ has joined #ocaml
wwilly has joined #ocaml
_andre has quit [Quit: leaving]
Submarine_ has quit [Remote host closed the connection]
Submarine has joined #ocaml
Submarine has joined #ocaml
Submarine has quit [Changing host]
Anarchos has joined #ocaml
hhugo has quit [Quit: Leaving.]
claudiuc has joined #ocaml
maattdd has joined #ocaml
Nahra has quit [Remote host closed the connection]
hhugo has joined #ocaml
Nahra has joined #ocaml
maattdd has quit [Ping timeout: 276 seconds]
yacks has quit [Ping timeout: 252 seconds]
rand000 has quit [Quit: leaving]
deavid has quit [Ping timeout: 255 seconds]
thomasga has joined #ocaml
philtor_ has joined #ocaml
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
Submarine has quit [Quit: Leaving]
<ousado> I'm looking for a refactoring tool for changing ADT constructors and their uses in a relatively large code-base, anyone aware of such a thing?
maattdd has joined #ocaml
cesar_ has joined #ocaml
cesar_ is now known as Guest78907
<Drup> no, but maybe you can cheat
<Drup> 1) design a ppx to do it
<Drup> 2) use -dsource
<ousado> what's -dsource?
<Drup> undocumented compiler flag that make the parser output the program after all pp/ppx
thomasga has quit [Quit: Leaving.]
<ousado> sounds not too bad
wwilly has quit [Remote host closed the connection]
Guest78907 has quit [Ping timeout: 260 seconds]
<Drup> you could do something slightly nicer (and less hacky) by using the compiler libs directly
<Drup> it probably wouldn't be too terrible
<ousado> more specifically this is about String here: https://github.com/HaxeFoundation/haxe/blob/development/ast.ml#L244 - where String of string has to be changed to String of string * bool
thomasga has joined #ocaml
<ousado> so pretty much a worst case scenario for doing it by hand
<Drup> and you have a default boolean for everywhere ?
<ousado> it comes from the lexer, and is not really significant in maybe 99% of the cases
<ousado> it's to distinguish single-quoted strings from double-quoted ones
philtor_ has quit [Ping timeout: 240 seconds]
deavid has joined #ocaml
ggole has quit []
thomasga has quit [Quit: Leaving.]
seanmcl has joined #ocaml
<Drup> the nice part with the ppx is that you will be able to distinguish String-in-a-pattern and String-as-a-function
<ousado> Drup: can I tell ppx to preserve whitespace?
rgrinberg has joined #ocaml
<Drup> -dsource should take care of that
<Drup> ppx is only working at the AST level
agarwal1975 has quit [Quit: agarwal1975]
thomasga has joined #ocaml
<ousado> hmmmm
<ousado> I'll have to try I guess, thanks
agarwal1975 has joined #ocaml
Kakadu has quit [Quit: Konversation terminated!]
agarwal1975 has quit [Ping timeout: 240 seconds]
axiles has quit [Remote host closed the connection]
jwatzman|work has joined #ocaml
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
tobiasBora has quit [Ping timeout: 265 seconds]
Hannibal_Smith has quit [Quit: Sto andando via]
tobiasBora has joined #ocaml
agarwal1975 has joined #ocaml
hhugo has quit [Quit: Leaving.]
<thomasga> is there any hope to have this compile https://gist.github.com/samoht/266f8c365952e36fe447 ?
hhugo has joined #ocaml
<Drup> thomasga: s/x/X/ I presume ?
emmanueloga has quit [Ping timeout: 265 seconds]
<thomasga> well any module actually (not X)
<thomasga> but the problem is about creating top-level modules from module packs apparently
<thomasga> (seems to be a syntactic restriction)
emmanueloga has joined #ocaml
johnelse has quit [Ping timeout: 265 seconds]
johnelse has joined #ocaml
johnelse is now known as Guest80775
<Drup> introduced*
<Drup> thomasga: wasn't generative functor untroduced in 4.02 to allow this kind of construction ?
agarwal1975 has quit [Quit: agarwal1975]
emmanueloga has joined #ocaml
emmanueloga has quit [Changing host]
cross has quit [Ping timeout: 265 seconds]
<Drup> yeah
<Drup> it's working in 4.02
<Drup> just tried
<Drup> only work inside a generative functor
cross has joined #ocaml
<Drup> replace (X : sig end) by ()
<Drup> if you try with (X : sig end) it gives you an almost clear error message : "This expression creates fresh types. It is not allowed inside applicative functors."
chris2 has quit [Ping timeout: 245 seconds]
BrainPirate has quit [Quit: BrainPirate]
<thomasga> hum
<thomasga> but I don't create fresh type
<thomasga> (I'm installing 4.02 to see the difference)
<Drup> but you may easily, using first class modules
Thooms has quit [Quit: WeeChat 0.3.8]
<Drup> (also, technically, you are, but they might be alias to other type that are not knew)
<Drup> new*
<thomasga> I see
<thomasga> hum
<thomasga> it works with 4.02 when you don't use generative functor
agarwal1975 has joined #ocaml
<thomasga> interesting
chris2 has joined #ocaml
<Drup> does it ? huuum
<Drup> maybe I used the wrong example for x
<Drup> what did you used ?
Simn has quit [Quit: Leaving]
<thomasga> actually it works with generative as well
<thomasga> seems that the compiler is clever enough to see that I only create aliases
<Drup> that's normal, everything that works without generative will work with it :)
<Drup> ok, indeed, I tried with a module with an abstract type
<Drup> if your types are not abstract, you don't need the generativeness
NoNNaN has quit [Ping timeout: 272 seconds]
<Drup> (although, the fonctor as you defined it with this X is actually fake-generative, so you might as well make it really generative :p)
<thomasga> well, in my example X contains more stuff
<thomasga> in my use-case I mean
S1100100` has joined #ocaml
S11001001 has quit [Disconnected by services]
<Drup> yeah
S1100100` is now known as S11001001
S11001001 has quit [Changing host]
S11001001 has joined #ocaml
nikki93 has joined #ocaml
seanmcl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tristero has joined #ocaml
NoNNaN has joined #ocaml
eikke__ has quit [Ping timeout: 240 seconds]
eikke__ has joined #ocaml
tobiasBora has quit [Quit: Konversation terminated!]
cesar_ has joined #ocaml
cesar_ is now known as Guest36274
rgrinberg has quit [Quit: Leaving.]
Guest36274 has quit [Ping timeout: 240 seconds]
chris2 has quit [Ping timeout: 245 seconds]
jwatzman|work has quit [Quit: jwatzman|work]
rgrinberg has joined #ocaml
olauzon has quit [Ping timeout: 265 seconds]
chris2 has joined #ocaml
jsvgoncalves has joined #ocaml
alpounet has joined #ocaml
WraithM has quit [Ping timeout: 260 seconds]
madroach has quit [Ping timeout: 252 seconds]
thomasga has quit [Quit: Leaving.]
madroach has joined #ocaml
thomasga has joined #ocaml
agarwal1975 has quit [Quit: agarwal1975]
thomasga has quit [Client Quit]
NoNNaN has quit [Remote host closed the connection]
BrainPirate has joined #ocaml
BrainPirate has quit [Client Quit]
NoNNaN has joined #ocaml
alpounet has quit [Remote host closed the connection]
<eikke__> anyone ever defined a module which is a functor over 2 other modules, where the signature of the second depends on some type defined in the first?
darkf has joined #ocaml
agarwal1975 has joined #ocaml