<flux>
(because of optional parameters, which are also built in)
<flux>
actually, that was worded improperly
<flux>
it is built in, and it's not in the Pervasives module :-)
<flux>
being in that module doesn't mean it's built in, because you can avoid using it with -nopervasives
<flux>
it's not possible to avoid using built-in information
<flux>
(hm, not only improperly worded but also plain improper information: so, disregard that ;))
<Camarade_Tux>
=)
ulfdoz has quit [Read error: 110 (Connection timed out)]
albacker has quit ["Leaving"]
<flux>
it appears I'm intoxicated :/
bohanlon has quit ["Rebooting why not"]
<Camarade_Tux>
good :)
bohanlon has joined #ocaml
Associat0r has quit []
travisbrady has joined #ocaml
psnively has quit []
tmaedaZ has quit [Remote closed the connection]
tmaedaZ has joined #ocaml
sOpen has joined #ocaml
<sOpen>
Hi. I have an mli file with a submodule type signature and I have the matching module struct in the file corresponding to the mli but the compiler says the field is undefined. What gives? Can I do this?
thrasibule has joined #ocaml
julm has quit [Remote closed the connection]
julm has joined #ocaml
travisbrady has quit ["Computer has gone to sleep"]
caligula__ has joined #ocaml
palomer has joined #ocaml
caligula_ has quit [Read error: 110 (Connection timed out)]
det has quit [Read error: 54 (Connection reset by peer)]
rcloud has joined #ocaml
verte has joined #ocaml
slash_ has quit [Client Quit]
det has joined #ocaml
Demitar has joined #ocaml
Alpounet has quit ["Leaving"]
travisbrady has joined #ocaml
silas_ has joined #ocaml
silas has quit [Read error: 110 (Connection timed out)]
thrasibule has quit [Read error: 145 (Connection timed out)]
rcloud has quit [Remote closed the connection]
r0bby|arr is now known as r0bby
ViciousPlant has joined #ocaml
espressox has joined #ocaml
espressox has quit [Client Quit]
espresso has quit [Read error: 110 (Connection timed out)]
ViciousPlant has quit []
espresso has joined #ocaml
ztfw`` has joined #ocaml
espresso has quit ["Leaving"]
ztfw` has quit [Read error: 110 (Connection timed out)]
komar_ has joined #ocaml
f[x] has joined #ocaml
julm has quit [Remote closed the connection]
julm has joined #ocaml
<flux>
sopen, can you put the files to a pastebin?
gaze___ has quit []
_zack has joined #ocaml
smimram has joined #ocaml
smimou has quit [Read error: 110 (Connection timed out)]
julm has quit [Read error: 145 (Connection timed out)]
tvn2009_ has joined #ocaml
julm_ has quit [Remote closed the connection]
julm has joined #ocaml
mihamina1 has quit ["Leaving."]
Ched has joined #ocaml
derdon has joined #ocaml
Anarchos has quit ["Vision[0.9.7-H-090423]: i've been blurred!"]
hkBst has joined #ocaml
ttamttam has joined #ocaml
albacker has quit [Remote closed the connection]
<sOpen>
flux: turns out it was "module" vs "module type"
<derdon>
how can I define a function which gets no parameters?
<flux>
derdon, well, it's not a function then..
<flux>
derdon, the best you can do is a function that takes a unit parameter
<flux>
derdon, another kind of best is to use lazy values
<derdon>
I already did it, but it seemed to me like bad style
<derdon>
what are lazy values?
<flux>
let foo = lazy (Random.int ()) and later Lazy.force foo
<flux>
(contrived example chosen to make a point ;-))
<flux>
you may also define for example let (!!) = Lazy.force to make the forcing syntax slightly more succinct
<derdon>
hmm, so it is a better idea to avoid functions which get no parameters?
<flux>
functions without parameters are called functions
<derdon>
???
<flux>
uh :)
<flux>
'are called values'
ttamttam has quit ["Leaving."]
<derdon>
I see
<flux>
I suppose you want call something by just having its name? such as: let a = foo (* would call foo *) ?
<derdon>
let say_hello = function () -> print_endline "hello world!";;
<derdon>
I want this without the ()
<flux>
well, you cannot
<flux>
(a more natural way to write it is let say_hello () = print_endline "hello world!", but perhaps you knew that)
ttamttam has joined #ocaml
<flux>
but I'm off to eat ->
ttamttam has quit ["Leaving."]
<derdon>
is it possible to delete names from the namespace?
sOpen has quit [Read error: 110 (Connection timed out)]
<Camarade_Tux>
hmmm, what do you mean? from a module? your module?
<flux>
derdon, not really. it is possible to override earlier definitions, though.
<derdon>
:(
<flux>
derdon, actually maybe module type signatures do what you want
<flux>
derdon, ..which is what?
<flux>
you can have module A : sig val i : int end = struct let i = 42 let j = i + 42 end
<flux>
the same relationship is between .mli and .ml -files
<flux>
(as you may know, file.ml produces a module with the name File)
<derdon>
flux: yet, I know nothing about OCaml's module system
<derdon>
flux: and all I did from now was typing in the interactive OCaml shell and not executing *.ml files
<flux>
derdon, ok. well, you can write that module definition in the toplevel and it does the thing.
<derdon>
flux: I want to know if there is an equivalent to the ``del``-statement in python
<flux>
derdon, there is not
<derdon>
ok
<flux>
derdon, if it does what I assume it does
<flux>
derdon, what would be its use be?
<derdon>
flux: ``del foo`` deletes the name foo and its value from the namespace
<flux>
derdon, and what is gained with that?
<derdon>
flux: it is used very rarely, almost not. I've just wanted to use it, because I've overwritten "raise" and now I want to have the original raise back
<derdon>
do I have to restart the shell?
<flux>
derdon, well, you can do let raise = Pervasives.raise to get it back
<derdon>
ah, thx
<flux>
derdon, maybe it's a good idea to work with an .ml-file and just #use it into the toplevel
<flux>
derdon, this way the current state of the toplevel doesnt' become precious
<flux>
(if you use emacs, there are bindings to send current statement to the toplevel directly)
* derdon
doesn't use emacs
<derdon>
I use vim
Yoric[DT] has joined #ocaml
<Camarade_Tux>
vim \o/
Summermute has quit [Read error: 110 (Connection timed out)]
derdon has quit []
<julm>
vim \o/
Amorphous has quit [Read error: 110 (Connection timed out)]
Amorphous has joined #ocaml
_zack has quit [Read error: 113 (No route to host)]
komar_ has joined #ocaml
thrasibule has joined #ocaml
Smerdyakov has joined #ocaml
tvn2009 has quit ["Leaving"]
<Camarade_Tux>
my vim is everything but set to work with ocaml, I've never taken the time to improve that
Alpounet has joined #ocaml
komar_ has quit [Read error: 110 (Connection timed out)]
ztfw has quit [Read error: 104 (Connection reset by peer)]
ztfw has joined #ocaml
Yoric[DT] has quit ["Ex-Chat"]
komar_ has joined #ocaml
Yoric[DT] has joined #ocaml
Yoric[DT] has quit ["Ex-Chat"]
marmottine has joined #ocaml
marmottine has quit ["mv marmotine Laurie"]
_zack has joined #ocaml
lutter has quit ["Leaving."]
Ched has quit ["Ex-Chat"]
det has quit [Read error: 54 (Connection reset by peer)]
verte has quit ["~~~ Crash in JIT!"]
thrasibule has quit [Read error: 145 (Connection timed out)]
tvn2009_ has quit ["ChatZilla 0.9.85 [Firefox-3.5 3.5.2/20090803152903]"]
tvn2009 has joined #ocaml
det has joined #ocaml
tvn2009 has quit [Client Quit]
slash_ has joined #ocaml
ttamttam has joined #ocaml
_zack has quit ["Leaving."]
<palomer>
emacs \o/
<Camarade_Tux>
notepad.exe :D
ttamttam has quit ["Leaving."]
Yoric[DT] has joined #ocaml
Ched has joined #ocaml
julm_ has joined #ocaml
julm has quit [Nick collision from services.]
julm_ is now known as julm
Narrenschiff has joined #ocaml
smimram has quit [Read error: 110 (Connection timed out)]
f[x] has quit [Read error: 110 (Connection timed out)]
_zack has joined #ocaml
f[x] has joined #ocaml
<Alpounet>
emacs² \o/
slash_ has quit [Client Quit]
slash_ has joined #ocaml
slash_ has quit [Client Quit]
slash_ has joined #ocaml
<schme>
ed \o/
Snark has quit ["Ex-Chat"]
derdon has joined #ocaml
albacker has joined #ocaml
tarbo2 has quit [Read error: 104 (Connection reset by peer)]
julm_ has joined #ocaml
julm has quit [Read error: 145 (Connection timed out)]
rcloud has joined #ocaml
<hcarty>
Camarade_Tux: pong
<hcarty>
Camarade_Tux: The latest GODI release defaults to 3.11.x and has some updated GODI tools with it.
<hcarty>
Camarade_Tux: And I have toyed with Psilab before. It's a neat program, but I have unfortunately been unable to get in touch with the author.
<hcarty>
I have a tarball of the Psilab 2.0 sources which build with a modern GCC somewhere, but I've been unable to find it. I'll have to start digging through backups.
<hcarty>
At this point, though, I think using PLplot, Lacaml, ocamlgsl and maybe pa_do directly from the toplevel will provide a better experience.
<Camarade_Tux>
hcarty: thanks for the infos :)
<Camarade_Tux>
hcarty: psilab integrated camlimages too and that sounded nice
<Smerdyakov>
OK, guys, Firefox only allows 110 nested anonymous functions in JavaScript. Who wants to stage a protest?
<Camarade_Tux>
Smerdyakov: can I troll webkit/jsc/nitro in? =)
<Smerdyakov>
I'm trying to get Ur/Web to avoid this problem.
<Smerdyakov>
I don't know if I'm going to have to get very clever.
<Camarade_Tux>
Smerdyakov: also, do you know where this limit come from? "110" sounds weird
<Smerdyakov>
I don't know. I verified it empirically
<Camarade_Tux>
hcarty: also, I was wondering if I could easily plot a game of checkers (matrix of 0/1, with maybe custom image on each cell), we should be able to do it with only a few lines of code
<Camarade_Tux>
Smerdyakov: have you tried chromium's js engine? I read it was good for recursion but I've always wondered how true that was
<Smerdyakov>
No, but Firefox is popular enough that it alone is enough to make this an issue.
<hcarty>
Camarade_Tux: Plotting something like that using PLplot is possible. A simple color-coded matrix would be the easiest, taking the fewest lines.
<hcarty>
Camarade_Tux: But using custom symbols for each grid is possible as well.
<Camarade_Tux>
Smerdyakov: yeah, of course but I was wondering whether you had tried/benchmarked ;)
<Camarade_Tux>
hcarty: I really need to try plplot :)
<hcarty>
Each call to plottable_checker would create a checker element. Then those could be put on the board with "P.plot list_of_all_the_checkers".
<hcarty>
And if you are feeling super-fancy, you can wrap it all in a lablgtk2 GUI.
<hcarty>
Cairo can also be used to draw directly on the plot canvas if extra details or options are needed.
thrasibule has joined #ocaml
julm_ has quit [Read error: 110 (Connection timed out)]
<Camarade_Tux>
hcarty: looks nice, I definitely have to try that next week :)
julm_ has joined #ocaml
<hcarty>
Camarade_Tux: Let me know how it goes for you. And you should definitely work with the latest Subversion rather than an official release. I've pushed a number of a updates to the OCaml bindings since the last dev .tar.gz.
<Camarade_Tux>
ok, sure, I have to dig in some old code first ;)
<hcarty>
Does using the "-custom" flag when compiling a .cma propagate to the compilation of executables using that library's .cma?
<hcarty>
I have ocamlc-compiled executables with the runtime embedded, but they were compiled without the "-custom" argument.
<hcarty>
Camarade_Tux: Another interesting twist Psilab uses is to make ( + ) work on both integers and floating point values.
<hcarty>
And complex values
<Camarade_Tux>
hcarty: hmmm, how does it work? object?
julm_ has quit [Read error: 104 (Connection reset by peer)]
<hcarty>
No, it uses some C tricks
<hcarty>
If you have the for Psilab 2.0 available, it's in $BASE/math/math.c
<hcarty>
The uni* functions. It checks to see if the value is a block. If not, it assumes int. If so, then it checks if it's a float. If not, then it checks if it is a complex. Otherwise it fails out.
<hcarty>
( + ) becomes 'a -> 'a -> 'a, but fails if 'a is not int, float or complex.
<hcarty>
Same for -, *, /
<Camarade_Tux>
wouldn't that fail on unboxed float? (I don't exactly know what this unboxing implies)
<hcarty>
I don't think floats are ever unboxed for bytecode'd OCaml.
<hcarty>
I don't know if that is accurate or not though.
<hcarty>
Psilab does not support native-code compilation, so I guess it doesn't worry about such things.
_zack has quit ["Leaving."]
_zack has joined #ocaml
thrasibule has quit [Read error: 110 (Connection timed out)]
<Camarade_Tux>
it could probably support native-code now with natdynlink :P
f[x] has quit [Read error: 110 (Connection timed out)]
julm has quit [Read error: 110 (Connection timed out)]
julm_ has joined #ocaml
smimou has joined #ocaml
slash_ has quit [Read error: 104 (Connection reset by peer)]
slash_ has joined #ocaml
itewsh has joined #ocaml
julm has joined #ocaml
julm_ has quit [Read error: 110 (Connection timed out)]
itewsh has quit [Remote closed the connection]
itewsh has joined #ocaml
julm has quit [Read error: 104 (Connection reset by peer)]
Yoric[DT] has quit [Remote closed the connection]
ulfdoz has quit [Read error: 110 (Connection timed out)]
itewsh has quit [Remote closed the connection]
itewsh has joined #ocaml
_zack has quit ["Leaving."]
_zack has joined #ocaml
<hcarty>
Camarade_Tux: If only ocamlnat worked properly...
<Camarade_Tux>
I'm sure it's a completely stupid bug
<hcarty>
The bug report I posted was responded to with "it's a hack and an experiment, of course it doesn't work" so I don't have particularly high hopes that it will be fixed.
<hcarty>
It would be wonderful if it were fixed though.
<Camarade_Tux>
something broke it between .0 and .1, we could even dichotomize it
itewsh has quit ["Quitte"]
<hcarty>
Camarade_Tux: Really? That's good news. findlib worked with ocamlnat in 3.11.0?
<Camarade_Tux>
I hadn't tried with findlib
<hcarty>
Ah. That's the problem I'm having on 3.11.1.
<Camarade_Tux>
it works without?
<hcarty>
I can build and use ocamlnat for simple tests, but that's as far as I've gone. It isn't of much use to me if I can't use findlib with it.
julm has joined #ocaml
<hcarty>
Yes, it does as long as I don't try to do anything that uses toplevel-specific functionality.
lutter has joined #ocaml
<Camarade_Tux>
I see no mention of ocamlnat+findlib on the mailing-list
<hcarty>
No, the 3.11.2 changelog is almost as impressive.
<hcarty>
Though I do like the addition of extra checks on pattern matching for records.
<Camarade_Tux>
yup
<hcarty>
And the { x } shorthand is nice.
<Camarade_Tux>
but I was hoping it would be possible to foresee the future of ocamlnat ;)
<hcarty>
Ah, that :-)
<Camarade_Tux>
he, yes :P
Narrenschiff has quit []
<hcarty>
If this were language developed with a more "open" mindset, I would put some effort in to tracking down the issue.
<hcarty>
The QPL + closed development makes that less appealing that it would be for many other languages.
<hcarty>
Certainly not ALL others though.
derdon has quit []
sOpen has quit [Read error: 145 (Connection timed out)]
<Camarade_Tux>
true and true, I've seen worse with a gpl license
sOpen has joined #ocaml
<hcarty>
I'd be happy with GPL - at least then the rights to code changes are not so one-sided, and modified versions can be distributed without jumping through hoops.
<hcarty>
But according to posts in the past on the OCaml mailing list, this is all due to funding issues or something along those lines - if other people use it for other things, then the OCaml project can lose funding.
<hcarty>
That said, it is clearly not enough to keep me from using the language :-)
<Camarade_Tux>
I had never read that but I haven't been on the ml that long
<Camarade_Tux>
hcarty: yeah, definitely, I won't stop using ocaml before long ;)
<hcarty>
Oh, those posts are all WELL before my time with OCaml :-) The funding-explanation post was from 1999 IIRC, and the other discussions I've seen are in the 2000-2001 time frame.
<Camarade_Tux>
I was like 11 :P
<Camarade_Tux>
I was probably learning Pythagore's a^2 + b^2 = c^2 in triangles :P
julm has quit [Read error: 110 (Connection timed out)]
hkBst has quit [Read error: 104 (Connection reset by peer)]
sOpen has quit [Read error: 110 (Connection timed out)]
rcloud has quit [Read error: 110 (Connection timed out)]
julm has joined #ocaml
julm has quit [Read error: 60 (Operation timed out)]
<hcarty>
I was graduating from high school/starting college :-) Programming, but certainly with no knowledge of what "functional programming" is.
<hcarty>
That actually right around the time I decided that I wouldn't be studying CS in college.