<pozic>
mehdid: ah, that's sort of a nice feature, but I don't see why they couldn't have picked len:4 instead of ~len:4 as a synta.
<pozic>
syntax*
fraggle_ has joined #ocaml
<mehdid>
maybe because it conflicts with "inline" signatures?
<mehdid>
I dont' know if it's the correct name for it, you can say : "let f x:int = x"
<mehdid>
pozic: ^^
<mehdid>
which means "x has type int here"
<pozic>
mehdid: they could also have used :: like Haskell for types, but I guess that is 20 years too late ;)
<mehdid>
I find "::" horrible. But, it's a matter of taste, I guess.
<mehdid>
IIRC, "::" applies to the entire definition of a function. Wheras, in OCaml, it could apply to a paramater as well.
fraggle_ has quit [Ping timeout: 276 seconds]
<pozic>
mehdid: in GHC Haskell you can also put it on parameters.
<mehdid>
ah ok
fraggle_ has joined #ocaml
lvillani has joined #ocaml
fraggle_ has quit [Ping timeout: 240 seconds]
fraggle_ has joined #ocaml
thieusoai has quit [Read error: Operation timed out]
ikaros has joined #ocaml
thieusoai has joined #ocaml
marteo has joined #ocaml
fraggle_ has quit [Ping timeout: 276 seconds]
fraggle_ has joined #ocaml
fraggle_ has quit [Ping timeout: 268 seconds]
fraggle_ has joined #ocaml
fraggle_ has quit [Ping timeout: 276 seconds]
fraggle_ has joined #ocaml
lvillani has quit [Remote host closed the connection]
fraggle_ has quit [Ping timeout: 240 seconds]
fraggle_ has joined #ocaml
fraggle_ has quit [Ping timeout: 268 seconds]
fraggle_ has joined #ocaml
Shoggoth has joined #ocaml
thrasibule has joined #ocaml
smimou has quit [Ping timeout: 268 seconds]
fraggle_ has quit [Ping timeout: 260 seconds]
smimou has joined #ocaml
fraggle_ has joined #ocaml
fabjan has quit [Quit: Changing server]
fraggle_ has quit [Ping timeout: 276 seconds]
fraggle_ has joined #ocaml
fraggle_ has quit [Ping timeout: 240 seconds]
fraggle_ has joined #ocaml
fabjan has joined #ocaml
fraggle_ has quit [Ping timeout: 260 seconds]
fraggle_ has joined #ocaml
fraggle_ has quit [Ping timeout: 248 seconds]
fraggle_ has joined #ocaml
lokydor has joined #ocaml
smimou has quit [Ping timeout: 268 seconds]
smimou has joined #ocaml
lokydor has quit [Quit: leaving]
noj_ has quit [Quit: leaving]
noj has joined #ocaml
Yoric has quit [Quit: Yoric]
maattd has joined #ocaml
smimou has quit [Ping timeout: 276 seconds]
smimou has joined #ocaml
seafood has quit [Quit: seafood]
jonafan_ is now known as jonafan
pozic has left #ocaml []
Associat0r has joined #ocaml
goncalo has quit [Ping timeout: 252 seconds]
Shoggoth has quit [Remote host closed the connection]
joewilliams_away is now known as joewilliams
fraggle_ has quit [Ping timeout: 276 seconds]
fraggle_ has joined #ocaml
boscop has joined #ocaml
fraggle_ has quit [Ping timeout: 260 seconds]
fraggle_ has joined #ocaml
Yoric has joined #ocaml
rovar has joined #ocaml
<rovar>
is there an existing api for converting unix file descriptors (int) to file_descr
<adrien>
sure
<adrien>
but you better not mix operations on both
<adrien>
oh, wait, misread a bit
<adrien>
where do you get your int from?
<thelema>
Unix file_descr's are just ints
<rovar>
hrrm.. they don't seem to be interoperable
<thelema>
from Unix.ml: type file_descr = int
<bacam>
rovar: Not at the moment
<rovar>
I'm writing a wrapper for epoll (and eventually other kernel level queing api's)
<bacam>
You can do it with the Obj stuff (with the caveat that in the unlikely event that the representation changes your code may misbehave in bad ways)
<adrien>
if you're making a C binding, you should be able to use Int_val and Val_int
<rovar>
hrrm.. i guess if it is really just an int.. I could pass it to the C .. right
<rovar>
luckily the C bridge isn't typesafe :)
<thelema>
it couldn't possibly be
<adrien>
as long as your int is small enough to fit in 31 bits, it's ok
<rovar>
it's not really a future-proof operation, i'm ignoring an abstraction which might become more complex later
<rovar>
but it'll do for testing at least
<adrien>
actually, I'd bet it wouldn't change before ocaml 7
<adrien>
the Unix module is really close to the C API and backward compatibility is taken really seriously, moreover I don't think there's a reason to change
spearalot has quit [Quit: -arividerchi]
<rovar>
adrien: I agree, it's the principal of it, though :)
<adrien>
heh ;-)
<adrien>
if that ever change (again, in a looooooong time), you'll have a conversion macro available so currently, Int_val/Val_int and later on, maybe, Descr_val/Val_descr
<rovar>
one other question: I'm still fairly new to ocaml, though I am familiar with Haskell.. I'm still not completely clear on what ;; means exactly.
<rovar>
does it denote the end of an expression? or is it more than that?
<thelema>
rovar: ;; tells the toplevel to execute whatever you put before it.
<thelema>
don't use it in compiled programs
<rovar>
gotcha
ikaros has quit [Quit: Leave the magic to Houdini]
<rovar>
i was wondering about that, because I see it in a lot of examples.. but not all
<thelema>
it is valid in compiled programs, but proper style in compiled programs is to use [let main () = ...] and then [let () = main ()] to run your main function
<adrien>
the way I see it, it means that the compiler could stop at the ;; and get something syntaxically correct
<adrien>
but as thelema said, it's best avoided outside the toplevel, it's only meant to let the toplevel know it has something to parse and execute
<rovar>
sure
<rovar>
i was thinking about specifying a test function for my libraries, which is only executed when called explicitly
<rovar>
was wondering if that would help...
<rovar>
but now that I think about it, probably not
<adrien>
right, that wouldn't help
<thelema>
called explicitly how?
<adrien>
but the function will only be executed if called explicitely anyway...
<rovar>
yea
<rovar>
does ocamlc or something have a mode that will auto-execute test cases?
<thelema>
??? no
<adrien>
no
<thelema>
the usual way to do this is to have a separate executable for all your test cases
th5 has quit [Quit: th5]
fraggle_ has quit [Ping timeout: 276 seconds]
fraggle_ has joined #ocaml
<rovar>
a few of the modern compilers (haskell, D, scala) let you define a function or module called "test" and the compiler will execute it, in the same way a process would execute "main" when run
<rovar>
it's pretty handy
<thelema>
rovar: interesting. Ocaml doesn't run main for you - you have to do it yourself.
<rovar>
out of curiosity, does it actually make executables that conform to the C standard, e.g. there is a main in there where execution starts?
<rovar>
just hidden from the developer?
<thelema>
ocamlc emits assembly
<rovar>
gotcha
<rovar>
if this is the case, then I would assume it would be easier to build a microthread (fiber, lightweight thread) implementation in the language
<rovar>
i'm curious why the only implementation I've found is an interesting monadic approximation..
<thelema>
modifying ocaml has only recently become possible (and it seems that this isn't widely known)
<rovar>
huh
<rovar>
if i'm feeling massochistic, one day I might take a whack at it
<thelema>
modifying the ocaml compiler. before this year, INRIA didn't accept external contributions to their source base.
<adrien>
doesn't lwt kinda does such threads? (maybe not as light but ...)
<rovar>
yes, that is the monadic approximation I was speaking of.
fraggle_ has quit [Ping timeout: 240 seconds]
<adrien>
the main problem with external contributions to ocaml was an unclear legal status btw
<thelema>
within the last year, something was worked out with regards to that, and extenral contributions are now possible
<rovar>
well I hope it picks up. Ocaml has had a lot of features that newer languages are just now starting to catch on to. It has a lot of idiosyncracies because it has kind of been developed in "seclusion"
<rovar>
i guess that has both helped and hindered it.
jakedouglas has joined #ocaml
<thelema>
agreed, but backwards compatibility will be maintained no matter the new patches.
<rovar>
A similar thing was done with D, and that pretty much killed the language.
<thelema>
seclusion or rabid backwards compatibility
<rovar>
it's a difficult thing, backwards compatibility
<rovar>
IMO it's not worth it.
fraggle_ has joined #ocaml
<rovar>
even Python made the leap to major incompatibilities, Ruby did as well. They knew they needed to fix the language to be better in the long run.
<rovar>
I can't really comment on OCaml, because I've not used it long enough, maybe it's fine :)
<thelema>
It is difficult. When ocaml 4 comes out, I expect some incompatibilities. within the 3.xx series, expect extremely minor incompatibilities.
<adrien>
caml, caml light, caml super ligth, ocaml ... backward compatibility has not been kept between these, but for minor versions it'll be kept
<ggole>
ML family languages have a long history of evolution
<ggole>
No doubt it will continue
<orbitz>
but where did it all come from?!
<rovar>
ml
<ggole>
The roots are in lisp, really
<ggole>
Obviously lisp and ml are very different language families, but the heritage is there
<rovar>
Robin Milner :)
adrien has quit [Quit: leaving]
ikaros has joined #ocaml
adrien has joined #ocaml
fraggle_ has quit [Ping timeout: 240 seconds]
fraggle_ has joined #ocaml
thelema has quit [Quit: brb]
rwmjones has left #ocaml []
rwmjones has joined #ocaml
<rovar>
is there somewhere that the features for ocaml 4 are enumerated / discussed?
sepp2k has quit [Remote host closed the connection]
adrien has joined #ocaml
rwmjones has quit [Quit: Terminated with extreme prejudice - dircproxy 1.2.0]
rwmjones has joined #ocaml
derdon has joined #ocaml
pimmhogeling has quit [Ping timeout: 245 seconds]
fraggle_ has quit [Ping timeout: 248 seconds]
fraggle_ has joined #ocaml
ftrvxmtrx has quit [Quit: Leaving]
<Associat0r>
Scala is also breaking backward compat
<Associat0r>
in the future they intend todo that with every major point release
lloydmoore has quit [Quit: taking a nap]
<Associat0r>
but older versions will remain supported
th5 has joined #ocaml
<Associat0r>
I'm all for it breaking backward compat to improve progress
<Associat0r>
or else you end up with stuff like C++ and C#
<Associat0r>
not good IMO
<Associat0r>
rovar: also in D's case, there were more fundamental issues
<Associat0r>
rovar: that almost killed it
<ggole>
Like two stdlibs
<Associat0r>
exactly
<Associat0r>
and tension between them
<Associat0r>
and not enough transparancy etc
<Associat0r>
also even Ocaml couldn't get killed by this of this since it's also a research language
<ggole>
I'm not sure it matters, though. As far as I can tell the only languages that really succeed are those with large companies supporting them.
<Associat0r>
true
<Associat0r>
Scala is gonna get official Microsoft backing
<Associat0r>
they are redoing Scala.NET with an official VS plugin
<ggole>
Scala was supposedly big on Java integration. It'll be interesting to see if it survives a transplant into another ecosystem.
<Associat0r>
it already has a .NET compiler, but not maintained or backed properly
komar_ has quit [Quit: WeeChat 0.2.6]
thelema has joined #ocaml
lvillani has joined #ocaml
ttamttam has quit [Quit: Leaving.]
smimou has quit [Ping timeout: 268 seconds]
lvillani_ has joined #ocaml
lvillani has quit [Ping timeout: 248 seconds]
lvillani_ has left #ocaml []
smimou has joined #ocaml
smimou has quit [Changing host]
smimou has joined #ocaml
sepp2k has joined #ocaml
smimou has quit [Ping timeout: 268 seconds]
smimou has joined #ocaml
<rovar>
ggole, Associat0r, 2 stdlibs was the cause
<rovar>
err the sympton
<rovar>
the cause was Walter's refusal to accept input
<rovar>
Associat0r: yea, scala's .NET compiler is already pretty nice, and is usually current. But so much of scala's standard library is based around java. It would take a rework of the libs, which, IMO is a good thing.
ftrvxmtrx has joined #ocaml
middayc has joined #ocaml
<rovar>
also, I think now that ocaml is accepting submissions, it is a research language, before, not so much, IMO.
th5 has quit [Quit: th5]
<thelema>
umm, before it was a research language only for researchers within INRIA
barismetin has quit [Quit: Leaving...]
ulfdoz has joined #ocaml
<orbitz>
I can't really get into scala
rovar_ has joined #ocaml
<rovar_>
bleh
rovar has quit [Ping timeout: 252 seconds]
<orbitz>
belh
lloydmoore has joined #ocaml
<adrien>
it has always been possible to submit work/patches and have them integrated into ocaml but it was really painful, now it should be much better (dunno if anyone has tried it yet but I might ask for the papers in order to work on the windows support part)
fraggle_ has quit [Quit: -ENOBRAIN]
smimou has quit [Ping timeout: 276 seconds]
ikaros has quit [Ping timeout: 240 seconds]
ikaros has joined #ocaml
smimou has joined #ocaml
smimou has quit [Changing host]
smimou has joined #ocaml
ttamttam has joined #ocaml
fraggle_ has joined #ocaml
smimou has quit [Ping timeout: 268 seconds]
ikaros has quit [Ping timeout: 246 seconds]
travisbrady has joined #ocaml
fraggle_ has quit [Quit: -ENOBRAIN]
fraggle_ has joined #ocaml
komar_ has joined #ocaml
smimou has joined #ocaml
ikaros has joined #ocaml
ikaros has quit [Client Quit]
ttamttam has quit [Quit: Leaving.]
alpounet has quit [Ping timeout: 276 seconds]
enthymeme has joined #ocaml
ttamttam has joined #ocaml
middayc has quit [Ping timeout: 265 seconds]
middayc has joined #ocaml
<adrien>
gildor: for the cia bot, I don't get why the "setup update hook" part says to 'cat hooks/update', is there something to edit or not?
<adrien>
ygrek: ^^
lvillani has joined #ocaml
<gildor>
adrien: there is a /gitroot/ocaml-mysql/ocaml-mysql.git/ciabot.pl you probably have to change
<adrien>
ok, I diffed it with my file and the difference is quite obvious ;-)
<adrien>
what should be the perms/owner for the file, I can't +x it
myu2 has quit [Remote host closed the connection]
<adrien>
okay, I'll just make it owned my me as for ocaml-mysql
ikaros has joined #ocaml
lvillani has quit [Quit: Leaving]
_andre has quit [Quit: Lost terminal]
ttamttam has quit [Quit: Leaving.]
ikaros has quit [Quit: Leave the magic to Houdini]
ikaros has joined #ocaml
itewsh has joined #ocaml
ggole has quit [Quit: Leaving]
ikaros has quit [Client Quit]
ikaros has joined #ocaml
<adrien>
gildor: btw, can I have git for cowboy :-) (yeah, ocaml-gir is no more \o/ )
<julm>
(self-hosting ftw)
<gildor>
adrien: git for cowboy what it is ?
<adrien>
gildor: new project :-)
<adrien>
binding generator but using an actual C/C++ parser instead of the gobject-introspection crap
<gildor>
project approved
travisbrady has quit [Quit: travisbrady]
<adrien>
thanks :-)
<gildor>
adrien: git repo created
<gildor>
adrien: have fun
<adrien>
nice, thanks again :-)
Yoric has quit [Quit: Yoric]
alpounet has joined #ocaml
marteo has quit [Quit: Debian GNU/Hurd is Good.]
jimmyb2187 has left #ocaml []
<hcarty>
Has anyone here had any luck getting OCamlEditor to build on Linux?
_unK has joined #ocaml
itewsh has quit [Quit: Quitte]
Anarchos has joined #ocaml
<Anarchos>
if i use lightweight C threads and i put a semaphore on the caml runtime in caml_enter/leave_blocking_section, will i be able to control caml values created in my C threads and force them to live concurrently in the same caml heap ?