gildor changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 3.12.1 http://bit.ly/nNVIVH
emmanuelux has joined #ocaml
everyonemines has joined #ocaml
Guest29583 is now known as dnm
sepp2k1 has quit [Remote host closed the connection]
ulfdoz_ has joined #ocaml
ulfdoz has quit [Ping timeout: 276 seconds]
ulfdoz_ is now known as ulfdoz
Ptival has quit [Read error: Connection reset by peer]
madroach has quit [Ping timeout: 265 seconds]
madroach has joined #ocaml
ocamler has joined #ocaml
everyonemines has quit [Remote host closed the connection]
emmanuelux has quit [Remote host closed the connection]
everyonemines has joined #ocaml
ocamler has quit [Ping timeout: 276 seconds]
ankit9 has joined #ocaml
Progster has joined #ocaml
everyonemines has quit [Quit: Leaving.]
Progster has quit [Ping timeout: 244 seconds]
thomasga has joined #ocaml
pango is now known as pangoafk
ftrvxmtrx has quit [Quit: Leaving]
thomasga has left #ocaml []
thomasga has joined #ocaml
ontologiae has joined #ocaml
Yoric has joined #ocaml
eni_ has joined #ocaml
djcoin has joined #ocaml
cago has joined #ocaml
eni_ has quit [Client Quit]
mika1 has joined #ocaml
ontologiae has quit [Ping timeout: 245 seconds]
ankit9 has quit [Quit: Leaving]
Cyanure has quit [Ping timeout: 246 seconds]
ontologiae has joined #ocaml
Yoric has quit [Remote host closed the connection]
Yoric has joined #ocaml
ontologiae has quit [Ping timeout: 255 seconds]
ftrvxmtrx has joined #ocaml
eikke has joined #ocaml
Yoric has quit [Ping timeout: 246 seconds]
mnabil has joined #ocaml
ontologiae has joined #ocaml
ontologiae has quit [Ping timeout: 246 seconds]
ontologiae has joined #ocaml
ankit9 has joined #ocaml
<adrien> morning, a quick english question
<adrien> in a Set, all elements are unique, that means there are no [...] in the underlying data structure; what could [...] be ? =)
micro` has left #ocaml []
<arsatiki> duplicates?
<adrien> yes, that's the word I was looking for, thanks :-)
<adrien> I think one of the most common and awful thing to do in C or with C people is anything that is set-related; it takes a lot of code and it's usually written in a weird way ='(
Drakken has quit [Ping timeout: 252 seconds]
chambart has joined #ocaml
Drakken has joined #ocaml
vincentbalat has quit [Read error: Connection reset by peer]
companion_cube is now known as COMPANION_CUBE
ocp has joined #ocaml
Ptival has joined #ocaml
err404 has joined #ocaml
sepp2k has joined #ocaml
b` has joined #ocaml
<b`> is there a way i can get at the arg list of a function in ocaml? for example like (lambda (&rest args) ...) in lisp?
thomasga has quit [Quit: Leaving.]
Naereen has joined #ocaml
<flux> no
<flux> typically you would use lists for passing variable amount of data to a function
<flux> also it doesn't wouldn't work that great with partial application..
<flux> s/doesn't//
chambart has quit [Read error: Operation timed out]
cdidd has quit [Read error: Connection reset by peer]
err404 has quit [Remote host closed the connection]
<Naereen> Anyone have a complete installation of OCaml toolchain in an ARM android smartphone ?
Naereen has quit [Quit: Page closed]
eikke has quit [Ping timeout: 252 seconds]
abeaulieu has quit [Ping timeout: 268 seconds]
abeaulieu has joined #ocaml
_andre has joined #ocaml
<b`> flux: thanks. how to go about something like lambda f -> lambda (&rest args) -> some code;(apply f args) some other code;;
<b`> in ocaml?
<b`> ermm, mixing ocaml and lisp in above pseudocode
<b`> well, i can pass f args as thunk so i can just (thunk ())
chambart has joined #ocaml
ontologiae has quit [Ping timeout: 260 seconds]
ontologiae has joined #ocaml
eni has quit [Ping timeout: 260 seconds]
<Qrntz> b`, a literal translation would be «fun f -> fun l -> some_code; f args; some_other_code», where «f» will need to have a general type of «’a list -> unit» and «l» will need to have a general type of «’a list»
<Qrntz> what exactly are you trying to accomplish?
<flux> b`, this kind of trick has been used: let doit f x = some code; f x
<flux> then you call it like: doit (Printf.printf "%s world: %d\n" "hello") 42
<flux> so you use partial application for capture
<flux> for an existing unit function you call it like doit ignore ()
eikke has joined #ocaml
emmanuelux has joined #ocaml
mal`` has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
mal`` has joined #ocaml
COMPANION_CUBE is now known as companion_cube
Yoric has joined #ocaml
ontologiae has quit [Ping timeout: 268 seconds]
ontologiae has joined #ocaml
err404 has joined #ocaml
emmanuelux has quit [Quit: @+]
eikke has quit [Ping timeout: 255 seconds]
SanderM has joined #ocaml
<yezariaely> is there a possibility to access the current modules name as a string?
<yezariaely> (for debugging purpose)
<yezariaely> or the filename?
<flux> I suppose it might be possible with camlp4
<adrien> or a tool like gdb
<yezariaely> th
<yezariaely> x
<rixed> yezariaely: there's a camlp4 extension that gives something similar to __FILE__ but I never used it and can't remember its name
thomasga has joined #ocaml
<djcoin> Too bad the website of gasche (bluestorm) can't be browsed..
thomasga has quit [Read error: No route to host]
thomasga has joined #ocaml
<adrien> anymore
diml has quit [Ping timeout: 246 seconds]
diml has joined #ocaml
chambart has quit [Ping timeout: 245 seconds]
Yoric has quit [Ping timeout: 240 seconds]
cdidd has joined #ocaml
Yoric has joined #ocaml
<djcoin> ontologiae: 404 it seems
<thizanne> for more than a year, yes :-'
eni has joined #ocaml
<ontologiae> djcoin: tooo bad
ankit9 has quit [Quit: Leaving]
<ontologiae> it it possible to define constraint in ocaml, like haskell ?
<ontologiae> filter :: (Applicative f, Foldable f, Monoid (f a)) => (a -> Bool) -> f a -> f a
<ontologiae> filter p = foldMap (\a -> if p a then pure a else mempty)
<yezariaely> ontologiae: you mean, you want to use type classes ;-)?
abeaulieu has quit [Changing host]
abeaulieu has joined #ocaml
<ontologiae> yezariaely: just an equivalent ?
emmanuelux has joined #ocaml
chambart has joined #ocaml
mnabil has quit [Read error: Connection reset by peer]
<Drakken> Is there a way to tell oasis to build a bare object file?
<fx_> Drakken, not in released version
hongboz has joined #ocaml
<hongboz> hi all, I found that 'ocamlmktop -o oxml' the `oxml' is quite different from `ocaml', did anyone know the internal?
ontologi1e has joined #ocaml
ontologiae has quit [Read error: Connection reset by peer]
ftrvxmtrx has quit [Ping timeout: 252 seconds]
mattrepl has joined #ocaml
mika1 has quit [Quit: Leaving.]
cago has quit [Quit: Leaving.]
eni has quit [Ping timeout: 240 seconds]
djcoin has quit [Quit: WeeChat 0.3.2]
err404 has quit [Remote host closed the connection]
ocp has quit [Ping timeout: 276 seconds]
sgnb has quit [Remote host closed the connection]
sgnb has joined #ocaml
sepp2k has quit [Ping timeout: 246 seconds]
sepp2k has joined #ocaml
SanderM_ has joined #ocaml
SanderM has quit [Ping timeout: 264 seconds]
pangoafk is now known as pango
mattrepl has quit [Quit: mattrepl]
Progster has joined #ocaml
thomasga has quit [Quit: Leaving.]
ftrvxmtrx has joined #ocaml
barronax has joined #ocaml
ontologi1e has quit [Read error: Operation timed out]
<barronax> Hello, I am having difficulties understanding what is going wrong with my program here: http://codepad.org/2VTkLeAI -- don't understand the error message :-(
<_habnabit> barronax, http://codepad.org/t14qdMOj <- you need parens around your -1.0
<_habnabit> barronax, it's trying to parse it as (compute 0.0 1.0) - 1.0 3.0
<barronax> _habnabit, Oh! Thank you so much for the help. :-)
<_habnabit> unary negation in ocaml kind of sucks.
<_habnabit> instead of (-1.), you could also write ~-.1.0
<_habnabit> ~-. is the float unary negation operator
<barronax> Thanks, as a newb I prefer (-1.0) for now :-)
<arsatiki> Another newbie question: Is the .[] -syntax a combination of two syntax elements or is it its own?
<_habnabit> arsatiki, its own
<arsatiki> Thanks
<_habnabit> oh, that's for strings, right?
<arsatiki> yeah
<arsatiki> I'm going through Jason Hickey's tutorial. Now at page 10 :)
<_habnabit> I use .() and .{} a bunch, but never .[]
avsm has joined #ocaml
<wmeyer> arsatiki: yes, Hickey's book is very nice, sorry to not mention about it. Have fun
emmanuelux has quit [Remote host closed the connection]
<arsatiki> wmeyer: Hopefully I'll have some <fun> too :-)
<wmeyer> :-)
<Qrntz> «let rec fun' = (fun () -> ()) :: fun'»
<Qrntz> execute in toplevel for endless fun!
chambart has quit [Ping timeout: 252 seconds]
err404 has joined #ocaml
osa1 has joined #ocaml
Fnar has quit [Ping timeout: 246 seconds]
ftrvxmtrx has quit [Ping timeout: 246 seconds]
Fnar has joined #ocaml
ftrvxmtrx has joined #ocaml
Submarine has joined #ocaml
Submarine has quit [Changing host]
Submarine has joined #ocaml
err404 has quit [Remote host closed the connection]
abeaulieu has quit [Ping timeout: 255 seconds]
osa1 has quit [Read error: Connection reset by peer]
abeaulieu has joined #ocaml
avsm has quit [Quit: Leaving.]
avsm has joined #ocaml
<yezariaely> who of you will be in Copenhagen next week?
<samposm> what'll be be going in Copenhagen?
<yezariaely> ACM SIGPLAN OCaml Users and Developers Workshop
<yezariaely> ACM SIGPLAN Commercial Users of Functional Programming
<avsm> meee!
<avsm> yezariaely: well, from wednesday
<yezariaely> avsm: then we will meet ;)
<yezariaely> (maybe)
fraggle_ has quit [Read error: Connection reset by peer]
cinch has joined #ocaml
fraggle_ has joined #ocaml
avsm has quit [Quit: Leaving.]
ivan\ is now known as ivan\\
<flux> where can I find a high-precision sleep?
<flux> possibly usleep works, Unix.select didn't appear to work..
<yezariaely> flux: sounds like you need usleep, yes. What do you need it for?
<flux> I'm sending semi-precisely timed messages over serial port
<flux> janestreet core has nanosleep
b` has quit [Ping timeout: 246 seconds]
<flux> probably the sleep precision wasn't my problem..
<adrien> flux: nanosleep at worse :P
<adrien> wtf
<adrien> there is a /bin/usleep
<adrien> by default it sleeps 1 microsecond...
<adrien> but that's a full binary to run...
<flux> sounds like a joke, debian doesn't have that :)
<adrien> slackware provides it from
<adrien> sysvinit-functions: This is the /etc/init.d/functions file, the typical sysvinit-style
<adrien> sysvinit-functions: directories, and a few supporting binaries. Using this system,
<flux> I suppose it is from the time when gnu sleep didn't do sub-second sleeps, ie. ancient :)
<adrien> well, anyway, microsecond sleeps for binaries that require you to fork+exec+more stuff, simply makes no sense
<flux> but 100000 micrseconds can do
<flux> but yes, a strange default..
<adrien> yup, but somehow I would have patched sleep rather than rolling my own...
<flux> or maybe some perverse sense of orthogonality
<adrien> also, on windows, default time stuff only gives 10ms granularity at best
Anarchos has joined #ocaml
<adrien> and, man 7 time =)
<Anarchos> hi
<adrien> morning
ontologiae has joined #ocaml
<hongboz> hi, does anyone know that 'bootstraping' for the ocaml's compiler works for both byte code and native code or byte-code only?
<hongboz> I am also doing a compiler bootstrapping itself using ocaml as backend, I found only byte-code compiler can reach a fix point, the native does not..n
ontologiae has quit [Client Quit]
ontologiae has joined #ocaml
<Anarchos> hongboz both
<Anarchos> in fact parts of the ocamlopt compiler are written in ocaml
<Anarchos> so you need it :)
<hongboz> Anarchos: sure, both can be bootstrapped, I mean both can reach fixpoint?
<Anarchos> hongboz i don't see reason why not.
<hongboz> Anarchos: if randomized algorithm used,then not?
<Anarchos> hongboz how do you try to reach the fixpoint ?
<hongboz> use the generated compiler to compiler again and do the diff
<Anarchos> why not "make bootstrap" ? It is only its goal to make the fixpoint...
<hongboz> Anarchos: actually I am writing my compiler using ocaml as backend
<hongboz> the bytecode compiler can reach a fixpoint
<hongboz> the native code sometimes can, sometimes not
<hongboz> the 'make bootstrap' only do the bytecode
<hongboz> if you read the INSTALL carefully
avsm has joined #ocaml
<Anarchos> hongboz maybe
<Anarchos> but i don't know about any randomized algorithm in ocamlopt
sivoais has quit [Ping timeout: 248 seconds]
thomasga has joined #ocaml
<Anarchos> hongboz so your compile compiles with ocaml as low level language ?
thomasga has quit [Client Quit]
<adrien> I'd probably start by using cmp to locate the differences
<adrien> that or objdump
sivoais has joined #ocaml
Ptival has quit [Quit: Quat]
Ptival has joined #ocaml
osa1 has joined #ocaml
Submarine has quit [Remote host closed the connection]
<hongboz> adrien: what's the best tool to diff binaries?
<Anarchos> hongboz diff ?
<dsheets> diff is line-based
<Anarchos> hongboz or diff on the result of objdump
<adrien> cmp works fine
<adrien> hmmm, not only cmp
_andre has quit [Quit: leaving]
<hongboz> I used cmp before, but the output is not very meaningful :-()
<adrien> really?
<adrien> use --verbose, then you can quickly see how much difference there is
<hongboz> adrien: Aha, after I run the scripts for several times, now both byte and native reach fix-point
<adrien> then switch to vim :P
<hongboz> sorry for the noise
<adrien> well, how many times btw?
<hongboz> adrien: nop, I am emacser
<hongboz> 3 times
<adrien> hongboz: run view on the binaries then :P
<adrien> you can even run 'view -d bin1 bin2' ;-)
<hongboz> so no randomized algorithms in ocamlopt?
<adrien> these are pretty simple things but theyt're fine first-approach tools before one can decide on the tools to use next
<Anarchos> hongboz you can dump the symbol table and see if differences lie herein
<adrien> vimdiff <3
<adrien> night
<hongboz> Anarchos: problem solved, it reaches the fixpoint. you mean ocamlobjinfo?
<Anarchos> hongboz no i mean objdump :)
<Anarchos> i forget about ocamlobjinfo you jsut remind it to me
<hongboz> I am running on Mac, there seems to be no objdump...
<Anarchos> hongboz maybe readelf -s ?
<hongboz> neither, poor mac user ...
agarwal1975 has joined #ocaml
agarwal1975 has quit [Client Quit]
<Anarchos> hongboz i am sure some equivalent exist !
emmanuelux has joined #ocaml
eni has joined #ocaml
abeaulieu has quit [Changing host]
abeaulieu has joined #ocaml
Anarchos has quit [Quit: Vision[0.9.7-H-090423]: i've been blurred!]
djcoin has joined #ocaml
Ptival has quit [Quit: Quat]
err404 has joined #ocaml
SanderM_ has quit [Remote host closed the connection]
eni has quit [Quit: Leaving]
osa1 has quit [Quit: Konversation terminated!]
err404 has quit [Remote host closed the connection]
ontologiae has quit [Ping timeout: 252 seconds]
djcoin has quit [Quit: WeeChat 0.3.2]
sgnb has quit [Ping timeout: 246 seconds]
Yoric has quit [Ping timeout: 246 seconds]
Tobu has quit [Ping timeout: 272 seconds]
hto has quit [Ping timeout: 268 seconds]
Tobu has joined #ocaml
rixed has quit [Ping timeout: 264 seconds]
rixed has joined #ocaml
barronax has quit [Quit: Leaving]