flux changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | 3.11.0 out now! Get yours from http://caml.inria.fr/ocaml/release.html
willb2 has quit [Read error: 60 (Operation timed out)]
ofaurax has joined #ocaml
seafood has joined #ocaml
ofaurax has quit [Client Quit]
alexyk has joined #ocaml
snhmib has quit ["Zoom broom boom"]
Axioplase_ is now known as Axioplase
alexyk has quit []
alexyk has joined #ocaml
Demitar has quit [Remote closed the connection]
Demitar has joined #ocaml
seafood has quit []
Waleee has quit []
alexyk has quit []
alexyk has joined #ocaml
ulfdoz_ has joined #ocaml
ulfdoz has quit [Read error: 110 (Connection timed out)]
sporkmonger has quit []
Stefan_vK1 has joined #ocaml
seafood has joined #ocaml
Stefan_vK has quit [Read error: 110 (Connection timed out)]
seafood has quit []
purple__ has quit [Remote closed the connection]
sporkmonger has joined #ocaml
purple__ has joined #ocaml
<flux> camarade_tux, that's the case where ccache helps
<flux> camarade_tux, given there are source files that are remain identical after an update (including its dependency include files)
<flux> so, a version number change can screw it up..
<olegfink> the way c/c++ can be built is a bit 'not modern' (which is especially painful for c++, which is claimed to be a modern high-level language)
<olegfink> by the way, Camarade_Tux, have you looked at opera's obml? while that's not the full web experience(tm), an obml renderer implementation makes sense for thin clients or other cases where a full-blown html engine is not likely to function
vixey has joined #ocaml
sporkmonger has quit []
Hadaka has quit [Read error: 60 (Operation timed out)]
^authentic has joined #ocaml
<Camarade_Tux> flux, hmmm, I think I'm going to set ccache up, make often redoes everything (as soon as a Makefile is changed afaict)
authentic has quit [Read error: 60 (Operation timed out)]
^authentic is now known as authentic
sscj has quit [kornbluth.freenode.net irc.freenode.net]
ski_ has quit [kornbluth.freenode.net irc.freenode.net]
mrvn has quit [kornbluth.freenode.net irc.freenode.net]
jeremiah has quit [Read error: 104 (Connection reset by peer)]
mrvn has joined #ocaml
ski_ has joined #ocaml
sscj has joined #ocaml
<Camarade_Tux> olegfink, I didn't know about obml, but I can't find much (technical) information
<olegfink> there isn't afaik, only a half-finished clean-room reverse engineered reference. I don't insist on using exactly obml, but having something of the sort but maybe with more desktop-oriented features would surely benefit many.
<olegfink> I already tried getting some webkit developers interested in that, maybe there will be something going on (I'd be glad to develop the client in glcaml, but server-side webkit implementation is above my possibilities)
marmotine has joined #ocaml
_zack has joined #ocaml
jeremiah has joined #ocaml
Camarade_Tux_ has joined #ocaml
<Camarade_Tux_> I have to said I planned to have a polymorphic type to let me choose between several rendering engines (webkit, mmm, simple text), so a fourth one is possible
<olegfink> oh, nice. now just convince someone to write the actual implementation...
<Camarade_Tux_> we should just marshal it to an ocaml binary format, it will be unbearable for anybody not using ocaml but since ocaml will reign over the world in 2009, that's not a problem ><
<olegfink> marshaling the rendered dom (i.e. with computed styles including position and such) is almost what is needed here
Camarade_Tux has quit [Read error: 110 (Connection timed out)]
Camarade_Tux_ is now known as Camarade_Tux
<Camarade_Tux> I guess it will get a better reception if it's not ocaml-specific ;)
* Camarade_Tux has homework on matlab =/
s4tan has joined #ocaml
ikaros has joined #ocaml
<olegfink> Camarade_Tux: 9p! 9p! 9p!
<Camarade_Tux> 9p ? the only 9p I know is the filesystem one :p
<olegfink> yeah, the easiest way to marshal tree-like dom
__me has joined #ocaml
_zack has quit [Read error: 104 (Connection reset by peer)]
rwmjones_ has joined #ocaml
ikaros has quit [Read error: 110 (Connection timed out)]
ikaros has joined #ocaml
Camarade_Tux has quit ["Leaving"]
Camarade_Tux has joined #ocaml
Camarade_Tux has quit [Remote closed the connection]
Camarade_Tux has joined #ocaml
Associat0r has joined #ocaml
Naked has joined #ocaml
Naked has quit [Client Quit]
Camarade_Tux has quit [Remote closed the connection]
Naked has joined #ocaml
Naked has quit [Client Quit]
Naked has joined #ocaml
Camarade_Tux has joined #ocaml
Naked is now known as Hadaka
seafood has joined #ocaml
_zack has joined #ocaml
Camarade_Tux has quit [Remote closed the connection]
Camarade_Tux has joined #ocaml
rwmjones_ has quit ["Closed connection"]
Camarade_Tux has quit [Remote closed the connection]
fschwidom has joined #ocaml
Camarade_Tux has joined #ocaml
Yoric[DT] has joined #ocaml
_zack has quit [Read error: 104 (Connection reset by peer)]
Camarade_Tux has quit [Remote closed the connection]
Camarade_Tux has joined #ocaml
* Camarade_Tux shouldn't have upgraded his kernel...
* Camarade_Tux readies for a reboot
Axioplase is now known as Axioplase_
seafood has quit []
Snark has joined #ocaml
ikaros has quit [".quit"]
ulfdoz_ is now known as ulfdoz
_zack has joined #ocaml
_zack has quit [Read error: 104 (Connection reset by peer)]
pango has quit [Remote closed the connection]
<Yoric[DT]> :)
pango has joined #ocaml
sporkmonger has joined #ocaml
Camarade_Tux has quit [Remote closed the connection]
Camarade_Tux has joined #ocaml
Camarade_Tux has quit [Remote closed the connection]
Camarade_Tux has joined #ocaml
Camarade_Tux has quit [Remote closed the connection]
Camarade_Tux has joined #ocaml
l_a_m has quit ["Lost terminal"]
l_a_m has joined #ocaml
Camarade_Tux has quit [Remote closed the connection]
Camarade_Tux has joined #ocaml
onigiri has joined #ocaml
ikaros has joined #ocaml
davidw has joined #ocaml
davidw has left #ocaml []
snhmib has joined #ocaml
Associat0r has quit []
willb has joined #ocaml
buzz0r_ has joined #ocaml
psnively has joined #ocaml
psnively has quit [Client Quit]
psnively has joined #ocaml
psnively has quit [Remote closed the connection]
onigiri has quit []
snhmib has quit [Read error: 110 (Connection timed out)]
sporkmonger has quit []
sporkmonger has joined #ocaml
Associat0r has joined #ocaml
Associat0r has quit [Client Quit]
Associat0r has joined #ocaml
ikaros has quit [".quit"]
rwmjones_ has joined #ocaml
bzzbzz has joined #ocaml
__me has left #ocaml []
mikeX_ has joined #ocaml
pango has quit [Remote closed the connection]
pango has joined #ocaml
mikeX has quit [Read error: 110 (Connection timed out)]
snhmib has joined #ocaml
s4tan has quit []
Waleee has joined #ocaml
alexyk has quit []
<Camarade_Tux> anyone know an equivalent of 'ocamlc -i' for c files ? :p
<flux> I think it exists.. hmm, can,1t remember its name. or it might have covered only functions, though
<mrvn> gcc -E?
<mrvn> not quite the same but the best I can think of
<mrvn> Normaly for .c files you write your own .h file.
<mrvn> Fatal error: exception Invalid_argument("String.sub")
<mrvn> Now where the fuck in all this code does that happen?
<Camarade_Tux> -E probably won't work, it won't give the types afaict
<mrvn> Can't i somehow get ocaml to add file/line info to exceptions in binary code?
sebbu2 has joined #ocaml
<sebbu2> hi
<mrvn> Camarade_Tux: -E gives preprocessed output. all of it.
<Camarade_Tux> mrvn, what I'm looking for is basically generating a header out of c code
<sebbu2> http://pastebin.fr/3217 can somebody help me finding where and why do i get : Exception: Invalid_argument "index out of bounds".
<Camarade_Tux> sebbu2, hi
<sebbu2> fft [|{re =2.; im = 0.}; {re =1.; im = 0.}; {re =0.5; im = 0.}|] ;;
<mrvn> sebbu2: I find your index out of bounds if you find my Invalid_argument
<mrvn> #
<mrvn> module C=Complex;;
<mrvn> #
snhmib has quit ["Good riddance!"]
<mrvn> open Complex;;
<mrvn> ??
<Camarade_Tux> sebbu2, you're going from 0 to 2*(n/2)=n, you should only go to n-1
<Camarade_Tux> oh no, sorry, misread
<mrvn> sebbu2: a.(2*j+1) for j=(n+1)/2 gives a.(n+2)
<sebbu2> :(
<sebbu2> thx
<mrvn> Camarade_Tux: and yes, that too I think.
<mrvn> a1.(j) is also off by one
snhmib has joined #ocaml
<sebbu2> fixed with "for j=0 to (n-1)/2", but still the same error
<mrvn> sebbu2: (n-1)/2 might be == n/2
<mrvn> your array only goes from 0 - n/2-1
<Camarade_Tux> sebbu2, do you know on which values or n it crashes ? doesn't it crash on odd values of n ?
<mrvn> You should pick a splitting element let middle = n/2 in and then use 0 to middle-1 and middle to n-1
<olegfink> mrvn: OCAMLRUNPARAM=b?
<Camarade_Tux> (which is basically the problems mrvn mentions)
<sebbu2> yes, odd values
alexyk has joined #ocaml
<mrvn> olegfink: thx
<sebbu2> i want to make an array with pair indexes and another one with odd indexes
<mrvn> Raised at file "string.ml", line 0, characters 0-0
<Camarade_Tux> (* or crap, they're still broadcasting Buffy... and the like *)
<mrvn> Now that is helpfull
<sebbu2> ((n-1)/2)*2+1 should be n at most
<sebbu2> but i still got the same error
<mrvn> sebbu2: n is too big
<sebbu2> n should be 3 in my example :o
<mrvn> let n1 = n/2 in let n2 = n - n1 in let a0 = A.create n1 {re=0.;im=0.} in ...
<mrvn> for j = 0 to n1 - 1 do ...
<olegfink> mrvn: you already know it's in String.sub, you're probably interested in where that sub was called from
<mrvn> olegfink: yes
<mrvn> sebbu2: actualy n1 = (n+1)/2
<mrvn> The first array has to be the bigger one if n is odd I think.
<Camarade_Tux> sebbu2, if n = 3 then n/2 = 1 and (n+1)/2 = 2
<olegfink> at least, that works for me.
<Camarade_Tux> and you're accessing the (n+1)/2-th element
<mrvn> olegfink: That location was from Unix.open()
itewsh has joined #ocaml
Koordin has joined #ocaml
<mrvn> Fatal error: exception Invalid_argument("String.sub")
<mrvn> Raised at file "pervasives.ml", line 23, characters 25-45
<mrvn> Oh so helpfull.
<mrvn> Can I get a bit more backtrace?
<Camarade_Tux> Printf.printf ? ;)
<Koordin> hi, how is it possible the 'when' construct talked about here : http://osdir.com/ml/lang.caml.inria/1996-11/msg00017.html and here : http://caml.inria.fr/pub/old_caml_site/caml-list-ar/0353.html
rwmjones_ has quit ["Closed connection"]
<mrvn> Camarade_Tux: before every String.sub in the code?
<Camarade_Tux> yes =D
<Camarade_Tux> or you can also redefine String.sub
<Koordin> mrvn: you can do try String.sub s with _ -> failwith (Printf.sprintf "String.sub failed with %s" s)
dabd has joined #ocaml
<sebbu2> how do you get backtrace or line for exception ?
dabd has quit ["Ex-Chat"]
<mrvn> OCAMLRUNPARAM=b
<Camarade_Tux> Koordin, hmmm, match chose with | 0 when x = 2 -> ... | 1 when x = 4 -> ...
<trisiak> is there a way to print a variable from program in the same format as toplevel does?
<mrvn> I don't think you can do that in binary. Bytecode maybe.
<trisiak> do you know where should i search for that formatting function?
<mrvn> something like pretty printing
<mrvn> I wagely remember something from the manual
<Koordin> Camarade_Tux: i think you misread my pages
<Koordin> Camarade_Tux: they are talking about a structure like this : when cond1 -> expr1 | cond2 -> expr2 | ... | _ -> defaultexpr
<mrvn> Koordin: which you can do by matching against a dummy value.
<mrvn> match () with () when cond1 -> expr1 | () when cond2 -> expr3 | ... | _ -> defaultexpr
<Koordin> mrvn: yes i know that
<Koordin> mrvn: that's what i use, but if there is a structure when which allows to do this without a "match ()" that would be nice
<mrvn> Not unless you put the conditions into an actual type.
jonafan_ has joined #ocaml
<Camarade_Tux> Koordin, something coming close to that is
<Koordin> what do you mean ?
<Camarade_Tux> let f = function a ... -> ... | b when c -> ...
<Camarade_Tux> but that's the only thing I know
<mrvn> Camarade_Tux: that only replaces the match ... with by function
<Koordin> but why in the mail list there is someone who says that he implemented this structure back to 1990
<Camarade_Tux> mrvn, yeah I know but everybody is not aware of this syntax
<Koordin> "I introduced the when construct in Caml V3.0 a long time ago (1990)" Pierre Weis
<mrvn> Koordin: and it cn do when.
<Koordin> 'cn' ?
<mrvn> function c when (c = '\n') || (c = '\r') -> 1 | _ -> 2
<mrvn> s/cn/can/
<Koordin> hm he was talking about the when of "match" and "function"
<mrvn> Verry usefull.
<Koordin> but there is no when for "when cond1 -> expr1 | cond2 -> expr2 | ... | _ -> defaultexp" as the construction they're talking about ?
<mrvn> better example: let rec exists x = function [] -> false | a::as when a = x -> true | a::as -> find x as
<mrvn> Koordin: no. Only for types.
<Koordin> mrvn: yes i know how to use the existing when
<Koordin> only for types ? what do you mean ?
<sebbu2> how do you show/print an array when using ocamlc / ocamlrun instead of ocaml ?
<mrvn> let x = 17 in match 17 with x -> true | _ -> false doesn't work.
<mrvn> sebbu2: Array.iter
<Koordin> mrvn: that will always return true
<mrvn> Koordin: yes, since it matches the type, the structure of the construct. Not the content.
<Koordin> yes ok
<flux> how is match 17 with 17 -> .. not matching content?
<mrvn> flux: well, that is a literal. the exception.
<Koordin> i matches the content but variables does not have a content during the match
<Koordin> but i thought you were talking about the types int, bool, 'a list, etc.
<flux> match patterns are like the left side of a 'let' statement
<flux> infact, they are exactly that :)
<mrvn> Koordin: there are no variables, they are always new bindings. That is why when is needed.
<flux> and nobody would expect let x = 4 to care what's the contents of x
<Koordin> sure
<flux> unless they were perhaps writing prolog..
<Koordin> :) and flux, do you know about the when struct they are talking about in the pages i gave ?
<mrvn> Confuses at lot of C coders so when you write if x = 4 then
<flux> koordin, yes
<Koordin> ?
<Koordin> why can't we use it ,
<Koordin> ?
<flux> I know about the 'when'-structure
<flux> what do you mean we can't use 'when'?
<Koordin> i'm talking about that :
<mrvn> I miss an option so every TOPLEVEL let x = ... becomes let x = try ... with x -> Printf.fprintf stderr "from %s:%d:%s" __FILE__ __LINE__ __func__; raise x
<Koordin> look at after the line "Thus we may introduce a when construct:"
<mrvn> i.e. backtrace of the exception.
<mrvn> Fatal error: exception Unix.Unix_error(62, "connect", "")
<mrvn> Raised at file "string.ml", line 0, characters 0-0
<flux> well, that kind of expression doesn't exist in ocaml
<mrvn> Is string.ml the first file that gets linked so an unset file/line info defaults to that?
<flux> you can read the ocaml grammar from the documentation
<flux> to me it looks like a suggestion for new syntax
<Koordin> flux: yes it's a suggestion, but it dates back to 1995
<flux> well, perhaps the suggestion never went through?
<Koordin> so we will never see that new syntax
<flux> well, ocaml syntax can be extended
<flux> I believe implementing that syntax should be relatively easy
<flux> ..atleast if there were any decent documentation for camlp4..
<flux> but, I'm off to sauna
<Koordin> they say that it would take 4 lines to add
jonafan has quit [Read error: 110 (Connection timed out)]
<flux> well, is it worth adding a new syntax that would make the program not compile with older compilers?
<flux> when in actuality I've very rarely needed to use such a syntax
<flux> and the workaround is simple
<mrvn> if cond1 then expr1 elseif cond2 then expr2 ....
<Koordin> yes, sure
<Koordin> and why in this page http://osdir.com/ml/lang.caml.inria/1996-11/msg00017.html Pierre Weis says : "Je me souviens de l'avoir imple'mente' la premie`re fois en 1988 ..."
seafood has joined #ocaml
<flux> I have no idea what that means
<Koordin> flux: my english is not good but i think we can translate it like that : "i remember having implemented it in 1988 for the first time" (talking about when cond1 -> expr1 etc.)
<flux> and it's not talking about using 'when' in a 'match' expression?
<flux> in any case, I believe ocaml was not created yet in 1988?
<flux> so they may be talking about caml light
<flux> actually not even caml light is that old
<flux> they may be talking about CAML
<flux> so no wonder if not all language features lived the next two language generations..
Chrononaut has joined #ocaml
buzz0r_ has quit [Remote closed the connection]
ched has joined #ocaml
marmotine has quit ["mv marmotine Laurie"]
mikeX has joined #ocaml
seafood has quit []
<Camarade_Tux> well, let's start the new .*gtk.* bindings generator :)
mikeX_ has quit [Read error: 110 (Connection timed out)]
Snark has quit ["Ex-Chat"]
snhmib_ has joined #ocaml
snhmib has quit [Nick collision from services.]
snhmib_ is now known as snhmib
<Camarade_Tux> I should write a little tutorial on using Pxp, so I can read it from time to time too ;)
munificent has joined #ocaml
munificent has left #ocaml []
<Yoric[DT]> Camarade_Tux: :)
snhmib has quit ["Good riddance!"]
snhmib has joined #ocaml
<Camarade_Tux> yeah, I should *really* write it ;p
alexyk has quit []
fschwidom has quit [Remote closed the connection]
thelema_ has joined #ocaml
thelema has quit [Nick collision from services.]
thelema_ is now known as thelema
thelema_ has joined #ocaml
buluca has joined #ocaml
mikeX has quit [Read error: 60 (Operation timed out)]
mikeX has joined #ocaml
alexyk has joined #ocaml
<Camarade_Tux> I'd like people who design xml-based format to write DTDs ='(
* thelema doesn't mind EBML's DTDs
<Camarade_Tux> plus that one was designed with python in mind afaict
jonafan_ is now known as jonafan
<Camarade_Tux> is there anything to map to/from xml ?
sporkmonger has quit []
<Camarade_Tux> I mean, read an xml node and translate it to something like a the output of sexplib
snhmib has quit [Nick collision from services.]
itewsh has quit ["There are only 10 kinds of people: those who understand binary and those who don't"]
<thelema> Camarade_Tux: the initial implementation of EBML is C. They just picked good types like python picked good types. (and not like ocaml picked great types)
willb has quit [Read error: 60 (Operation timed out)]
thelema has quit ["ChatZilla 0.9.84 [Firefox 3.0.5/2008120122]"]
<Yoric[DT]> 'night everyone
Yoric[DT] has quit ["Ex-Chat"]
Koordin has quit [Remote closed the connection]
Mr_Awesome_ has quit ["aunt jemima is the devil!"]
Amorphous has quit [Read error: 110 (Connection timed out)]
thelema_ is now known as thelema
Amorphous has joined #ocaml
vixey has quit [Client Quit]
Mr_Awesome has joined #ocaml