<mellum>
I did, but never with threads... I try to avoid them at all costs :)
<Smerdyakov>
Use yummy Concurrent ML threads in SML/NJ!
<mellum>
Well, they're a lot better, they don't carry the huge overhead o OS based threada
<Hadaka>
module Vars = Map.Make(struct type t = string let compare = compare end)
<Hadaka>
type vars = int Vars.t
<Hadaka>
hrm...
<Hadaka>
vars is typed as a map from strings to integers, right?
<chrisu>
Smerdyakov: is concurrent ml a concurrency oriented language where the threads are very cheap and they communicate by message passing?
lus|wazze has quit ["If we don't believe in freedom of expression for people we despise, we don't believe in it at all -- Noam Chomsky"]
<Smerdyakov>
chrisu, yup.
<chrisu>
nice
<mellum>
That's about the only thing I miss in Ocaml... but of course, it comes at a performance price
<Smerdyakov>
chrisu, it's implemented as libraries for Standard ML. I think it might not even add any extra compiler support, since SML/NJ already has first class continuations. Not sure about it, though.
<chrisu>
how do they implement preemtive tasking with only continuations?
<Smerdyakov>
Oh yeah. I bet that's what needs to be added. Or there might be existing timer support. *shrug*
<Smerdyakov>
mellum, the Concurrent ML interface is very efficiently implementable without continuations, though.
<Smerdyakov>
mellum, it just requires more special handling in the compiler.
<mellum>
Smerdyakov: really? I never really looked at it
<mellum>
although I have a book about it I found in a grab bin for 5¤ :)
<Smerdyakov>
There's also John Reppy's PhD thesis on it online.
<simon->
I'm trying to learn how to comprehend exceptions such as End_of_File
<simon->
in C I'd just check if my getchar() would return -1, though here is how far I got:
<simon->
let rec foo c = match c with n -> n :: foo (input_char stdin) ;;
<simon->
(this would probably look better with a 'function')
<simon->
how would I cope with EOFs? try foo (input_char stdin) with ...
<simon->
the example I'm looking at uses its own exceptions and defines them with a tuple.
<Hadaka>
the o'reilly ocaml book has an example of a c function that "explores" the representation of ocaml values
<Hadaka>
is this available somewhere readily usable?
malc has joined #ocaml
lament_ has joined #ocaml
lament_ has quit [Client Quit]
lament has joined #ocaml
lament has quit [Client Quit]
lament has joined #ocaml
mimosa has quit ["I like core dumps"]
lament has quit [Client Quit]
chrisu has quit ["Client exiting"]
lament has joined #ocaml
lament has quit [Client Quit]
lament has joined #ocaml
lament has quit [Client Quit]
malc has quit [Read error: 60 (Operation timed out)]
buggs is now known as buggs|afk
afx|sleep has quit [Read error: 104 (Connection reset by peer)]
<Defcon7>
anyone can figure how to declare an external C function that returns an array of array of char ?
The-Fixer has quit ["Goodbye"]
The-Fixer has joined #ocaml
The-Fixer has quit ["Goodbye"]
Herrchen has joined #ocaml
The-Fixer has joined #ocaml
Herrchen_ has quit [Read error: 60 (Operation timed out)]
<simon->
why have both mutable and immutable strings/character arrays?
tzoompy has joined #ocaml
<tzoompy>
test?
<tzoompy>
hello
tzoompy is now known as foo
<foo>
hello
foo has quit [Client Quit]
<simon->
hi there
<simon->
*sigh*
<Defcon7>
hi :)
<Defcon7>
do you know how i can declare in ocaml an external C function which returns an array of strings ?
<Defcon7>
(which is an array of array of chars)
<simon->
I have not made it to C extensions yet
<Defcon7>
o~simon-: simon.eggheads.org is yours ?
<simon->
Defcon7, sorry for not responding
<Defcon7>
np :)
<simon->
Defcon7, more or less, yes
<Defcon7>
kewl :)
<simon->
yeah, it is 'kewl' :-P
<Defcon7>
i've seen your website's hostname on #tcl@undernet when i was talking with you here
<simon->
you are there?
<Defcon7>
ops #tcl@efnet
<simon->
seriously? I'm not even on efnet
<simon->
actually I asked people to distribute it so that people could evaluate my vim syntax file, but nobody seems to be giving any response.
<Defcon7>
undernet.
<Defcon7>
im in both
<Defcon7>
but the url is on undernet
<simon->
aha. TCL and O'Caml seem like an odd pair
<simon->
it's on a few networks
<Defcon7>
you know any other ocaml related channel ?
<simon->
no, sorry.
<simon->
I would like a forum in which I can begin from scratch acting all newbie-ish... it's been some time.
<simon->
Defcon7, you wouldn't happen to be using Vim, would ya?
<Defcon7>
hm nope :P
<Defcon7>
i use *nix only as server
<Defcon7>
my workstation is windows
<Defcon7>
and on windows i use textpad
<simon->
I have no workstation
<simon->
but the thin clients I use are usually windows powered
<Defcon7>
:)
<Defcon7>
i started learn ocaml and now im learning C
<simon->
oh, that way around..
<Defcon7>
because there are not too much ocaml libraries around
<Defcon7>
so i have to use C libraries
<simon->
what were your intentions before learning ocaml?
<Defcon7>
programming is the smallest part of my work
<Defcon7>
iam a sysadmin
<Defcon7>
sometimes i have to make some small programs
<simon->
I have seen your name before. I just have to figure out where
<Riastradh>
(by the way, the OCaml file extension is typically '.ml')
<simon->
Riastradh, I know, but I'm supposed to improve a file I have from a friend that's already named this :-P
<Riastradh>
You missed an 'in' after the first 'let' bit.
<Riastradh>
And. Um.
* Riastradh
sighs and shakes his head.
<simon->
actually his version is called '.sml' and is, as the name, SML
<Riastradh>
Why are you using references at all if you're going to assign constant values to them?
<simon->
Riastradh, oh, I'm just testing
<Riastradh>
And even if you are using them, you can't initialize them _after_ the computation regarding them.
<simon->
Riastradh, better understand one code bit at a time.
<simon->
Riastradh, I'm supposed to analyse a channel and alter the values of these, but until I have code that can do this, I've just got some sample values.
<Riastradh>
simon-, that's irrelevant.
<Riastradh>
You can't compute something with some given inputs and _then_ initialize the inputs.
<Riastradh>
lix will always be '0. /. 1 +. 0. *. 100. /. 0.'.
<simon->
Riastradh, but aren't ref 0 supposed to be mutable?
<Riastradh>
They are.
<simon->
the := lines are supposed to be replaced with code that adjusts these mutable references according to input receifed from e.g. stdin
<Riastradh>
But you assign them _AFTER_ the computation; lix is _already_ computed when you assign them; assigning them doesn't make the control flow just 'jump back' to the expression that is evaluated to get lix.
<simon->
Riastradh, ohh... lix is not a shorthand? *sigh*
<Riastradh>
'Shorthand?'
<simon->
sorry, expression
<simon->
thanks for pointing that out. I'll see that lix is assigned after the analyse-bit
Defcon7 has joined #ocaml
Etaoin has joined #ocaml
<Etaoin>
hi
Defcon7 has quit [Remote closed the connection]
<Etaoin>
has anyone ever had trouble with lablgtk setting a RGB foreground color on a drawable?