<tsuyoshi>
rwmjones: well, I see the callback stuff but my_realloc/my_free just call realloc/free without doing anything else
<tsuyoshi>
so I was speculating that they did something in a previous version
<tsuyoshi>
can't get the example programs to work btw.. they need much more ram than I have
rutlov has joined #ocaml
<tsuyoshi>
after reading that I should set the stack size to unlimited, I looked at what the default was, and the default is half my ram, so I didn't bother
<tsuyoshi>
so I was going to rewrite the example to incrementally mark stuff, but that's hard because you can't mark stuff into a sharable file without using a key
<tsuyoshi>
it would be useful if you could just mark something in without a key.. then you can still refer to it in whatever data structure you're building, which would ultimately get a key
rutlov has left #ocaml []
mikeX has quit ["leaving"]
|Catch22| has quit [Read error: 113 (No route to host)]
ttamttam has joined #ocaml
goalieca has quit ["keep your stick on the ice"]
AxleLonghorn has quit [Read error: 110 (Connection timed out)]
Snark has joined #ocaml
szell has joined #ocaml
szell` has quit [Read error: 110 (Connection timed out)]
szell` has joined #ocaml
bubblegumtate has left #ocaml []
szell has quit [Read error: 110 (Connection timed out)]
schme has joined #ocaml
szell has joined #ocaml
malc_ has joined #ocaml
szell` has quit [Read error: 110 (Connection timed out)]
Yoric[DT] has joined #ocaml
szell` has joined #ocaml
Yoric[DT] has quit ["Ex-Chat"]
szell has quit [Read error: 110 (Connection timed out)]
szell has joined #ocaml
szell` has quit [Connection timed out]
jargonjustin has quit []
yangsx_ has quit [Read error: 110 (Connection timed out)]
szell` has joined #ocaml
jlouis has joined #ocaml
szell has quit [Read error: 110 (Connection timed out)]
jlouis_ has quit [Read error: 110 (Connection timed out)]
prince has quit [Client Quit]
szell has joined #ocaml
szell` has quit [Read error: 113 (No route to host)]
malc__ has joined #ocaml
AndreWe has joined #ocaml
malc___ has joined #ocaml
malc_ has quit [Read error: 110 (Connection timed out)]
hkBst has joined #ocaml
seafood__ has quit []
malc__ has quit [Read error: 110 (Connection timed out)]
seafood_ has joined #ocaml
seafood_ has quit [Client Quit]
malc_ has joined #ocaml
seafood_ has joined #ocaml
malc_ has quit ["leaving"]
AndreWe has quit [Remote closed the connection]
malc___ has quit [Read error: 110 (Connection timed out)]
jlouis_ has joined #ocaml
m3ga has quit ["disappearing into the sunset"]
bongy has joined #ocaml
jlouis has quit [Read error: 110 (Connection timed out)]
Demitar_ has quit ["Burn the land and boil the sea. You can't take the sky from me."]
<rwmjones>
tsuyoshi, their only purpose is to drop the first argument
<rwmjones>
tsuyoshi, the first arg is needed by mmalloc to refer to the specific memory pool in use, but for global malloc/free there is just the C heap
<rwmjones>
tsuyoshi, 32 bit? 64 bit?
<rwmjones>
tsuyoshi, also read the section of the documentation which discusses how to mark structures incrementally
schme has quit [Remote closed the connection]
ttamttam has left #ocaml []
naufraghi has joined #ocaml
naufraghi_ has joined #ocaml
naufraghi has quit [Read error: 104 (Connection reset by peer)]
<flux>
but otherwise the project is an interesting one.. it solves the shared field names -problem, has an effect system instead of monads, strict evaluation with annotated laziness
Smerdyakov has quit ["Leaving"]
bongy has quit ["Leaving"]
naufraghi_ has quit [Read error: 104 (Connection reset by peer)]
naufraghi has joined #ocaml
shortcircuit has joined #ocaml
naufraghi_ has joined #ocaml
naufraghi has quit [Read error: 113 (No route to host)]
RobertFischer has joined #ocaml
seafood_ has quit []
ygrek has joined #ocaml
<naufraghi_>
hello
<naufraghi_>
I'm searching for some tutorial on using modules, like Set
<thelema>
specifying all the signatures and module definitions in one mega declaration
<palomer>
that was what I used to do in haskell
munga has quit [Read error: 110 (Connection timed out)]
<palomer>
checking out 7.9
<bluestorm>
i think that when possible, recursive module dependencies should not be used
Morphous has joined #ocaml
<palomer>
bluestorm, why?
munga has joined #ocaml
gim_ has joined #ocaml
<bluestorm>
with it, you can't use separate compilation, and most of the time the de-recursification is quite easy to achieve, and a better choice on the long run
ppsmimram has joined #ocaml
gim has quit [Read error: 110 (Connection timed out)]
ppsmimou has quit [Success]
<RobertFischer>
Recursive module definitions are a bad code smell in Ocaml.
<RobertFischer>
Really, you usually can and should avoid it.
* thelema
agrees with bluestorm and RobertFischer
<bluestorm>
(because they make explicit the shared dependency of the modules, not entangling them in a big circle of things whose you don't know what they depends on, and end up enlarging constantly because you don't want to think of it)
<palomer>
In haskell I would have a value which contains all the global variables
<palomer>
I would need mutually recursive modules for this
<bluestorm>
a bit like "let's put every function in a bit let rec ... and ... and, it's more natural", you could eventually get bitten
<bluestorm>
hm
<palomer>
but my classes refer to each other
<bluestorm>
your use case has is share of uglyness too :D
<palomer>
this is a normal thing
<bluestorm>
(-y+i)
<bluestorm>
hm
<palomer>
I'm constructing a parse tree
<palomer>
so parent nodes refer to child nodes
<palomer>
and vice versa
<thelema>
palomer: as I said, you're trying to do the normal thing (for other languages), and you find that it's not the normal thing in OCaml.
<petchema>
palomer: that works thanks to lazyness
<bluestorm>
do you need to represent a parse tree as an object ?
<palomer>
in haskell I used a datatype
<palomer>
but an object is more natural
<RobertFischer>
The correct answer is problaby something like `a Node.
<bluestorm>
than an algebraic data type ?
<bluestorm>
strange
<palomer>
because I can write functions like f x = x#a
<RobertFischer>
Why do you want to write that?
<palomer>
lemme explain
ygrek has quit [Remote closed the connection]
<palomer>
so I have a toplevel virtual class Node
<palomer>
but, for any given node subclass, the siblings of instances of that node subclass can have more specific siblings
<palomer>
so in my toplevel Node class I have a method getSibling : () -> Node
ygrek has joined #ocaml
<palomer>
and then I can write generic function getSiblingSpecific which works on any object with a sibling field
* RobertFischer
has to run.
RobertFischer has left #ocaml []
<palomer>
(and other generic functions that return all the siblings of a Node, etc...)
<palomer>
that's how I did it in haskell
* rwmjones
is (still) in a twisty maze of camlp4 modules, all alike
<palomer>
it seems section 7.9 forces you to put all the modules in the same file
<thelema>
palomer: yes, it does.
<bluestorm>
rwmjones: does that mean you're lost ?
<thelema>
palomer: one thing that ocaml doesn't do as well as haskell is type classes.
<bluestorm>
:p
<rwmjones>
Failure: "No implementation printer"
<palomer>
I don't really need typeclasses
<palomer>
since I have objects
<bluestorm>
palomer: what i don't understand is : to represent a tree, isn't the plain algebraic data types enough ?
<bluestorm>
(and it looks much more concise that all that quite subtile object stuff)
<bluestorm>
rwmjones: what are you trying to do ?
<palomer>
but I'm also browsing the parse tree
<palomer>
so I need a toplevel node supertype
<palomer>
which stores the current node
<palomer>
hrmph
<rwmjones>
bluestorm, I'm trying to fix sylvain's gettext to work with camlp4 3.10.x
<thelema>
palomer: try it with a variant type instead of objects.
<palomer>
maybe I can get away without mutually recursive modules
<rwmjones>
what is mkcamlp4 supposed to do? build a standalone preprocessor binary, right?
<palomer>
thelema, I have 10 different node types right now
<palomer>
(many more later)
Amorphous has quit [Read error: 110 (Connection timed out)]
<palomer>
and, besides, what I end up doing looks exactly like stuff you would do with OO
<palomer>
print x = case x of `Type1 x -> printType1 x | `Type2 x -> printType2 x ....
<palomer>
I could probably have some toplevel virtual classes that everyone refers to