<johnnowak>
hello all. does anyone know if ocaml 3.13 will be release sometime this year? i'm starting a new project and am curious if it's reasonable to base it on 3.13.
mdelaney has joined #ocaml
sebz has quit [Quit: Computer has gone to sleep.]
<surikator>
johnnowak: do you plan to use any 3.13-only features?
<johnnowak>
i'd like to use 3.13 for gadts and some of the other type system changes mainly
<johnnowak>
it's not for a product that'll be released short term.. will not be the end of the world if i have to make a change or two to keep up. i just don't want to litter my program with gadts then have to rip them out because the feature never gets released or something
<surikator>
i don't know when it will be released. i barely touched 3.12 yet... i wouldn't write stuff now hoping for 3.13
sebz has joined #ocaml
joewilliams is now known as joewilliams_away
mdelaney has quit [Quit: mdelaney]
mdelaney has joined #ocaml
<_habnabit>
is there a list of 3.13 features?
<_habnabit>
like, a nice summary?
<_habnabit>
a quick google search doesn't turn up much.
<johnnowak>
is there any way, in either standard or revised syntax, to declare the type of a binding and its arguments separately? I'm thinking along the lines of sml's "fun f : t -> t | f x = ..."
ankit9 has quit [Quit: Leaving]
ulfdoz has joined #ocaml
jimmyrcom has quit [Ping timeout: 260 seconds]
Associat0r has joined #ocaml
Associat0r has quit [Changing host]
Associat0r has joined #ocaml
ulfdoz has quit [Ping timeout: 252 seconds]
dgbaley27 has joined #ocaml
<dgbaley27>
Is there some way to do function prototypes?
Associat0r has quit [Quit: Associat0r]
<johnnowak>
dgbaley27: only in a module interface i believe
<dgbaley27>
So how can I have two functions that refer to eachother?
<johnnowak>
you can use 'and' to tie mutually recursive definitions together
<johnnowak>
let rec f x = ... and g y = ...
<dgbaley27>
Thanks, I'll give it a try.
<johnnowak>
is the same thing for mutually recursive types
<dgbaley27>
=) awesome, thanks
johnnowak has left #ocaml []
Snark has joined #ocaml
arubin has quit [Quit: arubin]
sebz has quit [Quit: Computer has gone to sleep.]
yezariaely has quit [Quit: leaving]
sebz has joined #ocaml
dgbaley27 has left #ocaml []
surikator has quit [Quit: surikator]
ttamttam has joined #ocaml
<zorun>
metasyntax|work: thank you for the comment :)
<thelema>
this executable apparently won't run under cygwin...
<thelema>
or not... it won't run under the windows shell either, even with the right CWD
<adrien>
hmpf
<adrien>
and process monitor is nice but strace is more powerful (more exhaustive)
<thelema>
I tried strace, but it couldn't even get ocaml to start.
<adrien>
strace from cygwin?
<thelema>
yes
surikator has quit [Quit: Scientific discovery is just maximal compression of random strings. Nothing more, nothing less.]
<thelema>
very odd - the process monitor doesn't note ocaml trying to open pervasives.cmi
<adrien>
the OCAMLLIB env var is set?
<thelema>
no, I guess I could try setting that
<thelema>
nope, that doesn't help.
<adrien>
as f[x] pointed out, it's useful if your toolchain is not in C:\\Program\ Files\\Objective\ Caml
<adrien>
and it never stat() or anything pervasives.cmi?
<thelema>
adrien: nope.
<thelema>
well, setting OCAMLLIB got me further in ./configuring findlib
<thelema>
still failed "detecting compiler arguments"
<thelema>
this latest failure might be related to "cannot load shared library dllcamlstr"
lpereira has joined #ocaml
* thelema
hacked around the detecting compiler arguments failure by using the extractor executable built with a 32-bit version of ocaml
<adrien>
thelema: but you're mixing msvc and gcc?
<thelema>
although I expect this failure to be carried into my executable too, which means I'll have to find and fix the real problem sometime
<thelema>
I'd like to use msvc-64, but I'm using pre-compiled ocaml, so whatever it was compiled with, I think gcc
<thelema>
except I don't have msvc-64, only msvc-32. so I have to use mingw-64
<adrien>
you should avoid Program\ Files probably
<thelema>
ok
* thelema
tries avoiding spaces in dirnames
<adrien>
set OCAMLLIB, don't worry about spaces in path anymore
<thelema>
hmm, that doesn't seem to help.
<thelema>
I'm back to the "cannot open pervasives.cmi" error
<thelema>
maybe my environment variables aren't being inherited in the Makefile
<adrien>
I wasn't thinking it was going to help much right now but for the future, it will
<adrien>
you'd probably have another issue then
<adrien>
but
<thelema>
nope, that's not the fix.
<adrien>
I need to get a special notebook "errors I get when doing things on windows", I think I already had that one too
BiDOrD_ has joined #ocaml
<adrien>
are you sure the paths are accessible from where you are?
iratsu has quit [Ping timeout: 240 seconds]
BiDOrD has quit [Ping timeout: 245 seconds]
<adrien>
what is your current setup exactly? ocaml binaries from? cygwin, cmd, nothing?
<thelema>
/cygdrive/f/OCaml-3.12-64/lib
<thelema>
my current setup is cygwin, ocaml binaries from ocamlpro installer in f:\OCaml-3.12-64
<thelema>
I can't imagine the paths being unaccessible... there's no real permissions in the way, I think
<adrien>
I don't know if something running in cygwin and trying to access X:/... will work
<thelema>
I broke the .lnk shortcut that was working by changing its executable path and PWD
<thelema>
everything I'm accessing is through /cygdrive/f/...
<adrien>
_any_ idea of what ocamlpro did to the source?
<thelema>
none
<thelema>
the text says that it was mostly what "README.win32" and some NSIS (installer) tricks
<adrien>
if you want to see the NSIS tricks, grab UniExtract, it'll give you the .nsi script
<adrien>
(from old 7zip code which was removed/disabled after the nsis community complained [ yes, they store the script directly in the installer ])
Boscop has joined #ocaml
<Boscop>
is it possible to use camlp4 to for operator precedence parsing where the precedence depends on the chars that the operator consists of (or just the first char)?
<thelema>
huh, I can open the installer using 7zip but can't find the .nsi script
<adrien>
old 7zip code, got removed
<thelema>
ah
<adrien>
uniextract ships an older 7z dll
<thelema>
:)
<adrien>
they were like "aaaaaaaaahhhhhhhhh, we want to hide our data of very little price which isn't secure anyway!"
<thelema>
that's funny.
avsm has quit [Ping timeout: 258 seconds]
<thelema>
Boscop: by default oper precedence is by first char of operator, it's possible to use camlp4 to change this.
<Boscop>
thelema: and can camlp4 (or ocamllex) be used to respect indentation (e.g. for a python-like syntax) or whitespace between tokens (e.g. 'a - b' means 'a minus b', but 'print-line' is one identifier)?
<thelema>
Boscop: hmm, I don't think camlp4 gets whitespace tokens from its lexer by default. It's possible to replace the lexer, but then you have to build a new ocaml lexer
<thelema>
adrien: ah, a reboot would have fixed this - I think the installer set some environment variables that fix the 'cannot find pervasives' problem
<thelema>
yay, making progress again
<thelema>
... or not. "Unsupported relocation kind 0006 for _win_handle_fd"???
<adrien>
hah :P
<adrien>
thelema: login/logoff should be good too I think
<adrien>
thelema: might be nice to send ocp a quick message so that the installer asks for a reboot
<thelema>
I just closed the terminal and restarted
<Boscop>
thelema: does camlp4 handle unicode?
<thelema>
hmm, do I need a 64-bit flexlink?
<Boscop>
(my language allows unicode in comments and strings)
<thelema>
Boscop: not actively - it just sees a raw stream of bytes, which it treats as latin-1
surikator has joined #ocaml
<Boscop>
thelema: currently I'm using the D language to implement the compiler but I'm considering switching to OCaml. would you say it's worth it? (considering that I'd have to rewrite the lexer etc.)?
<thelema>
Boscop: I'd say ocaml makes language implementation much easier than many other languages. There's good support for unicode parsing outside camlp4: look up ulex
ygrek has joined #ocaml
<flux>
bah, it's painfully obvious that no soul has ever used Sdlgfx.* stuff, or how else would one explain external lineRGBA : surface -> rect -> rect -> color -> int -> bool = "ml_lineRGBA" ?
<flux>
I mean, a line function that takes two rectangles in..
<thelema>
adrien: "ml64 is not recognized as an internal or external command, operable program or batch file"??
<flux>
it would sort of make sense if they could be used for drawing thicker lines, but no, the w/h are just ignored
<flux>
(fortunately it at least works)
<adrien>
thelema: never got that, I never really tried ocaml with mingw-w64 (or anything x64 on windows actually)
<thelema>
ah, I'm missing the 64-bit assembler
<adrien>
thelema: when do you get that?
<thelema>
I think it's supposed to be part of the windows SDK
Modius has quit [Read error: Connection reset by peer]
<Boscop>
thelema: do you know an open source compiler written in ocaml with hand-written lexer and parser?
<thelema>
Boscop: I have a toy compiler written in ocaml using ocamllex and ocamlyac for lex and parse
<thelema>
I should put it up on github sometime...
<thelema>
after lunch, maybe
<Boscop>
ok
thelema is now known as thelema-lunch
<Boscop>
unicode support isn't crucial for the first iteration of my language (the 2nd iteration will be written in the language itself, which supports unicode), but the whitespace handling is crucial
<zorun>
Boscop: I think haXe is written in OCaml
<zorun>
Boscop: or you could try Opa
<adrien>
thelema-lunch: seems like it is the asm compiler
ulfdoz has joined #ocaml
lopex has joined #ocaml
mdelaney has quit [Quit: mdelaney]
junsuijin has joined #ocaml
mdelaney_ has joined #ocaml
thelema-lunch is now known as thelema
<thelema>
adrien: yup, one more path entry added and I'm on to another unsupported relocation kind and more unresolved symbols
<adrien>
=/
<thelema>
even odder: "cannot resolve symbols for ... flexdll_msvc64.obj: memcpy strcmp strlen"
sebz has joined #ocaml
bobry has joined #ocaml
Associat0r has quit [Quit: Associat0r]
Anarchos has joined #ocaml
Associat0r has joined #ocaml
Associat0r has quit [Changing host]
Associat0r has joined #ocaml
eb4890 has joined #ocaml
ftrvxmtrx has quit [Read error: Connection reset by peer]
ikaros_ has joined #ocaml
ftrvxmtrx has joined #ocaml
ikaros_ is now known as ikaros
zorun has quit [Remote host closed the connection]
zorun has joined #ocaml
sebz has quit [Quit: Computer has gone to sleep.]
avsm has joined #ocaml
ftrvxmtrx has quit [Quit: Leaving]
surikator has quit [Quit: Scientific discovery is just maximal compression of random strings. Nothing more, nothing less.]
sebz has joined #ocaml
Snark has quit [Quit: Quitte]
sepp2k has quit [Ping timeout: 252 seconds]
ygrek has quit [Quit: Leaving]
sepp2k has joined #ocaml
hto has joined #ocaml
milosn has quit [Ping timeout: 258 seconds]
hto has quit [Read error: Connection reset by peer]
milosn has joined #ocaml
hto has joined #ocaml
hto has quit [Write error: Connection reset by peer]
ulfdoz has quit [Ping timeout: 240 seconds]
sebz has quit [Quit: Computer has gone to sleep.]
bobry has quit [Quit: Leaving.]
<thelema>
grr, I just found that I had a 32-bit flexlib installed from cygwin
ftrvxmtrx has joined #ocaml
sepp2k has quit [Remote host closed the connection]
avsm has quit [Quit: Leaving.]
Anarchos has quit [Quit: Vision[0.9.7-H-090423]: i've been blurred!]
eb4890 has quit [Ping timeout: 260 seconds]
sebz has joined #ocaml
sebz has quit [Client Quit]
julm has quit [Quit: 23:38:52 up 194 days, 21:39]
sebz has joined #ocaml
ag4ve has joined #ocaml
bobry has joined #ocaml
asmanur_ has joined #ocaml
sebz has quit [Quit: Computer has gone to sleep.]
asmanur has quit [Ping timeout: 276 seconds]
mdelaney_ has quit [Ping timeout: 260 seconds]
Cyanure has joined #ocaml
<thelema>
is there any nicer way to map [a;b;c;d;e;f] to [f a;f b;f c;f d;f e],g f (for an arbitrary number of a-e) than writing a near-map using a recursive function?
<zorun>
uh?
Morphous has quit [Ping timeout: 245 seconds]
<thelema>
zorun: I'm parsing a comma-separated list
<zorun>
List.map f [a;b;c;d;e] doesn't do the trick?
ikaros has quit [Quit: Ex-Chat]
<thelema>
the last value in the list needs to be handled differently from the rest
<zorun>
oh
<thelema>
I don't want to write (again) let rec loop acc = function [] -> assert false | [last] -> List.rev acc, g last | h::t -> loop (f h::acc) t
<thelema>
yay, it looks like I've finally worked out a 64-bit build of ocamlc on windows
<zorun>
too late, you've just wrote it here :)
<zorun>
thelema: wow, impressive
<thelema>
zorun: I wrote it before for a nearly identical parser. I find that code ugly
<zorun>
the last time I tried, I gave up pretty quickly
<zorun>
do you really need tail-recursion?
<thelema>
no, the list will be short; < 10 elements
<thelema>
extreme case, 104 elements.
<zorun>
mmh, without a ref, I don't see how you can avoid this List.rev
<thelema>
It's not as much the rev, but the whole obtuse recursive structure that I'd like to avoid
<thelema>
hmm, problems with findlib.conf under windows: "unbound module Camlp4"
Morphous has joined #ocaml
<thelema>
hmm, bad META file for camlp4 somehow... I think I'm on my way home.
<thelema>
under win64, there's no .a, is it .dll?
<zorun>
don't think so
<zorun>
.dll are .So
<zorun>
*.so
lpereira has quit [Quit: Leaving.]
ftrvxmtrx has quit [Quit: Leaving]
joewilliams is now known as joewilliams_away
explodus has quit [Ping timeout: 268 seconds]
mdelaney has joined #ocaml
Associat0r has quit [Quit: Associat0r]
surikator has joined #ocaml
bobry has quit [Ping timeout: 245 seconds]
Cyanure has quit [Read error: Connection reset by peer]
dnolen has joined #ocaml
<NaCl>
What would be a good extension language for ocaml applications?