<Schmurtz>
not an expert, just a user for a few months
<Schmurtz>
bye (it's time to sleep here...)
<tspier2>
Night
<tspier2>
Argh
<tspier2>
I can't understand scanf in OCaml.
* zmdkrbou
doesn't like Scanf and Printf modules in ocaml
<tspier2>
zmdkrbou, this may be a bit to ask, but do you think you could help me with it?
<pango>
# Scanf.bscanf Scanf.Scanning.stdib "%dh%dm%ds" (fun h m s -> ((h * 60) + m) * 60 + s) ;;
<pango>
5h30m10s
<pango>
- : int = 19810
<tspier2>
pango, let's say I wanted to prompt the user for their name. Can you give me an example for that?
<pango>
you don't need Scanf for that
<pango>
Pervasives would be more than enough
<tspier2>
What if I want to check if their input is something else though?
<tspier2>
Wouldn't I need Scanf for that?
<pango>
there's more than one way to parse user input, Scanf is just one of those ways
<pango>
you can also read everything as a string an parse it yourself
<pango>
# print_string "What's your name ? "; let name = read_line () in Printf.printf "Hello, %s.\n" name ;;
<tspier2>
Oh, okay. Now I understand the read_line () function. Thanks.
_fab has quit [Remote closed the connection]
jgrimes has joined #ocaml
Submarine has joined #ocaml
Submarine has quit ["Leaving"]
Submarine has joined #ocaml
dylan has quit [Read error: 104 (Connection reset by peer)]
dylan has joined #ocaml
Vratha_ has quit ["Leaving"]
<tspier2>
pango and Schmurtz, thanks for the help tonight.
tspier2 has left #ocaml []
khaladan has quit [Read error: 104 (Connection reset by peer)]
<twobitsprite>
# let gram = Grammar.gcreate (Plexer.gmake ());;
<twobitsprite>
Reference to undefined global `Plexer'
<twobitsprite>
that command is straight out of the campl4 tutorial
<mikeX>
maybe '#use "plexer.cma"'
<mikeX>
or '#load
<mikeX>
i always mix them up
<twobitsprite>
can't find the file
<twobitsprite>
(I'm in the top-level btw... do I need to recompile?)
<mikeX>
dunno :/
<twobitsprite>
does it work for you?
<twobitsprite>
the tutorial doesn't say anything about having to load anything...
<dylan>
Okay, so, acpi support on this turion laptop is insane...
<mikeX>
twobitsprite: never tried lexers etc, too tired to do so now
<mikeX>
dylan: manufacturer?
<twobitsprite>
mikeX: thanks anyways...
<twobitsprite>
dylan: you have any idea why I can't access Plexer.gmake?
<mikeX>
my fujitsu-siemens is acting kinda weird too, when it comes to cpu scaling
<dylan>
mikeX: HP for the laptop. The chipset of the motherboard is ati.
<mikeX>
i see,my chipset is via :P
<mikeX>
i have an ati gfx card though, it sucks big time
mikeX has quit [Read error: 110 (Connection timed out)]
bzzbzz has quit ["leaving"]
Submarine has quit [Read error: 110 (Connection timed out)]
bzzbzz has joined #ocaml
rshea has joined #ocaml
rshea has left #ocaml []
Banana has joined #ocaml
slipstream has joined #ocaml
slipstream-- has quit [Read error: 104 (Connection reset by peer)]
khaladan has joined #ocaml
xanavim has joined #ocaml
Smerdyakov has quit ["Leaving"]
Ag_47 has joined #ocaml
<Ag_47>
hippl
Ag_47 has left #ocaml []
<xanavim>
what text editors do you guys use?
theArthur has joined #ocaml
ski_ has joined #ocaml
levi has joined #ocaml
ski has quit [Read error: 110 (Connection timed out)]
pauld has joined #ocaml
<xanavim>
is there a text editor that is better suited to program in ocaml? better integrated with it?
<levi>
I'm using emacs with tuareg-mode
* xanavim
looks at tuareg-mode
xanavim has quit ["This hacker has fallen asleep"]
Banana has quit [Remote closed the connection]
Banana has joined #ocaml
ski_ is now known as ski
pango is now known as pangoafk
Banana has quit [Read error: 113 (No route to host)]
pangoafk is now known as pango
_fab has joined #ocaml
levi has quit []
joshcryer has joined #ocaml
mattam has joined #ocaml
Skal has joined #ocaml
Amorphous has quit ["arg... must... shutdown... computer burnin..."]
joshcryer has quit [Client Quit]
Amorphous has joined #ocaml
love-pingoo has joined #ocaml
Tachyon76 has joined #ocaml
Tachyon76 has quit ["Leaving"]
ktne has joined #ocaml
bluestorm has joined #ocaml
mikeX has joined #ocaml
gim has quit [Remote closed the connection]
ellisonch has quit [Client Quit]
Schmurtz has quit [Read error: 104 (Connection reset by peer)]
Schmurtz has joined #ocaml
levi has joined #ocaml
levi_ has joined #ocaml
levi has quit [Nick collision from services.]
levi_ is now known as levi
love-pingoo has quit ["Leaving"]
khaladan has quit [Read error: 104 (Connection reset by peer)]
Smerdyakov has joined #ocaml
mrsolo_ has quit [Success]
mrsolo_ has joined #ocaml
Submarine has joined #ocaml
gim has joined #ocaml
vodka-goo has joined #ocaml
pango is now known as pangoafk
smimou has joined #ocaml
pangoafk is now known as pango
illya23b has joined #ocaml
Banana has joined #ocaml
illya23b has quit [Client Quit]
ibomash has joined #ocaml
vodka-goo is now known as love-pingoo
ibomash is now known as illya23b
<mikeX>
I'm trying to figure out where O'Caml places mlvalues.h on different platforms, any hints?
ktne has left #ocaml []
<flux__>
base you guess on output of ocamlc -where, but make it user configurable?
<mikeX>
oh I see, thanks flux__
<mikeX>
yes, I plan to write a proper configure script
chimikal_ has quit [Remote closed the connection]
chimikal has joined #ocaml
Snark has joined #ocaml
khaladan has joined #ocaml
dylan is now known as Dylan
Oatmeat|umn has joined #ocaml
Anarchos has joined #ocaml
<Anarchos>
i did a great job in interfacing ocaml with a C++ API. But as this C++ API is multithreaded i get a random error at execution due to the existence of two processes garbage collecting in the same time :(
<love-pingoo>
you must find a way to have ocaml routines running in only one thread
<love-pingoo>
that's annoying :/
<Anarchos>
i used enter/leave_blocking_section embracing my callbacks calls from C, but it doesn't seem to be enough
Dylan is now known as dylan
<smimou>
Anarchos: does it work *without* the enter/leave_blocking_section ?
<love-pingoo>
Anarchos: some C code running in another thread could be calling Caml primtives ?
<Anarchos>
smimou : i think yes.... but some of my callback calls again C code, spawning a new thread
<Anarchos>
love-pingoo : yes
<love-pingoo>
Anarchos: good luck :)
<love-pingoo>
what are you binding ?
<love-pingoo>
you may be able to kind of bufferize the things your C code wants to do on the ML-side
Submarine has quit ["Leaving"]
<Anarchos>
love-pingoo in fact i encapsulate a graphical multithreaded C++ API in ocaml
<Anarchos>
believe me it is really astonishing to be able to open and command windows from your ocaml toplevel :)
<love-pingoo>
the C code calls caml routines for refreshing ?
<smimou>
or even acesses caml data ?
<love-pingoo>
I'm wondering.. maybe some more _blocking_section would do the trick
<love-pingoo>
mmm probably needs some kind of mutex actually
<smimou>
love-pingoo: no, the less _blocking_section the better
<love-pingoo>
for efficiency, ok. but for now Anarchos just needs to have something working :p
<Anarchos>
love-pingoo : my caml code calls a C function, which in turns calls the C++ API , possibly calling caml code again ...
<Anarchos>
love-pingoo it works but at runtime it crashes randomly ...
<Anarchos>
love-pingoo when i debug i have two threads in caml_minor schmurtz :)
<smimou>
love-pingoo: the less _blocking_section the better for safety
<love-pingoo>
smimou: ??
<love-pingoo>
too much could only cause deadlocks
<love-pingoo>
too little can cause segfault, ill Gc and so on..
<Anarchos>
love-pingoo i have this segfault :)
<smimou>
love-pingoo: no
<smimou>
enter_blocking_section means *release* the global mutex
<Anarchos>
smimou i know that
<Anarchos>
and i find it counter intuitive
<smimou>
yes it is
<smimou>
(it does not seem clear for love-pingoo for ex)
<love-pingoo>
smimou: aaaah, I see :p
Anarchos has quit ["Vision[0.8.5-0418]: i've been blurred!"]
<dylan>
zmdkrbou: Well, after the first day, it seems turion 64 works well with debian. ACPI tells me my CPU is running at zero degrees celsius, but this is not specific to linux. Windows seems to think the same.
<bluestorm>
wow
<bluestorm>
0°C
<bluestorm>
AMD rox :D
<dylan>
Yeah. I doubt it is really that temperature.
<dylan>
what's odd, is my friend with an almost identical laptop, his reports 60C.
<bluestorm>
hum
<bluestorm>
some odd motherboard setting may not be enabled
<dylan>
The bios is not really... configurable, either.
<dylan>
I only worry that the fan won't turn on when needed to cool it down. :-/
Anarchos has joined #ocaml
<Anarchos>
re
<dylan>
it's so awesome, though. A little ocaml program I wrote, which took about 1.5 minutes to compile on my old Athlon XP-M 1.8ghz takes 3 seconds to compile on this baby. :-D