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/
<ayrnieu> newbcoder - http://del.icio.us/tag/camlp4
<love-pingoo> I doubt that macros are as easy to use as in some lisps, but I'd say that we need less macros
<newbcoder> and why do you need less macros?
<zmdkrbou> and we don't want to use macros as in lisp ...
<love-pingoo> I dunno.. because the language is more expressive ? I never used lisp a lot, so I don't know the typical macros these guys use..
<ayrnieu> I wouldn't say that we need them less; I'd say that we use them less. Anyway, I just gave you a very nice URL.
<love-pingoo> ayrnieu: indeed there are some good articles, but the reference is outdated (3.07)
<newbcoder> ayrnieu, do you know ocaml; scheme; erlang; and haskell?; you seem to be everywhere i go
<love-pingoo> newbcoder: are you looking for a language to learn with a specific goal in mind ? some kind of app you'd like to write ?
<ayrnieu> newbcoder - I'm more comfortable with Erlang and CL than with Scheme or O'Caml or Haskell, right now.
<newbcoder> I just want to maximize my programming efficiency.
<newbcoder> in particular; I'm interested in OS leevel stuff
<newbcoder> and machine learning related works
Leonidas has quit ["An ideal world is left as an exercise to the reader"]
<zmdkrbou> what do you call "OS level stuff" ?
<newbcoder> playing with user mode linux
<newbcoder> I guess no tlow level device driver writing
<newbcoder> but dealing with virtual machines
<newbcoder> also being able to do system call interposition
<newbcoder> i'm not out to write my own os
<zmdkrbou> low level is quite hard to handle using ocaml
shawn__ has joined #ocaml
<pango_> newbcoder: your definition of strong static typing is inaccurate... If it was just that, it would be relatively easy to retrofit it in dynamically checked languages which is usually not the case (See the interesting link near the bottom of the page Smerdyakov indicated first: http://perl.plover.com/yak/typing/)
<pango_> also, it's like definiting functional languages as "you can't use side effects"; it doesn't explain anything about its usefulness
<pango_> s/languages/paradigm/
newbcoder has quit ["Leaving"]
Demitar_ has joined #ocaml
Demitar has quit [Read error: 110 (Connection timed out)]
bzzbzz has joined #ocaml
pango_ has quit [Remote closed the connection]
pango_ has joined #ocaml
chessguy has quit [Connection timed out]
<youknow365> i need to play a sound ......for incoming messages ........how can o do this any kind of format for ocaml to play any kind of sound i know theres SDL lib but anything else ?
<ayrnieu> other than mplayer? Talking to a 'sound daemon'? I don't know.
<youknow365> like alsa
<youknow365> for my im client you know my incoming sound
<youknow365> or am i going to have to write a small wrapper for like alsa or something
<ayrnieu> I would just call out to mplayer to play the audio, not having a sound daemon in my environment.
<Smerdyakov> What's wrong with SDL?
<youknow365> nothig but kinda hefty for just sound
<youknow365> well i guess i could just cut out everything but the sound stuff couldn't i
<youknow365> hmmmmmm
jeremy_c has joined #ocaml
<Smerdyakov> Everyone in the tuned-in world has SDL installed, anyway.
<youknow365> i will just statically link the Souind portion i think its pretty small
<youknow365> 400 kb or something
<Smerdyakov> It's reprobates like you who keep static linking alive.
<youknow365> huh ?
<Smerdyakov> Are you doing binary-only distribution or something?
<youknow365> Yes
<Smerdyakov> For what platform?
<youknow365> linux and windows
<Smerdyakov> Laaame
<Smerdyakov> I'm sorry I gave any advice to a closed source goofball. :P
<youknow365> giving source could compermise my application
<Smerdyakov> It must be a poorly designed application.
<youknow365> and since this is for bussiness use not oh what fun to make an im client i need security
<Smerdyakov> There's this wacky thing called "cryptography"....
<youknow365> but why would i give source ?
<youknow365> just why whats the point ?
<youknow365> i dont want the application midifed at all
<youknow365> modified
<ayrnieu> (boring conversation alert!)
<youknow365> ayrnieu: yes
<Smerdyakov> But other people might want that, and you might find yourself enjoying a feature added by one of them.
<youknow365> Not for this trust me
<Smerdyakov> Not to mention that security-conscious users should demand open source, so that they can audit it for flaws.
<youknow365> iagree with you in al other situations
<youknow365> i sure will feel good though when i get this done
<youknow365> im trying to get all TCP stuff done tongiht with this im client
<youknow365> message sending and reciivng / checking
gmh33_ has joined #ocaml
b00t has joined #ocaml
gmh33 has quit [Read error: 101 (Network is unreachable)]
<jeremy_c> How do I make Ocaml bind a module? ocaml query.ml === Unbound module Postgresql (I have it installed)
bzzbzz has quit ["leaving"]
jcreigh has joined #ocaml
piggybox has quit []
b00t has quit [Remote closed the connection]
dark_light has quit ["Ex-Chat"]
bohanlon has joined #ocaml
jewel has joined #ocaml
jcreigh has quit ["Cuius rei demonstrationem mirabilem sane detexi. Hanc marginis exiguitas non caperet."]
love-pingoo has quit [Remote closed the connection]
love-pingoo has joined #ocaml
Snark has joined #ocaml
Wild_Cat has joined #ocaml
_velco has joined #ocaml
<flux__> do you want to interactively use it?
Wild_Cat has quit []
<jeremy_c> flux__: yes.
<flux__> jeremy_c, do you use findlib?
<jeremy_c> flux__: yes
<flux__> well, if loading query.ml interactively too is enough, you could maybe write #use "topfind";; and #require "postgresql";; and then #load "yourstuff.ml";;
<pango_> s/#load/#use/ (#load is for bytecode compiler -.cmo- files)
<pango_> compile*d*
smimou has joined #ocaml
DRMacIver has quit [Read error: 104 (Connection reset by peer)]
DRMacIver has joined #ocaml
<flux__> right
<flux__> my defence is that I rarely use that :)
<pango_> me neither
<jeremy_c> Can anyone look at: http://pastebin.ca/166716 ... it's a problem with Postgresql.connection. I think OCaml is goofing up determining types.
<zvrba> rarely
<zvrba> i thought that too once and discovered a bug in my own code
<flux__> jeremy_c, new .. ();;
<flux__> jeremy_c, you're partially instantiating the connection
<flux__> jeremy_c, as you can see from the error: 'has type ... -> unit -> Postgresql.connection'
<pango_> good spotting
<flux__> I recently wrote a function like: let func state : state -> int -> foo -> unit = fun state -> ..
<flux__> it took me atleast 10 minutes to find out why func state; complained about a partial call
<flux__> but now I'm again using caml-types.el in xemacs, it should make spotting those much easier :)
<jeremy_c> flux__: I didn't see that. Thank you.
<flux__> jeremy_c, btw, how long had you been wondering that?-)
<jeremy_c> 15 mins
<jeremy_c> I learned the basics of ocaml about 1 1/2 year ago. Just goofing w/it some more this morning.
<jeremy_c> have not used it in anything but a few simple utils, unfortuantly.
Carillon has joined #ocaml
Wild_Cat has joined #ocaml
llama32 has joined #ocaml
<llama32> is there a library for HTTP clients that can also do HTTPS?
jeremy_c has quit [Client Quit]
Carillon_ has quit [Read error: 110 (Connection timed out)]
Carillon is now known as Carillon_
velco has joined #ocaml
<llama32> ooh, thanks
<pango_> I see no recent update, so I can't tell how well it works... But that's what looks closest to what you're looking for, I suppose
<pango_> found nothing in Hump or Godi...
<llama32> yeah should be fine
<smimou> otherwise, any http library could easily be made using ocaml-ssl by changing Unix sockets to Ssl sockets
luca83 has quit ["Download Gaim: http://gaim.sourceforge.net/"]
shawn__ has quit [Read error: 110 (Connection timed out)]
shawn__ has joined #ocaml
shawn__ has quit [Client Quit]
luca83 has joined #ocaml
shawn__ has joined #ocaml
_fab has joined #ocaml
smimou has quit ["bli"]
love-pingoo has quit ["Leaving"]
Snark has quit ["Leaving"]
llama32 has left #ocaml []
luca83 has quit ["Download Gaim: http://gaim.sourceforge.net/"]
slipstream-- has joined #ocaml
rk_afk has quit [Client Quit]
ramkrsna has joined #ocaml
slipstream has quit [Read error: 110 (Connection timed out)]
Wild_Cat has quit ["Leaving"]
mikeX has joined #ocaml
jewel has quit [Read error: 110 (Connection timed out)]
jeremy_c has joined #ocaml
_JusSx_ has joined #ocaml
chessguy has joined #ocaml
Snark has joined #ocaml
|Lupin| has joined #ocaml
<|Lupin|> Hi.
chessguy has quit [Read error: 110 (Connection timed out)]
<ppsmimou> hi
<|Lupin|> hi ppsmimou
Snark has quit [Read error: 110 (Connection timed out)]
Snark has joined #ocaml
luca83 has joined #ocaml
chessguy has joined #ocaml
|Lupin| has left #ocaml []
chessguy has quit [Client Quit]
chessguy has joined #ocaml
velco has quit ["Ex-Chat"]
ramkrsna has quit [Remote closed the connection]
chessguy has quit [" HydraIRC -> http://www.hydrairc.com <- Try something fresh"]
Carillon has joined #ocaml
ramkrsna has joined #ocaml
Carillon has quit [Read error: 104 (Connection reset by peer)]
smimou has joined #ocaml
Carillon_ has quit [Connection timed out]
Carillon_ has joined #ocaml
_jol_ has joined #ocaml
Carillon_ has quit [Read error: 110 (Connection timed out)]
_JusSx_ has quit ["leaving"]
Carillon_ has joined #ocaml
jeremy_c has quit [Client Quit]
ayrnieu has quit ["system"]
jeremy_c has joined #ocaml
_jol_ has quit ["leaving"]
jeremy_c has quit [Client Quit]
_jol_ has joined #ocaml
jeremy_c has joined #ocaml
newbcoder has joined #ocaml
<newbcoder> oh man; static typing is kidn of cool
<newbcoder> and with unions i still get dynamic types
<newbcoder> except I just define the set of types that the var can take on right?
<pango_> no, all constructors have the same type
<pango_> it's just different 'values'
<pango_> but yes, each constructor can have arguments of different types
mikeX has quit ["leaving"]
jeremy_c has quit [Client Quit]
jeremy_c has joined #ocaml
newbcoder has quit ["Leaving"]
_jol_ has quit ["temci lo nu sipna"]
newbcoder has joined #ocaml
<newbcoder> objective caml for scientists is totally too expensive for college studnets; anyone know where i can get similar information for cheaper? perferably free
<zvrba> i hate comment syntax :)
<zvrba> huh?
<zvrba> caml.inria.fr
<zvrba> are you talking about a book or what?
_velco has quit ["I'm outta here ..."]
Snark has quit ["Leaving"]
Wild_Cat has joined #ocaml
jeremy_c has quit [Client Quit]
Wild_Cat has quit []
luca83 is now known as LUCAS
<youknow365> in an ocaml app how can i get the execution tieme it took to run the app ?
<pango_> from within the program, or outside ?
<youknow365> umm what way would be more accurate ?
<pango_> from within, you can run Unix.time () before and after, and make the difference
<pango_> if you need something more accurate, you'll find a module called Benchmark in the Hump
<youknow365> i seeeeee
<youknow365> im justtrying different ways of doingthings but eventully i want to try each thing seperately and get the fastest way
<pango_> there's also two ways of profiling ocaml programs
<youknow365> how so ?
<pango_> bytecode profiling can give you the number of time several branches were taken
<pango_> native profiling gives you time spent in different functions
<youknow365> ahhh
<youknow365> how do i find this out ?
<youknow365> i see isee good good :P
<youknow365> but i will do this once i get my app done :)
<pango_> yes
Eelis has joined #ocaml
<smimou> pango_: just a supid question, why are you hiding your identity?
<smimou> (I mean the use of tor in particular)
<pango_> smimou: because of stupid laws in my country
<smimou> is it illegal to chat in your country?
<smimou> or is it France? :)
<pango_> developing applications is becoming a dangerous activity ;)
<pango_> yes
<smimou> aha
<smimou> those law are completely dumb and are innaplicable anyway
<smimou> +s
<pango_> better safe than sorry ;)
<smimou> well, let's not become paranoid
<pango_> some amount of paranoia is good
<smimou> hum, I'm the maintainer of mldonkey in Debian, we'll see if you were right...
shawn__ has quit ["This computer has gone to sleep"]
<pango_> with Sylvain ? Didn't notice there was 2 maintainers
<smimou> Sylvain wanted to be relieved of the work a little bit
<pango_> b8_bavard wrote a book on legal usages of p2p, with an ad for his new p2p application called Palabre
<pango_> the web site disappeared, and the cvs repository was never completely filled
<smimou> do you have any evidence of pressures from anywhere ?
<smimou> and btw, google is a very powerful tool, I think I've got your real name :)
<pango_> sure
<pango_> never thought it would become "illegal" someday
<smimou> let's hope this will change with the next governement.....
<pango_> but let's not have too much hope either
<smimou> yes, it was partly a joke, I'm afraid the worse is to come
<pango_> french sites about mldonkey usage on Mac already "cleaned" their sites
<pango_> removing all references to p2p and looking for new topics of discussion :)
<youknow365> what gui dpes ML donkey use ?
<youknow365> does*
<pango_> tons
<youknow365> which one does it use most and people say its slow becasue of it
<pango_> I think most people use sancho, but have no hard numbers
<pango_> and that's the official gui client that I find slow (mlgui)
<pango_> specially the new versions, that use gtk2
<youknow365> are you saying gtk is slow ?
<youknow365> also how can i trap exceptions such as exception Unix.Unix_error(63, "connect", "")
<pango_> gtk2 is slower than gtk1, but I assume new versions of mlgui aren't slower just because of that
<youknow365> i think gtk2 is a very fast gui
<youknow365> what exactly is MLgui ?
<pango_> the official mldonkey gui... The one that comes in the same cvs repository
<youknow365> is it build on gtk or is it its own thing ?
<pango_> I answered that already
<youknow365> what is mlgui
<youknow365> a new gui system ?
<pango_> an application
<pango_> that uses lablgtk2
<youknow365> so how is it slow
<youknow365> coded bad or something
<pango_> probably... I'm not in gui programming
<pango_> the only think I did that somewhat had a GUI interface was a VB3 program, in '94 ;)
<youknow365> i see so if i use lablgtk is going ot be slow ?
<youknow365> no matter how well i code the program ?
<pango_> did I say that ?
<youknow365> i thoght you kidna inferred that lablgtk2 was a pos
<pango_> I said that gtk2 was slower than gtk1
<youknow365> i never used mlgui so i dunno
<youknow365> ok ?
<youknow365> i dont see any problem with gtk2 myself
<youknow365> gtk1 was never even considered stable
<pango_> gtk1 is less of an option by the day, no matter the extra bloat of gtk2...
<pango_> so I'm not suggesting using gtk1 either
<youknow365> but how can i trap exceptions in ocaml i looked over some docs but still cant figure it out
<youknow365> gtk1 looked like crap in my opinion
<pango_> try ... with ... construct
<youknow365> the error is exception Unix.Unix_error(63, "connect", "")
<descender> youknow365, not properly internationalized either
<youknow365> what ?
<pango_> descender: yes, that's more important
<youknow365> ?
<youknow365> exception Unix.Unix_error(63, "connect", "") << how can i trap the connect out of there or whatever is in there
<pango_> youknow365: try ... with Unix.Unix_error (error, function, argument) -> (* handle exception here *)
<youknow365> pango_: im still lost by what you mean is their any tutorials on this anywhere ?
<pango_> see chapter on exception for try ... with ... construct, and Unix module for the description of Unix_error
<youknow365> dont i need an IF statement ?
<pango_> try ... with ... already does pattern matching for you
<youknow365> what exactly is try...with liek a switch statement or what ?
<pango_> on steroids, but yes
<youknow365> is there anything on ocamltutorial.org on this ?
<youknow365> do you know of
piggybox has joined #ocaml
<youknow365> pango_: man i must be a n00b man casue that didnt make very myc sense to me
<pango_> would probably have if you had read the document in order ;)
<TSC> ... or at all
<pango_> pattern matching is used in several places, so it's probably explained earlier
smimou has quit ["bli"]
shawn__ has joined #ocaml
shawn__ has quit [Client Quit]
shawn__ has joined #ocaml
m3ga has joined #ocaml
<youknow365> there at the bottom is what i need ot do right
<youknow365> ?
m3ga has quit ["disappearing into the sunset"]
<pango_> what are you looking at exactly ?
<youknow365> match Sys.os_type with
<youknow365> "Unix" | "Cygwin" -> (* code omitted *)
<youknow365> | "Win32" -> (* code omitted *)
<youknow365> | "MacOS" -> (* code omitted *)
<youknow365> | _ -> failwith "this system is not supported"
<youknow365> the only two errors i can get while connecting in ECONNREFUSED and ETIMEOUT
<pango_> that the match ... with ... construct, that also uses pattern matching
<pango_> the syntax is similar
<youknow365> pango_: i know but i am totoally lost i cant find anything on it .........this learning ocaml is tribial to hard for me to learn when i finnaly do figure it out its as easy a pie
<youknow365> my objective for tonight is to get a tcp stuff done and get a successful connection to a jabber server which shouldn't be all too hard
<pango_> above example of pattern matching is very simple however - just pattern matching a string against a set of string constants
<pango_> it can do much more than that
<youknow365> well imma try and throw something together and i will show you
<youknow365> also are the mailing list helpful ?
<pango_> haven't used the beginners one (requires a Yahoo account, yuck), and I'm not sure the regular list is ok if you haven't read documentation first ;)
<youknow365> i seeee
<youknow365> i am just subcribed to the regualr one
<youknow365> once i get all this TCP stuff one it will be all GUI stuff
<youknow365> which should not be as trivial
<pango_> the archives of the regular list are very interesting, so I'd say yes, it is helpful
<youknow365> i picked a more difficult project to start in
<youknow365> atleast i am almost use to the syntax and alot of the basic stuff
newbcoder has quit ["Leaving"]
<youknow365> only thing i am stillkidna windering is ;; is for top level functions right ?
<youknow365> typo*
<pango_> I've found the best explanation for ;; usage in the ocaml-tutorial.org
<youknow365> i will lookat it again ;)
<youknow365> i kinda just skimmed it
<pango_> "structure of ocaml programs"
<pango_> "Using and omitting ;; and ;"
jcreigh has joined #ocaml
<pango_> ocaml-tutorial is a 10 miles high view on the language, it already skips a lot of details (and leaves many things unexplained, imho)
<youknow365> i dont see anything about try ...with on there
<pango_> yup, looking for "exceptions" gives many pages, but it seems there's no central place talking about exceptions
<pango_> personally I've learned with "developing applications with objective caml", but ocaml-tutorial.org didn't exist at a time
<pango_> I'm not sure how helpful it would have been for me at the time; I prefer being taught things in a more formal way, so I'd probably go for "developing..." again
<youknow365> whati s developing ?
<youknow365> i mean what reference are you talking about
<youknow365> o that :( lol
<youknow365> imma take a 15 min break and be back once i get this exception stuff it will make things alot easier