<mfp>
right, used it a couple times, but the x86_64 stacktraces full of garbage were indeed a problem (and patching ocamlopt and recompiling every single lib is a PITA)
<mfp>
but 4.00 already fixes the stack trace issue?
<f[x]>
mfp, true, but the patch is already upstream
<f[x]>
yes
<mfp>
that's great
Tobu has quit [Ping timeout: 272 seconds]
Tobu has joined #ocaml
KDr2 has joined #ocaml
avsm has joined #ocaml
f[x] has quit [Ping timeout: 244 seconds]
emmanuelux has joined #ocaml
f[x] has joined #ocaml
letrec has joined #ocaml
Drup has quit [Quit: Leaving.]
letrec has quit [Remote host closed the connection]
krktz has quit [Remote host closed the connection]
krktz has joined #ocaml
gnuvince has quit [Ping timeout: 244 seconds]
Kakadu has quit [Ping timeout: 245 seconds]
diml has quit [Ping timeout: 240 seconds]
hyperboreean has quit [Ping timeout: 244 seconds]
hyperboreean has joined #ocaml
diml has joined #ocaml
gnuvince has joined #ocaml
gnuvince has quit [Ping timeout: 260 seconds]
gnuvince has joined #ocaml
<_andre>
does anyone have an example of providing a custom install command in oasis?
<adrien>
to do what?
<adrien>
for libraries, I don't think you can change how it installs
<_andre>
install cmo files
yrlnry has quit [Ping timeout: 260 seconds]
<adrien>
hmm, why install them?
<adrien>
or is it because you don't have/want a .cma?
<_andre>
i'm writing a custom toplevel and i'm using Topdirs.dir_load on initialization to load some cmo files
jimmyrcom has joined #ocaml
<_andre>
managed to do it with 'InstallType: Custom'
oriba has joined #ocaml
snearch has joined #ocaml
Zedrikov has joined #ocaml
gnuvince has quit [Read error: Connection reset by peer]
oriba has quit [Quit: oriba]
KDr2 has quit [Remote host closed the connection]
<Drakken>
In a camlp4 syntax extension, does anyone know how to splice a list of nodes into the middle of a surrounding list? It would be equivalent to the @(...) syntax in Lisp macros.
<Drakken>
But it doesn't say how to splice the list into a list that's currently being generated, e.g. a list of str_item nodes in a struct expression.
skchrko has joined #ocaml
ulfdoz has joined #ocaml
silver has quit [Remote host closed the connection]
<Drakken>
In other news, the module-type "with" operation doesn't work with records (or variant types) anyway, so our discussion of module re-use was moot.
<thelema_>
Drakken: for list splicing: let pre, post = List.split_at n in_list in pre @ insert_me @ post
silver_ has joined #ocaml
<Drakken>
thelema_ okay, so my macro can just return a list, but where do I get the surrounding list, and when do I splice it?
<thelema_>
?? I odn't know what @() does in lisp
<thelema_>
for me, splicing a list takes as input lists [a] and [b] and an offset in a [n]
<thelema_>
and returns [a_pre] @ [b] @ [a_post]
<Drakken>
Most macros return a single form, but sometimes you want a single macro to expand to several forms that get spliced into the surrounding form.
<thelema_>
one list, with b inserted into a at position n
<Drakken>
right, but this is inside a parser. I would need access to the full list of str_item nodes in the struct expression (or the entire implementation file), and I would also need some kind of str_item node that can hold a list.
<Drakken>
I guess there are top-level expressions, so maybe that's possible.
<Drakken>
I mean the cons node.
<thelema_>
just have your patent list be able to have elements that are lists themselves
<thelema_>
*parent
<Drakken>
then I need to redefine the struct...end parser.
<Drakken>
That pattern could apply to any ast node that contains a list.
<Drakken>
So it would be _very_ convenient to have some kind of generic syntax for inserting node sublists.
<thelema_>
i.e list literal with a @(foo) in it to say insert the elements from list here?
<Drakken>
No, I just want a top-level macro to expand to several top-level nodes.
ocp has quit [Read error: Operation timed out]
<Drakken>
In the middle of an ordinary struct expression or at the top level of a .ml file.
benozol has quit [Quit: Konversation terminated!]
<thelema_>
I don't get it, but I gotta go; maybe write an example that clarifies things, and I can see what ideas I have when I get back in a couple hours
<Drakken>
If (m x y z) expands to '((foo x) (foo y) (foo z)), then
<Drakken>
oops
djcoin has quit [Quit: WeeChat 0.3.2]
<Drakken>
then '(a b @(m x y z) c d) expands to (a b (foo x) (foo y) (foo z) c d)
<thelema_>
ocaml is not lisp
<Drakken>
camlp4 is a macro system.
<thelema_>
an ocaml example, please
<Drakken>
I want to declare several values.
<Drakken>
DECLARE foo bar gak urp END;
<Drakken>
value foo = M.declare "foo"; value bar = M.declare "bar"; value gak = M.declare "gak"; value urp = M.declare "urp";
<Drakken>
That's the expansion.
lorill has joined #ocaml
<Drakken>
Actually, M.declare should be M.make. "value = " is the declaration.
cago has quit [Quit: Leaving.]
<hcarty>
Drakken: I haven't done anything with camlp4 in a while, but it seems like that should be fairly straightforward.
asdfhjkl has joined #ocaml
avsm has quit [Quit: Leaving.]
andreypopp has quit [Quit: Computer has gone to sleep.]
rjohnson has quit [Ping timeout: 240 seconds]
rjohnson has joined #ocaml
iago has joined #ocaml
cdidd has quit [Remote host closed the connection]
ulfdoz_ has joined #ocaml
ulfdoz has quit [Read error: Operation timed out]
ulfdoz_ is now known as ulfdoz
Cyanure has quit [Ping timeout: 246 seconds]
<Drakken>
hcarty I hope you're right, but I haven't figured it out yet. I checked out the expansion of EXTEND, but that's all expr nodes, inside a "do" expression. No str_item nodes, and no splicing.
NihilistDandy has joined #ocaml
snearch has quit [Quit: Verlassend]
Submarine has quit [Quit: Leaving]
<Drakken>
So far, it looks like I'll have to hack both implem and str_item, and ideally also str_items. I guess that's better than nothing.
ftrvxmtrx has quit [Quit: Leaving]
<NihilistDandy>
I'm making a function as part of a small RPN calculator that uses a list to represent the stack. The current version I have is (fun x -> stack := x::!stack; !stack); But I don't really know how to use refs effectively, yet, so this is obviously not very good
<NihilistDandy>
Any pointers, or good explanations of basic ref usage? The manual jumped around a bit for my tastes
<_habnabit>
NihilistDandy, you could just not use refs at all! functional code owns
<NihilistDandy>
I know
<NihilistDandy>
It's homework, though :/
<NihilistDandy>
I'd do it functionally, myself. But we have to use the provided code
<_habnabit>
gross
<NihilistDandy>
I imagine if I just get how to enter a number into the list, everything else will more or less be obvious
<NihilistDandy>
It's getting that first step that I'm having trouble with
<mrvn>
I only see warnings there so why does it fail?
sepp2k has joined #ocaml
<Kakadu>
mrvn: I've set option that warnings are errors
Zedrikov has quit [Quit: Bye all, see you next time!]
<mrvn>
then what are confused about?
<Kakadu>
why this warnings present?
<mrvn>
because _ will match anything, even constuctors you might add in the future and don't want to match
iago has quit [Ping timeout: 276 seconds]
avsm has joined #ocaml
lorill has quit [Quit: Ex-Chat]
iago has joined #ocaml
ftrvxmtrx has joined #ocaml
ulfdoz has quit [Ping timeout: 246 seconds]
Kakadu has quit [Quit: Konversation terminated!]
Snark has quit [Quit: Quitte]
Submarine has joined #ocaml
mmajchrzak has joined #ocaml
yezariaely has joined #ocaml
<yezariaely>
in ocamltop I cannot use arrow keys and such. Only terminal escape sequences occur. (Both ubuntu and MacOs X with ocaml 3.12.0) any ideas how I can get this working?
<_habnabit>
yezariaely, rlwrap
<adrien>
or ledit
<_habnabit>
AFAIK you can't get the toplevel to use readline
<adrien>
(or utop)
<xenocons>
+1 rlwrap
<yezariaely>
you guys made my day! thanks, I have been looking for that for so long!
skchrko has quit [Quit: ChatZilla 0.9.88.1 [Firefox 11.0/20120314111819]]
<xenocons>
rlwrap works well with moscow ml repl too
<xenocons>
and fsharps fsi
albacker has quit [Ping timeout: 246 seconds]
Cyanure has quit [Remote host closed the connection]
Submarine has quit [Ping timeout: 260 seconds]
Xizor has quit []
xenocons has quit [Ping timeout: 264 seconds]
xenocons has joined #ocaml
sepp2k has quit [Quit: Leaving.]
silver_ has quit [Remote host closed the connection]
srcerer has quit [Ping timeout: 245 seconds]
smondet has quit [Remote host closed the connection]