<fbvortex>
you mean customized as in creating new toplevels/compilers that recognize syntax as I specify?
buluca has quit [Read error: 113 (No route to host)]
olleolleolle has quit []
ikaros_ has quit [Remote closed the connection]
<Yoric[DT]>
fbvortex: that, too.
<Yoric[DT]>
But you can also perform smaller tweaks.
<Yoric[DT]>
For instance, one of the standard customizations adds list comprehension.
buluca has joined #ocaml
<Yoric[DT]>
[ i*i | i in range 1 n ; i mod 2 = 0]
<Yoric[DT]>
for instance
<Yoric[DT]>
Other extensions add "for each" loops, or pattern-matching with regexps, or built-in XML-processing, etc.
mrsolo_ has joined #ocaml
<Yoric[DT]>
For my current project, I've developed small extensions to add automated logging of some functions or to alter slightly some type definitions.
<Yoric[DT]>
Anyway, good night.
Yoric[DT] has quit ["Ex-Chat"]
mrsolo_ has quit ["This computer has gone to sleep"]
mrsolo_ has joined #ocaml
smimou has quit ["bli"]
mrsolo_ has quit ["This computer has gone to sleep"]
Torment has quit [Read error: 104 (Connection reset by peer)]
yminsky has joined #ocaml
fbvortex has quit [Read error: 104 (Connection reset by peer)]
seafood_ has quit []
mrsolo has joined #ocaml
cmeme has quit [Excess Flood]
cmeme has joined #ocaml
seafood_ has joined #ocaml
cmeme has quit [Client Quit]
cmeme has joined #ocaml
cmeme has quit [Client Quit]
cmeme has joined #ocaml
buluca has quit [Read error: 113 (No route to host)]
cmeme has quit [Client Quit]
cmeme has joined #ocaml
<hcarty>
Any ideas on why this odd (to my eyes) result comes from this array manipulation? http://pastebin.com/m1fb248db
cmeme has quit [Client Quit]
cmeme has joined #ocaml
<hcarty>
Ah, nevermind
<hcarty>
The docs explain it
cmeme has quit [Read error: 104 (Connection reset by peer)]
cmeme has joined #ocaml
yminsky has quit []
<hcarty>
Array.init dim1 (Array.make_matrix dim2 dim3 0.0) did the trick - any suggestions for a wiki where this information might be useful?
fbvortex has joined #ocaml
<fbvortex>
argh, I'm trying to debug a program that uses reins and ounit. In ocamldebug, whenever I'm in functions that don't even use reins code, ocamldebug refuses to print values, with the error message "Cannot find module Reins". Why is this happening and how I can I get it to either "find Reins" so it stops telling me this, or at least show me non-reins datatype values?
<fbvortex>
it seems like this happens whenever one uses external libraries. but this must be common...
<tsuyoshi>
never really used debuggers much, except for getting backtraces
Jedai has joined #ocaml
cpst has quit [Remote closed the connection]
ttamttam has joined #ocaml
ttamttam has left #ocaml []
Yoric[DT] has joined #ocaml
olleolleolle has joined #ocaml
seafood_ has quit []
Yoric[DT] has quit ["Ex-Chat"]
ikaros has joined #ocaml
olleolleolle has quit []
filp has joined #ocaml
__suri has quit []
__suri has joined #ocaml
olleolleolle has joined #ocaml
__suri has quit []
hkBst has joined #ocaml
jonathanv has joined #ocaml
olleolleolle has left #ocaml []
jonafan has quit [Read error: 110 (Connection timed out)]
Mr_Awesome has joined #ocaml
ttamttam has joined #ocaml
kelaouchi has quit ["leaving"]
kelaouchi has joined #ocaml
smimou has joined #ocaml
buluca has joined #ocaml
seafood_ has joined #ocaml
Sparkles has quit [Remote closed the connection]
Sparkles has joined #ocaml
hsuh has joined #ocaml
hsuh has quit ["Off to work!"]
seafood_ has quit []
seafood_ has joined #ocaml
seafood_ has quit []
seafood_ has joined #ocaml
<flux>
maybe reins installs its own printer or somesuch
<flux>
I think that's possible to do
<flux>
although I haven't used ocamldebug that much either
marmottine has joined #ocaml
Yoric[DT] has joined #ocaml
<Yoric[DT]>
hi
<Yoric[DT]>
Just out of curiosity (and assuming there are people around), who around here would be interested by a syntax extension adding
<Yoric[DT]>
* array comprehension
<Yoric[DT]>
* stream comprehension
<Yoric[DT]>
(in addition to the existing list comprehension and with almost the same syntax)
<flux>
I haven't particularly missed comprehesion syntax, but maybe that's because I haven't used it :)
<Yoric[DT]>
:)
<ttamttam>
In fact, I don't know what "comprehension" is
<ttamttam>
any pointer to learn?
<Yoric[DT]>
It's easy.
<Yoric[DT]>
Basically, it's a nice syntax for filter and map.
<Yoric[DT]>
[ i * i | i in some_list ]
<Yoric[DT]>
If some_list is a list of integers, that expression builds the list of squares of elements of i.
<Yoric[DT]>
[ i * i | i in some_list ; i mod 2 = 0]
<ttamttam>
List.map (fun i -> i * i) some_list ?
<Yoric[DT]>
If some_list is a list of integers, that second expression builds the list of squares of odd elements of i.
<flux>
support for cartesian product or zip yet?
<Yoric[DT]>
It's just syntactic sugar on top of List.map and List.filter .
<flux>
ranges?
<ttamttam>
Understood. Thanks.
<Yoric[DT]>
flux: not that I know of.
<Yoric[DT]>
Although ranges would be easy to implement.
<ttamttam>
Yoric[DT]: back to your question. I do not think I would use this a lot. But who knows...
NathanINTJ has joined #ocaml
<NathanINTJ>
hey, any of you guys using F#?
seafood_ has quit []
<hcarty>
Yoric[DT]: I'd be interested in such an extension. I'm using Sdflow at the moment for ~similar purposes
NathanINTJ has left #ocaml []
<hcarty>
And being able to use something like [1 .. 100] as proper syntax would be quite nice
<Yoric[DT]>
Yeah, I'm thinking about that, too.
<Yoric[DT]>
I'm just wondering what should be the type of this beast.
<Yoric[DT]>
[1..100] -> int list
<Yoric[DT]>
[|1 .. 100|] -> array list
<Yoric[DT]>
[<1 .. 100|] -> int stream ?
<Yoric[DT]>
erf.
<Yoric[DT]>
[1..100] -> int list
<Yoric[DT]>
[|1 .. 100|] -> int array
<Yoric[DT]>
[<1 .. 100>] -> int stream
<Yoric[DT]>
or something such ?
<hcarty>
Yoric[DT]: I think that would be pretty ideal
<Yoric[DT]>
I'll try and do that.
<Yoric[DT]>
Shouldn't be too hard, I hope.
<Yoric[DT]>
Well, stream stuff will require some re-implementation, as they're locked into the private parts of Camlp4.
__suri has joined #ocaml
<hcarty>
I'd like to learn enough Camlp4 to eventually override the .{} syntax for Bigarrays so that the .{} is always used with Bigarray.Genarray.t, rather than the type being determined by the number of dimensions used
<hcarty>
But I think that will have to wait until the documentation is a little more complete
Yoric_ has joined #ocaml
Yoric__ has joined #ocaml
buluca has quit [Read error: 113 (No route to host)]
Yoric[DT] has quit [Read error: 110 (Connection timed out)]
Yoric[DT] has joined #ocaml
Yoric_ has quit [Read error: 110 (Connection timed out)]
Yoric__ has quit [Read error: 110 (Connection timed out)]
ttamttam has quit ["Leaving."]
<Yoric[DT]>
Ok, ranges [a .. b] and [| a .. b |] implemented.
olleolleolle has joined #ocaml
CRathman has joined #ocaml
<hcarty>
Yoric[DT]: Very cool!
<Yoric[DT]>
For the rest, it'll take a little tweaking.
buluca has joined #ocaml
kelaouchi has quit ["leaving"]
ttamttam has joined #ocaml
Yoric[DT] has quit ["Ex-Chat"]
kelaouchi has joined #ocaml
olleolleolle has left #ocaml []
kelaouchi has quit [Client Quit]
kelaouchi has joined #ocaml
<hcarty>
Is there a way to #use "foo.ml" multiple times in the toplevel when using a syntax extension?
<hcarty>
I get the following error on the second #use: "I/O error: Bad file descriptor"
zvrba has left #ocaml []
Yoric[DT] has joined #ocaml
Demitar has quit [Read error: 110 (Connection timed out)]
ulfdoz has quit [kubrick.freenode.net irc.freenode.net]
psnively has joined #ocaml
psnively has quit [Client Quit]
psnively has joined #ocaml
ulfdoz has joined #ocaml
psnively has quit []
cygnus_ has quit [Read error: 110 (Connection timed out)]
buluca has quit [Read error: 113 (No route to host)]
bluestorm_ has joined #ocaml
Tetsuo has joined #ocaml
cygnus_ has joined #ocaml
love-pingoo has joined #ocaml
sergez has quit [Read error: 110 (Connection timed out)]
CRathman_ has joined #ocaml
CRathman_ has quit [Remote closed the connection]
ikaros has quit [Remote closed the connection]
ikaros has joined #ocaml
ikaros has quit [Remote closed the connection]
ikaros has joined #ocaml
CRathman has quit [Read error: 110 (Connection timed out)]
<imp>
linking a simple one-line with ocamlopt 3.10 and msvc 2003 fails
<imp>
as far as I know that symbols appeared in msvc 2005 and thus cannot be found in vc2003
<imp>
or maybe I am doing smth wrong?
<imp>
is that to be so or it is a bug? (the readme says that vs6, 2003 and 2005 can be used)
kelaouchi has joined #ocaml
<fbvortex>
I'm trying to write unit tests for a module that defines its own exception type. I've exposed the exception type in the module signature. In my unit test, I specifically want to cause the function under test to throw the exception. However, when I try to compile the unit test .ml file, I get the error that the exception constructor is unbound. What is the recommended way to avoid this?
<Yoric[DT]>
Can you pastebin a sample ?
<bluestorm_>
ocaml the_module.cmo test.ml -o test
<bluestorm_>
?
<Yoric[DT]>
Oh, yeah, that too :)
<fbvortex>
bluestorm_: I just want to turn the unit test code into a .cmo, but even when I supply the name of the target module's .ml or .cmo before the unit test filename, I still get the error.
<bluestorm_>
hm
<Yoric[DT]>
Did you compile with "-c" ?
<fbvortex>
Yoric[DT]: yes
<bluestorm_>
could you show some code ?
<Yoric[DT]>
Do you either open the module or use YourModule.YourExceptionConstructor ?
<imp>
nobody uses windows? ;)
<fbvortex>
Yoric[DT]: that must be it, I should have used the module name in the constructor. Let me go try it, but I'm guessing that's my retarded error.
<fbvortex>
That was it. Thanks guys.
<fbvortex>
It's a little frustrating being the only OCaml user in the office...
<fbvortex>
imp: you may want to try ocaml-beginners on yahoo... i try to stay as far away from windows as I can...
* Yoric[DT]
installed Linux in his university just to get away from teaching OCaml under Windows.
<Yoric[DT]>
fbvortex: np
<imp>
that will be probably my next try if I won't figure it out
marmottine has quit [Remote closed the connection]
<ttamttam>
imp: I saw a trink a long long time ago to solve the problem you described.
<ttamttam>
I would search for ftol
<ttamttam>
But can't find it again right now. from top of my head,
<ttamttam>
it was a small C source defining one fonction only.
<ttamttam>
I know use the mingw version on windows.
<imp>
yep, I last used mingw with 3.09 and it worked fine
<imp>
but was not very straghtforward too
<ttamttam>
Well, for a linux user, it was...
<ttamttam>
next version will be a lot simpler to compile libraries, etc.
<imp>
looking forward
<imp>
ocamlbuild is a very helpful tool now
<ttamttam>
I'm learning it...
<ttamttam>
Bye
ttamttam has left #ocaml []
<imp>
I hope the ocaml devs will fix "my" issue in the next release too...
ita has joined #ocaml
imp has left #ocaml []
rickardg has joined #ocaml
nuncanada has joined #ocaml
love-pingoo has quit ["zou"]
Tetsuo has quit ["Leaving"]
seafood_ has joined #ocaml
filp has quit ["Bye"]
seafood_ has quit []
nuncanada has quit ["Leaving"]
bluestorm_ has quit [Remote closed the connection]