<mattam_>
cturner: it is up to date. Latest caml release was a long time ago
mattam_ is now known as mattam
<teratorn>
cturner: eh well python is just like that -- simple and straightforward enough were a book isn't as useful as it would be for o'caml.
<whee>
ocaml is pretty straightforward as well, if you're familiar with some aspects of functional programming
<teratorn>
well yeah, but there's more ways to do things
<teratorn>
*the same things
<teratorn>
which is good for a language designed to be highly optimizable
<whee>
once you get used to one functional language, I found things got easier in every language I knew
<mattam>
whee: do you still program a lot using other languages ?
<whee>
mattam: of course; I use whatever language fits the problem the best
<whee>
I tend to use ocaml for a general purpose language, though
<mattam>
well, except for the plenty of Java or C libraries, i wouldn't program in imperative languages i suppose. Were do they fit better than ML or haskell ?
<cturner>
mattam_: on a scan of the website, doing a search for ocaml and caml I was unable to find an oreilly book.
<teratorn>
mattam: eh if your concerned about library support (and it's a good thing to be concerned about :), python is the way to go :)
<cturner>
teratorn: yeah :)
<mattam>
oh no.
<Smerdyakov>
Nonsense. You can use C libraries easily from ML's.
<cturner>
whee: hmm. I used them for a particularly specific task.. it was doing concurrent lookups to australia post to get pricing on multiple packages at the same time.
<cturner>
Naturally Australia Post had implemented this as.. wait for it.. a http lookup (someone could have recommended wsdl to them..)
<teratorn>
wsdl?
<whee>
cturner: take a look at erlang and play with its threads (called processes there)
<whee>
a lot more fun :)
<cturner>
web servicey thingie.
<whee>
things like daemons that service requests are a bit more managable when you can naturally express the thing as tasks run concurrently
<teratorn>
sounds evil ;)
<cturner>
teratorn: web services are fine.. but when you try to get http hacks to do what should be done as web services.. yeah. yuck.
<cturner>
particularly for something like australia post where you might be querying two hundred separate parcels in a hit.. thus you need to make two hundred separate http connections.
<cturner>
whee: yes
<teratorn>
omg
<whee>
cturner: that's why there's pipelining :P
<cturner>
whee: so where threads get messy is .. where? In java I've heard that swing isn't thread safe. But don't know why. Why would you do multithreading without pipelining?
<teratorn>
http is a pretty piss poor protocol even for what it was designed for
<cturner>
Also java is nice because it has threadsafe objects. Like Vector. Saves a lot of troubling (or would have if I'd bothered to learn that it was thread safe and not code it safely my own way..)
<whee>
cturner: I've never liked dealing with threads in languages where the data is shared and you've got to deal with semaphores and the like
<cturner>
teratorn :)
<cturner>
whee: It's probably bad for RAD purposes, I can imagine that. And having managers say "Why can't you just do?" and look at you as though you're difficult when you explain that the threading model won't support it.
<whee>
I just feel that I have better things to worry about than making sure threads don't eat each other
<teratorn>
hehehe
<cturner>
I'm prototyping a mud in python at the moment. I'd like to do it in a functional language, particularly a functional object language if possible. But if ocaml is not nice for threads - that would be a problem, wouldn't it?
<whee>
that's something I'd do in erlang, to tell you the truth :)
<whee>
it'd be nice to be able to reload and add features to your mud without taking the service down
<cturner>
whee: why erlang?
<teratorn>
cturner: you don't need threads to do concurrency
<cturner>
whee: yes, and to have it extensible, and to be able to teach functional programming concepts through a nice sample environment.
<teratorn>
async I/O is definately better than threads
<cturner>
teratorn: no? I don't have blocking worked out in my head
<whee>
cturner: easy to deal with concurrency; easy to reload parts of the mud as it's running; and just fun :|
<teratorn>
i can't imagine what you would need to block for in a mud
<cturner>
Multiple users..
<teratorn>
:)
<teratorn>
nah
<cturner>
two connect, and they're having a conversation and affecting objects, etc... ?
<teratorn>
that does not require blocking
<whee>
teratorn: sure, you don't have to, but things like this is just easier to deal with in a nice concurrency oriented language imo
<teratorn>
whee: i don't disagree :)
<teratorn>
i'm just saying you don't need threads
<cturner>
teratorn: what happens if two users try to grab an object at exactly the same time?
<teratorn>
they can't.
<cturner>
How do you manage network connections with multiple peopel at once without dedicating a threat to each, also?
<teratorn>
you only do _one_ thing at a _time_
<whee>
there's never an 'exactly the same time' with a computer :)
<teratorn>
cturner: async I/O.
<teratorn>
cturner: which usually boils down to select() calls
<cturner>
teratorn: sounds like there's a giant world of async I/O out there that's somehow passed me by
<teratorn>
probably :)
<whee>
trying to find my erlang irc bot, heh
<teratorn>
if you want a crash course, check out twisted. also as whee says, micro-threads (erlang processes) and the like (mozart-oz concurrency) are better than async I/O. but the concurrency model is not always the deciding factor for which language/framework to use.
<cturner>
teratorn: yeah, have been lookign at twisted. I've been thinking it's a bit of a shame that there isn't a well developed functional language that sits on python so you can just use its libraries
<teratorn>
hehehe
<whee>
heh
<whee>
maybe we'll get lucky when parrot is mature and a bunch of languages compile to it
<whee>
hopefully it'll be easy to move data between the languages then
<cturner>
whee: yeah, that promises to be quite exciting. A third way to .net and java
<cturner>
have to go. at my parents place atm and they want to use the phone :)
cturner has left #ocaml []
ecc has joined #ocaml
ecc has quit ["Client exiting"]
Zadeh has joined #ocaml
Xcal has joined #ocaml
Xcalibor has quit [Read error: 113 (No route to host)]
whee has quit ["Leaving"]
whee has joined #ocaml
polin8 has quit [Read error: 110 (Connection timed out)]
jrosdahl has joined #ocaml
polin8 has joined #ocaml
CybeRDukE has joined #ocaml
CybeRDukE has quit ["Documentation is like sex: when it is good, it is very, very good. And when it is bad, it is better than nothing."]
CybeRDukE has joined #ocaml
Xcal is now known as Xcalibor
jrosdahl has quit [Remote closed the connection]
two-face has joined #ocaml
<two-face>
hi
<two-face>
anyone with C bindings knowledge here?
phubuh has quit [Remote closed the connection]
phubuh has joined #ocaml
* Xcalibor
is away: shopping
<two-face>
anyone with C bindings knowledge here?
bk_ has quit ["I'll be back"]
bk_ has joined #ocaml
CybeRDukE has quit ["Documentation is like sex: when it is good, it is very, very good. And when it is bad, it is better than nothing."]
CybeRDukE has joined #ocaml
docelic has joined #ocaml
two-face has quit [Read error: 60 (Operation timed out)]
Verbed has quit ["Client exiting"]
vect has quit [Read error: 110 (Connection timed out)]
docelic has quit ["Client Exiting"]
CybeRDukE has quit ["Programmers never die: They just GOSUB without RETURN."]
docelic has joined #ocaml
vect has joined #ocaml
systems has joined #ocaml
two-face has joined #ocaml
<two-face>
hi
<two-face>
anyone with C bindings knowledge here?
eno has joined #ocaml
systems has quit [Read error: 110 (Connection timed out)]
CybeRDukE has joined #ocaml
docelic has quit ["Client Exiting"]
two-face has quit [Read error: 110 (Connection timed out)]
eno has quit ["[BX] Amount of time you people were funny: --14 minutes -29 seconds"]
CybeRDukE has quit ["You know you're obsessed with computer graphics when you're outside and you look up at the trees and think, "Wow! That's spec]
bk_ has quit ["I'll be back"]
bk_ has joined #ocaml
phubuh has quit [Remote closed the connection]
phubuh has joined #ocaml
phubuh has quit [Remote closed the connection]
two-face has joined #ocaml
skylan has joined #ocaml
<two-face>
anyone with C bindings knowledge here?
mattam_ has joined #ocaml
mattam has quit [Read error: 110 (Connection timed out)]
two-face has quit [Read error: 110 (Connection timed out)]
docelic has joined #ocaml
Verbed has joined #ocaml
<Xcalibor>
hi all
* Xcalibor
is back (gone 07:02:42)
<bk_>
hi
two-face has joined #ocaml
Xcalibor has quit [Read error: 113 (No route to host)]
Xcalibor has joined #ocaml
brwill|zzz is now known as brwill
systems has joined #ocaml
Zadeh has quit [Read error: 104 (Connection reset by peer)]
systems has quit [Nick collision from services.]
systems has joined #ocaml
docelic has quit ["pluggin the sound card"]
Zadeh has joined #ocaml
<Xcalibor>
so... anybody awake?
<Zadeh>
I am
<Smerdyakov>
I'm SOOOO awake!
<two-face>
hey, anyone writing C bindings here?
<Xcalibor>
two-face: yup, but not yet for ocaml, sorry+
<two-face>
raaa
<two-face>
I want to bind unions
<Xcalibor>
onions?
<Xcalibor>
:-)
<two-face>
pfff
<Xcalibor>
you have better than unions types in ocaml, why do you want to make that?
<Smerdyakov>
two-face, why can't you just treat them as abstract types?
<Xcalibor>
are yo uplaying with bits around?
<two-face>
Smerdyakov: because in my case, they are a set of variables
<two-face>
and I need to access them all
<Xcalibor>
could yo uelaborate with your problem? maybe we can come up with a solution that doesn't need C bindings
<Smerdyakov>
two-face, yes, but you can write C code to access them.
<Smerdyakov>
Xcalibor, I think you don't understand what he is doing at all. It might be best if you didn't try to help..
<Xcalibor>
Smerdyakov: well, actually i don't understand it, that's why I ask him to elaborate on it
<two-face>
Smerdyakov: I need to make them available at the ocaml level as well
<Smerdyakov>
Xcalibor, well, you should understand it.
<Smerdyakov>
two-face, right, and you can do that by making those C functions available in OCaml.
<two-face>
Imagine you have a struct of union of structs :p
<Smerdyakov>
two-face, what is the problem with my suggestion?
<Xcalibor>
weird struct, indeed...
<two-face>
I thought of polymorphic variants
<two-face>
well, irc sucks, i'd better post to a list
<Smerdyakov>
two-face, ...
<Smerdyakov>
two-face, why can't you do what I suggested?
docelic has joined #ocaml
<two-face>
<Smerdyakov> two-face, right, and you can do that by making those C functions available in OCaml.
<Smerdyakov>
That's the one!
<two-face>
you're talking about functions, aren't you?
<Smerdyakov>
Yes, by "C functions," I mean functions.. ?
<Smerdyakov>
Example:
<Smerdyakov>
union { int a; float b; }
<Smerdyakov>
And add a name unionName in there
<Smerdyakov>
int getA(union unionName *x) { return x->a; }