smimou changed the topic of #ocaml to: OCaml 3.08.3 available! | Archive of Caml Weekly News: http://sardes.inrialpes.fr/~aschmitt/cwn/ | A free book: http://cristal.inria.fr/~remy/cours/appsem/ | Mailing List: http://caml.inria.fr/bin/wilma/caml-list/ | Cookbook: http://pleac.sourceforge.net/
Gueben has quit [Excess Flood]
Gueben has joined #ocaml
Saulzar_ has joined #ocaml
vezenchio has quit ["\o/ in mochintin namocniuh \o/"]
Saulzar has quit [Read error: 60 (Operation timed out)]
Skal has quit ["Client exiting"]
Gueben has quit [Read error: 104 (Connection reset by peer)]
Revision17 has quit [Remote closed the connection]
threeve has quit []
Smerdyakov has joined #ocaml
Smerdyakov has quit ["I go"]
oliver__ has joined #ocaml
Saulzar_ has quit [Read error: 60 (Operation timed out)]
ramkrsna has joined #ocaml
UziMonkey has quit [Remote closed the connection]
pango_ has joined #ocaml
tennin has joined #ocaml
tre has joined #ocaml
pango has quit [Read error: 110 (Connection timed out)]
ramkrsna has quit [Read error: 110 (Connection timed out)]
__DL__ has joined #ocaml
tennin has quit [Read error: 113 (No route to host)]
petter_ has joined #ocaml
ski has joined #ocaml
mlh_ has quit [Client Quit]
UziMonkey has joined #ocaml
Skal has joined #ocaml
moea has joined #ocaml
<moea> hmm, i want to display an int64 in hexadecimal (i'm using In64.bits_of_float), but printf's %x wants a plain old int
<moea> sorry, found it, %Lx
UziMonkey has quit [Remote closed the connection]
UziMonkey has joined #ocaml
<moea> is there a list equivalent of String.create, something like List.init 'a' 4 to return ['a', 'a', 'a', 'a'] ?
<shrimpx> i don't think so
<shrimpx> SML does :)
<shrimpx> List.tabulate (4, #"a");
<shrimpx> anyway it's easy to write
<shrimpx> er in sml it's List.tabulate (4, fn _ => #"a");
<moea> i will write it, as an aside, is there any way to add the function to List inside ocaml, so i can define List.tabulate instead of list_tabulate
<mflux> no
<mflux> you could have List'.tabulate though ;)
<mflux> hmm, I wonder infact if you can
<mflux> but the idea should be clear ;)
<shrimpx> heh
<shrimpx> you can have module MyList = struct include List let tabulate ... end or somesuch thing. just implement it locally =)
<moea> thanks
<mflux> infact even module List = struct include List .. end works too ;)
<moea> cool!
<shrimpx> haha
<shrimpx> noooo
<mflux> I'm not sure if that's a favor to the guy reading the code after you though ;)
<shrimpx> we all hate that guy anyway
<shrimpx> he should get a better job
<mflux> that guy could be you..
<mflux> after a couple of years ;)
<shrimpx> yeah it's happened to me many times :)
<moea> maybe it's not functional, but extending the prototype to include new behaviour is something that seems natural to me, coming from other languages
<shrimpx> after cursing the guy who wrote that horrible spaghetti i realize it was me
<shrimpx> moea: can you really actually extend a module in "other languages"?
<mflux> c++ has namespaces
<mflux> java has packages
<shrimpx> ok i guess i see how you're relating things :)
<moea> shrimpx: ah, so List is an automatically imported module?
<shrimpx> no
<moea> i thought it was a "prototype", like in javascript you'd do List.prototype.tabulate = function...or in python you'd subclass a builtin type
<mflux> module List = .. doesn't exactly modify anything, it just creates a module with the same name, which renders the original module inaccessible
<shrimpx> List is just a module. you can define a new one with the same name, but that doesn't change List
<moea> ah, i get it
<shrimpx> much like variable declarations
<moea> i really like ocaml
<shrimpx> awesome
<shrimpx> alarm clock due to go off in 3 hours and 12 minutes
* shrimpx -> b3d
<moea> bye!
Zyroth has joined #ocaml
<Zyroth> how would I do a "wait until key pressed" in ocaml?
ski_ has joined #ocaml
ski has quit [Nick collision from services.]
ski_ is now known as ski
Gueben has joined #ocaml
mikeX has joined #ocaml
oliver__ is now known as Saulzar
<moea> still having trouble with this hex thing
<moea> is there an easy way to write a hexadecimal number to a file?
<Saulzar> Zyroth, Unix.poll on the stdin?
MySTiK333 has joined #ocaml
MySTiK333 has left #ocaml []
threeve has joined #ocaml
mikeX has quit ["Leaving"]
vezenchio has joined #ocaml
temo has joined #ocaml
temo has left #ocaml []
<mflux> to actually wait for any key on unix you would need to set the tty to some other mode
<mflux> as by default it is line buffered
<mflux> I don't recall the details though, so better check out some internet resources.. I think the Unix-module has everything you need though.
<pnou> you have to turn off the ICANON flag in the c_lflag of the termios structure (man tcgetattr)
Tipsy2 has joined #ocaml
ski has quit ["Monad morphisms and natural language semantics !"]
whee has joined #ocaml
pnou has quit ["brb"]
gvn has joined #ocaml
gvn is now known as ogn
Revision17 has joined #ocaml
joeytwiddle has quit [Read error: 104 (Connection reset by peer)]
Tipsy2 has quit []
Zyroth has quit ["(sleep) Weblog: http://zyroth.ggnore.net"]
Esine has joined #ocaml
Esine has left #ocaml []
moea has quit [Read error: 104 (Connection reset by peer)]
mauke has quit [Remote closed the connection]
cdutchyn has joined #ocaml
jussx has joined #ocaml
monochrom has joined #ocaml
jussx has quit ["leaving"]
znutar has joined #ocaml
joeytwiddle has joined #ocaml
znutar has quit [Read error: 110 (Connection timed out)]
Snark has left #ocaml []
znutar has joined #ocaml
Zyroth has joined #ocaml
Gueben has quit [Read error: 104 (Connection reset by peer)]
petter_ has quit [Read error: 110 (Connection timed out)]
_ogn has joined #ocaml
Zyroth has quit ["(sleep) Weblog: http://zyroth.ggnore.net"]
ogn has quit [Read error: 110 (Connection timed out)]
dan2 is now known as dan2_
dan2_ has quit [Excess Flood]
threeve has quit []
dan2_ has joined #ocaml
natv has joined #ocaml
threeve has joined #ocaml
znutar has quit [Read error: 110 (Connection timed out)]
vezenchio has quit ["\o/ in mochintin namocniuh \o/"]
ulfdoz has joined #ocaml
ulfdoz_ has quit [Read error: 110 (Connection timed out)]
__DL__ has quit ["Bye Bye"]
skylan_ has joined #ocaml
natv has quit [Read error: 110 (Connection timed out)]
skylan has quit [Connection timed out]
_ogn has quit [Remote closed the connection]