<hcarty>
It doesn't have much on the 3.10 updates though
<bluestorm_>
hm
<bluestorm_>
i'm gonna have a look, thanks
pango has quit [Remote closed the connection]
pango has joined #ocaml
<bluestorm_>
hm
<bluestorm_>
martin jambon explains that the camlp4 extensions are written using the revised syntax
<bluestorm_>
is this mandatory ?
Smerdyakov has joined #ocaml
<flux>
yes
<flux>
unless you use the module someone wrote
<flux>
which I believe is also referred from the document
<bluestorm_>
yes, ocamlp4
<bluestorm_>
but i think i'll try the revised syntax
<bluestorm_>
may be interesting
benny has joined #ocaml
benny_ has quit [Read error: 60 (Operation timed out)]
mc__ has quit [Remote closed the connection]
_blackdog has quit [Read error: 110 (Connection timed out)]
kelaouchi has joined #ocaml
Submarine has joined #ocaml
<flux>
hmm.. so if I want to use functors in a .ml, and have a .mli-file also, I must basically include the lots of signature - it's not possible to reuse the functor description somehow?
<flux>
for example I have this in my .ml: module Graph = Graph.Imperative.Graph.Concrete ( struct type t = rel_id let compare = compare let hash = Hashtbl.hash let equal = (=) end)
<flux>
and if I ask ocamlc to generate a .mli for me, it generates loads of stuff
<flux>
and I haven't figured out if it can be written in a shorter fashion
Oxylin has joined #ocaml
<ita|zzz>
flux: are you working on ocamlgraph ?
Oxylin has quit [Read error: 104 (Connection reset by peer)]
ita|zzz is now known as ita
noteventime has joined #ocaml
<ita>
bluestorm_: semantik 0.3.0
<flux>
ita, yes, if you by working you mean using it in a program
<flux>
I'm thinking maybe with smart usage of include Graph.Sig.I I could maybe get away
<flux>
but I can't get it working.. perhaps I'd need to play a bit with it
<flux>
but as it isn't really critical, I'll let that wait for a later time
<ita>
flux: or maybe ask the authors to clarify their intent ? the apis are a bit complicated
<flux>
well, I don't know, I think using the module system is a nice idea
<flux>
but it appears it doesn't quite scale when you want to use interface definitions
<flux>
it just seems to me that declaring the interface should be about as simple as defining it..
noteventime has quit [Remote closed the connection]
noteventime has joined #ocaml
<mrvn>
Once you defined the interface declaring it is trivial.
<mrvn>
Defining is doing all the thinking. declaring is just putting it in ocaml terms.
flux has quit [pratchett.freenode.net irc.freenode.net]
mattam has quit [pratchett.freenode.net irc.freenode.net]
TaXules has quit [pratchett.freenode.net irc.freenode.net]
sourcerror has quit [pratchett.freenode.net irc.freenode.net]
lde has quit [pratchett.freenode.net irc.freenode.net]
G has quit [pratchett.freenode.net irc.freenode.net]
svenl has quit [pratchett.freenode.net irc.freenode.net]
pango has quit [pratchett.freenode.net irc.freenode.net]
ygrek has quit [pratchett.freenode.net irc.freenode.net]
pantsd has quit [pratchett.freenode.net irc.freenode.net]
screwt8 has quit [pratchett.freenode.net irc.freenode.net]
oracle1 has quit [pratchett.freenode.net irc.freenode.net]
benny has quit [pratchett.freenode.net irc.freenode.net]
mikeX has quit [pratchett.freenode.net irc.freenode.net]
EliasAmaral has quit [pratchett.freenode.net irc.freenode.net]
slipstream-- has quit [pratchett.freenode.net irc.freenode.net]
mnemonic has quit [pratchett.freenode.net irc.freenode.net]
Amorphous has quit [pratchett.freenode.net irc.freenode.net]
zmdkrbou has quit [pratchett.freenode.net irc.freenode.net]
Demitar has quit [pratchett.freenode.net irc.freenode.net]
Hadaka has quit [pratchett.freenode.net irc.freenode.net]
love-pingoo has quit [pratchett.freenode.net irc.freenode.net]
Smerdyakov has quit [pratchett.freenode.net irc.freenode.net]
kosmikus has quit [pratchett.freenode.net irc.freenode.net]
dan2 has quit [pratchett.freenode.net irc.freenode.net]
ulfdoz has quit [pratchett.freenode.net irc.freenode.net]
tsuyoshi has quit [pratchett.freenode.net irc.freenode.net]
z__z has quit [pratchett.freenode.net irc.freenode.net]
mbishop has quit [pratchett.freenode.net irc.freenode.net]
mrvn has quit [pratchett.freenode.net irc.freenode.net]
gunark has quit [pratchett.freenode.net irc.freenode.net]
eradman has quit [pratchett.freenode.net irc.freenode.net]
twobitsprite has quit [pratchett.freenode.net irc.freenode.net]
esdee has quit [pratchett.freenode.net irc.freenode.net]
Nutssh has quit [pratchett.freenode.net irc.freenode.net]
ita has quit [pratchett.freenode.net irc.freenode.net]
ramkrsna has quit [pratchett.freenode.net irc.freenode.net]
joshcryer has quit [pratchett.freenode.net irc.freenode.net]
cmeme has quit [pratchett.freenode.net irc.freenode.net]
vorago has quit [pratchett.freenode.net irc.freenode.net]
tree_ has quit [pratchett.freenode.net irc.freenode.net]
ppsmimou has quit [pratchett.freenode.net irc.freenode.net]
eroyf has quit [SendQ exceeded]
Submarine has quit ["Leaving"]
eroyf has joined #ocaml
benny has joined #ocaml
Smerdyakov has joined #ocaml
pango has joined #ocaml
love-pingoo has joined #ocaml
mikeX has joined #ocaml
ygrek has joined #ocaml
EliasAmaral has joined #ocaml
tsuyoshi has joined #ocaml
Demitar has joined #ocaml
slipstream-- has joined #ocaml
pantsd has joined #ocaml
screwt8 has joined #ocaml
oracle1 has joined #ocaml
ppsmimou has joined #ocaml
eradman has joined #ocaml
joshcryer has joined #ocaml
gunark has joined #ocaml
Amorphous has joined #ocaml
kosmikus has joined #ocaml
mattam has joined #ocaml
G has joined #ocaml
Nutssh has joined #ocaml
mnemonic has joined #ocaml
lde has joined #ocaml
zmdkrbou has joined #ocaml
ita has joined #ocaml
esdee has joined #ocaml
vorago has joined #ocaml
sourcerror has joined #ocaml
dan2 has joined #ocaml
svenl has joined #ocaml
TaXules has joined #ocaml
flux has joined #ocaml
cmeme has joined #ocaml
tree_ has joined #ocaml
ramkrsna has joined #ocaml
mbishop has joined #ocaml
ulfdoz has joined #ocaml
z__z has joined #ocaml
mrvn has joined #ocaml
Hadaka has joined #ocaml
twobitsprite has joined #ocaml
<flux>
but this is already illegal: module G : Graph.Sig.G with module V : .. (as can be seen from the language description)
<flux>
I personally would avoid getting GPL library dependency for something that probably forms a very small part of your program and for which task (I believe) a BSD-licensed version could easily be found..
<flux>
but maybe that's just me :)
<scode>
That would be nice, but right now i'm just looking for something usable. New to ocaml and I'd prefer not to start by implementing SHA512/SHA256. :)
ygrek has quit [Remote closed the connection]
<scode>
I might go for md5 for now and change it later though, since md5 is available in the base language it seems.
<Smerdyakov>
"The base language"?
<scode>
Sorry, core library or whatever it's called. Not up to par on terminology yet.
<pango_>
(Digest module, really)
<scode>
Digest module, yeah.
<Smerdyakov>
In civilized languages, there is never any confusion between "language" and "library," with almost everything falling in the latter. :P
<scode>
In the strict sense yes. Sloppy phrasing on my part.
<blizz>
:-P
<pango_>
it's in standard lib, because the compiler uses MD5 to hash compiled modules and module interfaces :)
<scode>
I see.
mnemonic has quit ["leaving"]
<Smerdyakov>
blizz, man, you have these great contributions to the conversation!
mnemonic has joined #ocaml
noteventime has quit [Remote closed the connection]
Demitar has quit [Read error: 110 (Connection timed out)]
<blizz>
Smerdyakov, obviously! i'm an ocaml noob, that's why ;-)
<Smerdyakov>
You think it helps anyone for you to interject smileys at random intervals?
<blizz>
i didn't know that was such a bad habit.
<blizz>
neither i believe it is.
<Smerdyakov>
I think it's neutral if you're actually participating in a conversation, but it's just weird if it's all you do.
<blizz>
how many times did i do it?
<Smerdyakov>
I notice one line before this conversation, and it only contains a smiley.
Demitar has joined #ocaml
<G_>
:P
<G_>
on that note, I'm outta here
<blizz>
Smerdyakov, yes, it implies some kind of emotion. but i can't quite describe it at the moment.
<blizz>
i'll add some text in order to contribute to the conversation the next time :-)
Demitar has quit [Connection timed out]
holo has joined #ocaml
<holo>
hi
<holo>
what is the representation of the caracter in caml when i hit ctrl+d
<holo>
that caracter is causing an exception somehow
<holo>
in my parser
<pango_>
ctrl+d is end-of-file signal, not a character
<pango_>
I guess End_of_file exception is raised when your parser tries to read beyond last character
G has joined #ocaml
<ulfdoz>
Am Mittwoch abend war schon auf der A72 die Hölle los. Dass da noch ein paar Unfälle waren, hat den Verkehr weniger beeinträchtigt, als man es unter normalen Umständen vermuten würde.
<ulfdoz>
ECHAN, sorry
<holo>
pango_ hmm.. so does that mean i can't catch anything and my program will exit with an exception without any other solution?
<holo>
*without any other solution
<ulfdoz>
Either you catch that exception or you have a rule, matching EOF.
<holo>
pp2log> Fatal error: uncaught exception.
<ulfdoz>
I prefer the second. EOF is not an exception, but what I expect, when I read a file.
<holo>
ulfdoz, i *must* catch it!! becouse it is a shell prompt i made, it has to recover from any bad input
<holo>
thank you!
<holo>
i was seeking for something like that EOF
<holo>
looks like it is the same as in other languages
<ulfdoz>
eof is reserved in ocamlyacc, iirc.
<holo>
hmm.. i made my parser from scratch using camllight
<holo>
i hop it is too a reserved word in camllight
<holo>
g2g thank you ppl
<ulfdoz>
I doubt, that it is reserved in camllight, too.
* pango_
questions the use of camllight
G_ has quit [Connection timed out]
Demitar has joined #ocaml
love-pingoo has quit ["zzz"]
bluestorm_ has quit ["Konversation terminated!"]
Demitar has quit [Read error: 110 (Connection timed out)]
slipstream has joined #ocaml
slipstream-- has quit [Read error: 110 (Connection timed out)]
Demitar has joined #ocaml
<holo>
pango_ camllight is usefull to learn the wonderfull functional paradigm. Later i shall further my studies using a production language like ocaml.
<Smerdyakov>
holo, why is Caml Light better for that purpose?
<holo>
I can represent a caracter with ``. how can i represent the EOF? Just EOF?
<holo>
Smerdyakov, camllight just focus in the paradigm.. ocaml is object oriented
<Smerdyakov>
holo, so? Most OCaml programmers don't use the OO most of the time.
<holo>
so basically it's the same
<holo>
:)
<holo>
with minor differences
<Smerdyakov>
I think the things OCaml has going for it make it clear that you should start with OCaml.
<Smerdyakov>
Better toolset, and it's easy to limit yourself to subsets of the language for educational purposes. (Though the compilers won't enforce this.)
<holo>
Smerdyakov, as soon as possible
gim_ has quit []
<Smerdyakov>
Mm... latest Caml Light manual is almost to its 10th birthday. ;)
<holo>
its stable
<holo>
brb
holo has quit ["Leaving"]
holo has joined #ocaml
Demitar has quit [Read error: 110 (Connection timed out)]
<ita>
what ? Most OCaml programmers don't use the OO most of the time ?
<Smerdyakov>
That's right.
<ita>
Smerdyakov: and how do you know that ?
mnemonic has quit ["leaving"]
<Smerdyakov>
ita, many conversations over many years.
<holo>
grr... i can't represent EOF
<holo>
how do you represent it in ocaml?
<Smerdyakov>
What does the question mean?
<holo>
`a` <- this is a caracter "a" representation in caml light
<Smerdyakov>
It really uses ` instead of '?
<holo>
yes
<holo>
i don't really know why day made that different from ocaml
<holo>
maybe becouse of streams use '
<holo>
dunno
<Smerdyakov>
OK, so please continue with the question explanation.
<holo>
oh
<holo>
i want to catch an EOF signal just as i catch some caracter
<holo>
match char with
<holo>
[<'c>] -> something
<holo>
| [<'EOF>] -> something2
<holo>
what woul i put instead of EOF. if i can even do this of course
<Smerdyakov>
I don't know the notation [<'c>]. It's a stream?
<holo>
it is a stream
<holo>
notice that c is a padron so it could be some `x`
<Smerdyakov>
And it matches a stream containing exactly c, or a stream that just has to _begin_ that way?
<holo>
it eats one caracter from the stream
<holo>
so of course, EOF wouldn't be caught
* Smerdyakov
glares at imperative streams.
<holo>
i just want te representation.. i'm not actually using this particular example
<Smerdyakov>
Well, if you are matching characters, it doesn't make sense to express EOF as a character, so there should be no way.
<holo>
oh
<Smerdyakov>
If you have a lexer running first, you can have it insert whatever tokens you like.
<holo>
i have
<holo>
i make a constructor EOF_T of type token
<holo>
then i try to match EOF_whatever and return in the branch: EOF_T
<Smerdyakov>
Wait, you're _writing_ a lexer? That's what you're asking for help with?
<holo>
but as you are saying, i can't do that
<holo>
Smerdyakov.. the lexer is already working.. it was very easy
<holo>
i'm just having problem with EOF
<Smerdyakov>
You know, I think I'm not qualified to help you with this. Sorry.
<Smerdyakov>
I always use ocamllex and ocamlyacc.
<holo>
Smerdyakov, sane choice
<holo>
:)
<esdee>
EOF can be either a condition signalled from hitting the end of the file, in which case you can't try to match a character to test for it
<holo>
i see
<holo>
i think i can make it outside the lexer then
<esdee>
or it can be one of the ASCII EOF characters, which is different in windows vs unix, and shouldn't matter when reading a file
<esdee>
does camllight have the concept of opening files in binary mode vs ascii mode?
<Smerdyakov>
I don't believe OCaml's libraries provide any way of using "EOF characters." Maybe Caml Light is different.
<Smerdyakov>
It's certainly much nicer to avoid "EOF characters."
<holo>
how can i avoid it? if someon presses ctrl+d, they get an exception
<Smerdyakov>
So catch the exception..
<holo>
i'm eating words, sorry
<holo>
Smerdyakov... that's what i am trying to do -.- !!!!
<holo>
oh
<holo>
no no
<Smerdyakov>
You don't know how to use exceptions?
<holo>
i want to recover from it
<Smerdyakov>
Yes, I think that's what people usually mean when they say "catch an exception"....
<holo>
i don't want it to be an exception
<holo>
#_#
<holo>
oh
<holo>
yes
<holo>
sorry
<Smerdyakov>
OK, this is getting so weird that I'm going to assume that you have no idea what exceptions are in Caml.
<blizz>
holo, try ... with End_of_file -> [handle eof]
<holo>
Smerdyakov.. i know what exceptions are in python for example.. just forgot.. sorry
<blizz>
well, same concept i guess
<holo>
same concept everywhere i think
<blizz>
holo, what do you want to happen if an EOF gets caught?
<Smerdyakov>
holo, if you never read about them in Caml, then it's not that you "forgot," it's that you neglected to learn about them and went on talking about them, anyway, which is no good.
<blizz>
holo, ruby has some funny additions to that concept :-)
<holo>
Smerdyakov, i forgot the concept.. don't be picky :p
<Smerdyakov>
If you don't like pickyness, then you shouldn't be programming.
<holo>
blizz.. are making pub to ruby? ;)
<blizz>
pub?
<holo>
i mentioned python.. and everyone knows about python vs ruby
<Smerdyakov>
holo, "pub" does not have any English meaning that leads to your message making sese.
<Smerdyakov>
s/sese/sense
<blizz>
oh, well, i didn't think about that. i do both languages (and ocaml, too, in the recent past)
<holo>
#_#
<holo>
hehe.. they all nice languages
<holo>
elegant
<holo>
*are
ita is now known as ita|zzz
<ita|zzz>
good night
<blizz>
night
<holo>
gnight ita
<Smerdyakov>
I don't think Python and Ruby are nice. :P
<blizz>
they both somehow lack the aesthetics ocaml posseses ;-)
<holo>
Smerdyakov launches a flame into imperative programming and hopes someone catch it