adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.02.2 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
jeffmo has quit [Ping timeout: 246 seconds]
jeffmo_ is now known as jeffmo
<ygrek_> mfp, one more attempt ^_^
<mfp> you could just name it prepend ;-)
* mfp pinning & rebuilding
jeffmo_ has joined #ocaml
<nullcatxxx_> how do you sort string in ocaml?
<nullcatxxx_> seems there is no easy way...
jeffmo_ has quit [Client Quit]
jeffmo has quit [Ping timeout: 272 seconds]
<mfp> ygrek_: fix confirmed :)
<ygrek_> ok!
<ygrek_> will release soon
<ygrek_> thanks for the bug and code review :)
<mfp> ygrek_: better rename that curl_slist_append_ml to curl_slist_prepend_ml though, you don't want to reuse it by accident someday (assuming it does append) and run into another bug :-)
<ygrek_> note that I've used original append that way for long time already
<ygrek_> immutable lists spoil people
<mfp> I saw another instance indeed, but it didn't hurt
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<ygrek_> renamed
<mfp> L1398 looks like immutable list usage, but it's actually OK (and the expected use of curl_slist_append) according to libcurl's sources "It always returns the address of the first record, so that you can use this function as an initialization function as well as an append function."
<mfp> the order of the args is preserved <- thankfully there's no List.rev of sorts there, so everything's fine
<mfp> no actually I'm being silly, getting the address of the first record *is* what you'd expect from cons
<mfp> which means it's time to zzz
<mfp> night!
tmtwd has joined #ocaml
rgrinberg has joined #ocaml
toomuchtvrotsurb has quit [Remote host closed the connection]
jimt_ is now known as jimt
toomuchtvrotsurb has joined #ocaml
rgrinberg has quit [Ping timeout: 246 seconds]
rgrinberg has joined #ocaml
travisbrady has quit [Quit: travisbrady]
travisbrady has joined #ocaml
struktured has quit [Ping timeout: 240 seconds]
travisbrady has quit [Quit: travisbrady]
tmtwd has quit [Ping timeout: 255 seconds]
toomuchtvrotsurb has quit [Remote host closed the connection]
travisbrady has joined #ocaml
swgillespie has joined #ocaml
toomuchtvrotsurb has joined #ocaml
pacmann has quit [Remote host closed the connection]
tnguyen has quit [Quit: tnguyen]
arjunguha has joined #ocaml
__uu__ has joined #ocaml
nullcatxxx_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nullcatxxx_ has joined #ocaml
travisbrady has quit [Quit: travisbrady]
arjunguha has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
toomuchtvrotsurb has quit [Remote host closed the connection]
toomuchtvrotsurb has joined #ocaml
arjunguha has joined #ocaml
toomuchtvrotsurb has quit [Remote host closed the connection]
arjunguha has quit [Client Quit]
toomuchtvrotsurb has joined #ocaml
toomuchtvrotsurb has quit [Remote host closed the connection]
travisbrady has joined #ocaml
__uu__ has quit [Read error: Connection reset by peer]
__uu___ has joined #ocaml
ygrek_ has quit [Ping timeout: 250 seconds]
igoroliveira has quit [Quit: Connection closed for inactivity]
tnguyen has joined #ocaml
jeffmo has joined #ocaml
gobbledigook has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
tmtwd has joined #ocaml
darkf has joined #ocaml
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mac10688 has quit [Ping timeout: 250 seconds]
travisbrady has quit [Quit: travisbrady]
jeffmo has quit [Quit: jeffmo]
mengu has joined #ocaml
mengu has quit [Ping timeout: 264 seconds]
__uu__ has joined #ocaml
__uu___ has quit [Ping timeout: 264 seconds]
swgillespie has joined #ocaml
Mercuria1Alchemi has joined #ocaml
cdidd has quit [Ping timeout: 264 seconds]
tmtwd has quit [Ping timeout: 244 seconds]
rgrinberg has quit [Ping timeout: 244 seconds]
nullcatxxx_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mengu has joined #ocaml
mengu has quit [Ping timeout: 265 seconds]
tmtwd has joined #ocaml
Mercuria1Alchemi has quit [Ping timeout: 260 seconds]
gobbledigook has joined #ocaml
toomuchtvrotsurb has joined #ocaml
tnguyen has quit [Quit: tnguyen]
tnguyen has joined #ocaml
tnguyen has quit [Client Quit]
tnguyen has joined #ocaml
tnguyen has quit [Client Quit]
tmtwd has quit [Ping timeout: 260 seconds]
rgrinberg has joined #ocaml
rgrinberg has quit [Ping timeout: 260 seconds]
AltGr has joined #ocaml
nullcatxxx_ has joined #ocaml
gene9 has joined #ocaml
shinnya has quit [Ping timeout: 272 seconds]
gene9 has quit [Client Quit]
gobbledigook has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
nullcatxxx_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
gobbledigook has joined #ocaml
toomuchtvrotsurb has quit [Remote host closed the connection]
toomuchtvrotsurb has joined #ocaml
struktured has joined #ocaml
martintrojer has quit [Ping timeout: 246 seconds]
martintrojer has joined #ocaml
<companion_cube> wow, there is no String.sort? I'm surprised
<adrien> what would it do...
<struktured> compare is all you need really, after you parse it
<struktured> assuming he meant sort a sequence of characters
<MercurialAlchemi> companion_cube: is there a CCString.sort?
<companion_cube> actually I'm more surprised that there isn't a functorized sort algorithm, for bigarrays and array slices
<companion_cube> no, but there might be soon :p
* MercurialAlchemi is amused that companion_cube would be surprised at the idea that something is missing form the stdlib
<companion_cube> (rather, the functor I've just described)
<companion_cube> well there's List.sort and Array.sort in the stdlib
<companion_cube> it's not like missing iterators
<MercurialAlchemi> maybe a better of way of looking at it is, do you need to sort strings when you write a compiler?
<MercurialAlchemi> no? then no String.sort for you
<companion_cube> heh
<companion_cube> I'll probably write the functor version anyway
psy_ has joined #ocaml
<companion_cube> I've not written sort algorithms in a while
<adrien> companion_cube: since string elements are 8 bits, would the sort happen on 8 bits of data only?
<companion_cube> ?
<companion_cube> you mean radix sort?
<MercurialAlchemi> I think he means that since a "feature" of ocaml strings are that they're encding-agnostic, you may run into problem with unicode
<MercurialAlchemi> of course, if you functorize the world, you could have a UnicodeSort algorithm
<adrien> you mention bigarrays and strings but strings elements have a different bit width than arrays
<MercurialAlchemi> I'm sure dbuenzli must have written a library with an unpronounceable name for that
<adrien> as for bigarrays, typically you use them to avoid allocating
<adrien> so you'd need an in-place sort
<adrien> and these two things make sorting a bit different from arrays I believe
toomuchtvrotsurb has quit [Remote host closed the connection]
<companion_cube> adrien: well there are good in-place sorting algorithms, aren't they?
<companion_cube> a 3-way quicksort for instance
<companion_cube> anyway, in a functor, we don't care about the bit width of elements
<adrien> yup, I'm only pointing out that it's really different from the sorts with array and list: trying to provide an explanation as to why you don't have that in the stdlib
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<companion_cube> another excuse for reinventing the wheel!! ♥
mort___ has quit [Quit: Leaving.]
<MercurialAlchemi> I hear square wheels are best
<companion_cube> I prefer irregular shapes
antkong has quit [Quit: antkong]
ely-se has joined #ocaml
uggwar has joined #ocaml
Nahra has quit [Remote host closed the connection]
destrius has joined #ocaml
keen______ has quit [Read error: Connection reset by peer]
keen______ has joined #ocaml
mort___ has joined #ocaml
<struktured> i use infinitely dimensional hyperspheres myself. but each to his own.
Haudegen has quit [Ping timeout: 240 seconds]
toomuchtvrotsurb has joined #ocaml
orbifx has joined #ocaml
AltGr has left #ocaml [#ocaml]
toomuchtvrotsurb has quit [Ping timeout: 265 seconds]
johnelse has quit [Quit: leaving]
johnelse has joined #ocaml
Haudegen has joined #ocaml
sh0t has joined #ocaml
mort___ has quit [Quit: Leaving.]
larhat1 has quit [Quit: Leaving.]
ollehar has joined #ocaml
<ely-se> why do people like async APIs so much?
<ely-se> I never understood
<ely-se> IME they are just a PITA
<struktured> ely-se: it's not that poeple like them, per se, it's that they solve a couple problems that need to be addressed one way anotherr
<struktured> *or another
<ely-se> but there are less obtrusive ways to address those problems
<ely-se> that don't require new APIs
<struktured> you mean the "monadic" apis? the error handling semantics? the hidden scheduler? what part exactly?
<ely-se> API changes from t -> u to t -> u future or t -> (u -> ()) -> () (or something else equivalent), and hence cannot be used with existing combinators such as map and filter anymore
<ely-se> you now essentially have two different ways to call functions, and one cannot be nested inside the other
<struktured> sure, but at least such apis typically provide map/filter/ etc. with these wrapped types
<ely-se> very good code reuse
<struktured> so it's not async apis to be clear
<struktured> it's any api which wraps types in a monadic style
<struktured> (if I'm undestanding you)
mort___ has joined #ocaml
<ely-se> yes, hence not requiring the wrapper makes live easier
bugabinga has joined #ocaml
obadz has quit [Quit: WeeChat 1.3]
<struktured> fair enough, in practice though you just need to invoke a conversion functoin in the middle of a functional composition, which isn't the end of the world. it's the slight differences in the monadic apis and error handling that gets me
<MercurialAlchemi> ely-se: how would you get non-blocking io without async, especially in a language without real threads?
<struktured> MercurialAlchemi: are you implying you need a type which defines a defered computational unit, and therefore you need a wrapped typed?
<struktured> *type
<MercurialAlchemi> well, yeah
<MercurialAlchemi> or callbacks
<MercurialAlchemi> but in any case, you're going to need an "async api"
<struktured> ok, just making sure I understood you :)
<ely-se> MercurialAlchemi: stackful coroutines, like Go, Lua, GHC, Erlang, etc
mengu has joined #ocaml
govg has joined #ocaml
<MercurialAlchemi> I haven't worked with any of these
<MercurialAlchemi> ely-se: can you map() over an array of goroutines?
<ely-se> no, goroutines aren't objects
<MercurialAlchemi> (if you have map() in go, that is...)
<ely-se> but you can do blocking I/O in map, and it'll pause the calling goroutine, allowing other goroutines to run in the meantime. the underlying runtime system does this via async I/O under the hood
<ely-se> the programmer need not bother with it
obadz has joined #ocaml
<MercurialAlchemi> but that's still a different programming model, isn't it?
<MercurialAlchemi> (maybe I don't really understand the gist of your argument)
toomuchtvrotsurb has joined #ocaml
bugabinga has quit [Remote host closed the connection]
toomuchtvrotsurb has quit [Ping timeout: 260 seconds]
AltGr has joined #ocaml
bugabinga has joined #ocaml
mengu has quit [Remote host closed the connection]
bugabinga has quit [Remote host closed the connection]
srcerer has quit [Ping timeout: 260 seconds]
bugabinga has joined #ocaml
sh0t has quit [Ping timeout: 264 seconds]
srcerer has joined #ocaml
<edwin> ely-se: see http://kcsrk.info/ocaml/multicore/effects/2015/05/27/more-effects/ 'Direct-style asynchronous IO'. It seems quite close to what you want for socket I/O
johnf_ has joined #ocaml
xificurC has joined #ocaml
clog_ has joined #ocaml
larhat1 has joined #ocaml
cdidd has joined #ocaml
johnf has quit [Ping timeout: 265 seconds]
xificurC_ has quit [Ping timeout: 265 seconds]
clog has quit [Ping timeout: 265 seconds]
sigjuice has quit [Ping timeout: 265 seconds]
larhat has quit [Ping timeout: 265 seconds]
nopf has quit [Ping timeout: 265 seconds]
nopf has joined #ocaml
martintrojer has quit [Ping timeout: 265 seconds]
libertas has quit [Ping timeout: 265 seconds]
libertas has joined #ocaml
martintrojer has joined #ocaml
sigjuice has joined #ocaml
matthewhill has joined #ocaml
matthewhill has quit [Remote host closed the connection]
xificurC has quit [Remote host closed the connection]
mort___ has quit [Ping timeout: 246 seconds]
xificurC has joined #ocaml
matthewhill has joined #ocaml
matthewhill has quit [Client Quit]
mort___ has joined #ocaml
_andre has joined #ocaml
<tibor_> How can be two data structures compared in ocam ?
<tibor_> Ony primitive data types can be compared in ocaml?
_andre has quit [Read error: Connection reset by peer]
_andre has joined #ocaml
<flux> actually ocaml can compare pretty much anything - except objects and functions - with the basic < = > operators
<flux> ..doesn't maybe mean you should, though
<flux> usually you provide a function called 'compare' in your module and the developer is expected to use that for comparisons
<flux> hmm.. an idea comes to my mind.. one could put objects as 'land mines' for things that are not to be compared with Pervasives.compare.. :)
<flux> actually at least empty objects seem to be fair play for the comparison, but functions are not
<pippijn> objects are fat
<pippijn> just put functions
<pippijn> (fun () -> ())
amnn has joined #ocaml
<flux> I was hoping object end would have worked, but as it doesn't, the function is the better option. the object would have had even less functionality ;)
lupin has joined #ocaml
<pippijn> hmm
lupin has quit [Client Quit]
<pippijn> what does object end look like in memory?
<flux> not really sure
<flux> dump (object end) -> "Object #165 ()"
<flux> maybe something like an object id and a pointer :)
toomuchtvrotsurb has joined #ocaml
reynir1 has joined #ocaml
amnn has quit [Ping timeout: 240 seconds]
bobpoekert_ has joined #ocaml
seliopou_ has joined #ocaml
<pippijn> flux: (object val y = 3 method x = 3 end) can also be compared
<pippijn> but not in a useful way
bbc_ has joined #ocaml
smondet_ has joined #ocaml
<flux> it would have been relatively sane to define object comparison as a comparison of the ids. maybe.
uggwar_ has joined #ocaml
<pippijn> # object val y = 3 method x = 3 end > object method x = 3 end;;
<pippijn> - : bool = true
struk|desk2 has joined #ocaml
mietek_ has joined #ocaml
<pippijn> this is a way to find out the evaluation order
Leonidas_ has joined #ocaml
<flux> :-)
vodkaInferno has joined #ocaml
<flux> so it does fail eventually with objects?
rom1504_ has joined #ocaml
<flux> when it compares methods?
amnn has joined #ocaml
Maelan_ has joined #ocaml
sheijk_ has joined #ocaml
<pippijn> flux: I haven't got it to fail yet
<pippijn> maybe with virtual methods
bacam_ has joined #ocaml
<def`_> flux: objects are physical entity
toomuchtvrotsurb has quit [Ping timeout: 260 seconds]
johnelse_ has joined #ocaml
<def`_> they are ordered by a unique counter
<def`_> incremented at creation time
freehck has joined #ocaml
baum_ has joined #ocaml
<def`_> I missed beginning of discussion... but they are indeed ordered by ids ?!
johnelse has quit [*.net *.split]
uggwar has quit [*.net *.split]
ggherdov has quit [*.net *.split]
struk|desk has quit [*.net *.split]
bobpoekert has quit [*.net *.split]
seliopou has quit [*.net *.split]
bacam has quit [*.net *.split]
sheijk has quit [*.net *.split]
Leonidas has quit [*.net *.split]
Maelan has quit [*.net *.split]
strmpnk has quit [*.net *.split]
rom1504 has quit [*.net *.split]
baum has quit [*.net *.split]
spacebat has quit [*.net *.split]
vodkaInf1rno has quit [*.net *.split]
mietek has quit [*.net *.split]
bbc has quit [*.net *.split]
mariusae has quit [*.net *.split]
smondet has quit [*.net *.split]
reynir has quit [*.net *.split]
xificurC has quit [Remote host closed the connection]
reynir1 is now known as reynir
bobpoekert_ is now known as bobpoekert
bacam_ is now known as bacam
xificurC has joined #ocaml
mengu has joined #ocaml
dexterph has quit [Ping timeout: 240 seconds]
spacebat has joined #ocaml
strmpnk has joined #ocaml
ggherdov has joined #ocaml
mariusae has joined #ocaml
ocp has joined #ocaml
Kakadu has joined #ocaml
ggole has joined #ocaml
amnn has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
amnn has joined #ocaml
amnn has quit [Client Quit]
johnelse_ is now known as johnelse
rgrinberg has joined #ocaml
baum_ is now known as baum
rgrinberg has quit [Ping timeout: 244 seconds]
`none has joined #ocaml
`none has left #ocaml ["ERC (IRC client for Emacs 24.5.1)"]
ceryo has joined #ocaml
ely-se has quit [Quit: leaving]
mort___ has quit [Quit: Leaving.]
amnn has joined #ocaml
xificurC has quit [Remote host closed the connection]
orbifx has quit [Quit: WeeChat 1.3]
xificurC has joined #ocaml
toomuchtvrotsurb has joined #ocaml
AltGr has left #ocaml [#ocaml]
mort___ has joined #ocaml
xificurC has quit [Ping timeout: 244 seconds]
toomuchtvrotsurb has quit [Ping timeout: 260 seconds]
AltGr has joined #ocaml
AltGr has left #ocaml [#ocaml]
Simn has joined #ocaml
jabesed has joined #ocaml
ely-se has joined #ocaml
xificurC has joined #ocaml
octachron has joined #ocaml
rgrinberg has joined #ocaml
govg has quit [Quit: leaving]
Haudegen has quit [Ping timeout: 250 seconds]
__uu__ has quit [Ping timeout: 240 seconds]
jabesed has quit [Quit: Konversation terminated!]
mengu has quit [Remote host closed the connection]
jabesed has joined #ocaml
Haudegen has joined #ocaml
jabesed has quit [Client Quit]
jabesed has joined #ocaml
toomuchtvrotsurb has joined #ocaml
gobbledigook has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
gobbledigook has joined #ocaml
toomuchtvrotsurb has quit [Ping timeout: 260 seconds]
mengu has joined #ocaml
jabesed has quit [Quit: Konversation terminated!]
jabesed has joined #ocaml
rgrinberg has quit [Ping timeout: 250 seconds]
amnn has quit [Ping timeout: 250 seconds]
gobbledigook has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
rgrinberg has joined #ocaml
amnn has joined #ocaml
Leonidas_ is now known as Leonidas
toolslive has joined #ocaml
jabesed has quit [Ping timeout: 240 seconds]
jabesed has joined #ocaml
toomuchtvrotsurb has joined #ocaml
_andre has quit [Quit: Lost terminal]
toomuchtvrotsurb has quit [Ping timeout: 244 seconds]
AltGr has joined #ocaml
BitPuffin has joined #ocaml
clog_ has quit [Quit: ^C]
clog has joined #ocaml
Haudegen has quit [Read error: Connection reset by peer]
travisbrady has joined #ocaml
Haudegen has joined #ocaml
Haudegen has quit [Ping timeout: 256 seconds]
jabesed has quit [Quit: Konversation terminated!]
jabesed has joined #ocaml
ely-se has quit [Quit: leaving]
ely-se has joined #ocaml
AltGr has left #ocaml [#ocaml]
larhat1 has quit [Quit: Leaving.]
ely-se has quit [Quit: leaving]
toomuchtvrotsurb has joined #ocaml
jabesed has quit [Quit: Konversation terminated!]
larhat has joined #ocaml
jabesed has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 264 seconds]
toomuchtvrotsurb has quit [Ping timeout: 272 seconds]
ely-se has joined #ocaml
tomboy65 has quit [Ping timeout: 246 seconds]
tomboy64 has joined #ocaml
jabesed has quit [Ping timeout: 246 seconds]
travisbrady has quit [Quit: travisbrady]
travisbrady has joined #ocaml
ocp has quit [Quit: Leaving.]
Greg__ has joined #ocaml
Greg__ has left #ocaml [#ocaml]
<companion_cube> I don't remember exactly, didn't someone add dwarf information(?) to OCaml recently, so we could use gdb for OCaml?
tnguyen has joined #ocaml
tnguyen has quit [Client Quit]
<rks`> companion_cube: are speaking of the on going work of mark shinwell?
tnguyen has joined #ocaml
<companion_cube> I don't know, that's why I ask
<companion_cube> (but if it happens, I'd be glad to use gdb)
<Drup> fabrice presented something to use lldb in the ocaml workshop
<rks`> and what he (must have) said is
<rks`> "it's useless without debug info"
<rks`> "so we're waiting for mark's work"
<rks`> ?
<Drup> rks`: no "we are using the stuff by ocp-memprof" ;)
<rks`> rather, it's not useless
<rks`> but if you want a debugguer, you need more
<rks`> oh well
<rks`> wonderful then
<companion_cube> ahah, of course, their own compiler
ygrek_ has joined #ocaml
nullcatxxx_ has joined #ocaml
<octachron> Has anyone tried to build the trunk version of the compiler after the merging of the gadt-warnings branch?
<rks`> yes
<octachron> Dit it build? I get a compiler error on incompatible interface between asmcomp/arch and asmcomp/mach
<rks`> it built.
<rks`> and that doesn't look at all related to the gadt patch
nullcatxxx_ has quit [Ping timeout: 256 seconds]
<rks`> did you try make clean ?
<octachron> yes, and travis has exactly the same problem than me
<rks`> hm.
<rks`> ah indeed
<rks`> I only did make world
<rks`> if I make world.opt, I have the problem
<rks`> but I can't guarantee the problem wasn't there before.
toomuchtvrotsurb has joined #ocaml
amnn has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<octachron> The problem disappears when I revert the the gadt-warning commit... and I don't really understand why.
<zol> I'm trying to solve a problem in HackerRank.com using OCaml but am having a slight problem since I don't know the standard library well enough yet. I have N number of lines with 4 space separated integers in it that ends with a newline '\n' except for the last line. I tried to use Scanf.scanf "%i %i %i %i\n" (fun x1 y1 x2 y2 -> ...) but it fails for the last line on HackerRank.com but not when running locally.
<zol> Is there a way to just scan for a newline character without providing a lambda?
toomuchtvrotsurb has quit [Ping timeout: 268 seconds]
mengu has quit [Remote host closed the connection]
<def`_> what about input_line to get the line as a string and Scan.sscanf to scan the string?
tautologico has quit [Quit: Connection closed for inactivity]
<zol> def`_: Oh, good idea, I will try!
sepp2k has joined #ocaml
johnelse has quit [Quit: leaving]
Haudegen has joined #ocaml
ely-se has quit [Quit: leaving]
amnn has joined #ocaml
Haudegen has quit [Ping timeout: 250 seconds]
MercurialAlchemi has joined #ocaml
johnelse has joined #ocaml
johnelse has quit [Client Quit]
<rks`> octachron: jeremie just "fixed" the problem
<rks`> (i.e. you can now compile ocamlopt)
<rks`> (but the makefiles still need fixing :))
<octachron> I have seen, thanks
johnelse has joined #ocaml
johnelse is now known as Guest24062
Guest24062 is now known as johnelse
Haudegen has joined #ocaml
marsam has joined #ocaml
mort___ has quit [Ping timeout: 246 seconds]
chris2 has quit [Ping timeout: 268 seconds]
ncthom91 has joined #ocaml
Kakadu has quit [Quit: Page closed]
ncthom91 has quit [Max SendQ exceeded]
octachron has quit [Ping timeout: 256 seconds]
ncthom91 has joined #ocaml
toomuchtvrotsurb has joined #ocaml
ncthom91 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
toomuchtvrotsurb has quit [Remote host closed the connection]
ollehar has quit [Quit: ollehar]
<rgrinberg> is there a way to make ocamlbuild copy some source dir to _build always?
<rgrinberg> or specifying multiple dependencies for a target using a glob pattern would be enough as well.
toomuchtvrotsurb has joined #ocaml
orbifx has joined #ocaml
slash^ has joined #ocaml
toomuchtvrotsurb has quit [Remote host closed the connection]
chris2 has joined #ocaml
orbifx has quit [Quit: AtomicIRC: The nuclear option.]
nullcatxxx_ has joined #ocaml
Maelan_ is now known as Maelan
jeffmo has joined #ocaml
^elyse^ has joined #ocaml
mort___ has joined #ocaml
^elyse^ has quit [Quit: Leaving]
AlexRussia has joined #ocaml
jeffmo_ has joined #ocaml
jeffmo has quit [Ping timeout: 250 seconds]
jeffmo has joined #ocaml
jeffmo_ has quit [Ping timeout: 250 seconds]
TheAuGingembre has joined #ocaml
^elyse^ has joined #ocaml
libertas has quit [Ping timeout: 250 seconds]
Guest38 has joined #ocaml
octachron has joined #ocaml
amnn has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jeffmo has quit [Read error: Connection reset by peer]
amnn has joined #ocaml
ollehar has joined #ocaml
nullcatxxx_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
psy_ has quit [Read error: No route to host]
toomuchtvrotsurb has joined #ocaml
jeffmo has joined #ocaml
lobo has joined #ocaml
xificurC has quit [Remote host closed the connection]
xificurC has joined #ocaml
jeffmo has quit [Ping timeout: 246 seconds]
rgrinberg has quit [Ping timeout: 260 seconds]
ncthom91 has joined #ocaml
psy_ has joined #ocaml
rgrinberg has joined #ocaml
amnn has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mort___ has quit [Quit: Leaving.]
Maelan is now known as |\o_|^[`_`]}--
|\o_|^[`_`]}-- is now known as Maelan
BitPuffin has quit [Ping timeout: 265 seconds]
tnguyen has quit [Quit: tnguyen]
tnguyen has joined #ocaml
<ollehar> opam does not like my llvm installation. had to recompile llvm to enable assertions. but now I can't install the ocaml bindings. :P
<ollehar> # /usr/bin/ld: cannot find -lLLVM-3.6
<ollehar> # collect2: error: ld returned 1 exit status
<ollehar> where is it looking?
jeffmo has joined #ocaml
smondet_ is now known as smondet
Ravana has quit [Ping timeout: 250 seconds]
ollehar has quit [Ping timeout: 256 seconds]
Ravana has joined #ocaml
orbifx has joined #ocaml
ygrek_ has quit [Ping timeout: 264 seconds]
jkni has joined #ocaml
marsam has quit [Ping timeout: 250 seconds]
ollehar has joined #ocaml
<ollehar> so, opam and llvm
<ollehar> can I change this? --with-ocaml-libdir=/home/olle/.opam/4.02.1/lib/llvm
sh0t has joined #ocaml
ncthom91 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Algebr has joined #ocaml
Algebr has left #ocaml [#ocaml]
canhtak has joined #ocaml
ygrek_ has joined #ocaml
travisbrady has quit [Quit: travisbrady]
johnelse has quit [Ping timeout: 272 seconds]
johnelse has joined #ocaml
bbc_ is now known as bbc
johnelse is now known as Guest48145
travisbrady has joined #ocaml
johnelse_ has joined #ocaml
nullcatxxx_ has joined #ocaml
nullcatxxx_ has quit [Client Quit]
Guest48145 has quit [Ping timeout: 240 seconds]
darkf has quit [Quit: Leaving]
nullcatxxx_ has joined #ocaml
ygrek_ has quit [Ping timeout: 272 seconds]
ygrek_ has joined #ocaml
orbifx has quit [Remote host closed the connection]
rgrinberg has quit [Ping timeout: 272 seconds]
ygrek_ has quit [Ping timeout: 260 seconds]
nullcatxxx_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Algebr has joined #ocaml
sfcgeorge has joined #ocaml
johnelse_ has quit [Ping timeout: 250 seconds]
<sfcgeorge> Embarrassed to ask but I told a 1st yr friend I'd explain some problems to him... then realised they're OCaml and my course didn't cover FP. Banging my head as it looks simple, create a function with this type: `((('a -> 'b) -> 'b) -> 'c) -> 'a -> 'c` so it takes 3 nested functions and then kind of calls them in such a way to cut out the middle one?
nullcatxxx_ has joined #ocaml
xet7_ has quit [Ping timeout: 256 seconds]
shinnya has joined #ocaml
slash^ has quit [Read error: Connection reset by peer]
canhtak has quit [Quit: canhtak]
<octachron> sfcgeorge, are you sure about this type?
<sfcgeorge> There's an automated test script and supposedly that is what's expected https://github.com/Duta/focs-2015-16/blob/master/week-4/exercise-3/question.txt
<ggole> let test f arg = f ((|>) arg)
<ggole> I think
<sfcgeorge> You're right ggole but why? val test : ((('a -> 'b) -> 'b) -> 'c) -> 'a -> 'c = <fun>
<ggole> I looked at part of the type and it seemed to be application (which is what |> does)
nullcatxxx_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<ggole> Then figured out the necessary plumbing from there
<ggole> let test f arg = f (fun g -> g arg) might be more familiar
<sfcgeorge> Okay thank you very much. I will wrap my head around it.
<ollehar> configure: WARNING: --enable-bindings=ocaml specified, but ctypes is not installed
<ollehar> but
<ollehar> $ ocamlfind list | grep ctypes
<ollehar> ctypes (version: 0.3.4)
marsam has joined #ocaml
<ollehar> ??
freehck has quit [Ping timeout: 240 seconds]
<Leonidas> ollehar: sounds like llvm
rgrinberg has joined #ocaml
<Drup> ggole: I wanted to try to apply https://github.com/psosera/myth to the problem, just to see if it works, but it doesn't build :(
<ollehar> Leonidas: yeah, llvm and ocaml. will post on stackoverflow. opam fucks on me, too.
<Leonidas> worked fine for me last time I tried (3.6.1, installed in custom location, and ocaml via opam)
<Leonidas> I can't remember the build-flags though
<Drup> ollehar: ^ for custom llvm
<ggole> Drup: oh, shame. Type driven synthesis is pretty neat.
<Drup> yes
<ollehar> Leonidas: llvm? sure, but I need to compile with assertions enabled...
<ollehar> Drup: thanks, will check.
<Drup> ollehar: the fact that building core took more time than solving the problem manually doesn't help
<ollehar> Drup: heh, yeah.
<jpdeplaix> ollehar: have you tries to upgrade your ctypes version ?
<ollehar> jpdeplaix: no, trying now.
<sgeisenh> sfcgeorge: you can also break the problem down into steps
<Drup> rgrinberg: my advice, add a flag that describe dependencies between *.proto
<jpdeplaix> because llvm depends on the 0.4 since LLVM 3.7
<ollehar> jpdeplaix: problem remains. this is llvm 3.6.
<jpdeplaix> oh…
<sgeisenh> sfcgeorge: you know that you have a function that has 2 arguments, so your function will look something like "fun x y -> _"
<sgeisenh> sfcgeorge: then you want to produce something of type 'c, but the only way you can get something of type 'c is by applying x
<sgeisenh> sfcgeorge: so now you ahve a term that looks like "fun x y -> x _"
johnelse has joined #ocaml
<sgeisenh> sfcgeorge: now you need something of type ('a -> 'b) -> 'b in the hole
johnelse is now known as Guest86881
<sgeisenh> sfcgeorge: this gives you "fun x y -> x (fun z -> _)"
<jpdeplaix> ollehar: how did you install LLVM (I mean the lib itself) ?
<sgeisenh> sfcgeorge: but you have something of type 'a, so you apply z to it: "fun x y -> x (fun z -> z y)"
<jpdeplaix> ollehar: oh is it built from source ?
<ollehar> jpdeplaix: I'm trying to install from source, but opam won't find the lib :P
<ollehar> since no binary package has assertions enabled.
<ollehar> I think.
<sfcgeorge> sgeisenh: Thank you, that is a good way of breaking it down. I think I can explain that now :)
<jpdeplaix> mmh well, where did you take the source tarball ?
<jpdeplaix> is it from the website or the git directly ?
<jpdeplaix> otherwise the second one would have the "svn" suffix on the library. Like -lLLVM-3.6svn
<jpdeplaix> then in this case it would be normal that it doesn't find it
Kakadu has joined #ocaml
orbifx has joined #ocaml
psy_ has quit [Ping timeout: 260 seconds]
ceryo has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<rgrinberg> Drup:like some sort of proto.depends file?
<Drup> rgrinberg: just put that in _tags
<rgrinberg> Drup: not sure what i have to put though
<rgrinberg> i know you can use `dep` to force ocamlbuild to make some targets when some tags are present
<rgrinberg> i dont think that works for deps though
mietek_ is now known as mietek
<rgrinberg> this is such a simple task in makefiles, it's hard to believe that it's taking me so long to do it with ocamlbuild :/
^elyse^ has quit [Quit: Leaving]
<Algebr> rgrinberg: why not use PreBuildCommand in oasis
<Drup> pretty sure you can do that with flags, yes
<rgrinberg> Algebr: i'm not using oasis
<rgrinberg> Drup: my only hope is gasche_ it seems :D
^elyse^ has joined #ocaml
larhat1 has joined #ocaml
ygrek_ has joined #ocaml
travisbrady has quit [Quit: travisbrady]
<orbifx> how doed BatPrintF.fprintf figure out how many arguments it needs depending on the %s tokens in the second parameter?
<Drup> 1) it's not at all batteries specific, it's in Format, in the stdlib
<Drup> 2) GADT magic
<orbifx> thanks Drup
<ollehar> jpdeplaix: actually, I have no idea where I got the source...
<ollehar> but
<ollehar> $ locate libllvm | grep ocaml
<ollehar> gives
<ollehar> /usr/local/lib/ocaml/libllvm-3.6.a
<ollehar> /usr/local/lib/ocaml/libllvm.a
<ollehar> etc...
jeffmo has quit [Quit: jeffmo]
<ollehar> hm, now opam wants to build llvm-3.4.
<ollehar> I'm lost
<Drup> rgrinberg: please give me a reduced example so I can experiment
swgillespie has joined #ocaml
<rgrinberg> Drup: let me cook something up
dsheets has joined #ocaml
mac10688 has joined #ocaml
travisbrady has joined #ocaml
<companion_cube> hehey, I'm writing a sort algo!
Algebr has quit [Remote host closed the connection]
<jpdeplaix> ollehar: which LLVM version do you have ?
<ollehar> jpdeplaix: 3.6
<ollehar> too high ctypes version, apparently
<jpdeplaix> arf sorry I meant opam version*
<ollehar> I'm now back on the "can't find llvm-3.6" link error.
<ollehar> hm
<ollehar> 1.2.0
<jpdeplaix> just in case I'd recommend to try the 1.2.2
<jpdeplaix> *we never know* :D
<ollehar> will try
<ollehar> friday night, anything goes ;)
<rgrinberg> halp
<rgrinberg> jpdeplaix: i totally forgot you're an ocamlbuild expert btw,just in case you know off hand: http://stackoverflow.com/questions/33307880/ocamlbuild-copy-over-dependencies-to-build
<rgrinberg> :D
<companion_cube> so my sort starts being faster than Array.sort somewhere between 10_000 and 50_000 elements
<rgrinberg> companion_cube: how are you testing it?
<companion_cube> I'm generating random arrays and using Benchmark
<companion_cube> and I write tests with qtest
<rgrinberg> sounds legit :)
<companion_cube> s/tests/test/, there is only one test ^^
<rgrinberg> i want to see this cube sort
rom1504_ is now known as rom1504
<companion_cube> you will
dsheets has quit [Ping timeout: 246 seconds]
gobbledigook has joined #ocaml
<jpdeplaix> rgrinberg: I bet you can use ~deps by giving it all the files listed using the Glob module or something
<Drup> companion_cube: why (a variant of) quicksort ?
<companion_cube> well it doesn't allocate
<companion_cube> and it's faster than heap sort
<companion_cube> why do you ask?
<Drup> curious
<companion_cube> it's dual pivot quicksort, quite interesting (and not harder than 3-way)
<Drup> I remember a paper about a recent new sort that was faster, but don't remember the name
<companion_cube> there is tim sort, too (python)
<companion_cube> this is the java 7 sorting algo
<companion_cube> http://www.sorting-algorithms.com <-- I love this website
Simn has quit [Quit: Leaving]
rgrinberg has quit [Ping timeout: 255 seconds]
MercurialAlchemi has quit [Ping timeout: 260 seconds]
<orbifx> is there a quick and advisable way of decreasing the size of ocaml executables?
<Drup> orbifx: stop using core
<flux> for some values of "quick" :)
<orbifx> I don't `open` core anyway, but I pressume it pops in anyway
<orbifx> Is there a flag or something?
<ollehar> strip?
<orbifx> ollehar: you mean to strip symbols?
<ollehar> yes
<ollehar> that's how advanced I am. :)
<orbifx> hmm let's see what gain the has
<orbifx> 35% reduction
<orbifx> not bad
<orbifx> thanks ollehar
<orbifx> and any idea how to get core out?
<ollehar> I've never used core.
<ollehar> I think...
<ollehar> drup, thanks, I needed to compile llvm with --enable-bindings ><
<Drup> orbifx: stop depending on it ? x)
ggole has quit [Ping timeout: 244 seconds]
<companion_cube> g'night everyone
<orbifx> Drup: it's not on my builddepends, nor to i open it anywhere
<orbifx> gnight companion_cube
<companion_cube> I
<orbifx> Drup: is it a case of actually making sure all functions use others modules?
<companion_cube> 'm a bit disappointed that I could not beat Array.sort
<ollehar> good night
<Drup> orbifx: then you are not using it ^^'
<orbifx> phew
<Drup> how big is your executable ?
<ollehar> 100kb?
Nahra has joined #ocaml
bugabinga has quit [Remote host closed the connection]
ollehar has quit [Ping timeout: 256 seconds]
bugabinga has joined #ocaml
octachron has quit [Quit: Leaving]
rgrinberg has joined #ocaml
<orbifx> 2.5 MiB Drup
<orbifx> not the end of the world, but for what it does, it's big
<Drup> what's your dependencies ?
<orbifx> batteries and cmdliner
<Drup> that's surprising
seliopou_ is now known as seliopou
<Drup> do you have a big parser ?
<orbifx> ow and Sys
<Drup> that is really not supposed to be 2.5Mo
<Drup> ah
<Drup> remove "open Batteries"
<Drup> (and use the BatFoo)
Kakadu has quit [Remote host closed the connection]
<orbifx> Drup: ok trying it
<orbifx> that was probably a lot of batteries there :P
marsam has quit [Remote host closed the connection]
marsam has joined #ocaml
<orbifx> Drup: has the _oasis format for BuildDepends changed o0?!
<orbifx> previously I had each dependency on a new line and all was fine in the generated _tags file
<orbifx> now it needs a comma or the second package goes in a new line without pkg_ prepended.
<Drup> you changed some version
<Drup> yes, it's normal
<orbifx> to need a comma?
<orbifx> makes sense, but how come it didn't need it before?
<Drup> I re-read
<Drup> it always needed a comma
<orbifx> Maybe i had hardcoded it before :/
<orbifx> so if I'm using a module of batteries directly, do I add `batteries` in _oasis and `open BatString` for example?
tnguyen has quit [Quit: tnguyen]
ollehar has joined #ocaml
<orbifx> Drup: got it
<Drup> rgrinberg: you could have given some piqi things that actually compiles u_u'
<orbifx> streams seem a bit procedure
<orbifx> what's the cure?! :P
<Drup> I don't understand the question.
<rgrinberg> Drup: what do you mean, what's wrong?
<rgrinberg> i mean,what's the error you're getting?
<Drup> I mean the piqi files are not even syntactically correct
<Drup> the *.proto files
<orbifx> Drup: is the a more functional approach to working with files as a stream
<rgrinberg> Drup: oh. oops :D the compilation doesn't get to that stage anyway
<Drup> it does for me, and I can't really test u_u'
Algebr has joined #ocaml
<Drup> ocamlbuild is already quite annoying, please don't put other obstacles in my way
<Algebr> / join #git
<Algebr> damnit
<rgrinberg> Drup: fixed
<Drup> nope
nullcatxxx_ has joined #ocaml
<Drup> rgrinberg: still not compiling.
<rgrinberg> Drup: ok tested this time
lobo has quit [Quit: leaving]
<Drup> Yeah, that would have been good *before*
<rgrinberg> crazy talk ^_^
madroach has quit [Read error: Connection reset by peer]
<rgrinberg> Drup: sorry in advance
<orbifx> Ah BatEnum is what I'm looking for
<rgrinberg> Drup: 1 more git pull
<Drup> ok, you ommit to mention something in the build process
<Drup> piqi need to run on all the includes
<Drup> the import*
<rgrinberg> Drup: i'm not sure if that's true b/c i haven't gotten to that point. Never got past protoc failing with multiple files
sfcgeorg_ has joined #ocaml
ollehar has quit [Quit: ollehar]
madroach has joined #ocaml
sfcgeorg_ has quit [Client Quit]
sfcgeorge has quit [Ping timeout: 250 seconds]
Bluddy has quit [Quit: Connection closed for inactivity]
nullcatxxx_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<orbifx> is $ provided somewhere in Batteries?
^elyse^ has quit [Quit: Leaving...]
genkito has joined #ocaml
genkito has quit [Client Quit]
genkito has joined #ocaml
<orbifx> @@ ?
Guest86881 is now known as johnelse
madroach has joined #ocaml
madroach has quit [Read error: Connection reset by peer]
<Drup> rgrinberg: please merge, so that I can erase this repository from both my github and my harddrive
<Drup> (the ocamlbuild API and documentation makes me very angry)
genkito has quit [Quit: WeeChat 1.3]
genkito has joined #ocaml
<rgrinberg> Drup: ha, this is clever. Although it's still worse than the obvious thing of just copying all the proto files :/
<orbifx> thanks all
<rgrinberg> now i have to dagify my proto files
<orbifx> gnight
<rgrinberg> Drup: thanks a lot though!
genkito is now known as Guest15198
orbifx has quit [Quit: WeeChat 1.3]