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/
smerz_ has joined #ocaml
dsheets has quit [Ping timeout: 256 seconds]
eikke has quit [Read error: Operation timed out]
Fnar has quit [Quit: Client exiting]
Fnar has joined #ocaml
awm22 has joined #ocaml
madroach has quit [Ping timeout: 248 seconds]
awm22 has quit [Client Quit]
cdidd has quit [Read error: Operation timed out]
madroach has joined #ocaml
bobry has joined #ocaml
emmanuelux has quit [Remote host closed the connection]
typoclass has quit [Quit: Leaving.]
tane has quit [Quit: Verlassend]
satoshiak has joined #ocaml
happy4crazy has quit [Remote host closed the connection]
smerz_ has quit [Ping timeout: 258 seconds]
Neros has quit [Read error: Connection reset by peer]
frogfoodeater has quit [Ping timeout: 264 seconds]
watermind has quit [Ping timeout: 264 seconds]
happy4crazy has joined #ocaml
venk has joined #ocaml
happy4crazy has quit [Ping timeout: 264 seconds]
awm22 has joined #ocaml
satoshiak has left #ocaml []
<adahlberg> I am trying to make directories to hold different test results, and the dirs and files are named after the test file thats inputted. My problem is if I run it again on repeated tests, the dir is already created so I get an error. I am trying to do something like this: if Sys.is_directory dir then () else Unix.mkdir dir 0o777;; BUt my dir never gets made.
ttamttam has joined #ocaml
alxbl has quit [Quit: Lost terminal]
alxbl has joined #ocaml
Neros has joined #ocaml
ttamttam has quit [Remote host closed the connection]
olaf_ has joined #ocaml
weie has joined #ocaml
Nahra has quit [Ping timeout: 260 seconds]
yacks has quit [Ping timeout: 245 seconds]
lenstr has quit [Read error: Operation timed out]
LeNsTR|away has joined #ocaml
weie_ has joined #ocaml
weie has quit [Ping timeout: 256 seconds]
yacks has joined #ocaml
Snark has joined #ocaml
happy4crazy has joined #ocaml
happy4crazy has quit [Ping timeout: 258 seconds]
ttamttam has joined #ocaml
ggole has joined #ocaml
Nahra` has quit [Ping timeout: 240 seconds]
Yoric has joined #ocaml
zpe has joined #ocaml
hkBst has joined #ocaml
vpit3833 has joined #ocaml
tane has joined #ocaml
venk has quit [Ping timeout: 258 seconds]
tani has joined #ocaml
tane has quit [Ping timeout: 252 seconds]
zpe has quit [Ping timeout: 258 seconds]
hkBst_ has joined #ocaml
hkBst has quit [Read error: Connection reset by peer]
tani has quit [Ping timeout: 264 seconds]
AltGr has joined #ocaml
olaf_ has quit [Ping timeout: 258 seconds]
sgnb has quit [Remote host closed the connection]
sgnb has joined #ocaml
happy4crazy has joined #ocaml
zpe has joined #ocaml
happy4crazy has quit [Ping timeout: 260 seconds]
zpe has quit [Ping timeout: 276 seconds]
osa1 has joined #ocaml
<osa1> how can I print <abstr> values in ocamldebug ?
<osa1> I need to know exact structure of it because I'll modify that value, but I can't understand the type from source because it's too complex
cago has joined #ocaml
adahlberg has quit [Remote host closed the connection]
mika1 has joined #ocaml
LeNsTR|away is now known as lenstr
lenstr has quit [Changing host]
lenstr has joined #ocaml
Kakadu has joined #ocaml
olaf_ has joined #ocaml
<ggole> #install_printer f, where f is a formatting function that operates on that type
osa1_ has joined #ocaml
osa1_ has quit [Client Quit]
osa1_ has joined #ocaml
ontologiae has joined #ocaml
osa1 has quit [Ping timeout: 258 seconds]
thomasga has joined #ocaml
yacks has quit [Ping timeout: 240 seconds]
wsebastian has joined #ocaml
zpe has joined #ocaml
Neros has quit [Ping timeout: 258 seconds]
ocp has joined #ocaml
hkBst_ has quit [Read error: Connection reset by peer]
eikke has joined #ocaml
<osa1_> is there a way to see type of a value in ocamldebug ?
zpe has quit [Ping timeout: 264 seconds]
hkBst_ has joined #ocaml
hkBst_ has quit [Changing host]
hkBst_ has joined #ocaml
zpe has joined #ocaml
djcoin has joined #ocaml
osa1__ has joined #ocaml
frogfoodeater has joined #ocaml
osa1_ has quit [Ping timeout: 252 seconds]
yacks has joined #ocaml
cago has quit [Ping timeout: 248 seconds]
Neros has joined #ocaml
ttamttam has quit [Ping timeout: 258 seconds]
ttamttam has joined #ocaml
pkrnj has quit [Quit: Textual IRC Client: www.textualapp.com]
frogfoodeater has quit [Ping timeout: 264 seconds]
cago has joined #ocaml
tootooroo has quit [Quit: Brain.sys has encountered a problem and needs to close. We are sorry for the inconvenience.]
tootooroo has joined #ocaml
ollehar has joined #ocaml
dsheets has joined #ocaml
happy4crazy has joined #ocaml
happy4crazy has quit [Read error: Connection reset by peer]
asmanur has left #ocaml []
RagingDave has joined #ocaml
cdidd has joined #ocaml
typoclass has joined #ocaml
Kakadu has quit [Remote host closed the connection]
Kakadu has joined #ocaml
Yoric has quit [Ping timeout: 245 seconds]
cago has quit [Quit: Leaving.]
Neros has quit [Ping timeout: 240 seconds]
yacks has quit [Ping timeout: 264 seconds]
happy4crazy has joined #ocaml
happy4crazy has quit [Ping timeout: 248 seconds]
Yoric has joined #ocaml
ollehar has quit [Ping timeout: 264 seconds]
<Kakadu> if I compile .c files with ocamlc how can I select C++ compiler ? Something like export CC=.....?
ocp has quit [Ping timeout: 256 seconds]
yacks has joined #ocaml
awm22 has quit [Quit: Leaving.]
cago has joined #ocaml
typoclass has quit [Ping timeout: 258 seconds]
dsheets has quit [Read error: Operation timed out]
fraggle_laptop has joined #ocaml
tane has joined #ocaml
<Kakadu> found, -cc
<Kakadu> but It will be great to set it without fixing _oasis files
smondet has joined #ocaml
ocp has joined #ocaml
maufred_ has quit [Ping timeout: 256 seconds]
Neros has joined #ocaml
maufred has joined #ocaml
_andre has joined #ocaml
SanderM has joined #ocaml
Yoric has quit [Ping timeout: 246 seconds]
<adrien_oww> it's encoded during the build process of the compiler
<adrien_oww> s/encoded/stored/
asmanur has joined #ocaml
maufred_ has joined #ocaml
beckerb has joined #ocaml
maufred has quit [Ping timeout: 258 seconds]
happy4crazy has joined #ocaml
happy4crazy has quit [Read error: Connection reset by peer]
happy4crazy has joined #ocaml
happy4crazy has quit [Ping timeout: 248 seconds]
Neros has quit [Ping timeout: 264 seconds]
dsheets has joined #ocaml
Neros has joined #ocaml
typoclass has joined #ocaml
PM has quit [Ping timeout: 246 seconds]
happy4crazy has joined #ocaml
groovy2shoes has joined #ocaml
rly has joined #ocaml
<rly> My opam is completely broken:
<rly> Internal error:
<rly> curl: empty response.
<Kakadu> opam --debug
PM has joined #ocaml
<rly> Kakadu: it seems they are just 'transient' errors.
<rly> Kakadu: running the command again installs a few packages.
<rly> Kakadu: installing it again another few, etc.
Nahra` has joined #ocaml
happy4crazy has quit [Remote host closed the connection]
groovy2shoes has quit [Quit: Computer has gone to sleep]
q66 has joined #ocaml
ollehar has joined #ocaml
happy4crazy has joined #ocaml
mort___ has joined #ocaml
<rly> Kakadu: is it a problem that I get warnings about "$HOME"/.opam/$version/stubs not being in ld.conf?
<rly> Kakadu: during opam package installations.
<Kakadu> never seen that
dsheets has quit [Read error: Operation timed out]
happy4crazy has quit [Remote host closed the connection]
madroach has quit [Quit: leaving]
madroach has joined #ocaml
Nahra` has quit [Ping timeout: 258 seconds]
SuperNoeMan has quit [Read error: Operation timed out]
SuperNoeMan has joined #ocaml
hkBst_ has quit [Read error: Connection reset by peer]
hkBst_ has joined #ocaml
typoclass has quit [Ping timeout: 258 seconds]
hkBst_ has quit [Read error: Connection reset by peer]
hkBst_ has joined #ocaml
Yoric has joined #ocaml
happy4crazy has joined #ocaml
Tobu has joined #ocaml
ocp has quit [Ping timeout: 240 seconds]
Neros has quit [Ping timeout: 245 seconds]
ontologiae has quit [Read error: Connection reset by peer]
ontologiae has joined #ocaml
fraggle_laptop has quit [Remote host closed the connection]
happy4crazy has quit [Remote host closed the connection]
mika1 has quit [Quit: Leaving.]
cago has left #ocaml []
mort___ has quit [Quit: Leaving.]
Tobu has quit [Ping timeout: 246 seconds]
Nahra` has joined #ocaml
Tobu has joined #ocaml
SanderM has quit [Read error: Connection reset by peer]
Neros has joined #ocaml
AltGr has quit [Quit: Konversation terminated!]
dsheets has joined #ocaml
hkBst_ has quit [Quit: Konversation terminated!]
zpe has quit [Remote host closed the connection]
mort___ has joined #ocaml
ontologiae has quit [Ping timeout: 256 seconds]
Kakadu has quit []
ollehar has quit [Ping timeout: 258 seconds]
ttamttam has quit [Quit: ttamttam]
ttamttam has joined #ocaml
ttamttam has quit [Client Quit]
wwilly has quit [Quit: Leaving]
zpe has joined #ocaml
Guest73208 has quit [Read error: Connection reset by peer]
dsheets has quit [Ping timeout: 245 seconds]
zpe has quit [Ping timeout: 245 seconds]
ohama has quit [Ping timeout: 255 seconds]
ohama has joined #ocaml
Kakadu has joined #ocaml
ttamttam has joined #ocaml
adahlberg has joined #ocaml
ollehar has joined #ocaml
rly has quit [Quit: WeeChat 0.3.7]
Neros has quit [Ping timeout: 240 seconds]
beckerb has quit [Quit: Konversation terminated!]
darkf has quit [Quit: Leaving]
zpe has joined #ocaml
wormphle1m has quit [Ping timeout: 264 seconds]
adahlberg has quit [Remote host closed the connection]
zpe has quit [Ping timeout: 252 seconds]
jophish_ has joined #ocaml
<jophish_> yo yo yo
mort___ has quit [Quit: Leaving.]
<jophish_> in C to check if an integer is a power of two I'd do i & (i-1); What's the easiest way to check this in ocaml?
<thelema> let is_power_two i = i land (i-1)
<Kakadu> thelema: and `=0` in the ent
<Kakadu> end*
<thelema> Kakadu: oops, of course
<thelema> too much C++ lately
Yoric has quit [Ping timeout: 264 seconds]
<jophish_> ah, that wasn't too hard. Thanks
ollehar has quit [Ping timeout: 252 seconds]
patronus has joined #ocaml
Neros has joined #ocaml
ggole has quit []
zpe has joined #ocaml
ulfdoz has joined #ocaml
zpe has quit [Ping timeout: 252 seconds]
mcclurmc has joined #ocaml
djcoin has quit [Quit: WeeChat 0.3.9.2]
wormphlegm has joined #ocaml
zpe has joined #ocaml
tane has quit [Quit: Verlassend]
zpe has quit [Ping timeout: 245 seconds]
dsheets has joined #ocaml
ontologiae has joined #ocaml
<fasta> Has anyone use Merlin?
<fasta> used*
<fasta> I installed it, but it cannot even get a file containing only comments right.
<fasta> Same thing with a 6 lines file with 3 nested lets, which is also common practice in OCaml.
<fasta> jophish_: in C that's not how you do that.
<jophish_> fasta: oh?
<jophish_> (it says 0 is a power of 2 too)
<jophish_> but apart form that it seems ok
<fasta> jophish_: you might pray that it works on most systems, though.
<fasta> jophish_: but it has nothing to do with C.
zpe has joined #ocaml
<jophish_> I don't quite follow
<fasta> jophish_: read the C standard and you will see that the C standard does not guarantee that it computes what you want.
<thelema> fasta: non-2's complement systems? negative numbers?
<fasta> thelema: yes
<fasta> jophish_: I am sure that there are packages which already solve this correctly.
<fasta> jophish_: just use that instead of rolling your own worse solutions.
<jophish_> I'm sure there are, but this was much faster to type
<thelema> fasta: afaict, there's no way that's correct and fast and succinct
<fasta> thelema: boy, oh boy.
<jophish_> This isn't part of any long term project, just hacking something out quickly
<fasta> Well, next time then refer to it as in my fantasy language this computes division by two mod some number.
<fasta> Some people might be listening in and think "yeah, that's a great idea".
<thelema> true; it's only useful in limited circumstances
<fasta> I think the whole concept of undefined behaviour is a mistake in C.
<fasta> Or 'implementation defined'.
<fasta> An optimizing compiler can fix all these trivial issues easily.
<fasta> So, then people can just write a mathematical version of whatever they mean.
osa1__ has quit [Read error: Operation timed out]
pkrnj has joined #ocaml
<thelema> the problem with the "optimizing compiler" argument is that most of the time it's "pattern matching", which is fragile to how you write the code.
osa1__ has joined #ocaml
zpe has quit [Ping timeout: 276 seconds]
<fasta> thelema: fragile to how you write the code?
<fasta> It seems the author of Merlin also lives on a different planet.
<fasta> He apparently thinks it's a good idea for something to not work.
<fasta> Also, he thinks it is a good idea to expose functionality and feature that functionality on his website and then say that people should NOT use it.
<fasta> That's just pure genius!
<fasta> Also in one other occasion he refers to 'yeah, that's in the Emacs' version, but.... he is distributing the emacs version...
<thelema> fasta: yes, in that it'll stop being fast if you make minor or even irrelevant changes to the code
<fasta> thelema: the optimizing compiler would by definition make it optimal for the given target arch.
<thelema> fasta: can't exist.
<fasta> thelema: I am sure that there are non-trivial optimizations too.
<fasta> thelema: but for this division trick, I am sure that it could be done.
<thelema> in all cases, all code that tests whether a number is a power of 2 gets rewritten by the compiler into optimal code for that platform?
<fasta> thelema: yes, why not?
<fasta> That's the whole point of a compiler.
<thelema> among other problems, it's impossible for a compiler to determine whether a given piece of code tests whether a number is a power of 2.
<bernardofpc> thelema: I think that it is possible if you bound the size of the AST you're working on to decide that it does something or not
<bernardofpc> the problem comes in "whole program optimization"
<bernardofpc> (Turing, Gödel, etc)
<fasta> thelema: these concepts should obviously part of the language then.
<bernardofpc> but if you fix a finite set, of a reasonable working size (say limited by x% of your RAM) then you can decide whether codes of size <= that compute or not a fixed thing
<fasta> thelema: the "standard library".
<fasta> thelema: and look at C, which does have that: It's called x/2.
<thelema> bernardofpc: I'll grant it's possible for bounded size code, because it could in theory be implemented as a dictionary lookup for every possible program up to that size. But it's almost certainly extremely impractical to do a proper job.
<thelema> the result being that you have to do an incomplete job, thus the fragile argument
<thelema> fasta: testing whether a number is a power of 2 should be in the stdlib of all languages?
<fasta> thelema: fast_divide_by_2 could otherwise be introduced.
_michi_ has joined #ocaml
<fasta> thelema: or... people could just ship languages with proof obligations.
<bernardofpc> thelema: well, since you don't have Gödel anymore, you could just use code analysis, understand what the inputs and outputs are, how they are related, and decide if it does or does not what you guess it does
<bernardofpc> it is probably better to have a dict lookup for recognizing common idioms (after normalization) to optimize than just throw your hands up and say "Turing complete"
<thelema> bernardofpc: not as part of a practical compiler
<bernardofpc> comming back to a favorite topic of mine, I find it very nice of GCC that it recognizes recursions that can be converted to tail-call and optimizes it that way
<bernardofpc> it is certainly impossible to dtect *all* such cases, but just being able to detect *most* is already a very good thing !
<bernardofpc> put it other way, if someone purposefully writes code that's going to be hard to optimize, I don't care that my compiler does not
karswell` has quit [Ping timeout: 245 seconds]
zpe has joined #ocaml
<thelema> bernardofpc: I think the argument is that it's too costly (slow compiles) to detect even most, so what you get is detecting a *few* cases, which can cause extra frustrations when all of a sudden code that was fast becomes really slow, and trying to guess code that will optimize
Snark has quit [Quit: leaving]
zpe has quit [Ping timeout: 240 seconds]
ontologiae has quit [Ping timeout: 255 seconds]
_michi_ has quit [Remote host closed the connection]
pkrnj has quit [Quit: Computer has gone to sleep.]
pkrnj has joined #ocaml
zpe has joined #ocaml
ollehar has joined #ocaml
Neros has quit [Remote host closed the connection]
zpe has quit [Ping timeout: 264 seconds]
pango has quit [Quit: Client exiting]
pango has joined #ocaml
_andre has quit [Quit: leaving]
thomasga has quit [Quit: Leaving.]
ttamttam has quit [Remote host closed the connection]
wmeyer has joined #ocaml
<wmeyer> hello
zpe has joined #ocaml
tane has joined #ocaml
eni has joined #ocaml
adahlberg has joined #ocaml
zpe has quit [Ping timeout: 245 seconds]
olaf_ has quit [Quit: Client exiting]
fraggle_ has quit [Read error: Connection reset by peer]
seymour has joined #ocaml
seymour has quit [Quit: Saliendo]
zpe has joined #ocaml
hto has quit [Ping timeout: 245 seconds]
hto has joined #ocaml
dsheets has quit [Ping timeout: 256 seconds]
Nahra` has quit [Remote host closed the connection]
Nahra has joined #ocaml
ollehar has quit [Ping timeout: 264 seconds]
Kakadu has quit []
eni has quit [Quit: Leaving]
ccasin has quit [Remote host closed the connection]
gnuvince has quit [Remote host closed the connection]
ccasin has joined #ocaml
beginner42 has joined #ocaml
<beginner42> my opam version is completely unusable, i get Bad format all the time. Whats the easiest way remove opam and get the newest, hopefully working version?
<beginner42> p.s. i dont really know how whats the correct form, so sed is no option
gnuvince has joined #ocaml
<companion_cube> bernardofpc: also, in C, you cannot write code relying on TCO to be correct (not fast), because TCO is not in the standard
pkrnj has quit [Quit: Computer has gone to sleep.]
beginner42 has quit [Quit: irc2go]
smondet has quit [Read error: Operation timed out]
ollehar has joined #ocaml
osa1__ has quit [Ping timeout: 264 seconds]
fraggle_ has joined #ocaml
sad0ur has joined #ocaml
rwmjones has quit [Read error: Operation timed out]
awm221 has joined #ocaml
wsebastian has quit [Quit: Bye]
RagingDave has quit [Quit: Ex-Chat]
jophish_ has quit [Remote host closed the connection]
rwmjones has joined #ocaml
oriba has joined #ocaml
mcclurmc has quit [Ping timeout: 240 seconds]
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
caj has joined #ocaml
<bernardofpc> companion_cube: Total Cost of Ownership ?
<bernardofpc> ah, Tail-call ?
<bernardofpc> I don't understand what you mean, honestly
<bernardofpc> fortunately not every function has to be a part of the standard to be correctly compiled
pkrnj has joined #ocaml
<ollehar> any good site to see future extensions and development of ocaml language?
caj has left #ocaml []
zpe has quit [Remote host closed the connection]
dsheets has joined #ocaml
<ousado> ollehar: check out the branches in the repository
<ollehar> ousado: ok