Banana changed the topic of #ocaml to: OCaml 3.08.1 available! | Archive of Caml Weekly News: http://sardes.inrialpes.fr/~aschmitt/cwn/ | A tutorial: http://merjis.com/richj/computers/ocaml/tutorial/ | 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/
mrvn has joined #ocaml
gim_ has joined #ocaml
gim has quit [Read error: 113 (No route to host)]
xerox has quit [Read error: 110 (Connection timed out)]
gim_ is now known as gim
* vincenz curses
wreel has joined #ocaml
mrvn_ has quit [Read error: 110 (Connection timed out)]
xerox has joined #ocaml
pflanze has joined #ocaml
<pflanze> Hello. Can you recommend a wiki in ocaml?
<Demitar> pflanze, what are you asking exactly?
<pflanze> I'm looking for a wiki which is written in OCaml.
<pflanze> if it's good enough for basic usage: some formatting, version handling.
<Demitar> Check the humps. http://caml.inria.fr/humps/ (There is one, just want to make sure you learn how to find caml software. :)
<wreel> Did the english version of "Developing Applications With Objective Caml" ever come out.
<wreel> ?
<Demitar> I think the silence says: "Noone awake has more clue than you do." :)
<wreel> ahh..
<wreel> So, who would be awake?
* Riastradh snores.
<wreel> Cute.
<xerox> what's the name of the thing that not permits runtime errors
<xerox> over.. ?
<monochrom> over-pedantic? :D
<monochrom> I never thought it needed a name.
<xerox> mmh, i don't remember
<xerox> how is referred to usually? how is it called
<Demitar> On the theoretical note: Nothing can even not permit runtime errors.
<monochrom> Two kinds of things need no names. Things so ridiculous you'd never consider having. Things so paramount you'd never consider omitting. Your thing is in the latter category.
<Demitar> s/even/ever/
<xerox> ok ok.
<monochrom> maybe "perfection" :D
<xerox> haha
<xerox> goodnight :)
<wreel> So is Ocaml not very good with native "types" or is there something I'm missing?
<Riastradh> What do you mean by 'good with native "types?"'
<wreel> Data types usually used from C and it's ilk. Shorts, unsigned ints, etc...
<wreel> Erlang has some candygrammer to handle particular integer types. I was looking for the same in Caml.
<vincenz> erlang only has candygrammar to read the ints in
<vincenz> nothing that should be too hard with int32's and readbyte
<wreel> Thanks :) I'll look into that.
<vincenz> if you want performance
<vincenz> and are sure that your numbers are limited to 31 signed ints
<vincenz> use plain ints
<wreel> Those are the only unboxed types in Ocaml, right?
<Demitar> Those and float arrays. :)
<wreel> Oh, okay. I just want to learn Ocaml and my learning application is going to be a dependency tool.
<vincenz> what sort of dependencies?
<wreel> Between different components in a development environment. It's a weird proprietary system where all the components are in a main config file.
<wreel> They're represented by different records that are just basically C-structs with record delimiter structures.
<vincenz> who in here had questions about CIL?
gim_ has joined #ocaml
cmeme has quit [Broken pipe]
cmeme has joined #ocaml
gim has quit [Read error: 110 (Connection timed out)]
<Smerdyakov> Did you cats know about this stuf? http://mlton.org/Printf
<Smerdyakov> It's a Printf implementation in SML, with no special compiler support.
gim__ has joined #ocaml
gim_ has quit [Read error: 110 (Connection timed out)]
mfurr has joined #ocaml
gim__ has quit [Read error: 113 (No route to host)]
Submarine has joined #ocaml
<vincenz> hmm
GreyLensman has joined #ocaml
mfurr has quit ["Client exiting"]
mfurr has joined #ocaml
wreel has quit ["Leaving"]
GreyLensman has quit ["Leaving"]
mfurr has quit ["Leaving"]
Submarine has quit ["Leaving"]
kinners has joined #ocaml
Hanji has quit ["Sleep > Me"]
monochrom has quit ["hello"]
awwaiid has quit [Read error: 113 (No route to host)]
mlh has quit [Client Quit]
kinners has quit [Read error: 110 (Connection timed out)]
vezenchio has joined #ocaml
Submarine has joined #ocaml
pango has quit ["Client exiting"]
Nutssh has left #ocaml []
pango has joined #ocaml
Nutssh has joined #ocaml
mrsolo_ has quit ["Leaving"]
mattam has quit [Read error: 110 (Connection timed out)]
pflanze has quit [Read error: 110 (Connection timed out)]
mlh has joined #ocaml
karryall has joined #ocaml
kinners has joined #ocaml
pflanze has joined #ocaml
Submarine has quit ["Leaving"]
smimou has joined #ocaml
mayhem has joined #ocaml
<mayhem> yop
mayhem has quit ["My damn controlling terminal disappeared!"]
kinners has quit ["zzz"]
Submarine has joined #ocaml
mlh has quit ["ni!"]
Weeeeeeee has joined #ocaml
<Weeeeeeee> is OCAML an easy way to learn to program? (personal details: I've been sitting on my ass infront of this computer all my life, but i can't program, i'm a bit intimidated by computer code and not completely sure I would understand if i tried, I know windows like i know nothing else, and I haven't programmed unless you wanna call MMF-- which is a game making, half-programming kinda kit-- programming. This I excelled at, but C scares me.) I was
<Weeeeeeee> thinking about Visual Basic even though it is dread-slow, it might be a good learning platform, but if you think OCAML is a better choice, please tell?
<mrvn> ocaml is functional which might be hard to get into for non mathematicians.
<Demitar> Weeeeeeee, as a first language python might be a good choice.
<mrvn> Something imperative is probably easier to understand as first language.
<Weeeeeeee> hmm. imperative, what does that mean? (english is not my native language)
<Weeeeeeee> i'll look into python :)
<mrvn> Weeeeeeee: Ever read instructions for something? They are imperative: 1. do this, 2. do that, 3. do these.
<Weeeeeeee> i think i understand
<mrvn> Most people have a hard time accepting functions as values and functions that take other functions as argument and return other functions.
<mrvn> In ocaml you get that all the time.
<Weeeeeeee> hmm
<Weeeeeeee> gtg!
Weeeeeeee has left #ocaml []
<neale> mrvn: I agree with you, but I'm not convinced that a functional language is a bad choice for a first language.
<mrvn> For a first functional language ocaml certainly is a great choice. Can we agree on that?
<Submarine> In France, some college classes teach OCaml as first language.
<Submarine> Granted, they are for people doing mostly math studies.
<neale> Well, when I was trying to learn OCaml I got too confused and had to learn Scheme first.
<mrvn> They teach scheme here first.
<neale> here they tend to teach C++ first, which seems like a good way to make people hate programming.
<mellum> neale: well, that is about the worst possible choice
<mellum> so you cannot derive much from that experience :)
<mrvn> The could teach cobol.
<mrvn> They
<karryall> or perl
<neale> Well, I learned BASIC first :)
<neale> I think Pascal would be a good first imperative language, scheme good for functional.
<karryall> I had to teach Octave (as a first language) to some students
<mrvn> pascal is very strict on structure
<Riastradh> A specific programming language should not be the focus of a beginning computer science course.
<mrvn> That would confuse the poor souls even more
<Riastradh> Instead, a paradigmactically (!) flexible programming language should simply be used uniformly throughout the course.
<Riastradh> (I'm not sure exactly what that (!) signifies, but that was a mouthful of a word, even to type. Does anyone have any better suggestions?)
<Riastradh> The course should rather focus on many areas of computer science and not dwell on the language itself.
<Riastradh> A language with a simple syntax and simple & flexible semantics, therefore, is a better choice for an introductory computer science course.
<mrvn> there you go with scheme. only 6 pages specs.
<Riastradh> ...er, R5RS is a _little_ longer than that, but yes, it is my opinion that Scheme is almost ideal for introductory computer science courses, provided a competent Schemer for a professor.
<mrvn> even 25 pages or 50 or what the full thing is is still very small.
<Riastradh> It's about 50 pages.
<mrvn> I still prefer ocaml :)
<neale> heh
<neale> well I'd have to agree that Scheme is a good choice for teaching concepts without having to teach a lot of language syntax and gotchas
<neale> however, given the tendency in the western US to teach C++ first, Pascal might better prepare students for their classes :)
<mrvn> pascal is realy realy useless
<neale> TeX was written in pascal, IIRC :)
<mrvn> With c++ people at least learn some C
<neale> mrvn: that argument is why C++ is taught in CS 101
<mrvn> But why c++? Why not c?
<neale> because C++ is what everyone wants you to write these days
<neale> (so goes the argument)
<neale> and if you learn C++, you learn C for free (so goes the argument)
<mrvn> everyone wants java, at least thats what they told us
<neale> maybe it's because I'm so close to microsoft :)
<mrvn> Then you would learn c#
<neale> yes, that could be. Maybe things have changed since I was last in school.
<mrvn> All the things that make C better than C like inheritance, virtual functions and operator overloading are all a bit to complex for CS 101. Better to first learn the basics and keep the syntax minimal.
<mrvn> C++ better than C
<neale> no argument there
<neale> Java would be okay.
<mrvn> java sucks big time.
<mrvn> Also people learn java in enough other curses.
<neale> yeah, but at least it doesn't make you do memory management
<neale> if I were teaching the class I'd start with scheme, and the next year students would learn ML
<mrvn> Better to teach them to do so first. They never learn it later.
<neale> but I guess that's why I'm in industry.
<neale> mrvn: I've taught kids C before, and I can tell you that kids who have trouble understanding that you can say "x = x + 1" are not going to have an easy time understanding memory management.
<mrvn> Anoth major point for scheme is that probably noone in the curse has prior knowledge of it. With C, java or Pascal you have a significant fraction already knowing it and getting bored.
<mrvn> neale: you say x++
<neale> heh
<neale> I'll try that next time.
<mrvn> If you realy must forget about free(). CS 101 progs are so small they never need to free memory.
<mrvn> :)
<neale> so I think we're in agreement about scheme
<neale> ;)
<mrvn> It is quite useless but a good simple start.
<mrvn> apart from the functional aspect
<neale> haha, I bet we could go on about that for the rest of the day ;)
<mrvn> I remember getting my tutor quite confused with mixing multiple fold functions together.
<mrvn> We had some exercise where people wrote like 2 screens full of code with several functions and you could roll it all into folds.
slashvar has joined #ocaml
<mrvn> I always say a good scheme programm needs to end in at least 15 )s. :)
slashvar is now known as slashvar[lri]
monochrom has joined #ocaml
<shuttlecock> mrvn: actually in the scheme course I'm TAing at rice, for some reason a couple students knew scheme before...
<oracle1> does someone have some good functions for easy debugging output which you can enable and disable
<oracle1> similar to some primitive C preprocessor debugging macros
<oracle1> #define DBG 1
<oracle1> #define DEBUG(args...) \
<oracle1> do { \
<oracle1> if(DBG) printf("DEBUG %s", args); \
<oracle1> } while(0)
<shuttlecock> make a function that takes a string
<shuttlecock> like print_string
<oracle1> with format args capability I forgot to mention =)
<shuttlecock> do you use format args in ocaml?
<oracle1> Printf'ish
<shuttlecock> i just always "so and so ... "^(string_of_int 32)
<oracle1> no
<oracle1> I think printf is quite comfortable
<neale> why not define "debug_int", "debug_string", "debug_etc"
<shuttlecock> im not sure how to do it...and btw, why a do/while for the c version?
<neale> shuttlecock: so you can put ; after it
<shuttlecock> ah
<shuttlecock> true
<neale> I use that idiom all the time to implement poor-man's exceptions
<oracle1> Printf.printf has such a strange type
<neale> passed = 0;
<neale> do {
<neale> if (stuff()) { break; }
<neale> if (other()) { break; }
<neale> passed = 1;
<neale> } while (0);
<oracle1> Well I would prefer a function which acts completely like printf but only if the 'debugging state' is set to true
<neale> oracle1: are you using a preprocessor?
<oracle1> nope
<shuttlecock> hey...are most people who use functional languages programming languages research people? it seems that most people who like functional are in the PLT research group and i find that i seem to be the only person i know who likes ocaml but is more interested in other areas of CS...
<oracle1> I use ocaml as a C substitute
<neale> I'm sort of a language geek, but I'm definitely a professional applications programmer.
<neale> however, so far I've only been able to use ocaml for free software I write in my spare time.
<oracle1> hah let me try
<shuttlecock> i see -- i've only ever seen one job opening that wanted ocaml programmers, and it was thru the PL guy here who works on metaocaml
<karryall> oracle1: I use smthg like this usually
<karryall> let print_debug = ref false
<karryall> let debug fmt = Printf.kprintf (if !print_debug then prerr_endline else ignore) fmt
<oracle1> oh! ignore. that's what I was looking for
<neale> that's all you wanted?!
<oracle1> well just read =)
<neale> bah
<neale> I thought you wanted something like http://svn.woozle.org/j/dump.h
<oracle1> I prefer simple solutions
<oracle1> :)
<oracle1> heh I just made up this one
<oracle1> let debugging = ref true
<oracle1> let debug = function
<oracle1> x when !debugging=true -> Printf.printf x
<oracle1> | _ -> ignore ;;
<oracle1>
<oracle1> let _ = debug "this is a %b test" !debugging
<neale> is debugging something you set at runtime?
<oracle1> yes
<oracle1> err
<oracle1> no
<karryall> oracle1: that doesn't work well
<neale> heh
<neale> let debug = if debugging then Printf.prinf else function x -> () ;;
<karryall> because your debug function has a fixed arity now
<oracle1> hm
<oracle1> yes it only accepts one additional format
* neale <- still a beginner
<oracle1> ok. I take your solution karryall :)
<oracle1> thanks
<karryall> another possibility is to use some preprocessor technique
<neale> he's not using a preprocessor
<neale> I wonder if the hump is ever going to accept my entry.
<oracle1> it takes some time :)
<oracle1> what did you send them ?
<neale> my wiki
<neale> I sent it in over a month ago, I think.
<oracle1> ah
<karryall> weird
<karryall> what address did you send it to ?
<neale> hump@caml.inria.fr
<neale> maybe they didn't like it ;)
<karryall> more probably they forgot about it
<neale> perhaps.
karryall has quit ["tcho"]
srv_ has joined #ocaml
srv has quit [Read error: 104 (Connection reset by peer)]
mattam has joined #ocaml
Submarine has quit ["Leaving"]
pango has quit ["Leaving"]
pango has joined #ocaml
CosmicRay has joined #ocaml
monochrom has quit ["hello"]
<mflux> mellum, I definitely got a *caml-types*-window after prefixing C-c C-t with C-u (and fixing debian's broken caml-xemacs.el)
<mflux> ..although one needs to be sure not to delete the buffer, as after that type display refuses to work
CosmicRay has quit [Remote closed the connection]
CosmicRay has joined #ocaml
CosmicRay has quit ["Client exiting"]
Smerdy has joined #ocaml
Smerdyakov has quit [Read error: 110 (Connection timed out)]
srv_ is now known as srv
monochrom has joined #ocaml
mlh has joined #ocaml
Hanji has joined #ocaml
smimou has quit ["?"]
pharx has quit []
Smerdy has quit [Read error: 110 (Connection timed out)]
Smerdy has joined #ocaml
vezenchio has quit ["smile, Rakka ..."]