cjeris changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/
ramkrsna_CPU has joined #ocaml
<G> anyone aware of plans for ocaml under PowerPC 64bit Linux?
<G> (Native code)
ramky has quit [Read error: 110 (Connection timed out)]
<tsuyoshi> nope
<G> I know there is darwin support, it's just half the people in the Fedora camp are pulling out hair trying to get something going :P
<tsuyoshi> hmm.. I need to find a job
<tsuyoshi> finding lots of java crap though
mikeX has quit ["leaving"]
pantsd has joined #ocaml
tree has quit [Nick collision from services.]
tree has joined #ocaml
tree has quit [Nick collision from services.]
tree_ has joined #ocaml
sourcerror has joined #ocaml
pantsd has quit ["Leaving."]
pantsd has joined #ocaml
slipstream-- has joined #ocaml
slipstream has quit [Read error: 110 (Connection timed out)]
pantsd has quit ["Leaving."]
Smerdyakov has quit ["Leaving"]
pantsd has joined #ocaml
skal has joined #ocaml
ygrek has joined #ocaml
_JusSx_ has joined #ocaml
ygrek has quit [Remote closed the connection]
dss has joined #ocaml
dss has quit [Remote closed the connection]
smimou has joined #ocaml
vital304 has joined #ocaml
vital303 has quit [Read error: 110 (Connection timed out)]
swater has joined #ocaml
ygrek has joined #ocaml
bluestorm_ has joined #ocaml
vital304 has quit ["Leaving."]
_JusSx_ has quit [zelazny.freenode.net irc.freenode.net]
slipstream-- has quit [zelazny.freenode.net irc.freenode.net]
tree_ has quit [zelazny.freenode.net irc.freenode.net]
ramkrsna_CPU has quit [zelazny.freenode.net irc.freenode.net]
_blackdog has quit [zelazny.freenode.net irc.freenode.net]
_JusSx_ has joined #ocaml
slipstream-- has joined #ocaml
tree_ has joined #ocaml
ramkrsna_CPU has joined #ocaml
_blackdog has joined #ocaml
tree_ has quit [zelazny.freenode.net irc.freenode.net]
_blackdog has quit [zelazny.freenode.net irc.freenode.net]
_JusSx_ has quit [zelazny.freenode.net irc.freenode.net]
ramkrsna_CPU has quit [zelazny.freenode.net irc.freenode.net]
slipstream-- has quit [zelazny.freenode.net irc.freenode.net]
cmeme has quit [Connection reset by peer]
_JusSx_ has joined #ocaml
slipstream-- has joined #ocaml
tree_ has joined #ocaml
ramkrsna_CPU has joined #ocaml
_blackdog has joined #ocaml
cmeme has joined #ocaml
tree_ has quit [zelazny.freenode.net irc.freenode.net]
_blackdog has quit [zelazny.freenode.net irc.freenode.net]
_JusSx_ has quit [zelazny.freenode.net irc.freenode.net]
ramkrsna_CPU has quit [zelazny.freenode.net irc.freenode.net]
slipstream-- has quit [zelazny.freenode.net irc.freenode.net]
_JusSx_ has joined #ocaml
slipstream-- has joined #ocaml
tree_ has joined #ocaml
ramkrsna_CPU has joined #ocaml
_blackdog has joined #ocaml
vital303 has joined #ocaml
tree_ has quit [zelazny.freenode.net irc.freenode.net]
_blackdog has quit [zelazny.freenode.net irc.freenode.net]
_JusSx_ has quit [zelazny.freenode.net irc.freenode.net]
ramkrsna_CPU has quit [zelazny.freenode.net irc.freenode.net]
slipstream-- has quit [zelazny.freenode.net irc.freenode.net]
_JusSx_ has joined #ocaml
slipstream-- has joined #ocaml
tree_ has joined #ocaml
ramkrsna_CPU has joined #ocaml
_blackdog has joined #ocaml
<vorago> How does date operations look in Caml? I see no date-operations module in standard library.
<vorago> Is there generally used method for handling dates?
<bluestorm_> Unix has some time functions
<vorago> Yeah, you're right. I've found also something like this: http://www.lri.fr/~signoles/prog/calendar/doc/index.html
<vorago> But it's probably not native.
<vorago> Thanks.
ygrek has quit []
vital303 has quit [Remote closed the connection]
vital303 has joined #ocaml
<flux> vorago, not native?
<flux> that's the library I used just a few days back to manipulate times, and it worked fine
<vorago> I haven't got it in my installation
<flux> (and seemed to be written in ocaml)
<vorago> Hm.
<vorago> I've searched /usr/lib64/ocaml for *calendar*
<flux> sure, it wasn't in debian
<flux> but it's not like installing stuff like that is difficult ;)
<flux> I thought by native you meant native ocaml, ie. no external libraries
<vorago> ;-) It was a bit ambigous.
<vorago> ambiguous...
mikeX has joined #ocaml
LeCamarade has joined #ocaml
TaXules has quit [Read error: 104 (Connection reset by peer)]
vital304 has joined #ocaml
<kelaouch1> anybody here knowing if an application that could generate a graph of a web site (where nodes would be HTML file names) exists ?
vital303 has quit [Read error: 110 (Connection timed out)]
<mikeX> kelaouch1: you mean an ocaml library for that?
vital303 has joined #ocaml
LeCamarade is now known as LeCamarade_
LeCamarade_ is now known as LeCamarade
<pango> if you can generate a graph description, graphviz's dot may be able to represent it...
<mikeX> there definately was a log analyzer that exported dot files
<mikeX> I think it was visitors, not really sure
vital304 has quit [Read error: 110 (Connection timed out)]
ehird` has joined #ocaml
ehird` has left #ocaml []
ygrek has joined #ocaml
z__z has joined #ocaml
ita|away is now known as ita
<ita> hi there
<ita> kelaouch1: ocamlgraph
<ita> kelaouch1: it does all the graphviz magic for you
vital304 has joined #ocaml
vital303 has quit [Read error: 145 (Connection timed out)]
pango has quit [Remote closed the connection]
pango has joined #ocaml
vital304 has quit ["Leaving."]
vital303 has joined #ocaml
sourcerror has quit [Read error: 60 (Operation timed out)]
TaXules has joined #ocaml
sourcerror has joined #ocaml
Smerdyakov has joined #ocaml
_JusSx__ has joined #ocaml
fax8 has joined #ocaml
<fax8> hi all! Anyone knows what's wrong with this line:
<fax8> raise (Sys_error("f: invalid character: "^String.make 1 f_txt.[f_pivot]))
<fax8> compiler says that: This expression has type exn but is here used with type string
<Smerdyakov> Which expression is that?
<fax8> characters 15-48
<Smerdyakov> Maybe if you pasted just that expression, you would make it easier for us. ;-)
_JusSx_ has quit [Read error: 113 (No route to host)]
LeCamarade has quit [""Duty calls.""]
<fax8> whole code: http://pastecode.com/31488
<fax8> do you have an idea?
<Smerdyakov> The reason I asked that is that I don't want to have to count characters, not that I need more context.
<bluestorm_> fax8: where does Sys_error come from ?
<Smerdyakov> Oh, but that code shows an unexpected meta-error on your part.
<Smerdyakov> You misunderstood which line the compiler was complaining about.
<Smerdyakov> I bet it's line 18, not 11.
<bluestorm_> seems your line 18 is uncorrect anyway
<bluestorm_> yes
<bluestorm_> you should add ()
<bluestorm_> Sys_error ("..." ^ ...)
<Smerdyakov> bluestorm_, not nice to just give the answer.
<bluestorm_> hmm
<bluestorm_> ok ok, pedagogy
pango has quit [Remote closed the connection]
<fax8> sure... line 18 is incorrect ... but it is the same stuff of 11 then I want to fix 11 before
<Smerdyakov> No.
<Smerdyakov> You are confused. Line 11 is fine.
<fax8> raise (Sys_error("f: invalid character: "^String.make 1 f_txt.[f_pivot]))
<fax8> this compiled
<Smerdyakov> Yes, which is why it's strange that you asked about it. That's the exact same code you pasted above and claimed was wrong/
skal has quit [Read error: 104 (Connection reset by peer)]
<fax8> yes ... I'm confused :-)
<kelaouch1> mikeXa : yes library i could use to develop an application that would do what i need : generating a graph of a web site (where nodes would be HTML file names)
<fax8> I started learning ocaml yesterday and I'm still a real beginner... sorry for asking dumb questions
<Smerdyakov> You have to admit, this was independent of the language was just a result of carelessness. ;)
<kelaouch1> mikeXa : or better, a software already developped and under free license so that i would be able to use
pango has joined #ocaml
<kelaouch1> pango i am looking for the way to generate the graph description before the graph itself...
<kelaouch1> ita thx ocamlgraph will certainly help me :)
ygrek has quit [Remote closed the connection]
pierre- has joined #ocaml
<fax8> Smerdyakov: probably, but .. you know .. when you are in a complete new environment even the easier stuff (copy and past and reading from screen) became difficult
ita has quit [Read error: 104 (Connection reset by peer)]
<bluestorm_> fax8: you're doing pretty weird system-level stuff for a beginner :p
<fax8> bluestorm_: I agree with you .... I don't know why our teacher gave us this complex exercise
<Smerdyakov> Am I missing something? This looks like a standard number conversion exercise, not anything "system-level."
<bluestorm_> hm
<bluestorm_> Sys_error :-°
<Smerdyakov> fax8, so, I must respectfully disagree with a classification of this exercise as "complex." :P
<fax8> Actually the code I posted is only a part of the exercize ... we are developing a math parser
<fax8> it takes expressions like "4+5*(3+1)-3" and returns the output
<mrvn> fax8: use my explode function
<Smerdyakov> Again, standard and not what I would call "complex."
<mrvn> fax8: your code can't parse *(
<fax8> mrvn: I know ... it's still a work in progress
<fax8> mrvn: I can't use your explode function ..... still not understood lists in ocaml
<mrvn> fax8: It just converts a string into a char list
<mrvn> fax8: That way you can just use up the chars and pass back the rest of the list as you go along.
<fax8> mrvn: Can I pass back a sub list ? How?
<mrvn> match l with x::xs -> xs
<Smerdyakov> I don't suppose it helps to try to explain this kind of thing on IRC.
<Smerdyakov> fax8, read the tutorial in the OCaml manual.
<fax8> ok ok ..... I will document on this.
<mrvn> so you have like ... match l with '*'::xs -> let (y, l) = parse_mul_expr xs in (x * y, l)
<fax8> thanks to anybody who helped me
noteventime has joined #ocaml
<fax8> wow
<fax8> this is wonderful
<noteventime> What is wonderful?
<fax8> mrvn code
pierre- has quit ["WeeChat 0.2.3"]
<mrvn> Compare that to http://pastecode.com/31506
<mrvn> 71 295 1495 calc.ml
<mrvn> 67 285 1622 calc2.ml
<mrvn> Checking for EOF is a pain if you use string directly.
<noteventime> OCaml is single dispatch, isn't it?
<mrvn> like foo 1; foo 1 would only call foo once?
<noteventime> ?
<mrvn> give an example
<noteventime> A method can only be specialised on one of its arguments
<mrvn> An argument of a function can ever only have one type but that one can be polymorphic.
<mrvn> methods are functions with some trickery.
<noteventime> Yea
<noteventime> Then it's single dispatch
slipstream has joined #ocaml
ita has joined #ocaml
<ita> where are the logs of the channel ?
ita has quit [Client Quit]
slipstream-- has quit [Connection timed out]
<kelaouch1> Need some help :
<kelaouch1> nimred@Vohfi: ~/mldoc/mldoc # make [ Saturday 05/05/07 20:58:02 ]
<kelaouch1> make: "/home/nimred/mldoc/mldoc/Makefile" line 5: Need an operator
<kelaouch1> make: "/home/nimred/mldoc/mldoc/Makefile" line 10: Need an operator
<kelaouch1> make: "/home/nimred/mldoc/mldoc/Makefile" line 15: Need an operator
<kelaouch1> make: Fatal errors encountered -- cannot continue
<kelaouch1> indulgence ! i am newbie
<kelaouch1> here is the Makefile : http://pastebin.ca/472649
<kelaouch1> ah looks like i need to use gmake...
<fax8> mrvn: sorry, dinner. thanks for your string version. It's more complex that's true.
ngaylinn has joined #ocaml
<ngaylinn> Anyone know some decent way to get mime-type information for a file in OCaml? This seems like something there'd be a nice common library for, but I can't seem to find one...
<flux> ngaylinn, I haven't tried this: http://sourceforge.net/projects/ocaml-magic/
<ngaylinn> flux: Ooh, looks promising. I'll investigate.
swater has quit [Read error: 104 (Connection reset by peer)]
<kelaouch1> anybody here using bmktrans ?
ngaylinn has quit ["Leaving"]
swater has joined #ocaml
benny_ has joined #ocaml
<mrvn> Is there a default function for let some = function Some x -> x | None -> raise Error?
<pango> not afaik
benny has quit [Read error: 145 (Connection timed out)]
<mrvn> fax8: Here is another implementation (was waiting for my dinner): http://pastecode.com/31520
<mrvn> Less lines but more complex code flow
<fax8> mrvn: Do you use match here instead of if then else ?
<mrvn> match instead of switch/case
<mrvn> I usualy have more than 2 cases for a match.
<fax8> thank you
<fax8> I slowly getting there http://pastecode.com/31521
<mrvn> "if s.[pos] = '(' then " is the same as "match s.[pos] with '(' ->" but you can't always go the other way.
Smerdyakov has quit ["Leaving"]
<mrvn> At least not simple.
<fax8> thanks
<flux> the scoping rules of match can sometimes be annoying. the revised syntax fixes that, but..
<mrvn> you could use match s.[f_pivot] with x when is_numeric x -> ... | '(' -> .... | _ -> raise ....
<mrvn> flux: I hate when I need begin/end so the next | gets to the right match.
the_dormant has joined #ocaml
<mrvn> fax8: Do you think f, t and e are good names for functions?
<fax8> no ... they aren't
<fax8> e=expression t=term f=factor
<mrvn> Ok, f is for x or (...), t for x or x*y and e for x or x+y. right?
<fax8> exactly
<mrvn> By the way, do you have to cope with invalid input?
<mrvn> Or just calculate the result for valid input?
<fax8> I have to check that input is valid
<mrvn> Looks like you code can calculate valid input already.
<fax8> thanks for having a look at it
<fax8> your help is very valuable
<mrvn> fax8: you might want to change String.make 1 s.[f_pivot] to String.sub and give the rest of the line.
<mrvn> Easier to see where in the input the error is.
<fax8> right it would be useful
<mrvn> Or not: 1+2*(3+4)*5+6 = 15- : unit = ()
<fax8> yeah... there are still some problems ... however I'm yet satisfied by the progress I made today
<fax8> only yesterday my code would looks like arabic
<mrvn> fax8: you sill only allow single digit numbers too.
<mrvn> s/sill/still/
<fax8> yes .... I'm going step by step
<mrvn> # calc "2*3*4";;
<mrvn> Exception: Invalid_argument "index out of bounds".
<fax8> yes ... there is another problem
ramkrsna_CPU has quit [Read error: 104 (Connection reset by peer)]
<fax8> mrvn: Ok... I now have to go ... I will work again on this tomorrow
<fax8> thank you for your wonderful help
<fax8> mrvn: Can I use your code on my blog? I would like to present the 4 different approaches to this problem. It could be useful for other people.
ramkrsna_CPU has joined #ocaml
<mrvn> sure. Add a GPL preemble.
<mrvn> The first 2 are the same just with string and list.
<fax8> Can I post your name too?
<fax8> or just mrvn?
<mrvn> There, copyrighted and everything.
<mrvn> fax8: I don't get why your code doesn't always end in Exception: Invalid_argument "index out of bounds".
<mrvn> For the last one I though about converting the input into polish notation and then calculate but then I merged the two.
<fax8> Thank you but seems that paste.debian.net does not have download
<mrvn> cut&paste
<mrvn> The ocaml pastebin has no upload :(
<fax8> yeah.. but I get them as an ordered list ..
<fax8> would you mail me them ?
<mrvn> can do
<fax8> you are the number one
<fax8> thank you a lot !
<fax8> now I have to go ... have a nice weekend
<fax8> bye
fax8 has quit ["using sirc version 2.211+KSIRC/1.3.12"]
the_dormant has quit []
bytecoder has joined #ocaml
<bytecoder> hello
<bytecoder> can anyone tell me the char OCaml uses to continue a line?
<bytecoder> the equivalent of \\n in C?
<bytecoder> does it have one?
<pango> \n ?
<bytecoder> no, I want the char that prevents the compiler from interpreting that
<bytecoder> \<newline> in C continues the newline
<bytecoder> err, continues the lien*
<bytecoder> line*
<bytecoder> int x = \
<bytecoder> 2;
<bytecoder> is what I want
<flux> well
<bytecoder> for OCaml
<flux> you can just write
<flux> int x ´
<flux> uh
<flux> int x =
<flux> 2;
<flux> in C too
<bytecoder> umm.. thanks?
<pango> parsing is not line oriented
<flux> \ is mostly useful in macros
<flux> (in C)
<flux> and ocaml's macros are something completely different
<flux> for strings you can just continue to the next line
<bytecoder> ok
<bytecoder> thanks
<bytecoder> I was hoping OCaml had one
<flux> what would you use it for?
<bytecoder> I'm using F# with indentation mode turned on
<flux> oh, right
<bytecoder> and it's complaining about my indentation for a function call
<flux> well ocaml doesn't have such indentation mode, so it'd be quite pointless
<bytecoder> technically...
<bytecoder> there's a preprocessor for OCaml
<flux> which isn't line-oriented
<bytecoder> actually, it is
<flux> there is a whitespacethingy for ocaml, though, but I doubt it has anything to do with how F# does it
<flux> what preprocessor are you referring to?
<bytecoder> it says it's line oriented on the website :)
<bytecoder> the one you mentioned
<bytecoder> whitespace whatever
<bytecoder> oh well, doesn't matter
<bytecoder> I'm not using that, anyway
<flux> right. but the generic preprocessing facility camlp4o isn't.
<bytecoder> yeah
<bytecoder> it doesn't use camlp4o, apparently
<flux> (make that camlp4)
<bytecoder> hehe
<bytecoder> bye
bytecoder has quit ["Leaving"]
pantsd has quit ["Leaving."]
the_dormant has joined #ocaml
the_dormant has quit [Client Quit]
Smerdyakov has joined #ocaml
joshcryer has quit [No route to host]
<lucca> does camlp4 see line/column info
<lucca> or in general, how powerful is it?
pantsd has joined #ocaml
<lucca> n/m found docs heh
Mr_Awesome has joined #ocaml
swater has quit ["Quat"]
mnemonic has joined #ocaml
<mnemonic> hi
pstickne has joined #ocaml
_JusSx__ has quit ["leaving"]
joshcryer has joined #ocaml
noteventime has quit ["Leaving"]