dark_light changed the topic of #ocaml to: OCaml 3.09.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/
danly has quit ["Leaving"]
mikeX has joined #ocaml
<mikeX> is there a way to convert int to char, keeping the LSB instead of raising an exception?
<mikeX> hmm, the obvious, using xor I guess : S
<mikeX> s/xor/and
Mr_Awesome has quit ["...and the Awesome level drops"]
fab__ has joined #ocaml
eradman has joined #ocaml
_fab has quit [Read error: 113 (No route to host)]
mikeX has quit ["zzzz"]
benben has joined #ocaml
shans_home_ has joined #ocaml
shans_home has quit [Read error: 110 (Connection timed out)]
shans_home_ is now known as shans_home
Kzzch has joined #ocaml
Kzzch has quit [Client Quit]
pango_ has joined #ocaml
_velco has joined #ocaml
pango has quit [Remote closed the connection]
batdog|gone is now known as batdog
_velco has quit ["I'm outta here ..."]
chessguy has joined #ocaml
yondalf has joined #ocaml
chessguy has quit [" Like VS.net's GUI? Then try HydraIRC -> http://www.hydrairc.com <-"]
dark_light has joined #ocaml
yondalf_ has joined #ocaml
Smerdyakov has quit ["Leaving"]
<dark_light> Funny. I was with an insane bug and was filling post on a nopaste to ask for some help. But the problem was only a variable named "end". All because generally I don't use syntax highlighting. :(
<dark_light> The and the use of -syntax camlp4 seems to obscure compiler errors. A "File "tester.ml", line 5, characters 11-14: Syntax error" was transformed into "File "", line 5, characters 11-14: Parse error: [patt] expected after ',' (in [patt])"
yondalf has quit [Read error: 110 (Connection timed out)]
yondalf has joined #ocaml
yondalf_ has quit [Read error: 145 (Connection timed out)]
<Payo543> dark_light, you live in brazil right ?
<dark_light> Payo543, right
<Payo543> dark_light, what part?
<dark_light> northeast.. at natal/rn
<Payo543> dark_light, i will be in rio de janerio in about 1 week
<dark_light> ah yeah you said you will come here :E
<dark_light> Payo543, to travel is always funny.. unhapply i do not travel too much
<Payo543> dark_light, its for bussiness
<Payo543> dark_light, job makes me come
<dark_light> it's not a reason to not be funny, unless you job is really bad :)
<Payo543> dark_light, huh ? rio de janerio bad ?
<dark_light> no, I meant to travel is always funny
<dark_light> being for business or not :P
llama32 has joined #ocaml
<Payo543> dark_light, fun is the word your looking for ;)
<Payo543> funny is when you laugh
<llama32> in the caml hump, what category would parser/lexer stuff be in? can't seem to find it in "programming languages"
<Payo543> what are you looking for ?
<llama32> nm found it
* llama32 wants to write a compiler for his own language that spits out parrot bytecode
<dark_light> Payo543, for me funny is a thing that is fun :( if A is fun, there are no adjetive to describe A?
<Payo543> you would just say, traveling to brazil is fin
<Payo543> fun*
<llama32> or "there are hot beach babes in brazil"... fun is implied
<dark_light> ahahahahahahahha
<dark_light> :(
<Payo543> well i dont think there is anything much new to see .........i live in miami
<Payo543> only lived in miami for a little while but i love it
<shans_home> an enjoyable thing?
<shans_home> travel is always enjoyable works
<Payo543> hmmmmmmm
<Payo543> i am writng my web control panel in lua but i need a small http server to run it on seperate i wonder if i should do it all in lua or use a small ocaml http server hmm
yondalf has quit ["leaving"]
Snark has joined #ocaml
slipstream has quit [Read error: 131 (Connection reset by peer)]
slipstream has joined #ocaml
llama32 has quit [Read error: 110 (Connection timed out)]
llama32 has joined #ocaml
love-pingoo has joined #ocaml
triple_ has quit [Read error: 113 (No route to host)]
ikaros has quit ["Verlassend"]
pango_ has quit [Remote closed the connection]
zak_ has joined #ocaml
llama32 has quit [Read error: 110 (Connection timed out)]
pango has joined #ocaml
<dark_light> is there any way i can build a channel fowards to two other channels? like a channel tee.. i want anything like output_string tee "message", redirecting "message" to stdout and a file
<pango> that's not a feature of Unix; the "tee" command does the copying itself
zak_ is now known as llama32
<dark_light> pango, my real problem is: my irc connection receives a argument of type out_channel option, by default set to Some stdout. so i can log to a file or show at output or do not output at all
<dark_light> pango, but what if i want to log to a file *and* shows in the window? i must pass a out_channel list?
<pango> if you think that out channels are abstract enough for your needs, why not
<dark_light> there are something more abstract than a out_channel avaliable?
<pango> otherwise you could pass a list of string -> unit functions, or add functions to register/unregister such functions
<dark_light> Hmmmmmmmmmmmmm..
<dark_light> pango, in that case i need only one function
<pango> if outputs don't change over time, a (string -> unit) list parameter may be enough then
<dark_light> but a string -> unit can do the same work that a list could do
ikaros has joined #ocaml
<pango> let broadcast listeners s = List.iter (fun f -> f s) listeners
<dark_light> but i could just do let print'n'log str = output_channel stdout str; output_channel myfile str
<pango> if myfile is a out_channel option, you'll have to check whether it's None, however
ikaros has quit ["Verlassend"]
<dark_light> well.. i am thinking in it it would be only a out_channel, and defined outside the
<dark_light> er
<dark_light> outside the module
<dark_light> :P..
<dark_light> a list of functions can be a lot flexible, but..
ikaros has joined #ocaml
love-pingoo has quit ["Connection reset by pear"]
bluestorm has joined #ocaml
smimou has joined #ocaml
bluestorm has quit ["Konversation terminated!"]
levi_home has quit [Read error: 131 (Connection reset by peer)]
Carillon has quit [Read error: 104 (Connection reset by peer)]
Carillon has joined #ocaml
pango has quit [Remote closed the connection]
pango has joined #ocaml
<dark_light> why can't i do something like class 'a x (y : 'a) = object method get_y = y end;; ? i though objects could be polymorphic
<dark_light> in http://camltest.inria.fr/pub/docs/oreilly-book/html/book-ora144.html there are an example saying object(self : 'a), but i can't do object(self : 'a x) instead of class 'a .. either
Skal has joined #ocaml
ikaros has quit [Read error: 60 (Operation timed out)]
<pango> class ['a] myclass (y : 'a) = object method get_y = y end
<dark_light> ahh ok
ikaros has joined #ocaml
yondalf has joined #ocaml
dark_light has quit [Remote closed the connection]
zak_ has joined #ocaml
llama32 has quit [Read error: 145 (Connection timed out)]
duncanm has quit [Read error: 104 (Connection reset by peer)]
duncanm has joined #ocaml
zak_ is now known as llama32
yondalf_ has joined #ocaml
yondalf has quit [Read error: 145 (Connection timed out)]
_JusSx_ has joined #ocaml
love-pingoo has joined #ocaml
chessguy has joined #ocaml
yondalf_ has quit ["leaving"]
david_koontz_ has joined #ocaml
ebel has joined #ocaml
duncanm has quit [Read error: 110 (Connection timed out)]
david_koontz has quit [Read error: 110 (Connection timed out)]
Smerdyakov has joined #ocaml
ebel has quit ["Leaving"]
Smerdyakov has quit ["Leaving"]
Smerdyakov has joined #ocaml
chessguy has quit [" HydraIRC -> http://www.hydrairc.com <- IRC for those that like to be different"]
crack_head has quit [Read error: 110 (Connection timed out)]
descender has joined #ocaml
llama32 has quit [Read error: 110 (Connection timed out)]
dbueno_ has joined #ocaml
<dbueno_> Does anyone know of a de-functorised Set library?
<dbueno_> Similar to what ExtLibs PMap does for Map, but for Set instead.
love-pingoo has quit ["Connection reset by pear"]
pango has quit [Remote closed the connection]
pango has joined #ocaml
benben has quit [Client Quit]
dbueno_ has quit ["Leaving"]
bluestorm has joined #ocaml
ebel has joined #ocaml
pango has quit ["Leaving"]
pango has joined #ocaml
levi_home has joined #ocaml
<Payo543> you think there would be any difference between a web server written in lua vs ocaml that would maybe have a max of 10 people using it at the same time ?
<bluestorm> hum
<bluestorm> you seems someway obsessed with speed :D
<bluestorm> just try it Payo543
<Ugarte> Hmm?
<ikaros> speed is a nice thing ;)
<Smerdyakov> Unless you went out of your way to do something stupid, it's very likely that disk/network bandwidth are the limiting factors.
<Ugarte> Programmer time is more expensive than CPU time.
<Ugarte> I would presume binaries generated from ocamlopt to be faster than interpreted LUA, but I don't see why you'd care so much, as Smerdyakov said.
<Payo543> Ugarte, i would be using Lua JIT
<Payo543> Ugarte, and of course they would be faster but i wonder by how much hmmmmmm
<Ugarte> I don't know. I don't know anything about LUA.
<Ugarte> I thought the only means of using it was an interpreter.
<Ugarte> If not, hey, nevermind what I said.
<Payo543> LUA JIT is very fast .......not as fast as ocaml but faster then all scripting langs and faster then some compiled alngs
<Payo543> Ugarte, yes you can use interpreter
<Payo543> but theere is a JIT also
<Payo543> Just in time compiler
<Payo543> which almost doubles lua speed i think
<Ugarte> I find it hard to believe that it's faster than statically typed compiled languages.
<Ugarte> Dynamic typing is expensive.
<Payo543> the new version of lua jit is about 20 percent faster
<Payo543> Ugarte, ^^
<Ugarte> *shrug*
<Ugarte> Seems like Java, C++, etc, are all faster.
<Ugarte> I'm surprised about C#, but I suspect its performance on .NET is a lot better,.
<Payo543> Ugarte, i didnt say all copiled langs man
<Ugarte> But that's still pretty good.
<Payo543> i said some
<Ugarte> Sure.
<Payo543> fortran erland etc
<Ugarte> I'm just saying, it's rare to see a dynamically typed language outperform a statically typed one, all other factors being consistent.
<Ugarte> Which of course isn't the case, but still.
<Payo543> yes i totoally agreeee
<Payo543> also like i said the new version of LUA jit is even faster then that
<Ugarte> Yeah.
<Ugarte> Well, in any event, the thing that really matters here is IO.
<Ugarte> For the web server, that is.
<Ugarte> Assuming yu're not doing an application server./
<Payo543> lus is my favorite scritping lang :)
<Smerdyakov> ...and very likely also if he is, if it interacts with a database.
<Payo543> Ugarte, i am building a web panel like cpanel etc ......the panel will be on a different web server
<Payo543> a small itty bitty one either lua one or something else
<Payo543> so if apache went down the panel would still work
<Payo543> you understand ?
<Ugarte> Yes.
<Ugarte> But why not just run CPanel or whatever on a different webserver?
<Payo543> soo on a shared server which they usually hold a max of 250 peepople
<Payo543> there might me 1-2 person checking their panel
<Payo543> i am maiing a web panel
<Ugarte> Hmm. Mono actually competes quite well with the .NET framework.
<Ugarte> Impressive.
<Payo543> and thats what i am trying to do run on a seperate server
<Payo543> i wonder how the new version of lua jit competes hmmmm
<Ugarte> I have to get going, though. Anyway, good luck.
<Payo543> :D
newbcoder has left #ocaml []
delamarche has joined #ocaml
<ikaros> how can i get the real int value of a char like '7'? is this possible
<ikaros> since it gives me the asii value
<delamarche> int_of_char?
<delamarche> oh i see what you mean
<delamarche> sorry
<delamarche> well that's not too hard to write if you know it's ascii :)
<ikaros> i read chars out of files its like 0283621
<ikaros> and i want only ONE at a time
<pango> substract Char.code '0' ?
<pango> let int_of_char c = Char.code c - Char.code '0'
<ikaros> thank you!!
<pango> or, if you don't assume digits are encoded consecutively, function '0' -> 0 | '1' -> 1 | ... :)
<delamarche> pango: That's what i was thinking :D
<ikaros> i had a different file structure first.. but yea.. most likely this would be a better idea now
<ikaros> damn gotta leave for now
<ikaros> thx so far
bluestorm is now known as bluestorm_aw
Kzzch has joined #ocaml
Kzzch has quit [Client Quit]
Leonidas has joined #ocaml
Demitar_ has joined #ocaml
Snark has quit ["Leaving"]
Demitar__ has quit [Read error: 110 (Connection timed out)]
ebel has quit ["Leaving"]
bluestorm_aw is now known as bluestorm
Mr_Awesome has joined #ocaml
delamarche has quit []
Kzzch has joined #ocaml
chessguy has joined #ocaml
bluestorm has quit ["Konversation terminated!"]
_JusSx_ has quit ["leaving"]
duncanm has joined #ocaml
Carillon_ has joined #ocaml
Payo543 has quit [Remote closed the connection]
<levi_home> ls
<levi_home> Sorry.
Carillon has quit [Read error: 60 (Operation timed out)]
smimou has quit ["bli"]