flux changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 4.00.1 http://bit.ly/UHeZyT | http://www.ocaml.org | Public logs at http://tunes.org/~nef/logs/ocaml/
BiDOrD has joined #ocaml
mehdid_ has joined #ocaml
ttm has joined #ocaml
thelema_ has joined #ocaml
jave has joined #ocaml
zzz_` has joined #ocaml
ski has joined #ocaml
dwmw2_gone has quit [Ping timeout: 264 seconds]
julm_ has joined #ocaml
gustav_ has joined #ocaml
othiym23 has joined #ocaml
dezzy has joined #ocaml
dezzy has quit [Changing host]
dezzy has joined #ocaml
zpe has quit [Ping timeout: 256 seconds]
dwmw2_gone has joined #ocaml
paddymahoney has quit [Remote host closed the connection]
srcerer has joined #ocaml
pkrnj has joined #ocaml
darkf_ is now known as darkf
julm_ has quit [Ping timeout: 272 seconds]
othiym23 has quit [Ping timeout: 272 seconds]
vpm has quit [Ping timeout: 245 seconds]
julm has joined #ocaml
othiym23 has joined #ocaml
dezzy has quit [Ping timeout: 272 seconds]
dezzy has joined #ocaml
vpm has joined #ocaml
dezzy has quit [Changing host]
dezzy has joined #ocaml
areece_ has joined #ocaml
pango has quit [Ping timeout: 245 seconds]
yezariaely has quit [Ping timeout: 264 seconds]
pango has joined #ocaml
yezariaely has joined #ocaml
flux has quit [Read error: Connection reset by peer]
eikke_ has joined #ocaml
flux has joined #ocaml
noj_ has quit [*.net *.split]
eikke has quit [*.net *.split]
ia0_ has quit [*.net *.split]
ben_zen has quit [*.net *.split]
Armael has quit [*.net *.split]
hto has quit [*.net *.split]
areece has quit [*.net *.split]
hto has joined #ocaml
ben_zen has joined #ocaml
noj has joined #ocaml
orbitz_ has quit [Ping timeout: 264 seconds]
orbitz has joined #ocaml
flx_ has joined #ocaml
wmeyer` has joined #ocaml
Nahra has quit [Ping timeout: 258 seconds]
flux has quit [Ping timeout: 258 seconds]
flx_ is now known as flux
zpe has joined #ocaml
s4muel_ has joined #ocaml
noj has quit [Ping timeout: 256 seconds]
srcerer has quit [*.net *.split]
wmeyer has quit [*.net *.split]
_habnabit has quit [*.net *.split]
avsm has quit [*.net *.split]
s4muel has quit [*.net *.split]
noj has joined #ocaml
def-lkb has quit [Ping timeout: 256 seconds]
def-lkb has joined #ocaml
gustav_ has quit [Ping timeout: 272 seconds]
gustav_ has joined #ocaml
flux has quit [Remote host closed the connection]
flx_ has joined #ocaml
flx_ is now known as flux
avsm has joined #ocaml
sivoais has quit [Ping timeout: 256 seconds]
_habnabit has joined #ocaml
sivoais has joined #ocaml
ia0_ has joined #ocaml
zpe has quit [Ping timeout: 256 seconds]
cdidd has joined #ocaml
pkrnj has quit [Quit: Computer has gone to sleep.]
srcerer has joined #ocaml
wmeyer has joined #ocaml
wmeyer has quit [Ping timeout: 283 seconds]
eikke_ has quit [Read error: Operation timed out]
flx_ has joined #ocaml
Neros_ has quit [Ping timeout: 260 seconds]
rossberg has quit [Ping timeout: 258 seconds]
rossberg has joined #ocaml
rossberg has quit [Read error: Connection timed out]
rossberg has joined #ocaml
fraggle_ has quit [Ping timeout: 258 seconds]
rossberg has quit [Changing host]
rossberg has joined #ocaml
gnuvince has quit [Ping timeout: 258 seconds]
fraggle_ has joined #ocaml
flux has quit [Ping timeout: 264 seconds]
flx_ is now known as flux
gnuvince has joined #ocaml
q66 has quit [Remote host closed the connection]
eikke has joined #ocaml
fraggle__ has joined #ocaml
rossberg_ has joined #ocaml
rossberg_ has quit [Changing host]
rossberg_ has joined #ocaml
fraggle_ has quit [Ping timeout: 258 seconds]
rossberg has quit [Ping timeout: 258 seconds]
zpe has joined #ocaml
mathieui has joined #ocaml
karswell has quit [Ping timeout: 256 seconds]
thelema_ has quit [Read error: Connection reset by peer]
zpe_ has joined #ocaml
zpe has quit [Ping timeout: 245 seconds]
ttm has quit [Ping timeout: 264 seconds]
The_third_man has joined #ocaml
thelema has joined #ocaml
zpe_ has quit [Ping timeout: 264 seconds]
thelema has quit [Read error: Connection reset by peer]
ski has quit [Ping timeout: 264 seconds]
BiDOrD has quit [Ping timeout: 264 seconds]
gnuvince has quit [*.net *.split]
rossberg__ has joined #ocaml
thelema_ has joined #ocaml
rossberg_ has quit [Ping timeout: 264 seconds]
mathieui has quit [Ping timeout: 264 seconds]
mehdid_ has quit [*.net *.split]
jave has quit [*.net *.split]
zzz_` has quit [*.net *.split]
mathieui_ has joined #ocaml
rossberg__ has quit [Ping timeout: 258 seconds]
mehdid has joined #ocaml
ski has joined #ocaml
mathieui__ has joined #ocaml
jave has joined #ocaml
BiDOrD has joined #ocaml
zzz_` has joined #ocaml
thelema_ has quit [Ping timeout: 256 seconds]
mathieui_ has quit [Ping timeout: 256 seconds]
thelema has joined #ocaml
jave_ has joined #ocaml
jave has quit [Excess Flood]
hello33 has joined #ocaml
leoncamel has joined #ocaml
BiDOrD_ has joined #ocaml
ia0_ has quit [*.net *.split]
<hello33> hi!
<hello33> +thelema, are you there?
ski has quit [Ping timeout: 264 seconds]
ski has joined #ocaml
ia0_ has joined #ocaml
thelema has quit [Remote host closed the connection]
ia0_ has quit [Ping timeout: 240 seconds]
ia0 has joined #ocaml
BiDOrD has quit [Ping timeout: 248 seconds]
destrius has joined #ocaml
srcerer_ has joined #ocaml
ia0 has quit [Ping timeout: 245 seconds]
adotbrown has quit [Ping timeout: 256 seconds]
zzz_` has quit [*.net *.split]
srcerer__ has joined #ocaml
srcerer__ has quit [Excess Flood]
srcerer_ has quit [Ping timeout: 258 seconds]
destrius has quit [Ping timeout: 258 seconds]
srcerer__ has joined #ocaml
pkrnj has joined #ocaml
emmanuel__ has quit [Remote host closed the connection]
destrius has joined #ocaml
hello33 has quit [Quit: Page closed]
ski has quit [Ping timeout: 256 seconds]
srcerer has quit [Ping timeout: 684 seconds]
zzz_` has joined #ocaml
ia0 has joined #ocaml
ski has joined #ocaml
thelema has joined #ocaml
PM has joined #ocaml
srcerer__ has quit [Quit: ChatZilla 0.9.90 [Firefox 19.0.2/20130307023931]]
srcerer has joined #ocaml
thelema_ has joined #ocaml
thelema has quit [Read error: Connection reset by peer]
madroach has quit [Ping timeout: 248 seconds]
pkrnj has quit [Ping timeout: 256 seconds]
madroach has joined #ocaml
pkrnj has joined #ocaml
zzz_` has quit [*.net *.split]
eikke has quit [Ping timeout: 260 seconds]
ia0_ has joined #ocaml
pkrnj has quit [Ping timeout: 256 seconds]
srcerer_ has joined #ocaml
Armael has joined #ocaml
thelema_ has quit [*.net *.split]
ia0 has quit [Write error: Broken pipe]
srcerer has quit [Write error: Connection reset by peer]
karswell` has joined #ocaml
zzz_` has joined #ocaml
pkrnj has joined #ocaml
PM has quit [*.net *.split]
PM has joined #ocaml
karswell` has quit [Remote host closed the connection]
thelema has joined #ocaml
pkrnj has quit [Ping timeout: 256 seconds]
astrobunny has quit [Ping timeout: 256 seconds]
ben_zen has quit [Read error: Operation timed out]
BiDOrD has joined #ocaml
BiDOrD_ has quit [Ping timeout: 256 seconds]
thelema has quit [Remote host closed the connection]
ski has quit [Ping timeout: 256 seconds]
astrobunny has joined #ocaml
pkrnj has joined #ocaml
ski_ has joined #ocaml
zen_ben has joined #ocaml
zen_ben is now known as ben_zen
ben_zen is now known as Guest50660
Guest50660 is now known as ben_zen
thelema has joined #ocaml
BiDOrD has quit [Ping timeout: 264 seconds]
thelema_ has joined #ocaml
thelema has quit [Read error: Connection reset by peer]
BiDOrD_ has joined #ocaml
ski has joined #ocaml
ski_ has quit [Ping timeout: 245 seconds]
gnuvince has joined #ocaml
weie_ has joined #ocaml
weie has quit [Ping timeout: 264 seconds]
pkrnj has quit [Quit: Computer has gone to sleep.]
pkrnj has joined #ocaml
rossberg has joined #ocaml
srcerer_ is now known as srcerer
groovy2shoes has quit [Quit: Computer has gone to sleep]
destrius has quit [Read error: Connection reset by peer]
destrius has joined #ocaml
awm22 has quit [Read error: Connection reset by peer]
awm22 has joined #ocaml
s4muel_ is now known as s4muel
cdidd has quit [Quit: Leaving]
tane has joined #ocaml
Derander_ has joined #ocaml
fasta has joined #ocaml
asmanur_ has joined #ocaml
hyperbor1ean has joined #ocaml
flixr_ has joined #ocaml
gustav__ has joined #ocaml
Jenza2 has joined #ocaml
josch_ has joined #ocaml
josch_ has quit [Changing host]
josch_ has joined #ocaml
deavid has joined #ocaml
wormphlegm has joined #ocaml
_yezariaely has joined #ocaml
Derander has quit [Ping timeout: 245 seconds]
fasta_ has quit [Ping timeout: 245 seconds]
deavidsedice has quit [Ping timeout: 245 seconds]
yezariaely has quit [Ping timeout: 245 seconds]
flixr has quit [Ping timeout: 245 seconds]
dwmw2_gone has quit [Ping timeout: 245 seconds]
hyperboreean has quit [Ping timeout: 245 seconds]
Jenza has quit [Ping timeout: 245 seconds]
asmanur has quit [Ping timeout: 245 seconds]
Jenza2 is now known as Jenza
lopex has quit [Ping timeout: 245 seconds]
flixr_ is now known as flixr
wormphle2m has quit [Ping timeout: 245 seconds]
josch has quit [Ping timeout: 245 seconds]
gustav_ has quit [Ping timeout: 245 seconds]
dwmw2_gone has joined #ocaml
Icarot has joined #ocaml
Snark has joined #ocaml
yacks has joined #ocaml
Icarot has quit [Remote host closed the connection]
frogfoodeater has joined #ocaml
frogfoodeater has quit [Ping timeout: 240 seconds]
Kakadu has joined #ocaml
frogfoodeater has joined #ocaml
ggole has joined #ocaml
awm22 has quit [Quit: Leaving.]
zpe has joined #ocaml
ttamttam has joined #ocaml
frogfoodeater has quit [Ping timeout: 256 seconds]
zpe has quit [Ping timeout: 245 seconds]
Cyanure has joined #ocaml
karswell has joined #ocaml
lopex has joined #ocaml
mathieui__ is now known as mathieui
hkBst has joined #ocaml
hkBst has quit [Changing host]
hkBst has joined #ocaml
pkrnj has quit [Quit: Textual IRC Client: www.textualapp.com]
Pantoufle has joined #ocaml
djcoin has joined #ocaml
Cyanure has quit [Remote host closed the connection]
leoncamel has quit [Ping timeout: 256 seconds]
thomasga has joined #ocaml
Pantoufle has quit [Ping timeout: 256 seconds]
zpe has joined #ocaml
cago has joined #ocaml
mika1 has joined #ocaml
zpe has quit [Ping timeout: 256 seconds]
fasta has quit [Quit: No Ping reply in 180 seconds.]
srcerer_ has joined #ocaml
Jenza2 has joined #ocaml
fasta has joined #ocaml
karswell` has joined #ocaml
thelema_ has quit [Remote host closed the connection]
Derander has joined #ocaml
Jenza2 has quit [Ping timeout: 264 seconds]
lopex has quit [Ping timeout: 245 seconds]
tane has quit [Ping timeout: 245 seconds]
sysopfb has joined #ocaml
awm22 has joined #ocaml
hyperboreean has joined #ocaml
hyperboreean has quit [Changing host]
hyperboreean has joined #ocaml
mika1 has quit [*.net *.split]
karswell has quit [Ping timeout: 248 seconds]
Derander has quit [Excess Flood]
hyperbor1ean has quit [*.net *.split]
Jenza2 has joined #ocaml
srcerer has quit [Ping timeout: 256 seconds]
ski has quit [Ping timeout: 256 seconds]
djcoin has quit [*.net *.split]
Snark has quit [*.net *.split]
Jenza has quit [*.net *.split]
Derander_ has quit [*.net *.split]
PM has quit [*.net *.split]
anderse has joined #ocaml
sysop_fb has quit [Ping timeout: 276 seconds]
Jenza2 is now known as Jenza
Derander has joined #ocaml
mika1 has joined #ocaml
trep has joined #ocaml
thelema has joined #ocaml
Snark has joined #ocaml
PM has joined #ocaml
tane has joined #ocaml
ski has joined #ocaml
sysopfb has quit [Ping timeout: 264 seconds]
djcoin has joined #ocaml
zpe has joined #ocaml
hkBst has quit [Read error: Connection reset by peer]
tane has quit [*.net *.split]
hkBst has joined #ocaml
tane has joined #ocaml
ollehar has joined #ocaml
thelema has quit [*.net *.split]
thelema has joined #ocaml
ulfdoz has joined #ocaml
Yoric has joined #ocaml
zpe has quit [Ping timeout: 245 seconds]
eikke has joined #ocaml
ontologiae has joined #ocaml
rwmjones_holiday is now known as rwmjones
lopex has joined #ocaml
ocp has joined #ocaml
zpe has joined #ocaml
<eikke> what's the common way in the world of ocaml to define build-dependencies of an application and their version bounds?
toolslive has joined #ocaml
<sgnb> eikke: oasis, I guess
<eikke> hmh, not sure we want to go there :)
<orbitz> or use opam
zpe has quit [Ping timeout: 264 seconds]
<eikke> orbitz: we use opam and distribute some packages using it, but that doesnt work for the "retrieve source, run make" workflow
<orbitz> eikke: I just pin the source in opam
<maufred> Hello, could someone explain me why ii is never changed ? (http://pastebin.com/Vi45Z1xt)
hkBst has quit [Ping timeout: 245 seconds]
<ggole> maufred, ii is changed
<ggole> In the child
<ggole> But you never inspect its value there
<toolslive> they're in different process spaces....
<flux> maufred, in unix, fork produces a new process that cannot change the contents of its parent process
<sgnb> maufred: this is not really an ocaml question, you would get the same in C...
<maufred> ah OK; i get it
hkBst has joined #ocaml
<maufred> so, how would you do a "dispatch work on 2 process" ?
<flux> maufred, an easy way is to use the parmap library
<maufred> Yeah I know about it that's why I came out with this simple wrong code :)
<toolslive> it's about 20 lines of code if you want to do it ad-hoc
<maufred> Anyway, thank you for the quick reply and helpful answer !
destrius has quit [Quit: Leaving.]
hkBst has quit [Excess Flood]
rwmjones has quit [Read error: Operation timed out]
hkBst has joined #ocaml
hkBst has quit [Changing host]
hkBst has joined #ocaml
<toolslive> something like this.
leoncamel has joined #ocaml
zpe has joined #ocaml
<maufred> Ah yes, I saw something like this in the archives
mcclurmc has quit [Ping timeout: 256 seconds]
hkBst has quit [Remote host closed the connection]
hkBst has joined #ocaml
hkBst has quit [Changing host]
hkBst has joined #ocaml
<flux> if you're using fork with marshal, you may just go ahead and give the Closures flag to the marshalling functions
<flux> but yeah, that seems pretty simple&nice :)
<anderse> i'm interested in reading some high quality ocaml source code, is there any project which source you would suggest?
zpe has quit [Ping timeout: 245 seconds]
<companion_cube> not mine! :D
rwmjones has joined #ocaml
<flux> not sure about the quality, but atleast mldonkey is quite large
<toolslive> unison is not that big, but very nice.
weie has joined #ocaml
<anderse> tooslive, perfect, a colleague was looking into using unison in our quite large production but didn't because of unfamiliarity with ocaml. Thanks for the suggestion!
weie_ has quit [Ping timeout: 264 seconds]
<flux> unison used to have a problem with big deltas. but that solved itself when switching to 64 bit platforms :)
<toolslive> I remember a bug where one tier was on 32 bit and the other on 64 bit
<toolslive> but the big delta problem originates in the rsync strategy they use.
<toolslive> (the performance problem that is)
zpe has joined #ocaml
weie has quit [Read error: Connection reset by peer]
ulfdoz has quit [Ping timeout: 252 seconds]
weie has joined #ocaml
Neros has joined #ocaml
zpe has quit [Ping timeout: 276 seconds]
mye has joined #ocaml
<sgnb> anderse: why would it matter? you don't need familiarity with ocaml to use unison...
ulfdoz has joined #ocaml
<anderse> sgnb: when something breaks for us - we have 1.5 million angry users that are expecting live sports data at a 10 second precision, so we try to use stuff we can understand/fix or at least whose idiosyncrasies we've ran into before - ofc that is not always possible
mcclurmc has joined #ocaml
<toolslive> @anderse, which product would that be?
<toolslive> (curious)
<anderse> Live Score Addicts (iphone and android live soccer mobile app)
ollehar1 has joined #ocaml
<adrien_oww> well, you could apply the same thought process to assembly and x86_64 assembly (for instance) is certainly more difficult to master than ocaml ;-)
<flux> adrien_oww, do you think they would want to have an application that's written directly in x86_64 assembly?-)
<anderse> adrien_oww: sure, im sure you understand they basic reasoning though - even though taking it to de extreme in either direction would be silly
<toolslive> @adrien, intel asm is indeed more difficult, but that's an insult to asm.
<flux> (and the language a tool is written in is the level where fixes usualyl occur as well; at times it could be its runtime (C) or libraries (C))
<adrien_oww> anderse: yeah, I was partly kidding; you can expect unison to be very reliable :-)
<anderse> sounds good, ill try to get inspired to port some stuff to ocaml by reading it source as well :)
<ggole> intel assembly isn't too bad
<ggole> No odd stuff like modulo scheduling to mess you up
cdidd has joined #ocaml
yacks has quit [Quit: Leaving]
yacks has joined #ocaml
hkBst has quit [Ping timeout: 245 seconds]
hkBst_ has joined #ocaml
q66 has joined #ocaml
hkBst_ has quit [Excess Flood]
hkBst_ has joined #ocaml
hkBst_ has quit [Changing host]
hkBst_ has joined #ocaml
zpe has joined #ocaml
_andre has joined #ocaml
jpdeplaix has quit [Ping timeout: 255 seconds]
hkBst_ has quit [Remote host closed the connection]
hkBst_ has joined #ocaml
zpe has quit [Ping timeout: 276 seconds]
<toolslive> it's too darn irregular (intel asm)
hkBst_ has quit [Ping timeout: 245 seconds]
hkBst_ has joined #ocaml
hkBst_ has quit [Changing host]
hkBst_ has joined #ocaml
zpe has joined #ocaml
jbrown has joined #ocaml
<ggole> True
<ggole> But the basics are acceptable
<ggole> And the really odd stuff doesn't apply most of the time
<ggole> The encoding is pretty hairy, but most people don't have to deal with that
anderse has quit [Quit: anderse]
groovy2shoes has joined #ocaml
zpe has quit [Ping timeout: 245 seconds]
<toolslive> there's too many syntaxes ;)
<toolslive> and gcc integration is awful
<toolslive> I'm quite glad I don't have to descend often.
<ggole> It would be nice if AT&T syntax went away, yeah
<toolslive> the problem is that C does not define asm bindings, and every compiler vendor build its own thing
<toolslive> I'm wrong: not the problem, but one of them.
<ggole> Surely that's not, itself, an x86 problem
<ggole> Although it does lead to annoying duplication of various constructs
<ggole> Vector types, rotate operations, etc
<ggole> All slightly different
<ggole> But you can't blame Intel :)
groovy2shoes has quit [Quit: Computer has gone to sleep]
zpe has joined #ocaml
mye_ has joined #ocaml
mye_ has quit [Client Quit]
mye has quit [Ping timeout: 264 seconds]
ollehar has quit [Ping timeout: 245 seconds]
zpe has quit [Ping timeout: 245 seconds]
mort___ has joined #ocaml
zpe has joined #ocaml
ollehar has joined #ocaml
mcclurmc_laptop has joined #ocaml
mcclurmc has quit [Ping timeout: 256 seconds]
ollehar has quit [Ping timeout: 264 seconds]
jpdeplaix has joined #ocaml
_eko_ is now known as _eko
awm22 has quit [Ping timeout: 264 seconds]
darkf has quit [Quit: Leaving]
awm22 has joined #ocaml
Neros has quit [Read error: Operation timed out]
<ollehar1> is there a good way to simulate a linear type system in ocaml?
<ollehar1> e.g., I want some Lua functions to be called only when a table is on top of the lua stack
<flux> well, monads maybe, but it can be more restrictive than linear types
<ollehar1> adt could be one way, like type lua = Table_on_top state | Nothing_on_top state ...
<flux> maybe monads, some way to escape them and runtime checks
amaloz has joined #ocaml
Neros has joined #ocaml
cago has left #ocaml []
ocp has quit [Ping timeout: 245 seconds]
dwmw2_gone is now known as dwmw2
ottbot has joined #ocaml
mfp has joined #ocaml
Snark has quit [Ping timeout: 246 seconds]
Snark has joined #ocaml
ccasin has joined #ocaml
PM has quit [Ping timeout: 246 seconds]
PM has joined #ocaml
hkBst_ has quit [Quit: Konversation terminated!]
tianon has quit [Ping timeout: 260 seconds]
tianon has joined #ocaml
yroeht has quit [Read error: Operation timed out]
yroeht has joined #ocaml
sken has joined #ocaml
<sken> hi
<ollehar1> hi yourself
Neros has quit [Read error: Operation timed out]
oriba has joined #ocaml
zpe has quit [Remote host closed the connection]
adahlberg has joined #ocaml
djcoin has quit [Quit: WeeChat 0.3.9.2]
srcerer_ is now known as srcerer
Neros has joined #ocaml
Kakadu has quit []
sken has quit [Quit: Page closed]
<ollehar1> is there a way in ocaml to check at compile time boundaries of an argument? e.g. n > 0
<thelema> ollehar1: how would it know the value at compile time?
<ollehar1> thelema: by looking at how the function is used?
<thelema> ollehar1: probably turing complete to do this
awm22 has quit [Quit: Leaving.]
<def-lkb> you can always enforce custom invariants using smart constructors (with private types for convenience)
<thelema> def-lkb: yes, this is a good way to do this.
<thelema> but it's not at compile time; it's just distinguishing between already checked and not yet checked using the type system
ttamttam has quit [Quit: ttamttam]
<ollehar1> def-lkb: ok
<ggole> You can do that kind of type checking with dependent types
<ggole> Becomes pretty painful imo
adahlberg has quit [Remote host closed the connection]
Yoric has quit [Ping timeout: 252 seconds]
anderse has joined #ocaml
kaustuv has joined #ocaml
<flux> I suppose a golden middle road is a research topic
<thelema> flux: between dependent types and run-time checking?
<flux> yes. and generating proofs :)
mika1 has quit [Quit: Leaving.]
Kakadu has joined #ocaml
<kaustuv> OPAM has really made my life tremendously less dreary. Well done to all the devs!
ttamttam has joined #ocaml
<avsm> are you on a mac?
<orbitz> opam is tops
<ggole> I've wondered a bit about a "middle road" for types
<avsm> here's an easter egg: export OPAMUTF8MSGS=1 on a mac and opam install something
<avsm> and it'll be even less dreary ;-)
<ggole> I've often wanted to be able to have error be, instead of a runtime failure, something that would constrict types such that the error was statically prevented
<ggole> But I don't think it's possible without annotations everywhere
<flux> maybe something that would work with the editor and indicate dubious points, places needing annotation to avoid runtime checks
<flux> I really should look into ATS some day, maybe the only practical(?) language with those features
<ggole> I have it installed: never really dove into it though
<flux> yeah, it isn't sufficient to just have it installed :-)
<orbitz> doublec's blog has soem godo stuff for ATS
<orbitz> I find the language pretty hard to grok though
<ggole> Yeah
<flux> I think the sadest part of ATS is that it seems even more verbose than C
<flux> but maybe that's only my untrained eye :)
<ggole> ATS isn't trying to be concise
<orbitz> I'd really love Ocaml to get linear types, I think they coudl be great for resources
ontologiae has quit [Ping timeout: 245 seconds]
<flux> orbitz, indeed, but that kind of feature would affect all levels
<orbitz> yes
<kaustuv> Linear types are a massive pain in the neck in any language that has closures. Be careful what you wish for.
<orbitz> :)
<ggole> Doesn't Rust do something like that?
<orbitz> I think Rust went the C++ path with just a bunch of different pointer types
<kaustuv> It has ownership, which is not quite the same thing as linear
<kaustuv> And in any case, Rust completely punts on the question of hiding owned values in closures (by making it impossible)
<ggole> C++ has no safety whatsoever though
<ggole> Which allows for pointers to be simple and straightforward
<flux> I think RAII is a safety feature of sorts..
<ggole> But also allows for dangling, double free, and other fun
<flux> it's much easier to leak operating system resources in ocaml than in c++, I think
<orbitz> ggole: with raw pointersi nC++, yes, but there are a bunch of extra pointer types built around RAII that are fairly safe
<ggole> If you have a vector of ints, take the address of one, and resize the vector
<ggole> The pointer is live, but garbage
<ggole> Pointer types do nothing for this problem
<orbitz> ggole: that would be using raw pointers, i'm talking about the other pointer types
mort___ has quit [Quit: Leaving.]
<ggole> They don't help either
<orbitz> no they don't, but doing that is somewhat frowend upon i nC++
<ggole> Unless you make the vector be a vector of pointers
<flux> well, just don't use pointers then :)
<ggole> Which is expensive
<kaustuv> "resize the vector"? What memory models support resizing in place?
<flux> (I suppose the same issues affect references as well, and in some sense they are worse)
<orbitz> kaustuv: C++'s
<ggole> kaustuv: for resize read "any operation which might relocate the vector's memory"
<ggole> The standard mentions which ops might lead to iterator invalidation, I think
<ggole> Those
<orbitz> it does
<kaustuv> obvioulsy if you relocate you also have to update pointers to inside a block
<ggole> And if you don't
<orbitz> yes, which is ggole's point :)
<ggole> You have a use after free
<flux> there would need to be special new kind of pointer type to support pointer-to-container-that-is-resized
Yoric has joined #ocaml
<kaustuv> Just point to the start of the block and keep an offset in a tuple
<ggole> Clean and performant are goals that are somewhat at odds since indirection allows nice semantics but is expensive
<orbitz> what if the start changes?
<ggole> You need a reference to the location which points to the start
<kaustuv> then the gc would update the pointer. You do have a GC that updates pointers, right?
<ggole> Which means a double dereference to access an element.
<kaustuv> Or use read barriers, whatever
<ggole> A gc won't update objects unless *it* moves them
<kaustuv> If anything but the gc does relocation, then your language is silly
<kaustuv> and you should feel silly
<ggole> ...
<orbitz> we are talking about C++...
<ggole> No relocations has nice semantics
<ggole> But all the introduced indirection is hell on cache effects
<ggole> Like I said: fast or clean
osa1 has joined #ocaml
<osa1> do we have a bottom value like Haskell's "undefined" in OCaml ?
<osa1> for type checking purposes
<thelema> osa1: not at all
<thelema> I guess you can define uninhabited types
Cyanure has joined #ocaml
<ggole> osa1: er, for type checking?
<ggole> You want an expression that will type check, but isn't of a particular type? To fill in temporarily, say?
<kaustuv> (failwith "undefined")
<kaustuv> (note: not a value)
<ggole> I usuall go with failwith "implement" or something, yeah
<osa1> great
<osa1> thanks
* ggole would like a version that mentioned line numbers
<thelema> ggole: you'll have to pre-process your source code to get that at the moment
<kaustuv> You can get it easily with -ppx
<ggole> I guess assert false; failwith "blargh" would do
<ggole> But that is not exactly convenient
<thelema> ggole: just `assert false` suffices
mcclurmc_laptop has quit [Ping timeout: 256 seconds]
<thelema> I think...
<ggole> Has type unit.
eikke has quit [Ping timeout: 260 seconds]
<ggole> Not type 'a.
<thelema> :( oops. I thought I had done this before.
<thelema> you're right then.
<kaustuv> I thought assert false was special cased in the type checker to have type 'a
<ggole> What, really?
* ggole checks
<thelema> # let f _ = assert false;;
<thelema> val f : 'a -> 'b = <fun>
<ggole> !
<ggole> Why did I not know of this
<ggole> kaustuv: thanks, that is handy to know
<kaustuv> for a real brain bender, assert false has type 'a even if you compile with -noassert
<thelema> kaustuv: assert false isn't removed by -noassert
<kaustuv> meaning that assert false always fires
<flux> kaustuv, does it still fail?
<thelema> assert false is special.
<flux> man, no secret loophole for undefined behavior :(
<kaustuv> but assert false and assert (not true) have different runtime behavir
<ggole> That's quite a disgusting little hack :)
<ggole> flux: if you want Obj.magic, you know where to find it
<flux> ggole, disgusting, beatiful, depends on who's looking at it ;)
<flux> ggole, but that's not a secret loophole!
<kaustuv> I will go with "convenient"
ousado has quit [Read error: Connection reset by peer]
Uvs has joined #ocaml
ousado has joined #ocaml
<kaustuv> By the way, back on the topic of relocating pointers, the same issue happens with concurrent mutators and collectors in a parallel gc.
mfp has quit [Read error: Connection reset by peer]
eikke has joined #ocaml
awm22 has joined #ocaml
ottbot has quit [Ping timeout: 256 seconds]
mfp has joined #ocaml
tonyg has joined #ocaml
<tonyg> Hi all. Is it possible (even easy?) to make ocamlbuild produce a binary that is completely statically linked? No shared library dependencies at all?
<adrien> that's the default mode of operation
<adrien> libc is another, more complicated, matter
<tonyg> adrien: not true, I don't think. ldd on my binary shows deps on libpthread, libm, libdl, libc
<adrien> sorry, meant "for ocaml libraries"
<tonyg> :)
<tonyg> yeah, i'd noticed and appreciated that already
<adrien> need to check some syntax
<tonyg> i mean to say, i think it's cool that ocaml is already mostly-static
<adrien> well
<adrien> 19:52 ~/t/ooo % ocamlopt.opt -cclib -static a.ml
<adrien> /opt/ocaml/lib/ocaml/std-lib/libasmrun.a(unix.o): In function `caml_dlopen':
<adrien> unix.c:(.text+0x2f1): warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
<adrien> 19:52 ~/t/ooo % ldd a.out not a dynamic executable
<tonyg> oh cool! heh... now i wonder how to get ocamlbuild to do that
<adrien> I have an invocation of ocamlbuild which is: ocamlbuild -cflags -rectypes foo.native
<adrien> so
<adrien> ocamlbuild -cflags '-cclib -static' foo.native
<adrien> is worth a try
<adrien> otherwise: -cflags -cclib -cflags -static
<tonyg> adrien: i'll give that a go! thanks
<adrien> I don't know the syntax for a _tags file
<tonyg> hmm the "-cflags '-cclib -static'" didn't work
<tonyg> no errors; just produced a dynamically-linked executable
<tonyg> (i should say i'm also using opam and lwt...)
<tonyg> "-cflags -cclib -cflags -static" didn't work either: no effect at all
<tonyg> hmm.
<tonyg> so running "ocamlbuild -use-ocamlfind -X scratch -cflags '-cclib -static'" produced a binary indistinguishable from that same command-line without the -cflags part.
<adrien> invoke ocamlbuild with -classic-display
<thelema> tonyg: have a look at the _build/_log file to see what command it ran
<tonyg> classic-display output: http://pastebin.com/FtWhKcaa
<tonyg> it's definitely getting -cclib -static to ocamlopt
<tonyg> i worry about the linkpkg step though
<thelema> yes the last step doesn't have it, for linking
<adrien> oh, doh
<adrien> cflags doesn't sound like the right flag for the _link_ step :P
<thelema> -lflag
rwmjones has quit [Ping timeout: 256 seconds]
<tonyg> heh :) ok
<tonyg> whoa that worked! :)
<tonyg> thank you, thelema and adrien
<tonyg> "-lflag -cclib -lflag -static" was the magic incantation
ggole has quit []
<adrien> :-)
<tonyg> very cool. now my app can be a single-file deploy :)
<adrien> well, you saw the warning
maxibolt is now known as thizanne
<adrien> and you're still bound to glibc
<tonyg> adrien: yep; i'll cross that bridge when i come to it i reckon
<adrien> actually, are you?
<thelema> if only there was a reasonable way to get more tags built into ocamlbuild
<tonyg> the warnings seemed to be around things like getpwnam_r etc
<adrien> if ldd fails, then it's not loadable by glibc
<thelema> this would be a good one to distribute with ocaml
<adrien> which is easy to check: /lib/ld-2.11.3.so your_app
<tonyg> $ /lib/x86_64-linux-gnu/ld-2.13.so ./hop_server.native
<tonyg> Segmentation fault
pkrnj has joined #ocaml
<adrien> \o/
<ollehar1> more about types and capabilities: http://okmij.org/ftp/papers/lightweight-static-capabilities.pdf
rwmjones has joined #ocaml
BiDOrD_ has quit [Ping timeout: 245 seconds]
yacks has quit [Quit: Leaving]
ollehar1 has quit [Ping timeout: 260 seconds]
erc-nick has joined #ocaml
Nahra has joined #ocaml
Uvs has quit [Ping timeout: 245 seconds]
Nahra has quit [Changing host]
Nahra has joined #ocaml
pkrnj has quit [Quit: Computer has gone to sleep.]
Nahra has quit [Remote host closed the connection]
erc-nick has quit [Remote host closed the connection]
ottbot has joined #ocaml
Pantoufle has joined #ocaml
BiDOrD has joined #ocaml
emmanuelux has joined #ocaml
ttamttam has left #ocaml []
erc-nick has joined #ocaml
osa1 has quit [Quit: Konversation terminated!]
_andre has quit [Quit: leaving]
Kakadu has quit []
erc-nick has quit [Remote host closed the connection]
erc-nick has joined #ocaml
erc-nick has quit [Remote host closed the connection]
pkrnj has joined #ocaml
Nahra has joined #ocaml
ocp has joined #ocaml
derek_c has joined #ocaml
Snark has quit [Quit: Quitte]
mfp has quit [Read error: Connection reset by peer]
amaloz has quit [Remote host closed the connection]
ottbot has quit [Ping timeout: 264 seconds]
mfp has joined #ocaml
jbrown has quit [Remote host closed the connection]
ocp has quit [Quit: Leaving.]
eikke has quit [Ping timeout: 252 seconds]
derek_c has quit [Ping timeout: 276 seconds]
ollehar has joined #ocaml
frogfoodeater has joined #ocaml
anderse has quit [Quit: anderse]
ottbot has joined #ocaml
fds_ is now known as fds
Cyanure has quit [Remote host closed the connection]
frogfoodeater has quit [Ping timeout: 252 seconds]
ollehar1 has joined #ocaml
pkrnj has quit [Quit: Computer has gone to sleep.]
Yoric has quit [Ping timeout: 252 seconds]
emmanuelux has quit [Remote host closed the connection]
eikke has joined #ocaml
frogfoodeater has joined #ocaml
Pantoufle has quit [Ping timeout: 245 seconds]
derek_c has joined #ocaml
BiDOrD_ has joined #ocaml
BiDOrD has quit [Ping timeout: 256 seconds]
hyperboreean has quit [Quit: leaving]
hyperboreean has joined #ocaml
pkrnj has joined #ocaml
thomasga has quit [Quit: Leaving.]
tane has quit [Quit: Verlassend]
dwmw2 is now known as dwmw2_gone
ottbot has quit [Ping timeout: 276 seconds]
eikke has quit [Ping timeout: 240 seconds]