lapinou 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 | Public logs at http://tunes.org/~nef/logs/ocaml/
serwombat has joined #ocaml
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
Simn has quit [Quit: Leaving]
hcarty has quit [Ping timeout: 264 seconds]
hcarty has joined #ocaml
jao has quit [Ping timeout: 240 seconds]
<Muzer> say I have a custom type myType defined as MyInt of int | MyBool of bool (and a few more, you get the idea). Is there a nice way I can check that two variables are both (eg) some value of MyInt OR some value of MyBool (but not necessarily the same value - just as long as it isn't the case that (for instance) one is MyInt and the other is MyBool) without matching each possibility (only two here, but there are more in reality)?
shinnya has quit [Ping timeout: 264 seconds]
r0b2 has joined #ocaml
philtor has joined #ocaml
ygrek has joined #ocaml
<Drup> if I understand what you want : no
<Drup> match x, y with MyInt _ , MyInt _ -> ... | MyBool _, MyBool _ -> ... | _ -> ...
talzeus has quit [Read error: Connection reset by peer]
nikki93 has quit [Remote host closed the connection]
nikki93 has joined #ocaml
nikki93 has quit [Remote host closed the connection]
talzeus has joined #ocaml
serwombat has quit [Ping timeout: 240 seconds]
jpdeplaix has quit [Ping timeout: 244 seconds]
nikki93 has joined #ocaml
jpdeplaix has joined #ocaml
pyon has joined #ocaml
philtor has quit [Remote host closed the connection]
lostcuaz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dsheets_ has quit [Ping timeout: 245 seconds]
siddhart1v_away is now known as siddharthv
csakatoku has joined #ocaml
S11001001 has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
rob3 has joined #ocaml
r0b2 has quit [Ping timeout: 252 seconds]
Guest___ has joined #ocaml
introom2 has joined #ocaml
Guest___ has quit [Quit: Computer has gone to sleep.]
yacks has joined #ocaml
Guest___ has joined #ocaml
ygrek has quit [Ping timeout: 240 seconds]
druzac has joined #ocaml
axiles has joined #ocaml
claudiuc has joined #ocaml
claudiuc_ has joined #ocaml
claudiuc has quit [Read error: Connection reset by peer]
<philip_> after 5 hours i am suprised to see no new content on here.
<adrien> on the night from sunday to monday?
<adrien> last message was 4 hours ago, I'd say that was a very active night :)
<flux> muzer, well, another way might be just defining a function such as: let constructor_of_t x = match x with MyInt _ -> MyIntTag | .. etc (or the same with polymorphic variants), and then use that function
<flux> but I suppose it doesn't really make that patrticular case much easier. it might ease other cases, though.
<flux> muzer, if you really feel compelled to reduce the amount of code, you could use the functions found from Obj, and risk the wrath of whomever needs to debug your code after a segfault ;).
<flux> (though I suppose calling just Obj.tag should be safe, though the results could sometimes be unexpected)
arturgadelshin has joined #ocaml
ygrek has joined #ocaml
angerman has joined #ocaml
Kakadu has joined #ocaml
<philip_> exit
maurer has quit [Remote host closed the connection]
philip_ has quit [Quit: Lost terminal]
maurer has joined #ocaml
arturgadelshin has quit [Ping timeout: 244 seconds]
maurer has quit [Ping timeout: 265 seconds]
maurer has joined #ocaml
maurer has quit [Ping timeout: 240 seconds]
maurer has joined #ocaml
<Kakadu> #join #english
<Kakadu> oups
maurer has quit [Ping timeout: 240 seconds]
ygrek has quit [Ping timeout: 265 seconds]
maurer has joined #ocaml
claudiuc has joined #ocaml
claudiuc_ has quit [Ping timeout: 240 seconds]
csakatoku has quit [Remote host closed the connection]
druzac has quit []
angerman has quit [Read error: Connection reset by peer]
Guest___ has quit [Quit: Computer has gone to sleep.]
introom2 has quit [Ping timeout: 240 seconds]
csakatoku has joined #ocaml
yacks has quit [Ping timeout: 240 seconds]
angerman has joined #ocaml
angerman has quit [Read error: Connection reset by peer]
Guest___ has joined #ocaml
angerman has joined #ocaml
ygrek has joined #ocaml
siddharthv is now known as siddharthv_away
arjunguha has joined #ocaml
ggole has joined #ocaml
arjunguha has quit [Ping timeout: 240 seconds]
cago has joined #ocaml
ygrek has quit [Ping timeout: 244 seconds]
arjunguha has joined #ocaml
struktured has quit [Read error: Operation timed out]
ulfdoz has joined #ocaml
arturgadelshin has joined #ocaml
arjunguha has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
avsm has joined #ocaml
struktured has joined #ocaml
yacks has joined #ocaml
arjunguha has joined #ocaml
ygrek has joined #ocaml
arjunguha has quit [Client Quit]
Thooms has joined #ocaml
johnelse_away is now known as johnelse
Simn has joined #ocaml
avsm has quit [Quit: Leaving.]
arjunguha has joined #ocaml
siddharthv_away is now known as siddharthv
arjunguha has quit [Client Quit]
arjunguha has joined #ocaml
arjunguha has quit [Client Quit]
mika1 has joined #ocaml
cdidd has quit [Read error: Operation timed out]
arjunguha has joined #ocaml
maurer has quit [Remote host closed the connection]
maurer has joined #ocaml
arjunguha has quit [Ping timeout: 252 seconds]
csakatoku has quit [Remote host closed the connection]
struktured has quit [Ping timeout: 264 seconds]
csakatoku has joined #ocaml
AltGr has joined #ocaml
mort___ has joined #ocaml
bicgena has quit [Quit: Connection closed for inactivity]
ulfdoz has quit [Ping timeout: 264 seconds]
ulfdoz has joined #ocaml
Dongyancai has quit [Ping timeout: 252 seconds]
Dongyancai has joined #ocaml
arturgadelshin1 has joined #ocaml
maurer has quit [Ping timeout: 265 seconds]
arturgadelshin has quit [Ping timeout: 240 seconds]
arturgadelshin1 is now known as arturgadelshin
sw1nn has joined #ocaml
maurer has joined #ocaml
sw1nn is now known as Guest45104
ddosia has joined #ocaml
Guest45104 is now known as sw1nn`
sw1nn` is now known as Guest49314
Dongyancai has quit [Ping timeout: 240 seconds]
Guest49314 has quit [Remote host closed the connection]
maurer has quit [Remote host closed the connection]
maurer has joined #ocaml
csakatoku has quit [Remote host closed the connection]
ulfdoz has quit [Ping timeout: 240 seconds]
Dongyancai has joined #ocaml
divyansr__ has joined #ocaml
sw1nn has joined #ocaml
jonludlam has joined #ocaml
maurer has quit [Ping timeout: 244 seconds]
ulfdoz has joined #ocaml
Dongyancai has quit [Ping timeout: 240 seconds]
Dongyancai has joined #ocaml
ggole has quit [Ping timeout: 240 seconds]
maurer has joined #ocaml
Dongyancai has quit [Ping timeout: 240 seconds]
ggole has joined #ocaml
maurer has quit [Ping timeout: 252 seconds]
sw1nn has quit [Ping timeout: 240 seconds]
Dongyancai has joined #ocaml
lostcuaz has joined #ocaml
ulfdoz has quit [Ping timeout: 240 seconds]
maurer has joined #ocaml
lostcuaz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cdidd has joined #ocaml
maurer has quit [Ping timeout: 240 seconds]
maurer has joined #ocaml
ygrek has quit [Ping timeout: 244 seconds]
skchrko has joined #ocaml
freling has joined #ocaml
introom2 has joined #ocaml
Dongyancai has quit [Ping timeout: 244 seconds]
Dongyancai has joined #ocaml
dsheets_ has joined #ocaml
csakatoku has joined #ocaml
csakatoku has quit [Remote host closed the connection]
Dongyancai has quit [Ping timeout: 252 seconds]
Dongyancai has joined #ocaml
bicgena has joined #ocaml
ygrek has joined #ocaml
avsm has joined #ocaml
Dongyancai has quit [Ping timeout: 264 seconds]
Dongyancai has joined #ocaml
cdidd has quit [Ping timeout: 240 seconds]
maurer has quit [Remote host closed the connection]
maurer has joined #ocaml
avsm has quit [Quit: Leaving.]
avsm has joined #ocaml
rand000 has joined #ocaml
Guest___ has quit [Quit: Computer has gone to sleep.]
talzeus has quit [Remote host closed the connection]
hyperboreean has quit [Quit: leaving]
hyperboreean has joined #ocaml
_5kg has quit [Ping timeout: 252 seconds]
Dongyancai has quit [Ping timeout: 240 seconds]
siddharthv is now known as siddharthv_away
maurer has quit [Ping timeout: 240 seconds]
Dongyancai has joined #ocaml
maurer has joined #ocaml
serwombat has joined #ocaml
divyansr__ has quit [Quit: Connection closed for inactivity]
bjorkintosh has quit [Ping timeout: 252 seconds]
G________ has joined #ocaml
introom2 has quit [Ping timeout: 264 seconds]
cdidd has joined #ocaml
maurer has quit [Remote host closed the connection]
maurer has joined #ocaml
Dongyancai has quit [Ping timeout: 252 seconds]
bjorkintosh has joined #ocaml
introom2 has joined #ocaml
Dongyancai has joined #ocaml
Dongyancai has quit [Ping timeout: 244 seconds]
Dongyancai has joined #ocaml
lostcuaz has joined #ocaml
lostcuaz has quit [Read error: Connection reset by peer]
lostcuaz has joined #ocaml
talzeus has joined #ocaml
rand000 has quit [Quit: leaving]
talzeus has quit [Remote host closed the connection]
csakatoku has joined #ocaml
talzeus has joined #ocaml
yacks has quit [Quit: Leaving]
AltGr has left #ocaml []
AltGr has joined #ocaml
<Kakadu> Any ideas what is wrong it this line? Lwt_Query.view dbh <:view< { id=node.id } | node in $nodes_table$; node.id=$string:nodeId$; >>
<Kakadu> it says: Parse error: EOI expected after [view] (in [view])
arj has joined #ocaml
Dongyancai has quit [Ping timeout: 240 seconds]
<Drup> (for anyone wondering what the crazy syntax is, it's macaque syntax extension)
arj has quit [Client Quit]
<companion_cube> o/
tobiasBora has joined #ocaml
Dongyancai has joined #ocaml
ollehar has joined #ocaml
venk has quit [Ping timeout: 240 seconds]
Dongyancai has quit [Ping timeout: 244 seconds]
<jpdeplaix> Kakadu: what do you use to compile ?
ocp has joined #ocaml
<Kakadu> jpdeplaix: http://paste.in.ua/9402/raw/
<Kakadu> The problem is 'node.id=$int64:nodeId$;'
<Kakadu> without it compilation ends OK
<jpdeplaix> it seems that you should use spaces around « = »
<jpdeplaix> If you want, please fill a bug on the macaque bugtracker https://github.com/ocsigen/macaque/issues?state=open
<Kakadu> jpdeplaix: thanks!
<jpdeplaix> you're welcome
lostcuaz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
G________ has quit [Quit: Computer has gone to sleep.]
tchell has quit [Ping timeout: 264 seconds]
tchell has joined #ocaml
csakatoku has quit [Remote host closed the connection]
yacks has joined #ocaml
Dongyancai has joined #ocaml
darkf has quit [Ping timeout: 265 seconds]
maufred has quit [Ping timeout: 264 seconds]
maufred has joined #ocaml
claudiuc has quit [Read error: Connection reset by peer]
claudiuc has joined #ocaml
rks_ has quit [Ping timeout: 264 seconds]
rks has joined #ocaml
pyon has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
<jpdeplaix> Kakadu: tell me if you don't want/have time to fill a bug. Otherwise I can do it for you.
<adrien_oww> there's no fsync at all in Unix?
<adrien_oww> ygrek: ^
struktured has joined #ocaml
Thooms has quit [Ping timeout: 240 seconds]
Thooms has joined #ocaml
sw1nn has joined #ocaml
lostcuaz has joined #ocaml
mort___ has quit [Ping timeout: 240 seconds]
Dongyancai has quit [Ping timeout: 240 seconds]
Dongyancai has joined #ocaml
pango has quit [Read error: Operation timed out]
lostcuaz has quit [Ping timeout: 244 seconds]
Anarchos has joined #ocaml
<Muzer> flux: thanks - fair enough, I'll leave in
<Muzer> *it
Thooms has quit [Ping timeout: 244 seconds]
<Kakadu> jpdeplaix: done
lostcuaz has joined #ocaml
gael has quit [Ping timeout: 264 seconds]
gael has joined #ocaml
lostcuaz has quit [Ping timeout: 252 seconds]
maurer has quit [Remote host closed the connection]
maurer has joined #ocaml
saml has joined #ocaml
maurer has quit [Read error: Operation timed out]
<ygrek> adrien_oww, ?
<ygrek> there is in extunix
avsm has quit [Quit: Leaving.]
Thooms has joined #ocaml
pango has joined #ocaml
zpe has joined #ocaml
maurer has joined #ocaml
<adrien_oww> ygrek: thought so, thanks
mika1 has quit [Ping timeout: 265 seconds]
mika1 has joined #ocaml
struktured has quit [Ping timeout: 240 seconds]
lostcuaz has joined #ocaml
shinnya has joined #ocaml
rand000 has joined #ocaml
serwombat has quit [Ping timeout: 240 seconds]
amirmc has joined #ocaml
Thooms has quit [Ping timeout: 240 seconds]
michael_lee has joined #ocaml
arturgadelshin has quit [Ping timeout: 264 seconds]
teiresias has quit [Ping timeout: 265 seconds]
tobiasBora has quit [Read error: Connection reset by peer]
arjunguha has joined #ocaml
maurer has quit [Ping timeout: 240 seconds]
mort___ has joined #ocaml
maurer has joined #ocaml
teiresias has joined #ocaml
arjunguha has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
serwombat has joined #ocaml
_5kg has joined #ocaml
ollehar has quit [Quit: ollehar]
r0b4 has joined #ocaml
rob3 has quit [Ping timeout: 240 seconds]
maurer has quit [Remote host closed the connection]
serwombat has quit [Ping timeout: 240 seconds]
dsheets__ has joined #ocaml
dsheets__ is now known as dsheets
dsheets_ has quit [Ping timeout: 244 seconds]
ocp has quit [Ping timeout: 245 seconds]
lostcuaz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
maurer has joined #ocaml
oriba has joined #ocaml
mgodshall has joined #ocaml
introom2 has quit [Ping timeout: 264 seconds]
nlucaroni has joined #ocaml
ollehar has joined #ocaml
yacks has quit [Quit: Leaving]
shinnya has quit [Ping timeout: 240 seconds]
S11001001 has joined #ocaml
S11001001 has quit [Changing host]
S11001001 has joined #ocaml
<oriba> I want to make a string-substitution with Pcre, and replace a matched string by a group-of-that-string, e.g. something like s/(.*?)foobar/$1/g
<oriba> How to do that?
<oriba> I tried Pcre.replace but the \1 will be replaced literally.
<oriba> I mean the group will be replaced by the "\1"
arturgadelshin has joined #ocaml
maurer has quit [Ping timeout: 240 seconds]
<oriba> Or is Pcre.substitute, what I need, not Pcre.replace?
mika1 has quit [Quit: Leaving.]
arjunguha has joined #ocaml
skchrko has quit [Read error: Operation timed out]
Guest___ has joined #ocaml
arjunguha has quit [Client Quit]
<companion_cube> no idea, isn't there a documentation?
arjunguha has joined #ocaml
<companion_cube> val get_named_substring <-- you may need to use this to extract the captured group?
lostcuaz has joined #ocaml
<oriba> companion_cube, always the same with me and PCre-ocaml: I learn, use and forget :-( I would prefer to have a book or something like that...
Fullma has joined #ocaml
<oriba> Ah, just found it out: I can use Pcre.replace with itempl... and e.g. ~itempl:(Pcre.subst "$1")
Kakadu has quit [Ping timeout: 245 seconds]
boogie has joined #ocaml
<companion_cube> oriba: would be nice if you wrote something on the web about it ;)
<companion_cube> (or try to enhance the doc)
AltGr has left #ocaml []
<oriba> companion_cube, hmhh.... it's not my code... so enhancing the doc... don't know if thats an easy way...
skchrko has joined #ocaml
<companion_cube> oriba: if you can grab the code (git repo), you can propose a patch to the author
bicgena has quit [Quit: Connection closed for inactivity]
<oriba> hmhh, not sure if it's in a git repo. Maybe an external text would make sense...
<oriba> (If I want a book, I could write one ;-))
arjunguha has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
root_empire has joined #ocaml
<companion_cube> oriba: I mean, if you can add 3 lines of text in the ocamldoc saying "if you want to substitute with a captured group, do this and this"
<companion_cube> I think the author would merge it
michael_lee has quit [Ping timeout: 265 seconds]
<oriba> companion_cube, maybe he would merge it... just adding some more sentences would make things much clearer I think...
<oriba> hmhh... it's on bitbucket... (mercurial, not git)
<oriba> well, maybe it's worth thinking about it... some m ore general explanations could be added, or some sentences at each of the functions... I think about contacting the author, maybe thats a good idea.
<Drup> oriba: which library are you using ?
<oriba> Pcre-ocaml
<oriba> I use it sometimes, write some wraoping code and forget the details
<oriba> next time I stumble ove the same things again
claudiuc has quit [Remote host closed the connection]
<Drup> ok
<Drup> (you don't really need pcre for what you did, btw)
<oriba> Drup, Str would do that... or what would you use for it?
jwatzman|work has joined #ocaml
<Drup> ocaml-re
<Drup> don't use Str
<Drup> just don't
mort___ has quit [Ping timeout: 244 seconds]
<jpdeplaix> why ?
ygrek has quit [Ping timeout: 240 seconds]
<Drup> crappy interface, full of state, not even super efficient
<adrien> but it has split!
<Drup> :D
<oriba> Drup I know that Str is deprecated, thats why I use pcre.
<oriba> But what is ocaml-re?
<adrien> deprecated?
<oriba> not officially
<Drup> another regular expression library, it's just "re" in opam
mort___ has joined #ocaml
<oriba> and where is it without opam?
<oriba> aha
<Drup> (github is a bit broken right now for me :p)
<oriba> ? why
<oriba> hmhh README says it's fatser than PCRE.
<oriba> faster
<oriba> speed is not my issue at the moment
<Drup> doesn't load, it's just my connection :p
<oriba> but good to know
<Drup> oriba: well, the bigger point is that you can do (not-pc) re
<oriba> what?
<oriba> you mean different dialects?
<Drup> I like my regular expression not to be exponential in complexity :D
<oriba> I hope it is not too complicated to use.
<oriba> aha, ok
<oriba> but has less nifty Regexps then
zpe has quit [Remote host closed the connection]
<Drup> well, that's the point, normal re are more simple
<freling> Drup: is there any doc for ocaml-re?
zpe has joined #ocaml
tlockney_away is now known as tlockney
mort___ has quit [Ping timeout: 265 seconds]
<Drup> freling: hum, I think it's only locally (make doc and stuff)
maurer has joined #ocaml
ygrek has joined #ocaml
<freling> alright
zpe has quit [Ping timeout: 264 seconds]
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
nikki93 has quit [Remote host closed the connection]
Kakadu has joined #ocaml
<oriba> Drup, the documentation for ocaml-re is even worse compared to ocaml-pcre
<Drup> x)
<oriba> it's a void
<oriba> a documentation desert...
<Drup> indeed x)
<oriba> a vacuum
<oriba> "- If you have ocamlopt, do also "make opt"." => make: *** No rule to make target `opt'. Stop.
<oriba> hmhhh
<oriba> version 0.0.0.0.02 ;-)
<adrien> Drup: you could write some :))
<oriba> LOL
<Drup> not using it enough
* adrien checks his list of valid excuses
<adrien> sorry, no match :P
<oriba> lol again
<Drup> it's a perflectly valid excuse, you don't want me to write documentation on something I don't use :D
<adrien> clearly you've never witnessed how documentation is beging written in the industry
<Drup> well, there is a reason I'm not in the industry.
claudiuc has joined #ocaml
sw1nn has quit [Remote host closed the connection]
tobiasBora has joined #ocaml
jonludlam has quit [Remote host closed the connection]
<adrien> you're missing on all the fun!
<Drup> maybe, but I have lots of cake here :3
<adrien> now I'm sad
ollehar has quit [Ping timeout: 244 seconds]
wolfnn has joined #ocaml
demonimin has quit [Quit: No Ping reply in 180 seconds.]
nikki93 has joined #ocaml
demonimin has joined #ocaml
demonimin has quit [Changing host]
demonimin has joined #ocaml
pango_ has joined #ocaml
pango has quit [Disconnected by services]
pango_ is now known as pango
serwombat has joined #ocaml
nikki93 has quit [Ping timeout: 240 seconds]
Thooms has joined #ocaml
maurer has quit [Ping timeout: 240 seconds]
maurer has joined #ocaml
zpe has joined #ocaml
tobiasBora has quit [Ping timeout: 264 seconds]
nikki93 has joined #ocaml
nikki93 has quit [Remote host closed the connection]
ygrek has quit [Ping timeout: 264 seconds]
q66 has joined #ocaml
angerman has quit [Quit: Gone]
dsheets has quit [Ping timeout: 244 seconds]
pedagand has quit [Remote host closed the connection]
manizzle has quit [Ping timeout: 265 seconds]
arjunguha has joined #ocaml
arjunguha has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
amirmc has quit [Quit: Leaving.]
avsm has joined #ocaml
arjunguha has joined #ocaml
nikki93 has joined #ocaml
arjunguha has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
arjunguha has joined #ocaml
arjunguha has quit [Client Quit]
maurer has quit [Ping timeout: 265 seconds]
maurer has joined #ocaml
arjunguha has joined #ocaml
Arsenik has joined #ocaml
avsm has quit [Quit: Leaving.]
arjunguha has quit [Ping timeout: 240 seconds]
manizzle has joined #ocaml
manizzle has quit [Read error: Connection reset by peer]
skchrko has quit [Remote host closed the connection]
arjunguha has joined #ocaml
manizzle has joined #ocaml
manizzle has quit [Remote host closed the connection]
nikki93 has quit [Remote host closed the connection]
amirmc has joined #ocaml
nikki93 has joined #ocaml
oriba_ has joined #ocaml
oriba has quit [Ping timeout: 244 seconds]
arjunguha has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mort___ has joined #ocaml
mort___ has quit [Remote host closed the connection]
avsm has joined #ocaml
mort___ has joined #ocaml
ddosia has left #ocaml []
AltGr has joined #ocaml
ccasin_ is now known as ccasin
angerman has joined #ocaml
dsheets has joined #ocaml
AltGr has left #ocaml []
ollehar has joined #ocaml
nikki93 has quit [Remote host closed the connection]
__pyon__ has joined #ocaml
nikki93 has joined #ocaml
venk has joined #ocaml
Thooms has quit [Quit: WeeChat 0.3.8]
ulfdoz has joined #ocaml
angerman has quit [Quit: Gone]
ggole has quit []
amirmc has quit [Quit: Leaving.]
lostcuaz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
manizzle has joined #ocaml
Anarchos has quit [Quit: good night]
Arsenik has quit [Remote host closed the connection]
rks is now known as Guest73493
axiles has quit [Remote host closed the connection]
tobiasBora has joined #ocaml
mgodshall has quit [Quit: mgodshall]
cago has left #ocaml []
bicgena has joined #ocaml
ulfdoz has quit [Ping timeout: 240 seconds]
maurer has quit [Ping timeout: 240 seconds]
arturgadelshin has quit [Ping timeout: 244 seconds]
Kakadu has quit [Quit: Konversation terminated!]
maurer has joined #ocaml
mort___1 has joined #ocaml
mort___ has quit [Ping timeout: 240 seconds]
nikki93 has quit [Remote host closed the connection]
Guest73493 is now known as rks`
S11001001 has quit [Remote host closed the connection]
avsm has quit [Quit: Leaving.]
maurer has quit [Ping timeout: 264 seconds]
S11001001 has joined #ocaml
S11001001 has quit [Changing host]
S11001001 has joined #ocaml
maurer has joined #ocaml
lostcuaz has joined #ocaml
mort___1 has quit [Ping timeout: 240 seconds]
jao has quit [Ping timeout: 240 seconds]
<tizoc> in terms of optimizations, is there any difference between `(+) 1` and `fun n -> 1 + n` ?
<Drup> there shouldn't
<tizoc> Drup: thats what I expected, but on this small script using g instead of f takes about 30% of the time, not sure why
<Drup> huum
<tizoc> ok I'm checking the asm diff and in the version with "f" there is an extra call, the version with "g" seems to be inlined
<Drup> oh, in this way, yes.
<tizoc> ok, just updated the gist, with this new version the speed difference is a lot smaller, but the version with "g" is still more optimized
<tizoc> (added an intermediary function instead of using `+` directly)
<Drup> cost of closures, I suppose
<Drup> (or partial application, but it's the same)
maurer has quit [Ping timeout: 240 seconds]
nlucaroni has quit [Quit: leaving]
maurer has joined #ocaml
Snark has quit [Ping timeout: 272 seconds]
struktured has joined #ocaml
shinnya has joined #ocaml
boogie has quit [Quit: Leaving...]
S11001001 has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
ollehar has quit [Ping timeout: 244 seconds]
__pyon__ has quit []
rand000 has quit [Quit: leaving]
oriba_ has quit [Quit: oriba_]
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
zpe has quit [Ping timeout: 265 seconds]
lostcuaz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
uggwar has quit [Ping timeout: 244 seconds]
uggwar has joined #ocaml
Student200 has joined #ocaml
<Student200> hi i have data type
<Student200> datatype 'a tree = Empty | Node of 'a * 'a tree * 'a tree;
<Student200> datatype 'a stree = STree of ('a * 'a -> bool) *
<Student200> ('a * 'a -> bool) *
<Student200> 'a tree;
<Student200> and what to define function
<Student200> that takes value and stree to search
<Student200> how do i write function signature??
<Student200> fun search v eq cmp Empty = false
<Student200> | search v eq cmp Node(x,l,r)
<Student200> this doesnt work - i get errors from compiler about data types being wrong
<Drup> you're from haskell, I presume ?
<Student200> no, sml
<Drup> pattern matchin is not written like that in ocaml
<Student200> i tried using brackets and separating arguments with commas, also type error
<Drup> let search v eq cmp = function
<Drup> | Empty -> ...
<Drup> | Node (x, l, r) -> ...
<Drup> you should read tutorials :p
<Student200> i have trouble getting used to the syntax
<Drup> Student200: you are tying to do ocaml right, not sml ?
<Student200> sml
<Drup> huh
<Drup> Can't help you with the syntax then, sorry
<Drup> (this is a channel for ocaml ^^)
<Student200> i know, but the other channel is pretty dead
Snark has joined #ocaml
wolfnn has quit [Ping timeout: 240 seconds]
<Drup> well, you can ask non syntax-related questions
<Student200> all i had to do is put round brackets around node
<Student200> like this
<Student200> search v eq cmp (Node(x,l,r))
<Student200> this is what i mean about difficult syntax
__marius__ has quit [Quit: leaving]
__marius__ has joined #ocaml
madroach has quit [Ping timeout: 252 seconds]
madroach has joined #ocaml
darkf has joined #ocaml
nikki93 has joined #ocaml
Student200 has quit [Quit: Leaving.]
serwombat has quit [Quit: Leaving]
q66 has quit [Quit: Leaving]
csakatoku has joined #ocaml
clan has joined #ocaml
<clan> hello. how can i use 'cstruct' keyword in ocaml?
shinnya has quit [Ping timeout: 265 seconds]
<clan> when i compile the file 'ocamlc test.ml' i got 'syntax error'