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)]