ChanServ changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.02.1 announcement at http://ocaml.org/releases/4.02.html | Public channel logs at http://irclog.whitequark.org/ocaml
sheijk has quit [Ping timeout: 256 seconds]
rgrinberg has quit [Quit: Leaving.]
AltGr has joined #ocaml
rgrinberg has joined #ocaml
ddosia has quit [Quit: Leaving.]
enquora has quit [Quit: enquora]
dav has joined #ocaml
SomeDamnBody has joined #ocaml
nadako has quit [Quit: Leaving]
vinegret has joined #ocaml
<rgrinberg> haha
<rgrinberg> you guys don't like travis?
<Drup> jenkins was there before we moved to github, and it's more flexible
madroach has quit [Ping timeout: 250 seconds]
<Drup> (in particular, it rebuids reversed dependency when appropriate, and all that)
madroach has joined #ocaml
thomasga has quit [Quit: Leaving.]
testcocoon has joined #ocaml
peddie has joined #ocaml
vinegret is now known as chinglish
chinglish has quit [Quit: Nettalk6 - www.ntalk.de]
chinglish has joined #ocaml
<Drup> rgrinberg: travis is really bad in reality, it's good only because jenkins is worse =")
<Drup> (and because you don't need to setup a server, of course)
<rgrinberg> travis is free at least
<rgrinberg> and you dont have to host it
<rgrinberg> but you guys have that (obviously) covered
fraggle-boate has quit [Ping timeout: 240 seconds]
deavid has quit [Ping timeout: 265 seconds]
fraggle_ has quit [Ping timeout: 272 seconds]
fraggle_ has joined #ocaml
fraggle-boate has joined #ocaml
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
BitPuffin has joined #ocaml
manud__ has joined #ocaml
rgrinberg has quit [Quit: Leaving.]
rgrinberg has joined #ocaml
darkf has joined #ocaml
SomeDamnBody has quit [Ping timeout: 250 seconds]
jao has quit [Ping timeout: 250 seconds]
Simn has quit [Read error: Connection reset by peer]
darkf_ has joined #ocaml
darkf has quit [Disconnected by services]
deavid has joined #ocaml
darkf_ is now known as darkf
dav_ has joined #ocaml
<rgrinberg> Drup: ugh, you guys have non utf8 encoding in your files?
<Drup> what's the encoding ?
<Drup> (you mean non-ascii ?)
<Drup> indeed, it's seems to be in latin1
<rgrinberg> crashes vim/merlin for me lol
<Drup> O_o
<Drup> impressive
<Drup> it's just regular latin1
<Drup> fixed anyway.
<rgrinberg> yes but the vim plugin assumes utf8
dav has quit [Quit: leaving]
dav_ is now known as dav
<Drup> What sort of editor doesn't auto detect encoding ? ._.
<rgrinberg> well it's not the editor
<rgrinberg> the merlin plugin is partially written in python
<Drup> tell me if you find others
jonludlam has quit [Quit: Coyote finally caught me]
<rgrinberg> and python's json module just dies on non utf8
<rgrinberg> it's in every file btw
<rgrinberg> you will need to sed
<Drup> urg.
<Drup> that will not be for tonight, going to bed now >_>
<rgrinberg> i lied its only 4 files
<rgrinberg> accesscontrol.ml{,i} ocsigen_parser_config.ml
<rgrinberg> (you've fixed the 4th one)
<Drup> I can do 4 files by hand :)
<rgrinberg> 3 :)
<Drup> done
<rgrinberg> thanks
<rgrinberg> why did you guys not make Url.t abstract :((
<rgrinberg> could have switched to ocaml-uri
<Drup> Don't ask me, I'm in the boat since only a year and a half
<Drup> =)
<Drup> but transitioning to Uri.t is not unreasonable
ygrek has joined #ocaml
<rgrinberg> indeed
<Drup> oh, no, that's not the big thing to change
<Drup> I will need to add yet another argument in tyxml's functor too :D
<Drup> (and made a nice functor, so that people can't get it wrong anymore)
<rgrinberg> :D
<rgrinberg> how long is your list of sharing constraints by now?
<Drup> I made it shorter recently !
lopex has quit [Ping timeout: 265 seconds]
<rgrinberg> i'd hate to see the long version
chinglish2 has joined #ocaml
lopex has joined #ocaml
chinglish has quit [Ping timeout: 265 seconds]
<rgrinberg> +100
<rgrinberg> will have to remember this trick
joe____ has joined #ocaml
<Drup> well, I had to, everyone was doing it wrong behind my back and I had to come fix it after xD
BitPuffin has quit [Ping timeout: 244 seconds]
<rgrinberg> imo that jwz quote about regular expressions applies to functors as well
<Drup> ?
<rgrinberg> Some people, when confronted with a problem, think "I know, I'll use regular expressions." Now they have two problems.
<Drup> :D
joe____ has quit [Client Quit]
<Drup> rgrinberg: you can apply that pretty much to every advanced OCaml feature, in fact
<Drup> Functors, GADTs, polymorphic variants and phantom types
q66 has quit [Quit: Leaving]
<rgrinberg> yeah, i recall there was a paper that studied open source ocaml code in the wild and lamented the fact that software such as mldonkey doesn't really use advanced features of OCaml such as functors
<rgrinberg> and concluded that the authors of such software must not know ocaml very well b/c they only used the simplest features
<Drup> ahah
<Drup> fabrice lefessant is very happy to say, everytime he can, that he uses only caml light.
shinnya has quit [Ping timeout: 250 seconds]
<rgrinberg> ugh, my eyes are being tortured by the backslashitis in all of your netstring-pcre usage
<rgrinberg> :D
<Drup> I never actually looked at this parts
<rgrinberg> ouch
<Drup> >_>
<rgrinberg> going for a record...
dav has quit [Quit: leaving]
btrace is now known as myyst
myyst has left #ocaml ["Leaving"]
samrat has joined #ocaml
danlamanna has joined #ocaml
struktured has joined #ocaml
danlamanna has left #ocaml [#ocaml]
kapil__ has joined #ocaml
manud__ has quit [Quit: Be back later ...]
koderok has joined #ocaml
zwer has quit [Remote host closed the connection]
zwer has joined #ocaml
ggole has joined #ocaml
ebzzry_ has quit []
ebzzry_ has joined #ocaml
laheadle has joined #ocaml
samrat has quit [Quit: Computer has gone to sleep.]
siddharthv_away is now known as siddharthv
struktured has quit [Ping timeout: 258 seconds]
siddharthv is now known as siddharthv_away
darkf_ has joined #ocaml
darkf has quit [Ping timeout: 258 seconds]
manud__ has joined #ocaml
lordkryss has quit [Quit: Connection closed for inactivity]
darkf_ is now known as darkf
AlexRussia has quit [Quit: WeeChat 1.1-dev]
samrat has joined #ocaml
manud__ has quit [Quit: Be back later ...]
manud__ has joined #ocaml
manud__ has quit [Ping timeout: 250 seconds]
psy has quit [Remote host closed the connection]
<laheadle> so what is the state of the art in debugging js_of_ocaml programs? I use print statements...
psy has joined #ocaml
psy has quit [Max SendQ exceeded]
psy has joined #ocaml
ygrek has quit [Ping timeout: 244 seconds]
MercurialAlchemi has joined #ocaml
<AltGr> I'm longing for the day I can drop <4.02 compatibility and use 'match with exception'
<ggole> It sure is nicer.
<AltGr> Quite elegant, yes
manud__ has joined #ocaml
<AltGr> but that's not gonna happen soon, at the moment OPAM is still supporting 3.12.1
siddharthv_away is now known as siddharthv
manud__ has quit [Ping timeout: 240 seconds]
boogie has joined #ocaml
ia0 has quit [Quit: leaving]
ia0 has joined #ocaml
ygrek has joined #ocaml
<adrien> same, it's really the extension I want most
<adrien> I might have two wait for something like two years however :P
pierpa has quit [Ping timeout: 244 seconds]
jgjl has joined #ocaml
<nicoo> to wait*
<nicoo> adrien: You need more coffee
<adrien> well, the ocaml in debian and others for the next two years is going to be 4.01, not 4.02
<adrien> no way around it
<flux> rgrinberg, well, I and someone else here tried to detach some feature from mldonkey to a separate library (I tried extracing its torrent parser) and found the task formidable
<flux> rgrinberg, it was so tightly bound inside, even though in practice it could have been completely separate
<flux> maybe nowadays the task would be easier, with the power of merlin!
<flux> but I don't really have need for a torrent parser at the moment :)
<adrien> argh, right, "to", not "two"
<adrien> more tea*
<flux> yes :)
<flux> thought there was at least one actual typo as well..
<flux> like there was in my previous sentence
manud__ has joined #ocaml
rgrinberg has quit [Quit: Leaving.]
rgrinberg has joined #ocaml
<rgrinberg> flux: if you ever need to parse a torrent file parsing bencode is often enough https://github.com/rgrinberg/bencode
<flux> rgrinberg, nice! btw, missing license ;)
<rgrinberg> it's MIT as specified in the opam but we should include it…
<flux> though opam knows it: license: WTFPL
<flux> hmm, that's not MIT :)
<flux> ah, it was changed
<whitequark> ugh, WTFPL
<rgrinberg> the only license out there people have the patience to read
<rgrinberg> :D
<whitequark> in literally the only case where licenses matter, i.e. when you have a bunch of lawyers sitting at your back, WTFPL doesn't work
<MercurialAlchemi> I see there is an unmaintained elasticsearch ocaml client lib
<MercurialAlchemi> anybody has experience with it?
<MercurialAlchemi> I see there is a Cassandra client in the same state
<MercurialAlchemi> So OCaml persistence is pretty much PG or sqlite?
<whitequark> elasticsearch for ... persistence? O_o
<adrien> ZPL
<adrien> for the license stuff
AltGr has left #ocaml [#ocaml]
<adrien> it's not wtfpl but it's a balanced one
<MercurialAlchemi> whitequark: why not? I've stored stuff in Lucene in the past, it works
<whitequark> you can even store data in mongodb, that doesn't mean it's a good idea
<adrien> you can store data in the cable buffers too
<MercurialAlchemi> mongodb is not a good idea in general
<MercurialAlchemi> that said, I'm always interested to hear why I'm wrong :)
<whitequark> well, ES is not a good general-purpose persistence engine on the same order as PG or sqlite
<MercurialAlchemi> well, sure, but I just need to store logs and query them
<MercurialAlchemi> I'm not making an ecommerce website
<MercurialAlchemi> or facebook for middle managers
<whitequark> for logs, yeah, ES is nice
<MercurialAlchemi> so if I want to use OCaml, I pretty much need to bring back https://github.com/skydeck/ocaml-elasticsearch from the grave and put it on opam
<whitequark> sounds good
zwer_b has joined #ocaml
larhat has quit [Quit: Leaving.]
zwer has quit [Remote host closed the connection]
Haudegen has quit [Ping timeout: 245 seconds]
samrat has quit [Quit: Computer has gone to sleep.]
Unhammer has joined #ocaml
chinglish2 has quit [Ping timeout: 265 seconds]
chinglish has joined #ocaml
<MercurialAlchemi> funny how working on .Net makes me appreciate the *nix platform
rgrinberg1 has joined #ocaml
Haudegen has joined #ocaml
rgrinberg has quit [Read error: Connection reset by peer]
Haudegen is now known as Guest59761
samrat has joined #ocaml
Guest59761 is now known as Haudegen
matason has joined #ocaml
hanso_ has joined #ocaml
boogie has quit [Quit: Leaving...]
<nicoo> Drup: Does Eliom run with OcaPIC ? :>
* nicoo runs away
<hanso_> How to generate a xml string like "<xml><ToUserName><![CDATA[hanso]]></ToUserName></xml>"? I have google "cow CDATA", but couldn't find any?
thomasga has joined #ocaml
samuel02 has joined #ocaml
Arsenik has joined #ocaml
chambart has joined #ocaml
darkf_ has joined #ocaml
darkf has quit [Ping timeout: 265 seconds]
darkf_ is now known as darkf
jgjl has quit [Read error: Connection reset by peer]
samuel02 has quit [Remote host closed the connection]
kakadu has joined #ocaml
ikaros has joined #ocaml
rgrinberg1 has quit [Quit: Leaving.]
laheadle has quit [Ping timeout: 240 seconds]
larhat has joined #ocaml
milosn has quit [Quit: Lost terminal]
Simn has joined #ocaml
laheadle has joined #ocaml
laheadle has left #ocaml [#ocaml]
pgomes has joined #ocaml
samuel02 has joined #ocaml
samuel02 has quit [Remote host closed the connection]
pyon has quit [Ping timeout: 240 seconds]
madroach has quit [Quit: leaving]
chambart has quit [Ping timeout: 265 seconds]
_andre has joined #ocaml
pgomes has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
dsheets has joined #ocaml
dsheets has quit [Remote host closed the connection]
dsheets_ has joined #ocaml
* MercurialAlchemi wonders what .mlpp files are, they look like regular ocaml files...
jonludlam has joined #ocaml
samuel02 has joined #ocaml
AlexRussia has joined #ocaml
jonludlam has quit [Ping timeout: 264 seconds]
tharugrim has quit [Quit: ZNC - http://znc.in]
tharugrim has joined #ocaml
milosn has joined #ocaml
jonludlam has joined #ocaml
samuel02 has quit [Ping timeout: 264 seconds]
shafire has quit [Quit: Page closed]
zwer_b has quit [Remote host closed the connection]
zwer_b has joined #ocaml
pgomes has joined #ocaml
hanso_ has quit [Quit: Page closed]
manud__ has quit [Quit: Be back later ...]
ygrek has quit [Ping timeout: 256 seconds]
chambart has joined #ocaml
<whitequark> pp usually means pre-processor
samuel02 has joined #ocaml
<Drup> whitequark: about the WTFPL, people previously invoked the "blabla offensive language in a corporate environment blabla" argument at me, which is completely the wrong argument. =')
<whitequark> nah, it's simpler
<whitequark> the language just isn't right, and you run into problems trying to redistribute
<whitequark> also, no disclaimer of implicit warranty
<Drup> yes, I know
<whitequark> implied*
samuel02 has quit [Remote host closed the connection]
demonimin has quit [Ping timeout: 272 seconds]
demonimin has joined #ocaml
badon has quit [Ping timeout: 250 seconds]
<Leonidas> yeah, it is basically a "license? fuck you, whatever"-license
mort___ has joined #ocaml
<whitequark> pretty much equivalent to no license at all.
lordkryss has joined #ocaml
thomasga has quit [Quit: Leaving.]
<Leonidas> at least it doesn't say that the code can only be used for good and not evil.
badon has joined #ocaml
Thooms has joined #ocaml
<Leonidas> hopefully contributing patches to llvm is not too hard, we are starting to accumulate them
milosn has quit [Quit: leaving]
pgomes has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
milosn has joined #ocaml
milosn has quit [Client Quit]
milosn has joined #ocaml
mort___ has quit [Quit: Leaving.]
milosn has quit [Quit: Lost terminal]
milosn has joined #ocaml
madroach has joined #ocaml
rand000 has joined #ocaml
rand000 has quit [Client Quit]
rand000 has joined #ocaml
milosn has quit [Quit: Lost terminal]
milosn has joined #ocaml
ysz has joined #ocaml
ollehar has joined #ocaml
ysz has quit [Quit: This computer has gone to sleep]
mort___ has joined #ocaml
chinglish has quit [Quit: Nettalk6 - www.ntalk.de]
mort___ has quit [Client Quit]
BitPuffin has joined #ocaml
chinglish has joined #ocaml
<whitequark> send them to me already
pgomes has joined #ocaml
siddharthv is now known as siddharthv_away
Hannibal_Smith has joined #ocaml
pierpa has joined #ocaml
aviraldg has joined #ocaml
aviraldg has joined #ocaml
aviraldg has quit [Max SendQ exceeded]
<Leonidas> is there a llvm git repo?
rand000 has quit [Quit: leaving]
<whitequark> or even just http://llvm.org/git/llvm
thomasga has joined #ocaml
<Leonidas> great, thanks
zwer_b_f has joined #ocaml
bezirg has joined #ocaml
davine has joined #ocaml
zwer_b has quit [Ping timeout: 250 seconds]
darkf_ has joined #ocaml
darkf has quit [Ping timeout: 265 seconds]
<adrien> jslint's license is really the anti-freedom kind
<adrien> unless you have a lawyer you won't take time for such things
<adrien> and well-written and well-known licenses on the contrary help small guys
<Leonidas> there is also the argument that smaller licenses are better than longer ones, but I don't buy that either
Thooms has quit [Quit: WeeChat 1.0.1]
<Leonidas> the definition of CAMLprim is empty, I wonder if it is a good idea to just leave them out
<Drup> Leonidas: Somebody told me recently than in france, a "no warranty" is not valid, so you are supposed to put something "Is not authorized to be used in application that can endanger human life"
<Leonidas> Drup: I wouldn't be surprised if this wasn't the same in Germany.
<Leonidas> *was
<Leonidas> but I think it was a differenciation whether the author of the code got paid, since afair you are not required to give a warranty for something you give away freely.
<Leonidas> s/freely/for free/.
<pdewacht> buy something from ibm, and you get permission to use jslint for evil as a bonus
<ggole> Leonidas: usually you should use whatever the maintainers of the system say you should use.
davine has left #ocaml ["Leaving"]
K_ has joined #ocaml
<Leonidas> what do the maintainers of ocamlc say?
<ggole> Specifically, "The CAMLprim macro expands to the required compiler directives to ensure that the function is exported and accessible from OCaml."
thomasga has quit [Quit: Leaving.]
Haudegen has quit [Remote host closed the connection]
<Leonidas> I had the impression that it was a legacy macro, but seems I was wrong
<ggole> It may never contain anything, but there's some risk of breakage and little cost for adding it.
<Leonidas> yup, I'd agree
<Leonidas> will probably add it back to my code soon
thomasga has joined #ocaml
dalai has joined #ocaml
<adrien> Drup, Leonidas : look at VLC's handling of licenses in doubt
<adrien> also
<adrien> stuff that might endanger real-life is going to require some certs
<adrien> it's the absence of counter-arguments that is needed
dalai has left #ocaml [#ocaml]
Guest54806 has joined #ocaml
Guest54806 has quit [Client Quit]
<thomasga> any idea how to add comments in an _oasis file?
darkf_ is now known as darkf
OnkV has joined #ocaml
<Drup> thomasga: start with #
<companion_cube> # foobar I think
<Drup> iirc
<thomasga> ha yes, # works
<thomasga> thanks! (this is not in the docs …)
OnkV is now known as Haudegen
nojb has joined #ocaml
pparkkin has quit [Ping timeout: 240 seconds]
chambart has quit [Ping timeout: 256 seconds]
psy has quit [Remote host closed the connection]
jabesed has quit [Remote host closed the connection]
Hannibal_Smith has quit [Quit: Sto andando via]
psy has joined #ocaml
samuel02 has joined #ocaml
bezirg has quit [Remote host closed the connection]
samuel02 has quit [Read error: Connection reset by peer]
jabesed has joined #ocaml
samuel02 has joined #ocaml
samrat has quit [Quit: Computer has gone to sleep.]
shinnya has joined #ocaml
jabesed has quit [Remote host closed the connection]
jabesed has joined #ocaml
Thooms has joined #ocaml
jabesed has quit [Remote host closed the connection]
yarl_ has joined #ocaml
thomasga has quit [Quit: Leaving.]
chinglish has quit [Quit: Nettalk6 - www.ntalk.de]
samrat has joined #ocaml
tane has joined #ocaml
slash^ has joined #ocaml
struktured has joined #ocaml
slash^ has quit [Read error: Connection reset by peer]
pparkkin has joined #ocaml
hyperboreean has joined #ocaml
pparkkin has quit [Ping timeout: 240 seconds]
slash^ has joined #ocaml
t4nk639 has joined #ocaml
<t4nk639> Hello
chambart has joined #ocaml
<t4nk639> What would be the best way for syntax checking a simple OCaml expression given as a string?
<t4nk639> e.g. "(x*(3+3))"
<t4nk639> Would give false, as x hasnt been defined
<t4nk639> But "let x = 1 in (x*(3+3))" would be true
<nojb> you can use the compiler-libs library to access the ocaml typechecker
mcclurmc has joined #ocaml
<t4nk639> Can I have an example? :)
<nojb> no :)
<t4nk639> :(
<nojb> is not completely trivial - you can look at the implementation of utop for inspiration
<nojb> you first have to parse your input and then call the typechecker
<t4nk639> Would that be the best way of doing this?
<t4nk639> We are also given the string as a type
<nojb> the *only* way to do it, as far as I know
<t4nk639> Ok, thats for a string though
<t4nk639> We are also given, like a type
<t4nk639> ( Let ("x", Val 1, Prod (Var "x", Sum (Val 3, Val 3)))) = "(let x=1 in (x*(3+3)))"
<t4nk639> does that make sense? :)
<nojb> you mean you are given an ast of the expression ?
<t4nk639> we are given
<t4nk639> type exp = | Val of int | Var of string | Sum of exp * exp | Prod of exp * exp | Let of string * exp * exp ;;
<t4nk639> Which defines a new type which holds an expression
<t4nk639> Does this make it easier to syntax check?
<nojb> yes - it is pretty easy
<t4nk639> ah :)
<nojb> it is an exercise
<t4nk639> We could use the string or the type, I thought string would be easier
<t4nk639> Yeah, came here looking for tips :P
<t4nk639> or hints
<t4nk639> Starting learning ocaml this year, Im getting the hang of it but this question has me stumped
<t4nk639> xD
<nojb> there are (too) many places online that will show you how to do this
<t4nk639> Whats what i am trying to do called?
mcclurmc has quit [Ping timeout: 264 seconds]
<t4nk639> So I can research it
<nojb> look for tutorial for writing interpreters of lambda calculus, mini haskell, mini ml, etc. …
<t4nk639> Ah ok :D
<t4nk639> So I should be trying to maniplulate the inputted data type, not the string
<whitequark> nojb: I would not recommend looking at utop for this
<nojb> whitequark: for this it would definitely be overkill, yes.
<whitequark> the relevant source has a fair amount of incidental complexity that is irrelevant for this case
<whitequark> and it is not easy to read
mcclurmc has joined #ocaml
jgjl has joined #ocaml
<t4nk639> I should try to check if something has been defined before using it?
mcclurmc_ has joined #ocaml
<t4nk639> Its just the complexity of the data type that is confusing me. So far we have used used basic types like type day = Mon | Tue | Wed ...
mcclurmc has quit [Ping timeout: 250 seconds]
octachron has joined #ocaml
larhat has quit [Quit: Leaving.]
t4nk639 has quit [Ping timeout: 246 seconds]
t4nk432 has joined #ocaml
mcclurmc_ has quit [Ping timeout: 264 seconds]
mcclurmc has joined #ocaml
milosn has quit [Remote host closed the connection]
kapil__ has quit [Quit: Connection closed for inactivity]
thomasga has joined #ocaml
darkf has quit [Quit: Leaving]
octachron has quit [Quit: Leaving]
expo873 has quit [Quit: Connection closed for inactivity]
struktured has quit [Ping timeout: 258 seconds]
mcclurmc_ has joined #ocaml
rand000 has joined #ocaml
mcclurmc has quit [Ping timeout: 244 seconds]
samuel02 has quit [Remote host closed the connection]
Thooms has quit [Quit: WeeChat 1.0.1]
ikaros has quit [Quit: Ex-Chat]
matason has quit [Quit: Leaving...]
matason has joined #ocaml
K_ has quit [Quit: Page closed]
pgomes has left #ocaml [#ocaml]
nojb has quit [Quit: nojb]
jgjl has quit [Quit: Textual IRC Client: www.textualapp.com]
EClaesson has joined #ocaml
struktured has joined #ocaml
jonludlam has quit [Ping timeout: 264 seconds]
nojb has joined #ocaml
<struktured> companion_cube: I noticed there's no CCFloat, Double, or Decimal. Is that intentional?
t4nk432 has quit [Ping timeout: 246 seconds]
<companion_cube> it's just I never took the time to write them (I don't use floats much)
EClaesson has quit [Read error: Connection reset by peer]
EClaesson has joined #ocaml
<struktured> companion_cube: so would u take a pr for one at least?
<companion_cube> sure
<struktured> companion_cube: cool may do that. thanks
<whitequark> Double?
<whitequark> float is double-precision
<mrvn> ocaml float
rgrinberg has joined #ocaml
ysz has joined #ocaml
ysz has quit [Client Quit]
<struktured> whitequark: sure just saying theres no CCX for X equal to some realish numerical value
mcclurmc_ has quit [Remote host closed the connection]
mcclurmc has joined #ocaml
mcclurmc has quit [Remote host closed the connection]
matason has quit [Quit: Leaving...]
milosn has joined #ocaml
matason has joined #ocaml
ysz has joined #ocaml
ollehar has quit [Ping timeout: 255 seconds]
samrat has quit [Quit: Computer has gone to sleep.]
matason has quit [Quit: Leaving...]
pparkkin has joined #ocaml
ysz has quit [Quit: This computer has gone to sleep]
matason has joined #ocaml
pparkkin has quit [Ping timeout: 265 seconds]
tharugrim has quit [Ping timeout: 256 seconds]
tharugrim has joined #ocaml
matason has quit [Quit: Leaving...]
pyon has joined #ocaml
manizzle has joined #ocaml
Hannibal_Smith has joined #ocaml
chambart has quit [Ping timeout: 255 seconds]
kakadu has quit [Quit: Page closed]
chaptastic has joined #ocaml
samrat has joined #ocaml
badkins has joined #ocaml
ysz has joined #ocaml
ysz has quit [Client Quit]
<struktured> is there a typical way in ocaml to generate an integer hash code for float?
<Drup> Hashtbl.hash ?
<struktured> Drup: works for me. thanks.
<Drup> I like this kind of questions, it's easy to answer :]
<reynir> huh, Hashtbl.hash works on functions
<ggole> You can also get the bits of a float if you need to
mcclurmc has joined #ocaml
<struktured> ggole: I had that originally but won't it truncate half the bits ultimtaely?
<Drup> reynir: it works on pretty much anything, I think
<ggole> Well, you get them by sticking them in an Int64.t
<ggole> If you end up needing to truncate them, then ok
<Drup> ggole: and then hashing it ? :D
<ggole> But the hash can make use of the bits
<struktured> ggole: yeah but then I need to go to plain old , which I assume is 32. is that wrong?
<ggole> Not as long as you do the hashing first
<struktured> ggole: plain old int, that is
<struktured> ggole:ok, might as wel llet Hashtbl.hash do the work for me it seems
<ggole> But you should probably just use Hashtbl.hash unless perf is a big deal (and maybe even then)
<reynir> I didn't think it would work on functions since you can't compare them for equality
<ggole> Hashtbl.hash might also be smart about floats, eg, -0.0 and 0.0 give the same hash
<Drup> nicoo: how do function get hashed ?
<ggole> But different bits
<ggole> Same with NaN payloads, etc
yarl_ has quit [Quit: Quitte]
tane has quit [Quit: Verlassend]
mcclurmc has quit [Ping timeout: 255 seconds]
q66 has joined #ocaml
badkins has quit []
kakadu has joined #ocaml
rgrinberg has quit [Quit: Leaving.]
nojb has quit [Quit: nojb]
rgrinberg has joined #ocaml
ddosia has joined #ocaml
mcclurmc has joined #ocaml
pparkkin has joined #ocaml
<ddosia> Hello. Is this code optimized somehow: (x mod 4 = 0) && (not (x mod 100 = 0) || (x mod 400 = 0)) so if first clause is false other will not be computed?
contempt has quit [Ping timeout: 245 seconds]
mcclurmc has quit [Ping timeout: 240 seconds]
<Drup> yes
pparkkin has quit [Ping timeout: 264 seconds]
martintrojer has quit [Remote host closed the connection]
<flux> ddosia, it's not really an optimization but rather the semantics of the && and || operators, which is called shortcutting
<ddosia> if there was function call with side effects?
<ddosia> instead of simple arithmetic?
<mrvn> then you have to do: let x = ... in let y = ... in x && y
rgrinberg has quit [Quit: Leaving.]
<ggole> ddosia: the side effects would be short-circuited
martintrojer has joined #ocaml
<ggole> (Unless you did what mrvn suggested and lift them out.)
rgrinberg has joined #ocaml
<ddosia> understood. this is only works with boolean expression, or compiler could optimize other things, so some functions with side effects may not be called?
<Drup> only with && and ||
<ggole> Well, things inside functions (or lazy) won't execute until you call or force them
<ggole> That's... not really best thought of as "optimisation" though
dsheets_ has quit [Ping timeout: 244 seconds]
samuel02 has joined #ocaml
samuel02 has quit [Ping timeout: 250 seconds]
contempt has joined #ocaml
samrat has quit [Quit: Computer has gone to sleep.]
samrat has joined #ocaml
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
rgrinberg has quit [Quit: Leaving.]
<reynir> are there eager boolean operators?
<Drup> let b' = .. in b && b'
<Drup> :D
<mrvn> ket (&&) x y = x && y
<mrvn> let
<mrvn> or does that get wrongly optimized to lazy after inline?
Hannibal_Smith has quit [Quit: Sto andando via]
<Drup> stop playing with side effects evaluation order.
kakadu has quit [Quit: Konversation terminated!]
<mrvn> # false && (Printf.printf "gready\n"; true);;
<mrvn> gready
<mrvn> - : bool = false
<mrvn> can one define a lazy infix operator in ocaml?
<Drup> you mean, short-circuited ?
<mrvn> yes
<Drup> no
<ggole> You can only refer to the built-in ones.
<Drup> or use lazy.
<mrvn> even "let (&&) = (&&)" destroys the short circuit
<ggole> module Test = struct external foo : bool -> bool -> bool = "%sequand" end
<ggole> Test.foo false (Printf.printf "boom"; true);;
<ggole> Like that.
<ggole> (Don't do this.)
Valdo has quit [Excess Flood]
thomasga has quit [Ping timeout: 265 seconds]
Valdo has joined #ocaml
<mrvn> ah yes, the magic %function
dav has joined #ocaml
<reynir> what does it do?
<mrvn> calls a compiler built-in
<mrvn> well, not calls. inlines one.
contempt has quit [Ping timeout: 256 seconds]
bytbox has quit [Remote host closed the connection]
struktured has quit [Ping timeout: 265 seconds]
contempt has joined #ocaml
contempt has quit [Ping timeout: 240 seconds]
kakadu has joined #ocaml
struktured has joined #ocaml
kakadu_ has joined #ocaml
davine has joined #ocaml
kakadu has quit [Ping timeout: 258 seconds]
davine has quit [Client Quit]
samrat has quit [Quit: Computer has gone to sleep.]
ggole has quit []
rgrinberg has joined #ocaml
contempt has joined #ocaml
larhat has joined #ocaml
larhat1 has joined #ocaml
dsheets_ has joined #ocaml
dsheets_ has quit [Read error: Connection reset by peer]
larhat has quit [Ping timeout: 265 seconds]
pparkkin has joined #ocaml
contempt has quit [Ping timeout: 258 seconds]
pparkkin has quit [Ping timeout: 256 seconds]
ddosia has quit [Quit: Leaving.]
chambart has joined #ocaml
contempt has joined #ocaml
igstan has joined #ocaml
igstan has quit [Client Quit]
nojb has joined #ocaml
<MercurialAlchemi> how do you insert a double quote in an ocamldoc comment?
thomasga has joined #ocaml
rgrinberg has quit [Quit: Leaving.]
<Unhammer> TIL that Dom_html.element inherits from Dom.element which inherits from Dom.node … that makes things a lot clearer. I should learn this OOCaml stuff some day =P
<MercurialAlchemi> isn't this chain of inheritance always the case for DOM data, regardless of the language?
<Drup> Unhammer: oh, you didn't notice ?
<Drup> that explains the amount of confusing :D
<Unhammer> sounds likely
<Drup> confusion*
<Unhammer> both
rgrinberg has joined #ocaml
contempt has quit [Ping timeout: 272 seconds]
milosn has quit [Quit: Lost terminal]
contempt has joined #ocaml
manud__ has joined #ocaml
badkins has joined #ocaml
manud__ has quit [Quit: Be back later ...]
t4nk606 has joined #ocaml
<t4nk606> hey
<t4nk606> im new to ocaml can anyone suggest me a way to add a list of binaries
tharugrim has quit [Remote host closed the connection]
pparkkin has joined #ocaml
<mrvn> That question makes no sense
pparkkin has quit [Ping timeout: 255 seconds]
contempt has quit [Ping timeout: 264 seconds]
<flux> I must agree with that..
rgrinberg has quit [Ping timeout: 272 seconds]
slash^ has quit [Read error: Connection reset by peer]
contempt has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 240 seconds]
badkins has quit [Read error: Connection reset by peer]
kakadu_ has quit [Remote host closed the connection]
contempt has quit [Ping timeout: 240 seconds]
rand000 has quit [Quit: leaving]
bytbox has joined #ocaml
contempt has joined #ocaml
rgrinberg has joined #ocaml
johnf has quit [Read error: Connection reset by peer]
contempt has quit [Ping timeout: 265 seconds]
chambart has quit [Read error: Connection reset by peer]
chambart has joined #ocaml
contempt has joined #ocaml
<t4nk606> i want to go from bool list list to bool list
chambart has quit [Ping timeout: 264 seconds]
contempt has quit [Ping timeout: 264 seconds]
badkins has joined #ocaml
<whitequark> List.concat
contempt has joined #ocaml
rgrinberg has quit [Ping timeout: 264 seconds]
rgrinberg has joined #ocaml
stephen_ has joined #ocaml
contempt has quit [Ping timeout: 255 seconds]
badkins has quit []
pparkkin has joined #ocaml
expo873 has joined #ocaml
igstan has joined #ocaml
pparkkin has quit [Client Quit]
<stephen_> Hey guys, I'm compiling the why3 package on debian. Configure runs fine, but the makefile is reporting that there are a bunch of .a files missing. It compiles fine but, then fails after compliation with "Error: Unbound module Big_int_Z". Here's my pastebin. http://pastebin.com/5P2qQa4G
samuel02 has joined #ocaml
<stephen_> Ideas?
rgrinberg1 has joined #ocaml
rgrinberg has quit [Read error: Connection reset by peer]
<flux> plenty. about what, in particular?-)
<stephen_> flux: well how to fix the build would be a great start
<stephen_> So it looks like it fails while linking lib/ocaml/why3__BigInt_compat.cmx
Arsenik has quit [Remote host closed the connection]
samuel02 has quit [Remote host closed the connection]
<Drup> stephen_: one way or the other, you seem to lack the num library (which is supposed to be distributed with ocaml)
<Drup> or why3's makefile is buggy and they forgot to link it, but I doubt it
nadako has joined #ocaml
<stephen_> Hmm, I have all the listed dependencies installed http://pastebin.com/vBN9gzeZ http://why3.lri.fr/doc-0.80/manual006.html . The only other thing mentioned is Coq... maybe that's something
BitPuffin has quit [Ping timeout: 272 seconds]
<stephen_> nevermind, coq is installed too
jzelinskie has left #ocaml [#ocaml]
<stephen_> Drup: flux: Here's my configure output
AlexRussia has quit [Quit: WeeChat 1.1-dev]
AlexRussia has joined #ocaml
Simn has quit [Quit: Leaving]
t4nk606 has quit [Ping timeout: 246 seconds]
bytbox has quit [Remote host closed the connection]