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
<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].