<tsume>
fenrirjk: lablgtk and gtk in particular sucks
<tsume>
that reminds me what I need to work on today :)
fenrirjk has quit [Read error: 60 (Operation timed out)]
_JusSx_ has joined #ocaml
mattam has joined #ocaml
Marius777 has joined #ocaml
Submarine has joined #ocaml
pango has quit ["brb"]
pango has joined #ocaml
__DL__ has joined #ocaml
smkl has quit [Read error: 60 (Operation timed out)]
Msandin has quit [Read error: 104 (Connection reset by peer)]
zzorn has joined #ocaml
__DL__ has quit ["by"]
Herrchen has quit ["bye"]
Marius777 has quit ["Leaving"]
Marius777 has joined #ocaml
Marius777 has quit [Client Quit]
JustinWick has joined #ocaml
<JustinWick>
Greetings, is anyone around?
<_JusSx_>
yeah
<JustinWick>
I am having a bit of an issue... it's most likely a wetware problem (i.e. my head)
<JustinWick>
I'm using ocaml on OS X, and if I were to make a file called "ast.ml" and put a module inside of it called "Ast"... to fully resolve it I have to use "Ast.Ast.foo" where foo is some member of the module.
<JustinWick>
This seems kinda rediculous... is there any way to not do that?
<Riastradh>
Is ast.ml of the form
<Riastradh>
module Ast = ... end
<Riastradh>
?
<mellum>
Sure. Just don't put a module inside the file.
<JustinWick>
yup
<JustinWick>
uh
<JustinWick>
it's a functor
<Riastradh>
The file automatically gets a file.
<Riastradh>
....module.
<JustinWick>
I guess I don't know how to make the functor satisfy a certain sig that way
<JustinWick>
At first I was trying to do what you said then I realized I couldn't figure out how to do the whole functor thing...
<Riastradh>
just U
<JustinWick>
or even if it's not a functor... how do you attach a sig to a file?
<Riastradh>
Er.
<JustinWick>
*listens*
<Riastradh>
foo.ml will have the signature listed in foo.mli.
<JustinWick>
Alright
<JustinWick>
What do I put in there to say it matches another sig?
<JustinWick>
I'm still trying to learn the module type system, but I do really like it :)
<Submarine>
you can't map functors directly into files
<JustinWick>
hmmm
<JustinWick>
So I'm stuck with at least one level of module around it? That really sucks
<Riastradh>
Well, you can just do 'open Ast'.
<mellum>
Or call the module something like "M".
<JustinWick>
Ah... that doesn't work with ocamlyacc :(
<Riastradh>
Sounds like you're screwed.
<JustinWick>
Yeah well I didn't have to pay for it so can't really complain too much :)
<Riastradh>
(SML's & Scheme48's module systems don't have this problem...)
<JustinWick>
I'll do the "M" thing I think...
* Riastradh
hides.
<JustinWick>
Yeah SML has its nice points.
<JustinWick>
I do like my programs to halt before I go to bed though :-P
<mellum>
It's better than C's module system.
<Riastradh>
?
<JustinWick>
(j/k I know it's perfectly usable)
<Demitar>
Riastradh, it's good to see you're reliable when it comes to advocating SML. ;-)
<Riastradh>
No! I'm not an SML advocate! Argh!
* Riastradh
denies it!
<JustinWick>
Hey there's nothing wrong with advocating it. I used to use it before I heard about ocaml :)
<Riastradh>
(I don't like either of the MLs. I'm a Schemer.)
<JustinWick>
And don't they have that Closure Passing Form based compiler or something
<JustinWick>
wait
<JustinWick>
Continuation Passing Form
* JustinWick
hides from the real CS people
<JustinWick>
What are you doing in this channel then? :)
<Riastradh>
I believe you're referring to SML/NJ's use of continuation-passing style (CPS) as an intermediate language format, but what does that have to do with, well, anything?
<Riastradh>
Ask Smerdyakov what he's doing in #scheme.
<Demitar>
We love having them around, they can put things into perspective, and are generally too educated to be argued with anyway. ;-)
<JustinWick>
I don't know it's pretty neat that's all.
<JustinWick>
I have a book on it that I neglected to read.
<Riastradh>
OCaml's compiler is actually pretty terrible. It just pretty straightforwardly maps OCaml to machine code. There's no optimization, be it program transformation or even closure optimization.
<JustinWick>
My current project with OCAML is the language I'm making... it's basically a lighter, purely functional version of ocaml that's designed around an "over eager" interpreter - it evaluates the program before all inputs are available, reducing it as much as possible until new information becomes available. It's supposed to be used to do low-latency batch processing. Partial evaluation is fun :)
<JustinWick>
So there's some room for improvement then? That'd be a cool project. If I had, oh, a PhD to waste maybe I'd do that ;)
<JustinWick>
I"m not sure what mine will be in at that point I think my masters project will just be some robot thing.
<Demitar>
Riastradh, hey! That's a feature! Feature! Featureeee! Well, at least it compiles quickly. :)
<Riastradh>
Good compilers can run quickly...
<JustinWick>
Hmm...
<Demitar>
(As long as you avoid recursive type inference.)
<Riastradh>
Orbit, for instance, is pretty fast.
<JustinWick>
the fortran compilers i use are a little slow
<JustinWick>
they are heavily optimizing though...
<Riastradh>
OCaml would _hugely_ benefit from real closure analysis.
<Demitar>
Riastradh, of course I'm mostly burnt by the terrible performace of c++ with gcc. :)
<mellum>
Demitar: Doesn't seem too bad to me.
<JustinWick>
Yeah gcc is *GREAT* in terms of being cross platform. AFAIK that's the only thing it's great about. Oh and being free/open source.
<mellum>
(but I might be biased ;)
<Demitar>
mellum, well, what box are you compiling on for starters? ;-)
<mellum>
Demitar: oh, are you talking about compile time? I thought run time performance
<Demitar>
Indeed.
<mellum>
Yeah, that sucks.
<Demitar>
Mind you I got an acceptable, even good, compile-test cycle on a P133 with 24M ram with ocaml. :)
<Demitar>
It becomes crucial to avoid -custom and native code of course. :)
drewr has quit ["ERC Version 5.0 $Revision: 1.743 $ (IRC client for Emacs)"]
<Demitar>
Riastradh, what would be the best source of SML information btw? smlnj.org? Is there something resembling CTAN anywhere? (I feel a bit lost in SML-land...)
* Riastradh
isn't an SML hacker!
<Demitar>
But you have better clue about it than me no doubt. :)
_JusSx_ has quit ["leaving"]
<Riastradh>
I know more about MLton & SML/NJ internally, perhaps, but that's still not much.
<Demitar>
Ok. I'll just dig about a bit then. :)
<Riastradh>
mlton.org probably has some useful links.
<Demitar>
Thanks.
Submarine has quit ["Leaving"]
cmeme has joined #ocaml
cmeme has quit [Remote closed the connection]
cmeme has joined #ocaml
<JustinWick>
Well thanks everyone for your help with my silly issue :)
<Riastradh>
(I'm really not an SML hacker or advocate, by the way -- the overly innocent & denying way I said it earlier was purely for humour value.)
<Demitar>
Riastradh, sure, we understand, we won't tell anyone. ;-)
mlh has joined #ocaml
pango has quit [Read error: 104 (Connection reset by peer)]
smkl has joined #ocaml
LordB has joined #ocaml
<LordB>
hi
pango has joined #ocaml
<LordB>
what is the simplest way to initialize an array to be the integers from 0 to 40?
<LordB>
i'm just learning.
<Riastradh>
The simplest way is to read the manual for the Array module.