kaustuv changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | 3.11.1 out now! Get yours from http://caml.inria.fr/ocaml/release.html
noj has quit [wolfe.freenode.net irc.freenode.net]
Ori_B has quit [wolfe.freenode.net irc.freenode.net]
mbishop has quit [wolfe.freenode.net irc.freenode.net]
xevz has quit [wolfe.freenode.net irc.freenode.net]
hto_ has quit [wolfe.freenode.net irc.freenode.net]
xevz has joined #ocaml
hto_ has joined #ocaml
onigiri has quit [Client Quit]
slash_ has quit [Client Quit]
Cromulent has quit []
Cromulent has joined #ocaml
Cromulent has quit [Remote closed the connection]
bzzbzz has joined #ocaml
bohanlon has quit ["I will see you all later!"]
tmaedaZ is now known as tmaeda
bohanlon has joined #ocaml
<Hydrant> how would I implement something like a list of lists at a low level in something like C++ ?
Ori_B has joined #ocaml
mbishop has joined #ocaml
noj has joined #ocaml
<thelema_> Hydrant: ? why are you asking that here?
<Hydrant> lists of lists are a very functional thing, trying to understand how the functional language implements it internally
<thelema_> lists are usually implemented as singly linked lists - a node is either a pair: data + pointer to "next" node
<thelema_> or it's a null value, for the empty list
<thelema_> lists of lists have data pointers pointing to other lists.
<Hydrant> I've been looking at how python did it for reference
<Hydrant> I guess I was expecting some other magic
<thelema_> not really, ocaml's magic is just its ints are 31-bit so GC works very nice.
<thelema_> (or 63-bit on 64-bit platforms)
<Hydrant> GC's scare me
<thelema_> they're magical beasts
<Hydrant> immutable variables has some wonderful mathematical properties
<Hydrant> and yet, this evil part of me keeps thinking that so many copies is bad
<thelema_> OCaml allocates objects *very* efficiently, and GC costs mostly for what you keep
<Hydrant> do you know enough about ocaml's GC to describe it? I can search for a paper on it also
<Hydrant> imho, gc's have bad performance when it comes to parallel code
<thelema_> yes, ocaml's GC stops the world in order to collect.
<Hydrant> I know that atomics, which are normally used for reference counts, just do not scale at all
<Hydrant> I'm trying to reconcile my love of functional programming, concurrency, and C++ :-)
<Hydrant> maybe I should see how erlang does it
* thelema_ isn't impressed by concurrency and prefers to fork
<thelema_> which works just fine for ocaml.
<Hydrant> different problems, different solutions :-)
<tsuyoshi> love of c++?
<Hydrant> yup
<Hydrant> majorly
<tsuyoshi> what are you smoking
caligula_ has joined #ocaml
caligula__ has quit [Read error: 60 (Operation timed out)]
Hydrant has left #ocaml []
BiDOrD has quit [Read error: 110 (Connection timed out)]
BiDOrD has joined #ocaml
bluestorm has joined #ocaml
tmaeda is now known as tmaedaZ
tmaedaZ is now known as tmaeda
bluestorm has quit [Remote closed the connection]
Beelsebob1 has joined #ocaml
Beelsebob has quit [Read error: 110 (Connection timed out)]
eevar2__ has joined #ocaml
onigiri has joined #ocaml
onigiri has quit [Client Quit]
bluestorm has joined #ocaml
onigiri has joined #ocaml
bzzbzz has quit [Read error: 54 (Connection reset by peer)]
eevar2__ has left #ocaml []
bzzbzz has joined #ocaml
tmaeda is now known as tmaedaZ
tmaedaZ is now known as tmaeda
|yurug| has joined #ocaml
tmaeda is now known as tmaedaZ
rjones__ is now known as rwmjones
yurug has quit [Remote closed the connection]
|yurug| has quit ["KVIrc Insomnia 4.0.0, revision: , sources date: 20090115, built on: 2009/03/07 00:45:02 UTC http://www.kvirc.net/"]
yurug has joined #ocaml
onigiri has quit [Client Quit]
hkBst has joined #ocaml
bohanlon has quit [Read error: 113 (No route to host)]
LeCamarade|Away is now known as LeCamarade
Anarchos has joined #ocaml
<kaustuv> bah, extlib has List.findi but not List.rfindi
LeCamarade has quit ["Rebooting ..."]
<bluestorm> kaustuv: isn't rfindi much more costly ?
<bluestorm> hm
<bluestorm> I assumed findi was nth
ski_ has joined #ocaml
<bluestorm> oh, I see rfind
_andre has joined #ocaml
julm has joined #ocaml
onigiri has joined #ocaml
svenl has quit [Read error: 110 (Connection timed out)]
svenl has joined #ocaml
bombshelter13_ has joined #ocaml
bscofield has joined #ocaml
Amorphous has quit [Read error: 110 (Connection timed out)]
bombshelter13__ has joined #ocaml
Amorphous has joined #ocaml
LeCamarade has joined #ocaml
Anarchos has quit ["Vision[0.9.7-H-090423]: i've been blurred!"]
bombshelter13_ has quit [Connection timed out]
willb has joined #ocaml
eyda|mon has quit [Read error: 110 (Connection timed out)]
Yoric[DT] has joined #ocaml
mishok13 has quit ["Stopping IRC chat... [OK]"]
maxote has quit [wolfe.freenode.net irc.freenode.net]
hcarty has quit [wolfe.freenode.net irc.freenode.net]
jdavis has quit [wolfe.freenode.net irc.freenode.net]
brendan has quit [wolfe.freenode.net irc.freenode.net]
erickt has quit [wolfe.freenode.net irc.freenode.net]
fremo has quit [wolfe.freenode.net irc.freenode.net]
prigaux has quit [wolfe.freenode.net irc.freenode.net]
rwmjones_ has quit [wolfe.freenode.net irc.freenode.net]
aij has quit [wolfe.freenode.net irc.freenode.net]
schme has quit [wolfe.freenode.net irc.freenode.net]
lanaer has quit [wolfe.freenode.net irc.freenode.net]
orbitz has quit [wolfe.freenode.net irc.freenode.net]
tmaedaZ has quit [wolfe.freenode.net irc.freenode.net]
brendan has joined #ocaml
maxote has joined #ocaml
rwmjones_ has joined #ocaml
lanaer has joined #ocaml
erickt has joined #ocaml
tmaedaZ has joined #ocaml
orbitz has joined #ocaml
fremo has joined #ocaml
jdavis has joined #ocaml
schme has joined #ocaml
hcarty has joined #ocaml
aij has joined #ocaml
prigaux has joined #ocaml
schme has quit [Read error: 104 (Connection reset by peer)]
schmx has joined #ocaml
acatout has quit [Read error: 110 (Connection timed out)]
Anarchos has joined #ocaml
Hydrant has joined #ocaml
<Hydrant> does it ever make sense, in any functional language, to have a tuple of lists?
Demitar has joined #ocaml
<thelema> yes
<Hydrant> hrrm
rwmjones is now known as rwmjones-afk
<thelema> for example, implementing an insertion list as a pair of stacks
<Hydrant> lists and tuples can be nested in each other to infinity then? tuple of lists of tuples of lists of lists of tuples....
<thelema> yes
<Hydrant> trying to figure out how to program that :-(.... without using linked lists
<thelema> square peg, round hole
<thelema> if you have resizable arrays, you can do it.
<Hydrant> indeed
<thelema> why don't you want to use linked lists?
<Hydrant> how do FP language implementations keep track of the nesting, when the data is flat in memory?
<Hydrant> what I'm attempting to do is create a minimal functional language which has excellent efficiency and parallel properties
<thelema> pointers.
<Hydrant> linked lists don't satisfy that criteria
<thelema> you don't inline everything - the tuple has two pointers to the two list heads
<thelema> if youhad resizable arrays, you could use them instead of linkes lists.
<thelema> which part of your criteria don't linked lists satisfy?
<Hydrant> I can resize arrays, but I'm going to have to do a lot of pointer indirection
<Hydrant> linked lists don't parallelize well, since you have to follow the pointer through the list... and it's not efficient because I can't pack all the data into a cacheline or a vector register on a procesor
<Hydrant> my primitives are the cacheline and the vector registers (e.g. SSE)
acatout has joined #ocaml
<Hydrant> and I'm attempting to build a minimalistic FP language from those primitives
<thelema> so use cacheline-sized arrays linked together
<Hydrant> yah, that's fine
<Hydrant> if I could tighten restrictions on tuple / list embedding thigs would be a bit easier too
<thelema> good luck
<Hydrant> thx
<Hydrant> I intend to create the minimal set of functions that can be composed and still be efficient, and see what language I get at the end and what it can do :-)
<Hydrant> probably not very much, but if it can do it super efficiently it's still good
julm has quit [Remote closed the connection]
julm has joined #ocaml
acatout_ has joined #ocaml
acatout has quit [Read error: 110 (Connection timed out)]
Beelsebob1 has quit [Remote closed the connection]
Beelsebob has joined #ocaml
julm has quit [Remote closed the connection]
julm has joined #ocaml
david__ has joined #ocaml
david__ is now known as Submarine
psnively has joined #ocaml
psnively has quit [Client Quit]
psnively has joined #ocaml
psnively has left #ocaml []
bzzbzz has quit [Read error: 110 (Connection timed out)]
ulfdoz has joined #ocaml
Associat0r has joined #ocaml
Submarine has quit ["Leaving"]
bohanlon has joined #ocaml
Associat0r has quit []
sramsay has joined #ocaml
acatout_ is now known as acatout
<Anarchos> Hydrant try combinators : you get a turing complete language, though unreadable
<bluestorm> Hydrant: have you thought about catenable lists ?
<bluestorm> I don't pretend it's particualrly good, just that it could fit a former list workflow reasonably well, while being better fit for parallelism
<bluestorm> actually I think there already is a large amout of research on data parallelism (I remember eg. Fortress slides about the exact question you're raising) that already have the answers to what you're looking for
<Anarchos> i wonder when we will see a concurrent gc again on ocaml
<bluestorm> I think you should try to document yourself on that research before doing your own experiments, orelse you'll inevitably reinvent the wheel
* Camarade_Tux thought bluestorm was talking about "canibale lists"...
<bluestorm> :p
<bluestorm> btw., nothing relevant to the present discussion, but I've wrote an SQL DSL for a summer intership, and I plan to release it on Ocamlcore asap.; I'll probably ask feedback here too
<Anarchos> Anarchos would be nice to port ocaml to beos !
<bluestorm> if you're particularly interested in yet another postgresql binding, feel free to make yourself known
<Camarade_Tux> Anarchos: there are beos binaries for mldonkey but I don't know if they are native code or byte code
<Camarade_Tux> (and for haiku too)
<Anarchos> Camarade_Tux i am able to compile native code*
<Anarchos> for both beos and haiku
<Camarade_Tux> so what did you mean with "port ocaml to beos"?
<Anarchos> wait az minute
julm has quit [Remote closed the connection]
julm has joined #ocaml
<Anarchos> Camarade_Tux i mean a port of the beos API to ocaml, but i need multithreading for that...
julm_ has joined #ocaml
<Camarade_Tux> oh, I see
julm has quit [Nick collision from services.]
julm_ is now known as julm
<bluestorm> rwmjones_: ping ?
bzzbzz has joined #ocaml
Anarchos has quit [Read error: 104 (Connection reset by peer)]
Yoric[DT] has quit [Read error: 113 (No route to host)]
LeCamarade is now known as LeCamarade|Away
boscop has joined #ocaml
<boscop> I'm wondering whether I should use OCaml, Scala or Ruby (with C(++) bindings) for my networked 2d action-shooter
slash_ has joined #ocaml
<bluestorm> boscop: do you already know one of these three languages
<bluestorm> ?
<boscop> I know ruby and looked at scala and a bit at ocaml
<bluestorm> there are some game-makers in the ocaml community, but nothing serious really that I know of
<bluestorm> ( eg. in 2D there is flux's game : http://www.modeemi.cs.tut.fi/~flux/goba/ )
<bluestorm> if you want to choose the language that will have your game released quickly, choose the one you already know
<bluestorm> if you're choosing an application to learn a new language, that's a different question
<boscop> the primary goal is to learn something and that the game runs on many platforms
bscofield has quit []
<boscop> is there a physics library for ocaml?
<bluestorm> Ocaml is reasonably portable, though not always on the small devices that run Java and could be fine with Scala
<boscop> since my game requires a mouse for aiming it's acceptable if it doesn't run on small devices :)
<bluestorm> flx__: ?
<bluestorm> boscop: few people have adventured game development in OCaml
<bluestorm> and you will certainly suffer from "missing libraries" issues if you choose OCaml to develop your game
<boscop> I guessed that
<bluestorm> though those can be worked out, bindings to eg. SDL/Allegro are available, and you can always create bindings yourself if needed
<bluestorm> but that's certainly not the easy path
<boscop> although basically I only need opengl, physics, networking
<bluestorm> see http://caml.inria.fr/cgi-bin/hump.en.cgi?sort=0&browse=109 , though I'm not sure it's exhaustive
<bluestorm> flx__ was talking about new bindings to a physics library some months ago, though I don't remember wich one
<bluestorm> chipmunk !
Anarchos has joined #ocaml
<boscop> hm
<boscop> I know that chipmunk doesn't have continuous collision detection which I need
<boscop> I have some fast bullets flying around
<bluestorm> I should also say that, though I'm really not interested in popularizing this platform against more open languages, F# is quite OCaml-like and can use the reportedly good .NET game libraries
<boscop> meh
jimmyb2187 has left #ocaml []
komar_ has joined #ocaml
komar_ has left #ocaml []
<boscop> f# is proprietary, right?
<Anarchos> i am unable to write an ocamlyacc method for c++ headers :( too much ambiguities !
<bluestorm> haha Anarchos
<bluestorm> use an existing C++ parsing library
<bluestorm> you can't possibly survive alone
<Anarchos> bluestorm i seems to come from a perverted mind .... kind of a language programming frustrated researcher ...
<bluestorm> IIRC Mozilla use a C++ parsing library wich has Ocaml bindings
<bluestorm> elkhound or something ?
<kaustuv> please tell me mozilla doesn't have a built-in C++ compiler
<bluestorm> no I think they used an existing tool for internal developping purposes
<bluestorm> but I found what I was looking for
<bluestorm> Elkhound is a parser generator, Elsa is a "C/C++" parser based on Elkhound, and I was thinking of Olmar : http://www.cs.ru.nl/~tews/olmar/
<bluestorm> that's probably not the only solution around though : lots of people do static analysis in OCaml, and they tend to have C/C++ parsers
<kaustuv> according to my erc buffer, elkhound/alsa/olmar has been suggested to Anarchos before
<bluestorm> ah
<kaustuv> err, that's elsa, not alsa
<Hydrant> bluestorm: I read your scrollback
<Hydrant> you mentioned a language... fortress?
<Hydrant> the problem I'm attempting to tackle right now is how to tell what type is where in memory
<Hydrant> I can rely more upon static typing at compile time, or more on dynamic things, just thinking on it
<bluestorm> fortress is a language being worked on at Sun, oriented at scientific applications and multicore programming
bscofield has joined #ocaml
<Hydrant> ah
<bluestorm> I'm not saying this is particularly relevant to your problem, only that I remember reading interesting slides about it wich mentioned the linked list / data parallelism problem
<Hydrant> yah
<Hydrant> reading everyting I can
<bluestorm> and they seem to have incorporated those ideas in the langage design
<bluestorm> hm you might also be interested in type systems for low-level langages
<Hydrant> yah
<Hydrant> where can I read more about that
<Hydrant> you mean how types are represented in the compiler before becoming flat code?
<bluestorm> I mean specific type systems designed for assembly languages or nearly
<Hydrant> yah
<bluestorm> but that's a quite theoretic line of work
<Hydrant> tuples and lists are giving me a headache
<Hydrant> everything has to be flat, and a register or something will indicate what the types are... perhaps... they aren't always needed
<bluestorm> mostly concerned, to what I've seen, with the unreasonable limitations current high-level-language type systems would impose on an assembly language
<Hydrant> right
* gildor goto sleep but will read answer tomorrow, have travel 600km today
<gildor> channel error
<bluestorm> Hydrant: maybe http://lambda-the-ultimate.org/node/3089 ?
julm has quit [Remote closed the connection]
julm has joined #ocaml
eyda|mon has joined #ocaml
eyda|mon has quit [Read error: 60 (Operation timed out)]
ski_ has quit ["Lost terminal"]
_andre has quit ["leaving"]
yurug has quit ["KVIrc Insomnia 4.0.0, revision: , sources date: 20090115, built on: 2009/03/07 00:45:02 UTC http://www.kvirc.net/"]
Jedai has joined #ocaml
onigiri has quit [Client Quit]
Cromulent has joined #ocaml
Cromulent has quit [Remote closed the connection]
Cromulent has joined #ocaml
bluestorm has quit [Remote closed the connection]
bombshelter13__ has quit [Client Quit]
ulfdoz has quit [Read error: 110 (Connection timed out)]
Anarchos has quit ["Vision[0.9.7-H-090423]: i've been blurred!"]
Anarchos has joined #ocaml
Cromulent has quit []
hkBst has quit [Read error: 104 (Connection reset by peer)]
sramsay has quit [Remote closed the connection]
bscofield has quit []
willb has quit [Read error: 110 (Connection timed out)]
bscofield has joined #ocaml
Anarchos has quit ["Vision[0.9.7-H-090423]: i've been blurred!"]
Mr_Awesome has joined #ocaml
boscop_ has joined #ocaml