flux changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 4.00.1 http://bit.ly/UHeZyT | http://www.ocaml.org | Public logs at http://tunes.org/~nef/logs/ocaml/
Neros has quit [Ping timeout: 268 seconds]
ollehar has quit [Ping timeout: 240 seconds]
rgrinberg has joined #ocaml
csakatoku has joined #ocaml
pootler_ has quit [Ping timeout: 260 seconds]
milosn_ has joined #ocaml
Watcher7 is now known as Watcher7|off
ygrek has joined #ocaml
milosn has quit [Ping timeout: 264 seconds]
osnr has joined #ocaml
osnr has quit [Changing host]
osnr has joined #ocaml
ygrek has quit [Remote host closed the connection]
madroach has quit [Ping timeout: 248 seconds]
dsheets has quit [Ping timeout: 276 seconds]
madroach has joined #ocaml
ygrek has joined #ocaml
talzeus has joined #ocaml
pkrnj has joined #ocaml
mattrepl has quit [Quit: mattrepl]
osnr has quit [Quit: Leaving.]
cow-orker has quit [Ping timeout: 245 seconds]
travisbrady has joined #ocaml
Watcher7|off is now known as Watcher7
fraggle_laptop has quit [Remote host closed the connection]
cow-orker has joined #ocaml
Drup has quit [Quit: Leaving.]
travisbrady has quit [Quit: travisbrady]
pkrnj has quit [Ping timeout: 268 seconds]
pkrnj has joined #ocaml
darkf has joined #ocaml
mattrepl has joined #ocaml
venk has quit [Ping timeout: 248 seconds]
astertronistic has joined #ocaml
talzeus has quit [Remote host closed the connection]
talzeus has joined #ocaml
csakatok_ has joined #ocaml
osnr has joined #ocaml
osnr has quit [Changing host]
osnr has joined #ocaml
csakatoku has quit [Ping timeout: 264 seconds]
pkrnj has quit [Quit: Textual IRC Client: www.textualapp.com]
ggole has joined #ocaml
gautamc has quit [Read error: Connection reset by peer]
gautamc has joined #ocaml
talzeus has quit [Remote host closed the connection]
pootler_ has joined #ocaml
<pippijn> what is a good way to share state between two event loops?
talzeus has joined #ocaml
<pippijn> I have 2 sources of events: network and console
<pippijn> network updates the env, and the console will use it (perhaps also update in the future)
osnr has quit [Quit: Leaving.]
chrisdotcode has quit [Remote host closed the connection]
osnr has joined #ocaml
osnr has quit [Changing host]
osnr has joined #ocaml
<flux> pippijn, well, you can either mutate a shared value (ie. let env = ref Env.empty in Lwt.join .. network_loop io env; ..
<flux> or you can pass messages
Arzaga has joined #ocaml
Arzaga is now known as broohaha
<flux> for message passing I really like using this piece of code using the ideas from the Event module (Concurrent ML): http://www.modeemi.fi/~flux/software/ocaml/lwt_msgqueue.mli
<pippijn> ok, nice
<pippijn> I'll try the message passing way
<broohaha> Is ocamlpro.com down?
<pippijn> flux: I don't really understand
<pippijn> flux: should I send the updated env as message?
<pippijn> maybe I'll go with the shared value..
talzeus has quit [Remote host closed the connection]
ttamttam has joined #ocaml
talzeus has joined #ocaml
ttamttam has left #ocaml []
gnuvince has joined #ocaml
Snark has joined #ocaml
venk has joined #ocaml
<flux> pippijn, well, instead of sharing env you would share a channel, and there could be a third thread maintaining the env and responding to queries about it
<flux> but maybe it's overkill if you just really need to share one value..
<pippijn> yeah
Yoric has joined #ocaml
<gnuvince> When I use the regular OCaml toplevel (not utop) and I try to #use "topfind";; #camlp4o;; #require "core.top";;, I get an error about the global Condition not being found. Am I forgetting a step?
<flux> probably doing #thread;; fixes it
Watcher7 is now known as Watcher7|off
<flux> (after loading topfind)
LeNsTR has quit [Changing host]
LeNsTR has joined #ocaml
<gnuvince> flux: thanks, I'll try that (recompiling core for 4.01-dev)
pootler__ has joined #ocaml
<gnuvince> flux: that worked nicely, thanks!
pootler_ has quit [Ping timeout: 264 seconds]
weie_ has joined #ocaml
weie has quit [Ping timeout: 260 seconds]
Breadmonster has joined #ocaml
pygmalion has joined #ocaml
<pygmalion> Can someone explain why this terminates and returns a value I can use? "let rec ones = 1 :: ones;;"
<pygmalion>
ygrek has quit [Ping timeout: 252 seconds]
<flux> pygmalion, well, ocaml doesn't have values that don't terminate, but they can be infinite
<flux> pygmalion, that really constructs a value that refers to itself, like a linked list where the last element points to the first
<flux> in practice that particular case is not very useful.
<pygmalion> Ah.
<flux> more useful when constructing pure values involving laziness
emmanuelux has quit [Quit: emmanuelux]
<pygmalion> flux: Wouldn't you just use a stream, a pipe or a lazy list instead?
<pygmalion> What is a useful case for this behavior?
<flux> the useful case is to have a fun demo involving infinite values in ocaml :)
<flux> and that's about it..
testcocoon has quit [Read error: Connection reset by peer]
<flux> for example you cannot write a function that takes a list and constructs such an infinitely looped list (without using unsafe functionality)
<flux> so lazy lists, streams, pipes, are all probably better options in general
<pygmalion> Yeah, okay that makes sense haha
<pygmalion> Thanks!
venk has quit [Ping timeout: 252 seconds]
venk has joined #ocaml
ttamttam has joined #ocaml
q66 has joined #ocaml
ttamttam has quit [Quit: ttamttam]
<ggole> Values that refer to themselves can be very useful. It's the easiest way to implement disjoint sets, for instance.
<ggole> Of course this is a mutable structure.
zpe has joined #ocaml
ttamttam has joined #ocaml
ygrek has joined #ocaml
zpe has quit [Ping timeout: 246 seconds]
Yoric has quit [Ping timeout: 252 seconds]
Yoric has joined #ocaml
testcocoon has joined #ocaml
hkBst has joined #ocaml
hkBst has quit [Changing host]
hkBst has joined #ocaml
ontologiae has joined #ocaml
ttamttam has quit [Quit: ttamttam]
pygmalion has quit [Ping timeout: 240 seconds]
Yoric has quit [Ping timeout: 252 seconds]
LeNsTR is now known as lenstr
zpe has joined #ocaml
ontologiae has quit [Ping timeout: 246 seconds]
ttamttam has joined #ocaml
ttamttam has quit [Client Quit]
zpe has quit [Ping timeout: 241 seconds]
mika1 has joined #ocaml
cago has joined #ocaml
f[x] has joined #ocaml
ygrek has quit [Ping timeout: 268 seconds]
eikke has joined #ocaml
<Breadmonster> What's the best way to learn OCaml?
<Breadmonster> I'm learning Haskell too, so that makes OCaml easier,
<Breadmonster> But is there anything like Real World OCaml?
<rixed_> Breadmonster: you mean something like http://www.realworldocaml.org/ :)
<companion_cube> that's a book in preparation with that name
Zeev has joined #ocaml
djcoin has joined #ocaml
zpe has joined #ocaml
ontologiae has joined #ocaml
raichoo has joined #ocaml
zpe has quit [Ping timeout: 260 seconds]
alang_ has quit [Ping timeout: 260 seconds]
alang has joined #ocaml
<gasche> 21:53 < rly> companion_cube: some embedded language in Coq in which you can express linear logic + memory constraints.
<gasche> there was a paper by Edwin Brady about exactly this in Idris, a few years agoi
<companion_cube> also, ATS, I guess
venk has quit [Ping timeout: 264 seconds]
<gasche> companion_cube: ATS is not really as versatile as Coq, while Agda tries to be (and Idris is quite close to Agda in that regard)
<companion_cube> oh.
<gasche> I mean that the expected use case for ATS is not to prove correctness of your programs, but rather their safety
<companion_cube> I see
<companion_cube> but I think that the memory constraints are part of this :)
<gasche> companion_cube: please add in ixSet.mli a clearer explanation of the purpose of the library, plus a usage example
<gasche> then it'll be redittable material
<companion_cube> :D
<companion_cube> it's not really production-ready, just the product of yesterday's discussion with Drup
speredenn has joined #ocaml
dsheets has joined #ocaml
ollehar has joined #ocaml
<gasche> not being production-ready is not a problem for a reddit submission
<gasche> not being documented is
broohaha has quit [Ping timeout: 255 seconds]
<companion_cube> sure, sure
<gasche> unrelated: I've heard good things of John Whitington's recent book "OCaml from the Very Beginning"
<companion_cube> I didn't know I was to write redditable code ;)
<gasche> it's hard to recommend it as beginners material given that there is no free version online
<gasche> but still it's good to know
alang has quit [Ping timeout: 260 seconds]
zpe has joined #ocaml
alang has joined #ocaml
justdit has joined #ocaml
speredenn has quit [Quit: Leaving]
dsheets has quit [Ping timeout: 240 seconds]
zpe has quit [Ping timeout: 264 seconds]
Breadmonster has quit [Ping timeout: 248 seconds]
speredenn has joined #ocaml
<companion_cube> gasche: I updated it
justdit has quit [Quit: Lost terminal]
weie_ has quit [Read error: Connection reset by peer]
<flux> companion_cube, cool, I've been wanting such a module for some time (indexed set)
weie has joined #ocaml
<flux> (actually I even have written one, but it's owned by a former employer)
<companion_cube> flux: it's almost just a proof of concept here, but it should be easy to extend :)
<companion_cube> hey, the coloring stuff of github is neat!
<flux> I called mine however indexed map.. I don't quite remember how it worked, I think there were subtle differences to that
<flux> the use case (was for example) that there is a map of devices, from id to device, and the device would know if it was connected or not (or some other state) and you could easily go through all connected (or disconnected) devices
<flux> so I guess there would be a set of devices in this case
<flux> what was essential though was that there could be multiple different representations for a value, depending which index it was retrieved through
<companion_cube> oh
<companion_cube> looks much more sophisticated than this then
<flux> more sophisticated is not always better, I recall it was more complicated to get running :)
<Kakadu> Guys, when I'm trying to install ocp-indent via opam it wants to download ocp-build.1.99.6-beta.tar.gz which doesn't exist. Is it a bug?
<companion_cube> flux: here it's a bit clumsy to create an empty map :/
<companion_cube> Kakadu: did you opam update?
<Kakadu> companion_cube: yes, ofcourse
<companion_cube> then it's time to wank the maintainers :]
<Armael> opam is going sooo slow these days
<companion_cube> oooops
<companion_cube> wrong word
<companion_cube> -_-
<Armael> :d
<companion_cube> the word was "spank".
<flux> talk about freudian slip..
dsheets has joined #ocaml
<companion_cube> it's just I forgot to check in the dictionary, which I definitely should for such... semantically sensitive words
<adrien_oww> nah, don'; we'd be sad to not read such slips :-)
<companion_cube> it's all to improve the life on this channel!
<adrien_oww> by wanking and spanking? hmmm
<Cypi> We should keep a monthly quote in the topic.
<adrien_oww> agreed, it's tempting :-)
zpe has joined #ocaml
<companion_cube> Cypi: just send a digest to the mailing list
<companion_cube> wait, I didn't say that.
speredenn has quit [Remote host closed the connection]
<gasche> quote is a good idea, but maybe not the sexually explicit jokes
<gasche> (regardless of whether they were intentional at writing time)
<adrien_oww> yes; that's why I haven't copied it :-)
zpe has quit [Ping timeout: 252 seconds]
Zeev has quit [Read error: Connection reset by peer]
dsheets has quit [Ping timeout: 248 seconds]
mcclurmc has joined #ocaml
beckerb has joined #ocaml
talzeus has quit [Remote host closed the connection]
spanish has joined #ocaml
csakatoku has joined #ocaml
talzeus has joined #ocaml
Yoric has joined #ocaml
csakatok_ has quit [Ping timeout: 252 seconds]
zpe has joined #ocaml
Neros has joined #ocaml
rixed_ has quit [Quit: poweroff]
zpe has quit [Ping timeout: 248 seconds]
zpe has joined #ocaml
justdit has joined #ocaml
dsheets has joined #ocaml
Drup has joined #ocaml
Zeev has joined #ocaml
dsheets has quit [Ping timeout: 252 seconds]
skchrko has quit [Remote host closed the connection]
alang has quit [Ping timeout: 260 seconds]
alang has joined #ocaml
astertronistic has quit [Ping timeout: 248 seconds]
astertronistic has joined #ocaml
<Zeev> could u help me out? I'm still trying to use camlImages, I've set opam on ubuntu, did opam install camlImages, trying to launch "ocaml converter.ml" and I get "Unbound module OImages" maybe I'm missing some compiler switch
<gasche> you need to tell the OCaml compiler that you're using those third-party libraries
<gasche> do you use a build system or compile stuff / write makefile by hand?
ousado has quit [Quit: --]
<Zeev> I tried both in ocamleditor, and also with command line: ocaml converter.ml
ousado has joined #ocaml
<gasche> for by-hand compilation that would be
<Zeev> maybe I'm not reading much manual (too little of it)
<gasche> ocamlfind ocamlc -package camlimages -c converter.ml, for example
<gasche> (option -c will not generate an executable)
<Zeev> thanks
<gasche> I suppose OCamlEditor also supports findlib/ocamlfind, so there must be a form somewhere to indicate which "packages" you use
<Zeev> awesome
<Armael> how would it be, using ocamlbuild ? "-lib camlimages" ?
<gasche> note that "camlimages" is my imagined name for the ocamlfind package, it may be camlImages or caml-images etc. (`ocamlfind list | grep images` to find out)
<Zeev> no no camlimages works
<gasche> Armael: I would use
<gasche> ocamlbuild -use-ocamlfind -package camlimages
<Armael> hm ok
<gasche> (-lib are for the parts of the standard library that are not linked in by default: Unix, Str, Graphics, etc.)
<gasche> so yeah Zeev you may be interested in "ocamlbuild -use-ocamlfind -package camlimages converter.byte"
<gasche> the difference between direct invocation of ocamlfind, and ocamlbuild (or other build systems), is that the build system will know which steps to execute to produce the desired "target"
<gasche> here converter.byte implicitly mean "produce a bytecode program out of converter.ml and its dependencies"
<gasche> there are also converter.native (native program), converter.cmo (just a bytecode object file), converter.inferred.mli (only type-checks and return the inferred interface)...
<gasche> manual invocation is also fine if you want to understand the compilation+linking process, but you will have to read the manual for that
talzeus has quit [Remote host closed the connection]
<gasche> ("manual" meaning here "your learning document", not really the OCaml Reference Manual which is not the most didactic for the outside-the-language things)
osnr has quit [Read error: Connection reset by peer]
osnr has joined #ocaml
osnr has quit [Changing host]
osnr has joined #ocaml
talzeus has joined #ocaml
pootler__ has quit [Ping timeout: 264 seconds]
ttamttam has joined #ocaml
<gasche> Zeev: I was going to discourage you from using one of those fancy, fragile language-specific IDEs and keep the tried-and-true ways of Emacs or Vim, but ocamleditor actually looks reasonable and alive so that may be a fine choice
skchrko has joined #ocaml
<gasche> (I don't have the illusion that Emacs and Vim are easy for beginners to handle, but I think "not being comfortable with that powertool" is a better problem to have during the learning process than "not being sure whether I did it wrong or the editor is just broken" of less-used tools)
ttamttam has left #ocaml []
<Armael> oh, ocamleditor seems nice
<Armael> i was expecting something like an eclipse mode, but it is written from scratch
talzeus has quit [Remote host closed the connection]
f[x] has quit [Ping timeout: 264 seconds]
<Drup> Armael: there is also an ocaml eclipse mode, if you really want to .... :x
eikke has quit [Ping timeout: 264 seconds]
<Armael> yeah, no
<Armael> but i know someone who use it, and he's really happy of it!
_andre has joined #ocaml
csakatoku has quit [Remote host closed the connection]
eikke has joined #ocaml
<Kakadu> Is there an easy way to force opam to rebuild ocaml 4.00.1 and keep libraries installed before?
tane has joined #ocaml
Drup has quit [Ping timeout: 248 seconds]
ttamttam has joined #ocaml
ttamttam has quit [Client Quit]
Drup has joined #ocaml
thomasga has joined #ocaml
Drup has quit [Client Quit]
Drup has joined #ocaml
gal_bolle has joined #ocaml
f[x] has joined #ocaml
gnuvince has quit [Ping timeout: 252 seconds]
osa1 has joined #ocaml
dsheets has joined #ocaml
justdit has quit [Ping timeout: 264 seconds]
dsheets has quit [Ping timeout: 240 seconds]
f[x] has quit [Ping timeout: 240 seconds]
pootler_ has joined #ocaml
Kakadu has quit [Ping timeout: 256 seconds]
gnuvince has joined #ocaml
darkf has quit [Read error: Connection reset by peer]
darkf has joined #ocaml
breakds has joined #ocaml
tane has quit [Quit: Verlassend]
rixed has joined #ocaml
ttamttam has joined #ocaml
yacks has quit [Read error: Connection reset by peer]
yacks has joined #ocaml
osa1 has quit [Quit: Konversation terminated!]
Drup1 has joined #ocaml
Drup has quit [Ping timeout: 246 seconds]
<pippijn> in lwt, I want to send a PING message to a server every 2 minutes
<pippijn> but Lwt_timeout takes a (unit -> unit)
<pippijn> so that can't send things (it would need to return unit Lwt.t
dsheets has joined #ocaml
Kakadu has joined #ocaml
<gal_bolle> you could use Lwt.async, I guess
<pippijn> ah
<pippijn> yeah, that's good
<pippijn> actually I'm not sure how to write this
<pippijn> Lwt_engine.on_timer with repeat true?
<pippijn> that returns an event, can I ignore it?
<pippijn> apparently I can, because it works
f[x] has joined #ocaml
<companion_cube> Lwt_unix.sleep
<pippijn> hmm
travisbrady has joined #ocaml
pootler_ has quit [Ping timeout: 256 seconds]
travisbrady has quit [Client Quit]
<pippijn> companion_cube: https://paste.xinu.at/nEL9Dl/
<companion_cube> I suppose it's ok
<companion_cube> I don't know Lwt_engine
<pippijn> me neither
<pippijn> I just put the event in my env, so I could cancel it, if I wanted
<pippijn> feels bad losing it :)
<companion_cube> that's probably the most efficient ;)
travisbrady has joined #ocaml
<companion_cube> (using Lwt_engine)
dsheets has quit [Ping timeout: 248 seconds]
<pippijn> by the way, the protocol I'm implementing is incredibly bad
<pippijn> it is a text protocol that separates arguments with spaces
<pippijn> but it also supports some arguments that contain spaces
<pippijn> these are separated by tab
<companion_cube> ahah
<companion_cube> escaping, doin' it wrong
<pippijn> so consider this message protocol: LOGIN userName password cpu localIP {lobby name and version} [userID] [{compFlags}]
<pippijn> {foo} means "sentence" and that means "tab-separated"
<pippijn> so first you get LOGIN, space, a word, space, a word, ... until localIP, then space, then some stuff
<pippijn> and then userID, which is space separated from the lobby name and version
<companion_cube> someone give the author the spec of JSON
<pippijn> that's impossible :)
<pippijn> the spec is buggy
<pippijn> anyway, it really sucks, because the separator character changes halfway through the message
<companion_cube> awwww
<pippijn> so it's not like "split by space" and be done with it
<gasche> I think splitting is the wrong approach to parsing in any case
<companion_cube> it's ok for CSV
<gasche> you'll be more flexible writing a lexer
<pippijn> also not ok for csv
<gasche> as you can handle precisely this kind of lexically-activated lexing rule change
<companion_cube> pippijn: maybe with some kind of parser combinators (or yacc)?
<companion_cube> so you can try possibilities and keep the solution that parses exactly the whole line
<pippijn> companion_cube: hehe
* companion_cube fan of bencode for this stuff, now, it's so easy to parse
<pippijn> there are exponentially many parses for the LOGIN message
<pippijn> but that's ok, I'm just assuming it's {userID}
<pippijn> and the server assumes that, too, so it's fine
<companion_cube> pippijn: only in extreme cases with lots of tabs
<pippijn> by the way, that lexer is generated
csakatoku has joined #ocaml
raichoo has quit [Quit: leaving]
Yoric has quit [Ping timeout: 260 seconds]
<gasche> companion_cube: I wrote something vaguely related a few weeks ago
<gasche> (it's pretty dumb as an implementation, the point was solely to clarify the user-side code)
<companion_cube> interesting
<companion_cube> I vaguely recall that the implementation of the Logic monad is not totally trivial (for fairness reasons), but still
<gasche> note how *non*-monadic the 'bind' operator is
<companion_cube> yeah. it's more a map
<gasche> (it's just map, but used syntactically as a binding)
<companion_cube> and even an homeomorphism
<companion_cube> I think the monad approach is really interesting
<gasche> monadic bind allows you to have some part of the search behavior that is directed not by its structure, but by the values it computes
<gasche> if you don't *need* that, it's probably a bad idea to put it at the core of your system
<gasche> (that's the reason why people worked on Arrows when they realized monadic parsing combinators are not efficient)
<companion_cube> gasche: I think this kind of things can be useful in other cases, where you just have a few alternatives and want a solution
<companion_cube> kind of like a mini-prolog
<companion_cube> (mini-kankren?)
<companion_cube> gasche: but arrows seem even harder without syntactic sugar :/
<gasche> my use case for this library is to search a derivation for a given type
<gasche> the structure of the search space is entirely directed by the structure of the input type; which subderivations are found (or not) do not influence how other subderivations are searched for
<gasche> so it does not need the expressivity of a monad
<gasche> (I'm not sure most people understand this implication of having a monadic API)
<companion_cube> so you think it's really slower to use monads?
Drup1 has quit [Ping timeout: 264 seconds]
<gasche> as I said, in this particular case my implementation is really stupid anyway, so it's not really a performance reason (though it would become one would I decide to optimize the implementation)
<gasche> it's more than I don't want to *think* about the problem using an operation that is more powerful that what I really need
<companion_cube> sure, that's why it takes more effort, enough to make it a library ;)
<gasche> reasoning about imperative code is hard
<gasche> reasoning about code using the state monad is also hard, for exactly the same reason
<gasche> if you don't need to write code in this style, you should avoid it; and use a style where programs are expressed in a form that is easier to reason about
<companion_cube> gasche: I never said it's good to write everything in a monadic style
<gasche> I don't think we're in disagreement, I'm just trying to make my point clear
<companion_cube> just that sometimes, if you need a bit of non-determinism, a backtracking monad can be the best style
<gasche> companion_cube: do you have a realistic use case where you really need a monacid bing for backtracking?
<gasche> s/bing/bind/
<companion_cube> gasche: if you want to make a choice on 3 integers, and a choice on 2 strings?
<gasche> can you elaborate?
jdoles has joined #ocaml
<companion_cube> if you implement the well-known problem of Einstein (the houses, with pet owners etc.)
<companion_cube> you need to make several "kinds" of choice, iirc
<gasche> I see
<gasche> you mean the solution to some part of the search space impact the structure of other parts
<companion_cube> yes, it's for a product of choices
<companion_cube> one can have different choices on different types
pootler_ has joined #ocaml
eikke has quit [Ping timeout: 260 seconds]
spanish has quit [Quit: Leaving]
pootler__ has joined #ocaml
hkBst has quit [Quit: Konversation terminated!]
pootler_ has quit [Ping timeout: 264 seconds]
<companion_cube> wasn't there a IRC bot here, once?
<companion_cube> a bot that would evaluate OCaml
<adrien_oww> xavierbot
<adrien_oww> perl bot
<adrien_oww> and then there was another one
<companion_cube> but no one runs them? or are they outlawed? :)
cago has left #ocaml []
<companion_cube> brings me to http://www.cl.cam.ac.uk/projects/ocamllabs/news/ oO
<companion_cube> distributed actors library for OCaml, heh
mika1 has quit [Quit: Leaving.]
ttamttam has quit [Quit: ttamttam]
gautamc has quit [Read error: Connection reset by peer]
gautamc has joined #ocaml
ontologiae has quit [Ping timeout: 276 seconds]
dsheets has joined #ocaml
travisbrady has quit [Quit: travisbrady]
jknick has joined #ocaml
skchrko has quit [Quit: Leaving]
gnuvince has quit [Ping timeout: 252 seconds]
gnuvince has joined #ocaml
Drup has joined #ocaml
<nicoo> companion_cube: Thanks for ixCube, by the way. I'll try to have a look at the code when I have some more time.
<companion_cube> ixSet you mean? :)
<nicoo> Yes, sorry
* nicoo 's brain is overflowing with TeX right now.
beckerb has quit [Read error: Operation timed out]
raichoo has joined #ocaml
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
zpe has quit [Read error: No route to host]
zpe has joined #ocaml
zpe has quit [Read error: Connection reset by peer]
zpe has joined #ocaml
zpe has quit [Read error: Connection reset by peer]
eikke has joined #ocaml
zpe has joined #ocaml
<amiller_> i'm really not sure how to approach this goal of splicing in new code to the typed tree :/
<amiller_> the overlaoding blog example is pretty simple because it doesn't actually require creating much new code it just substitutes a single identifier for a choice of existing identifiers provided
<amiller_> basically i see two approaches one is to just generate a bunch of text source code and append it to the end of a file somewhere
zpe has quit [Read error: Connection reset by peer]
osa1 has joined #ocaml
zpe has joined #ocaml
osnr has quit [Quit: Leaving.]
zpe has quit [Read error: Connection reset by peer]
<amiller_> the other is to programmatically generate new functions and insert them that way
zpe has joined #ocaml
zpe has quit [Read error: Connection reset by peer]
zpe has joined #ocaml
zpe has quit [Read error: Connection reset by peer]
zpe has joined #ocaml
<amiller_> into the typedtree i mean
<amiller_> now that i think about it, a third approach is as follows
<amiller_> use the typedtree to figure out the appropriate types, and associate these types with locations
<amiller_> then i do my code splicing in just the *untyped* ast
zpe has quit [Read error: Connection reset by peer]
zpe has joined #ocaml
zpe has quit [Read error: Connection reset by peer]
zpe has joined #ocaml
zpe_ has joined #ocaml
zpe has quit [Read error: Connection reset by peer]
zpe_ has quit [Read error: Connection reset by peer]
zpe has joined #ocaml
Kakadu has quit [Quit: Konversation terminated!]
zpe has quit [Read error: Connection reset by peer]
zpe has joined #ocaml
UncleVasya has joined #ocaml
osa1 has quit [Ping timeout: 264 seconds]
zpe has quit [Ping timeout: 240 seconds]
travisbrady has joined #ocaml
emmanuelux has joined #ocaml
Yoric has joined #ocaml
thomasga has quit [Quit: Leaving.]
eikke has quit [Ping timeout: 276 seconds]
mcclurmc has quit [Ping timeout: 276 seconds]
darkf has quit [Quit: Leaving]
osa1 has joined #ocaml
Uvs has joined #ocaml
ollehar has quit [Ping timeout: 252 seconds]
<gnuvince> Is it possible to have "anonymous" record types in OCaml? Some like: type x = X of {a:int; b:float} ?
<amiller_> gnuvince, yes! variant types
<amiller_> oh
<ggole> Objects sort of let you do it
<ggole> But no, not really
<amiller_> i misread your eample
<ggole> Named constructor arguments would be nice.
UncleVasya has quit [Ping timeout: 268 seconds]
skchrko has joined #ocaml
speredenn has joined #ocaml
<gnuvince> ggole: so I need to start with type t = {a:int; b:float} and then type x = X of t
<gnuvince> thanks
Uvs has quit [Quit: Leaving]
ttamttam has joined #ocaml
UncleVasya has joined #ocaml
emmanuelux has quit [Quit: emmanuelux]
tane has joined #ocaml
osnr has joined #ocaml
osnr has quit [Changing host]
osnr has joined #ocaml
zpe has joined #ocaml
<jpdeplaix> gnuvince: yes, with objects you can do this like: « type x = X of <a:int; b:float> »
eikke has joined #ocaml
zpe has quit [Ping timeout: 248 seconds]
osnr has quit [Ping timeout: 252 seconds]
<nicoo> jpdeplaix: Btw, what would be the runtime overhead of objects, here ?
<mfp> and the related discussion about field disambiguation (which has already been implemented in trunk) http://caml.inria.fr/mantis/view.php?id=5759
eikke has quit [Ping timeout: 268 seconds]
<ggole> Records are an additional indirection: objects would have overhead on top of that.
eikke has joined #ocaml
<Drup> access the field of an object is almost equivalent as a lookup in an hashtable, a regular record is the same as a tuple (so 1 indirection on access).
eikke has quit [Ping timeout: 248 seconds]
eikke has joined #ocaml
troydm has quit [Quit: What is hope? That all of your wishes and all of your dreams come true? (C) Rau Le Creuset]
troydm has joined #ocaml
tani has joined #ocaml
tane has quit [Ping timeout: 264 seconds]
ggole has quit [Ping timeout: 248 seconds]
cthuluh has quit [*.net *.split]
malo has joined #ocaml
cthuluh has joined #ocaml
skchrko_ has quit [Ping timeout: 248 seconds]
justdit has joined #ocaml
eikke has quit [Ping timeout: 264 seconds]
ontologiae has joined #ocaml
osnr has joined #ocaml
ollehar has joined #ocaml
osnr has quit [Changing host]
osnr has joined #ocaml
justdit_ has joined #ocaml
justdit has quit [Read error: Connection reset by peer]
bkpt has joined #ocaml
justdit_ has quit [Ping timeout: 252 seconds]
breakds has quit [Quit: Konversation terminated!]
ttamttam has left #ocaml []
osnr has quit [Ping timeout: 264 seconds]
ttamttam has joined #ocaml
ttamttam has left #ocaml []
emmanuelux has joined #ocaml
<gasche> companion_cube: you did your documentation wrong: that should be inside ixSet.mli, in ocamldoc syntax, so that automatic generation (by e.g. Godi) shows that to users
<orbitz> what does Ix mean in the context of a set?
<gasche> companion_cube: ah the plural of "index" is generaly "indices"
<gasche> companion_cube: and if I can keep trolling you, you need a META file and #use "indexed-set";;
dsheets has quit [Read error: Operation timed out]
<gasche> (instead of a META you could also use an _oasis file)
<adrien> companion_cube: you have no META? and you're not using ocamlfind to compile either I guess?
<adrien> where's my whip?
gnuvince has quit [Remote host closed the connection]
ulfdoz has joined #ocaml
Drup has quit [Ping timeout: 256 seconds]
breakds has joined #ocaml
<gasche> "This page is temporarily in read-only mode due to heavy traffict"; reddit/ocaml!
<orbitz> unforautnely that doesn' mean much i suspect :)
<gasche> nah
tobiasBora has joined #ocaml
Kakadu has joined #ocaml
osnr has joined #ocaml
osnr has quit [Changing host]
osnr has joined #ocaml
pootler__ has quit [Ping timeout: 252 seconds]
Watcher7|off is now known as Watcher7
dsheets has joined #ocaml
Kakadu_ has joined #ocaml
osnr has quit [Ping timeout: 256 seconds]
UncleVasya_ has joined #ocaml
UncleVasya has quit [Ping timeout: 264 seconds]
pootler_ has joined #ocaml
ollehar has quit [Ping timeout: 252 seconds]
Drup has joined #ocaml
hto has joined #ocaml
raichoo has quit [Quit: leaving]
stevej has joined #ocaml
stevej has quit [Client Quit]
stevej has joined #ocaml
<amiller_> is the ocaml.precast.ast kind of AST the same as the one that untypeast.ml produces
_andre has quit [Quit: leaving]
gnuvince has joined #ocaml
<amiller_> i can't figure out how to use loc :/
<hnrgrgr> amiller_: no. Ocaml.Precast.Ast is a custom ast used by camlp4
Snark has quit [Ping timeout: 240 seconds]
<amiller_> hnrgrgr, do you think i can rely on the locations being the same
<amiller_> basically i am doing a type-directed transformations so i need to traverse the Typedtree to learn about the inferred types in some places, but then I want to go splice new code into some untyped AST using camlp4 quoting
<amiller_> so maybe my plan should be to traverse the typedtree, save whatever information i need in some database file or something, then make an camlp4 transformer that looks up in the database to know what translation to do
ollehar has joined #ocaml
clog has quit [Ping timeout: 240 seconds]
clog has joined #ocaml
clog has quit [^C]
clog has joined #ocaml
speredenn has quit [Quit: Leaving]
emmanuelux has quit [Ping timeout: 268 seconds]
<amiller_> still this AST_mapper in trunk should help
eikke has joined #ocaml
<ousado> for the untyped part it's great
<ousado> amiller_: ah, have you looked at merlin?
<amiller_> i'm pretty concerned i'm going to run into difficult case after difficult case, especially for essentially variant types where i have to make alternate versions of every type declaration and keep track of them
<amiller_> i don't know how i'll keep track of all the new names and how loose i can be with providing ghost locations for all the code
stomp has quit [Read error: Operation timed out]
stomp has joined #ocaml
<pippijn> is there a working example of Lwt_read_line completion?
malo has quit [Quit: Leaving]
<pippijn> also, when will debian get ocaml 4.00.1? there has been a release, where is the update?
polynomial2 has joined #ocaml
<polynomial2> can anyone tell me why I am getting this error? http://codepad.org/X1FBScum I thought scene_elem is supposed to be a variant?
breakds has quit [Quit: Konversation terminated!]
travisbrady has quit [Quit: travisbrady]
<polynomial2> nevermind got it
polynomial2 has quit [Client Quit]
mcclurmc has quit [Read error: Operation timed out]
osa1 has quit [Ping timeout: 256 seconds]
chambart has joined #ocaml
ulfdoz has quit [Ping timeout: 248 seconds]
venk has joined #ocaml
ontologiae has quit [Ping timeout: 252 seconds]
<amiller_> ugh where's pprintast in trunk
<amiller_> ah it's in parsing
osnr has joined #ocaml
osnr has quit [Changing host]
osnr has joined #ocaml
tani has quit [Quit: Verlassend]
tobiasBora has quit [Quit: Konversation terminated!]
<vext01> does anyone remember where the list comprehensions code moved to?
<vext01> a github repo oorc
<vext01> iirc
csakatoku has quit [Remote host closed the connection]
eikke has quit [Ping timeout: 276 seconds]
q66 has quit [Remote host closed the connection]
oriba has joined #ocaml
<ollehar> what do we call an instance of a record type? instance?
UncleVasya_ has quit [Quit: Leaving]
<troydm> ollehar: an instance of an record, or just simply record
<ollehar> roger
eikke has joined #ocaml
csakatoku has joined #ocaml
eikke has quit [Ping timeout: 246 seconds]
eikke has joined #ocaml