mbishop changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | Grab OCaml 3.10.2 from http://caml.inria.fr/ocaml/release.html (featuring new camlp4 and more!)
postalchris has quit ["Leaving."]
Jessehk has joined #ocaml
Jessehk has left #ocaml []
rodge has quit ["Leaving."]
palomer has quit [Remote closed the connection]
Amorphous has quit [Read error: 110 (Connection timed out)]
Amorphous has joined #ocaml
nuncanada has joined #ocaml
palomer has joined #ocaml
<palomer> I'm getting the exception End_of_file
<palomer> but I can't find it in the docs
|jeremiah has quit [Read error: 110 (Connection timed out)]
<thelema> palomer: reading from a file?
<orbitz> palomer: it's what you get when you reach EOF
<orbitz> hence the name
<palomer> when you reach EOF and you're still trying to read?
<thelema> yes
<orbitz> palomer: that is ocaml 101, c'mo now where you been?!
seafood_ has joined #ocaml
<palomer> is it possible to build the latest ocaml CVS with godi?
<thelema> it's possible to build it without godi...
<palomer> but then I need to rebuild everything else
<palomer> which is a bummer
<palomer> amiright?
<thelema> you think that if you rebuild ocaml with godi, you'll avoid rebuilding everything else?
<palomer> godi will rebuild everything else
<palomer> no?
* thelema doesn't know - he doesn't use godi
<palomer> hrmph
<palomer> but it doesn't seem that godi supports ocaml cvs
<palomer> I can't win!
<palomer> I just want backtraces and not too much troubel
<palomer> trouble
<thelema> what version are you using now?
<orbitz> 3.10 has backtraces doesn't it?
<thelema> yes
<thelema> and even older ocaml (have to look up, but I think back to 3.08) has bytecode backtraces
<palomer> HOW?
<palomer> I'm using 3.09
<thelema> OCAMLPARAM="b"
<thelema> err, OCAMLRUNPARAM="b"
<thelema> (environment variable)
<thelema> also, compile with -g
<palomer> my exceptions aren't reaching the toplevel though
<palomer> thelema, ocamlrun -b a.out <--will this also work?
<thelema> probably.
<thelema> if the exceptions don't kill the program, you will need the code in CVS to print backtraces for caught exceptions
<orbitz> how will any version of ocaml help you with your back traqces if they aren't reaching top level?
<orbitz> oh ok
<thelema> orbitz: there's some new code in cvs to do exactly that.
<palomer> yeah, since it's not reaching the toplevel I have to catch them
<thelema>
<thelema> +Standard library:
<thelema> +- Printexc library: new functions "print_backtrace" and "get_backtrace"
<thelema> + to obtain a stack backtrace of the most recently raised exception.
<thelema> + New function "record_backtrace" to turn the exception backtrace mechanism
<thelema> + on or off from within a program.
<palomer> yeah
<palomer> that's why I want ocaml cvs
<thelema> just get started rebuilding.
<palomer> but then I need to rebuild lablgtk and extlib
<palomer> and then I'll have to fiddle with stuff
<palomer> I'm spending my life fiddling with stuff
<thelema> backtraces is one thing that should definitely be on by default.
pango_ has quit [Remote closed the connection]
pango_ has joined #ocaml
<palomer> for example, If I rebuild ocaml/libraries by hand
<palomer> then I have to stop using apt for my ocaml stuff
structured has quit [Read error: 110 (Connection timed out)]
authentic has left #ocaml []
doy has joined #ocaml
shortcircuit has quit [Read error: 110 (Connection timed out)]
authentic has joined #ocaml
<doy> does anyone here use lablgtk-gl under ubuntu?
Proteus has quit ["Leaving"]
jdrake has quit [Read error: 113 (No route to host)]
dobblego has joined #ocaml
dobblego has left #ocaml []
ygrek has joined #ocaml
david33 has quit []
david33 has joined #ocaml
jonafan_ has joined #ocaml
shortcircuit has joined #ocaml
jonafan has quit [Read error: 110 (Connection timed out)]
OceanSpray has quit [Read error: 104 (Connection reset by peer)]
jlouis has quit [Remote closed the connection]
al-maisan has joined #ocaml
ozzloy has quit [Broken pipe]
filp has joined #ocaml
ozzloy has joined #ocaml
ozzloy has quit [Read error: 104 (Connection reset by peer)]
filp has quit [Read error: 104 (Connection reset by peer)]
filp has joined #ocaml
ozzloy has joined #ocaml
ozzloy has quit [Remote closed the connection]
marmottine has joined #ocaml
OChameau has joined #ocaml
seafood_ has quit []
rwmjones_ has joined #ocaml
mbishop has quit [Read error: 110 (Connection timed out)]
mbishop has joined #ocaml
structured has joined #ocaml
Yoric[DT] has joined #ocaml
m3ga has joined #ocaml
Yoric[DT] has quit [Read error: 113 (No route to host)]
Linktim has joined #ocaml
sporkmonger has quit []
rwmjones_ has quit ["Closed connection"]
al-maisan has quit [Read error: 113 (No route to host)]
Snark has joined #ocaml
LeCamarade has joined #ocaml
al-maisan has joined #ocaml
al-maisan has quit [Client Quit]
al-maisan has joined #ocaml
RobertFischer has joined #ocaml
LeCamarade has quit ["#ocaml"]
tty56 has joined #ocaml
sporkmonger has joined #ocaml
rwmjones_ has joined #ocaml
m3ga has quit ["disappearing into the sunset"]
rwmjones_ has quit [Read error: 104 (Connection reset by peer)]
ppsmimou has quit ["Leaving"]
ppsmimou has joined #ocaml
ppsmimou has quit [Remote closed the connection]
<flux> why would you want to disable backtrace recording? it's a significant performance hit?
ppsmimou has joined #ocaml
rwmjones_ has joined #ocaml
Yoric[DT] has joined #ocaml
ygrek has quit [Remote closed the connection]
Yoric[DT] has quit [Read error: 110 (Connection timed out)]
Yoric[DT] has joined #ocaml
OChameau has quit [Read error: 110 (Connection timed out)]
OChameau has joined #ocaml
<Yoric[DT]> mmmhhh....
<Yoric[DT]> Does anyone know how CIL handles variable definitions ?
<Yoric[DT]> (local variables, that is)
<Smerdyakov> Have you read the ocamldoc page for the [Cil] module? It's worth doing.
<Yoric[DT]> I have.
<Yoric[DT]> I keep reading them
<Yoric[DT]> I may have missed something, of course.
<struk_atwork> Yoric[DT], what is CIL? You've been talking about it for days and I've been curious the whole time
<Yoric[DT]> C Intermediate Language
<Yoric[DT]> It's a library used to parse and/or generate programmatically and/or transform and/or analyze C code.
<struk_atwork> woah..what are you using it for personally/
<Yoric[DT]> I'm writing a static analyzer for types-and-effects in C.
<Yoric[DT]> Basically, the objective is to deduce possible system security issues from C code.
<struk_atwork> sounds interesting but daunting
<Yoric[DT]> 6 months of nearly-full-time work.
<Smerdyakov> Yoric[DT], looking at [varinfo] doesn't answer your question? (I'm not sure what the question really is.)
<struk_atwork> Smerdyakov, I think you're that guy I know from CMU
<Smerdyakov> structured, I could be a guy you know from CMU.
<Smerdyakov> Yup, I am!
<Yoric[DT]> My problem is the following: I have a block and I want to know all the local variables defined in that block.
<Smerdyakov> Yoric[DT], the CIL format doesn't include a notion of block-local variables.
<Yoric[DT]> gasp
<Yoric[DT]> ...
<Yoric[DT]> ...
<Yoric[DT]> Well, that probably means I need to fallback to writing a parser by myself :(
mfp_ has joined #ocaml
<Smerdyakov> CIL isn't a parser. It's a compiler to a new, simpler language.
<Smerdyakov> It includes a parser, though.
mfp has quit [Read error: 110 (Connection timed out)]
<Yoric[DT]> I was only interested in the parser + pre-processor part.
<Yoric[DT]> ...
<Yoric[DT]> Well, I guess I'll have to look deeper in CIL after I've finished my current project.
rwmjones_ has quit ["Closed connection"]
<struk_atwork> Smerdyakov, well I finally decided to write something important in ocaml..progress has been slow thus far :)
<Smerdyakov> Yoric[DT], 'cilly' just calls 'gcc -E', so it's not really accurate to say that CIL helps you with preprocessing.
<Smerdyakov> Yoric[DT], you might also be interested in Build Interceptor, another tool from Berkeley designed for tricking complicated build systems into divulging preprocessed C files.
* Yoric[DT] takes a look.
<Yoric[DT]> Thanks.
<Smerdyakov> structured, did I see you with a New York City hostname before?
<Smerdyakov> Er, struk_atwork, not structured.
<struk_atwork> Smerdyakov, yes..been in NYC for a week over a year now
<Smerdyakov> structured, ah. I'm just leaving next week. :)
<struk_atwork> Smerdyakov, great..one less good programmer I could have known around here
Mr_Awesome_ has joined #ocaml
<Smerdyakov> struk_atwork, you've picked the wrong place to find programmers with pride for their craft, I'm afraid.
<struk_atwork> Smerdyakov, well...I wouldn't go quite that far...but I know what you mean. finance especially is full of bizarre set of coders
<Smerdyakov> We're probably going too off-topic now. :)
<Yoric[DT]> :)
<struk_atwork> Smerdyakov, yeah I agree. have you played with any functional implementations with concurrency or code mobility? That has been my recent study the past f ew days
<Smerdyakov> I've used Concurrent ML.
<Smerdyakov> And the internal concurrency library for OCaml at Jane Street.
<struk_atwork> Smerdyakov, so this was code for multiple processors on one machine?
<Smerdyakov> No. That's not part of my definition of "concurrency."
<Smerdyakov> That's "parallelism" in my book, and I think that's the standard terminology in the POPL world, at least.
<struk_atwork> POPL world?
<Smerdyakov> Rough idea of a community of research people, based on who attends the Principles of Programming Languages conference regularly
Mr_Awesome has quit [Read error: 110 (Connection timed out)]
<struk_atwork> ah so concurrency simply implies two running processes which may terminate in non determined order...could be parallel, could not be depending on architecture
<Smerdyakov> Sure, except I don't think that "terminate" is the right word.
<struk_atwork> Smerdyakov, I've been reviewing jocaml but the join calculus is still a new grammar to me
<orbitz> did you see Vodka? the programming langauge
<struk_atwork> orbitz, no guess I'll google it
<orbitz> it's a thesis project, but I think it's pretty neat
<struk_atwork> orbitz, yeah its neat but obviously not a wise choice quite yet for serious work :) I just wish jocaml had code mobility, but then again I doubt its necessary for most of my goals
Yoric[DT] has quit ["Ex-Chat"]
<orbitz> struk_atwork: use erlang:)
<struk_atwork> orbitz, easier said than done
<orbitz> it has code mobility
<orbitz> wheee
<struk_atwork> orbitz, yes it does...why are there so many languages to choose from??? the thing is, ocaml seems to be the safest when it comes to compatibility with the C/C++/Java universe.
<orbitz> hrm perhaps
<orbitz> FFI in Erlang is too bad
<orbitz> although doesn't Haskell have the bestest FFI of them all?
<struk_atwork> orbitz, who knows...
vbmithr has joined #ocaml
bluestorm has joined #ocaml
pango_ has quit [Remote closed the connection]
Yoric[DT] has joined #ocaml
pango_ has joined #ocaml
Jedai has joined #ocaml
nuncanada has quit ["Leaving"]
mfp__ has joined #ocaml
mfp_ has quit [Read error: 110 (Connection timed out)]
Axioplase has joined #ocaml
filp has quit ["Bye"]
ygrek has joined #ocaml
l_a_m has quit [Read error: 104 (Connection reset by peer)]
Mr_Awesome_ has quit [Read error: 110 (Connection timed out)]
jonafan_ is now known as jonafan
<jonafan> man, that's a harsh error message
<jonafan> "This variable is bound several times in this matching"
LordMetroid has joined #ocaml
al-maisan has quit ["Bye for now!"]
l_a_m has joined #ocaml
<orbitz> jonafan: ouch
OChameau has quit ["Leaving"]
postalchris has joined #ocaml
mfp__ is now known as mfp
<flux> what is harsh about it?
<flux> I can't think of another way to say it which wouldn't be synonymous to that phrase?-)
<flux> unless the matching happens to be for example about function parameters or other related concept..
<orbitz> flux: well we know who's side you are on
LordMetroid has quit ["Leaving"]
Demitar has quit [Read error: 104 (Connection reset by peer)]
jlouis has joined #ocaml
<jonafan> well, the word several implies that i was flagarantly stupid
<jonafan> like i managed to violate a simple rule multiple times in a small space
<Smerdyakov> Nope, you've misunderstood the message.
<Smerdyakov> It's the plurality that is at the core of the problem.
<struk_atwork> jonafan, would you prefer "bound more than once" rather than "several times" ?
<jonafan> yeah, that would sound better
<flux> actually it would be even more accurate, as it implies binding once is ok
<Smerdyakov> flux, binding once _is_ OK.
<jonafan> yeah plus, i only bound it twice, which isn't several
<Smerdyakov> And I think "several" and "more than once" are synonymous, modulo grammatical details.
postalchris has quit ["Leaving."]
<Smerdyakov> jonafan, twice is "several" in standard usage.
<jonafan> but i really don't mind, i just thought it was an amusing repudiation of my code
<flux> http://www.answers.com/several&r=67 suggests in general language several would mean more than two or three
<flux> "more than once" would leave no room for misinterpretation
<struk_atwork> ok enough, this is hardly an "advanced" topic :)
<flux> bug reports go :)
<orbitz> what about "more than acceptable number of times"?:)
<orbitz> or just post a link to doingitwrong.com
<flux> ^ "where the acceptable number of times is more than zero but less than two" ?
<orbitz> yes
<orbitz> althouhg 0 is acceptabel too right?
<flux> hm, yes
<flux> "is more than negative zero but less than positive two"?
<flux> uh, "negative one"
<flux> although I suppose positive one would be more ;)
<flux> argh
<flux> I suppose positive zero would be more than negative zero..
<flux> I'm betting floating point arithmetics would agree with me
<orbitz> jhahaha
<RobertFischer> Isn't negative zero NaN?
<Smerdyakov> I think negative zero is a genuine IEEE FP value.
<orbitz> it is
<orbitz> hey RobertFischer
<RobertFischer> Hey, orbitz. I've been lurking.
<mbishop> how can you have negative zero?
<orbitz> RobertFischer: and lurching, you walk like frankenstein
<orbitz> RobertFischer: are you forced to write ruby for work?
<Smerdyakov> mbishop, what kind of question is this? It's all well-defined in the IEEE standard.
<orbitz> RobertFischer: lolcode rulez
<RobertFischer> orbitz: Nope. I was tricked into using it by the hype saying that it'd be great for a little webapp.
slumzy has joined #ocaml
<orbitz> mbishop: floating point has a value reprsentation for 0.0, and teh signed bit is distinct from this
<orbitz> RobertFischer: poor guy
<mbishop> Well I suppose it's possible on a computer, but surely that's impossible in math, isn't it?
<orbitz> mbishop: floating point isn't precise though
<orbitz> mso it gievs you an idea of which direction you went in from
<RobertFischer> mbishop: Yes, it's impossible in math.
<RobertFischer> But FP != math...
<Smerdyakov> RobertFischer, mbishop, I think your ideas of "math" are too narrow. I definitely think of FP as math.
<mbishop> http://en.wikipedia.org/wiki/−0_(number)
<RobertFischer> Smerdyakov: Allow me to clarify. Floating point numbers don't map to any of the standard conceptions of numbers.
<RobertFischer> Smerdyakov: Sorry -- I didn't know you were listening, or I would have cranked my anal up higher.
<orbitz> RobertFischer: Smerdyakov is always listening, like santa claus
<RobertFischer> What's the FP representation of NaN?
<orbitz> "A bit-wise example of a IEEE floating-point standard single precision NaN: x11111111axxxxxxxxxxxxxxxxxxxxxx. x = undefined. If a = 1, it is a quiet NaN, otherwise it is a signalling NaN."
<Smerdyakov> RobertFischer, you should say "IEEE FP" for questions like that.
<RobertFischer> If I ever dealt with any other FP representation, I would.
<Smerdyakov> The question is ill-defined otherwise.
<RobertFischer> Granted. I'll live.
<orbitz> we had to convert to/from IEEE 754 in my circuits calss
<RobertFischer> Looks like it's 1s throughout the exponent and a non-zero fractional part.
<orbitz> ti was a blast
<RobertFischer> Weird -- why'd they dedicate a whole swath of potentially useful numbers to be bogus, but allow negative zero to live?
<orbitz> my guess would be it allows getting to NaN to be mechanical
<RobertFischer> orbitz: That's probably a good guess.
<orbitz> any invalid operation just results that sort of value out of the mechanical action of applying it rather than having to do ests
<orbitz> tests*
<Smerdyakov> Negative 0 is very useful, when the sign of the result matters.
<RobertFischer> I suppose...but why wouldn't you use +/- 1 for that?
<RobertFischer> Mechanics of it are probably easier.
<Smerdyakov> Because 0 and 1 very far apart.
<Smerdyakov> You want a near-0 number that is negative.
<RobertFischer> Oh, that's right. I forgot for a second that 0 was actually a range of numbers.
<RobertFischer> In that case, it makes sense.
Axioplase has quit [Read error: 104 (Connection reset by peer)]
<RobertFischer> It means "Too small for me to track it anymore, but it's negative." That's very valid and useful.
tty56 has quit []
rwmjones_ has joined #ocaml
Axioplase has joined #ocaml
postalchris has joined #ocaml
Linktim has quit [Remote closed the connection]
Linktim has joined #ocaml
Snark has quit ["Ex-Chat"]
<jonafan> how do i find out if i'm using the visual studios ocaml or the cygwin ocaml
<orbitz> Sys.os or whatever itis migh be diff
<orbitz> (The OS might show up as like .net or osmthign on F#)
<orbitz> but i honestly don't know, Jon Horrap would knwo thouhg
<jonafan> os_type is "Win32"
Linktim has quit [Remote closed the connection]
Axioplase has quit [Read error: 104 (Connection reset by peer)]
love-pingoo has joined #ocaml
jdrake has joined #ocaml
Axioplase has joined #ocaml
al-maisan has joined #ocaml
caccia has joined #ocaml
<caccia> Hello! I'm learning OCaml and I have a question regarding exceptions.. how do I write the equivalent of a try finally in OCaml? "finally" doesn't exist as a keyword
<Smerdyakov> You can implement it as a function.
<Smerdyakov> There probably isn't such a function in the standard library.
<caccia> ah, true.. though a bit strange that the language doesn't support it out of the box... the "finally" bit is something that I use more often that the catch bit in exception handling
<Smerdyakov> It's not so strange. You can't implement [catch] with functions and [finally].
<postalchris> try-finally is in the syntax extension tutorial: http://martin.jambon.free.fr/extend-ocaml-syntax.html
<caccia> Smerdyakov, I agree, it's not essential, but not having it will lead people to either re-invent the wheel or duplicate code.
Axioplase has quit ["bbl"]
marmottine has quit ["Quitte"]
vbmithr has quit [Read error: 110 (Connection timed out)]
caccia has quit [Remote closed the connection]
Axioplase has joined #ocaml
Axioplase has quit [Client Quit]
RobertFischer has left #ocaml []
al-maisan has quit ["Bye for now!"]
Axioplase has joined #ocaml
|jeremiah has joined #ocaml
Yoric[DT] has quit ["Ex-Chat"]
sporkmonger has quit []
ygrek has quit [Remote closed the connection]
bluestorm has quit ["Konversation terminated!"]
<palomer> is there any kind of stock trading API for ocaml?
Demitar has joined #ocaml
love-pingoo has quit ["Connection reset by pear"]
<Smerdyakov> Hahaha.
<Smerdyakov> Finance is one area where people aren't going to release free stuff very readily.
RobertFischer has joined #ocaml
dibblego has quit ["Leaving"]
<structured> haha indeed.
<structured> palomer: I might be writing one this summer incidentally...but it would be very simulation oriented
RobertFischer has left #ocaml []
dibblego has joined #ocaml
postalchris has quit ["Leaving."]
jdrake has quit [Read error: 113 (No route to host)]
seafood_ has joined #ocaml
Axioplase has quit ["/quat"]
rby_ has joined #ocaml
shortcircuit has quit [leguin.freenode.net irc.freenode.net]
aryx has quit [leguin.freenode.net irc.freenode.net]
rby has quit [leguin.freenode.net irc.freenode.net]
ahf has quit [leguin.freenode.net irc.freenode.net]
unfo- has quit [leguin.freenode.net irc.freenode.net]
orbitz has quit [leguin.freenode.net irc.freenode.net]
shortcircuit has joined #ocaml
aryx has joined #ocaml
rby has joined #ocaml
orbitz has joined #ocaml
unfo- has joined #ocaml
ahf has joined #ocaml
seafood_ has quit []
<jonafan> hey i'm trying to compile this: http://caml.inria.fr/pub/docs/manual-ocaml/manual032.html#htoc239 and i'm getting lots of missing float functions
<jonafan> stuff like cos, sin, tan, log, pow, exp, sqrt
rby has quit [Connection timed out]
<jonafan> actually i'm going to go home now
aryx has quit [leguin.freenode.net irc.freenode.net]
unfo- has quit [leguin.freenode.net irc.freenode.net]
orbitz has quit [leguin.freenode.net irc.freenode.net]
shortcircuit has quit [leguin.freenode.net irc.freenode.net]
shortcircuit has joined #ocaml
aryx has joined #ocaml
orbitz has joined #ocaml
unfo- has joined #ocaml