mbishop changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | Grab Ocaml 3.10.0 from http://caml.inria.fr/ocaml/release.html (featuring new camlp4 and more!)
<olleolleolle> Unix.sleep 5;; You need to include the unix.cmx one the compile lines before your source files (or unix.cmxa in the case of ocamlopt).
<olleolleolle> The Unix support overwhelmed me a bit, maybe I've been thinking of OCaml as "a hairshirt language". But it's quite sumptuous.
tld3 has quit [Read error: 110 (Connection timed out)]
Mr_Awesome has quit ["aunt jemima is the devil!"]
JohnnyL has quit [Remote closed the connection]
Hadaka has quit [Operation timed out]
pattern has quit [kubrick.freenode.net irc.freenode.net]
pattern has joined #ocaml
Naked has joined #ocaml
Naked is now known as Hadaka
david_koontz has quit []
Jeff_123 has joined #ocaml
tld2 has quit [Read error: 110 (Connection timed out)]
Mr_Awesome has joined #ocaml
<olleolleolle> I am now running the lablgtk2 thing, and am getting happier. window#event#connect#delete -- what does the # marks mean?
<pango> object#method
bhall has quit [Read error: 110 (Connection timed out)]
ikaros_ has quit [Remote closed the connection]
ikaros has joined #ocaml
Jeff_123 has quit ["Quit"]
olleolleolle has quit [Remote closed the connection]
jwoah12 has joined #ocaml
<jwoah12> What in the world could cause this error message: This expression has type Nfa.nfa but is here used with type Nfa.nfa
bhall has joined #ocaml
<darinm> are you loading stuff into the toplevel?
bhall` has joined #ocaml
pango has quit [Remote closed the connection]
pango has joined #ocaml
mbishop_ has joined #ocaml
mbishop has quit [Read error: 110 (Connection timed out)]
mbishop_ is now known as mbishop
bhall` has quit ["ERC Version 5.2 (IRC client for Emacs)"]
bhall has quit ["ERC Version 5.2 (IRC client for Emacs)"]
sergez has joined #ocaml
jwoah12 has quit ["Leaving"]
sergez has quit [Read error: 104 (Connection reset by peer)]
sergez has joined #ocaml
joshcryer has quit [Read error: 104 (Connection reset by peer)]
bhall has joined #ocaml
bhall has left #ocaml []
joshcryer has joined #ocaml
CRathman has joined #ocaml
sergez has quit [Read error: 104 (Connection reset by peer)]
sergez has joined #ocaml
jlouis has joined #ocaml
sergez has quit []
sergez has joined #ocaml
sergez has quit [Remote closed the connection]
jlouis_ has quit [Read error: 110 (Connection timed out)]
jlouis_ has joined #ocaml
sergez has joined #ocaml
sergez_ has joined #ocaml
jlouis has quit [Read error: 110 (Connection timed out)]
ser_ has joined #ocaml
sergez has quit [Read error: 113 (No route to host)]
david_koontz has joined #ocaml
david_koontz has quit [Client Quit]
CRathman has quit [Read error: 110 (Connection timed out)]
seafood__ has joined #ocaml
ttamttam has joined #ocaml
seafood_ has quit [Read error: 110 (Connection timed out)]
seafood_ has joined #ocaml
xavierbot has joined #ocaml
seafood__ has quit [Read error: 110 (Connection timed out)]
ertai has joined #ocaml
filp has joined #ocaml
Snark has joined #ocaml
ygrek has joined #ocaml
sergez has joined #ocaml
ser_ has quit [Read error: 113 (No route to host)]
seafood_ has quit [Read error: 110 (Connection timed out)]
sergez has quit [Read error: 113 (No route to host)]
hordf has joined #ocaml
oc13 has joined #ocaml
hkBst has joined #ocaml
love-pingoo has joined #ocaml
filp has quit [Read error: 110 (Connection timed out)]
hordf has quit [Read error: 110 (Connection timed out)]
hordf has joined #ocaml
sergez has joined #ocaml
clalfa has joined #ocaml
ita has joined #ocaml
sergez has quit [Read error: 110 (Connection timed out)]
clalfa has left #ocaml []
mikeX has joined #ocaml
darinm has quit [Remote closed the connection]
sergez has joined #ocaml
brooksbp has joined #ocaml
sergez has quit [Read error: 110 (Connection timed out)]
screwt8 has quit [Remote closed the connection]
Abo-Marwan has quit [Broken pipe]
smimou has joined #ocaml
sergez has joined #ocaml
rwmjones has quit ["Closed connection"]
screwt8 has joined #ocaml
ikaros has quit [Read error: 110 (Connection timed out)]
ikaros has joined #ocaml
Abo-Marwan has joined #ocaml
brooksbp has quit []
smimou has quit ["bli"]
sergez has quit [Read error: 113 (No route to host)]
ertai has quit [Read error: 110 (Connection timed out)]
schme has joined #ocaml
sergez has joined #ocaml
Mr_Awesome has quit [Read error: 110 (Connection timed out)]
Mr_Awesome has joined #ocaml
hkBst has quit ["Konversation terminated!"]
olleolleolle has joined #ocaml
Yoric[DT] has joined #ocaml
<Yoric[DT]> hi
sergez has quit [Read error: 113 (No route to host)]
screwt8 has quit [Remote closed the connection]
Abo-Marwan has quit [Remote closed the connection]
Mr_Awesome has quit [Read error: 110 (Connection timed out)]
sergez has joined #ocaml
JohnnyL has joined #ocaml
screwt8 has joined #ocaml
olleolleolle has quit []
Abo-Marwan has joined #ocaml
ttamttam has left #ocaml []
olleolleolle has joined #ocaml
olleolleolle has quit [Client Quit]
Dark-Side has joined #ocaml
Yoric[DT] has quit [Read error: 113 (No route to host)]
seafood_ has joined #ocaml
sergez has quit [Read error: 110 (Connection timed out)]
Yoric[DT] has joined #ocaml
sergez has joined #ocaml
Yoric[DT] has quit ["Ex-Chat"]
gim_ has joined #ocaml
sergez has quit [Client Quit]
seafood__ has joined #ocaml
Dark-Side has quit [Remote closed the connection]
ertai has joined #ocaml
seafood_ has quit [Read error: 110 (Connection timed out)]
Cygal_ has joined #ocaml
Cygal_ is now known as Cygal
CRathman has joined #ocaml
CRathman has quit [Client Quit]
Amorphous has joined #ocaml
Smerdyakov has joined #ocaml
seafood_ has joined #ocaml
jlouis has joined #ocaml
seafood_ has quit []
jlouis_ has quit [Read error: 110 (Connection timed out)]
seafood__ has quit [Read error: 110 (Connection timed out)]
ita is now known as ita|zzz
pango has quit [Remote closed the connection]
pango has joined #ocaml
ikaros has quit [Remote closed the connection]
Cygal has left #ocaml []
jeffwheeler has joined #ocaml
<jeffwheeler> Hmm, I'm having trouble compiling the code on this page: http://plus.kaist.ac.kr/~shoh/ocaml/lablgtk2/treeview-tutorial/ch03s05.html. Does it work for anybody else?
hkBst has joined #ocaml
<jeffwheeler> the error: http://dpaste.com/25769/
<jeffwheeler> Commenting out that line and removing it from the print statement causes the type to change to the specific string version of the Column.
ygrek has quit [Remote closed the connection]
ygrek has joined #ocaml
Ogedei has joined #ocaml
<flux> maybe you need to add explicit int_of_string conversion there - apparently some version has changed since the time of writing that
<flux> hm, actually, maybe I don't know what I'm saying, I haven't really done much lablgtk2 to talk about :)
Snark has quit [Read error: 113 (No route to host)]
Snark has joined #ocaml
ygrek has quit [Remote closed the connection]
mordaunt has joined #ocaml
ygrek has joined #ocaml
mikeX has quit [Read error: 110 (Connection timed out)]
<jeffwheeler> hmm, that's possible, but I think they do some weird things with Gobject.Data.string and Gobject.Data.int wrappers, not sure what's up there.
<flux> jeffwheeler, which editor do you happen to use? if emacs, there's a way to retrieve the type of an expression.. I think the same thing is available for vim too, nowadays.
<flux> that's helpful when debugging type-problems
<jeffwheeler> Emacs, and it's C-c C-t.
<flux> right, so you know it :)
<jeffwheeler> :)
<jeffwheeler> I'm playing with something else for the moment; thanks for the help.
<jeffwheeler> I gave up on that for now.
jeffwheeler has quit ["Leaving."]
rwmjones has joined #ocaml
<flux> hmh, I took a new look at jeff's problem, and I don't quite understand the fixes I needed to do.. it is obvious however that the code has never been compiled as is.
<flux> the code is here: http://dpaste.com/hold/25780/
Yoric[DT] has joined #ocaml
<flux> it was clear that the model needed a type annotation - apparently the get-method has a polymorphic signature
<flux> and that foreach_fun needed to be renamed into foreach_func :)
<flux> however, I don't quite understand why the model#get needed to be have labels in application
<flux> I mean, it was fully annotated already?
<flux> or does the polymorphic signature mess things up..
<flux> that could actually be a bug in ocamlc (I have 3.09.2)
<flux> s/annotated/applied/..
<flux> it's nice how the gtk-bindings take advantage of the ocaml type system..
<Smerdyakov> Not well enough; they segfault sometimes.
<flux> could be a simple bug; it's interfacing with C, after all, lies in dangerous waters :)
Hadaka has quit [kubrick.freenode.net irc.freenode.net]
pattern has quit [kubrick.freenode.net irc.freenode.net]
oc13 has quit ["Leaving."]
Hadaka has joined #ocaml
pattern has joined #ocaml
xavierbot has quit [Remote closed the connection]
xavierbot has joined #ocaml
screwt8 has quit [Remote closed the connection]
Abo-Marwan has quit [Remote closed the connection]
ita|zzz is now known as ita
JimmyM has joined #ocaml
<JimmyM> Does anyone know how I could pattern match against a list that has only one element?
ertai has quit [Read error: 110 (Connection timed out)]
<Smerdyakov> JimmyM, what ways do you know now to write list patterns?
<JimmyM> Well, the empty list is just []
<JimmyM> I think that's it.
<Smerdyakov> Hm. What source are you using to learn OCaml?
<JimmyM> I've actually done a lot with OCaml before.
<JimmyM> It's just been a while since I used it.
<JohnnyL> Smerdyakov, what's the difference between a=b and let a=b in?
<pango> JimmyM: you can pattern-match against x :: [] or, same thing, against [x]
<JimmyM> OK, that's what I was thinking.
<Smerdyakov> pango, reaaaaal cool, man. The give-everyone-the-exact-answer school of pedagogy.
<pango> Smerdyakov: so?
<JimmyM> Smerdyakov: I understand what it says.
<JimmyM> Plus, I tried that before.
<Smerdyakov> JohnnyL, [a = b] is an expression, and [let a=b in] by itself is not a valid expression. :)
<JimmyM> But there was some other incorrect code around it that kept it from compiling.
<JohnnyL> thats why should get rid of the keyword let in.
<Smerdyakov> pango, it doesn't help people learn to answer their own questions in the future.
<Smerdyakov> JohnnyL, why is why?
<pango> Smerdyakov: in that specific case, I felt it wouldn't be the case
<Smerdyakov> Anyone understanding the basics of writing recursive functions over lists should have known the building blocks to create the pattern.
<Smerdyakov> Anyone _not_ understanding the basics of writing recursive functions over lists should be going back to a tutorial. :P
<pango> I don't feel like I should justify my decision
<JohnnyL> The keywords let in is the equivilent of lisps' '('.
<JohnnyL> and/or setq.
Snark has quit ["Quitte"]
<Smerdyakov> JohnnyL, no.
<flux> hm, how about equivalent to lisp's (let ?-)
Abo-Marwan has joined #ocaml
<JohnnyL> flux, i don't know, does 'let .. in' have semantics to anything above it?
<JohnnyL> if it does it's not like lisps let.. otherwise so.
<flux> johnnyl, no (if I understand what you mean)
<JohnnyL> flux, what I"m trying to find. meagerly speaking is the reason to use let..in (Perhaps it has some other operative at that same level it replaces)?
<flux> let x = b in expr has a scope of expr
<flux> before that statement and after that expression it affects nothing
<Smerdyakov> JohnnyL, it's the primitive way of creating variables without using new function definitions.... what else do you propose?
<flux> (actually let .. in is also an expression so that wasn't quite correct thing to say)
<JohnnyL> ok
<JohnnyL> well, in lisp let has an obiovus meaning. Unless you switch let a=b.in c with a=b;c;
<JohnnyL> obvious
screwt8 has joined #ocaml
<Smerdyakov> 'let' in OCaml means the same as 'let' in Lisp, except that the variable isn't mutable.
<flux> let a = b in c -> (let ((a b)) c)
<JohnnyL> well, you could make a function from the let assignment in lisp.
<JohnnyL> but then it may be harder to read depending on the implementation.
Abo-Marwan has quit [Remote closed the connection]
screwt8 has quit [Remote closed the connection]
<JohnnyL> let..in it 3 more characters than ; ;
<pango> JohnnyL: it's been a while since I used any Lisp, but I think the difference is that Lispen were traditionally dynamically scoped, while OCaml is lexically scoped
<Smerdyakov> JohnnyL is a dangerous weapon against computers in the tradition of Captain Kirk and his nonsensical statements that fry their brains.
<Smerdyakov> BTW, JohnnyL, is your last name Lin?
<JohnnyL> pango, oh i thought lisp was both lexical and dynamic.
* JohnnyL bows to the eternal in Smerdyakov
<Smerdyakov> JohnnyL, so that is your last name?
<flux> lexical scoping was a later addition to lisp
<flux> ooh, my sql query generator works now, with the new approach (each query has its own symbols)
<flux> R.select g_site (in' (col c_site) (R.project client_hosts [R.new_column (), col c_host_site])) -> SELECT * FROM (SELECT site, name FROM site) AS s (c3, c4) WHERE (c3) IN (SELECT c7 FROM (SELECT * FROM (SELECT client, name FROM client) AS l (c1, c2) LEFT JOIN (SELECT host, ip, site, client FROM host) AS r (c5, c6, c7, c8) ON ((c1) = (c8))) AS s (c1, c2, c5, c6, c7, c8))
<flux> obviously some (read: lots of) other code needs to be there for that query, so there aren't quite any returns if one has only one query - also it doesn't really leverage the compiler for much else than syntax checking, that is, no static type system goodness
<flux> I'm not sure how such goodness would be implemented, though.. perhaps with get1, get2, get3 etc types, for different query arities, which leads to projectn and order_byn-functions
ikaros has joined #ocaml
<flux> but especially not-very-nice is the join of two relations: it would need \forall x, y in {1..n}: joinxy
<flux> and even then the actual expressions of projections and joins wouldn't become type safe.. I think.
<Smerdyakov> My language (http://laconic.sf.net/) has SQL built into the type system.
<flux> can it construct sql queries by composing other queries?
<Smerdyakov> Yes.
<Smerdyakov> I don't think I ever implemented sub-selects, though.
<Smerdyakov> The ad-hoc implementation techniques I was using would make that painful, but the new approach I'm working on slowly now should make it more pleasant.
<flux> I'm hoping at some point I would be able to write a camlp4-preprocessor, which would perform sufficient magic for the compiler to type check that
<Smerdyakov> It's not going to happen for a system with as much flexibility as mine.
<Smerdyakov> I do static type-checking of functions from database schemas to complete SQL-using web applications, for instance.
<flux> I believe that's going to be true, but I'm thinking this will be easier to integrate with other ocaml code
<JohnnyL> Smerdyakov, Lutz is my last name.
<flux> you are aware of pgocaml, which does that too?
<Smerdyakov> JohnnyL, kdokey.
<flux> (maybe, difficult to say from that description)
<Smerdyakov> flux, no, I'm not aware of it. I'll take a look.
<Smerdyakov> Aha, from the boys at Merjis.
<Smerdyakov> No, from a quick look, I don't think PGOCaml comes anywhere close to doing this.
<Smerdyakov> I'm not aware of any prior work that comes close to what I do.
Ogedei has quit [Read error: 104 (Connection reset by peer)]
<Smerdyakov> (In terms of 100% static checking of the type safety of a complicated generic program that uses a relational database)
Ogedei has joined #ocaml
<flux> are there any specific interesting .sml-files one interested in your approach should take a look at, or is it a all-or-nothing-deal?-)
<Smerdyakov> .sml files? You are interested in the implementation of the compiler?
<Smerdyakov> There is a code example/feature walk-through on the web site.
<flux> I'm thinking how the sql types (which I assume you have) flow through the compiler.. or are the sql-types implemented with the language itself?
<Smerdyakov> But that doesn't involve SML, which is just the semi-arbitrarily-chosen language for implementing the compiler.
<Smerdyakov> You can see laconic/src/ast.sml in the CVS repo.
<Smerdyakov> (For the complete type/expression/yada-yada definitions)
<Smerdyakov> The design is definitely kind of hokey, but I learned a lot from implementing it and know how to do it with fewer orthogonal features now.
<flux> that's interesting, thanks
<flux> how are laconic and laconic2 related?
<Smerdyakov> laconic2 is tres new.
<Smerdyakov> It's going to be a single programming language where you can implement everything, with usability features so that you don't notice that it's really Coq.
<flux> so it's not targeted specifically only for web development?
<Smerdyakov> It's targeted at replacing every general purpose programming language.
<Smerdyakov> And every DSL.
<Smerdyakov> Because life is more fun if you think big. :-)
<flux> :)
Mr_Awesome has joined #ocaml
<flux> when will it become self-hosting?-)
<ita> size does matter hmm ?
<Smerdyakov> flux, beats me.
<Smerdyakov> ita, eh?
* Smerdyakov notices the "Hard problems" section at the bottom of the PGOCaml page.
<Smerdyakov> My implementation either supports or almost supports that. :-)
<JohnnyL> laconics2 because self aware 2012... It was an all purpose loirning komputer...
<JohnnyL> opps
<JohnnyL> laconics2 became self aware 2012... It was an all purpose loirning komputer...
schme has left #ocaml []
brooksbp has joined #ocaml
hkBst has quit [Read error: 104 (Connection reset by peer)]
hkBst has joined #ocaml
rwmjones has quit ["Closed connection"]
hkBst has quit [Client Quit]
hkBst has joined #ocaml
love-pingoo has quit ["Connection reset by pear"]
JimmyM has quit ["Leaving"]
ygrek has quit [Remote closed the connection]
hsuh has joined #ocaml
hsuh has quit [Remote closed the connection]
hsuh has joined #ocaml
hsuh has quit [Remote closed the connection]
dazari has joined #ocaml
dazari has left #ocaml []
screwt8 has joined #ocaml
ita has quit [Remote closed the connection]
m3ga has joined #ocaml
seafood_ has joined #ocaml
m3ga has quit ["disappearing into the sunset"]
hordf has quit ["Bye"]
hkBst has quit ["Konversation terminated!"]
Yoric[DT] has quit ["Ex-Chat"]
seafood__ has joined #ocaml
gim_ has quit []
seafood_ has quit [Read error: 110 (Connection timed out)]
brooksbp has quit []
brooksbp has joined #ocaml