gildor changed the topic of #ocaml to: "Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 3.12.0+rc1 http://permalink.gmane.org/gmane.comp.lang.caml.inria/49387
litM has quit [Quit: Page closed]
|marius| has quit [Remote host closed the connection]
Anarchos has quit [Quit: Vision[0.9.7-H-090423]: i've been blurred!]
bluestorm has quit [Quit: Leaving]
chee has quit [Ping timeout: 265 seconds]
ftrvxmtrx has quit [Ping timeout: 265 seconds]
aym has joined #ocaml
ftrvxmtrx has joined #ocaml
joewilliams_away is now known as joewilliams
chee has joined #ocaml
joewilliams is now known as joewilliams_away
aym has quit [Quit: aym]
Yoric has joined #ocaml
Yoric has quit [Client Quit]
ViciousPlant has joined #ocaml
verte has joined #ocaml
mihamina has quit [Ping timeout: 264 seconds]
toner has quit [Ping timeout: 276 seconds]
ViciousPlant has quit [Ping timeout: 260 seconds]
ViciousPlant has joined #ocaml
toner has joined #ocaml
mihamina has joined #ocaml
Modius has joined #ocaml
Modius has quit [Max SendQ exceeded]
Modius has joined #ocaml
mjonsson has quit [Quit: Leaving]
jakedouglas has quit [Read error: Connection reset by peer]
jakedouglas has joined #ocaml
chee has quit [Read error: Connection reset by peer]
seafood has quit [Quit: seafood]
seafood has joined #ocaml
seafood has quit [Quit: seafood]
ygrek_ has joined #ocaml
Amorphous has quit [Ping timeout: 260 seconds]
chee has joined #ocaml
toner has quit [Ping timeout: 276 seconds]
Amorphous has joined #ocaml
Associat0r has quit [Quit: Associat0r]
ulfdoz has joined #ocaml
ygrek_ has quit [Remote host closed the connection]
coucou747 has joined #ocaml
xmarteo has joined #ocaml
jakedouglas has quit [Quit: Leaving.]
ygrek has joined #ocaml
sdschulze has joined #ocaml
ygrek has quit [Remote host closed the connection]
ygrek has joined #ocaml
ikaros has joined #ocaml
thelema_ has joined #ocaml
thelema has quit [Read error: Connection reset by peer]
Anarchos has joined #ocaml
sdschulz` has joined #ocaml
sdschulze has quit [Ping timeout: 240 seconds]
ikaros has quit [Quit: Leave the magic to Houdini]
sepp2k has joined #ocaml
Yoric has joined #ocaml
Tianon has quit [Ping timeout: 260 seconds]
Tianon has joined #ocaml
Tianon has quit [Changing host]
Tianon has joined #ocaml
Smerdyakov has joined #ocaml
ulfdoz_ has joined #ocaml
ulfdoz has quit [Ping timeout: 265 seconds]
ulfdoz_ has quit [Client Quit]
ulfdoz has joined #ocaml
<qwr> hm, dark, i think smerdyakov could argue, why mutable bindings are bad :)
<Smerdyakov> The same reason any programming language feature is bad: hard-to-use proof rules.
Vassia has joined #ocaml
<qwr> :)
Vassia has quit [Ping timeout: 258 seconds]
<Anarchos> Smerdyakov which feature do you talk about ?
<Smerdyakov> I was responding to qwr's 2nd last line above.
<coucou747> qwr, the same reasean as goto
chee has quit [Ping timeout: 265 seconds]
<coucou747> affect is bad for value and for "next expression to evaluate"
<Anarchos> Smerdyakov what is a mutable binding ?
<Smerdyakov> I'll let qwr answer that. My answer was generic enough that I didn't need to know the details. :)
<Anarchos> Smerdyakov ok ...
<Anarchos> i get back away to my debugging of ocamlrun...
sdschulz` has left #ocaml []
sdschulze has joined #ocaml
<sdschulze> The question is the language you come from.
<Anarchos> sdschulze which question ?
<sdschulze> If you come from Haskell, you will find mutable objects disgusting.
<sdschulze> If you come from C, then not.
<Anarchos> sdschulze i find them useful when you need global objects, but use them with care
<sdschulze> Functional programming style gives the garbage collector a lot to do.
<sdschulze> esp. because tail-recursive accumulators are not unboxed :(
<verte> maybe, and maybe not
<verte> you can infer linear types in many cases
<Anarchos> Wwhat do you mean by 'tail-recursive accumulators are not unboxed ' ?
<sdschulze> Anarchos: Run the float-add.ml with some bigger number (as command-line argument) and watch.
<sdschulze> It generates garbage on each tail-recursive call.
<sdschulze> I wonder if there's a fundamental problem that stops it from unboxing.
chee has joined #ocaml
<sdschulze> Or does it see "oh, a funcall, so box" before seeing it's tail-recursive?
<qwr> Anarchos: ocaml don't have what i meant with mutable binding...
<qwr> Anarchos: but any non-const C variable would be that
<sdschulze> qwr: You mean implicit references?
<Anarchos> qwr let a = ref 0 or let a = {mutable a=0} ??
<sdschulze> SML doesn't even have mutable record fields...
<qwr> Anarchos: well, here you have to dereference it
<Anarchos> let mutable a = 0;;
<Anarchos> no dereference :)
<verte> sdschulze: you'd probably have to go sourcecode diving to find out, but that shouldn't be difficult to implement
<qwr> Anarchos: Syntax error, tells my ocaml :)
<Anarchos> and your evil add pushes on the stack the n which is a float. I wonder if it will push on the stack if it were an int
seafood has joined #ocaml
<sdschulze> verte: It is? In the article, Xavier explicitly discourages the use of tail-recursion for tight number-crunching.
<sdschulze> verte: If it was easy to implement, he probably would've done so by now insted of giving such an advice.
<qwr> Anarchos: but val mutable in object is practically what i meant
<sdschulze> (or at least would have written: FIXME)
<sdschulze> Anarchos: int's never generate garbage. They're always unboxed.
<qwr> Anarchos: as it is a binding inside of the object scope
<verte> sdschulze: who knows his motives. maybe he considers it an unnecessary optimisation.
<sdschulze> Anarchos: And it doesn't push on the stack but on the heap -- thanks to tail recursion.
<Anarchos> i am not so used to ocaml internals :)
<sdschulze> verte: Or there's a subtle obstacle he didn't care to elaborate on there.
<qwr> (the discussion actually started few days ago from dark's question, and i remembered that smerdyakov had few years ago stated something on similar topic...)
Associat0r has joined #ocaml
<verte> sdschulze: at a platform level, you usually generate an entry point to the function that supports the most general calling convention, and one that implements the most specific, and have the former call the latter. I guess when bytecode is the target that isn't an optimisation, though.
<sdschulze> Right, read about that.
<sdschulze> But then I'd almost consider it to be easier to return to the innermost entry point when doing tail recursion.
<verte> that's the idea
<verte> there was a paper on ltu recently about calling conventions as types you might like
<sdschulze> "Types are Calling Conventions"?
<verte> sounds good
<Smerdyakov> "Types are calling conventions" was already implicit in Typed Assembly Language. Does this paper add anything new worth reading?
<verte> haven't read about TAL, so can't say
<verte> it's not a real revelation, so possibly not
<verte> but it would have dealt with the aforementioned issue
<sdschulze> It's quite Haskell-centric.
<Anarchos> who have already debugged the gc ?
Modius has quit [Quit: I'm big in Japan]
qwr has quit [Remote host closed the connection]
seafood has quit [Quit: seafood]
verte has quit [Quit: ~~~ Crash in JIT!]
Anarchos has quit [Quit: Vision[0.9.7-H-090423]: i've been blurred!]
Yoric has quit [Quit: Yoric]
Yoric has joined #ocaml
Yoric has quit [Remote host closed the connection]
Yoric has joined #ocaml
Anarchos has joined #ocaml
Vassia has joined #ocaml
Vassia has quit [Ping timeout: 260 seconds]
aym has joined #ocaml
<sdschulze> quick question: Does ocamlopt directly compile to native code or via bytecode?
<mfp> sdschulze: directly
<mfp> (via asm)
<sdschulze> Is there any paper on how the compiler works internally?
<Anarchos> sdschulze now, a beginning of information at google 'ocaml+internals'
<mfp> AFAIK there's nothing about the OCaml compiler itself in the literature. There are papers about its GC and about the compilation strategy in CAML IIRC.
Yoric has quit [Ping timeout: 240 seconds]
Yoric has joined #ocaml
Yoric has quit [Client Quit]
<sdschulze> OK, I know the stuff described in "interfacing with C".
<Anarchos> sdschulze i too, i try to get ocaml gc working with C++ multithread api ...
thelema_ is now known as thelema
<afreq> can anyone see why my toggle button isn't lining up on the right http://pastebin.com/vmuUPGG4
<afreq> sorry wrong window
Smerdyakov has quit [Ping timeout: 265 seconds]
Smerdyakov has joined #ocaml
Smerdyakov has quit [Client Quit]
seafood has joined #ocaml
seafood has quit [Quit: seafood]
Vassia has joined #ocaml
poincare101 has joined #ocaml
poincare101 has left #ocaml []
Vassia has quit [Ping timeout: 265 seconds]
aym has quit [Quit: aym]
jakedouglas has joined #ocaml
ztfw has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
philtor has joined #ocaml
philtor has quit [Ping timeout: 260 seconds]
Vassia has joined #ocaml
philtor has joined #ocaml
chee has quit [Quit: <3 =^.^= Ɛ>]
Vassia has quit [Ping timeout: 276 seconds]
philtor has quit [Ping timeout: 260 seconds]
ztfw has joined #ocaml
philtor has joined #ocaml
dskippy has joined #ocaml
<dskippy> I am having trouble installing OCaml libsndfile. I downloaded it from this site http://www.mega-nerd.com/tmp/ and I'm trying to use ocamlfind install to install it. I figure that's the right way to do things. I ran make and it built the binaries. Now I'm trying "ocamlfind install <directory>" and it says "The META file is missing.
<ygrek> ocamlfind install <package_name> <META file> <cmi cmx etc files>
<ygrek> rtfm
<flux> dskippy, if the package doesn't come with a META file, you either need to construct one yourself (or pick one from a distribution if they have one) or not use ocamlfind with the package..
<dskippy> What do I use for the package name? Just make one up, probably libsndfile or libsndfile-ocaml and then that's what I use to reference it from now on?
<flux> libsndfile or sndfile both sound fine
<dskippy> flux: Thanks.
<flux> libsndfile-ocaml sounds a bit redundant for ocamls package system needs :)
<dskippy> flux: Yeah, I just wish this set of bindings were packaged so that my installation won't be different from someone else's.
<dskippy> flux: My build scripts won't be portable and other problems like that exist. Wishing there was one right way.
<flux> yes, that's not so great. but it doesn't appear to be packaged in ubuntu atleast.
<dskippy> flux: Yeah it's not.
ulfdoz has quit [Ping timeout: 265 seconds]
<ygrek> lib.. is also redundant cause all packages are libs :)
<flux> are syntax extensions libs also?-)
<flux> but I'd say it depends more on if the library refers to itself as libfoo or foo
<ygrek> they are whatever-syntax anyway :)
ch_ee has joined #ocaml
<dskippy> Hey. flux, after I do the install, I try to build with "ocamlfind ocamlc -linkpkg -package sndfile mysource.ml" and I get "gcc: sndfile_stub.o: No such file or directory" but that file is in the directory I install my library to.
<flux> dskippy, possibly it depends on how you produce the .cmo/.cma-files.. I do this so rarely that I often forget the details, sorry.
<dskippy> That's alright. I'll keep at it. Thanks for the help.
Vassia has joined #ocaml
Vassia has quit [Ping timeout: 276 seconds]
ygrek has quit [Ping timeout: 245 seconds]
barismetin has joined #ocaml
valross has joined #ocaml
barismetin has quit [Remote host closed the connection]
sepp2k has quit [Quit: Leaving.]
seafood has joined #ocaml
jakedouglas has quit [Quit: Leaving.]
ch_ee has left #ocaml []
chee has joined #ocaml
chee is now known as Guest19334
xmarteo has quit [Quit: Debian GNU/Hurd is Good.]
Guest19334 has quit [Changing host]
Guest19334 has joined #ocaml
Guest19334 is now known as cchee
seafood has quit [Quit: seafood]
Anarchos has quit [Quit: Vision[0.9.7-H-090423]: i've been blurred!]
coucou747 has quit [Remote host closed the connection]