gildor changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 3.12.1 http://bit.ly/nNVIVH
iratsu has joined #ocaml
lopex has quit []
dnolen has quit [Quit: dnolen]
explodus has joined #ocaml
sebz has quit [Quit: Computer has gone to sleep.]
sebz has joined #ocaml
mdelaney has quit [Ping timeout: 260 seconds]
surikator has joined #ocaml
johnnowak has joined #ocaml
<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.
mdelaney has quit [Ping timeout: 245 seconds]
mdelaney has joined #ocaml
ankit9 has joined #ocaml
joewilliams_away is now known as joewilliams
<johnnowak> _habnabit: all i know of is http://anil.recoil.org/2011/04/15/ocaml-users-group.html
<_habnabit> yeah, I saw that.
joewilliams is now known as joewilliams_away
<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 :)
ikaros has joined #ocaml
bobry has quit [Quit: Leaving.]
Associat0r has joined #ocaml
Associat0r has quit [Changing host]
Associat0r has joined #ocaml
emias has quit [Quit: Changing server]
emias has joined #ocaml
Associat0r has quit [Quit: Associat0r]
Cyanure has joined #ocaml
jaar has joined #ocaml
bobry has joined #ocaml
Yoric has joined #ocaml
sepp2k has joined #ocaml
milosn has quit [Ping timeout: 260 seconds]
Derander has quit [Quit: ZNC - http://znc.sourceforge.net]
Derander has joined #ocaml
sebz has quit [Ping timeout: 276 seconds]
milosn has joined #ocaml
ftrvxmtrx_ has joined #ocaml
ftrvxmtrx has quit [Ping timeout: 260 seconds]
lopex has joined #ocaml
jaar has quit [Quit: Quitte]
avsm has joined #ocaml
<gildor> thelema, zorun, adrien: is the new SSL cert for the forge ok for you ?
<zorun> gildor: wonderful ;)
<raphael-p> gildor: works here
<adrien> gildor: great, thanks! =)
surikator has joined #ocaml
ikaros has quit [Quit: Ex-Chat]
iratsu has quit [Ping timeout: 245 seconds]
avsm has quit [Quit: Leaving.]
lopex_ has joined #ocaml
lopex has quit [Ping timeout: 252 seconds]
lopex_ is now known as lopex
iratsu has joined #ocaml
avsm has joined #ocaml
iratsu has quit [Ping timeout: 245 seconds]
jimmyrcom has joined #ocaml
waern_ has joined #ocaml
waern has quit [Ping timeout: 258 seconds]
kerneis has left #ocaml []
hto has quit [Quit: Lost terminal]
iratsu has joined #ocaml
lopex_ has joined #ocaml
lopex__ has joined #ocaml
lopex has quit [Ping timeout: 252 seconds]
lopex_ has quit [Ping timeout: 252 seconds]
lopex__ is now known as lopex
avsm has quit [Quit: Leaving.]
avsm has joined #ocaml
Cyanure has quit [Read error: Connection reset by peer]
julm has quit [Ping timeout: 252 seconds]
julm has joined #ocaml
Associat0r has joined #ocaml
Associat0r has quit [Changing host]
Associat0r has joined #ocaml
lopex has quit []
ftrvxmtrx_ has quit [Quit: Leaving]
Modius has joined #ocaml
<thelema> hmm, how to type a list that's a sequence of transformations where the output of one transformation needs to match the input of the next
<flux> you mean the type of consecutive transformations need to be the same for output/input?
<thelema> R (r -> r), C (r -> t) and T (t -> t) are the three transformation types...
<thelema> I guess I should just use three lists...
<thelema> since all the R transformations have to happen before C transforms before T transforms
<thelema> and the input type is handleable by checking if R and C are empty, and the reverse for the output type
<flux> hmm, maybe you could make a sum type of the permutations?-)
<thelema> I want to have a sequence of transformations to be applied in that order
<flux> (hm, not sure if that would even work)
<thelema> but I want to output logging information in=between
<thelema> I don't think I can have a sum type for possible sequences of transformations
<_habnabit> a polymorphic type ('a, 'b) t = R of ('a -> 'a) | C of ('a -> 'b) | T of ('b -> 'b) ?
<thelema> _habnabit: ok, I have that.
<thelema> I guess I could do manual checking that a T doesn't follow a R, and other allowed combinations...
<_habnabit> oh, you want to verify that the order in the list is R -> C -> T
<thelema> _habnabit: and be able to give the right kind of input at the front and accept the output at the end.
<thelema> if I had more than two kinds of values, this'd be really ugly, but maybe doable with two types...
avsm1 has joined #ocaml
<_habnabit> hmm.
<_habnabit> it seems like it's doable, but I have to bike to work now. so, brb.
avsm has quit [Ping timeout: 252 seconds]
<thelema> ah, I can't have a list of C's
<thelema> list of R's, one C, list of T's
<thelema> flux: maybe there is a list of combinations I can enumerate
avsm1 has quit [Quit: Leaving.]
menace has joined #ocaml
bobry has quit [Quit: Leaving.]
avsm has joined #ocaml
joewilliams_away is now known as joewilliams
ttamttam has quit [Remote host closed the connection]
betta_y_omega has quit [Ping timeout: 252 seconds]
betta_y_omega has joined #ocaml
Yoric has quit [Quit: Leaving.]
avsm has quit [Quit: Leaving.]
avsm has joined #ocaml
mdelaney has quit [Quit: mdelaney]
<thelema> has anyone here got this[1] to work? [1] http://www.ocamlpro.com/code/2011-06-23-ocaml-mscv-win64.html
<thelema> I'm getting "Fatal error: cannot open pervasives.cmi" and think I've installed it to the wrong place, but don't know the right place
<thelema> I've tried f:\program files (x86)\, c:\program files (x86), and c:\program files, and all fail
rby has quit [Quit: leaving]
menace has left #ocaml []
<adrien> thelema: ProcessMonitor from microsoft (sysinternals)
rby has joined #ocaml
<thelema> adrien: watch what file it tries to open?
<adrien> exactly
<adrien> what I did with gtk today
ftrvxmtrx has joined #ocaml
<adrien> which is what someone from redhat who's packaging spice-space.org stuff did too
<flux> so, what is the best 2d and 3d matrix manipulation library for ocaml?
<flux> I'd like to try out an algorithm, performance isn't the top priority (although I suppose it'd be nice if it was good)
<thelema> flux: Lacaml
<flux> surprisingly it doesn't appear to be packaged for debian :-o
<thelema> adrien: how to catch the process before it quits?
<adrien> flux: different name?
<adrien> thelema: run process monitor first?
<flux> I tried lacaml and lapack ocaml
<adrien> have a look at filters too, they're quite annoying at first
<thelema> oh, process monitor, process explorer... n/m
<adrien> (and they remain annoying but you get used to them)
<adrien> ah, right, _monitor_ ;-)
<flux> well, it compiled simply enough. thelema, thanks for the suggestions, going to try it
* thelema just noticed the desktop shortcut created by the installer, and somehow this shortcut runs ocaml without it crashing...
<adrien> thelema: right-click, "properties", check "run in" (sets $PWD)
mdelaney has joined #ocaml
<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?
mdelaney has quit [Ping timeout: 260 seconds]
mdelaney has joined #ocaml
arubin has joined #ocaml
seafood_ has joined #ocaml