ChanServ 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 | Logs at http://irclog.whitequark.org/ocaml
troutwine_away is now known as troutwine
Thooms has quit [Quit: WeeChat 0.4.3]
travisbrady has quit [Quit: travisbrady]
BitPuffin has quit [Ping timeout: 272 seconds]
Simn has quit [Quit: Leaving]
troutwine is now known as troutwine_away
Algebr has joined #ocaml
__cody__ has joined #ocaml
<Drup> (someone is screaming GADT in my mind right now)
yacks has joined #ocaml
<Algebr> you mean to parameterize the type?
<Drup> yes, but it's not necessarily the good solution, just the prettiest one.
<Drup> Algebr: you realize why it doesn't work, do you ?
<Algebr> Not really
philtor_ has joined #ocaml
<Drup> let b = Binop(LiteralInt 3, Add, LiteralInt 5)
dorei has joined #ocaml
<Drup> you agree that "expr_check b" is true ?
<Algebr> yes
<Drup> let b' = Binop(b, Add, LiteralString "bla")
<Algebr> poop.
<Drup> let's apply expr_check
<Algebr> yerp, I see now.
<Drup> right :)
<Drup> what you want here is to typecheck your tree, so let's typecheck it
<Drup> in this case, since it's simple, everything is inferable
<Drup> so you can write a function "infer_type : expr -> type"
<Drup> (with type as defined in the answer)
<Algebr> Sorry, I don't follow on that.
<Drup> which part ?
<Algebr> so I can typecheck the tree with type 'a expr = LiteralInt of a | LiteralString of a?
<Algebr> err, type the tree
<Drup> non, remove the 'a
<Drup> no*
<Algebr> parameterize the type?
<Algebr> but then how will I *
<Drup> don't parametrize it
<Drup> oh, I think you got it wrong
<Algebr> most likely.
<Drup> when I say "you want to type check the tree", I mean that you will write an algorithm typechecking the tree
<Drup> not using ocaml's typechecker to do the work for you
<Algebr> so I can leave my type expr = LiteralInt of int | LiteralString of string | Binop of expr * op * expr alone, but I have to write another function, smarter function?
<Drup> yes
<Algebr> Why can't I offload this work to the type system
<Drup> oh, you can
<Drup> if you want
<Drup> but it's not the same kind of interesting
<Drup> :)
<Algebr> lol, I'm more in mind of solutions rather than shiny things.
<Drup> so I advise you to do the work yourself :)
__cody__ has quit [Quit: Leaving]
ontologiae has quit [Ping timeout: 255 seconds]
<Algebr> okay, so then the work is with the let rec expr_check = function | Binop ...
<Algebr> Or should I write a small helper function that gets called on the right side of a -> in the original expr_check
<Drup> you shouldn't need an helper function for something that simple
<Drup> in this case, the trick is, as I said before, to make the checking function return the type of the checked expression
<Algebr> but there isn't a typeof type() in ocaml
<Algebr> or*
<Drup> not the type according to caml, the type according to you !
<Drup> LiteralInt is of type MyIntType
<Algebr> oh gosh
<Drup> hey, you are the one wanting to typecheck your tree
<Algebr> so I could do something like: type myTypes = MyInt | MyString and type expr = LiteralInt of MyInt | LiteralString of LiteralString?
<Drup> No.
<Algebr> =/
<Drup> ok, I will write you a little something
thomasga has quit [Quit: Leaving.]
<Algebr> thank you
<Drup> Algebr: there you go
<Drup> the simplest type checker ever
<Algebr> whoa!!
<Drup> I will let you do proper error handling
<Drup> and serialisation
<Algebr> proper error handling means changing the failWith?
<Drup> among other things, yes :D
<Algebr> what do you mean about serialisation
<Drup> well
<Drup> you will want to advise your user *why* the code is not correct
<Drup> this means pretty printing terms
bytbox has quit [Remote host closed the connection]
<Algebr> ah, thank you Drup!
<Drup> Algebr: you see that the type of operators is pretty much hardcoded
<Drup> which is not optimal :)
<Drup> (oh and, I didn't really test :D)
<Drup> Algebr: do you see what this do that your previous version doesn't, now ?
<Drup> don't*
omqal has joined #ocaml
<whitequark> Drup: but it's specifically for eliom
<Drup> whitequark: oh
<Drup> Oh.
<whitequark> well, could be for any webserver thingy, but it seems eliom is a specifically good candidate
<whitequark> especially good*
<Drup> whitequark: there is thing called "monitor" in eliom
<Algebr> Drup: trying to fully understand it, working through it
<Drup> you might want to integrate with it
<Drup> I'm not completly sure what it does, but hhugo should know better
<Drup> (It might be too small anyway)
<Drup> Algebr: I'll advise you to load everything in the interpretor #trace infer_typ and check_expr and try it on some examples
<Algebr> #trace is like stepping through code?
dorei has quit []
<Drup> you will see what it does quite quickly
yacks has quit [Ping timeout: 245 seconds]
boogie has quit [Remote host closed the connection]
yacks has joined #ocaml
samrat has joined #ocaml
philtor_ has quit [Ping timeout: 245 seconds]
<Algebr> Thanks Drup, appreciate the help!
coder has quit [Ping timeout: 240 seconds]
jprakash has quit [Ping timeout: 264 seconds]
q66 has quit [Quit: Leaving]
Algebr has quit [Ping timeout: 240 seconds]
_twx_ has joined #ocaml
<whitequark> Drup: "Here you don't specifically require ocamlfind at runtime, so changing it won't trigger recompilation of your package. "
<whitequark> from OPAM 1.2
<Drup> hum ? source ?
joncfoo has joined #ocaml
nirvdrum has quit [Remote host closed the connection]
lordkryss has quit [Quit: Connection closed for inactivity]
boogie has joined #ocaml
travisbrady has joined #ocaml
coder has joined #ocaml
samrat has quit [Quit: Computer has gone to sleep.]
hhugo has quit [Quit: Leaving.]
_twx_ has quit [Remote host closed the connection]
joncfoo has quit [Quit: Leaving]
boogie has quit [Remote host closed the connection]
_twx_ has joined #ocaml
<Drup> it's a shame the "feature" field didn't make it in 1.2
darkf_ has joined #ocaml
darkf has quit [Ping timeout: 240 seconds]
yomimono has joined #ocaml
Algebr has joined #ocaml
jprakash_ has joined #ocaml
<Algebr> #trace is awesome.
TaXules has quit [Ping timeout: 260 seconds]
darkf_ is now known as darkf
jprakash_ has quit [Quit: leaving]
ygrek has joined #ocaml
koderok has joined #ocaml
koderok has quit [Remote host closed the connection]
<Algebr> Does a try/with construct not make all the let handles visible in the with block?
<whitequark> huh?
<whitequark> no, not at all. it's try <expr> with <cases>
<whitequark> nothing escapes from <expr>. think about this code:
<whitequark> try raise x; let y = 1 in () with _ -> y
<whitequark> what should it return?
<Algebr> shouldn't the raise x immediately stop execution
<Algebr> on, it should reutrn 1
<Algebr> err, rather it should return ()
<Algebr> because the _ catches everything, gives back the case of y, and y is 1 in () but trivially so
boogie has joined #ocaml
<whitequark> ok, bad example
<Algebr> well, here's my code http://lpaste.net/109412
<Algebr> I get unbound value lexbuf
<whitequark> try raise Not_found; let y = input_line stdin in "none" with _ -> y
<whitequark> what should it do?
<Algebr> just return string "none"
<whitequark> how so?
<whitequark> that doesn't make any sense at all
<Drup> Algebr: I don't know what mental model of programming language you have in your head, but it's a weird one :D
<Algebr> I'm mostly just tired..
<Algebr> I was thinking because the _ catches everything, which gives back y, which is self is just scoped in the "none"?
<Algebr> but I guess it should be just executing the input_line stdin
<Drup> err, it's a really weird one x)
<Algebr> lol, so what's the right answer?
<Drup> that's this code is wrong and the compiler is going to throw it away
yomimono has quit [Ping timeout: 240 seconds]
yomimono has joined #ocaml
<Algebr> Why is y unbounded?
<Algebr> because its never executed?
<whitequark> because the scope of y is just in the "none" expression
<Drup> Algebr: would you be a pythonist, by chance ?
<whitequark> if you have "let <patt> = <expr1> in <expr2>", then whatever is bound by <patt> is only bound within <expr2>
<Algebr> Drup: Its my primary language, yes.
<Drup> ah, yes
<Drup> so
<Drup> python's scopes rules are broken
<Algebr> lol, wat?
<whitequark> indeed
<Drup> so, in ocaml
<Drup> and in most languages with sane scoping rules
<Drup> you can't access identifiers created inside a scope from outside of it
<Drup> typical example
<Drup> let x = begin let a = 3 in 4 end in a ;;
<Drup> that doesn't work.
<Drup> That's because a is inside the scope, you don't have the right to access it outside the scope created by begin ... end
omqal has quit [Quit: omqal]
<Drup> I know it's different in python, and I'm sure some people trying to do static analysis on python must bang their heads against some walls collectively about it. :D
<pjdelport> >>> (lambda x=(lambda a=3: 4)(): a)()
<pjdelport> NameError: name 'a' is not defined
<whitequark> Drup: yay variable hoisting
<Drup> pjdelport: you can do in a for loop
<pjdelport> Drup: Yes, but for loops don't establish a scope.
<Drup> well, they should.
<Algebr> yes, that's annoying.
<whitequark> Drup: it's even funnier in Ruby
<whitequark> where a variable in a closure shadows an outer variable only if one exists
<Drup> ah yes
<Drup> late binding
<whitequark> not really, not late
<whitequark> it's determined at parsing time
<Drup> ah, not like in js ?
<Drup> ahah xD
<Drup> fabulous :D
<whitequark> in ruby 1.8 it was much worse
<whitequark> a closure *argument* would *change* a variable in outer scope with same name
<whitequark> i.e. i = 0; 5.times { |i| }; p i # => 4
<Algebr> oh shit it just clicked.
<Drup> whitequark: that's so insane, on so many level
<Drup> why do people keep using insane languages ?
<whitequark> Drup: indeed
<whitequark> well, 1.8 is long deprecated
* Drup don't understand people
<whitequark> Drup: the bonus: the interpreter was a naive ast-walking one
<whitequark> so it wasn't even a dumb way of bytecode rewriting. just ... insanity
<whitequark> ;D
<Drup> ahah
<Drup> whitequark: you saw the python proposition by guido too ?
<whitequark> indeed
<Drup> simultaneously
<whitequark> matz said this about 2 years ago
<whitequark> 3 years even
<Drup> one part of me thing "yay, static typing for everyone"
claudiuc has quit [Remote host closed the connection]
<Algebr> So in my code example, http://lpaste.net/109412 , I can move the with | Parsing.Parse_error before the final expression and hence I should still have a handle on the lexbuf?
<Drup> the other part await with great delight the broken stuff they are going to produce :D
<whitequark> Drup: indeed
<Drup> think
<Drup> *
travisbrady has quit [Quit: travisbrady]
<Drup> Algebr: no, what you should do is move the definition of lexbug outside the scope defined by try ... with
<Drup> whitequark: on this subject, http://www.pyret.org/ is interesting
<whitequark> indeed
<whitequark> I've seen it
<Algebr> ahh, so try is creating its own scope
<Drup> Algebr: of course it is
<Algebr> heh, yea, not used to that.
<Drup> :p
<Algebr> crappy list comprehensions in python 2 also leak their index variables.
<Algebr> that was source of annoyance.
<whitequark> s,list comprehensions in,, s,2,,
<pjdelport> Algebr: You can s/[...]/list(...)/ at least
<Drup> It's not grammatically correct anymore !
<Algebr> I just am realizing how stupid python's scoping is.
coder has quit [Ping timeout: 250 seconds]
<Algebr> I don't understand this error message, pos_cnum was selected from type Lexing.position.
<Algebr> It is not visible in the current scope, and will not
<Algebr> be selected if the type becomes unknown.
<Drup> whitequark: is "cd" disabled in opam scripts ?
<Algebr> where pos_cnum is a field in the position record of a lexbuf
<whitequark> Drup: I think it's just not scripts
<Algebr> How can a type become unknown?
<whitequark> opam merely executes every row with execve
<Drup> huuuum
<Drup> ok.
<Drup> so basically, I need to create a small script if I want to cd to some directory before building
<Drup> Algebr: if, you open another module with a type with a pos_cnum field
<Drup> record disambiguation is a recent feature, and some people don't like it, so the compiler emit a warning
<Algebr> so the type will become unknown aka ambigious if i did open SomeModule where that SomeModule also has a record that used pos_cnum?
<Algebr> I think I can then ignore this warning.
<Drup> I tend to disable it, personally
Algebr has quit [Ping timeout: 240 seconds]
zarul has quit [Ping timeout: 245 seconds]
rand000 has joined #ocaml
zarul has joined #ocaml
zarul has quit [Max SendQ exceeded]
zarul has joined #ocaml
samrat has joined #ocaml
MercurialAlchemi has joined #ocaml
jao has quit [Ping timeout: 260 seconds]
darkf_ has joined #ocaml
darkf has quit [Ping timeout: 260 seconds]
yomimono has quit [Ping timeout: 260 seconds]
samrat has quit [Ping timeout: 255 seconds]
iorivur has quit [Ping timeout: 260 seconds]
axiles has quit [Ping timeout: 264 seconds]
darkf_ is now known as darkf
ebzzry has quit []
clog has quit [Ping timeout: 250 seconds]
fold has quit [Ping timeout: 260 seconds]
darkf_ has joined #ocaml
darkf has quit [Ping timeout: 240 seconds]
darkf_ is now known as darkf
jprakash has joined #ocaml
boogie has quit [Remote host closed the connection]
boogie has joined #ocaml
axiles has joined #ocaml
samrat has joined #ocaml
darkf_ has joined #ocaml
darkf_ has quit [Changing host]
darkf_ has joined #ocaml
darkf has quit [Ping timeout: 240 seconds]
boogie has quit [Remote host closed the connection]
darkf__ has joined #ocaml
darkf_ has quit [Ping timeout: 240 seconds]
ygrek has quit [Ping timeout: 255 seconds]
MercurialAlchemi has quit [Ping timeout: 264 seconds]
darkf__ is now known as darkf
MercurialAlchemi has joined #ocaml
samrat has quit [Quit: Computer has gone to sleep.]
fraggle_laptop has quit [Remote host closed the connection]
_0xAX has joined #ocaml
alexey has joined #ocaml
genewitch has quit [Ping timeout: 255 seconds]
arquebus has joined #ocaml
jprakash has quit [Quit: leaving]
koderok has joined #ocaml
koderok has quit [Read error: Connection reset by peer]
arquebus has quit [Quit: Konversation terminated!]
ygrek has joined #ocaml
Submarine has joined #ocaml
Kakadu has joined #ocaml
clog has joined #ocaml
<whitequark> Drup: ahem. File "ghost-location", line 1, characters 0-0:
<whitequark> Error: Unbound module Eliom_pervasives
<whitequark> why would this happen?
<Drup> I have seen that already
<Drup> I don't remember
<Drup> show the code ?
<whitequark> let () = ()
<Drup> :D
<whitequark> ocamlbuild -use-ocamlfind -plugin-tags 'package(eliom.ocamlbuild)' src/server/chat.cma
<Drup> huum
<Drup> eliom.ocamlbuild should take care of linking the necessary stuff so that Eliom_pervasives, in particular, is defined
<Drup> but apparently, it doesn't do it here
<Drup> ping jpdeplaix ^
ygrek has quit [Ping timeout: 245 seconds]
<Drup> whitequark: you add the necessary stuff in myocamlbuild.ml, I presume ?
<Drup> added*
<whitequark> I did
avsm has joined #ocaml
<whitequark> <app/server/chat.{cma,cmxa,cmxs}>: package(eliom.server)
<Drup> whitequark: could you bug report it ? It probably shouldn't happen
<whitequark> even this:
<whitequark> <app/server/*>: package(eliom.server)
<whitequark> <app/client/*>: package(eliom.client)
<Drup> yeah, I suppose that would work
<whitequark> oh huh source maps
<Drup> well, camp4, so yes, source maps
<whitequark> camlp4?
<whitequark> how is it even related?
<Drup> it's a .eliom, isn't it ?
<whitequark> sure
<Drup> so yes, camlp4.
<whitequark> how is it related to source maps though?
<Drup> well, the to point to the original file when there is an error in the generated ones
<whitequark> no, I'm talking about javascript source maps
<Drup> Oh.
<whitequark> ... I don't think camlp4 can do that
<Drup> well, camlp4 has a feature that would be called sourcemap, where the output file is annotated in a way the compiler understand, to redirect the error location
<whitequark> # 1 "foo.ml" ?
<Drup> yes, this stuff
<Drup> anyway
<Drup> js_of_ocaml's source maps are still wip
<whitequark> " I think having these implemented correctly could be compelling enough to make the web the primary development platform for OCaml. The Chrome debugging tools are that good!"
<whitequark> pls no
<whitequark> ...
<Drup> I won't comment. =')
Submarine has quit [Ping timeout: 255 seconds]
samrat has joined #ocaml
<Drup> whitequark: have you used codeplex once ? :D
<MercurialAlchemi> How is the performance of js_of_ocaml in practice?
<whitequark> Drup: hm. what about codeplex
<whitequark> ?
<Drup> MercurialAlchemi: better than ocaml bytecode
<Drup> whitequark: their archive are zips, not tars
<Drup> opam yells at me
<Drup> . . .
<MercurialAlchemi> well, that's something (though I'm not sure what the penalty is compared to native code)
Submarine has joined #ocaml
<Drup> MercurialAlchemi: bytecode is usually one order of magnitude slower than native
<MercurialAlchemi> Doing something with eliom and js_of_ocaml is probably going to be my second ocaml project :)
<NoNNaN> an llvm ocaml backend will probably enable to use emscripten and asm.js
<Drup> NoNNaN: you are not the first one to say such thing
<Drup> and I still don't see the point
<MercurialAlchemi> Is this "will" as in "it's planned or in progress", or "will" as in "wishful thinking"?
<whitequark> NoNNaN: a JS engine that is not dumb as a brick (i.e. not firefox) doesn't need asm.js
<def`> NoNNaN: what would be the benefit ? losing the GC :P ?
<Drup> on top of that
samrat has quit [Ping timeout: 240 seconds]
samrat has joined #ocaml
<Drup> you will go through all the llvm machinery and, even if llvm is a very good compiler, I'm not sure it's going to offer much gain, considering the loss of information
avsm1 has joined #ocaml
<whitequark> Drup: I believe I can make LLVM aggressively inline AND lift allocations to stack
<NoNNaN> Drup: js_of_ocaml already use different layout and base types, not the ocaml one
avsm1 has quit [Client Quit]
<whitequark> which may or may not offer a significant benefit over what ocamlopt does
<whitequark> and use the above to vectorize code, which will offer one for a certain narrow spot
<Drup> whitequark: I didn't mean compared to ocamlopt
<whitequark> oh, you mean for emscripten
<Drup> whitequark: I meant between js_of_ocaml and emscripten
<whitequark> no, that's dumb. js_of_ocaml is the best solution you can have.
<Drup> NoNNaN: I know
<NoNNaN> Drup: could you show me where is the super ocaml gc in js_of_ocaml ?
<Drup> nowhere, since js come with one ?
<whitequark> NoNNaN: there is no JS GC in asm.js. you will need to provide your own.
avsm has quit [Ping timeout: 260 seconds]
<Drup> (embedding a whole gc in every generated js is going to be super good for the size =')
<whitequark> Drup: (encoding what is essentially machine code in a faux-JS already does *wonders* for it)
<Drup> indeed
samrat has quit [Quit: [Textual IRC Client: http://www.textualapp.com/]]
<Drup> (js_of_ocaml is pretty good on the code size aspect of the question too, btw)
<whitequark> especially if you gzip it
<whitequark> I want to gzip it, gzip it ~
<Drup> even before gziping
<NoNNaN> whitequark: and how good is the browser js implementation gc for functional code? compared the native code ?
BitPuffin has joined #ocaml
<whitequark> NoNNaN: good enough you can't easily beat it with a roundabout GC impl that has zero access to underlying machine or even any knowledge of its architecture
<NoNNaN> whitequark: maybe it's a bit outdated, but: http://lambda-the-ultimate.org/node/4779
* whitequark shrugs
<NoNNaN> fortunately there are lot's of competition in browser js performance, we may see surprising improvements
<whitequark> write an asm.js-based GC that outperforms JS's GC
<whitequark> then I'll be interested in your claims
bezirg has joined #ocaml
<whitequark> even if you have a GC that is equally fast as JS's GC, it will still translate to slower asm.js code (in the browsers that are dumb enough to rely on asm.js, i.e. firefox)
<whitequark> because asm.js doesn't, for example, inline code, or use dynamic range information for optimization
<whitequark> asm.js is basically an implementation detail of the Firefox JS engine that somehow became a technological fetish
<NoNNaN> just like nacl and pnacl in chrome
<whitequark> nope
<whitequark> PNaCl isn't even strictly restricted to web, it's a generic machine code sandboxing technology
<def`> (what's the point of starting with one of the worst software stack, complaining it's slow, sacrificing hundred of monkeys to optimize it to hopefully reach decent performance in ten years?)
<Drup> def`: "software engineering"
dsheets has joined #ocaml
<Drup> apparently, it's a thing
<adrien> come on, we're not fri... oh, right, we are, go on
<MercurialAlchemi> def`: less monkeys?
<adrien> would be better if you replaced monkeys with paris pigeons
<def`> _o/ yeah friday friday yeah
<MercurialAlchemi> I'd replace monkeys with French politicians, personally...
<adrien> :)
<whitequark> no one loves the politicians of their country т_т
<def`> yet, I guess on this topic you have an edge
<MercurialAlchemi> oh, they're good for entertainment: a new investigation every month, you don't get bored
<MercurialAlchemi> (well, considering I'm not living in France anymore I guess they're not so much "my" politicians anymore, but still, ugh)
<MercurialAlchemi> maybe I have it wrong
<MercurialAlchemi> replace the politicians with the monkeys: bonobos for presidents
studybot has joined #ocaml
<whitequark> we have a joke here. "everything in Russia is awful, so a group of citizens decides to resurrect Stalin. they promptly do and ask him what to do. "Execute all the politicians and paint Kremlin blue" "But, but, why blue?" "I see there are no objections to the first part"
<MercurialAlchemi> I like that one
<adrien> :)
<Drup> =')
<MercurialAlchemi> (admittedly, politicians here in DK are not that bad)
hhugo has joined #ocaml
<def`> I knew it with "Execute all $PUT_SOME_GROUP_HERE and 1 engineer." "Why an engineer?" hehehe
<whitequark> def`: I see it transcends borders
koderok has joined #ocaml
iorivur has joined #ocaml
darkf_ has joined #ocaml
darkf has quit [Ping timeout: 272 seconds]
iorivur has quit [Remote host closed the connection]
koderok has quit [Quit: koderok]
hhugo has quit [Ping timeout: 244 seconds]
BitPuffin has quit [Ping timeout: 240 seconds]
hhugo has joined #ocaml
rand000 has quit [Quit: leaving]
ontologiae has joined #ocaml
yacks has quit [Quit: Leaving]
Simn has joined #ocaml
_andre has joined #ocaml
hhugo has quit [Quit: Leaving.]
badon has joined #ocaml
hhugo has joined #ocaml
Haudegen has quit [Remote host closed the connection]
Haudegen has joined #ocaml
Haudegen is now known as Guest74955
Guest74955 is now known as Haudegen
hhugo has quit [Quit: Leaving.]
chris2 has quit [Ping timeout: 260 seconds]
seanmcl has joined #ocaml
sepp2k has joined #ocaml
darkf_ is now known as darkf
fold has joined #ocaml
coder has joined #ocaml
chris2 has joined #ocaml
englishm has joined #ocaml
ggole has joined #ocaml
axiles has quit [Ping timeout: 260 seconds]
BitPuffin has joined #ocaml
coder has quit [Ping timeout: 245 seconds]
englishm has quit [Remote host closed the connection]
englishm has joined #ocaml
shinnya has joined #ocaml
axiles has joined #ocaml
_whitelogger has joined #ocaml
gperetin has joined #ocaml
_5kg has joined #ocaml
hexo has joined #ocaml
pyon has joined #ocaml
pyon is now known as Guest25215
Guest25215 has quit [Changing host]
Guest25215 has joined #ocaml
Guest25215 has quit [Client Quit]
ontologiae has quit [Ping timeout: 244 seconds]
esden has joined #ocaml
yroeht has joined #ocaml
pyon has joined #ocaml
BitPuffin has quit [Ping timeout: 264 seconds]
yacks has joined #ocaml
Submarine has quit [Remote host closed the connection]
hhugo has joined #ocaml
bytbox has joined #ocaml
boogie has quit [Remote host closed the connection]
lordkryss has joined #ocaml
jprakash has joined #ocaml
bytbox has quit [Ping timeout: 240 seconds]
boogie has joined #ocaml
boogie has quit [Remote host closed the connection]
avsm has joined #ocaml
_0xAX has quit [Remote host closed the connection]
parcs has quit [Remote host closed the connection]
travisbrady has joined #ocaml
parcs has joined #ocaml
Submarine has joined #ocaml
Submarine has joined #ocaml
Submarine has quit [Changing host]
ebzzry has joined #ocaml
S11001001 has joined #ocaml
S11001001 has quit [Changing host]
S11001001 has joined #ocaml
avsm has quit [Read error: Connection reset by peer]
avsm has joined #ocaml
avsm1 has joined #ocaml
BitPuffin has joined #ocaml
englishm has quit [Remote host closed the connection]
englishm has joined #ocaml
bytbox has joined #ocaml
avsm has quit [Ping timeout: 264 seconds]
Algebr has joined #ocaml
bytbox has quit [Ping timeout: 240 seconds]
hhugo has quit [Quit: Leaving.]
englishm has quit [Remote host closed the connection]
englishm has joined #ocaml
bytbox has joined #ocaml
<Algebr> trying to emulate python's commenting rules,
<Algebr> Wouldn't the regex be something like: '#'[^ '\n']* { <myRule> lexbuf }
<ggole> You'd probably want to eat the newline too
<ggole> (If any.)
<whitequark> don't forget to handle the comment right before EOF case
MercurialAlchemi has quit [Ping timeout: 250 seconds]
<Algebr> Would it be cleaner to do like '#'[^]* { <commentRule> lexbuf }
boogie has joined #ocaml
<Algebr> and then a separate commentRule?
boogie has quit [Remote host closed the connection]
MercurialAlchemi has joined #ocaml
jbrown has quit [Remote host closed the connection]
jjwatt has joined #ocaml
fold has quit [Ping timeout: 246 seconds]
<ggole> (eof | '\n'), I would think
<ggole> Hmm, not sure if that would do the right thing with line counts.
<def`> hmm, not sure either :'
<whitequark> you don't need to consume \n in the comment rule
<whitequark> just leave it to your regular handler
<def`> correct
Algebr has quit [Remote host closed the connection]
Algebr has joined #ocaml
<Algebr> whitequark: ocamllex doesnt like .*, cause I Was trying '#'.* { }
avsm1 has quit [Quit: Leaving.]
avsm has joined #ocaml
pminten has joined #ocaml
nojb has joined #ocaml
axiles has quit [Ping timeout: 246 seconds]
avsm has quit [Quit: Leaving.]
ontologiae has joined #ocaml
koderok has joined #ocaml
koderok has quit [Client Quit]
ontologiae has quit [Ping timeout: 255 seconds]
MercurialAlchemi has quit [Ping timeout: 250 seconds]
MercurialAlchemi has joined #ocaml
axiles has joined #ocaml
pyon has quit [Quit: Fiat justitia ruat caelum.]
coder has quit [Quit: Lost terminal]
pyon has joined #ocaml
axiles has quit [Ping timeout: 272 seconds]
pyon has quit [Read error: Connection reset by peer]
axiles has joined #ocaml
pyon has joined #ocaml
Kakadu has quit [Quit: Page closed]
<whitequark> ocamllex doesn't have .
philtor has joined #ocaml
Algebr has quit [Remote host closed the connection]
nojb has quit [Ping timeout: 245 seconds]
boogie has joined #ocaml
pminten has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
troutwine_away is now known as troutwine
samrat has joined #ocaml
MercurialAlchemi has quit [Remote host closed the connection]
shinnya has quit [Ping timeout: 264 seconds]
troutwine is now known as troutwine_away
travisbrady has quit [Quit: travisbrady]
_0xAX has joined #ocaml
anddam has left #ocaml ["WeeChat 0.4.3"]
hhugo has joined #ocaml
iZsh_ has quit [Quit: ZNC - http://znc.in]
englishm has quit [Ping timeout: 260 seconds]
iZsh has joined #ocaml
jwatzman|work has joined #ocaml
travisbrady has joined #ocaml
troutwine_away is now known as troutwine
zarul has quit [Ping timeout: 245 seconds]
xavierm02 has joined #ocaml
q66 has joined #ocaml
toroidalcode has joined #ocaml
ontologiae has joined #ocaml
dsheets has quit [Ping timeout: 240 seconds]
ontologiae has quit [Ping timeout: 244 seconds]
travisbrady has quit [Quit: travisbrady]
travisbrady has joined #ocaml
travisbrady has quit [Client Quit]
travisbrady has joined #ocaml
Kakadu has joined #ocaml
axiles has quit [Ping timeout: 255 seconds]
axiles has joined #ocaml
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
yacks has quit [Read error: Connection reset by peer]
Submarine has quit [Ping timeout: 250 seconds]
olasd has quit [Quit: WeeChat 0.4.3]
olasd has joined #ocaml
Submarine has joined #ocaml
fold has joined #ocaml
philtor_ has joined #ocaml
dadda has joined #ocaml
badon has quit [Ping timeout: 244 seconds]
ontologiae has joined #ocaml
MercurialAlchemi has joined #ocaml
seanmcl has quit [Read error: Connection reset by peer]
sepp2k has quit [Quit: Konversation terminated!]
BitPuffin has quit [Ping timeout: 272 seconds]
_0xAX has quit [Remote host closed the connection]
fraggle_laptop has joined #ocaml
troutwine is now known as troutwine_away
yomimono has joined #ocaml
seanmcl has joined #ocaml
samrat has quit [Quit: Computer has gone to sleep.]
toroidalcode is now known as toroidalcode_
WraithM has quit [Ping timeout: 255 seconds]
Submarine has quit [Ping timeout: 240 seconds]
Submarine has joined #ocaml
toroidalcode_ is now known as toroidalcode
boogie has quit [Quit: Leaving...]
dadda has quit []
ontologiae has quit [Ping timeout: 272 seconds]
fraggle_laptop has quit [Ping timeout: 246 seconds]
so has quit [Ping timeout: 245 seconds]
ollehar has joined #ocaml
ggole has quit []
so has joined #ocaml
_andre has quit [Quit: leaving]
hhugo has quit [Quit: Leaving.]
hhugo has joined #ocaml
troutwine_away is now known as troutwine
rand000 has joined #ocaml
_cody_ has joined #ocaml
<xavierm02> Hi. I can't find a way to force optional arguments to have a more generic type than the one of the default value. Is it even possible? let id : ?arg:'a -> 'a = fun ?(arg = 0) -> arg;;
<def`> No, it's not
<xavierm02> Okay. Thanks :(
seanmcl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
oriba has joined #ocaml
lordkryss has quit [Quit: Connection closed for inactivity]
seanmcl has joined #ocaml
Simn has quit [Read error: Connection reset by peer]
WraithM has joined #ocaml
rand000 has quit [Ping timeout: 250 seconds]
jprakash has quit [Ping timeout: 272 seconds]
hhugo has quit [Quit: Leaving.]
bytbox has quit [Remote host closed the connection]
<MercurialAlchemi> any way of getting readline-like functionalities ina program?
WraithM has quit [Ping timeout: 240 seconds]
<MercurialAlchemi> doesn't seem to be any libeadline binding
jprakash has joined #ocaml
<toroidalcode> MercurialAlchemi: I wrote a wrapper for linenoise, https://github.com/brick-lang/linenoise-ml
<toroidalcode> there's also https://github.com/diml/zed
<MercurialAlchemi> neat
<MercurialAlchemi> thanks
<toroidalcode> mine's not the best code. And the documentation's a bit out of date. Make an issue if you have any problems
Submarine has quit [Quit: Leaving]
_cody_ has quit [Quit: Leaving]
philtor_ has quit [Ping timeout: 240 seconds]
<MercurialAlchemi> I've learned to lower my expectations when it comes to ocaml documentation :)
<Drup> MercurialAlchemi: depending of what you want, look at lambda-term
<Drup> which uses zed
<Drup> (zed is a very nice library)
parcs has quit [Remote host closed the connection]
yomimono has quit [Ping timeout: 240 seconds]
yomimono has joined #ocaml
xavierm02 has quit [Ping timeout: 246 seconds]
ollehar has quit [Ping timeout: 264 seconds]
malc_ has joined #ocaml
yomimono has quit [Quit: Leaving]
<MercurialAlchemi> Drup: thks
hhugo has joined #ocaml
claudiuc has joined #ocaml
claudiuc_ has joined #ocaml
seanmcl has quit [Read error: Connection reset by peer]
shinnya has joined #ocaml
claudiuc has quit [Ping timeout: 250 seconds]
BitPuffin has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 272 seconds]
hhugo has quit [Quit: Leaving.]
ontologiae has joined #ocaml
bytbox has joined #ocaml
hhugo has joined #ocaml
lordkryss has joined #ocaml
travisbrady has quit [Quit: travisbrady]
bytbox has quit [Remote host closed the connection]
Kakadu has quit [Quit: Konversation terminated!]
philtor_ has joined #ocaml
rom1504 has quit [Quit: Lost terminal]
rom1504 has joined #ocaml
darkf has joined #ocaml
ontologiae has quit [Ping timeout: 255 seconds]
rom1504 has quit [Quit: leaving]
rom1504 has joined #ocaml
bytbox has joined #ocaml
rom1504 has quit [Client Quit]
rom1504 has joined #ocaml
bytbox has quit [Remote host closed the connection]
madroach has quit [Ping timeout: 250 seconds]
madroach has joined #ocaml
NoNNaN has quit [Remote host closed the connection]
NoNNaN has joined #ocaml
philtor_ has quit [Ping timeout: 245 seconds]
hhugo has quit [Read error: Connection reset by peer]
hhugo has joined #ocaml
jao has quit [Ping timeout: 255 seconds]
travisbrady has joined #ocaml
bytbox has joined #ocaml