gildor changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 3.12.0 http://bit.ly/aNZBUp
oriba has quit [Quit: oriba]
oriba has joined #ocaml
oriba has left #ocaml []
philtor has quit [Read error: Operation timed out]
boscop_ is now known as boscop
joewilliams is now known as joewilliams_away
barismetin has joined #ocaml
dnolen has quit [Quit: dnolen]
iris1 has joined #ocaml
lopex has quit []
dnolen has joined #ocaml
enthymeme has quit [Ping timeout: 258 seconds]
joewilliams_away is now known as joewilliams
<EM03> so whats the future of ocaml development? How active is development on the language?
itegebo_ has joined #ocaml
itegebo has quit [Ping timeout: 240 seconds]
joewilliams is now known as joewilliams_away
<thelema> EM03: more active now than in the last 5 years
<EM03> really?
nannto_ has quit [Quit: Leaving...]
nannto_ has joined #ocaml
<NaCl> what would really be nice is if ocaml gave useful error messages
<NaCl> well, they are, but in some cases, it spews out what's in the class instead of the class itself
* NaCl eyes lablgtk
<EM03> lablgtk heh
<EM03> I hope they eventually start improving the compiler more
<EM03> I mean it compiles to straight asm correct? Seems like lots of room for optimization
* NaCl seems to be unable to pass text field information to a callback
* NaCl has to pass the widgets
<EM03> how is the performance of the lablgtk bindings?
jlouis has quit [*.net *.split]
jlouis has joined #ocaml
<EM03> i remember some people way back used to complain about mldonkey being a bit slow, but maybe thats just the nature of that type of program to begin with
<NaCl> I wouldn't know, I'm just trying to figure out how to use it. xD
* NaCl doesn't know why almost every GTK function needs () at the end
likebike has joined #ocaml
impy has quit [Ping timeout: 255 seconds]
Associat0r has quit [Quit: Associat0r]
fraggle_ has quit [Remote host closed the connection]
fraggle_ has joined #ocaml
philtor has joined #ocaml
joewilliams_away is now known as joewilliams
impy has joined #ocaml
joewilliams is now known as joewilliams_away
vivanov has joined #ocaml
vivanov has quit [Quit: Lost terminal]
vivanov has joined #ocaml
joewilliams_away is now known as joewilliams
ulfdoz has quit [Ping timeout: 255 seconds]
hyperboreean has quit [Ping timeout: 258 seconds]
Modius has quit [Ping timeout: 276 seconds]
<EM03> anyone here ever use the camlcgi stuff or camlgi or what not ? for web stuff?
<EM03> the author put nothing in there on usage
dnolen has quit [Quit: dnolen]
khia0 has joined #ocaml
joewilliams is now known as joewilliams_away
khia0 has left #ocaml []
edwin has joined #ocaml
itegebo_ has quit [Read error: Operation timed out]
Snark has joined #ocaml
philtor has quit [Ping timeout: 244 seconds]
clog has joined #ocaml
vivanov has quit [Quit: Lost terminal]
vivanov has joined #ocaml
vivanov has quit [Quit: Lost terminal]
axiles has joined #ocaml
thomasga1 has joined #ocaml
thomasga has quit [Quit: Leaving.]
fschwidom has joined #ocaml
itegebo has quit [Read error: Operation timed out]
lopex has joined #ocaml
itegebo has joined #ocaml
_andre has joined #ocaml
Tommytom has joined #ocaml
lamawithonel has quit [Remote host closed the connection]
Cyanure has quit [Remote host closed the connection]
<Tommytom> Hello ! Byte type exits in OCamL ?
<flux> tommytom, the closes you can get is char
<Tommytom> Not cool
<Tommytom> Thx you
<Tommytom> so
<Tommytom> how represent the number 1 in char ?
<flux> Char.chr 1
<Tommytom> Awesome thx you !
edwin has quit [Read error: Connection reset by peer]
edwin has joined #ocaml
<hcarty> Tommytom: If you want many bytes, you can use a Bigarray
<Tommytom> thx hcarty but I think I can do my things with a char array ;)
edwin has quit [Remote host closed the connection]
<thelema> Tommytom: be aware that an array of 20 chars takes up 21 words of RAM
<thelema> whereas a bigarray of 20 bytes would take 20 bytes + however big the bigarray header is
<Tommytom> okok, i ll try bigarray when the actual version will work ;)
<Tommytom> thx for the explainations
<Tommytom> *explanation
explodus has quit [Ping timeout: 276 seconds]
rwmjones has quit [Read error: Operation timed out]
edwin has joined #ocaml
lamawithonel has joined #ocaml
rwmjones has joined #ocaml
boscop_ has joined #ocaml
boscop has quit [Ping timeout: 255 seconds]
cthuluh has quit [Remote host closed the connection]
dnolen has joined #ocaml
fraggle_ has quit [Quit: -ENOBRAIN]
vivanov has joined #ocaml
fraggle_ has joined #ocaml
cthuluh has joined #ocaml
<adrien> "- PR#5165: ocamlbuild does not pass '-thread' option to ocamlfind"
* adrien dances around \o/
<thelema> yes, a big list of fixes
explodus has joined #ocaml
<adrien> definitely
<adrien> now I need to wait for some packages to catch up
barismetin has joined #ocaml
rixed_ has joined #ocaml
rixed has quit [Ping timeout: 276 seconds]
lamawithonel has quit [Remote host closed the connection]
lamawithonel has joined #ocaml
vivanov has quit [Quit: Lost terminal]
<NaCl> hcarty / rproust: ah, cool, thanks
boscop_ is now known as boscop
<adrien> EM03: well, actually, mldonkey is _fast_ ;-)
<adrien> NaCl: you said most lablgtk functions needed "()" at their end: do you have lines ending with ';' before? if so, just skip the last ';' and avoid the "()"
<NaCl> that usually causes syntax errors
<adrien> if your last lines are "foo#bar ~baz; ()", then you can use "foo#bar ~baz" directly, provided bar returns "unit"
<adrien> or, you can "ignore (foo#bar ~baz)" if it doesn't
<adrien> shouldn't cause _syntax_ errors
<NaCl> I was looking for what ignore was
<adrien> 'a -> unit: it throws 'a away
<NaCl> It's a bit hard to tell what those functions are. xD
<adrien> I guess ignore is written as "let ignore _ = ()" in the ocaml sources ;-)
<NaCl> mmm
<adrien> ah, and you often need "()" as the last parameter of lablgtk functions because you can have a lot of optional arguments which you don't mention and ocaml can't guess if you're trying to do partial application of the function (so returning a function) or simply omitting optional arguments
<adrien> the other case is that "foo#bar" is a constant while "foo#bar ()" will be evaluated and can therefore change during the course of the program
<NaCl> ah
<NaCl> thank you, currying
<thelema> NaCl: optional arguments are difficult to mix with default partial application
<thelema> maybe the choice to assume that leading default arguments should be kept until it's certain that they can't be applied is the wrong one, and they should by default auto-apply with their default value as soon as possible.
<Tommytom> Excuse me, but in method, how can I change value of a global variable ?
thelema_ has joined #ocaml
<flux> you cannot
<flux> however, you can have global references that can be repointed
<flux> like: let a = ref 42
<flux> and then later on: if !a = 42 then a := 45
<flux> (or in other words: not just any variable can be mutated, only ones that have been defined in that way that it is possible)
dnolen has quit [Quit: dnolen]
<Tommytom> I will try that, thx
thelema has quit [Ping timeout: 244 seconds]
<Tommytom> let lot_addr_b3 = ref (Char.chr 1);;
<Tommytom> there are mistakes ?
<thelema_> Tommytom: looks good to me.
<krktz> hi, i'm using ocamlyack and my main rule returns a declaration list ; the type declaration is declared in expr.ml but it's not found, even when adding %{ open Expr %} at the beginning of the file. What is the problem?
ftrvxmtrx has joined #ocaml
<Tommytom> in my method, I have an error here: lot_addr_b3 := Char.chr (!lot_addr_b3 + 1)
<Tommytom> (without := but =)
<Tommytom> Excuse me, I understood
Tommytom has left #ocaml []
Tommytom1 has joined #ocaml
<thelema_> krktz: there's a couple possibilities, the output of ocamlyacc is a .ml file, does this .ml file have `open Expr` towards the top?
vince|work_ has joined #ocaml
<vince|work_> What's the correct way to do non-greedy matches with the Str module? When the regexp "^\(.+\)#\(.+)$" is matched against "foo#bar#baz", I'd want the groups to be ["foo"; "bar#baz"]
<thelema_> vince|work_: ^\([^#]+\)#\(.+\)$
<vince|work_> thanjks
bacam has quit [Read error: No route to host]
<krktz> yes thelema_ it does
bacam has joined #ocaml
<thelema_> krktz: have you compiled expr so that there's a expr.cmi in the current directory?
<krktz> i'm using ocamlbuild
<thelema_> ok, so that should be taken care of...
<thelema_> assuming it's not a build problem, is anything from Expr reachable?
<krktz> but you're right
<krktz> there's no expr.mli in _build/
<thelema_> not mli, cmi
<thelema_> cmi is the compiled interface, and can be built directly from .ml if .mli is not available
<krktz> there's no expr.* in _build
<thelema_> ok, then that's a problem.
<thelema_> ocamlbuild should automatically pick up the dep, is there a .depends file for your ocamlyacc module?
<thelema_> (in _build)
bacam has quit [Client Quit]
<krktz> no
<krktz> I haven't any dotted file in _build
<thelema_> ?? can you pastebin your _build/_log?
oriba has joined #ocaml
<krktz> I'can't right now but it should be possible in twenty minutes
<krktz> sorry
lopex has quit [Ping timeout: 252 seconds]
iris1 has quit [Quit: iris1]
<EM03> adrien: is mldonkey really fast? I actually never used it honestly hehe
oriba has left #ocaml []
ftrvxmtrx has quit [Quit: This computer has gone to sleep]
philtor has joined #ocaml
lamawithonel has quit [Ping timeout: 260 seconds]
<adrien> EM03: it's a good client overall but the ed2k network is mostly dead no
<adrien> w
lamawithonel has joined #ocaml
joewilliams_away is now known as joewilliams
avsm has quit [Quit: Leaving.]
ulfdoz has joined #ocaml
<krktz> thelema_: that's my _build/_log http://pastebin.com/EcH7yYb1
ftrvxmtrx has joined #ocaml
<thelema_> L25 says there should be a parser.mli.depends created - what's the contents?
<thelema_> should be just a single line
<krktz> parser.mli: Lexing
<thelema_> ok, try putting the %{ and %} on their own lines
<thelema_> although if that was the problem, I'd be surprised that ocamlyacc didn't give a parse error...
<krktz> well
<krktz> they are already on their own lines
<thelema_> parser.mli.depends should be `parser.mli: Lexing Expr`
<krktz> do you want me to paste parser.mly and parser.mli?
<thelema_> which means that ocamldep isn't able to understand parser.mli
<thelema_> sure
<krktz> because parser.mli doesn't actually contain anything about Expr
ulfdoz has quit [Ping timeout: 255 seconds]
<thelema_> hmm...
<krktz> http://pastebin.com/ucD63wNc that's parser.mly
<thelema_> ah, your declarations are probably wrong
<thelema_> yes, `open Expr` doesn't apply to %type <foo> bar
<thelema_> you have to give the full type there
<krktz> oh
ulfdoz has joined #ocaml
<krktz> so Expr.expr?
<thelema_> yes
<thelema_> and Expr.declaration list
<krktz> thanks!
<krktz> it works :)
<thelema_> you're welcome
thelema_ is now known as thelema
ftrvxmtrx has quit [Read error: Connection reset by peer]
ftrvxmtrx has joined #ocaml
alexyk has joined #ocaml
jamii has joined #ocaml
Associat0r has joined #ocaml
<EM03> hcarty: hey, yea I'm just toying around for the most part, see how these ocaml frameworks did it
<EM03> there is actually quite a few theres mod_ocaml , mod_caml made by 2 different people and a web server built in ocaml and camlGI a slight layer on top of ocamlnet2 ......interesting stuff
ankit9 has quit [Ping timeout: 255 seconds]
ygrek has joined #ocaml
edwin has quit [Remote host closed the connection]
ikaros has joined #ocaml
<flux> I've used netcgi's fcgi connector with great success
<flux> although I patched it to multithread.. should submit that in some day :)
thomasga1 has quit [Quit: Leaving.]
gal_bolle has joined #ocaml
vivanov has joined #ocaml
<hcarty> adrien: Another xstrp4 update - Now With Even Simpler Customization
oriba has joined #ocaml
<hcarty> adrien: I may even document it soon...
<EM03> flux: its not multi threaded?
<EM03> yes patch that asap heheh
<flux> I guess it only affects a minority of applications
<flux> but it absolutely kills you if you're doing long-polling..
enthymeme has joined #ocaml
<EM03> I prefer comet myself over long polling
<flux> I thought they were the same thing?
<EM03> I thought they were different
<EM03> long polling is just that'
<flux> well, what's the difference then?
<EM03> comet is a 2 way connection in the browser open, one going one coming
<EM03> polling I thought just waited until the server did a update and waited longer until there was something
ankit9 has joined #ocaml
<flux> ah, ok. I've actually used that technique. proxies were killing it..
<EM03> but I think comet can still do long polling as well
<EM03> I like websockets and bosh/comet
<flux> so the way I've done long-polling is that client sends what it thinks the world situation is (say, a serial number) and the server either responds immediately if the world has changed, or waits up to n seconds until that has happened. otherwise it returns timeout.
<flux> websockets will be nice when they'll be pervasive..
<flux> no more such hacks
<EM03> on phones they are already working right?
<EM03> android / iphone?
philtor has quit [Ping timeout: 276 seconds]
<flux> no idea
<flux> do all pc browsers support them properly?
<flux> how about proxies?
<flux> or do proxies need to support them. I hope not.
<flux> I'd be surprised if N900 web browser supported it..
<flux> also I think ocsigen doesn't support web sockets.. although I guess it could be extended without touching the core to do just that.
<EM03> ios has it looks like
<EM03> I'm not really a fan of the whole ocsigen ....I just prefer a nice light framework with some standard mvc and a layer above cgi ...
<EM03> well a few layers above cgi but not super full stack
<flux> I've found ocsigen is difficult to get back to after one's been away from it for a while
<flux> personally I need to dig into documentation and .mli files every time
<flux> of course, doing plain cgi is much simpler
<flux> but I don't think there are solutions that are between cgi and ocsigen
<flux> netcgi is relatively complete on the cgi level, though
<EM03> yes ....
<EM03> CamlGI tries to be above ocamlnet2
<EM03> provides template and some stuff for even sending emails etc
<EM03> I've been looking at the source
oriba_ has joined #ocaml
philtor has joined #ocaml
oriba has left #ocaml []
philtor has quit [Ping timeout: 264 seconds]
vivanov has quit [Ping timeout: 240 seconds]
vivanov has joined #ocaml
vince|work_ has quit [Quit: Page closed]
philtor has joined #ocaml
edwin has joined #ocaml
edwin has quit [Remote host closed the connection]
Snark has quit [Quit: Ex-Chat]
philtor has quit [Ping timeout: 244 seconds]
oriba_ has quit [Quit: oriba_]
Modius has joined #ocaml
Anarchos has joined #ocaml
lopex has joined #ocaml
mfp has quit [Read error: Connection reset by peer]
jamii has quit [Ping timeout: 250 seconds]
Reaganomicon has quit [Read error: Connection reset by peer]
mfp has joined #ocaml
mfp has quit [Read error: Connection reset by peer]
philtor has joined #ocaml
enthymeme has quit [Ping timeout: 258 seconds]
mfp has joined #ocaml
alexyk has quit [Quit: alexyk]
vivanov has quit [Quit: Lost terminal]
alexyk has joined #ocaml
fschwidom has quit [Ping timeout: 250 seconds]
ygrek has quit [Ping timeout: 250 seconds]
jamii has joined #ocaml
<adrien> hcarty: I'm geniously interested but I won't have time for that until next week unfortunately
<hcarty> adrien: Not a problem, just keeping you updated in case your interest continues :-)
<adrien> :-)
<adrien> I've planned to migrate something (cowboy) from (s)printf to xstrp4 too ;-)
<hcarty> Custom quotation handling can be added in ~17 SLOC for a simple case
<hcarty> sprintf replacement comes out of the box still, of course
lopex has quit []
<Anarchos> i am bad : i had to dig the net and found the Michel Meauny's lessons to learn the unification algorithm of robinson....
lopex has joined #ocaml
<adrien> I have to output code: the current way is to use aligned strings in a list that I string.concat
<adrien> expression skills low: going to bed :P
lamawithonel has quit [Remote host closed the connection]
Tommytom1 has left #ocaml []
axiles has quit [Remote host closed the connection]
_andre has quit [Quit: *puff*]
ulfdoz has quit [Read error: Operation timed out]
<hcarty> adrien: Have a good night
edwin has joined #ocaml
Reaganomicon has joined #ocaml
sepp2k has joined #ocaml
lamawithonel has joined #ocaml
sepp2k has quit [Quit: Leaving.]
edwin has quit [Remote host closed the connection]
<sheets> so i rebuilt my ocamlc yesterday to raise instead of assert at L1680 in typing/parmatch.ml and the exception that it was masking was the assert on L611 of same
<sheets> I've been trying to reduce the bug but haven't had much luck yet as the changed code sits in the middle of a stack of modules
<Anarchos> sheets what does the line says ?
<sheets> "Fatal error: exception Assert_failure("typing/parmatch.ml", 1680, 22)" is what the error message is
<sheets> or do you mean the lines in parmatch.ml?
<sheets> the source is the failure of "match Ctype.expand_head pat.pat_env pat.pat_type with
<sheets> {desc = Tvariant row} -> Btype.row_repr row
<sheets> | _ -> assert false"
<sheets> So I guess some row pattern isn't tagged as Tvariant
<Anarchos> sheets i can't help you anymore sorry
<sheets> uh it's ok. is it because of me? or the problem? or you have something better to do? :-P
<Anarchos> no idea
<sheets> heh ok
<Anarchos> sheets what is your platform, revision of ocaml ?
<sheets> mac os x 10.6, ocaml 3.12.0
<sheets> i considered trying 3.12.1 rc but i have a lot of dependencies i'd rather not rebuild right now
<Anarchos> sheets mine is OCaml version 3.13.0+dev3 (2011-03-07) on HaikuOS and it compiles fine
<Anarchos> even native code and dynamic loading
Anarchos has quit [Quit: Vision[0.9.7-H-090423]: i've been blurred!]
barismetin has quit [Remote host closed the connection]
<sheets> the compiler compiles but the assert fails in the compiler when compiling my code
<thelema> what assert?
<sheets> thelema: the one from yesterday on L1680 of typing/parmatch.ml
<thelema> you're trying 3.12.1rc?
_andre has joined #ocaml
<thelema> and can you paste the crazy pattern match you're doing to cause the failure?
<thelema> *pastebin
<sheets> i'm still on 3.12.0 and i have no idea which match is failing
gal_bolle has quit [Ping timeout: 240 seconds]
<sheets> i don't even have complex matches with nested patterns or anything in this code
<thelema> what platform?
<sheets> i'm instrumenting 3.12.0 right now to see which tag is mismatched at L611 in typing/parmatch.ml
<sheets> OS X 10.6
<thelema> and the nesting isn't necessarily the problem, it's just one match that it fails to be proved complete or incomplete
<thelema> huh, something is expected to be a variant but it's not...
philtor has quit [Ping timeout: 246 seconds]
<sheets> yes, i'll soon be able to tell what that non-variant tag is which might shed some light on the problem
* thelema is interested
<sheets> before last week i'd never found a compiler bug
<sheets> now i've found 3 in 3 compilers :-P
<thelema> wow. a unusual week
<sheets> yes. quite strange. the non-ocaml compilers are rather experimental, though, so that's not so surprising
<sheets> actually i had found bugs before, that's not true. never so many so fast, though
<EM03> (* ocaml is fun *);; no comments in the interpreter? strange
<sheets> Tconstr is the tag incoming instead of Tvariant
<thelema> so you're getting a constructor instead of a variant? hmm
<thelema> are you missing a `?
<sheets> i'm looking
impy has quit [Quit: impy]
<sheets> not that i can see
<sheets> mostly i've changed type signatures in the module that it fails on
<thelema> well, good luck. Time for me to go for a bit. back in a few hours
<sheets> ok. thanks
<sheets> ttyl
<hcarty> EM03: You can have comments in the toplevel
<EM03> syntax error here
<hcarty> EM03: You need an expression of some sort
<EM03> # (* dsfdsfdsfds *);;
<EM03> Error: Syntax error
<EM03>
<hcarty> (* test *)1;; works, for example
<EM03> heheh
<hcarty> (* ... *) is not a code block, so ;; isn't really appropriate. That's my excuse at least...
<EM03> I understand
<EM03> I haven't used ocaml since 05, but I loved it
<EM03> its almost like relearning
jamii has quit [Ping timeout: 258 seconds]
joewilliams is now known as joewilliams_away
jamii has joined #ocaml
jamii has quit [Ping timeout: 258 seconds]
jamii has joined #ocaml
jamii has quit [Ping timeout: 258 seconds]
impy has joined #ocaml
jamii has joined #ocaml
ikaros has quit [Quit: Ex-Chat]
boscop_ has joined #ocaml
EM03 has quit [Ping timeout: 258 seconds]
lamawithonel_ has joined #ocaml
Associat0r has quit [Read error: Connection reset by peer]
boscop has quit [Read error: Connection reset by peer]
boscop_ is now known as boscop
itegebo_ has joined #ocaml
Asmadeus_ has joined #ocaml
BiDOrD_ has joined #ocaml
jamii has quit [Ping timeout: 258 seconds]
Morphous_ has joined #ocaml
impy has quit [*.net *.split]
lamawithonel has quit [*.net *.split]
Reaganomicon has quit [*.net *.split]
alexyk has quit [*.net *.split]
mfp has quit [*.net *.split]
ankit9 has quit [*.net *.split]
itegebo has quit [*.net *.split]
Morphous has quit [*.net *.split]
BiDOrD has quit [*.net *.split]
wtetzner has quit [*.net *.split]
Asmadeus has quit [*.net *.split]
kurtosis has quit [*.net *.split]
mal`` has quit [*.net *.split]
wtetzner has joined #ocaml
Associat0r has joined #ocaml
Reaganomicon has joined #ocaml
impy has joined #ocaml
alexyk has joined #ocaml
mfp has joined #ocaml
ankit9 has joined #ocaml
kurtosis has joined #ocaml
mal`` has joined #ocaml
lopex has quit []
itegebo_ has quit [Quit: No Ping reply in 180 seconds.]
itegebo has joined #ocaml
itegebo has quit [Read error: Connection reset by peer]
ankit9 has quit [Ping timeout: 255 seconds]
Asmadeus_ has quit [Read error: Operation timed out]
wtetzner has quit [Ping timeout: 255 seconds]
Asmadeus has joined #ocaml
philtor has joined #ocaml
ankit9 has joined #ocaml
_andre has quit [Quit: leaving]
wtetzner has joined #ocaml