dylan changed the topic of #ocaml to: OCaml 3.09.1 available! Archive of Caml Weekly News: http://sardes.inrialpes.fr/~aschmitt/cwn/ | A free book: http://cristal.inria.fr/~remy/cours/appsem/ | Mailing List: http://caml.inria.fr/bin/wilma/caml-list/ | Cookbook: http://pleac.sourceforge.net/
carm24 has quit [Read error: 110 (Connection timed out)]
joshcryer has joined #ocaml
zmdkrbou has quit ["allez niquer vos mères"]
dark_light has joined #ocaml
mikeX has quit ["zzz"]
<Quinthius> hey guys, what would you suggest as a good introductory book/text for picking up ocaml and functional programming from scratch?
<ulfdoz> to get an overview let me see my browserhistory
<ketty> without any other programming experience?
<Quinthius> i've found a lot of tutorials and pdf's floating around the internet, and they seem to cover the "details" or "pieces" of the language pretty well, but don't seem to really get into how to USE those pieces in "the bigger picture", as far as design and stuff goes
<Quinthius> at least from what i've seen
<ulfdoz> http://docs.happycoders.org/orgadoc/dev/ocaml/ocaml.pdf <- but by far you'll not learn ocaml from it.
<Quinthius> well i guess even learning functional programming concepts in general would be a big help
<Quinthius> and yeah, basically without any other programming experience. i have some basic knowledge of C, but never did anything major with it
<ulfdoz> hm, i ve had a paper yesterday, wait a moment.
<ulfdoz> but I don't find it.
<ulfdoz> I have a hardcopy here. can I dcc you?
<Quinthius> hmm lemme check firewall settings first
<Quinthius> you can try if you want, i dunno if it'll work without some tweaking though
<Quinthius> and i just grabbd that other link you gave, dont think i've come across that one before :)
<ulfdoz> no it won't
<ulfdoz> let me upload
<Quinthius> sec just changed something, brb
Quinthius has quit ["Leaving"]
Quinthius has joined #ocaml
<ulfdoz> hipe no typo
<Quinthius> cool, worked, thanks :)
<Quinthius> also, i've noticed there aren't a lot of ocaml-specific books on amazon, but there are a few ML ones ... would that be useful at all in learning the basics of ocaml?
<ulfdoz> the basics of ml are anywhere the same. You'll probably miss OOP.
<ulfdoz> My personal opinion is, ocaml isn't good for education. You can do too many strange things.
<Quinthius> that's fine, i haven't learned much about OOP anyway other than the basic concepts behind it
* ketty likes doing strange things =)
<Quinthius> hehe .... i wanna do strange things!
* Smerdyakov also prefers SML to OCaml for real work for the same reason..
<ulfdoz> for education, haskell is much better, because it's tighter.
<Quinthius> hmm, maybe i'll check out some ML books also then
<ulfdoz> I'm moving to bed. Good night guys.
<Quinthius> night, and thanks again :)
<ulfdoz> .. and girls of course
<dylan> The power of cheese!
<Smerdyakov> Cheese is bad for human being.
<Smerdyakov> Laconic is good for human being.
<dylan> I mean, that's interesting.
<dylan> That is a matter of opinion on both counts. But it looks quite neat.
<Smerdyakov> You didn't have enough time yet to read 1/100 of it!
<dylan> I read fast
<dylan> Hmm, are you using :: for types, like haskell (and its predecessors?)
<Smerdyakov> : to give the type of a variable, :: to give the kind of a variable.
<dylan> What is list cons, then?
<Smerdyakov> No list cons there now.
<dylan> Interesting.
<Smerdyakov> In any case, there's no need to have an infix operator for it.
<dylan> is "kind" of a variable along the lines of a type class or...?
<Smerdyakov> The type of an expression is a type. The type of a type is a kind.
<dylan> Ah, a metatype.
<dylan> I'm sure this would be more understand if I was used to SML syntax rather than ocaml.
<dylan> err, understandable.
<Smerdyakov> It's probably also incurably cryptic if you haven't programmed with dependent types.
<dylan> well, I've read papers on them, and played with around with... I don't remember... that used that.
* dylan goes back to writing an email explaining why a "primary key" of an SQL database can't be two different types at the same time.
<Smerdyakov> What a coincidence. It can be in Laconic. ;)
<Smerdyakov> (Sort of)
<dylan> with the requirements of using postgresql and python?
<Smerdyakov> Laconic is a new programming language, so no on the Python.
<dylan> yes, obviously. :(
<Smerdyakov> What I meant is that a key of existential type can be treated as having the type hidden inside the existential package, too.
<dylan> This is such a bastardized thing. they designed an XML schema by first modelling it relationally, then they tweaked it, now they want to import it into postgresql. And it's no longer exactly relational, even in the sense used for SQL databases.
<Smerdyakov> Sucks to be you? :)
<dylan> Also, to send the XML files to the server, they wanted to use SOAP...
<Demitar__> Smerdyakov: How does laconic compare to wdialog? :)
<dylan> Luckily, I have convinced them that HTTP PUT/POST is suitable for that.
Demitar__ is now known as Demitar
<Smerdyakov> Demitar, I already commented briefly on that here. I think WDialog is in the same sorry camp with the other contenders of requiring immense amounts of boilerplate code.
<Demitar> Smerdyakov: From the looks of it laconic might be the web language I never bothered to actually implement. :)
<dylan> Smerdyakov: Not really. It's just utterly insane, but it's easy monkey.
<dylan> err, easy money.
<dylan> not monkey
<Demitar> Smerdyakov: Yes, I was never entirely happy with wdialog myself. It was lovely in theory but clumsy in practice. :)
<Smerdyakov> I don't see how something that involves writing XML to describe a user interface could be lovely in theory, but you may have a different view. ;)
<dylan> Smerdyakov: I don't see how anything involving XML for anything other than document markup could be lovely. :)
<Smerdyakov> dylan, there are very good XML transformation tools that make XML worth using for other things.
<dylan> hmm...
<Demitar> Smerdyakov: It wasn't the implementation but the whole concept of automating and statically checking all those forms I liked. :)
* dylan ponders using XSLT to turn XML into SQL statements.
<Smerdyakov> See http://www.cs.berkeley.edu/~adamc/cv/ , for instance
<dylan> Smerdyakov: I said "other than document markup"
<Smerdyakov> Demitar, with Laconic, you can statically check your forms and SQL queries, and you can statically check functions that generate them, and you can statically check functions that generate functions that generate them. :)
<Smerdyakov> dylan, thank you for the courtesy of not reading a single sentence on that page.
<Demitar> Smerdyakov: Statically checking sql queries is the part one is usually missing of course. :)
<dylan> Smerdyakov: I read the bold stuff before the first paragraph
<Smerdyakov> dylan, I know you didn't read the first screenful, at least.
<dylan> it fits on one screen
<Smerdyakov> dylan, well, then we can settle on this: The page makes it quite clear that the process described is _not_ document formatting.
<dylan> I saw "Producing the same document in different formats.", made snarky comment, and then read the first bit.
<dylan> Went over to this window to say "oops", and you'd already said your bit to my snarky comment. :)
<dylan> but it's midnight, so I probably should skeep.
<dylan> sleep.
<Smerdyakov> Demitar, statically checking code that produces forms and their handlers is _not_ something that is usually missing?
<Demitar> Smerdyakov: I was missing it until wdialog floated by. :)
<dylan> Smerdyakov: Anywho, I'd be interested in playing with laconic at some point.
<Smerdyakov> Demitar, is there an example online of doing that with WDialog?
<Demitar> Of course, for practical reasons I've been using php quite often in the end. (Availability and simplicity (I've never liked cgi-bin) being the main reasons. :) )
<Demitar> Smerdyakov: I should probably not attempt to answer anything authoritively right now, I'm a tad too tired. :)
<Smerdyakov> I'm talking about a statically-typed function that produces a different form-based application for different inputs.
<Smerdyakov> Did you mean to say that WDialog supports this?
coumbes has joined #ocaml
<Demitar> I meant to say that it statically checks input and output mostly, never had to imagine anything further than that. :)
<Smerdyakov> It's not an issue of "having to" imagine something. It's an issue of what your imagination can buy you.
<Demitar> Even though it's not yet packaged and all, how would I go about installing it? Anything special needed or should I just make apache call sml as a CGI or something?
<Smerdyakov> It produces FastCGI binaries.
<Smerdyakov> The rest is up to you.
<Demitar> Ah.
<Demitar> Can/do/will eventually/... the embedded sql be upgradeable/exportable/... somehow?
<Smerdyakov> What does that mean?
<Quinthius> do you guys know if "The Little MLer" is any good as an early introduction?
<Demitar> I imagine the sql database is stored in a file automagically created? If so, what if I find I'll need another field in the database, what steps are needed to make it so? And can it be accessed using other tools (not through the webinterface)?
<Smerdyakov> Demitar, ATM the database is created in PostgreSQL. There is no support for automatic migration when the schema changes, but anything that can access PostgreSQL can access the data.
<Demitar> Lovely. :)
<Smerdyakov> Quinthius, I don't know it. BTW, that's more relevant in #sml.
<Quinthius> ahh, okie :)
<Demitar> Smerdyakov: Hmm... does it strip starting slashes from absolute paths?
<Demitar> $ sml src/laconic.cm
<Demitar> - Main.compileLab "/home/demitar/text/www/localhost/cgi-bin/laconic/form.lab";;
<Demitar> Error reading home/demitar/text/www/localhost/cgi-bin/laconic/form.lac
<Demitar> (Extra chatter stripped.)
<Demitar> Relative path works ok. (Get "normal" errors instead. :)
<Smerdyakov> I've only tried it with relative paths, from the base installation directory.
<Demitar> - Main.compileLab "form.lab";;
<Demitar> Error reading /form.lac
<Demitar> val it = 1 : OS.Process.status
<Demitar> - Main.compileLab "demitar/form.lab";;
<Demitar> Last version works as well.
<Smerdyakov> I never claimed that you would be able to get it to work. :P
<Demitar> No, I'm not complaining, I'm giving feedback. ;-)
<Smerdyakov> I'm sure I could try such tests myself if I thought this was the right time to focus on such things.
<Demitar> If you want another report I have a rather strange syntax error. :)
<Smerdyakov> Go for it.
<Demitar> The form.lac from the demo won't compile, I get this "demitar/form.lac:8.2-9.36:error: Unmatched XML tags body and h1". However removing the part inside the <form> tags fixes it.
<Demitar> More specifically the Name and Age fields.
<Smerdyakov> Trying to compile it how?
<Demitar> In fact it's the {@_} which confuses it.
<Demitar> - Main.compileLab "demitar/form.lab";;
<Demitar> demitar/form.lac:8.2-9.36:error: Unmatched XML tags body and h1
<Smerdyakov> You might not have the latest CVS version.
<Smerdyakov> That's probably the reason.
<Smerdyakov> And it's just plain not available via public CVS; there is a lag period on SF.
<Demitar> *nods*
<Demitar> Then I rule that it works wonderfully. :)
<Demitar> Now if I can just trick it into ignoring the postgredatabase I don't have installed. :)
<Demitar> The more hairy examples really start looking a tad like a mix of perl and ml after a while (or perhaps that's just my brain turning into mush). But what I really want from such an application is all that static typechecking, more than the fancy typejuggling. :)
<Smerdyakov> What is "typejuggling"?
<Demitar> The row-type metaprogramming. :)
<Demitar> Juggling because it's tricky not because it requires a lot of effort. :)
<Smerdyakov> I think you don't know yet what you want. You really want to avoid writing the same code over and over.
<Demitar> Yes, I'm just assuming I won't actually be touching those parts much but rather draw from the library of such things someone else wrote. :)
<Demitar> Either way, my brain is too tired to learn much now. So goodnight. :)
<Smerdyakov> 'Night
Smerdyakov has quit ["Leaving"]
Snark has joined #ocaml
vitriol_ has joined #ocaml
<vitriol_> are there any variants of ml which support something like haskell type classes?
<pango> isn't Haskell a variant of ml ?
<vitriol_> true..
<vitriol_> i was wondering if there are any similar constructs in other ml variants
<pango> no idea...
<pango> gcaml has generics (adhoc polymorphism), does that count ?
<vitriol_> oh, perhaps
<vitriol_> thanks
vitriol_ has quit [Remote closed the connection]
Schmurtz has joined #ocaml
derpy has joined #ocaml
<derpy> im no stranger to functional programming, but ocaml rapped my innerchild
<derpy> :'(
* derpy sigh
<Schmurtz> just be patient
<Schmurtz> ocaml is not so hard to learn
<derpy> i know that, its the project that was assigned
<derpy> i know waht sit supposed to do
<derpy> but jsut doenst work
<derpy> no im done, im just going to drop the course and take it at a differnt time. this coming from a guy whos gotten near perfect or 100% percent on a every cs lab class hes taken
<pango> coming from lisp, the problem is probably getting used to strong static typing
<derpy> seems fine and dandy only 25 lines of code AT MOST
<derpy> but whooped my ass
Schmurtz has quit ["Dodo !"]
<derpy> thanks pango for all your help, im out
derpy has quit ["Download Gaim: http://gaim.sourceforge.net/"]
bo has joined #ocaml
bo has quit [Client Quit]
bo has joined #ocaml
coumbes has quit ["Leaving"]
binary42 has quit [Read error: 104 (Connection reset by peer)]
Schmurtz has joined #ocaml
mikeX has joined #ocaml
Smerdyakov has joined #ocaml
Quinthius has quit ["Leaving"]
Quinthius has joined #ocaml
Schmurtz has quit ["Dodo !"]
Smerdyakov has quit ["Leaving"]
Boojum has joined #ocaml
bzzbzz has quit [Read error: 110 (Connection timed out)]
bzzbzz has joined #ocaml
Snark has quit [Read error: 110 (Connection timed out)]
bo has quit ["Leaving"]
Demitar has quit [Remote closed the connection]
kig has joined #ocaml
Schmurtz has joined #ocaml
_JusSx_ has joined #ocaml
Schmurtz has quit ["Dodo !"]
Schmurtz has joined #ocaml
Smerdyakov has joined #ocaml
Smerdyakov has quit ["Leaving"]
Boojum has quit [Read error: 110 (Connection timed out)]
mauke has joined #ocaml
mikeX has quit ["leaving"]
Snark has joined #ocaml
<_JusSx_> hi ocaml ppl
<ketty> hello
_shawn has quit [Read error: 110 (Connection timed out)]
_shawn has joined #ocaml
Smerdyakov has joined #ocaml
mauke_ has joined #ocaml
zmdkrbou has joined #ocaml
Snark has quit ["Leaving"]
Smerdyakov has quit ["Leaving"]
mauke_ has quit ["Lost terminal"]
mauke has quit [Read error: 110 (Connection timed out)]
mauke has joined #ocaml
cmeme has quit [Remote closed the connection]
desc is now known as descender
cmeme has joined #ocaml
slipstream-- has joined #ocaml
<ketty> hmm...
<ketty> when i do: module A : sig type t val v : t end = struct let v = 5 end;;
<ketty> i get signature mismatch
<ketty> can i specify that v is t without spelling out t ?
<mauke> what is t?
<ketty> an abstract type
<mauke> oh, you want it to automatically define t based on the inferenced type of v?
<ketty> yes :)
<mauke> I don't think you can do that
<ketty> to bad :(
<ketty> would be very usefull with more complex types..
<ketty> and with private types...
<ketty> *sob*
<pango> more than one signature can be used on a single implementation, etc. So that would only work in some simple cases...
<ketty> hmm..
<ketty> ok, another question: why do class types and normal types behave differently?
<pango> haven't used OO yet
slipstream has quit [Read error: 110 (Connection timed out)]
<ketty> i dont think class types can contain any implementation..
<ketty> so i dont see why they should be different from object types...
<pango> object types are classes, no ? even when they're anonymous
<pango> classes aren't class types
dark_light has quit [Read error: 110 (Connection timed out)]
<ketty> object types are : < bla : int >
<ketty> they are just normal types
<ketty> while classes arent normal types
<pango> I don't know then... again I'll see when I need OO
<ketty> i can write: type t = < bla : int >
<ketty> and it is not the same as: class type t = object method bla : int end
<ketty> i can do: let o : #t = object method bla = 5 method ble = () end
<ketty> only if t is a class type
mikeX has joined #ocaml
mikeX has quit ["leaving"]
kmag is now known as kmag|nysc
_JusSx_ has quit [Read error: 104 (Connection reset by peer)]
Schmurtz has quit ["Plouf !"]
smimou has joined #ocaml
mikeX has joined #ocaml
ski has quit [Read error: 110 (Connection timed out)]
ski has joined #ocaml
kmag|nysc is now known as kmag
Revision17 has joined #ocaml
Smerdyakov has joined #ocaml