<pflanze>
BTW can methods be written for basic types like int?
<pflanze>
That would solve the overload problem in a different way..
jimbothe has joined #ocaml
jimbothe has quit [Remote closed the connection]
lmbdwar has joined #ocaml
bk_ has joined #ocaml
<Banana>
glop.
cmeme has quit [Read error: 104 (Connection reset by peer)]
cmeme has joined #ocaml
<oracle1>
anyone tried this eclipse plugin recently added to the humps?
<oracle1>
does it include syntax highlighting?
<mattam>
the announcment said so IIRC
<mflux>
does someone have syntax hilighting working in xemacs?-)
<oracle1>
blalbal
<oracle1>
It provides very basic support for creating OCaml projects, editing source files, building and running.
<mattam>
mat@mat ~/ » wtf blalbal
<mattam>
Gee... I don't know what blalbal means...
<mattam>
mflux: tuareg does syntax highlighting doesn't it ?
<oracle1>
i think that wasn't a serious question
<mflux>
well, I suspect that
<mflux>
but apparently it doesn't work out of the box
<mflux>
not like I tried that much, but knowing that it does should help ;-)
<mflux>
so is tuareg something completely different than the caml-mode?
<mflux>
or just another name
<mattam>
it even has an xsymbol thingie so you get nice arrows and the like
<mattam>
it's different
<mflux>
can they be used simultaneously?
<mflux>
I'd imagine
<mattam>
like any two emacs major modes, no
<mflux>
well, does tuareg then have the nice "show type under cursor"-feature plus the slave ocaml-support?
<mattam>
for different buffers you could but there's no point
<mattam>
slave: yes, type: no, afaik
<mflux>
I really like that ;)
<mflux>
so I guess I can live without syntax hilighting
<mattam>
merging "type under cursor" with tuareg should not be too difficult...
<mflux>
likely very isolated feature in caml-mode
maihem has joined #ocaml
<mattam>
mflux: put this: http://mattam.org/files/tuareg-types.el in your load-path, (require 'tuareg-types) and (define-key tuareg-mode-map "\C-c\C-t" 'caml-types-show-type)
<mattam>
and you're done
<mattam>
(only for emacs, xemacs may have different functions)
<mattam>
in case you use xemacs, just copy 'caml-xemacs.el' from your caml-mode dir at the beginning of the file
<mattam>
the default highlighting color is ugly :)
<mflux>
I'll do that when I'll get bored into the black-on-gray -color scheme
<mflux>
;)
<mflux>
hmh, s/into/with/
maihem is now known as maihem_
maihem_ is now known as maihem
<Smerdyakov>
Does anyone know of any noteworthy people on the professor job market this year, doing research in functional programming or logicky things?
lmbdwar is now known as HEH
HEH is now known as mayhem
vezenchio has quit ["I thought what I'd do was, I'd pretend to be one of those deaf-mutes"]
menace has joined #ocaml
jason__ has joined #ocaml
<jason__>
For some reason when I input "let dataFile = openfile "hist41000.dat" [O_RDONLY] 640 in" Ocaml complains about "in." But I can do the same statement with ;;
<Axioplase>
in what?
<jason__>
in anything.
<jason__>
I tried just 'print_string "Here"'
<Axioplase>
weird
<jason__>
Do I need to say "dataFile" somewhere, or something like that?
<Axioplase>
no you shouldn t need.
<jason__>
Yeah, I didn't think so.
<Axioplase>
++
Axioplase has quit [Read error: 54 (Connection reset by peer)]
<Smerdyakov>
jason__, the context is crucial.
<jason__>
So, how I'm using it later in the code could be the problem?
eyda|mon has joined #ocaml
<Smerdyakov>
No. How identifiers are used is irrelevant to parse errors.
<Smerdyakov>
I mean just what code you have before or after.
<eyda|mon>
let puts a = print_string (a ^ "\n");;_
<eyda|mon>
let why = puts "why print this?";;
<jason__>
It's the first statement in my file.
<eyda|mon>
if that's all I have in my file, why does it print the second line?
<eyda|mon>
I don't even make a call to 'why'
<Smerdyakov>
eyda|mon, why wouldn't it?
<eyda|mon>
Smerdyakov: it's a declaration only?
<Smerdyakov>
eyda|mon, you are not defining why as a function.
<Smerdyakov>
eyda|mon, this isn't Haskell.
<eyda|mon>
Smerdyakov: I'm not? what am I missing?
<Smerdyakov>
eyda|mon, every function has exactly one argument.
<jason__>
eyda|mon: It discerns that piece of code isn't being used elsewhere, and decides since it's the last statement it must be the expression you wish your program to comprise?
<Smerdyakov>
eyda|mon, the 'let' form is overloaded to include a syntactic shortcut for defining functions by putting more than one identifier between 'let' and '='.
<eyda|mon>
so should I use 'fun' to declare it?
<Smerdyakov>
eyda|mon, by default, it just introduces a new name for the value of an expression, which is evaluated immediately.
<Smerdyakov>
No, you should use 'let why () = ...'
<jason__>
Smerdyakov: Is it evaulated imediately if it's being used in the "in" statement below it?
<Smerdyakov>
jason__, it's always evaluated immediately when that part of the expression is reached.
<eyda|mon>
let puts a = print_string (a ^ "\n");;_
<eyda|mon>
let why () = puts "why print this?";;
<eyda|mon>
why;;
<jason__>
Hm.
<eyda|mon>
ok, now why doesn't it print?
<Smerdyakov>
eyda|mon, 'why ();;'
<eyda|mon>
ah, of course
<Smerdyakov>
And OCaml has no "statements."
<Smerdyakov>
It has "expressions."
<jason__>
So, what if you want it to be continually re-evaluated, if it's an imperitive statement?"
<jason__>
Like "gets"?
<Smerdyakov>
You make a function.
<jason__>
Okay.
<jason__>
So you just pass it unit.
<jason__>
So, do you know specifically what I can do to allow my being able to use this expression using "in"?
<Smerdyakov>
You can. You have a syntax error elsewhere in the file.
<jason__>
Hm.
<Smerdyakov>
OCaml's error reporting mechanisms aren't perfect, you know.
<jason__>
They're very good from my experiences though.
<jason__>
At least, comparitively :p
<Smerdyakov>
If you put the whole source file somewhere on the web, perhaps I can help.