gildor changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml Meeting 2011 http://bit.ly/eaZi1C | OCaml 3.12.0 http://bit.ly/aNZBUp
<astory> ok, I'll see if I can install it then
<orbitz> get Batteries or Core
<astory> I thought I installed batteries, but apparently not
<astory> yeah, I had ocaml-batteries-included installed
<orbitz> so you just have to use the batteries Option then
<astory> apparently I'm not doing that right - do I have to specify it differently?
arubin has quit [Quit: arubin]
<astory> >.< I still can't import it
<orbitz> Are you using Ocamlfind to compile against it/load it into REPL?
<orbitz> topfind
<astory> I'm working on a project that uses ocamlfind somehow, but I don't know how it works
<astory> let me dig arounda bit
<orbitz> ocaml
<orbitz> #use "topfind";;
<orbitz> #list;; (* find batteires in ehre *)
<orbitz> #require "whatever-batteries";;
<orbitz> should have acecss to BatOption now
<astory> so I see batteries and batteries.(*a few things*) but nothing in x-batteries format
<orbitz> then #require "batteries"
<astory> got it
<astory> so how do I transfer that to a file?
<orbitz> ocamlfind does it for you as long as batteries is in the list of libraries to ocmpile against
<astory> hmm, omake isn't finding it; where is that list of libraries kept?
<orbitz> dunno, never used omake
<astory> ok, thanks for all the help!
<orbitz> np
<orbitz> godspeed
<astory> ah, had to append to OCAMLPACKS[]
<orbitz> sounds right
smerz has quit [Quit: Ex-Chat]
lopex has quit []
qqmrw has joined #ocaml
<orbitz> thelema_: aaaah i just figure dout where your name comes from
mjambon has quit [Quit: Leaving.]
<thelema_> orbitz: really? where's that?
<thelema_> oh, probably the other name
<orbitz> Aleister Crowley
<thelema_> yes, that's where "thelema" comes from.
<orbitz> I'm reading teh Illumanatus Trilogy and decided ot read Crowley's wiki page
<thelema_> not that it's a huge secret: http://en.wikipedia.org/wiki/Thelema
<thelema_> Mmmm, I remember reading the Illuminatus trilogy a *long* time ago...
<orbitz> It's fun, a bit jarring though
<thelema_> yup.
elehack has joined #ocaml
ankit9 has quit [Read error: Connection reset by peer]
<thelema_> elehack: hi
thelema_ is now known as thelema
<elehack> thelema_: hi
<thelema> elehack: have you tried out the new map/set code from bluestorm?
<elehack> no
<thelema> ok, I tried it in some of my code, and while I didn't have time to track down the cause, I think it might not be correct.
<thelema> i.e. when I upgraded to the new code, I got wierd bugs that disappeared when I reverted batteries to the commit before merging his code.
<thelema> I want to see if I'm just doing something crazy
<thelema> If you get a chance, let me know how it turns out.
<elehack> ok.
<elehack> Unfortunately, I don't think my easily-testable code uses sets or maps much, but I'll let you know if I find problems.
enthymeme has quit [Quit: rcirc on GNU Emacs 23.1.1]
<elehack> thelema: I'm seeing test failures in (P)Map with the latest Git code.
Fullma has quit [Read error: Operation timed out]
<thelema> elehack: yes, bluestorm said those might be bugs n his tests, as he was really doing wacky things in those tests
<elehack> kk. they do look strange, but like a pretty good way to go about testing what he's testing.
sepp2k has quit [Quit: Leaving.]
cthuluh has quit [Quit: kexec]
rwmjones has quit [Ping timeout: 246 seconds]
qqmrw is now known as q[mrw]
cthuluh has joined #ocaml
arubin has joined #ocaml
joewilliams is now known as joewilliams_away
enthymeme has joined #ocaml
Tobu_ has joined #ocaml
Tianon has quit [Ping timeout: 248 seconds]
Tobu has quit [Ping timeout: 248 seconds]
Tianon has joined #ocaml
Tianon has quit [Changing host]
Tianon has joined #ocaml
q[mrw] has quit [Ping timeout: 252 seconds]
elehack has quit [Quit: Farewell, programs.]
joewilliams_away is now known as joewilliams
thoughtfiz has quit [Read error: No route to host]
joewilliams is now known as joewilliams_away
philtor has joined #ocaml
emmanuelux has quit [Quit: =>[]]
philtor has quit [Ping timeout: 258 seconds]
ulfdoz has joined #ocaml
ymasory has quit [Quit: Leaving]
lamawithonel has quit [Read error: Connection reset by peer]
ski has quit [Ping timeout: 246 seconds]
lamawithonel has joined #ocaml
ymasory has joined #ocaml
ski has joined #ocaml
ulfdoz has quit [Ping timeout: 276 seconds]
bitbckt_ has joined #ocaml
mehdid has quit [Ping timeout: 246 seconds]
bitbckt has quit [Ping timeout: 246 seconds]
adrien has quit [Ping timeout: 246 seconds]
adrien_ has joined #ocaml
enthymeme has quit [Quit: g'night]
mehdid has joined #ocaml
rrenaud has joined #ocaml
<rrenaud> is there an ocaml interpretter with readline builtin (or some other nice keybindings?)
<rrenaud> google says run 'ledit ocaml'
<rrenaud> cool
Yoric has joined #ocaml
arubin has quit [Quit: arubin]
larhat has joined #ocaml
ftrvxmtrx has quit [Quit: Leaving]
Snark has joined #ocaml
ttamttam has joined #ocaml
Yoric has quit [Quit: Yoric]
ftrvxmtrx has joined #ocaml
thomasga has joined #ocaml
yezariaely has joined #ocaml
yezariaely has left #ocaml []
ikaros has joined #ocaml
larhat has quit [Quit: Leaving.]
ymasory has quit [Quit: Leaving]
myu2 has quit [Ping timeout: 248 seconds]
edwin has joined #ocaml
orbitz has quit [Read error: Operation timed out]
orbitz has joined #ocaml
larhat has joined #ocaml
rwmjones has joined #ocaml
Cyanure has joined #ocaml
<gildor> is it me or polymorphism method with object in OCaml are just not doable ?
<gildor> polymorphic method
Cyanure has quit [*.net *.split]
rrenaud has quit [*.net *.split]
Tobu_ has quit [*.net *.split]
npouillard has quit [*.net *.split]
rossberg has quit [*.net *.split]
eye-scuzzy has quit [*.net *.split]
jld has quit [*.net *.split]
sgnb has quit [*.net *.split]
Cyanure has joined #ocaml
rrenaud has joined #ocaml
Tobu_ has joined #ocaml
npouillard has joined #ocaml
rossberg has joined #ocaml
eye-scuzzy has joined #ocaml
jld has joined #ocaml
sgnb has joined #ocaml
<mrvn> gildor: it is possible but you might have to jump through some hoops.
<mrvn> ODBPkgVer.t isn't a 'e
adlsaks has joined #ocaml
ankit9 has joined #ocaml
<flux> gildor, the problem is that one type cannot match 'for all' types
<flux> gildor, maybe you can preserve the polymorphicity in the interface?
<mrvn> or make it a ['a] class.
<flux> given the function prototype I don't think it's what he wants..
larhat has quit [*.net *.split]
adrien_ has quit [*.net *.split]
Tianon has quit [*.net *.split]
cthuluh has quit [*.net *.split]
<gildor> ['a] class won't work, because with_file_in should return either ODBPkgVer.t or ODBPkg.t
<gildor> and 'a will become one or the other ASA I use the class
<mrvn> and that can't be decided when you create the class?
<gildor> flux: I already did the 'a. stuff that enable polymorphicity
<gildor> but the type unification beginning by guessing the object type and try to merge it with existing
<mrvn> gildor: you might have to lift some variables to get the 'a back
<gildor> mrvn: no, this is a FS that contains files which contains the two datastructure
larhat has joined #ocaml
adrien_ has joined #ocaml
Tianon has joined #ocaml
cthuluh has joined #ocaml
<gildor> mrvn, flux: I am now in the process of moving the 'a method outside of the class
<mrvn> The question is why it sees (Lwt_io.input_channel -> ODBPkgVer.t Lwt.t) instead of (Lwt_io.input_channel -> 'a Lwt.t) there
<gildor> mrvn: type unification, the original method (from std_ro class) is 'a
<gildor> the more I use object in ocaml, the less I like them
myu2 has joined #ocaml
<mrvn> they do have some strange quirks with the type system.
<mrvn> But doing inheritance with records is also a big pain.
<mrvn> (or dirty)
<gildor> mrvn: indeed, I am not using object just for fun, I need them because in my case, they are useful
<larhat> mrvn: btw, could i give me some links to read about "inheritance with records". i'd like to see that
<gildor> mrvn: I will inherit a git filesystem and a "cache" filesystem
Oejet has quit [Quit: Leaving.]
<mrvn> larhat: quick and dirty you can do stuff like: type base = { x:int; } type foo = { x:int; y:int; } let as_base (foo:foo) = ((Obj.magic foo):base)
oriba has joined #ocaml
<larhat> oh, Obj.magic
<gildor> no Obj.magic !!!
<gildor> verboten
<gildor> ;-)
<gildor> BTW, look like a C trick
<mrvn> you can do without Obj.magic more with 'a. 'a -> ... syntax and using 2 records in combination to hide internal types but it gets realy complex. There are some posts about universal types on the ML.
ftrvxmtrx has quit [Ping timeout: 276 seconds]
<mrvn> type ['a] base = { x;int; more:'a; } type foo = int base ... types work too.
ftrvxmtrx has joined #ocaml
<mrvn> with inheritance chains you then quickly get x.more.yetmore.stillmore.z
<larhat> i'm now reading about 3.12 features and about its applications (all hail to oleg! :-) ) . what do you think of it http://paste.in.ua/2061/ ?
<flux> gildor, when dealing with polymorphic methods, it's useful to annotate function arguments/return values that return such objects. are you doing that?
<mrvn> larhat: that module stuff will probably help with replacing objects in many cases too.
<mrvn> .oO(When will 3.12 be in Debian?)
<larhat> mrvn: yes, i'm choosing exactly between modules and objects
<larhat> module stuff looks too heavy, i think :-(
<rproust> larhat: for the particular "Show" example, the "deriving" (and "deeriving-ocsigen" branch) syntax extension is really handy
<rproust> that's only for this particular use
<rproust> gildor: flux is right, it is often usefull to add type information along with the method
<mrvn> When I get such an error I allways annotate types till I find the place that causes the error.
<rproust> it duplicates (and sometimes triplicates) type information in the sourcce…
<mrvn> Once the problem is fixed you can remove them again
oriba has quit [Quit: Verlassend]
<flux> mrvn, I do the same ;)
Yoric has joined #ocaml
<mrvn> Sometimes I wish for an interactive type inference. Show me the source with the infered types and for every expression let me pick&choose the type and rerun the inferecne.
<flux> hmm, idea. I could hack annotator (the tool that inlines type information into source files per .annot information) into supporting emacs such that I could mark a region and it would annotate only that region..
<rproust> mrvn: sounds like a great IDE thingy
<flux> although I guess most of the time your source wouldn't be in compiling order anyway, unless you put in some asserts
<flux> mrvn, you're aware of the emacs and vi type throwback feature?
<flux> (that works with the .annot files)
<mrvn> flux: + select an expression and then alter the type, e.g. inference shows 'a foo bar and you change it to 'a t and rerun
<flux> mrvn, well, you would be able to do that because it would just put the types into your code
<flux> so you could change it and recompile
Yoric has quit [Read error: Connection reset by peer]
<flux> but the trick is that you need to be able to compile it (atleast up to certain point)
Yoric has joined #ocaml
<mrvn> flux: yeah. that put into the code should be temporary and the compile automatic.
<mrvn> flux: I don't worry about types until I have something that should compile.
<mrvn> What would also often help is that the type inference should start with the bits I told it and then tell me where else it doesn't match. I.e. the place where the type is actully wrong instead of where the type inference runs into a wall.
<flux> one thing I've though of would be allowing compilation of programs that have type errors, but change the type error parts to "assert false"
<gildor> flux, rproust: yes argument are annotated
<gildor> mrvn: there is a pending request to debian-release to start the OCaml 3.12 transition in Debian
<gildor> mrvn: no news so far
<mrvn> gildor: yeah. I was just wishing they would.
<mrvn> they could just upload it to experimental.
<gildor> mrvn: sgnb has created an external repository with 3.12 packages
Fullma has joined #ocaml
<mrvn> nice
lopex has joined #ocaml
adrien_ is now known as adrien
ikaros has quit [Quit: Leave the magic to Houdini]
rgrig has joined #ocaml
sepp2k has joined #ocaml
coucou747 has joined #ocaml
<philed`> flux: Is there anything like F#'s intellisense type-inference for Ocaml?
<flux> philed`, I doubt that, as ocaml type inference works only for complete programs (although I'm not familiar with F#'s intellisense)
philed` is now known as philed
<philed> It's pretty tasty. You can be half-way through writing a function definition, put the mouse over an identifier, and it will tell you the type it has currently inferred for it, even if the larger expression is incomplete.
<philed> David Matthews was in our dept for a bit recently, and he and another guy hacked up something even better in Poly/ML where you could highlight whole subexpressions and get the inferred type at that point.
<flux> well, you can do that after compilation
<flux> in emacs I can prses C-c C-t and get the type of any expression (or subexpression)
<flux> it's quite useful indeed
<flux> it requires the compiler to generate the type information with -dtypes, but unfortunately the inference process stops once there is an error
<larhat> afaik, intellisense built in studio, which used its own algorithm for intellisense, and don't use compiler information. so it cannot be used with different extensions (see http://tomasp.net/blog/fsharp-variations-joinads.aspx )
<flux> the partial .annot file is stil there
<flux> there should be a ocaml compiler daemon that could be fed new code and it could resume compilation from any given point and produce annotate AST out :)
<flux> it could store the state of compliation into continuations, so it wouldn't need to recompile everything alwyas
<flux> it would need to compile everything after a point, though..
<mrvn> flux: compiling a file is so fast it hardly matters that you restart at the top
<philed> The thing is, is that I sometimes lose track of typing while I'm writing a function, so it's nice to have something that can do the inference live.
<flux> mrvn, sort of true I guess
<flux> philed, sometimes I do that by inserting 'assert false' and the compiler will infer the type for me
<mrvn> flux: I frequently use (* FIXME *) assert false;
<mrvn> or (* FIXME *) dummy-type
<mrvn> let fixme () = if true throw FIXME; Obj.magic 0 ??
<mrvn> seen something like that somewhere in the past
coucou747 has quit [Ping timeout: 252 seconds]
<flux> why not simply throw FIXME?-o
<mrvn> don't ask me
coucou747 has joined #ocaml
Cyanure has quit [Read error: Operation timed out]
npouillard has quit [Read error: Operation timed out]
npouillard has joined #ocaml
Cyanure has joined #ocaml
sgnb has quit [Read error: Operation timed out]
eye-scuzzy has quit [Read error: Operation timed out]
jld has quit [Read error: Operation timed out]
sgnb has joined #ocaml
jld has joined #ocaml
eye-scuzzy has joined #ocaml
rossberg has quit [Read error: Operation timed out]
rossberg has joined #ocaml
Tobu_ has quit [Read error: Operation timed out]
Tobu has joined #ocaml
SEcki has joined #ocaml
vivanov has joined #ocaml
ikaros has joined #ocaml
dnolen has joined #ocaml
adlsaks has quit [Ping timeout: 260 seconds]
Yoric has quit [Read error: Connection reset by peer]
Yoric has joined #ocaml
flux has quit [Read error: Connection reset by peer]
flux has joined #ocaml
larhat has quit [Read error: Connection reset by peer]
larhat has joined #ocaml
Znudzon has joined #ocaml
Poet_ has joined #ocaml
Znudzon has quit [Ping timeout: 264 seconds]
dnolen has quit [Quit: dnolen]
emmanuelux has joined #ocaml
<gildor> question to object specialist
<thelema> gildor: are you still having problems with polymorphic methods?
<gildor> I have a type 'a t = { fs: 'a }
<gildor> and I want to say that fs can be either std_ro or std_rw
<gildor> knowing that std_rw inherit std_ro
<gildor> how could i say that
thelema_ has joined #ocaml
<gildor> thelema: no I just move the polymorphic method out of the class, works better
<thelema_> ah, good. An explicit annotation would also fix the problem
<thelema_> (probably)
<gildor> thelema: I add a quick look to other people code (like ocamlnet) and found no common use of polymorphic method for classes
<gildor> thelema: and I understand why, it seems very tricky to get them working
<thelema_> yup.
* gildor thinks that type inference stops at the door of OO
<thelema_> pretty close. Type inference within objects seems a totally different beast than normal
<thelema_> and the types of ocaml objects are just horrendous.
thelema has quit [Ping timeout: 276 seconds]
<thelema_> mixing them with functors? one would go insane
thelema_ is now known as thelema
<gildor> would prefer to stay away from this kind of frankenstein
<gildor> (frankenstein = a mix of dead bodies bring back to life)
<thelema> yes
<gildor> maybe will found an answer in lablgtk
<thelema> gildor: can I get some clarification on your question?
<thelema> The 'a t = {fs : 'a} -- when you get the value from the fs field, what do you want to do with it?
<thelema> you want it to be an object and to call methods on it?
<gildor> fs should be an object of at least "class std_ro"
<thelema> well, you can't do anything to that object that you couldn't do to a std_ro, so why not just have it be exactly that type and cast other objects into that type?
<thelema> or because you want to keep the 'a polymorphic so sometimes you can use more than that type?
<gildor> thelema: there are some operation that will require it to be a std_rw object
<thelema> will it ever be required to be more than a std_rw object?
<gildor> i.e. fs#file_exists need only std_ro bu fs#open_out need std_rw
<gildor> no, either std_ro or std_rw, other object will be casted to one of this type
<thelema> so why can't you leave it polymorphic, and let the type system infer the right object types needed?
<adrien> mixing objects and functors didn't seem to work very well when I tried it :P
<gildor> because it fails
<gildor> but the type system is right, 'a t is too general (in .mli) for < exists : ...> t, I just need to understand how to express the constraint
Darkstar45 has joined #ocaml
<thelema> hmmm
<gildor> what about " type 'a t constraint 'a = #std_ro;;"
rgrig has quit [Quit: Leaving]
ymasory has joined #ocaml
* gildor exploring the outlands
<thelema> gildor: you're specifying the type of file_exists? (in the .mli file)?
<gildor> file_exists is a method of the class std_ro
<gildor> (and std_rw by inheritance
<gildor> )
<thelema> oh... ewww...
<thelema> nono... not exists, file_exists
<thelema> val file_exists :
<thelema> not < exists : string -> 'a Lwt.t; .. >
Darkstar45 has left #ocaml []
<gildor> I am near a solution
<thelema> gildor: is file_exists a value or a method?
<gildor> I think it is ok: http://pastebin.com/k8tJSmKJ
<gildor> gildor: file_exists is a method of std_ro
coucou747 has quit [Ping timeout: 250 seconds]
Cyanure has quit [Remote host closed the connection]
lopex has quit []
<thelema> gildor: it looks to me like "exists" is the method of std_ro, and the function it's being used in is "file_exists"
Cyanure has joined #ocaml
joewilliams_away is now known as joewilliams
<gildor> thelema: indeed, there was an error, I corrected it
<gildor> (damn to the type displayed by ocamlc error)
<thelema> I still don't see why ocaml can't specialize 'a t to the correct type
<hcarty> rrenaud: rlwrap is a nice alternative to ledit, and the Lwt library comes with a custom toplevel which performs context-appropriate tab completion.
<gildor> thelema: that is mainly a matter of being able to express it in .mli, the .ml should work fine
<thelema> gildor: what does ocamlc -i say?
ftrvxmtrx has quit [Quit: Leaving]
larhat has quit [Quit: Leaving.]
<gildor> thelema: http://pastebin.com/Ci9taYsN (the ocamlc -i, partial output)
<gildor> thelema: the type are guessed correctly, and I lifted the constraint
<gildor> thelema: but my problem was mainly how to express in a short way the std_ro constraint in .mli
<thelema> the constraint on the return type?
<gildor> the "constraint 'a = std_ro"
<thelema> Next time I'll point you to the constraint solution sooner
<thelema> It's usually not a good idea - just let the function determine its own constraint on the 'a
<thelema> did you finally decide on type 'a t = {fs: 'a} constraint 'a = std_ro?
<gildor> yes
<gildor> it works well in my case
scooty-puff has joined #ocaml
<thelema> ok
lopex has joined #ocaml
Modius has quit [Ping timeout: 248 seconds]
Derander has quit [Ping timeout: 250 seconds]
ptrf has quit [Ping timeout: 250 seconds]
ptrf has joined #ocaml
Poet_ has quit [Ping timeout: 264 seconds]
Derander has joined #ocaml
coucou747 has joined #ocaml
scooty-puff has quit [Quit: Leaving]
caligula__ has joined #ocaml
Asmadeus_ has joined #ocaml
Asmadeus has quit [Ping timeout: 250 seconds]
caligula_ has quit [Ping timeout: 250 seconds]
myu2 has quit [Ping timeout: 250 seconds]
noj has quit [Ping timeout: 250 seconds]
__marius__ has quit [Ping timeout: 250 seconds]
bitbckt_ is now known as bitbckt
noj has joined #ocaml
bitbckt has quit [Changing host]
bitbckt has joined #ocaml
joewilliams has quit [Ping timeout: 250 seconds]
__marius__ has joined #ocaml
myu2 has joined #ocaml
joewilliams has joined #ocaml
hcarty_ has joined #ocaml
jlouis_ has joined #ocaml
_nejimban has joined #ocaml
hcarty has quit [*.net *.split]
jlouis has quit [*.net *.split]
nejimban has quit [*.net *.split]
_nejimban is now known as nejimban
hcarty_ is now known as hcarty
Yoric has quit [Quit: Yoric]
ftrvxmtrx has joined #ocaml
<thelema> mfp: http://code.google.com/p/dapper-dot-net/ (related to your sql interface)
avsm has joined #ocaml
jamii has joined #ocaml
Obfuscate has quit [Quit: A poorly written script will replace me shortly.]
Obfuscate has joined #ocaml
ttamttam has quit [Remote host closed the connection]
ulfdoz has joined #ocaml
Yoric has joined #ocaml
alexyk has joined #ocaml
vivanov has quit [Quit: Lost terminal]
<alexyk> thelema: how can I create an enum from a single value? Use case: E.append (L.enum [myVal]) prevEnum...
<thelema> E.singleton?
<alexyk> aha!
<thelema> val singleton : 'a -> 'a t
<thelema> Create an enumeration consisting in exactly one element.
<alexyk> I also had a bug or caveat where File.lines_of had to be forced
<alexyk> I worked it in Enum.iter later, and nothing happened until I cloned the enum to inspect it
<alexyk> cloning had the effect of forcing
<alexyk> and just forcing fixed thr problem
daver_ has joined #ocaml
<thelema> odd. It has worked for me many times without forcing
<thelema> I wonder if the file was disappearing or something
<thelema> Maybe it's sufficient to peek at the first value?
<alexyk> thelema: the file is in place fince
<alexyk> fine
<alexyk> or, rather, I force an Enum.map result from FIle.lines_of
<daver_> noob ocaml sdl question: i've installed the system ocaml dev stuff from the ubuntu 10 repos; what's the correct command line, without using a magic makefile, to compile the first example on this page: http://wiki.njh.eu/OCaml_and_SDL
<thelema> is the same.
<daver_> it's almost: "ocamlopt -o test -I /usr/lib/ocaml/sdl -cclib -lsdlstub -cclib -lSDL test.ml" but not quite
<thelema> daver_: ocamlfind ocamlopt -package bigarray,sdl -ccopt +sdl test.ml -o test
philtor has joined #ocaml
<thelema> although the -ccopt +sdl should already be part of the -package sdl
<thelema> as well as the dependency on bigarray
<daver_> "No implementations provided for the following modules: Sdl referenced from test.cmx"
<thelema> grr, garbage.
<alexyk> thelema: E.peek doesn't solve it. Heres the fragment -- I wonder if mikmatch has an effect or what: http://paste.pocoo.org/show/366046/
<alexyk> E.force works OK
<thelema> daver_: ocamlfind ocamlopt -linkpkg -package sdl test.ml -o test
<thelema> forgot the -linkpkg, looked up the meta file ane the rest of the options aren't needed
<thelema> s/forgot/I forgot/
<thelema> s/ane/and/
<thelema> daver_: ?
<thelema> alexyk: I don't think mikmatch has any effect.
<thelema> I have no idea why forcing/cloning has any effect.
<alexyk> thelema: true... nothing unusual here, right? The file is very small, just 200 lines. Maybe it needs buffering or something?
<alexyk> ok...
<thelema> shouldn't be a buffering thing at all.
<alexyk> the exciting uncertainty of programming)
<thelema> how do you use rows?
<thelema> E.iter (fun x -> something) rows?
<alexyk> I stick them into a hash table right away... yes, E.iter
<thelema> very odd.
fschwidom has joined #ocaml
<alexyk> thelema: here's with E.iter: http://paste.pocoo.org/show/366055/
<thelema> alexyk: btw, you probably want to use a variant type instead of testing for "dreps" twice.
* thelema needs to make a modify_def function for Hashtbl too like in map
<alexyk> yeah
<alexyk> later...
alexyk has quit [Quit: alexyk]
<thelema> hmm, I wonder if it might have something to do with the eol in the mikmatch... but I guess if that didn't match, it'd raise an exception...
thelema_ has joined #ocaml
<daver_> thelema: thanks for your help, that last one worked!
<thelema_> daver_: you're welcome.
<thelema_> next time I'll get it on the first try.
thelema has quit [Ping timeout: 252 seconds]
enthymeme has joined #ocaml
daver_ has left #ocaml []
Snark has quit [Quit: Ex-Chat]
jamii has quit [Quit: Leaving]
mfp has quit [Ping timeout: 246 seconds]
mfp has joined #ocaml
fschwidom has quit [Remote host closed the connection]
jlouis_ is now known as jlouis
smerz has joined #ocaml
Tobu has quit [Read error: Operation timed out]
Tobu has joined #ocaml
alexyk has joined #ocaml
Cyanure has quit [Remote host closed the connection]
ymasory has quit [Quit: Leaving]
<alexyk> thelema_: I forgot, with List.print and such, how do we setup oc so we print into a string instead?
<thelema_> val to_string : (string output -> 'a -> unit) -> 'a -> string
thelema has joined #ocaml
<thelema> ((List.print Int.print) |> to_string) [3;4;5] = "3;4;5
<thelema> well, "[3;4;5]"
<alexyk> thelema_: ah yes
<alexyk> thanks!
<thelema> hmm, the type on that seems wierd...
<thelema> If you want to print a bunch of things to a single string, use IO.output_string ()
<thelema> to create your output
thelema_ has quit [Ping timeout: 276 seconds]
<alexyk> kk
bbc has joined #ocaml
bbc has quit [Client Quit]
schmx has quit [Quit: leaving]
schme has joined #ocaml
schme has quit [Client Quit]
schme has joined #ocaml
rwmjones has quit [Ping timeout: 260 seconds]
ymasory has joined #ocaml
alexyk has quit [Quit: alexyk]
ymasory has quit [Quit: Leaving]
ski has quit [Ping timeout: 246 seconds]
rwmjones has joined #ocaml
rixed has quit [Ping timeout: 246 seconds]
rixed has joined #ocaml
ski has joined #ocaml
edwin has quit [Remote host closed the connection]
ulfdoz has quit [Read error: Operation timed out]
alexyk has joined #ocaml
rwmjones has quit [Ping timeout: 246 seconds]
thomasga has quit [Quit: Leaving.]
adlsaks has joined #ocaml
rwmjones has joined #ocaml
rwmjones has quit [Ping timeout: 248 seconds]
Yoric has quit [Quit: Yoric]
SEcki has quit [Remote host closed the connection]
enthymeme has quit [Quit: rcirc on GNU Emacs 23.1.1]
alexyk has quit [Ping timeout: 260 seconds]
ikaros has quit [Quit: Leave the magic to Houdini]
ymasory has joined #ocaml
rwmjones has joined #ocaml
alexyk has joined #ocaml
adlsaks has quit [Ping timeout: 258 seconds]
Amorphous has quit [Read error: Connection reset by peer]
emmanuelux has quit [Quit: =>[]]
emmanuelux has joined #ocaml
Amorphous has joined #ocaml
sepp2k has quit [Quit: Leaving.]