datrus has quit [sterling.freenode.net irc.freenode.net]
slipstream has quit [sterling.freenode.net irc.freenode.net]
shawn has quit [sterling.freenode.net irc.freenode.net]
pattern has quit [sterling.freenode.net irc.freenode.net]
TSC has quit [sterling.freenode.net irc.freenode.net]
mattam has quit [sterling.freenode.net irc.freenode.net]
Norgg has quit [sterling.freenode.net irc.freenode.net]
sponge45 has quit [sterling.freenode.net irc.freenode.net]
youknow365 has quit [sterling.freenode.net irc.freenode.net]
zmdkrbou has quit [sterling.freenode.net irc.freenode.net]
Amorphous has quit [sterling.freenode.net irc.freenode.net]
WiSmErHi| has quit [sterling.freenode.net irc.freenode.net]
finelemon has quit [sterling.freenode.net irc.freenode.net]
Eelis has quit [sterling.freenode.net irc.freenode.net]
khaladan has quit [sterling.freenode.net irc.freenode.net]
shans_home has quit [sterling.freenode.net irc.freenode.net]
ertai has quit [sterling.freenode.net irc.freenode.net]
danly has quit [sterling.freenode.net irc.freenode.net]
Hadaka has quit [sterling.freenode.net irc.freenode.net]
EsotericMoniker has quit [sterling.freenode.net irc.freenode.net]
Oatmeat|cs has quit [sterling.freenode.net irc.freenode.net]
ppsmimou has quit [sterling.freenode.net irc.freenode.net]
pango_ has quit [sterling.freenode.net irc.freenode.net]
joshcryer has quit [sterling.freenode.net irc.freenode.net]
maml has quit [sterling.freenode.net irc.freenode.net]
ramkrsna has quit [sterling.freenode.net irc.freenode.net]
dark_light has quit [sterling.freenode.net irc.freenode.net]
Revision17 has quit [sterling.freenode.net irc.freenode.net]
DRMacIver has quit [sterling.freenode.net irc.freenode.net]
datrus has joined #ocaml
finelemon has joined #ocaml
Eelis has joined #ocaml
ertai has joined #ocaml
shans_home has joined #ocaml
Amorphous has joined #ocaml
youknow365 has joined #ocaml
sponge45 has joined #ocaml
khaladan has joined #ocaml
TSC has joined #ocaml
Revision17 has joined #ocaml
danly has joined #ocaml
slipstream has joined #ocaml
WiSmErHi| has joined #ocaml
ramkrsna has joined #ocaml
maml2 has joined #ocaml
DRMacIver has joined #ocaml
pattern has joined #ocaml
Oatmeat|cs has joined #ocaml
ppsmimou has joined #ocaml
EsotericMoniker has joined #ocaml
Naked has joined #ocaml
Naked is now known as Hadaka
shawn__ has joined #ocaml
mattam has joined #ocaml
Norgg has joined #ocaml
pango has joined #ocaml
Smerdyakov has joined #ocaml
<youknow365>
how much time would i save doing my im client in something like Ruby or something ?
<youknow365>
or should i even use Ocaml
<youknow365>
people are telling me i am not doign anything number crunching and what i am doing an im client will work just fine in Rubyu
<Smerdyakov>
A skilled programmer who knows both languages will be more productive with OCaml.
dark_light has joined #ocaml
<youknow365>
Smerdyakov: serious ?
<Smerdyakov>
Yes
<youknow365>
i thought ruby would be faster to code in ?
<Smerdyakov>
Nope, not for someone who knows what he's doing.
<youknow365>
hmmmmmm
<youknow365>
i know ruby better then ocaml do you think i should continue learning ocaml and do it or do it in Ruby ?
<Smerdyakov>
Beats me.
<Smerdyakov>
It sounds so far like you might not be cut out for ML. ;)
<youknow365>
well its a big chnage
<youknow365>
and the learning curve is steep in my opinion
<Smerdyakov>
It's designed for scientists and engineers, not for anyone who isn't serious about learning to program effectively.
<youknow365>
i've noticed
<youknow365>
C is easier then it
<youknow365>
but c code looks more confuing
<dark_light>
i find the ML-style of solving the common things easier
<dark_light>
the let a = bleble in blabla is really a nice thing..
<youknow365>
i think i am going to write my im client in Ruby just casue i need it done fast .........maybe later i will port to Ocaml or something but i dont think iwill see any perforamnce change in Ruby or ocaml or anhing its an im client
<Smerdyakov>
If you think the main reason to prefer OCaml would be runtime performance, then you have a lot to learn.
<youknow365>
i didnt say that
<youknow365>
but its a reason
<dark_light>
rule 1 about optimization: don't do it. rule 2 about optimization (for experts only): don't do it yet
<youknow365>
i like the recursive function stuff tooo
<youknow365>
then why would any company use ASM ?
<youknow365>
i thought they would use it for optmimazation ?
<youknow365>
but if nothing needs ti why use it
<dark_light>
youknow365, there are few cases you need a optimization so far (like embedded systems). usually when you need asm, you need asm only at one small point
<youknow365>
hmmmm
<youknow365>
well i dont think a im client or bittorennt client is by any means cpu intense
<youknow365>
i think it will work just fine in Ruby ...fast i hope
<dark_light>
youknow365, if you do it well, i am sure you will have no performance problems
<Smerdyakov>
...and you won't need to think about optimization on embedded systems by 5 years from now, because I will solve that problem. ;)
<dark_light>
Smerdyakov, eheheheh, you, how? :P
<Smerdyakov>
Smart compilers, of course
<dark_light>
:)
<dark_light>
youknow365, there are a emule client named MLdonkey that is the unique gui program i know that uses ocaml. and it is unusually slow
<Smerdyakov>
I almost have an important piece done now, worked on as we speak: automatic generation of syntactic support code for Coq language definitions.
<dark_light>
youknow365, someone here said it's a MLdonkey's problem, not a problem of ocaml
<Smerdyakov>
I'm working on tools to make that kind of task easier.
<dark_light>
Smerdyakov, it's like a profiler?..
<Smerdyakov>
Not even close.
<dark_light>
so i can't understand how can it generate faster code
<Smerdyakov>
The idea is that you generate code that is at least as fast as hand-written C, but you do it from a higher level language via a smart compiler.
<dark_light>
it's like analyzing patterns with heuristics and turn it into simpler code?..
<Smerdyakov>
Yes.
<Smerdyakov>
The same as all optimizing compilers.
<Smerdyakov>
The problem is that the high-level language people don't seem to talk much with the embedded systems people, so the good ideas aren't available there yet.
<dark_light>
i never though in developing software for embedded systems in ocaml
<Smerdyakov>
I'm not planning to use OCaml. I'm more into pure functional languages.
<dark_light>
one day i was in a laboratory when it was in a 'project for embedded systems' and the professor was saying.. "you might want to code in C, but sometimes the compilers aren't very smart so usually you have to code in assembly".. that scared me a bit..
<dark_light>
Smerdyakov, but coq is written in ocaml..
<Smerdyakov>
So?
<dark_light>
so you will apply it with wich language? lisp? haskell?
<Smerdyakov>
New domain-specific languages
<Smerdyakov>
No one calls Lisp or Scheme pure functional, and even Haskell isn't pure enough for me, because any type is inhabited by diverging computations. :)
<dark_light>
such as? i would think that if the optimizing tool is in ocaml, sounds natural that the target language is in ocaml..
khaladan has quit [Connection timed out]
shekmalhen has joined #ocaml
pango_ has joined #ocaml
<Smerdyakov>
You're asking which new domain-specific languages I would use? :)
<youknow365>
dark_light: is MLdonkey slow
pango has quit [Remote closed the connection]
jcreigh has joined #ocaml
zvrba has quit [Read error: 60 (Operation timed out)]
jcreigh has quit ["Cuius rei demonstrationem mirabilem sane detexi. Hanc marginis exiguitas non caperet."]
dark_light has quit [Read error: 110 (Connection timed out)]
jcreigh has joined #ocaml
dark_light has joined #ocaml
<dark_light>
<Smerdyakov> You're asking which new domain-specific languages I would use? :)
<dark_light>
yes, specially with a link
<Smerdyakov>
Maybe it wasn't clear that I'm planning to design them myself, and they don't exist yet.
<dark_light>
ah
<dark_light>
wow :)
jcreigh has quit ["Cuius rei demonstrationem mirabilem sane detexi. Hanc marginis exiguitas non caperet."]
sponge45 has quit ["zzzzzzzz"]
Smerdyakov has quit ["Leaving"]
shekmalhen has quit ["leaving"]
b00t has joined #ocaml
Snark has joined #ocaml
joshcryer has joined #ocaml
zvrba has joined #ocaml
smimou has joined #ocaml
<pango_>
dark_light: s/mldonkey/mlgui/ (that's only the gui frontend that's slow to react, the client in itself is fine)
love-pingoo has joined #ocaml
Wild_Cat has joined #ocaml
smimou has quit ["bli"]
<shans_home>
how do I use camlp4 in an application?
<shans_home>
if I put a #load "camlp4.cma" directive at the top I get syntax errors on my parser streams (on the [< >] tokens)
<shans_home>
sorry, #load "camlp4o.cma"
pango_ has quit [Remote closed the connection]
pango_ has joined #ocaml
<dark_light>
shans_home, #load is only for toplevel (the ocaml interpreter)
<shans_home>
ah, OK
<dark_light>
shans_home, for use with compiled you must indicate it in command line
<shans_home>
dark_light: I figured out how to compile, with -pp
<dark_light>
a makefile would help..
<shans_home>
but what about if I want to run through the interpreter?
<shans_home>
dark_light: yep, got one :)
<dark_light>
shans_home, well, i don't know.. i think interpreter wasn't really build for running applications
<shans_home>
OK
<shans_home>
fair enough, thanks :)
<dark_light>
:)
b00t has quit [Remote closed the connection]
dark_light has quit [Remote closed the connection]
finelemon has quit [Read error: 113 (No route to host)]
zvrba has quit [Remote closed the connection]
finelemon has joined #ocaml
zvrba has joined #ocaml
zmdkrbou has joined #ocaml
Boojum has joined #ocaml
Snark has quit [Read error: 110 (Connection timed out)]
Boojum is now known as Snark
love-pingoo has quit ["Leaving"]
EsotericMoniker has left #ocaml []
tlavoie has joined #ocaml
gim has quit [Read error: 110 (Connection timed out)]
Smerdyakov has joined #ocaml
ppsmimou has quit [Read error: 110 (Connection timed out)]
<WiSmErHi|>
hi
gim has joined #ocaml
ppsmimou has joined #ocaml
shawn__ has quit ["This computer has gone to sleep"]
smimou has joined #ocaml
Wild_Cat has quit ["Leaving"]
tlavoie has quit ["[BX] For a good time, call 1-900-4BitchX"]
_jol_ has joined #ocaml
_jol_ has quit ["leaving"]
velco has joined #ocaml
shawn__ has joined #ocaml
Yorick has joined #ocaml
tennin has joined #ocaml
mwc has joined #ocaml
EsotericMoniker has joined #ocaml
Smerdy has joined #ocaml
Smerdyakov has quit [Read error: 110 (Connection timed out)]
mwc has quit ["Biologists think they're chemists, Chemists think they're physicists, Physicists think they're mathematicians, and Mathematic]
Other_Adam has joined #ocaml
<WiSmErHi|>
does we can play with the graphics lib and use open_graph fonction on windows ?
<Other_Adam>
how do I get the inet_addr of a sockaddr so I can call Unix.string_of_inet_addr on it?
<zmdkrbou>
WiSmErHi|: i think so
<zmdkrbou>
Other_Adam: you look at the manual (you can use a pattern matching on Unix.ADDR_INET(a))
<zmdkrbou>
(Unix.ADDR_INET(a,p) and p is what you're looking for, to be precise)
<WiSmErHi|>
yes we can ;) but we must do : #load "graphics.cma";;
<zmdkrbou>
yes, as for all other libs which are not loaded with the default toplevel
<WiSmErHi|>
i was thinking that a native lib but not ;) i could finish my graphics with sheep and wolf tomorrow ;)
<WiSmErHi|>
does we have a function who return the object type or var type ? i must control my type
<zmdkrbou>
no
<zmdkrbou>
this is dirt :)
<WiSmErHi|>
^^
<zmdkrbou>
plus that doesn't make sense
<zmdkrbou>
you always know the type of your expressions when you write it
<zmdkrbou>
s/it/them/
<WiSmErHi|>
if i have type test = A | B ;; type test2= Sometest of test;; and i construct and object list Sometest(A) :: Sometest(B) :: [] how can i know with a match pattern if i have Sometest(A) or Sometest(B) i must use conditionnal form ?
<WiSmErHi|>
like |aa::qq -> if aa = Sometest(A) then ... ?
<zmdkrbou>
nope, you juste match
<WiSmErHi|>
hum how match ? |Sometest(A)::qq ->
<zmdkrbou>
match v with Sometest(A) -> bla | Sometest(B) -> bli
<WiSmErHi|>
okiiiiiii
<WiSmErHi|>
thxxx :D
<WiSmErHi|>
you save my life :D
<zmdkrbou>
(yes + ::whatever if you want)
<zmdkrbou>
and your type test2 is meaningless, btw
<WiSmErHi|>
oki
<Other_Adam>
is there a way to get the int of a Unix.file_descr that I am not seeing?
<pango_>
Other_Adam: yes, but that will make your code not portable
<Other_Adam>
that's ok, this only need to work on unix
<pango_>
Other_Adam: you can "cast" it into an int by using Obj.magic... dirty, but works
<pango_>
# let int_of_file_descr (fd: Unix.file_descr) =
<pango_>
((Obj.magic fd) : int) ;;
<pango_>
# int_of_file_descr (Unix.stdout) ;;
<pango_>
- : int = 1
<Yorick>
pango_: why in earth isn't the file descriptor available as an integer?
<Yorick>
(other than using the Obj.magic hack)
<Yorick>
There are legitimate reasons to use descriptors as integers, no?
<pango_>
Yorick: above code breaks under Windows, that's about all I know
<Yorick>
pango_: Sorry, I didn't mean to sound accusatory :)
<Yorick>
I just found the design a bit odd.
<pango_>
don't know if all OSes "objects" that can be abstracted using a file_descr have an integer descriptor to return
<pango_>
I don't know non-Posix supported platforms well enough to answer authoritatively
<Yorick>
pango_: It is true on Windows (object handles) and Unix (descriptors). What else is there that ocaml runs on?
<Yorick>
And even so, it would make sense as functionality only available on certain platforms. Resorting to Obj.magic is nasty.
<pango_>
what to return for others then ? An exception ?
<pango_>
Obj.magic is by no mean official; Just a "known trick" among ocaml devs, ok for debugging on Unix
<Yorick>
well, many functions in the Unix module are unimplemented on win32. What do they do?
<Yorick>
Other_Adam: Oh, seems I'm not alone then. Thank you!
tennin has quit [Read error: 113 (No route to host)]
<pango_>
provided by Cash... We're only using the demo, then ? ;)
<Yorick>
I wondered about that as well. Was that a statement that most of the patch was not acceptable for inclusion?
<pango_>
Yorick: that they don't see the need to put those functionalities in the standard libs... http://pauillac.inria.fr/cash/
mnemonic has joined #ocaml
<Other_Adam>
seems int_of_file_descr would be important enough to get into the standard lib
<Other_Adam>
isn't it common for a server to have an array of "client" objects, and then index them by their fd?
<Yorick>
It definitely is, using the property that the set of open fds is usually very dense
<mnemonic>
hi
<Yorick>
It's also useful to be able to close all open fds before doing exec()
<pango_>
you can use set_close_on_exec
<Yorick>
Not on already open descriptors, or ones you didn't open yourself.
maml2 has quit [Remote closed the connection]
<pango_>
ic
<Yorick>
(the opener of a descriptor should not be responsible for a fd leak somewhere else in the program)
<pango_>
well, Unix module is lacking in general... I suppose a larger module would mean more maintainance work for core developers, but on the other hand, it means that too many ocaml programs are reinventing the wheel...
<Yorick>
now, int_of_file_descr is about the most trivial function I can think of :)