Ogedei has quit ["ERC Version 5.0.4 $Revision: 1.726.2.19 $ (IRC client for Emacs)"]
ita has quit [Remote closed the connection]
netx has quit ["Leaving"]
netx has joined #ocaml
Yoric[DT] has joined #ocaml
* Yoric[DT]
is tired by all this typing down.
<Yoric[DT]>
Well, that and actually talking about OCaml :)
Yoric[DT] has quit ["Ex-Chat"]
middayc has quit [Read error: 110 (Connection timed out)]
ben has joined #ocaml
jlouis has quit [Remote closed the connection]
jlouis has joined #ocaml
ben has quit []
kmeyer has quit [Remote closed the connection]
kmeyer has joined #ocaml
Nutssh has quit ["Client exiting"]
jlouis_ has joined #ocaml
Snrrrub has quit [Read error: 110 (Connection timed out)]
kmeyer has quit [Remote closed the connection]
kmeyer has joined #ocaml
jlouis has quit [Connection timed out]
middayc has joined #ocaml
jlouis has joined #ocaml
thermoplyae has quit ["daddy's in space"]
jlouis_ has quit [Read error: 110 (Connection timed out)]
jlouis_ has joined #ocaml
bluestorm has joined #ocaml
ygrek has joined #ocaml
jlouis has quit [Read error: 110 (Connection timed out)]
sergez_ has quit []
asmanur has joined #ocaml
middayc has quit [Read error: 110 (Connection timed out)]
ygrek has quit [Remote closed the connection]
ygrek has joined #ocaml
l_a_m has joined #ocaml
ttamttam has joined #ocaml
ttamtta1 has joined #ocaml
ttamtta1 has left #ocaml []
ttamttam has left #ocaml []
ttamttam has joined #ocaml
middayc has joined #ocaml
<bla>
During lexing i call another lexer recursively. I want him to read 'any non special character' and if he reads other one, to pass control to the main lexer. Can I decrement just lexbuf.lex_curr_p.pos_cnum? Or there's a better way? I use ocamllex.
<bla>
This lexer might be parsing from function.
<bla>
I can also raise 'empty token' exception I guess and catch it in main lexer...
<bla>
I guess I can also help it by splitting it into three parsers.
kig has joined #ocaml
bluestorm has quit [Read error: 113 (No route to host)]
bluestorm has joined #ocaml
marmottine has joined #ocaml
Tetsuo has joined #ocaml
ita has joined #ocaml
Yoric[DT] has joined #ocaml
<Yoric[DT]>
hi
<bluestorm>
hi :p
<bluestorm>
Yoric[DT]: On your OSR page
<Yoric[DT]>
Yes ?
<bluestorm>
i'd be interested in adding a "preffered extended stdlib" and something similar for camlp4 scripts
<Yoric[DT]>
Do you want me to add that ?
<bluestorm>
i haven't done it yet because it wasn't explicitely mentioned during the meeting
<Yoric[DT]>
Or do you wish to add it yourself ?
<bluestorm>
hm
<bluestorm>
i'd like someone else to agree it could be useful :D
<Yoric[DT]>
:)
<Yoric[DT]>
Well, at the very least, we can start a discussion on the mailing-list.
<bluestorm>
hm
<bluestorm>
do you think talks should go on the ML, and then "consensus" be written back on the wiki ?
<Yoric[DT]>
I think so.
<Yoric[DT]>
At least once a few options have been determined, put these options on the wiki.
<bluestorm>
the wiki isn't very practical for discussion anyway
<bluestorm>
Yoric[DT]: i extended your first section a bit
<bluestorm>
i'm unsure about expressing my personal taste inside the wiki page; i think i'll wait a bit to see if other peoples are ready to discuss it
<Yoric[DT]>
ok
seafood_ has joined #ocaml
seafood_ has quit [Read error: 104 (Connection reset by peer)]
seafood_ has joined #ocaml
seafood_ has quit [Read error: 104 (Connection reset by peer)]
seafood_ has joined #ocaml
seafood_ has quit [Read error: 104 (Connection reset by peer)]
seafood_ has joined #ocaml
middayc has quit []
seafood_ has quit [Read error: 104 (Connection reset by peer)]
seafood_ has joined #ocaml
Yoric[DT] has quit ["Ex-Chat"]
jderque has joined #ocaml
jderque_ has joined #ocaml
jderque has quit [Read error: 104 (Connection reset by peer)]
seafood_ has quit []
jderque_ is now known as jderque
ttamttam has quit ["Leaving."]
bongy has joined #ocaml
sergez_ has joined #ocaml
bongy has quit ["Leaving"]
Smerdyakov has quit ["BRB"]
Smerdyakov has joined #ocaml
sergez_ has quit [Read error: 131 (Connection reset by peer)]
sergez_ has joined #ocaml
sergez_ has quit [Read error: 148 (No route to host)]
middayc has joined #ocaml
sergez_ has joined #ocaml
sergez_ has quit [Read error: 60 (Operation timed out)]
sergez_ has joined #ocaml
jderque has quit [Read error: 113 (No route to host)]
sergez_ has quit [Read error: 113 (No route to host)]
pango_ has quit [Remote closed the connection]
pango_ has joined #ocaml
ttamttam has joined #ocaml
sergez_ has joined #ocaml
jderque has joined #ocaml
sergez_ has quit [Read error: 113 (No route to host)]
Yoric[DT] has joined #ocaml
jlouis has joined #ocaml
marmottine has quit [Read error: 104 (Connection reset by peer)]
jlouis_ has quit [Read error: 110 (Connection timed out)]
Morphous has joined #ocaml
sergez_ has joined #ocaml
Amorphous has quit [Read error: 110 (Connection timed out)]
sergez_ has quit [Read error: 60 (Operation timed out)]
jlouis has quit ["leaving"]
jlouis has joined #ocaml
jlouis_ has joined #ocaml
sergez_ has joined #ocaml
<middayc>
I don't know if I saw it today ... was there ocsigen presentation yesterday on devdays too? (It was mentioned in the scedules back then when I looked)
<middayc>
today = yesterday
<ttamttam>
Yes.
jlouis has quit [Read error: 110 (Connection timed out)]
<middayc>
ok great.. I am intereted to see more about it
<ttamttam>
Yoric did a real time irc summary. I think there was a video capture also. I do not know where and when they will be available.
<ttamttam>
Have a nice evening
ttamttam has left #ocaml []
<middayc>
yes, I was reading at Yoric's irc summary .. I musht have missed this part. And I know / hope videos will be available , that's why I am happy that there was this presentation
sergez_ has quit [Read error: 113 (No route to host)]
<Yoric[DT]>
Oh, and for people who are interested, a OCaml Standard Recommendation process is starting.
<Yoric[DT]>
bluestorm: I've moved the page, btw, along with your comments.
thermoplyae has joined #ocaml
<bluestorm>
hm
<bluestorm>
i've seen it, but it seems you haven't deleted the duplicated content from the old page
<bluestorm>
is this intentional ?
<Yoric[DT]>
No, I just forgot.
<Yoric[DT]>
Done.
<middayc>
oh, Thanks!
<bluestorm>
btw
<bluestorm>
do you know that most haskellers just hate the n+k patterns ?
<Yoric[DT]>
Yes, I know.
<Yoric[DT]>
Doesn't mean that it can't be discussed.
<bluestorm>
:p
<bluestorm>
one of the reasons, wich is quite funny
<bluestorm>
is that in haskell, infix declarations are infix
<bluestorm>
so while let (n + 2) = foo binds n, let n + 2 = foo is read as a declaration of (+)
<flux>
I wonder if newbie-friendliness is any sort of a goal in ocsigen.. I wouldn't see writing ocsigen-software as a viable approach for learning ocaml, for instance.
<bluestorm>
hm
<Yoric[DT]>
bluestorm: that's not a very good reason, I'd say.
<bluestorm>
flux: the impression given by the presentation was that ocisgen is a research project, aimed at exploring new design spaces for web frameworks
<bluestorm>
i'm not sure this is very user-friendliness-friendly
<flux>
it would be interesting though. down php!! ;-)
<flux>
and students would be able to produce something useful with their knowledge. (I don't remember if ocsigen can run as a standalone cgi-bin though.)
<bluestorm>
hm
<bluestorm>
i'm quite sure one of the reasons php is so popular is that it is very good at letting people write crap
<bluestorm>
i'm not sure ocsigen could compete
<flux>
I think it could be interesting for some if the crap also worked..
<ozzloy>
hello!
<ozzloy>
good morning!
<bla>
Good evening... ;)
<ozzloy>
can i match on a tuple? such as match (a,b) with c,d -> bla;;?
<pango_>
sure. you can also write let c, d = (a, b) in ...
<bla>
let f a b = match (a,b) with (3,4) -> 10 | (_, 10) -> 15 | (_, _) -> 20;;
<bla>
Or like this...
<ita>
hmm (_,_)
sergez_ has joined #ocaml
<flux>
haskell may have its tits-combinator, but atleast ocaml too has the butt-matcher.
<bla>
Pity, that _ is sufficient... ;d
<pango_>
lol
<ozzloy>
hehehe
<ozzloy>
what's haskell's tits-combinator?
<flux>
(.) (.)
<flux>
without the space I suppose
<jlouis_>
heh
<ozzloy>
what's it do?
<ozzloy>
same as butt-matcher?
Snrrrub has joined #ocaml
<thermoplyae>
it has type (a1 -> b -> c) -> a1 -> (a -> b) -> a -> c, you can figure it out from that, right? ;)
<ozzloy>
heh, let me think about it for a minute
<ozzloy>
nope
<ozzloy>
some kinda mapping thing ...
<Smerdyakov>
I'm not sure if there's a theorem for free here, but I think the term that Coq's [auto] would generate for that type is probably what Haskell uses. :)
<bla>
It takes function from a1,b to c, a1, function a to b
<bla>
Then... calculates from a, b and from b and a1 c and returns it?
<Smerdyakov>
Just to entertain you all, I will generate that term with Coq and paste it here
sergez_ has quit [Read error: 60 (Operation timed out)]
<Smerdyakov>
fun (a1 b c a : Type) (X : a1 -> b -> c) (X0 : a1) (X1 : a -> b) (X2 : a) => X X0 (X1 X2)
<Smerdyakov>
Built with:
<Smerdyakov>
Theorem f : forall a1 b c a, (a1 -> b -> c) -> a1 -> (a -> b) -> a -> c.
<Smerdyakov>
auto.
<Smerdyakov>
Defined.
<Smerdyakov>
Print f.
<bla>
Just to try with Caml:
<bla>
# let tits f a1 g a = f a1 (g a);;
<bla>
val tits : ('a -> 'b -> 'c) -> 'a -> ('d -> 'b) -> 'd -> 'c = <fun>
<flux>
#haskell-channels lambdabot gave this response to @djinn (a1 -> b -> c) -> a1 -> (a -> b) -> a -> c: f a b c d = a b (c d)
<Smerdyakov>
flux, yeah, but I bet Djinn couldn't do this for dependently-typed functions. ;)
<bla>
Hm. OCaml top-level after typing few times let (+) a b c d e = a + b * d + e;; takes constantly > 85% of cpu.
<bla>
Nice.
<bla>
And takes feeeewwww minutes to calculate each next + function.
<bla>
minutes... seconds; but few. ;D
Tetsuo has quit [Remote closed the connection]
<jlouis_>
One course on Twelf made me love dependent types
<Yoric[DT]>
Yeah, dependent types in Twelf are nice.
<Smerdyakov>
Dude. Dependent types in Coq are way nicer.
<Yoric[DT]>
I have done more Twelf than Coq, so I can't really tell.
<Yoric[DT]>
In my limited experience, dependent types in Coq looked like dependent types in Twelf :)
<jlouis_>
Smerdyakov: because of C(co-)IC ?
<Smerdyakov>
jlouis_, it's a different logic, and, yes, that's the fundamental reason for the superiority.
<Smerdyakov>
Yoric[DT], Twelf has a very simple definitional equality. You can't do much computation inside types.
<jlouis_>
Normalization of the STLC in Twelf is a nasty nasty proof. You encode parts of propositional logic + a number of axioms in Twelf. Then you proceed to convert the problem into this logic, run cut-elimination on it and bring it "back" into the original (LF) world.
<Smerdyakov>
jlouis_, that doesn't bother me in particular, since when you formalize programming languages the right way, you inherit the meta language's normalization properties. ;)
<Smerdyakov>
jlouis_, i.e., the proof is of no interest in the first place.
<jlouis_>
That is indeed correct Smerdyakov.
<Smerdyakov>
Really? Hardly anyone agrees with me on this yet.
<Smerdyakov>
Have you read my PLDI paper? :)
<jlouis_>
I think I did ;)
<Smerdyakov>
Is that why you agree, or are you thinking of another approach that makes normalization proofs irrelevant?
asmanur has quit [Remote closed the connection]
jlouis has joined #ocaml
sergez_ has joined #ocaml
<jlouis>
Smerdyakov: I agree because of the paper. The proof was done in order to win a "bragging contest" in which somebody had said that normalization proofs were undoable in Twelf
<jlouis>
or rather: Formalization of...
<Smerdyakov>
And they were right, so far. The proof is done in Twelf + axioms.
* Smerdyakov
checks the course web page to see if it's allowed to ask such detailed homework questions on IRC.
<ozzloy>
heh
<ozzloy>
well i'm the tutor
<ozzloy>
hmm... not sure how i can prove that
<ozzloy>
as far as i know, you can give students help. don't give them code
<Smerdyakov>
I generally feel that answering questions about specific assigned problems is best left for course staff.
jlouis_ has quit [Read error: 110 (Connection timed out)]
<ozzloy>
oh, you could send email to djwatson@ucsd.edu, that's me and i'm listed on this page: http://xrl.us/bexjp
<Smerdyakov>
What the hey, why not. :)
<Smerdyakov>
So what's the secret code?
<ozzloy>
^^%%!!
<ozzloy>
but there could be students in the channel
<ozzloy>
so keep everything in english
<ozzloy>
or pm
<ozzloy>
please
<ozzloy>
what's it called when you want to create = as a function? syntax is something like (=) right?
<Smerdyakov>
(=) is a function in OCaml, yes.
<Smerdyakov>
I could just give you the code that solves this problem. It's so short that I don't know of any hints, really.
<ozzloy>
Smerdyakov: in a /msg
<ozzloy>
Smerdyakov: i figure it's something stupid, but i'm just not seeing it
<bluestorm>
:D
sergez_ has quit [No route to host]
<jlouis>
Smerdyakov: You could say it is a weakness of Twelf, yes. Like the weakness of Isabelle/HOL with no dependent types, so you have to encode a richer logic into it and then do all your work in the encoded logic without being able to rely on the logical framework that much
hcarty has quit ["leaving"]
<Smerdyakov>
Yup. Thus I would never use Twelf or Isabelle/HOL. :P
hcarty has joined #ocaml
<jlouis>
Coq is pretty impressive, indeed.
<bluestorm>
ozzloy: why doesn't the problems use curryfication at all ?
<bluestorm>
-s
<bluestorm>
hm, actually none of the problems do
<jlouis>
is there any reason to use currying if the uses of the function doesn't require it?
whatever123 has joined #ocaml
<bluestorm>
hm
<Smerdyakov>
jlouis, currying is the default convention of OCaml.
<jlouis>
one of MLtons earlier passes turns f : fn a -> b -> c into f : (a * b) -> c if possible. This is because the backend can represent the latter faster.
<jlouis>
Smerdyakov: oh, like haskell, I presume
<bluestorm>
jlouis: let fixpoint (f,b) = wwhile (... ,b) is kinf of redundant
<jlouis>
I did not know that.
<jlouis>
for a fixpoint I'd definitely curry
<bluestorm>
iirc, ocaml can optimize curryfied style with no partial application
<jlouis>
I think it depends a bit on the coding style used, but the 2 are interchangeable
<bluestorm>
(i mean, functions that aren't partially applied are not represented as functions to functions to functions ...)
<jlouis>
bluestorm: yes, but not across compilation units ;)
<whatever123>
I trying to find out if the ternary operator ( ___ > ___ ? ___ : ___ ) is defined in ocaml. I've already googled it and waded through some of the ocaml documentation (like 10 minutes worth) and I figured you guys would be able to answer it quicker than I ahve been able to
<bluestorm>
it isn't
<Smerdyakov>
whatever123, use an [if] expression.
<bluestorm>
you use if/then/else as usual
<ita>
whatever123: (if foo then bar else gruik)
<bluestorm>
:p
<whatever123>
ok cool
<whatever123>
yeah i guess thats why i didn't find it V:)V
<ita>
the evil ternary operator
<ita>
whoever invented it was on real crack
<whatever123>
yeah its like my own little obfuscation contest on a single line <3
<ita>
whatever123: oh, if you're on obfuscation, try fold_left/fold_right madness
<jlouis>
folds are not madness
<bluestorm>
haha
<ita>
whatever123: let iter f x l = List.fold_right (List.fold_left f) [List.map x l] l;; iter (fun l x -> x :: l) (fun l -> List.rev l) [[1; 2; 3]] ;;
<bluestorm>
Yoric[DT]: i guess we've got the "usual trolls" back
<bluestorm>
(fun l -> List.rev l)
<bluestorm>
hm
<ita>
bluestorm: do you understand what that does ? :-)
<bluestorm>
you choosed obfuscated names
<bluestorm>
but hm
<bluestorm>
i remember having written such code before :D
<ita>
bluestorm: even without obfuscated names
<ita>
bluestorm: i do not :-P
<bluestorm>
isn't that a generic concatMap ?
<ita>
bluestorm: oh, so you really are the author of this gem ? :-)
<bluestorm>
hm
<bluestorm>
i don't think so
<bluestorm>
where does it comes from ?
<bluestorm>
-s
<ita>
bluestorm: somewhere from the ocaml website, i cannot remember where exactly