mfurr changed the topic of #ocaml to: OCaml 3.08.2 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/
_shawn has quit [Connection timed out]
mrpingoo has joined #ocaml
kuribas has quit ["ERC Version 5.0.1 $Revision: 1.726.2.3 $ (IRC client for Emacs)"]
vodka-goo has quit [Read error: 60 (Operation timed out)]
gim has quit [Read error: 110 (Connection timed out)]
mattam has quit ["zZz"]
smkl has quit [Read error: 110 (Connection timed out)]
gim has joined #ocaml
zzorn is now known as zzorn_sleep
zzorn_sleep has quit ["They are coming to take me away, ha ha"]
andrewb has quit [Read error: 104 (Connection reset by peer)]
humasect has quit [Read error: 60 (Operation timed out)]
Zaius has quit ["Miranda IM! Smaller, Faster, Easier. http://miranda-im.org"]
monochrom has joined #ocaml
andrewb has joined #ocaml
Zaius has joined #ocaml
mrpingoo has quit ["zZzz"]
cjohnson has joined #ocaml
smkl has joined #ocaml
humasect has joined #ocaml
humasect has quit [Read error: 60 (Operation timed out)]
vezenchio has quit ["Computer Science is no more about computers than astronomy is about telescopes"]
monochrom has quit ["Few people understand "understanding"."]
smkl has quit [Read error: 110 (Connection timed out)]
cjohnson has quit ["5/4 of all people have trouble with fractions"]
tintin has quit [Nick collision from services.]
tintin has joined #ocaml
smkl has joined #ocaml
Snark has joined #ocaml
tintin is now known as lg_
lg_ is now known as tintin
m3ga has joined #ocaml
TheDracle has quit [Read error: 54 (Connection reset by peer)]
TheDracle has joined #ocaml
<Zaius> what would be the best way to reverse a string?
smkl has quit [Read error: 110 (Connection timed out)]
<solarwind> You can create a buffer and append to it string's char in reverse order (starting with String.lenght - 1). Then you can Buffer.contents that buffer.
<solarwind> Or you can make a list out of that string (rather trivial function), reverse that list and List.fold_left that.
<solarwind> The latter is rather costly.
<Zaius> :) but its cooler, isnt it. i was thinking about copying the string and using String.set whilst iterating over the original
<Zaius> thats the cost of setting a byte in a string vs. appending to a buffer, which neednt grow
<solarwind> Well, I guess you can always profile that code. Compile the two reverse_string function with ocamlopt or ocamlopt.opt and run gprof on them.
<solarwind> functions*
<Nutssh> I use oprofile under linux instead of gprof, its non-invasive, so I trust the results a bit more.
zzorn has joined #ocaml
<solarwind> Hm.. my FreeBSD system doesn't have oprofile in ports.
<m3ga> oprofile is linux only i believe. it uses special hook into linux kernel
Hipo has quit [Network is unreachable]
<solarwind> Ah, ok.
<solarwind> Nutssh said "under linux" so I assumed that it wasn't linux only.
<Nutssh> Sorry for being inexact.
<solarwind> No problem.
<solarwind> I only made a make search name=oprofile in my ports directory. Piece of cake :)
<Nutssh> Its an amazing tool. THough I hear the apple equivalents are even better.
zzorn is now known as zzorn_away
alek2 has joined #ocaml
m3ga has quit ["disappearing into the sunset"]
mrvn_ has joined #ocaml
mrvn has quit [Read error: 60 (Operation timed out)]
Submarine has joined #ocaml
smkl has joined #ocaml
Snark has quit ["Leaving"]
solarwind has quit ["brb"]
pango has quit ["Client exiting"]
solarwind has joined #ocaml
pango has joined #ocaml
mlh has joined #ocaml
Hipo has joined #ocaml
m3ga has joined #ocaml
m3ga has quit ["disappearing into the sunset"]
<solarwind> I find quite interesting why the interpreter moans about inexhaustive pattern matching when fed with something like this: let foo 0 = 1;;
<solarwind> Expanding that a bit gives: let foo = function x -> match x with 0 -> 1;; which is a clear case of not exhaustive pattern matching.
<mflux> hmm..
<mflux> so you say the diagnostics is wrong?
<mflux> or right
<mflux> :)
<mflux> did you mean to say 'not inexhaustive'?
<mflux> in any case, let foo 0 = 1;; foo 4 -> inexhaustive exception
<solarwind> Not exhaustive.
<solarwind> s/inexhaustive/not exhaustive/
<solarwind> I just found that interesting. On the basis that a function is a pattern matching.
<mflux> oh
<mflux> interesting in that it works properly?-)
<solarwind> Interesting in that someone who doesn't quite get the idea that a function is a pattern matching would be surprised to receive that error message.
<mflux> I wonder how often a person who wouldn't know functions are pattern matching would then use 'let foo 0 = 42' kind of functions..
<solarwind> *shrug* I've just been asked this a minute ago.
smimou has joined #ocaml
avn has quit ["leaving"]
vodka-goo has joined #ocaml
<det> solarwind: I dont understand what is confusing about that
<det> solarwind: How would that function serve any utility if it only accepted the integer 0?
<solarwind> I didn't say that function would serve any utility. I also didn't say that it is confusing in any way (at least for me). I said that the message the interpreter is spitting out after one declares that 'function' can be worked out much more easily if you detail that function's definition as shown above.
vodka-goo has quit [sterling.freenode.net irc.freenode.net]
slashvar[lri] has quit [sterling.freenode.net irc.freenode.net]
mflux has quit [sterling.freenode.net irc.freenode.net]
slashvar[lri] has joined #ocaml
mflux has joined #ocaml
vodka-goo has joined #ocaml
Svrog has joined #ocaml
<Svrog> hi everyone
<Svrog> has anyone played around with caml under os x?
<vodka-goo> a friend of mine has
<Svrog> oh ok
<Svrog> im asking cause im trying to find some functional language syntax hi-lighting plugins for the xcode ide
<vodka-goo> I think he's using emacs
<vodka-goo> you might also try vim, which is installed on every OSX
<Svrog> i am using vim :)
<Svrog> but i thought id give xcode a go
<Svrog> if i cant find the plugins ill just stick with vim
<vodka-goo> Svrog: do you have omlet for vim ?
<Svrog> nope
<vodka-goo> it's a (good) alternative to the official ocaml mode
<vodka-goo> better indentation
<vodka-goo> (i'm developping it)
alek2 has quit ["Leaving"]
<Svrog> cool
<Svrog> where could i download it?
<Svrog> i always have indenting off in vim.. i cant remember the reason why i disabled it in first place but im pretty much used to it now
<Svrog> but id still be interested in trying the plugin considering there must have been a reason why i stopped using indenting even though like i said i cant remember what it was
<vodka-goo> I used to use emacs, so there's no way I indent myself. But I've heard of many vimers indenting manually... strange
<vodka-goo> however, vim indentation is even more automatic that emacs's
<det> vodka-goo: wow, vim comes default with OSX?
<Svrog> yes
<vodka-goo> Svrog: the default indentation is ... strange ;)
<Svrog> os x comes with a bunch of gnu utilities
<Svrog> gcc, x windows, the works :)
<det> vim isnt GNU :)
<solarwind> Luckily.
<Svrog> oh well.. fair enough
<Svrog> my mistake
<Svrog> but even so - os x does come with vim
<Svrog> vodka-goo: main reason why i got to use vim rather then emacs is because for some reason emacs under cygwin seemed broken on every box ive tried it on
<vodka-goo> solarwind: luckily ?
<Svrog> and ive tried different versions too
<vodka-goo> Svrog: are you using cygwin under osx ?
<vodka-goo> s/under/on/
<det> Svrog: xemacs on windows works very well
<Svrog> half of the shortcuts just didn't work - initially i thought it was just me not setting something up properly but i asked some people who are veteran emacs users to have a look at it and they were just as puzzled
<Svrog> no - cygwin only works under windows
<vodka-goo> ok
<det> Svrog: Do you mean GNU Emacs or X Emacs?
<vodka-goo> I think emacs runs ok in X inside OSX
<Svrog> ive been a windows user for ages - only got my first mac last week
<Svrog> gnu emacs
<det> try the cygwin xemacs
<det> it works perfectly
<vodka-goo> det: he's now on osx, so..
<det> We
<vodka-goo> Svrog: anyway, vim is fine
<Svrog> yeah probably - this is the reason why years ago when i tried both vim and emacs i ended up using vim cause i couldnt get emacs to work properly :)
<Svrog> yeah im pretty happy with vim
<det> We'll, I am sure GNU Emacs works great under OS X :)
alek2 has joined #ocaml
<solarwind> vodka-goo: Let's just say that I ... frown a bit upon all things that come from under the GNU flag. Though I use emacs.
<det> Ahh, we'll whatever floats your boat :)
<Svrog> true - but at this point i dont see a reason to switch from vim to emacs really.. as for xcode i would probably give up on using it after about a day but even so i wouldnt mind getting some plugins for ocaml, scheme and haskell
<det> Svrog: I was a vim user for a while and I switched to emacs
<Svrog> any particular reason why?
<vodka-goo> solarwind: I think gcc but also many basic utils (gawk, sed, gmake...) are perfectly suitable
<det> emacs is more productive for me
<Svrog> oh ok
<Svrog> i might give it another go
<det> Emacs is more dominant in the FP community also
<Svrog> solarwind: why do you dislike gnu?
<vodka-goo> det: more productive ? did you used vim a long time
<det> vodka-goo: yes
<solarwind> vodka-goo: Some tools are ok, indeed. But I frown upon them on "political" reasons.
<solarwind> Licensing, that is.
<Svrog> oh right
<vodka-goo> don't you like GPL ?
<vodka-goo> det: well, I'll remember what you said, it's surprising. emacs is more intuitive, people can prefer elisp and mono-modality, but for productivity I thought everybody agreed on vim being the best
<Svrog> vodka-goo: what style of indenting does omlet use? can it be customized easily?
<vodka-goo> Svrog: not yet, but I'll work at it!
<vodka-goo> it indents like vanilla-tuareg
<vodka-goo> it should be possible to customize by tuning the script directly
<Svrog> i have no idea what thats like.. hmm.. any source code examples you could give me? like some package that uses same/similar indenting style
<vodka-goo> Svrog: ther's a link on the page I've posted
<Svrog> oh
chimikal has joined #ocaml
andrewb has quit [Read error: 104 (Connection reset by peer)]
<Svrog> checking it out now
<vodka-goo> hope you like it
<solarwind> Though I've been using emacs for ages.
solarwind has quit [Success]
withersoever has joined #ocaml
<Svrog> looks very different to my style but it doesnt look ugly
<Svrog> well.. except for the colors :P
<Svrog> but thats due to the color script
<vodka-goo> many guys indent like that... for example, most of the guys in a project i'm working on use emacs/tuareg
<vodka-goo> so I needed something similar
<vodka-goo> yeah, colors are not depending on the filetype on vim (unlike emacs)
solarwind has joined #ocaml
<Svrog> well the biggest difference from my style is that i tend to match all -> operators/symbols whatever they are
<Svrog> as in vertically indent them so they're always one directly under the previous one
<vodka-goo> uh ?
<vodka-goo> you mean if the first pattern has no |, align it on the | of the second pattern ?
<Svrog> no no.. umm.. trying to think of an example..
<Svrog> i could paste something into the channel but youd probably have to cut and paste it into vim or something - depending on whether your irc client is setup for viewing code or not
<vodka-goo> paste it, doesn't matter (maybe in private)
<Svrog> ok
<Svrog> hang on
<solarwind> Why not using something like pastebin.com?
<vodka-goo> solarwind: I didn't know about that site... I'll remember ;)
<vodka-goo> I guess that site uses it's own syntax hilightings
<vodka-goo> they're a bit broken..
<solarwind> Yeah.. so far I tried for perl, c, java and python.
<vodka-goo> I just tried for ocaml ;)
<vodka-goo> it doesn't like the # for methods calling, which is interpreted as beginning of comment
<solarwind> Heh, I guess it's mainly designed for Unix scripting languages which, traditionally, use the pound sign as beginning of a comment.
<vodka-goo> of course
<vodka-goo> but there are some "universal" indentation tools around
<Svrog> vodka-goo: can i override omlets default indenting? as in if i manually reindent something that it indented is it gonna fight me for it?
<vodka-goo> I think I've seen on freshmeat something in php
<mflux> I wouldn't mind if someone wrote a simple syntax colorizer that would generate ansi (or other control codes) for using with less
<vodka-goo> Svrog: yeah, it won't change it unless you ask
<vodka-goo> mflux: nice idea... use vim as a pager ?
<Svrog> cool - thats what i hate about most ides with passion - in particular java ideas.. they often fight you and keep reindenting your stuff..
<mflux> I already know less bindings
<Svrog> ideas=ides
<vodka-goo> Svrog: it's not omlet specific, it's vim. it indents new lines, and when you ask, no more
<Svrog> oh right
tintin has quit [Remote closed the connection]
tintin has joined #ocaml
mattam has joined #ocaml
smkl has quit [Read error: 60 (Operation timed out)]
kuribas has joined #ocaml
mlh has quit ["Chatzilla 0.9.66e [Firefox 1.0/20041107]"]
smkl has joined #ocaml
_JusSx_ has joined #ocaml
<_JusSx_> why ocaml list works in that way?
<_JusSx_> i would like to get one message for one email
<vodka-goo> uh ? what's the matter ?
<_JusSx_> don't like it
<vodka-goo> don't you get one message for one email ?
<_JusSx_> no
<_JusSx_> Caml-list digest, Vol 1 #185 - 10 msgs
<_JusSx_> ten message for a email
<vodka-goo> that's because you suscribed the wrong way
<_JusSx_> ahh ok
<vodka-goo> i receive one email for one msg
<_JusSx_> once i did so
<_JusSx_> then i unsubscribed
<vodka-goo> or maybe are you reading caml-weekly-news .. doesn't seem so
<_JusSx_> no
<vodka-goo> ok you probably missed sth the 2nd time
<_JusSx_> Would you like to receive list mail batched in a daily digest?
<_JusSx_> damm
<_JusSx_> maybe i clicked that
<_JusSx_> i changed option
<_JusSx_> thanx a lot for your help
<_JusSx_> vodka-goo: where are you from?
<vodka-goo> france, paris
<vodka-goo> that wasn't a too technical question ;)
<vodka-goo> what about you ?
<_JusSx_> why do you use functional language such as ocaml?
<vodka-goo> cause I was taught ocaml at school, and I still like it...
<_JusSx_> yeah i like it too
<vodka-goo> (I also used C and Perl)
<_JusSx_> but i didn't study it at school
<vodka-goo> so you're self-motivated, that's great
<_JusSx_> i studied a lot of programming languages
<_JusSx_> but functional languages are really great
<_JusSx_> ocaml
<_JusSx_> too cool
cjohnson has joined #ocaml
<vodka-goo> modules are also a very good thing for structuring a project
<vodka-goo> modules and functors really help more than just splitting code among many files
<_JusSx_> yeah
* vodka-goo goes back playing crack-attack
<_JusSx_> lol
<_JusSx_> ok
<_JusSx_> bye
_JusSx_ has quit ["leaving"]
grisxa has joined #ocaml
cjohnson has quit ["5/4 of all people have trouble with fractions"]
Ag_47 has joined #ocaml
<Ag_47> hiall
<Smerdyakov> You missed a space.
<Ag_47> does anybody have any experience in jabbr?
<Smerdyakov> You missed an 'e'.
<Ag_47> no, it's an ocaml library by Mike Lin
<solarwind> And he also uses g instead of k.
<Smerdyakov> You missed an 'e' again; Mike Line.
<Ag_47> however, are there any other xmpp libs?
<Smerdyakov> Oh, and an 'x'.
<Smerdyakov> Mixke Line.
<Ag_47> Smerdyakov: thnx, but that's not an answer to my question
__DL__ has joined #ocaml
Submarine_ has joined #ocaml
grirgz has quit [Read error: 104 (Connection reset by peer)]
grirgz has joined #ocaml
kuribas has quit ["ERC Version 5.0.1 $Revision: 1.726.2.3 $ (IRC client for Emacs)"]
kuribas has joined #ocaml
Ag_47 has left #ocaml []
Submarine has quit [Remote closed the connection]
Submarine_ is now known as Submarine
Banana has quit [Read error: 110 (Connection timed out)]
CosmicRay has joined #ocaml
Svrog has quit []
grisxa has left #ocaml []
smkl has quit [Read error: 110 (Connection timed out)]
grirgz has quit [Read error: 110 (Connection timed out)]
kuribas has quit [""gotta go. Have a nice time""]
kakkui has joined #ocaml
<kakkui> hello
<kakkui> i have some problems with m program
<kakkui> Can I print it here?
<solarwind> No. Use something like pastebin.com.
<kakkui> I did not know that kind of service...
<solarwind> Now you know :)
<solarwind> I don't know the policy of this channel but I'm sure they are not eager to have code pasted inside the channel.
<kakkui> ok
kakkui has quit [Remote closed the connection]
vezenchio has joined #ocaml
alek2 has quit ["Leaving"]
solarwind has quit ["quitting"]
_fab has joined #ocaml
Banana has joined #ocaml
cjohnson has joined #ocaml
zzorn_away is now known as zzorn_afk
smkl has joined #ocaml
TheDracle has quit [Read error: 104 (Connection reset by peer)]
TheDracle has joined #ocaml
TheDracle has quit [Read error: 104 (Connection reset by peer)]
TheDracle has joined #ocaml
TheDracle has quit [Read error: 104 (Connection reset by peer)]
TheDracle has joined #ocaml
pango has quit ["Leaving"]
TheDracle has quit [Read error: 104 (Connection reset by peer)]
TheDracle has joined #ocaml
Yorick has joined #ocaml
TheDracle has quit [Read error: 104 (Connection reset by peer)]
smkl has quit [Read error: 60 (Operation timed out)]
TheDracle has joined #ocaml
mrvn has joined #ocaml
Zaius has quit ["Miranda IM! Smaller, Faster, Easier. http://miranda-im.org"]
mrvn__ has joined #ocaml
mrvn_ has quit [Read error: 60 (Operation timed out)]
Submarine has quit ["Leaving"]
mrvn has quit [Read error: 110 (Connection timed out)]
mrvn__ is now known as mrvn
vodka-goo has quit ["train"]
monochrom has joined #ocaml
smkl has joined #ocaml
pango has joined #ocaml
Submarine has joined #ocaml
_JusSx_ has joined #ocaml
smkl has quit [Read error: 60 (Operation timed out)]
humasect has joined #ocaml
chimikal has left #ocaml []
smkl has joined #ocaml
bigboote has joined #ocaml
humasect has quit [Read error: 104 (Connection reset by peer)]
humasect has joined #ocaml
smkl has quit [Read error: 60 (Operation timed out)]
m3ga has joined #ocaml
Yorick has left #ocaml []
humasect_ has joined #ocaml
humasect has quit [Read error: 104 (Connection reset by peer)]
m3ga has quit [Client Quit]
CosmicRay has quit ["Client exiting"]
zzorn has joined #ocaml
__DL__ has quit ["Bye Bye"]
zzorn_afk has quit [Read error: 60 (Operation timed out)]
_JusSx_ has quit ["leaving"]
smkl has joined #ocaml
smimou has quit ["?"]
zzorn is now known as zzorn_afk