flux changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | Grab OCaml 3.10.2 from http://caml.inria.fr/ocaml/release.html (featuring new camlp4 and more!)
cmeme has quit ["Client terminated by server"]
cmeme has joined #ocaml
guillem_ has quit [Remote closed the connection]
bluestorm has quit [Remote closed the connection]
pango_ has quit [Remote closed the connection]
pango_ has joined #ocaml
palomer has joined #ocaml
<palomer> does ocaml have call/cc?
<Associat0r> I think not
<Associat0r> SML has it I know
<mbishop> well
<mbishop> implementations of SML have it I believe
<mbishop> and OCaml has delimited continuations
Jeff_123 has joined #ocaml
jeddhaberstro_ has joined #ocaml
jeddhaberstro has quit [Read error: 110 (Connection timed out)]
bohanlon has joined #ocaml
marmotine has quit [Read error: 110 (Connection timed out)]
netx has quit [Read error: 110 (Connection timed out)]
r0bby has quit [Read error: 60 (Operation timed out)]
bohanlon_ has joined #ocaml
bohanlon has quit [Read error: 60 (Operation timed out)]
Mr_Awesome has quit [Read error: 110 (Connection timed out)]
roy_hu1 has joined #ocaml
Mr_Awesome has joined #ocaml
roy_hu has quit [Read error: 113 (No route to host)]
roy_hu1 has quit [Read error: 104 (Connection reset by peer)]
Associat0r has quit []
roy_hu has joined #ocaml
Jedai has quit [Read error: 110 (Connection timed out)]
bluestorm has joined #ocaml
Philonous1 has joined #ocaml
<palomer> is it possible to stop the control flow until a condition is met
Philonous has quit [No route to host]
<palomer> like "while (not !done) do ... done"
<palomer> but that seems slow
<palomer> it could easily be done with call/cc
<palomer> actuall, scratch that
<palomer> lemme write some code to examplify
<palomer> exemplify
Jeff_123 has quit []
<thelema> palomer: stop the control flow of a multithreaded program?
coucou747 has quit ["bye ca veut dire tchao en anglais"]
<palomer> yeah
<palomer> and restart it when another thread tells it to
<palomer> but I'm thinking of scratching that idea
<palomer> too many head aches
<palomer> I'll just do it sequentially
<palomer> slight bummer though
<thelema> sounds like you want it to wait for a signal... or a mutex.
<palomer> yeah
jeddhaberstro_ has quit []
Jeff_123 has joined #ocaml
<Jeff_123> would anyone happen to know why ml-lex is ignoring every regex I try to get it to match a bar, including \|, "|", and [|]?
<thelema> "\\|" ?
<Jeff_123> I'll try it
<Jeff_123> nope :(
<thelema> what's the key line of code?
<Jeff_123> <INITIAL>"\\|" => (Tokens.OR(yypos,yypos+1));
<Jeff_123> or, IMO it should work as
<Jeff_123> <INITIAL>\| => (Tokens.OR(yypos,yypos+1));
<thelema> that's what I get from reading http://www.smlnj.org/doc/ML-Lex/manual.html
<Jeff_123> You'd think it works, but it skips over every bar I throw at the generated lexer
<thelema> try \ddd with the ascii code for |
<Jeff_123> oh good idea
<Jeff_123> 124 I think
<Jeff_123> nope... :(
<Jeff_123> was worth a try though
<thelema> are you sure there's not some other problem? try replacing | in your input with & and seein if it works...
<thelema> (both input and rules)
<Jeff_123> yes it recognizes &
<Jeff_123> the rule for & is "<INITIAL>"&" => (Tokens.AND(yypos,yypos+1));"
<thelema> in that same spot?
<Jeff_123> yup
<thelema> you have a different rule for &. How about replacing | with %
<thelema> (or some other unused character... : maybe
palomer has quit ["Leaving"]
<Jeff_123> yup, replacing "&" with "%", it recognizes % as AND
<thelema> does that work the same for |? (replace | with %)
<Jeff_123> WTF it doesn't. well maybe there's a problem somewhere else in the lexing system
<thelema> yup. Thought so.
<thelema> Good luck.
thelema is now known as thelema|away
<Jeff_123> thank
<Jeff_123> s
bluestorm has quit [Remote closed the connection]
Jeff_123 has quit []
Jeff_123 has joined #ocaml
acatout has quit [Connection reset by peer]
Myoma has quit [Read error: 104 (Connection reset by peer)]
Jeff_123 has quit []
Jeff_123 has joined #ocaml
Jeff_123 has quit [Client Quit]
Jeff_123 has joined #ocaml
Weebls has joined #ocaml
Jeff_123 has quit []
Weebls has left #ocaml []
code17 has joined #ocaml
pango_ has quit [Remote closed the connection]
pango_ has joined #ocaml
asmanur has joined #ocaml
clog has joined #ocaml
code17 has quit ["Leaving."]
code17 has joined #ocaml
mishok13 has quit ["Leaving"]
mishok13 has joined #ocaml
l_a_m has joined #ocaml
jdh30 has joined #ocaml
jdh30 is now known as Guest34252
Philonous1 has quit ["Leaving."]
Philonous has joined #ocaml
Asmadeus has quit [Remote closed the connection]
Asmadeus has joined #ocaml
Asmadeus has quit [Read error: 104 (Connection reset by peer)]
Asmadeus has joined #ocaml
sporkmonger has joined #ocaml
asmanur has joined #ocaml
coucou747 has joined #ocaml
code17 has quit ["Leaving."]
code17 has joined #ocaml
seafood has quit []
seafood has joined #ocaml
seafood has quit []
Camarade_Tux_ has joined #ocaml
Camarade_Tux has quit [Read error: 110 (Connection timed out)]
Demitar has quit [Read error: 110 (Connection timed out)]
Associat0r has joined #ocaml
Camarade_Tux_ is now known as Camarade_Tux
besiria has joined #ocaml
marmotine has joined #ocaml
Guest34252 has quit ["using sirc version 2.211+KSIRC/1.3.12"]
munga_ has joined #ocaml
acatout has joined #ocaml
Myoma has joined #ocaml
Linktim has joined #ocaml
Snark has quit ["Ex-Chat"]
jeddhaberstro has joined #ocaml
guillem__ has quit [Remote closed the connection]
Linktim_ has joined #ocaml
guillem_ has joined #ocaml
Associ8or has joined #ocaml
Associat0r has quit [Read error: 104 (Connection reset by peer)]
Snark has joined #ocaml
<Myoma> type classes suck
<Myoma> what's the real solution?
<flux> sml has one solution
<flux> I don't know much about it, though
<flux> nor about its ups and downs
<Smerdyakov> Why do type classes suck?
<bluestorm_> Myoma: what's wrong about typeclasses in this case ?
Linktim_ has quit [Read error: 110 (Connection timed out)]
Linktim_ has joined #ocaml
Linktim has quit [Read error: 110 (Connection timed out)]
* Yoric[DT] doesn't see where typeclasses are involved.
ikatz has quit [Read error: 110 (Connection timed out)]
<Smerdyakov> Most languages have their features that most developers agree are silly, inelegant hacks that should be superceded, but type classes aren't one of those, so I think you, Myoma, should provide some justification after ruling them out in three words.
<bluestorm_> Yoric[DT]: typeclasses are a solution to the equality problem
<Yoric[DT]> Sure.
<Smerdyakov> Yoric[DT], type classes for ordered and equality-comparable types.
<Yoric[DT]> But I don't see where they appear in the entry.
<Yoric[DT]> Hey, I know about using typeclasses for comparing.
<Smerdyakov> SML has one fixed type class for equality types.
<bluestorm_> btw Smerdyakov
<bluestorm_> hm
<bluestorm_> i was going to ask you if the SMLer can specify the equality relation himself, but i'm going to go for the doc instead
<Smerdyakov> bluestorm_, I can answer, if you want, since the SML Definition isn't available for free. :P
<flux> it's been said that type classes and modules are equal in power, but apparently they are not quite as useful in this case :)
<Smerdyakov> flux, whoever says that has a bogus notion of "power."
<flux> smerdyakov, well, I'm obviously referring to the paper that describes a mapping between them
<flux> the notion of "power" is of course quite arbitrary and subjective :)
rby has quit ["Quitte"]
<Smerdyakov> flux, it's trivial to write a program to translate between them, but that program is hard for humans to run manually when they code.
<flux> have type classes for ocaml been investigated?
<flux> there is gocaml, but that's something else
<bluestorm_> Smerdyakov: after a little googling it seems the answer is "no"
<Myoma> typeclasses are far too inexpressive
pango_ has quit [Remote closed the connection]
<Smerdyakov> Myoma, but they solve the particular problem you mentioned.
<bluestorm_> so the SML solution, while being nicer than the OCaml runtime-error, is not as flexible as the equality classes (in particular it looks like the "set equality" problem is not resolved)
<flux> maybe when you fit those in ocaml which already has modules, you get something expressive.. (speculating)
<Myoma> Smerdyakov: I want to build a lattice of types and have operations promote values into the lowest upper bound of the argument types
<bluestorm_> use OOP ocaml ?
<bluestorm_> (however, you'll have to do the promotion by hand)
<Myoma> but I would like to resolve this at compile time
<bluestorm_> which part ?
<bluestorm_> in OCaml, the typing part is resolved at compile time, but not the method lookup iirc
pango_ has joined #ocaml
<Smerdyakov> Myoma, hardly anyone wants this in practice, you know. It's fine to identify an opportunity for language improvement, but it's just irresponsible to act like type classes are crap because they don't make what you want instant.
<Smerdyakov> Myoma, BTW, I do think you can do what you're asking using multi-parameter type classes.
Snark has quit ["Ex-Chat"]
<Smerdyakov> You define a two-parameter type class capturing the subtype relationship, with one member, a cast function.
<Myoma> You can't take the transitive closure of the subtype relation though
<Smerdyakov> I thought you could, using functional dependencies.
<bluestorm_> Myoma: are equality and subtyping really related anyway ?
<Myoma> but the problem is if you put full (lambda) Prolog, in the type system there are other problems
<Smerdyakov> Myoma, but GHC essentially has that with the right options turned on, I think.
<Myoma> so I feel like typeclasses are a dead end, maybe I am wrong (because I don't see anything better around currently)
<Smerdyakov> Again, most functional programmers don't care about subtyping coercions, in my experience. Do you have any other objection?
<Myoma> Smerdyakov: I also think with a slightly better relational language in the type system you could do generic programming over sets of types
<Smerdyakov> Completely general generic programming is well-understood in dependently-typed languages.
* Myoma is yet to come up with something concrete to prototype though ...
<Myoma> Smerdyakov: What about general purpose programming?
<Smerdyakov> I argue against the existence of "general purpose programming" in well-designed engineering environments.
<Myoma> hmm interesting
pattern has left #ocaml []
<Smerdyakov> I think there is the world of hardcore infrastructure hacking, which belongs in a dependently-typed language yet to be designed; and all the rest, the vast bulk of software development in fact, which should be in very restrictive, high-level DSLs.
<Smerdyakov> But Coq today is in pretty darned good shape for general purpose programming, especially with a layer like Ynot on top.
<Smerdyakov> So I guess what I really mean is "all kinds of programming."
Linktim has joined #ocaml
<Smerdyakov> Not literally "all," but "all kinds" in the sense of "many and diverse."
<Smerdyakov> I'm sure most developers aren't ready for Coq, but that's a separate issue.
Associat0r has joined #ocaml
Associ8or has quit [Connection reset by peer]
Linktim_ has quit [Read error: 113 (No route to host)]
Linktim_ has joined #ocaml
Snark has joined #ocaml
Linktim has quit [Read error: 110 (Connection timed out)]
Linktim has joined #ocaml
mishok13 has quit [Read error: 145 (Connection timed out)]
Axioplase_ is now known as Axioplase
besiria has quit [Remote closed the connection]
Snark has quit ["Ex-Chat"]
Snark has joined #ocaml
Linktim_ has quit [Read error: 110 (Connection timed out)]
r0bby has joined #ocaml
Snark has quit ["Ex-Chat"]
Weebls has joined #ocaml
Snark has joined #ocaml
Linktim_ has joined #ocaml
Kopophex has joined #ocaml
Linktim has quit [Read error: 110 (Connection timed out)]
<flux> apparently ocamlcore planet still has harrop's non-articles
<jeddhaberstro> link?
mav has joined #ocaml
<rwmjones> flux, complain to gildor .. I don't think they should be there
Weebls has left #ocaml []
zarvok has joined #ocaml
Snark has quit ["Ex-Chat"]
<Yoric[DT]> And now, back to writing a paper...
besiria has joined #ocaml
ygrek has joined #ocaml
<flux> night, the underappreciated time of working..
Kopophex has quit [Connection timed out]
zarvok has quit ["Leaving"]
Kopophex has joined #ocaml
bohanlon_ has quit [Remote closed the connection]
mav has left #ocaml []
rwmjones has quit ["Closed connection"]
Philonous has quit [Remote closed the connection]
code17 has quit [Remote closed the connection]
code17 has joined #ocaml
ygrek has quit [Remote closed the connection]
Sparkles has quit [Remote closed the connection]
sporkmonger has quit []
Linktim_ has quit [Read error: 110 (Connection timed out)]
Snark has joined #ocaml
besiria has quit [Remote closed the connection]
<Yoric[DT]> flux: underappreciated but also overused.
Snark has quit ["Ex-Chat"]
guillem_ has quit [Remote closed the connection]
asmanur has quit [Read error: 110 (Connection timed out)]
sporkmonger has joined #ocaml
jlouis has quit ["Leaving"]
marmotine has quit ["mv marmotine Laurie"]
Amorphous has quit [Read error: 110 (Connection timed out)]
rwmjones has joined #ocaml
hkBst has quit ["Konversation terminated!"]
munga_ has quit [Read error: 113 (No route to host)]
Amorphous has joined #ocaml
zarvok has joined #ocaml
l_a_m has quit [Read error: 104 (Connection reset by peer)]
Apocalisp has quit [Read error: 104 (Connection reset by peer)]
code17 has quit ["Leaving."]
zarvok has quit ["Leaving"]
Asmadeus has quit ["nighters"]
Yoric[DT] has quit ["Ex-Chat"]
fremo_ has quit [Remote closed the connection]