<metasyntax>
Is there any way to get a backtrace of "where" an uncaught exception is raised from, using ocamldebug?
<elehack>
metasyntax: not sure on ocamldebug specifically - I seem to remember it usually printing a stack trace - but you get stack traces for uncaught OCaml exceptions by setting the OCAMLRUNPARAM environment variable to 'b'.
<metasyntax>
Ah, it becomes available when I "backstep."
<metasyntax>
elehack: Oh, cool.
<metasyntax>
Or use -b to ocamlrun it seems.
<elehack>
yeah
<elehack>
it saves me much time.
<elehack>
you can also get the backtrace in code, if you want to print backtraces in your own exception handlers.
Associat0r has quit [Quit: Associat0r]
alexyk has joined #ocaml
jeddhaberstro has joined #ocaml
<thelema>
elehack: should we require camomile 0.8.1?
<elehack>
thelema: I think it's probably better to hold off a bit, unless there are things we particularly need.
<elehack>
my general thought is to stay compatible with things that are shipped for some time.
<elehack>
that shouldn't hold us back from adding new features which will provide notable improvements.
<thelema>
hmm, how do we play nice with people who want standalone executables?
mjonsson has joined #ocaml
<thelema>
a separate branch, and they can compile batteries themselves?
<elehack>
if that's necessary. is 0.8.1 incompatible with 0.7.1?
<thelema>
I'm trying to decide how to handle this:
<thelema>
the parts we'll be using won't be in 0.7.1
<elehack>
hrm :-S
<elehack>
can the incompatibility be abstracted and let the build system figure out how to put it together for a particular Camomile version?
<thelema>
we could have two different batCamomile files...
<elehack>
that would work.
<elehack>
it'd be either that or using camlp4.macro
<elehack>
and adding a bit of sophistication to the build system.
<elehack>
compatibility and improvement are an interesting balance. I don't want excessive obsession with compatibility to hold Batteries back, but I'd rather not see unnecessary incompatibility either.
<thelema>
one simple, short-term solution is to add a make target that replaces batCamomile with the 0.8.1-compatible version
<elehack>
hrm, that would mess up Git checkouts :-S
<elehack>
we can have batCamomile.0.7.ml and batCamomile.0.8.ml, and an ocamlbuild target which symlinks or copies the right one in place.
<thelema>
how? if you didn't make that target, everything would work for 0.7
<elehack>
yeah
<elehack>
but 0.8 users would have an extraneous modification
<thelema>
true. 0.8 was just released, only few people will use it.
<elehack>
true.
<thelema>
you're right that we want auto-detection in the long run
<thelema>
well, we want 0.8.1 only in the long run
<elehack>
yeah
<thelema>
(at least I want that)
<elehack>
I agree that 0.8.1-only should happen sometime.
<thelema>
if we want to keep ubuntu/debian compatibility, that sometime will be a long ways off
<elehack>
yeah
mjonsson has left #ocaml []
mjonsson has joined #ocaml
<elehack>
as I see it, with all the bugfixing and enhancements and tweaks, Batteries is in a bit of a state of flux right now. which gives us more flexibility in updating dependencies.
<thelema>
I expect batteries will be in a state of flux for a while.
mjonsson has quit [Quit: Leaving]
* elehack
is hoping that it will be able to settle down for 2.0
<thelema>
me too.
<elehack>
(even if it means that 2.0 doesn't happen for quite a while
<thelema>
I don't mind making 1.x releases...
<elehack>
what about the Semantic Versioning guarantees? they seem to somewhat hamper our ability to go fix broken APIs before 2.0.
<elehack>
although we also don't want everyone's code breaking all the time either.
<thelema>
true. But we can add a lot of improved functions and deprecate broken APIs before 2.0
mjonsson has joined #ocaml
<elehack>
yeah
<thelema>
hopefully we won't deprecate anything people are actually using and 2.0 will be relatively painless
mjonsson has quit [Client Quit]
<elehack>
yes, that would be good. although some things, like making BatSubstring smell more like OCaml than standard ML, will probably necessitate some changes.
<elehack>
(I don't know if many people besides me are using that code, though)
<thelema>
We can make a new module batSlice for string slices that smells like OCaml
<elehack>
that's a good idea.
<thelema>
names are in abundance
* elehack
would suggest thread, for lightweight/partial rope, but that name is already taken
<thelema>
yes, there's a semantic clash there.
<thelema>
segment
<elehack>
but yeah, with new naming it becomes easier to do some of the heavy cleanup.
<thelema>
I've noticed other projects working this way - one major piece of code is just superceded by another major piece of code with a similar name
<thelema>
projects like... Perl and Python
<elehack>
yep, either that, or they find somewhere new in the namespace to stash it.
_unK has quit [Remote host closed the connection]
chee has quit [Ping timeout: 265 seconds]
chee has joined #ocaml
alexyk has quit [Quit: alexyk]
chee has quit [Quit: <3 =^.^= ?>]
elehack has quit [Quit: not a typewriter]
thrasibule has joined #ocaml
jakedouglas has joined #ocaml
thrasibule has quit [Ping timeout: 240 seconds]
thrasibule has joined #ocaml
alexyk has joined #ocaml
ulfdoz has joined #ocaml
jeddhaberstro has quit [Quit: jeddhaberstro]
jeddhaberstro has joined #ocaml
ygrek has joined #ocaml
alexyk has quit [Quit: alexyk]
alexyk has joined #ocaml
alexyk has quit [Client Quit]
jakedouglas has quit [Quit: Leaving.]
ulfdoz has quit [Ping timeout: 265 seconds]
ulfdoz has joined #ocaml
jeddhaberstro has quit [Quit: jeddhaberstro]
aja has joined #ocaml
coucou747 has joined #ocaml
ulfdoz has quit [Ping timeout: 240 seconds]
Amorphous has quit [Ping timeout: 248 seconds]
aja has quit [Read error: Connection reset by peer]
Amorphous has joined #ocaml
ttamttam has joined #ocaml
ftrvxmtrx has quit [Quit: Leaving]
valross has quit [Quit: Ex-Chat]
Associat0r has joined #ocaml
avsm has joined #ocaml
coucou747 has quit [Remote host closed the connection]
ftrvxmtrx has joined #ocaml
seafood has quit [Quit: seafood]
Yoric has joined #ocaml
ygrek has quit [Ping timeout: 245 seconds]
itewsh has joined #ocaml
filp has joined #ocaml
fraggle_ has quit [Quit: -ENOBRAIN]
ygrek has joined #ocaml
emias has quit [Remote host closed the connection]
fraggle_ has joined #ocaml
fraggle_laptop has quit [Ping timeout: 260 seconds]
emias has joined #ocaml
oc13 has joined #ocaml
ygrek has quit [Ping timeout: 245 seconds]
ikaros has joined #ocaml
ygrek has joined #ocaml
seafood has joined #ocaml
verte has joined #ocaml
fraggle_laptop has joined #ocaml
ikaros_ has joined #ocaml
ikaros has quit [Ping timeout: 240 seconds]
seafood has quit [Quit: seafood]
seafood has joined #ocaml
Edward_ has joined #ocaml
sepp2k has joined #ocaml
seafood has quit [Quit: seafood]
verte has quit [Quit: ~~~ Crash in JIT!]
verte has joined #ocaml
ttamttam has quit [Remote host closed the connection]
_andre has joined #ocaml
Yoric has quit [Read error: Connection reset by peer]
Yoric has joined #ocaml
derdon has joined #ocaml
ygrek has quit [Remote host closed the connection]
_unK has joined #ocaml
despa has joined #ocaml
despa has quit [Quit: leaving]
despa has joined #ocaml
alexyk has joined #ocaml
derdon has quit [Ping timeout: 245 seconds]
fraggle_laptop has quit [Ping timeout: 260 seconds]
alexyk has quit [Quit: alexyk]
fraggle_laptop has joined #ocaml
philed has joined #ocaml
_unK has quit [Remote host closed the connection]
derdon has joined #ocaml
thrasibule has quit [Ping timeout: 265 seconds]
patronus has quit [Ping timeout: 260 seconds]
patronus has joined #ocaml
verte has quit [Quit: ~~~ Crash in JIT!]
Edward_ has quit []
avsm has quit [Quit: Leaving.]
avsm has joined #ocaml
avsm has quit [Client Quit]
ski has quit [Ping timeout: 264 seconds]
ccasin has joined #ocaml
alexyk has joined #ocaml
schmrkc has quit [Ping timeout: 260 seconds]
filp has quit [Quit: Bye]
schmrkc has joined #ocaml
schmrkc has quit [Changing host]
schmrkc has joined #ocaml
ikaros_ has quit [Quit: Leave the magic to Houdini]
itewsh has quit [Quit: o/]
ftrvxmtrx has quit [Quit: Leaving]
avsm has joined #ocaml
Yoric has quit [Quit: Yoric]
Yoric has joined #ocaml
derdon has quit [Ping timeout: 252 seconds]
ikaros has joined #ocaml
jakedouglas has joined #ocaml
f[x] has quit [Read error: Connection reset by peer]
joewilliams_away is now known as joewilliams
patronus has quit [Ping timeout: 240 seconds]
patronus has joined #ocaml
Edward_ has joined #ocaml
ikaros has quit [Quit: Leave the magic to Houdini]
oriba has joined #ocaml
<hcarty>
Does anyone here have a reference for caml_register_global_root and related functions, outside of the official manual? After reading the manual I'm not clear on their purpose.
Yoric has quit [Remote host closed the connection]
Yoric has joined #ocaml
derdon has joined #ocaml
<avsm>
If you want to mark an OCaml value that should never be garbage collected, you use that
<avsm>
even if nothing else is referencing it in the main OCaml program
<avsm>
remember, any time you enter the runtime from a C binding, it can trigger a GC which collects a value. so temporary values must be marked as roots
<hcarty>
avsm: Will it prevent a value from being moved by the garbage collector?
<hcarty>
avsm: For example, if I pass a string to a value (string or array) and the C function keeps a pointer to that in some other structure on the C side
srcerer has quit [Read error: Connection reset by peer]
jonafan has joined #ocaml
srcerer has joined #ocaml
Edward_ has quit []
sepp2k has quit [Remote host closed the connection]
<mfp>
hcarty: the OCaml runtime will update the pointer for you if it moves the value: you give caml_register_global_root the address of the value variable
<avsm>
yup. and if the value variable doesnt change, you can register it as a generational root so it's scanned less often
<avsm>
look at the ocaml-sqlite3 bindings, they're well written and use generational roots
<avsm>
for user-defined functions, iirc
<hcarty>
avsm, mfp: Thank you both
oriba has quit [Quit: Verlassend]
Edward_ has joined #ocaml
sepp2k has joined #ocaml
bzzbzz has quit [Read error: Connection reset by peer]
bzzbzz has joined #ocaml
derdon has quit [Ping timeout: 276 seconds]
JohnnyL has joined #ocaml
<JohnnyL>
how is ocaml with parallel processing?
ygrek has joined #ocaml
Edward_ has quit []
<Yoric>
JohnnyL: not very good. For this purpose, you should rather use JoCaml, BSML or OCamlp3l.
Yoric has quit [Quit: Yoric]
<hcarty>
The preludeml library also has a few simple fork-based parallel map and iter functions
_unK has joined #ocaml
jakedouglas1 has joined #ocaml
sepp2k1 has joined #ocaml
itewsh has joined #ocaml
sepp2k has quit [Ping timeout: 264 seconds]
jakedouglas has quit [Ping timeout: 240 seconds]
avsm has quit [Quit: Leaving.]
<JohnnyL>
hcarty: what's your view of using the Actor model in Ocaml?
ftrvxmtrx has joined #ocaml
francois has joined #ocaml
ulfdoz has joined #ocaml
<hcarty>
JohnnyL: I haven't worked with it, but I've seen others mention using JoCaml and Lwt in that context.
<hcarty>
I'm not very familiar with the concept or terminology, so that is about as much as I know
<JohnnyL>
hcarty: fair enough.
<adrien>
I don't know much about this either, but afaik, if you're after an actor model, you have to check out jocaml
<JohnnyL>
ok
<JohnnyL>
the only language i've seen that is good for parallelism on the server is haskell (and perhaps Clean).
thrope has joined #ocaml
<mfp>
JohnnyL: GHC won't scale beyond a few cores since the GC is not concurrent, though
<mfp>
JohnnyL: the managed platforms with good parallelism (but not necessarily the right abstractions on top of it to tame it) boil down to the JVM, the CLR and things w/o a global GC like Erlang --- all because writing a concurrent GC with good throughput is so hard
alexyk has quit [Quit: alexyk]
drhodes has joined #ocaml
Yoric has joined #ocaml
ftrvxmtrx has quit [Ping timeout: 240 seconds]
ftrvxmtrx has joined #ocaml
derdon has joined #ocaml
_andre has quit [Quit: Lost terminal]
<JohnnyL>
I'm not much of an Erlang fan. but yeah, Erlang is sweet in that area, in particular, swapping code in and out of production.
<JohnnyL>
mfp, would you say something like modern reverse proxy servers would take over the bulk of system operations (I'm not sure if any are more granular than ip addresses)?
ccasin has quit [Quit: Leaving]
oc13 has quit [Ping timeout: 240 seconds]
ygrek has quit [Ping timeout: 245 seconds]
<Associat0r>
don't forget F#
philed has quit [Ping timeout: 265 seconds]
francois has quit [Ping timeout: 276 seconds]
ttamttam has joined #ocaml
alexyk has joined #ocaml
ttamttam has quit [Quit: Leaving.]
Yoric has quit [Quit: Yoric]
alexyk has quit [Quit: alexyk]
seafood has joined #ocaml
coucou747 has joined #ocaml
thrope has quit [Read error: Operation timed out]
thrope has joined #ocaml
derdon has quit [Ping timeout: 276 seconds]
thrope has quit [Quit: thrope]
m00npirate has joined #ocaml
<m00npirate>
is there a way to run a method every time an instance of a class is created (call a method in the constructor)
<julm>
there is an [initializer] keyword if I remember correctly; just call self#your_method within it
thrope has joined #ocaml
<m00npirate>
i thought initializers were the object's arguments
thrope has quit [Client Quit]
coucou747 has quit [Remote host closed the connection]
<m00npirate>
no you are right, thank you julm
<julm>
yw
m00npirate has left #ocaml []
itewsh has quit [Quit: o/]
patronus has quit [Remote host closed the connection]