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/
malc_ has joined #ocaml
malc_ has quit ["leaving"]
dark_light has joined #ocaml
david_koontz has quit ["Leaving"]
sponge45 has joined #ocaml
<dark_light> I am wrong or I can't do polymorphism with objects on type declarations? like type a = < x : int; .. >;;, I receive In definition < x : int; .. > the variable 'a is unbound, but I can't find any place to put this 'a .. (tried type 'a a = (< x : int ; .. > : 'a), got a syntax error)
<dark_light> the strange thing I find is that kind of polymorphism is trivial at function declarations and I need no 'a
<sponge45> I got it: type 'a t = < x : int; .. > as 'a;;
<dark_light> as 'a
<dark_light> THAT is weird
<dark_light> :)
<dark_light> thanks ^^
<sponge45> I tried the following to see what it tells me: fun x -> x#x; x;;
<sponge45> - : (< x : 'b; .. > as 'a) -> 'a = <fun>
<sponge45> so yes, it's weird :-)
<dark_light> Note here the special syntax (#point0 as 'a) we have to use to quantify the extensible part of #point0. As for the variable binder, it can be omitted in class specifications. If you want polymorphism inside object field it must be quantified independently.
<dark_light> It likes a workaround in some undecidable part of type checking..
<dark_light> t's semantically equivalent to : ..
<dark_light> s/It likes/Ii is like/
<dark_light> er..:)
shawn__ has quit ["This computer has gone to sleep"]
yondalf has joined #ocaml
<dark_light> how bitwise operations are sintatically built in ocaml? eg. val land : int -> int -> int, it's a function but is has the very confusing notation a land b
<dark_light> i though only non-alphanumeric functions could have this odd notation (like +)
<dark_light> i can't define my own odd function with let (k) a b = a+b, i got a syntax error.. (but i can define let (+) a b = a+b of course)
<Mr_Awesome> dark_light: the language has a few reserved keywords that can act as infixes, such as bitwise functions and the mod function
<Mr_Awesome> otherwise, you can only use symbols
<dark_light> Mr_Awesome, in the Pervasive module land is defined as a function, not a keyword..
<Mr_Awesome> land *is* a keyword
<dark_light> well, nice. hmm..i will do let (^.) a b = a land b, just to be sane
<Mr_Awesome> well, it is in the way that the parser will always read it as an infix function
<Mr_Awesome> why ^. ?
<dark_light> looks like the logical and ^
<dark_light> that is alredy a function
<Mr_Awesome> that would be confusing, since in C++ ^ is the xor operator
<dark_light> really?
<Mr_Awesome> yes
<dark_light> ^ in mirc scripting is the numerical power function, but who bother? heh
<dark_light> Mr_Awesome, i will define it only as a nested function inside my function, because i am using bitwise for readability in first place
<Mr_Awesome> ^ in usual notation means exponentiation
<dark_light> (i am passing tree bools as a int, and then bitwise it to get the bits)
<Mr_Awesome> id stick with the functions from the stdlib for clarity, unless youre the only one who'll read it
<dark_light> Mr_Awesome, well you are right, but the stdlib way just seems wrong. and (i think) only me would be instersted in the code in the first place..
<dark_light> my self opinion: ocaml is good because is ML and because has some really good approaches (like the match or the structural OO). but it lacks generality and seems very.. "workarounded", i think anyone that uses ocaml can see my point
<dark_light> by generality i means.. i means.. "A Way To Rule Them All", there are too much little rules, it's annoying
<dark_light> (even with that it's still my favourite language, i like most of it and try to avoid things i dislike)
<Mr_Awesome> you mean it lacks a widespread sense of orthogonality?
<dark_light> Mr_Awesome, well, i don't know exactly with is orthogonality (yes, i know what is two orthogonal lines, i just don't got it)
<Mr_Awesome> you have a point, but the language is easily powerful enough to do almost anything without workarounds
<Mr_Awesome> orthogonality means application of the same form to different situations
<dark_light> i think yes
<Mr_Awesome> having land be an infix operator is a breach of orthogonality
<dark_light> i think the language needs a redesign (peharps at it's version 4 or 5)
<dark_light> like python, perl and php are doing.. and, better: it needs a Benevolent Dicator® with a Huge Community®
<dark_light> those things makes the language better and better :(
<dark_light> dictator
<Mr_Awesome> there are a lot of small things that need changing
<Mr_Awesome> the only major feature i would like to see, that i know cant happen (probably due to technical reasons that im too lazy to comtemplate), is operator overloading
<jigga_what> *cies for the 2nd time *
<Mr_Awesome> well, i shouldnt say i know it cant happen
<Mr_Awesome> i just highly doubt it
<Mr_Awesome> having to make up a different operator for every numeric type is highly annoying
<Mr_Awesome> actually i just mean function overloading in general, dont know why i said operator
<Mr_Awesome> jigga_what: why are you crying?
<Mr_Awesome> is it lablgtk2 again?
<dark_light> Mr_Awesome, operator overloading for me is a bad idea®, but i might be wrong
<dark_light> (operator overloading just remembers me c++)
<Mr_Awesome> having to use * and *. and */ and then having to make up your own for say, vectors, really sucks
<dark_light> maybe the ints, floats, etc should be of type number
<Mr_Awesome> i think haskell handles this by having type classes
<jigga_what> Mr_Awesome: i cant get lablgtk2 to compile
<dark_light> and ints would be, well, of type int number,
<dark_light> and operator * defined for 'a number
<Mr_Awesome> dark_light: youre describing haskells type system basically
<Mr_Awesome> dark_light: except that means you cant extend it
<dark_light> or lisp (i think)
<dark_light> Mr_Awesome, parametric polymorphism just seems cleaner, better to debug and.. well.. nicer than overloading
<Mr_Awesome> well lisp is dynamically typed
<dark_light> but maybe a type x = int | float would not be that bad
<Mr_Awesome> not really cleaner, more orthogonal perhaps
<Mr_Awesome> but still youd have to define a different operator for vector multiplication
<dark_light> the idea of type safety seems very very well to me
<dark_light> Mr_Awesome, well, yes, but... :)
<Mr_Awesome> it seems in good health?
<dark_light> didn't understand
<Mr_Awesome> s/well/good
trrkkkkkk has joined #ocaml
<dark_light> still don't get it
<Mr_Awesome> "well", when used as an adjective, means "in good health"
trrkkkkk has quit [Read error: 113 (No route to host)]
<Mr_Awesome> "type safety is well" means type safety is in good health
<dark_light> s/seems very very well/seems a good idea/
<Mr_Awesome> that works too
<dark_light> Mr_Awesome, didn't know what really is health, maybe "without desiase"?
<Mr_Awesome> but how does overloading compromise type safety?
<Mr_Awesome> dark_light: perhaps, though you can still be in poor health if youre without disease
<dark_light> Mr_Awesome, if you can later modify my * for means another thing for another types, yes, it compromises, because i have no control of type of operands taken by *
<Mr_Awesome> with proper operator overlaoding, this isnt a problem
<Mr_Awesome> i know this is a terrible argument for my point, but F# does it
<dark_light> maybe if i could at the end have a type like i described, type x = int | float, it would be more intersting.. like val * = int|float -> int|float -> int|float
<dark_light> or maybe something to force all three times to be the same
<dark_light> like.. val * = let type number = int|float in number -> number -> number
<dark_light> so viewing the signature i know exactly what * does, and i will not be trapped by overloading misuse
<dark_light> (maybe val * = number -> number -> number with number = int | float, seems clean)
<dark_light> (well, val * : ..)
<Mr_Awesome> val (*) = 'a number -> 'a number -> 'a number;; ?
<Mr_Awesome> s/=/:
<dark_light> Mr_Awesome, but that would be not extensible as you pointed
<Mr_Awesome> and your way would?
<dark_light> what i was saying is making polymorphism at a.. more flatten level
<dark_light> i think yes..
<dark_light> the new code for vectors could have..
<Mr_Awesome> how could i add a type to be allowed into *?
<dark_light> let (*) a b = match (type a) with vector -> codetovector | _ -> a * b (*anterior code*)
<dark_light> seems ugly, but it's only way i can imagine..
<dark_light> maybe operator overloading could be a syntax sugar to this, mantaining my original idea and not allowing the user doing bizarre things with types
<dark_light> (but dealing with types like real vars would be really fun)
<Mr_Awesome> if they added proper function overloading like in C++, it would be quite easy to do :)
<Mr_Awesome> operator overloading is a little more than syntax sugar
<dark_light> Mr_Awesome, it is transforming the * function into many functions, right? i see this as a evil thing
<Mr_Awesome> no, its allowing many functions to be named *, and telling the compiler to figure out which one is right based on the args passed
<dark_light> because the type inference must be done at compile level, so it's sane to make the * as a unique function and do the separation at the compile level
<dark_light> Mr_Awesome, hmm
<Mr_Awesome> are you proficient with C++? thats how its handled there, and C++ has a strong typing system as well
<dark_light> Mr_Awesome, the way i am thinking, there is no space for various visible functions with the same names..
<dark_light> Mr_Awesome, i am trying to learn c++, but it is not being very pleasant
<Mr_Awesome> as long as they have different and incompatible args, the compiler can tell them apart
<Mr_Awesome> going to procedural when youre used to functional is never pleasant :(
<dark_light> Mr_Awesome, but the programmer not! in one namespace, one visible function of each name
<Mr_Awesome> the programmer should have to, thats the beauty of overloading functions
<Mr_Awesome> *shouldnt
<dark_light> Hmm..
<dark_light> well i don't know, these things are strange to me
<Mr_Awesome> though like i said, it probably will never happen in ocaml
<dark_light> it may depends on how the language will evolve
<Mr_Awesome> when you get more C++ experience youll understand
<dark_light> i heard ocaml is maintened by few researches that has no time to keep it, i think it's the time of release it's control to a community.. or ocaml will die :(
<dark_light> resume of my thoughts about ocaml :)
<Mr_Awesome> i dont think it will ever die
<Mr_Awesome> unless something better comes out
<dark_light> Mr_Awesome, Ada died too
<dark_light> i don't know about better/worse, but there are other ML's
<Mr_Awesome> theyre all worse :)
<dark_light> i am wondering how do ^. function with only one operation.. heh
<dark_light> i think it is pretty readable (bits 1 returns false,false,true.. bits 2 returns false,true,false .. etc)
<Mr_Awesome> does that compile?
<dark_light> yes
<Mr_Awesome> oh ok, heh, keep reading = as assignment operator
<dark_light> eheh:)
danly_ has joined #ocaml
<jigga_what> *criesss*
<Mr_Awesome> i feel your pain, jigga_what
<dark_light> i have never worked with gtk
<jigga_what> i have compiled it 50 times
<jigga_what> i am on a new system now
<jigga_what> and it wont compile
<dark_light> my code is getting unreadable
<dark_light> i feel good with this, i don't know why
<dark_light> passing a multi-line (fun ..) to a XX.iter is the real fun
yondalf has quit ["leaving"]
<Mr_Awesome> dark_light: theres nothing wrong with that, though always consider making a named function for added clarity
<Mr_Awesome> of course it doesnt always add clarity
<dark_light> let ifnod x a b = if x then a else b in somefunction (fun x -> ifnod x A B) (fun x -> ifnod x C D) .. i think i am getting mad, i laugh in thinking how i will understand all of this some months later
<jigga_what> anyone wanna compile lablgtk2+ and tell me if its wroking or if its just me :D
<dark_light> jigga_what, are you using linux? i think there are lablgtk in most distros repositories..
<dark_light> liblablgtk2-ocaml - runtime libraries for OCaml bindings for Gtk+ version 2 in ubuntu
<jigga_what> i use slackware ;)
<dark_light> well, trying to get sources and compile, just post me some example code
<mbishop> jigga_what: installed it on debian the other day, works fine
<jigga_what> mbishop: did you compile ?
<dark_light> wow, 15mb of ocaml dev libs..
<dark_light> actually gnome dev libs
<jigga_what> i would care using all ready made binaries BUT i want to modify the lablgtk for myself
<jigga_what> like take out what i dont use so when it stiacally links in the lib its smaller
yondalf has joined #ocaml
<jigga_what> grrrrr
<dark_light> jigga_what, paste some example code plz
<dark_light> ps: hmm actually liblablgtk2-gnome-ocaml-dev isn't the source code, grrr
<dark_light> to build the lib
<jigga_what> theres the actual lablgtk
mbishop has quit [Remote closed the connection]
<jigga_what> Error on dynamically loaded library: ./dlllablgtk2.so: undefined symbol: gtk_minor_version
<jigga_what> make[1]: *** [lablgtktop] Error 2
<jigga_what> make[1]: Leaving directory `/root/lablgtk2/src'
<jigga_what> make: *** [all] Error 2
<jigga_what> if anyone knows anything that would be super great casue i really need to get this to work
<jigga_what> ooooo
<jigga_what> maybe my gtk version is newer
<jigga_what> and wont compiel
<jigga_what> compile hmmmm
<jigga_what> maybe gtk_minor_version is not used anymore
sponge45 has quit ["zzzzzzzzzz"]
dibblego has joined #ocaml
piggybox has quit [Connection timed out]
piggybox has joined #ocaml
Mr_Awesome has quit ["and the Awesome Level drops"]
yondalf has quit ["leaving"]
ramkrsna has joined #ocaml
falconair has quit []
pango__ has joined #ocaml
trrkkkkk has joined #ocaml
danly has quit [Nick collision from services.]
danly_ is now known as danly
danly_ has joined #ocaml
pango_ has quit [Remote closed the connection]
mbishop has joined #ocaml
trrkkkkkk has quit [No route to host]
_velco has joined #ocaml
zamez has quit ["Client exiting"]
delamarche has joined #ocaml
<pango__> dark_light: I hope A, B, C, D are variables or something... The problem of let ifnod x a b = if x then a else b is that you can't define evaluation policy of your functions (only, 'if', 'match',... are not fully eager)
shawn__ has joined #ocaml
<pango__> (also '&&', '||'... do I miss any ?)
<dark_light> pango__, hmmmmm..
<pango__> another example of hardcoded exceptions :)
<dark_light> but the idea was to pass only things without side-effects so i think there is no problem..
<pango__> still, that could lead to more computation than necessary
<dark_light> hmmm. at runtime? i do not believe..
<dark_light> (afaik i passed only constants!)
<pango__> ok... that was just a warning about this approach ;)
<dark_light> i really didn't understand why the ifnod is more eager
<pango__> I often wish for a function to compose 'compare' like functions to get lexicographic order... But it should not be fully eager, and using lazy values (or similar) is not convenient
<dark_light> is that because i must evaluate all expressions before passing to function?
<jigga_what> if anyone would like to do a major favor for me that would be great :D
<jigga_what> im going on 2 days with no luck
<pango__> dark_light: yes, all arguments to functions are evaluated before the function itself
<pango__> dark_light: with the above exceptions, 'if', 'match', '&&', '||',... but you can't extend the list :/
<pango__> let lexi c1 c2 = if c1 <> 0 then c1 else c2 ... problem, 'c2' will be evaluated, even if 'c1' is <> 0
* dark_light will start a campaing for a ocaml redesign
<dark_light> jigga_what, well, returned to this.. :E downloading, heh
<jigga_what> dark_light: huh ?
<dark_light> jigga_what, i was about to install this here
<jigga_what> ahh :P
<jigga_what> source to compile ?
<dark_light> ./configure'ing..
<jigga_what> ahh
<jigga_what> if it compiles it means i got something messed up over here
<pango__> (probably a job for camlp4 to get a "macro expansion" instead of a function...)
danly has quit ["Leaving"]
<dark_light> jigga_what, compiles..
<dark_light> pango__, Hmmmmmmmmmmmmmmm..
<jigga_what> dark_light: it compiled for you ?????????????
<dark_light> yes
<jigga_what> OOOHHHHHHHHHHHHH
<dark_light> jigga_what, well, after 15MB of fucking -dev packages (it installed the packages marked as "suggests" and "recommends" too!!!) i think it was in debit with me
<dark_light> and was forced to compile
<jigga_what> my gtk must be messed up
<jigga_what> i guess my gtk i ma using now is messed up or something
<jigga_what> what dev packages ?
<dark_light> or maybe some lib, even the error messenger is related to gtk itself
<dark_light> that specific call might be handled by other associate osbscure lib
<dark_light> ah
<dark_light> trying to find
<dark_light> jigga_what, here is what liblablgtk2-ocaml-dev depends on ubuntu edgy: http://packages.ubuntu.com/edgy/libdevel/liblablgtk2-ocaml-dev
<dark_light> it depends on glade too, and here is what glade depends: http://packages.ubuntu.com/edgy/libdevel/libglade2-dev etc
Foxyloxy has joined #ocaml
<jigga_what> did you compile or just download a package ?
<dark_light> i downloaded from your link
<dark_light> and compiled from that
<jigga_what> i see
<jigga_what> dark_light: are you using the newest version of gtk ?
<dark_light> i think no
<dark_light> because i am using gnome 2.14
<jigga_what> i see
<jigga_what> what version of gtk is that?
<dark_light> well i am wondering how can i see this:)
<jigga_what> synaptic :P
<jigga_what> if you use ubuntu :P
<dark_light> 2.8.20-0ubuntu1
<jigga_what> ahh
<jigga_what> i must have compiled mine bad / wrong / got stuff mixed up
<jigga_what> i should really use a package based distro
<jigga_what> but i always want newest versions / custom stuff
<dark_light> jigga_what, i am planning to move to a compiled-based distro
<jigga_what> ./ not bloat abd just what i need
<dark_light> maybe even a "distro".. say, linux from scratch
<jigga_what> compiled - based distro ?
<jigga_what> like gentoo ?
<dark_light> no, i meant
<dark_light> ./configure && make && make install-based
<jigga_what> ooooo
<jigga_what> welll
<jigga_what> that will take somr work
<jigga_what> alot of libraries needed to get linux x a window manager working ;)
<jigga_what> slackware is kinda like linux / minus all the bloat / just what i need / fully customize
<dark_light> jigga_what, ubuntu is cool but i feel a bit limited by the package system
<dark_light> often i don't install something because it will mess my /usr
<jigga_what> what do you mean ?
<jigga_what> lol
<jigga_what> then use slackware
<dark_light> maybe
<dark_light> i don't know
<jigga_what> if you dont want no package based stuff
<jigga_what> i will be installing a base slack here soon compiling the newest KDE 3.5.5 and keeping that system really optimized / clean and neat ;)
<jigga_what> and a good programming enviroment
<flux__> dark_light, you can do that let (*) a b = .. with numbers extensibly, by using the object system. it still wouldn't allow something I recently wanted: let (*) vector float AND let (*) float vector.. I suppose a float could be promoted into a vector of size 1, as the vector is special case of matrix too.
<flux__> also, dark_light/pango, I think the lazy-keyword was designed for that purpose (well, atleast it suits the situation)
david_koontz has joined #ocaml
<flux__> force (ifnod a (lazy "yes") (lazy "no")), although in this case it's not much better than (ifnod a (fun () -> "yes") (fun () -> "no")) ()
<flux__> (but still is, a bit)
<dark_light> flux__, by my idea was being able to test the type of a expression using an special keyword
<dark_light> idea stolen by some lisp i think, but anyway..
<flux__> that sounds like runtime testing
<dark_light> and, ah, having types like int|float.. i think it's more easy
<flux__> dark_light, have you checked out gcaml?
<dark_light> flux__, hmmm no
<flux__> do that
<dark_light> i think the compiler can translate all my testings into compile time testing
<dark_light> but i think many odd things too:)
<jigga_what> theres a bunch of ocaml variants these days
<pango__> flux__: that's what I call "not convenient"
<pango__> flux__: I'd take either lexi (compare x.a y.a) (String.compare x.b y.b) or let c = compare x.a y.a in if c <> 0 then c else String.compare x.b y.b over lexi (lazy (compare x.a y.a)) (lazy (String.compare x.b y.b))
<dark_light> flux__, but well what about val * : 'a -> 'a -> 'a with 'a = int|float (or something similar)?
pango__ has quit ["bbl"]
<flux__> dark_light, well did you check out what gcaml can do?
<flux__> I think it can do for example that
<dark_light> reading
<dark_light> i don't like the idea of overloading at all
<flux__> let plus = generic (+) | (+.)
<dark_light> hmm..
<flux__> plus 1 2 = 3 and plus 1.1 2.2 = 3.3
* jigga_what uses the KISS rule
<dark_light> flux__, what about the types?
<dark_light> plus is 'a -> 'a -> 'a or is restricted only to int and floats?
<flux__> it is restricted to ints and floats
<dark_light> oh
<dark_light> hmm
<flux__> because + is a function on ints and +. a function on floats
<dark_light> hey.. nice..
<jigga_what> YESSS
<jigga_what> i got lablgtk2 to work i had broekn gtk+ dev files
<dark_light> :)
pango has joined #ocaml
<jigga_what> dark_light: 2 days wasted
<jigga_what> could have fixed the problem in 30 seconds
<dark_light> jigga_what, i plan to keep my old dapper installation alive
<dark_light> because bad or good, here things works..
<dark_light> (and configuring all of this took some time!)
<dark_light> i need at least two installations: one for the lattest apps.. and another to get things work
<flux__> the extensible + could be like:
<flux__> class virtual number = object (self : 'a) method virtual plus : 'a -> 'a end
<flux__> class int i = object inherit number val value = i method get = value method plus n = {< value = value + n#get >} end
<flux__> class float f = object inherit number val value = f method get = value method plus f = {< value = value +. f#get >} end
<flux__> but yes, runtime overhead would occur
<flux__> let (+) a b = a#plus b;;
<flux__> and syntax sucks, although you can do let i a = new int a let f a = new float a;;
<flux__> and the number needs to be extracted with #get
<dark_light> hmm o.o
<jigga_what> dark_light: i know what you mean
<jigga_what> i have messed around with this distro here and there
<jigga_what> but i just feel home with slackware
<jigga_what> i feel the most comfortable etc
lde has quit [Read error: 110 (Connection timed out)]
<jigga_what> but i would love to find a distro with a package system and that is like slackware
<jigga_what> although making my own packages and stuff doesnt take all that long
<jigga_what> just things hardly get updated :D
<dark_light> jigga_what, someday i had to see the contents in a camera on the pc and begun to search on the web for a command to mount the camera like a pen drive and access it's contents.. so after a while searching without many results i plugged it and gnome recognized it automatically. get things done is a very useful thing. the ubuntu has it's spirit so it's a good distro of choice..
<jigga_what> dark_light: for me finding stuff / knowing how to do stuff is not a problem
<jigga_what> its fixing stuff when there is errors
<jigga_what> but GNOME / KDE both have hardware detection
<dark_light> the same applies to xfce
<jigga_what> i like xfce
<jigga_what> but i prefer a more desktop enviroment
<dark_light> jigga_what, currently i have one package that depends on a lib on a version that aren't present on system, but this is a too high depend because if i install it, it works fine
<jigga_what> yea ?
<dark_light> jigga_what, but when doing so, the entirely apt gets broken and refuse installing things without uninstall the "broken" package
<dark_light> so i have a routine to re-add my package every time apt drops it
<jigga_what> i seee
* jigga_what doesnt knowing anything about that stuff
* jigga_what mostly compiles and installs nerly all the apps he uses
<dark_light> i could discompact the package, edit it's headers and recompact it, but i am just too lazy to do it now
<dark_light> i don't know if i would survive more than 2 days in slackware :D
<jigga_what> dark_light: btw did i tell you i am in Rio De Janerio ?
<jigga_what> dark_light: stuff compiles fast
<dark_light> jigga_what, you are that guy? if yes, yes:)
<jigga_what> dark_light: plus linuxpackages.net has alot of stuff
<jigga_what> dark_light: yea that was me ;0
<jigga_what> i am now not scared to walk the streets :D
<dark_light> :D
<jigga_what> and my porturgese is getting alot better ...... :D
<jigga_what> also
<jigga_what> met a few girls :D
<dark_light> liking rio?
<jigga_what> yes
<dark_light> ehehehe :)
<jigga_what> theres also downsides ;)
<jigga_what> but its a big city so you have to expect that
<dark_light> which ones?
<jigga_what> violence
<jigga_what> robbery is kinda common
<jigga_what> police is a little corrupt but getting better
<jigga_what> if i was to live in brazil and raise a family i would want to live in Natal
<dark_light> yes..
<jigga_what> Natal is the safest brazillian city
<dark_light> jigga_what, i think i would not
<jigga_what> why?
<jigga_what> whats wrong with natal ?
<dark_light> Hmmm.. too hot, it's always summer here..
<jigga_what> dark_light: also i now know why people in rio are always dark
<dark_light> pollution too
<jigga_what> i am like light as fuck ........french white .....not albino but light skinned
<jigga_what> now i am dark as shit
<dark_light> heh :P i dislike the sun at all
<jigga_what> when i first got here people could tell i was not from here becasue my skin was lighter .......now they dont know / dont ask until i start talking for a min
<dark_light> eehehe
<jigga_what> all the girls on the beach
<jigga_what> like are dark
<jigga_what> but there tan lines are white as shit
<jigga_what> im just like hot damn these girls can tan
<dark_light> jigga_what, i like UFRN, the university where i study, maybe it's the unique thing i like in the whole city
fab__ has joined #ocaml
<jigga_what> i just said natal but i dunno
<jigga_what> salvador bahia seems cooool tooooo
_fab has quit [Read error: 110 (Connection timed out)]
<dark_light> yes, but i have never got to these places
<jigga_what> but if you dont like summer maybe south brazil would be good for you
<dark_light> i visited joão pessoa someday but it is just a copy of natal, in small scale
<dark_light> jigga_what, i don't know
<jigga_what> or go north ;)
<jigga_what> i think you can get better pay in usa
<dark_light> i don't want to go north without go south first
<jigga_what> people in brazils pay / income is much lower then in usa
<dark_light> jigga_what, well, a lot, but i might not find a home in usa
<jigga_what> only reason i am here is becasue of my job so my pay doiesnt change
<jigga_what> what do you mean ?
<jigga_what> find a home ?
<jigga_what> rent an apartment and save money and 10 years from now buy a house
<dark_light> i say i dislike natal, but it's the only place i can feel in home..
<jigga_what> in the technology world depending what you do in usa you can make 70-80 k right out of college
<jigga_what> in usa
<dark_light> jigga_what, i dunno if i want live in other country
<dark_light> maybe study
<jigga_what> dark_light: it will feel like brazil no real differences
<jigga_what> exceot language
<jigga_what> except
<jigga_what> i lived in Miami Florida it doesnt feel to much different then Rio does
<jigga_what> i plan to live in one then more country in my life
<jigga_what> 6 months here - 6 months there
<jigga_what> but when i get family i dont know what i will do
<dark_light> even so, this doesn't sound very attractive
<dark_light> :)
<jigga_what> what?
<jigga_what> what you mean ?
<dark_light> jigga_what, by what?
<jigga_what> only thing i dont like about brazil is there is much more poor :(
johnnowak has quit []
<dark_light> it could change
<jigga_what> Beautiful girls living in poverty :(
<jigga_what> yes
<jigga_what> and i belive it will
<jigga_what> but its not an overnight process
<jigga_what> some people talk bad about usa........ some people say this and that ........but economic wise / living wise / income its the best
<jigga_what> i was in Poland.......its 10 times worse then brazil
<dark_light> i want to be a professor of UFRN, or other university
<jigga_what> so i guess it could be worse
<dark_light> specially for the research thing
<jigga_what> ahh
<jigga_what> i run a small business its getting bigger everyday
<jigga_what> and i plan to
<jigga_what> really market it in usa and brazil
<jigga_what> since i see now that the culture of brazil and usa are soo close
Skal has joined #ocaml
<dark_light> business of what?
<jigga_what> marketing firm
<jigga_what> btw
<jigga_what> business of what is not correct
<jigga_what> what kind of business would sound better ;)
<jigga_what> dark_light: i still think brazil needs a democracy
<dark_light> hmm
<dark_light> jigga_what, brasil is alredy one
<dark_light> isn't?
<jigga_what> dark_light: as you know most state things suck .......state hospitals state schools state libraries
<jigga_what> heh getting there ;)
<jigga_what> i will re phrase
<jigga_what> a Capitalisic Democracy
<jigga_what> brazil is a little more socialist
<jigga_what> people with more money send their kidss to private schools
<jigga_what> if you have money you goto a private hispital
<jigga_what> etc etc
<jigga_what> this is all fixed by a more capitalistic democracy
Skal has quit [Remote closed the connection]
<dark_light> jigga_what, doing what, per example?
<jigga_what> dark_light: for example
<dark_light> for example
<jigga_what> do you like the healthcare system ?
<dark_light> i ever though it's said per
<dark_light> jigga_what, obviously no
<jigga_what> in usa you have to buy your healthcare
<jigga_what> some people say OMG THE POOR dont get it etc etc
<dark_light> jigga_what, what's the point?
<jigga_what> the poor can get a certain kind of state healthcare then
<jigga_what> im getitng there ;)
<jigga_what> when you buy your healthcare you get goooood treatment
<jigga_what> and if you have a job full time you have healthcaare its required
<jigga_what> the cheap healthcare in usa is better then the government healthcare here
<jigga_what> if you are rich you live if you are poor you die
<jigga_what> :(
<jigga_what> middle class can go either way ;)
<dark_light> jigga_what, here you have to buy too. the only healthcare that is good is the private. the "basic" healthcare you can get for free
Skal has joined #ocaml
<jigga_what> dark_light: yea i know ;)
<jigga_what> dark_light: thats the way it should be for everyone
<jigga_what> school system would be a better example
<jigga_what> Federal Government doesnt really control the schools
<jigga_what> in usa
<dark_light> so? it's alredy that way
<jigga_what> state government does but they hold metting etc and every person has a good say
<jigga_what> dark_light: which ?
<dark_light> jigga_what, i dislike this approach. i would prefer an entirely government healthcare..
<jigga_what> your not understanding me
<dark_light> hm
<jigga_what> i lived in canada for 2 years
<jigga_what> its 100 percent governm,ent
<jigga_what> you need an operation sorrry we are booked 2 months BUT I NEED THIS OPERATION NOW s orry 2 months
<jigga_what> break your leg
<dark_light> really?
<jigga_what> im usa you can have a cast on it in the next hour
<jigga_what> in canada might be 3-5 days
<jigga_what> yes
<dark_light> jigga_what, only if you have money
<jigga_what> yep
<jigga_what> more taxes you pay the better the treatment
<jigga_what> in usa it works pretty well becasu most people work full time .......and this results in everyone getting full coverage insusurance for MOST full time workers
<jigga_what> now there is the un emplyed etc poor that dont have anything
<jigga_what> ut even then if they need medical care they get it the same as i would
<jigga_what> they just get a bill .......... my insurance pays mine
<dark_light> jigga_what, but the role of government is protect them
<jigga_what> lol
<jigga_what> dark_light: let me give you a great line
<jigga_what> The people should not be afraid of their government, the government should be afraid of their people !
<dark_light> and so, the government should protect their people
<jigga_what> when you give the government power for schools ----- healthcare ----- this service ---- that service .............they hav power over you
<dark_light> it includes those that can't pay for protection
<dark_light> jigga_what, well..
<jigga_what> most governments have that
<jigga_what> like i said if you are pooor your never going to get as good healthcare as a rich man thats fact anywhere
<jigga_what> in the usa i have noticed the poor have it slightly better healthcare wise etc
<dark_light> except for cuba
<jigga_what> cuba is not usa lol
<jigga_what> you like cuba ?
<dark_light> you said anywhere
<jigga_what> lol
<dark_light> jigga_what, yes, high ideals
<jigga_what> your nitpicking ;)
<jigga_what> wait
<jigga_what> you liek Cuba ?
<dark_light> jigga_what, i don't know so much of cuba
<jigga_what> OMG MANNNNNNN
<dark_light> but i like it, yes
* jigga_what runs
<dark_light> jigga_what, ahahahahahhaha
<jigga_what> CUBA
lde has joined #ocaml
<dark_light> jigga_what, you said usa and brazil have so much in common
<jigga_what> communistic government that is known for torturing their people and no freedom of speech
<jigga_what> yes they do
<dark_light> jigga_what, the worldview aren't quite the same
<dark_light> jigga_what, usa tortures too
<jigga_what> nooo
* jigga_what runs again
<jigga_what> the usa does NOT torture
<jigga_what> isf anything its mental games
<dark_light> usa must torture, it's in warfare
<jigga_what> the usa does not pull the skin off your bones while your alive ........electric shock you to death for saying you dont like a government person
<jigga_what> the usa takes terorist that KNOW what the next terroist plot is
<jigga_what> and puts him in a cold room with loud music
<dark_light> but they do this with people suspected of be terrorist
<jigga_what> ^^
<dark_light> for me it's the same
<jigga_what> yes that want to kill 1 million americans
<jigga_what> for me its not
<dark_light> jigga_what, Hmmm, wait
<jigga_what> the usa terror alert right now is at a very high status
<dark_light> jigga_what, well, forgot it..
gene9 has joined #ocaml
<jigga_what> lol
<jigga_what> dark_light: brutally hurting someone is not the same as making someone hear loud music in a cold room
<dark_light> jigga_what, no way you can make sure they do not brutally hurts. after all, they are in war
gene9 has quit [Client Quit]
<dark_light> and torture for me is the same thing, all the world
<jigga_what> dark_light: but cuba is not a stable government and suffers from much supression .......... i lived in MIAMI ........its like 60 percent cuban .................i have heard all the sotries about cuba
<jigga_what> dark_light: in brazil police stations torture people
<jigga_what> that does *not* happen in usa
<dark_light> jigga_what, you are right
<jigga_what> it happened a few times and when it did
<jigga_what> there was 50 million americans in the streets
<dark_light> jigga_what, well, not? if you can guarantee.
<jigga_what> what?
<dark_light> jigga_what, "a few times"
<jigga_what> and the torture in brazil is just people and ways left behind from the militray regine
<jigga_what> yes its happened a few times
<dark_light> yes
<jigga_what> 10 years ago a bunch of police put a stick up a guys ass hurt him bad
<jigga_what> the streets were covered with protesters in all major cities
<jigga_what> the police know they are lines they cannot cross
<jigga_what> in brazil police feel like they are a superior power
<dark_light> jigga_what, i see your point
<dark_light> jigga_what, there are other points here, outsite the "war on terror" thing
<jigga_what> ok dude llol
<dark_light> =)
<jigga_what> the usa does *not* torutre peooe in all im saying ;)
<jigga_what> we do not cut someone tongue out becasue he said something someone does not like
<dark_light> jigga_what, i dislike discussing specially because i have low proficiency in english
<jigga_what> we do not electric shock someone to death
<dark_light> so articulate arguments can be very stressing
<jigga_what> ;0
<jigga_what> well
<jigga_what> torture or no torture
<jigga_what> the usa does no do what i call torture
<jigga_what> some people say a cold room and loud music is torture
<dark_light> do you have your own definitions about torture?:)
<jigga_what> i dis agreee i say the guy that got his tongue pulled out got tortured
<dark_light> so i can't use this word, because it's point of view is disputed
<dark_light> hehehe
<jigga_what> lol
<jigga_what> i see your point
<jigga_what> people in usa have the same view
<dark_light> i could call my "torture" of "green", and your of "blue"
<jigga_what> but if you have a guy that knows about a plot to kill 1 million americans and all you have to do is put him in a cold room and loud music .........why not ?
<flux__> and if he doesn't know?
<flux__> (or: #politics.us)
<jigga_what> lol
<dark_light> ahahahaha
<jigga_what> thye wouldn do it unless they knew he knew
<dark_light> didn't knew that there are a #politics.us
<flux__> simply join, and it'll magically appear!
<dark_light> ehehehe :)
<dark_light> #politics is very fun anyway
ikaros has quit [Read error: 110 (Connection timed out)]
ikaros has joined #ocaml
gene9 has joined #ocaml
<flux__> hmh.. there apparently isn't timed wait on condition in ocaml..
<flux__> suggestions for workaround?
<flux__> it would seem that firing up a thread to just do one sleep would seem wasteful - also how would one stop the thread if your condition is signaled before it times out?
<flux__> and it would seem extra-wasteful to use unix pipes and select
<flux__> ;(
<flux__> and you can only wait for one condition at a time
<flux__> complicated..
gene9 has quit ["leaving"]
gene9 has joined #ocaml
trrkkkkkk has joined #ocaml
trrkkkkk has quit [Read error: 113 (No route to host)]
slipstream has quit [Read error: 104 (Connection reset by peer)]
<flux__> even more complicated than I thought. I need to have a spool of timeout-threads..
slipstream has joined #ocaml
gene9 has quit [Remote closed the connection]
gene9 has joined #ocaml
gene9 has quit ["Client Exiting"]
gene9 has joined #ocaml
descender has joined #ocaml
jigga_what has quit [Read error: 131 (Connection reset by peer)]
<flux__> hmm, I can create 298 threads, but not more, with -thread. is that a limit of ocaml or linux? (2.6 kernel)
<flux__> I think atleast it isn't a linux limit per sé, but could it originate from it? 32-bit playform, btw
malc_ has joined #ocaml
<flux__> hmm, it might be that the process appears to take about one gigabyte of virtual memory
<flux__> I think it simply adds the virtual memory amounts together from the threads
<flux__> ps shows a lot less..
yondalf has joined #ocaml
<flux__> (monologue continues)
<flux__> is it dangerous to assume that retrieving field flag from type t = { mutable flag : bool } is dangerous in multi-threaded apps?
<lde> there's /proc/sys/kernel/threads-max
<dark_light> flux__, well as you might alredy knew i have no clue
<dark_light> heh
<flux__> the file is more than 6k for me
<flux__> I appreciate sympahathetic looks also :)
<lde> well, i guess it's unlikely that you have >5k threads running in other processes, but you can try increasing it :-)
<lde> there's per precess limit in include/nptl/bits/local_lim.h
<lde> _POSIX_THREAD_THREADS_MAX
velco has joined #ocaml
yondalf_ has joined #ocaml
yondalf has quit [Read error: 110 (Connection timed out)]
yondalf_ has quit ["leaving"]
llama32 has joined #ocaml
<llama32> is there some sort of portable and fairly efficient SDL-like lib for ocaml? i know there is a graphics module - does this allow input in some way?
<flux__> yes there is
<malc_> llama32: lablg+lablglut
<flux__> graphics is suitable mainly for prototyping or teaching ocaml
<malc_> s;lablg;lablgl
<llama32> :s gl wasn't what i had in mind
<lde> sdl? :-)
<malc_> lde: ever tried using it with ocaml on macosx?
<lde> oh, macosx
<lde> who uses macs anyway? ;-)
<malc_> "some sort of portable"
<malc_> right right
<malc_> our answer to everything
<llama32> i don't want to use anything that isn't tested on both windows & linux [mac too i guess] - ocaml-sdl isn't tested on windows
<llama32> and i have zero experience with opengl
<lde> so test it!
<llama32> and i'll only be using 2D anyway
<llama32> meh...
<lde> 2d graphics in opengl is pretty straightforward
<malc_> llama32: so.. gl provides all what's required for 2D
<llama32> hmm i guess
<llama32> i've just never seen a tutorial/examples for doing 2D stuff in opengl
<lde> there is a little simple fractal demo in ocaml hump
<malc_> glBegin(GL_LINES); glVertex2f(0., 0.); ...; glEnd(); that's all there is to it
<lde> using opengl
<lde> mandelbrot set even
<flux__> llama32, ocaml-sdl works on windows/cygwin atleast (although I think I needed to patch it a bit to use directx)
<llama32> malc_: actually to a gl newbie like me it's sorta cryptic - esp. the middle - look at it
<malc_> llama32: with begin you tell it to interpret vertexes as line start/end points till glEnd..
<lde> GlDraw.vertex ~x ~y ()
<llama32> well i'll have a look
<llama32> how well supported are the gl/glut libraries in general and on win32?
<malc_> GlDraw.begins `lines; GlDraw.vertex2 (0.0, 0.0); GlDraw.vertex2 (0.0, 1.0); GlDraw.ends (); <- you got yourself a line
<malc_> llama32: they work just fine over here.. couple of x86 linuxes, windows xp, macosx (ppc)
trrkkkkk has joined #ocaml
malc_ has quit ["leaving"]
<llama32> damnit
<llama32> anyone feel like writing an ocaml compiler [backend?] that produces java bytecode?
<llama32> 'Nice' is as close to a real language as i can find for the JVM
<llama32> and i'd rather like to use swing from ocaml ;)
trrkkkkkk has quit [No route to host]
<llama32> actually... is there a spec for ocaml bytecode? maybe some translation would be possible? [i know this would still be a long and tricky task]
DRMacIve1 is now known as DRMacIver
<lde> better write a decent gui toolkit :-)
<llama32> portability is the issue
* llama32 would personally be happy with tk if it had cairo as a canvas
<lde> but java isn't portable
<mellum> JVM is probably not powerful enough to efficiently support many important Ocaml constructs.
<mellum> In particular closures.
<llama32> hmm, i doubt it would be *that* much work to have a small xlib binding that uses cairo for all rendering
<llama32> it supports a lot of things - the java *language* just doesn't [or does very akwardly]
<llama32> [forgive me if i've gotten the term 'closure' confused] it can do closures - nice has them
<llama32> closure = first class functions [that can drag along the environment in which they are created] right?
<haelix> llama32: I think the catch in mellum statement is "efficiently"
<haelix> and I suspect that for each and every generated closure, the nice compiler has to generate some ad-hoc anonymous class
<haelix> after all,
<llama32> possibly
<haelix> closure are just some sugar above Runnable
<haelix> but then, the JVM may not be taylored at loading many many many anonymous classes
<haelix> but, this is all just uneducated guess.
<llama32> when i think about it though, there are quite a few functional [and general closure-oriented] languages that compile to java bytecode... bigloo has a java backend... several smalltalk->bytecode compilers...
<haelix> I would have worried more about plain jvm object overhead
<llama32> i wish parrot was less scripting oriented, mono was more mature, or the jvm was more multi-lingual
<lde> i bet there is some gui toolkit running on as much platforms as jvm
<lde> *many
<llama32> well gtk certainly
<flux__> jvm doesn't have tail-call which leads to inefficient code
<haelix> flux__: couldn't tail call optimisation be handled by the compiler
<llama32> hmm good point flux__ - but is that a guess? it might...
<haelix> (the byte code generator) ?
<flux__> haelix, _efficiently_ ;)
<flux__> llama32, that's been mentioned on many discussions on jvm-support for functional languages
<flux__> java also has the security contexts which make the workarounds more difficult
<llama32> maybe i should put some effort into trying to come up with a bytecode/VM that supports multiple languages of highly varying type/module/OO/... systems, translation from .NET [CIL or whatever] and java bytecode, and either interpritation, JIT compilation or native compilation [and in that case - either dynamically linked, or whole program optimized]
<lde> well, jvm was designed for java. and java being about the worst widely used language... ;-)
<llama32> agreed :s
<haelix> flux__: you're not alone in saying that - http://www.artima.com/weblogs/viewpost.jsp?thread=176597
<haelix> flux__: so being outnumbered on this I will give up on that. After all, I'm not too knowledgeable on byte code issue, but in my mind, having a goto was all that was required to have efficient tail call elimination
<flux__> haelix, I believe goto is something that doesn't work with the security contexts appropriately
<haelix> llama32: isn't that a bit ambitious of a plan ?
<llama32> haelix: all the good ones are :)
delamarche has quit []
<lde> maybe try to make qt bindings for ocaml first, as a warm-up ;-)
<llama32> meh
<llama32> qt is utterly awesome... but commercial
<llama32> :(
<llama32> not that that effects me
<llama32> but free software isn't worth working on unless you know it can really be used freely
<lde> it's commercial for windows afaik
<lde> and i heard it's going to be free soon
<llama32> nah - [now] it's GPL if your app is GPL, and you pay if your app is commercial/closed source
<lde> oh, right
<llama32> qt4 is utterly awesome
<llama32> it almost makes me *want* to use C++
<lde> hm
<lde> so it is free
<flux__> haelix, the problem is that inter-function goto isn't allowed
<llama32> i open up qt assistant and go "wow... this is sooo smooth and cool looking"
<llama32> well yeah, if you're use for it is free - but i think people like the debian crowd don't call this free
<llama32> well debian still includes it
<lde> yes, this is free
<llama32> but the free software purists anyway :)
<haelix> flux__: you've left me behind, here
<lde> in the free software sense
<lde> it's gpl
<haelix> what's the canonical example for multi-function tail-call elimination ?
<haelix> odd/even ?
<lde> you can't make commercial software using gpl software anyway
<llama32> yes you can...
<lde> no, your thinking about lgpl
<lde> *you're
<llama32> oh, yeah... near enough :)
<llama32> though, i'm sure you could somehow work around it in most cases anyway
<lde> they say you can get around every law
<llama32> by eg open sourcing the app's GUI in a .exe that uses gtk, and simply calls on your library [that makes up the bulk of your app] - that library being the commercial part
<llama32> i bet that's legal
<llama32> gtk is probably lgpl anyway though
<haelix> ok, I didn't know about non-recursive tail calls. More food for thought, here
<llama32> .exe :| wow, i'm starting to talk like a windows user...
* llama32 needs to come across a decent, up-to-date linux distro without downloading it [dialup] or getting it off magazines [they all use DVD these days - and no DVD drive :(]
<lde> you can get a dvd drive for about the price of a magazine ;-)
<llama32> yeah, but that would involve using my brain
<llama32> and possibly my legs [computer shop is a bit uphill from the newsagency]
<llama32> plus i'd probably be tempted to buy a new keyboard, mouse, speakers and motherboard as soon as i walk into the shop
llama33 has joined #ocaml
<llama33> stupid dialup
llama32 has quit [Read error: 60 (Operation timed out)]
delamarche has joined #ocaml
llama33 has left #ocaml []
gene9 has quit ["Client Exiting"]
_velco has quit [Read error: 145 (Connection timed out)]
bmiller has joined #ocaml
danly has joined #ocaml
delamarche has quit []
danly has quit [Read error: 104 (Connection reset by peer)]
velco has quit ["Ex-Chat"]
danly_ is now known as danly
smimou has joined #ocaml
pango_ has joined #ocaml
pinup has joined #ocaml
pango has quit [Remote closed the connection]
trrkkkkkk has joined #ocaml
Smerdyakov has joined #ocaml
trrkkkkk has quit [Read error: 145 (Connection timed out)]
bluestorm has joined #ocaml
trrkkkkkk has quit [Remote closed the connection]
david_koontz has quit [Remote closed the connection]
ita has joined #ocaml
postalchris has joined #ocaml
pinup has quit []
Slack4020 has joined #ocaml
delamarche has joined #ocaml
pango_ has quit [Remote closed the connection]
delamarche has quit []
pango_ has joined #ocaml
david_koontz has joined #ocaml
ita has quit [Remote closed the connection]
Slack4020 has quit ["Konversation terminated!"]
<pinupgeek> man learning ocaml is hard
<pango_> depends on what you already know...
<pinupgeek> i'm going through Jason Hickey's book
<pinupgeek> yes, that one
fab__ has quit [Read error: 104 (Connection reset by peer)]
pinupgeek has quit []
fab__ has joined #ocaml
delamarche has joined #ocaml
delamarche has quit []
bluestorm has quit ["Konversation terminated!"]
Mr_Awesome has joined #ocaml
bluestorm has joined #ocaml
bluestorm has quit [Remote closed the connection]
postalchris has quit [Read error: 110 (Connection timed out)]
falconair has joined #ocaml
edwardk has joined #ocaml
Skal has quit [Remote closed the connection]