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