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
hto has joined #ocaml
sepp2k has quit [Read error: Connection reset by peer]
mattrepl has joined #ocaml
mattrepl has quit [Client Quit]
ulfdoz_ has joined #ocaml
ulfdoz has quit [Ping timeout: 252 seconds]
ulfdoz_ is now known as ulfdoz
madroach has quit [Ping timeout: 265 seconds]
madroach has joined #ocaml
mattrepl has joined #ocaml
ivan\\ is now known as ivan\
emmanuelux has quit [Read error: Connection reset by peer]
avsm has quit [Quit: Leaving.]
avsm has joined #ocaml
Drakken has quit [Ping timeout: 272 seconds]
mattrepl has quit [Quit: mattrepl]
avsm has quit [Quit: Leaving.]
Drakken has joined #ocaml
Progster has quit [Ping timeout: 244 seconds]
ankit9 has joined #ocaml
Yoric has joined #ocaml
caligula__ has joined #ocaml
caligula_ has quit [Ping timeout: 276 seconds]
sgnb has joined #ocaml
Snark has joined #ocaml
ankit9 has quit [Quit: Leaving]
hongboz has quit [Ping timeout: 272 seconds]
BiDOrD has joined #ocaml
pango is now known as pangoafk
cago has joined #ocaml
mika1 has joined #ocaml
ankit9 has joined #ocaml
strlen has quit [Read error: Operation timed out]
strlen has joined #ocaml
djcoin has joined #ocaml
cdidd has quit [Read error: Operation timed out]
ocp has joined #ocaml
ftrvxmtrx has quit [Quit: Leaving]
Fnar has quit [Quit: Client exiting]
Fnar has joined #ocaml
eni has joined #ocaml
Fnar has quit [Ping timeout: 260 seconds]
ontologiae has joined #ocaml
testcocoon has quit [Quit: Coyote finally caught me]
chambart has joined #ocaml
ftrvxmtrx has joined #ocaml
testcocoon has joined #ocaml
hnrgrgr has joined #ocaml
BiDOrD_ has joined #ocaml
BiDOrD has quit [Ping timeout: 244 seconds]
munga has joined #ocaml
eni has quit [Ping timeout: 246 seconds]
fraggle_ has quit [Remote host closed the connection]
fraggle_ has joined #ocaml
_andre has joined #ocaml
<flux> next step: introspection :)
<flux> name_of_type 5 = "int"
eni has joined #ocaml
<flux> and who knows what monstrosity we'll get in a few years!
Yoric has quit [Ping timeout: 252 seconds]
<hcarty> flux: If people want to, they could make the complaints about camlp4 look minor and insignificant when compared to the modifications done with compiler-libs :-)
<adrien> :P
chambart has quit [Ping timeout: 260 seconds]
<adrien> new hevea version \\o
eni has quit [Ping timeout: 260 seconds]
Ptival has joined #ocaml
<Drakken> What's the standard way of dealing with really big data structures that have to be mutated a lot?
<adrien> like what?
<Drakken> like a search tree
<Drakken> It uses up all available memory, so you can't just copy it.
<emias> 
<emias> (Sorry.)
hongboz has joined #ocaml
notdan has joined #ocaml
<Drakken> Do mutable elements use more memory than immutable ones?
<hcarty> Drakken: Mutable elements in a record?
<Drakken> yes
<Drakken> hcarty or an array
<hcarty> Drakken: I don't think so... there was discussion about this at some point.
<hcarty> Drakken: Not for an array
<hcarty> And I think the answer is the same for a record
chambart has joined #ocaml
sivoais has quit [Quit: Lost terminal]
sepp2k has joined #ocaml
sivoais has joined #ocaml
Submarine has joined #ocaml
Submarine has quit [Changing host]
Submarine has joined #ocaml
hongboz has quit [Ping timeout: 245 seconds]
<arsatiki> I've ran into a problem with Jason Hickey's Excercise 4.3: http://courses.cms.caltech.edu/cs134/cs134b/book.pdf)
<arsatiki> I may be overthinking it, but I just can't figure out how to use pattern matching in that excercise
testcocoon has quit [Quit: Coyote finally caught me]
<arsatiki> If you are familiar with the excercise, I'd appreciate a small hint
<thelema> arsatiki: you could implement the substitution table as a pattern match
<arsatiki> But then raising the exception becomes awkward?
<flux> association lists handle the 'raise exception' requirement automatically
<thelema> | _ -> invalid_arg "Not a plaintext string"
<thelema> or if you really want you can leave the pattern match incomplete, and OCaml will raise an exception for you
<arsatiki> ahmm
<arsatiki> I'll probably have to peek ahead and use tuples
<thelema> arsatiki: what for?
<flux> (for association lists?)
<arsatiki> thelema: My only idea so far is to make a recursive checker that checks the first letter. It'd be great to express the stopping conditions with a tuple match
<thelema> arsatiki: or just do nested matches
<thelema> match a with | ... -> | ... -> match b with | ... -> ...
<thelema> but in this case, an if/then/else makes more sense for the stopping condition
testcocoon has joined #ocaml
<arsatiki> thelema: dunno. I just barely got it working with this: https://gist.github.com/3620873
<arsatiki> Learning a new language is clumsy business :(
<thelema> yup, sometimes it is.
<flux> it's not that bad, although one wouldn't do that in actual programs
<thelema> instead of stringtail, maybe use another argument to check that is the position.
<flux> arsatiki, if you know about pattern matching guards, here's an opportunity to use them
<thelema> and instead of matching both s1 and s2 against "", just check if that position is past their length
<arsatiki> right
<arsatiki> thanks
<thelema> flux: quite right; the last case in `check` is probably better broken into two
<thelema> another approach would be to explode the strings first: string -> char list
<thelema> then your strategy would be more natural
<arsatiki> yeah
<arsatiki> But given that I know only 35 pages of ocaml my options are limited :)
<flux> arsatiki, btw, you can also combine cases: | ("", _) | (_, "") -> false
<thelema> let explode s = let rec loop i = if i >= String.length s then [] else s.[i] :: loop (i+1) in loop 0
<Drakken> thelema or put the loop directly in the check function.
<Drakken> This is a place where it's nice to know how to iterate with recursion.
<Drakken> arsatiki your best bet is to write something like the loop in thelema's explode function, except with your crypto maching instead of consing.
<Drakken> maTching
<arsatiki> hmm
<arsatiki> I'll add a note of that if I decided to revisit the exercises at some point
<arsatiki> I already spent 90 minutes on that one =)
ankit9 has quit [Quit: Leaving]
thomasga has joined #ocaml
ocp has quit [Ping timeout: 245 seconds]
cdidd has joined #ocaml
avsm has joined #ocaml
smondet has joined #ocaml
cago has quit [Quit: Leaving.]
cago has joined #ocaml
bzzbzz has joined #ocaml
eni has joined #ocaml
chambart has quit [Ping timeout: 246 seconds]
avsm has quit [Quit: Leaving.]
ftrvxmtrx has quit [Quit: Leaving]
Submarine has quit [Ping timeout: 240 seconds]
ontologiae has quit [Read error: Connection reset by peer]
ontologiae has joined #ocaml
sepp2k has quit [Quit: Leaving.]
ontologiae has quit [Read error: Connection reset by peer]
ontologiae has joined #ocaml
ontologiae has quit [Read error: Connection reset by peer]
chambart has joined #ocaml
ontologiae has joined #ocaml
avsm has joined #ocaml
mattrepl has joined #ocaml
avsm has quit [Client Quit]
mika1 has quit [Quit: Leaving.]
cago has quit [Quit: Leaving.]
Tobu has quit [Remote host closed the connection]
djcoin has quit [Ping timeout: 246 seconds]
Tobu has joined #ocaml
ontologiae has quit [Ping timeout: 244 seconds]
Kakadu has joined #ocaml
Kakadu_ has joined #ocaml
Kakadu has quit [Read error: Operation timed out]
djcoin has joined #ocaml
sepp2k has joined #ocaml
djcoin has quit [Ping timeout: 252 seconds]
sepp2k has quit [Ping timeout: 246 seconds]
sepp2k has joined #ocaml
Ptival has quit [Quit: Quat]
Ptival has joined #ocaml
iago has joined #ocaml
leoncamel has joined #ocaml
leoncamel has quit [Ping timeout: 260 seconds]
chambart has quit [Ping timeout: 252 seconds]
Tobu has quit [Remote host closed the connection]
Tobu has joined #ocaml
Tobu has quit [Remote host closed the connection]
avsm has joined #ocaml
<hcarty> adrien: I wrote a (hopefully simple) _oasis file for lablgtk2 2.16.0 so that it could be properly uploaded to oasis-db
<hcarty> adrien: I can send it over if you are interested. It doesn't do much, just providing a wrapper around the "actual" build system.
<hcarty> adrien: The _oasis file and generated setup.ml are in this archive if you're interested: http://oasis.ocamlcore.org/dev/dist/lablgtk2/2.16.0-oasis1/lablgtk2-2.16.0-oasis1.tar.gz
tlockney has quit [Excess Flood]
tlockney_ has joined #ocaml
pangoafk is now known as pango
avsm has quit [Quit: Leaving.]
avsm has joined #ocaml
<wmeyer> arsatiki: explode, List.forall, and match on tuple, remember the order of guards
munga has quit [Quit: Ex-Chat]
thomasga has quit [Quit: Leaving.]
<thelema> wmeyer: BatList.for_all2, even
hongboz has joined #ocaml
<yezariaely> anyone has used maven with ocaml and has some expirience?
chambart has joined #ocaml
osa1 has joined #ocaml
Snark has quit [Quit: Quitte]
chambart has quit [Ping timeout: 246 seconds]
iago has quit [Quit: Leaving]
Tobu has joined #ocaml
<wmeyer> yezariaely: I suppose you are under mixed language project with existing build system, I don't believe want to use Maven instead of Oasis.
<yezariaely> wmeyer: just beeing curious, as I found some integration tutorials on the net.
<yezariaely> as you said, I was a bit astonished, too.
ftrvxmtrx has joined #ocaml
<wmeyer> yezariaely: You meant which of us has written this tutorial :-) Well, fortunately not me
<yezariaely> wmeyer: the tutorial did not say anything about usefulness or whether it worked well or not.
<yezariaely> however, people wanted to integrate ocaml into hudson CI-system
<yezariaely> is there a CI system based on oasis?
<wmeyer> yezariaely: Right. I'm just reserved about the bloated XML part. Maybe, the Eclipse dev (OCAide) perhaps used
<thelema> yezariaely: it's not unreasonable to use makefiles with hudson(jenkins)
<yezariaely> thelema: ah that works? I am totally unfamiliar with hudson
<thelema> yezariaely: ygrek had a CI server for a bunch of ocaml modules for a while
<thelema> it's down now.
<arsatiki> yez: You can run any shell scripts as jobs.
<arsatiki> I don't know anyone who actually uses the maven integration with Jenkins in my circle of friends.
<yezariaely> arsatiki: how does it determine failure or successfull runs?
<arsatiki> exit codes
<yezariaely> returncode !=0 ?
<yezariaely> oj
<yezariaely> ok
<wmeyer> (auto-generated?)
<thelema> wmeyer: I was about to say it looks auto-generated
<wmeyer> but I like the idea.
<thelema> It's the boilerplate for mapping typed trees to typed trees
<thelema> being able to tweak some internals
<wmeyer> all the visitors do the same thing use OBJECTS for that
<wmeyer> yes, I know why it's there :-)
<wmeyer> Camlp4, CIL and so on, also reuse this concept
<wmeyer> I think late binding is damn useful and well justified here
<thelema> afaict, the main reason for OO on this is the ability to nicely replace part of the logic of a recursive function...
<thelema> which I guess requires the late binding you're talking about
<wmeyer> thelema: yes, agreed. I think apart from GUI this is the another place where objects shine
<wmeyer> thelema: FoldGenerator filter in Camlp4, is generating this stuff
<thelema> ah, neat.
<thelema> I wonder if these kind of tools shouldn't be camlp4, but instead... hmm, not sure. want to have it generated once
<thelema> but it would have to be tweakable as internals change...
<thelema> so it needs a text representation
<wmeyer> thelema: I think it would be fair to use new -ppx for this purpose, it just brings more power and reliability. Although my personal opinion is that Camlp4 does the job done too. Ultimately you want a -ppx style code generator with OCaml quotations.
<wmeyer> thelema: The only drawback I see with the compiler-libs is instability, the internals are internals they might just change withing each release..
<wmeyer> where is Camlp4 interface is now rock solid, whethever it sounds convincing or is good in general might be debatable
hjk has joined #ocaml
<thelema> there seems always to be a bunch of camlp4 bugs that crop up after any syntax change in the compiler
<thelema> they usually get fixed in the next compiler release
<wmeyer> true
avsm has quit [Quit: Leaving.]
hjk has quit [Quit: Page closed]
<adrien> hcarty: thanks for making the files
<adrien> hcarty: however I don't think I can include that in lablgtk2 for now
<adrien> need to fix and check some slight build system breakage first
_andre has quit [Quit: leaving]
tlockney_ is now known as tlockney
sivoais has quit [Quit: Lost terminal]
sivoais has joined #ocaml
avsm has joined #ocaml
ontologiae has joined #ocaml
Yoric has joined #ocaml
osa1 has quit [Quit: Konversation terminated!]
hongboz has quit [Ping timeout: 276 seconds]
Yoric has quit [Remote host closed the connection]
Yoric has joined #ocaml
Anarchos has joined #ocaml
Kakadu_ has quit [Quit: Konversation terminated!]
emmanuelux has joined #ocaml
smondet has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
pango is now known as pangoafk
eni has quit [Quit: .]
emmanuelux has quit [Remote host closed the connection]
ontologiae has quit [Ping timeout: 240 seconds]
Yoric has quit [Ping timeout: 260 seconds]
ChristopheT has joined #ocaml
avsm has quit [Quit: Leaving.]
Ptival has quit [Read error: Connection reset by peer]
ChristopheT has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]