Banana changed the topic of #ocaml to: OCaml 3.08 "Bastille Day" Release available ! -- Archive of Caml Weekly News: http://pauillac.inria.fr/~aschmitt/cwn , A tutorial: http://merjis.com/richj/computers/ocaml/tutorial/ , A free book: http://cristal.inria.fr/~remy/cours/appsem, Mailing List (best ml ever for any computer language): http://caml.inria.fr/bin/wilma/caml-list
bitwiseshiftleft has joined #ocaml
cjohnson has joined #ocaml
skylan has quit ["bbiab"]
yauz_ has joined #ocaml
cjohnson has quit [Read error: 110 (Connection timed out)]
cjohnson has joined #ocaml
yauz has quit [Read error: 110 (Connection timed out)]
cjohnson has quit [Read error: 104 (Connection reset by peer)]
cjohnson has joined #ocaml
debona|r has joined #ocaml
jdrake has joined #ocaml
mrsolo has joined #ocaml
cjohnson has quit [Connection timed out]
weitzman has joined #ocaml
vezenchio has quit ["With little power comes little responsibility"]
cjohnson has joined #ocaml
jdrake has quit [Read error: 110 (Connection timed out)]
jdrake has joined #ocaml
whee has quit []
Dvalin has joined #ocaml
<Dvalin> hmm
<Dvalin> is there known showstoppers about ocaml on sparc?
bitwiseshiftleft has quit ["bedtime"]
Herrchen_ has joined #ocaml
<mrsolo> is there? i want to know too
skylan has joined #ocaml
Herrchen has quit [Read error: 60 (Operation timed out)]
<mrsolo> yikes
<mrsolo> building native code i assume?
<jdrake> what would be the best thing to use to output pictures, but being able to do graphical operations on them (lines, fonts, blitting, etc)
durnew has joined #ocaml
GreyLensman has quit ["Leaving"]
Research has joined #ocaml
monotonom has quit ["Don't talk to those who talk to themselves."]
<mflux> hmh.. it's funny you can write type t = List (int * t list) but not type t = (int * t list);;
yauz_ is now known as yauz
jdrake has quit [Read error: 60 (Operation timed out)]
sproctor has quit [Read error: 110 (Connection timed out)]
debona|r has left #ocaml []
_fab has joined #ocaml
weitzman has quit [Read error: 60 (Operation timed out)]
Research has quit [Remote closed the connection]
Reasarx has joined #ocaml
Herrchen_ is now known as Herrchen
cjohnson has quit [Read error: 110 (Connection timed out)]
cjohnson has joined #ocaml
kinners has joined #ocaml
bk_ has joined #ocaml
cjohnson has quit [Read error: 110 (Connection timed out)]
cjohnson has joined #ocaml
det has quit [niven.freenode.net irc.freenode.net]
Reasarx has quit [niven.freenode.net irc.freenode.net]
durnew has quit [niven.freenode.net irc.freenode.net]
kosmikus|away has quit [niven.freenode.net irc.freenode.net]
Lemmih has quit [niven.freenode.net irc.freenode.net]
Reasarx has joined #ocaml
durnew has joined #ocaml
det has joined #ocaml
kosmikus|away has joined #ocaml
Lemmih has joined #ocaml
ita has joined #ocaml
<ita> hi all
kinners_ has joined #ocaml
mrsolo has quit [Read error: 113 (No route to host)]
<slashvar[ens]> yop
Submarine has joined #ocaml
kinners has quit [Read error: 110 (Connection timed out)]
kinners_ has quit [Read error: 60 (Operation timed out)]
aum has joined #ocaml
cjohnson has quit [Read error: 110 (Connection timed out)]
Smerdyakov has quit [niven.freenode.net irc.freenode.net]
Smerdyakov has joined #ocaml
Demitar has quit [Read error: 104 (Connection reset by peer)]
demitar_ has joined #ocaml
cjohnson has joined #ocaml
smimou has joined #ocaml
<ita> there is something wrong in the facile lib
* ita bangs his head against the table
* cDlm bangs the table on ita's head
<ita> i need an ocaml debugger tutorial
vezenchio has joined #ocaml
srv has quit [Read error: 104 (Connection reset by peer)]
<ita> yeehah, i managed to find the bug
sproctor has joined #ocaml
antonym has joined #ocaml
<cDlm> you need a new table now.
srv has joined #ocaml
cjohnson has quit [Connection timed out]
cjohnson has joined #ocaml
Reasarx has quit [Read error: 54 (Connection reset by peer)]
<ita> cDlm: not at all :)
<ita> just a new keyboard
<cDlm> :)
cjohnson has quit [Read error: 110 (Connection timed out)]
cjohnson has joined #ocaml
GreyLensman has joined #ocaml
srv has quit [Read error: 104 (Connection reset by peer)]
srv has joined #ocaml
weitzman has joined #ocaml
srv has quit [Read error: 104 (Connection reset by peer)]
antonym has left #ocaml []
weitzman has quit [Read error: 60 (Operation timed out)]
weitzman has joined #ocaml
bzzbzz has joined #ocaml
cjohnson has quit [Connection timed out]
cjohnson has joined #ocaml
Submarine has left #ocaml []
ita has quit [Read error: 54 (Connection reset by peer)]
cjohnson has quit [Connection timed out]
cjohnson has joined #ocaml
_xtree has joined #ocaml
_xtree has left #ocaml []
bk_ has quit ["Leaving IRC - dircproxy 1.1.0"]
cjohnson has quit [Connection timed out]
cjohnson has joined #ocaml
whee has joined #ocaml
<Dvalin> anyone using ocaml on sparc here?
* Smerdyakov sees weitzman's CMU hostname.
cjohnson has quit [Connection timed out]
cjohnson has joined #ocaml
maihem has joined #ocaml
weitzman has quit [Read error: 60 (Operation timed out)]
srv has joined #ocaml
ionOS has joined #ocaml
cjohnson has quit [Connection timed out]
cjohnson has joined #ocaml
weitzman has joined #ocaml
* Smerdyakov waves to weitzman.
CosmicRay has joined #ocaml
demitar_ is now known as Demitar
<weitzman> Hello
<Smerdyakov> weitzman, I'm a recent CMU graduate.
cjohnson has quit [Connection timed out]
cjohnson has joined #ocaml
jason has quit [Remote closed the connection]
<weitzman> I'm a recent CMU freshman, and a very soon CMU sophomore
<weitzman> Nice place
<Smerdyakov> Sure. How do you see your entering class? Mine wasn't very impressive.
jason has joined #ocaml
jason has quit [Remote closed the connection]
jason__ has joined #ocaml
whee has quit [Remote closed the connection]
whee has joined #ocaml
<weitzman> There are some very, very bright folks
<Smerdyakov> Maybe 10% max of my class fit that description.
<weitzman> Plus a few who have no place doing CS, most of whom probably transferred out already
<Smerdyakov> CMU advertising led me to believe it would be 100%.
<ronwalf> It all depends on your reference point :)
<Smerdyakov> You can't fault a high school kid for using his experiences as a reference point
<weitzman> CMU seems to make a big effort to attract diversity
<weitzman> Which I think they put ahead of numbers
<Smerdyakov> weitzman, what do you mean by "numbers"?
<weitzman> I can't comment on the MIT student body, but I didn't even apply there. I wouldn't have stood a snowball's chance in hell
<weitzman> I wasn't a straight A student
<weitzman> And MIT doesn't want to take risks on me
<Smerdyakov> I was a straight A student, and MIT didn't want to take a risk on me, apparently. :)
<weitzman> I was fortunate enough to be interview by a CMU alumn who was a programmer
<Smerdyakov> (I interpret this more as a risk that I wouldn't become a wealthy CEO and donate a lot of money to them.)
<weitzman> And I'm sure he was able to tell that I had a good background in software and not just some random AP course
<Smerdyakov> Mm. I was interviewed by a chemical engineer.
<weitzman> But I also did a lot of music and fencing and random stuff
* Smerdyakov realizes that now he might be able to volunteer to be a CMU interviewer.
<weitzman> So I managed to get in because I wasn't just another robot, but I was qualified nonetheless
<Smerdyakov> weitzman, I saw your resume' on your Andrew site.
<weitzman> Sometimes people may misjudge qualification, though
<Smerdyakov> weitzman, I wish they'd admit more people with resume's like that. :)
<weitzman> Hmm. What was good about it?
<weitzman> Empty?
<weitzman> I should put my current job on, actually
<GreyLensman> you want a competitive class. Something like 20% of my class were Valedictorian, ave SAT around 1700, and just about 100% Nat. Merit Sch. winners.
<Smerdyakov> No. You talk about programming skills instead of extracurricular bullshit. (Mostly)
<Smerdyakov> GreyLensman, this is true of CMU CS majors as well.
<weitzman> Ah, yeah. I try to avoid bullshit as a general rule. It's worked out so far
<GreyLensman> I'm talking the entire student body.
<Smerdyakov> weitzman, I see you've taken 212. Have you been converted? :)
<weitzman> I like a lot of things about SML
<weitzman> Which is why I'm here right now ;)
<weitzman> Ocaml has some odd syntax stuff going on
<Smerdyakov> There is #sml, also.
<weitzman> I wish they'd just settle on one way to declare a function, for example
<Smerdyakov> SML doesn't settle on that, either.
<weitzman> Generally people use fun for named functions and fn for lambdas
<weitzman> None of this "function" madness
<weitzman> SML's lack of debugging makes it unusable, though
<Smerdyakov> It's not unusable for me...
<Smerdyakov> In functional languages, you generally test functions instead of whole programs when needed.
<weitzman> If something goes wrong somewhere, there's no stack trace
<weitzman> No stack, granted, but no trace
<weitzman> It's anybody's guess how it happened
<weitzman> If you were submitted a bug report on an open source SML project, what data could you provide that would help them understand the problem?
<weitzman> *submitting
ionOS has quit [Remote closed the connection]
<Smerdyakov> Function that doesn't work and inputs on which it doesn't work.
<weitzman> That's assuming that bugs are all localized
<weitzman> I write a lot of concurrent stuff
<weitzman> Where bugs are often the result of interactions
<weitzman> Concurrent ML is pretty interesting, actually
<mflux> I suppose concurrent programming and functional languages aren't a match made in heaven ;)
<Smerdyakov> It is The Man.
<Smerdyakov> mflux, ha! I see you've never used CML!
<mflux> and you'd see right
<Smerdyakov> See the Event module in the OCaml thread library.
<mflux> infact the only other functional language I've been semiserious on before ocaml was lisp, and I introduced myself to ocaml 1.5 weeks ago
<Smerdyakov> Event is an OCaml CML port.
<weitzman> Ah, I didn't realize there was one
<weitzman> I'll have to check it out
<mflux> but how do you describe concurrency as functions, assuming you don't use clear synchronization and thread instantiation primitives
<Smerdyakov> weitzman, your resume goes on and on about OOP. Are you still an OO fan?
<weitzman> And definately still an OO fan
<Smerdyakov> mflux, it's not pure functional. It's "functional" like ML is "functional."
<Smerdyakov> mflux, it's very supportive of the compositional reasoning you expect from other parts of ML, for instance.
<mflux> something such as foo (bar ()) (baz ()) could be interpreted as foo getting the return values of bar and baz which could both be evaluated in parallel, and even foo could be running in parallel with the generation of the arguments
<Smerdyakov> mflux, CML is not implicitly parallel. It is a libary for SML or OCaml.
<Smerdyakov> weitzman, so you would choose classes instead of modules and first-class functions as the main building blocks of a software design?
<weitzman> If I had to write any large project today, I would definatley do it using Java and thus objects, since Java development tools are lightyears ahead of the competition
<weitzman> Objects are easy to change
<Smerdyakov> Is it the tools or an inherent advantage of Java that you see?
<weitzman> It's not the language Java, really
<weitzman> The Java platform has a lot of good stuff
<weitzman> But the tools are what make the magic
<Smerdyakov> It seems to me like the tools for Java solve problems that mostly aren't present with ML.
<weitzman> Software in ML doesn't need to change, you say?
<Smerdyakov> Be more specific and we can talk.
<weitzman> Functions never need to take different numbers or kinds of arguments?
<weitzman> You never need to be able to cross reference all usages, or implementations instantly?
<Smerdyakov> Different numbers and kinds of arguments: Right, you can usually avoid this.
<weitzman> You never want to rename something in a second and have confidence you couldn't possibly have broken anything?
<Smerdyakov> Cross referencing: This is rather trivial to implement.
<Smerdyakov> ML provides _much_ better support for making sure you don't break things after changing interfaces.
<weitzman> I don't care what the *language* does
<weitzman> The language is a tool
<weitzman> My *IDE* does it
<Smerdyakov> So then consider the ML type system itself a tool that is better than the extra tools your IDE provides.
<weitzman> Have you ever used Eclipse or IntelliJ IDEA on any project of a thousand lines or more?
<Smerdyakov> No.
<weitzman> Have you seen them, at least?
<Smerdyakov> Briefly
<weitzman> They make code management ridiculously easy
<weitzman> Disgustingly easy
<Smerdyakov> How do they provide better a-change-breaks-something testing than an ML type checker?
<weitzman> It's not about the change breaking something or not
<weitzman> I don't make the change
<weitzman> My IDE does
<weitzman> It's about my time
<Smerdyakov> OK, so you are talking about automatic refactoring?
<GreyLensman> Smerdyakov, weitzman is very much dead on. The toolsets are light years better and definite impact on the development process in the Java world.
<Smerdyakov> GreyLensman, I would guess that ML still comes out ahead with today's tools, though.
<weitzman> Yes, but there's a lot more in the editor than just refactoring (although I can't imagine life without automated refactoring anymore)
<weitzman> I can look up full documentation in a keystroke and send it away in another
<weitzman> If my code doesn't compile, I know before I try to compile it
<weitzman> The editor might fix it for me
<Smerdyakov> In Java, you need English documentation. In ML, types are usually enough!
<cDlm> hmm
<weitzman> Types don't tell you what software *does*
<Smerdyakov> They usually tell you enough of what you want in most instances when you would consult documentation.
<mflux> types? like you have function int -> int -> int -> int and you immediately know what it does?-)
<cDlm> codesense on ML would be easier than on java
<Smerdyakov> mflux, no. In that case, you at least know immediately how to call it.
<GreyLensman> I prefer the ML language over Java (though 1.5 is getting there) . The fact that infrastructure/tool env. around Java is as good as it gets and getting better is a fact that one must take into account in selecting a language for a project.
<Smerdyakov> mflux, since ML has a richer type system than Java, you can encode _more_ information on how to call a function with just the type.
<Riastradh> Smerdyakov, type information still does _not_ convey semantics.
<cDlm> there are labels in ocaml :)
<Smerdyakov> Riastradh, deep semantics is an uncommon subject for consulting documentation. We optimize for the common case.
<Smerdyakov> And things considered "semantics" in Scheme are type-based in ML.
<weitzman> Recently I was trying to make some changes to an ItelliJ IDEA plugin and it was very annoying because the plugin API has interfaces without documentation. I wanted to know some simple semantics
<Riastradh> So, tell me, what does a function 'f : a -> int -> (a -> a) -> a' do?
<Smerdyakov> Like "the function returns #f on error" becomes "the return type is something option."
<weitzman> Example: Does this code need to be run in the Event Dispatch thread?
<mflux> hmm.. -> a'.. interesting
<weitzman> The type didn't tell me that
<weitzman> I got runtime errors on some code, and not in other code
<Riastradh> ...er, s/a/'a/g
<mflux> oh, it was a type, never mind ;)
<Smerdyakov> Riastradh, knowing what I know about the way ML programmers think, that is almost certainly repeated application of a function.
<Riastradh> Smerdyakov, fine, how about f : 'a -> int -> (int -> 'a -> 'a) -> 'a?
<cDlm> fold_left and fold_right
<Smerdyakov> Riastradh, probably like what I said last, but the function also gets the 0-indexed stage in the iteration as a parameter.
<weitzman> Idea is closed source, which prevented my from investigating of course, but I can view the source code of, say, the J2SE libraries in a keystroke if I'm curious what exactly they do
<Smerdyakov> weitzman, again, that kind of documentation consultation is relatively rare./
<Riastradh> Smerdyakov, not necessarily. The argument to the function might be the descending integers. Or the square of the integers.
<Smerdyakov> Riastradh, again, knowing what I know about the way ML programmers think, I would posit my answer as the most likely.
<weitzman> Perhaps SML programmers don't write GUI's using Model-View-Controller toolkits
<weitzman> But then, what *do* they write GUI's with?
<Smerdyakov> Riastradh, it also corresponds with standard definitions of primitive recursion in mathematical logic.
<Riastradh> ???
<Smerdyakov> Riastradh, do you know what primitive recursion is?
<Smerdyakov> weitzman, smlTk?
<Smerdyakov> weitzman, eXene?
<Riastradh> I have no idea how it is relevant to this function.
<Smerdyakov> Riastradh, my guess is that the function implements primitive recursion.
<Riastradh> Smerdyakov, you have to guess, and you can't be certain.
pac_away has joined #ocaml
<cDlm> and recursion is rather common in functional style :)
<Riastradh> Are you now going to complain that this is yet another obscure example that you don't happen to like?
<Smerdyakov> Riastradh, I can be almost certain, and the type gives me almost all the information I'm likely to need. Any natural language documentation can then be skimmed to good result.
<Riastradh> Did you just admit that you need to read documentation?
<Smerdyakov> I've been saying all along that in uncommon cases you need to read natural language documentation.
<Smerdyakov> The first use of any function is an uncommon case.
<Riastradh> Ah, so this _is_ an 'uncommon' case that you just don't like.
<Smerdyakov> I don't know about this "don't like" business, but it certainly is uncommon.
<Riastradh> OK, let me try a much more common example: Hashtbl.remove : ('a, 'b) Hashtbl.t -> 'a -> unit
<Smerdyakov> And I'm pretty sure that my original interpretation would be correct. I could just try it and see.
<Riastradh> What does this function do?
<weitzman> Both eXene and sml_tk seem to be small toolkits without much in the way of documentation
<Smerdyakov> weitzman, the signatures with the comments in them should give you all the documentation needed.
<weitzman> I'm not worried about how they work, but what they can do
<Riastradh> Documentation does _not_ consist purely of reference manuals that describe individual functions.
<Smerdyakov> Riastradh, removes a mapping from a hash table.
<Smerdyakov> weitzman, right. That's why I said signatures only.
<Riastradh> Smerdyakov, what happens if the mapping isn't there?
<Riastradh> What happens if there is more than one mapping?
<weitzman> I don't see any mention of separating a model from a view.
<Smerdyakov> Riastradh, those are both uncommon cases. I don't need to worry about them if I guarantee that they are never encountered.
<Smerdyakov> weitzman, that concept is probably not involved.
<weitzman> I don't want to have to implement my own separation just to allow spearate evolution of the data and presentation
<weitzman> It's already implemented for me in Swing!
<Smerdyakov> weitzman, I'm not familiar enough with the idea to suggest ways to do it in ML.
<Riastradh> Smerdyakov, you're just randomly condemning every example I throw at you as being 'uncommon.'
<Smerdyakov> Riastradh, try surveying uses of these functions in real code and see if I'm wrong.
<Riastradh> There obviously _is_ utility in hash tables supporting multiple mappings, or else that feature wouldn't be retained.
<Smerdyakov> Sure, but that is not taken advantage of by most uses.
<Smerdyakov> I know _I've_ never used it!
<weitzman> Smerdyakov: Model-view-controller is the practice of having all GUI objects display information pertaining to a "model". You can register listeners with the model to detect when information changes and update the GUI accordingly
<weitzman> As data changes
<Riastradh> Great. _ONE_ ML programmer, who tends to use SML a considerable deal more than OCaml, as far as I know, doesn't use a particular feature of the Hashtbl module.
<Smerdyakov> Riastradh, do you have data that suggest I'm wrong?
<Riastradh> Do _YOU_ have data to suggest that you're right? I have the knowledge that it is implemented in a very commonly used module.
<Smerdyakov> I have the implicit knowledge I have picked up through lots of ML programming.
<Smerdyakov> weitzman, somehow that sounds inherently imperative.
<GreyLensman> There is nothing in the the MVC paradigm which precludes its application via a (mostly) functional language.
<Riastradh> Does List.iter iterate left-to-right, right-to-left, or in some other, possibly unspecified, order over a list? Its type, by the way, is: iter : ('a -> unit) -> 'a list -> unit
<weitzman> Smerdyakov: Yeah, I'd say so
<weitzman> Smerdyakov: But I don't see a non-imperative solution to the problem
<weitzman> Actually I sorta do
<weitzman> If don't mind small use of references
<weitzman> But, use nonetheless
<weitzman> So I don't, I guess
<Smerdyakov> "Adaptive functional programming" might do it. http://www-2.cs.cmu.edu/~umut/papers/
<jason__> Yeah, it would be interesting to find out how design patterns work in purely functional languages.
<jason__> How to express them.
<jason__> They've done a lot of work finding out what patterns exist in the object oriented paradigm.
<Riastradh> What are the last two arguments to Filename.open_temp_file used for, Smerdyakov?
<Smerdyakov> Riastradh, what's the type?
<Riastradh> open_temp_file : ?mode:open_flag list -> string -> string -> string * out_channel
<Smerdyakov> jason__, my view is that, when someone applies design patterns to a language, it's a sign that the language isn't expressive enough.
<jason__> Filename + filedescriptor.
<Smerdyakov> Riastradh, beats me. It's a badly designed signature. :)
<jason__> Probably a type somewhere defined that is (string * out_channel)
<Riastradh> Smerdyakov, how about you answer my question regarding List.iter?
<GreyLensman> sig/functor idiom in SML *is* a design pattern. All languages got 'em.
<Smerdyakov> Riastradh, ah, you didn't use my name, so it wasn't highlighted and I missed it. :)
<jason__> Smerdyakov: .. If it isn't expressive enough to express these organised structures, that is a problem of the language, yes.
<Smerdyakov> I think List.iter goes left-to-right for efficiency reasons.
<jason__> Design patterns exist outside the realm of languages, and more in the realm of data organisation.
<Riastradh> Smerdyakov, you _think_? Are you certain, without checking the manual?
<Smerdyakov> jason__, design patterns are meta-constructs that aren't entities in the language itself. If such patterns are useful, they should be expressable directly in the language.
<Smerdyakov> Riastradh, pretty certain. I recall it working that way in the past. :)
<jason__> Smerdyakov: A language that is general enough wouldn't have to express them directly.
<Riastradh> Smerdyakov, without prior knowledge from the manual, could you be certain you know?
<Smerdyakov> Riastradh, very close to certain, knowing what I do about how ML is implemented re: efficiency concerns.
<Smerdyakov> jason__, great, then we agree: design patterns are bunk. :)
<jason__> Especially since not all patterns are known or understood yet. It's like any feature of any language.
<Riastradh> Smerdyakov, how abut Buffer.sub : Buffer.t -> int -> int -> string? What are the last two arguments used for, aside from the general 'they specify a range?'
<Smerdyakov> Riastradh, I don't know. Poorly typed function. You can stop now.
<jason__> No, it would express them as an extension of that language, rather than being built directly into it's semantics.
durnew has quit [Read error: 60 (Operation timed out)]
<Smerdyakov> jason__, that's what I meant, if I understand you. Design patterns, if useful, should somehow be first-class user definable entities.
<jason__> Right.
<jason__> I wasn't saying build them into the language.
<cDlm> they can't
<jason__> I was saying find out where they are at using the language.
<Riastradh> Smerdyakov, so, let's see: your responses have been: I can surmise that f repeatedly applies a function to ascending integers (uncertain), don't like the Hashtbl.remove semantics for cases I don't like ('uncommon'), I happen to know from prior knowledge, and I don't like it.
<jason__> Ocaml has a lot of interesting new language constructs, there may be design patterns possible in Ocaml that are not possible using only the object oriented paradigm.
<Riastradh> (the last two were List.iter and Buffer.sub)
<Smerdyakov> jason__, and I'm saying that it is inappropriate for "design patterns" and "higher-order functions" to be separate things.
<cDlm> because you will implement a given pattern differently given different needs
<Riastradh> It seems that either you knew the semantics beforehand, you didn't care about certain semantics, or you don't like the example. _None_ of this had _anything_ to do with the type signatures.
<jason__> Oh they aren't, they have a "is a" relationship./
<jason__> Higher order functions are definitely a design pattern.
<Smerdyakov> And I'm saying that an appropriately expressive language allows the ideas to be merged.
<jason__> Exactly, rather than internaly expressed.
<Smerdyakov> So you can have things like functions that take design patterns as arguments
<jason__> Certain constructs are neccessary to spur different patterns though. It is difficult to express the functionality of higher order functions from other things.
<jason__> Smalltalk tries to represent higher order functions as objects.
<jason__> So, they're technically an extension of the language, rather than built into the language.
<jason__> I'm really not sure if functions are objects..
<jason__> They're more like recipes on the use of objects.
<jason__> Representing them as objects is kind of akward.
<jason__> Having built in support for the base design patterns that produce all other patterns is a good thing.
monotonom has joined #ocaml
durnew has joined #ocaml
<jason__> Currying for instance is a design pattern that is next to impossible using function definitions as objects.
<jason__> Maybe.. Hm.
<mflux> in ocaml, isn't currying mostly syntax candy?
<jason__> Useful syntax candy :p
<monotonom> semantic candy
<Smerdyakov> I don't know that currying itself is syntactic sugar. OCaml has some features to let you express currying more succinctly.
<mflux> you could for instance always rewrite List.fold_left ( + ) 0 [1; 2] as List.fold_left ( fun x y -> ( + ) x y ) 0 [1; 2]; ?
<mflux> so whenever you supply too few parameters to a function, you can wrap the extra functions with a new function definition
<jason__> You can easily simplify a very complicated function into a version with default values.
<mflux> I didn't say it wasn't useful ;)
<jason__> Right :p
<mflux> although if you happen to need to override a default in the last parameter it isn't that useful anymore
<mflux> unless you use named parameters
<jason__> There are probably lots of doors open through its existence.
<jason__> Can you curry arguments out of order?
<jason__> Like func x, y, z
<jason__> Somehow curry the values of y and z, but not x?
<mflux> I believe you cannot, but the same effect can be expressed with that rewriting
<jason__> Right.
<jason__> That would be useful.
<mflux> you could write a function such as let swapargs f x y = f y x;;
<cDlm> it is possible using named args
<mflux> and then for example let foo = swapargs ( - ) 42;;
<mflux> but that isn't very extensible
<mflux> or easy to read ;)
<cDlm> # let f ~x ~y ~z = x+y+z;;
<cDlm> val f : x:int -> y:int -> z:int -> int = <fun>
<cDlm> # f ~y:42;;
<cDlm> - : x:int -> z:int -> int = <fun>
<jason__> Hm.
<jason__> So what does the ~ syntax mean?
<jason__> Like "symbol"?
<monotonom> named parameters
cjohnson has quit [niven.freenode.net irc.freenode.net]
_fab has quit [niven.freenode.net irc.freenode.net]
<Demitar> What are the primary ocaml build tools lately? Should I perhaps write up my spec and send it to the ML?
mattam_ has joined #ocaml
mattam has quit [Read error: 110 (Connection timed out)]
whee has quit []
pac_away has left #ocaml []
MacCall has joined #ocaml
<MacCall> hello
<MacCall> have you ever installed cash ?
malc_ has joined #ocaml
<Demitar> MacCall, who are you asking? :) And I assume that's not the question you really want answered anyway. :)
<MacCall> Demitar: yes :p
<MacCall> i ask because i can't compile it
<MacCall> and i don't know why :/
<Demitar> What are you running?
<Demitar> And what is the error?
<MacCall> Demitar: the error ? can i paste it here ?
cjohnson has joined #ocaml
_fab has joined #ocaml
<Demitar> Is that CVS cash?
CosmicRay has quit ["Client exiting"]
bzzbzz has quit ["[BX] Reserve your copy of gtkBitchX-1.1-final for Windows CE today!"]
<MacCall> yes
<MacCall> the cvs version
<MacCall> but i have an other error with le dl version
smimou has quit ["?"]
<Demitar> If you just want to use it I'd use the tarball or even better, you might have a packaged version. (Perhaps there even is a godi version.)
<MacCall> Demitar: there is not binary package avaliable
<MacCall> Demitar: and the src tarball doesn't compie
<Demitar> What distribution are you using?
<MacCall> gentoo
<Demitar> No ebuild?
<MacCall> no
<Demitar> Are you sure you have all dependencies installed?
<MacCall> yes
<MacCall> the ./configure passed with no error
<Demitar> That's no guarantee. :) But it's probably fine. In any case you want to find that string13.ml(i)
<gim> MacCall: I had problems also when i tried
<MacCall> gim: and did you find a solution ?
<gim> no, cowardly abbandoned sorry
<Demitar> What's the problem when compiling the tarball?
<MacCall> gim: and your debugging team ? :p
<gim> lol
<MacCall> /usr/bin/ocamlc.opt -warn-error A -g -pp "/usr/bin/camlp4r -I ." -I /home/seth/downloads/cash-0.20/CVS/ocaml-3.07 -I /home/seth/downloads/cash-0.20/CVS/ocaml-3.07/utils -I /usr/lib/ocaml/caml -I . -I /usr/lib/ocaml/site-packages/pcre -I /usr/lib/ocaml/camlp4 -c set_dir.ml
<MacCall> File "set_dir.ml", line 17, characters 2-22:
<MacCall> Unbound value Clflags.include_dirs
<MacCall> make: *** [set_dir.cmo] Error 2
<Demitar> Why is there a CVS dir in there?
<MacCall> Demitar: wait a minute
<MacCall> /usr/bin/ocamlc.opt -warn-error A -g -pp "/usr/bin/camlp4r -I ." -I /home/seth/downloads/ocaml-3.07 -I /home/seth/downloads/ocaml-3.07/utils -I /usr/lib/ocaml/caml -I . -I /usr/lib/ocaml/site-packages/pcre -I /usr/lib/ocaml/camlp4 -c set_dir.ml
<MacCall> File "set_dir.ml", line 17, characters 2-22:
<MacCall> Unbound value Clflags.include_dirs
<MacCall> make: *** [set_dir.cmo] Error 2
<MacCall> this is with the cash's tarball & the binary ocaml'sources i use
<Demitar> What OCaml version?
<Riastradh> 3.07, presumably.
<MacCall> Objective Caml version 3.07+2
<Demitar> Riastradh, do you have any more enlightened input than my random thoughts?
* Demitar never uses cash himself anyway.
<Riastradh> No. I never saw the point of Cash; I use scsh.
* Demitar comfortably mixes bash, python and ocaml apps instead.
* Riastradh comfortably uses zsh for interactive shell operation and Scheme for everything else.
<Demitar> Should I bother to actually learn zsh?
cjohnson has quit [Connection timed out]
<Riastradh> If you can use bash, you'll be able to use zsh quite easily.
cjohnson has joined #ocaml
<Demitar> Has it more efficient syntax than the bash constructs? (bash can get quite verbose easily.)
<Riastradh> It's kind of hard to answer that in general.
malc_ has left #ocaml []
<Demitar> Well I guess I'll simply have to read up a bit on it.
durnew has quit [Remote closed the connection]
jdrake has joined #ocaml
monotonom has quit ["Don't talk to those who talk to themselves."]
weitzman has quit [Read error: 60 (Operation timed out)]
weitzman has joined #ocaml
karryall has quit ["tcho"]
menace has joined #ocaml
lus|wats has joined #ocaml
aum has quit [Connection reset by peer]
vezenchio has quit [Read error: 60 (Operation timed out)]
lus|wats is now known as vezenchio
lmbdwr has quit ["Leaving"]