<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]
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]
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 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?