<lilred>
what do you mean unicode doesn't include a CFG
<whitequark>
unicode encoding can be described with a regular grammar
<whitequark>
that's how ulex/sedlex implement utf8 decoding, in fact
<whitequark>
oh, scratch that, they don't
<lilred>
u_u
<lilred>
this is all very confusing
<whitequark>
sorry
<lilred>
np I appreciate the help
<whitequark>
can you elaborate on what were you asking initially, exactly?
<whitequark>
I feel like I didn't understand your question
mawuli has joined #ocaml
_twx__ has quit [Remote host closed the connection]
inr has joined #ocaml
gereedy has joined #ocaml
<lilred>
I'm doing some exploration on writing a compiler in ocaml, and I'd like the source code to be UTF-8 or similar, but Ocaml lacks first-class support for it
larhat has joined #ocaml
mekaj has joined #ocaml
<lilred>
so what I'm wondering is - are there parser generators, etc. that can be made to parse unicode
<whitequark>
if you use a separate lexer and parser, you can do that with sedlex and menhir
<lilred>
that sounds good to me
<lilred>
Forgive me, I'm pretty new at this - I'd like my compiler to report ambiguity from left to right, does this conflict with the idea of a rightmost derivation?
<lilred>
ambiguity, errors, etc
<lilred>
more generally I'm wondering about the impact of using a rightmost derivation for error reporting
iorivur has joined #ocaml
zpe has joined #ocaml
<whitequark>
well, it's somewhat well-known that LALR(1) parser generators don't give you very good error reporting
<whitequark>
in case of menhir there's merr, which gives quite a good result with minimal effort
<flux>
I seem to recall that there were some issues with PPX and toplevel, there was some mantis bug about that with the hopes that it would be integrated to 4.02.1
<flux>
but I don't really recall if the issue was what you're facing
teiresia1 has quit [Changing host]
teiresia1 has joined #ocaml
teiresia1 is now known as teiresias
divyanshu has quit [Quit: Computer has gone to sleep.]
divyanshu has joined #ocaml
divyanshu has quit [Client Quit]
<AltGr>
kaustuv, what warning exactly ?
samrat has quit [Quit: Computer has gone to sleep.]
samrat has joined #ocaml
araujo has quit [Ping timeout: 240 seconds]
tane has joined #ocaml
kakadu has joined #ocaml
Leonidas_ is now known as Leonidas
jao has quit [Ping timeout: 272 seconds]
pyon has quit [Ping timeout: 240 seconds]
araujo has joined #ocaml
divyanshu has joined #ocaml
nojb has joined #ocaml
dsheets has joined #ocaml
Simn has joined #ocaml
ontologiae has joined #ocaml
vogler has joined #ocaml
octachron has joined #ocaml
ontologiae has quit [Ping timeout: 250 seconds]
lordkryss has joined #ocaml
tani has joined #ocaml
tane has quit [Ping timeout: 244 seconds]
Bluddy has quit [Quit: Connection closed for inactivity]
cesar_ has joined #ocaml
cesar_ is now known as Guest23297
<Unhammer>
OCalm
<Unhammer>
oh oh title idea for whoever is writing the batteries-version of RWO:
<Unhammer>
Little Book of OCaml
<Unhammer>
"A serene introduction to …"
siddharthv is now known as siddharthv_away
zpe has joined #ocaml
<dmbaturin>
Someone should write "The little ocamler".
MercurialAlchemi has quit [Ping timeout: 245 seconds]
Guest23297 has quit [Ping timeout: 272 seconds]
<Unhammer>
The little ocaml that could
jonludlam has joined #ocaml
MercurialAlchemi has joined #ocaml
pyon has joined #ocaml
<tani>
RWO is a good book, even you use batteries :)
<tani>
+if
<Unhammer>
true, I just wish there were more examples online of batteries-usage
<dmbaturin>
tani: It happened to be my first ocaml book, and its coreness was confusing because I had no idea what core is at the time.
<tani>
well, afair they explained that at the beginning
<Unhammer>
it is a bit hard to tell throughout the book what requires Core and what does not
<Unhammer>
perhaps a good and up-to-date "batteries vs core (vs plain ocaml) would help
<tani>
yeah
<Unhammer>
(what is the term for not using batteries/core/extlib?)
<reynir>
Masochist? ;)
kakadu has quit [Ping timeout: 246 seconds]
<kaustuv>
flux: yeah, it seems that there is some magic #ppx directive needed for ppx_deriving to work. Anyway I can't seem to figure it out.
<kaustuv>
I guess I can wait until the documentation for ppx is written
<Unhammer>
reynir, haha :)
<Unhammer>
well, plain ocaml (guess I'll call it that) does give smaller binaries so I guess it has its pros
Thooms has joined #ocaml
tianon has quit [Quit: brb]
tianon has joined #ocaml
marynate has quit [Ping timeout: 244 seconds]
<Unhammer>
if I do something like "Map.Make(…)" – can I add a function to my newly Make'd module afterwards?
<def`>
module M = struct include Map.Make(…) let what'i'added = 42 end
AlexRussia has joined #ocaml
<Unhammer>
oh sweet
<Unhammer>
thanks, def` :)
iorivur_ has quit [Ping timeout: 244 seconds]
iorivur has joined #ocaml
siddharthv_away is now known as siddharthv
<AlexRussia>
how to do in ocaml thing simular to 'x % 2' in C?
<AlexRussia>
could i define local variable(into function) with same name as function argument?
cesar_ has joined #ocaml
<dmbaturin>
Sure. let f f = f + f ;;
cesar_ is now known as Guest52942
iorivur has quit [Ping timeout: 260 seconds]
<AlexRussia>
hm
<AlexRussia>
dmbaturin: help me understand my mistake please!
<AlexRussia>
let rec gen_row bound =
<AlexRussia>
let x = bound+1 in
<AlexRussia>
if x > 0 then (Random.int x) + 1 :: gen_row (bound-1)
<AlexRussia>
else [];;
<AlexRussia>
why gen_row 1;; return list size 2?
<AlexRussia>
i want i
<AlexRussia>
1*
<asmanur_>
because 1+1 is 2
<AlexRussia>
?
<AlexRussia>
ou
<AlexRussia>
lol
<def`>
asmanur_: prove it!
<asmanur_>
reflexivity.
<rks`>
#party-hard
<asmanur_>
why do you do bound + 1 AlexRussia ?
<def`>
I feel there is some reduction involved inbetween
<AlexRussia>
hm
<AlexRussia>
i guess i am stupid :D
<dmbaturin>
Proof. simple. reflexivity. Qed.
Guest52942 has quit [Ping timeout: 245 seconds]
<AlexRussia>
i want to get random number between 1...bound(... mean include bound in range)
oscar_toro has quit [Ping timeout: 272 seconds]
<asmanur_>
dmbaturin: the simpl is not needed as Coq will normalize the types before applying reflexivity
<dmbaturin>
Good point.
iorivur has joined #ocaml
<AlexRussia>
that's just:
<AlexRussia>
let rec gen_row bound =
<AlexRussia>
if bound > 0 then (let rand = Random.int (bound + 1) in if rand = 0 then 1 else rand) :: gen_row (bound-1)
<AlexRussia>
else [];;
<AlexRussia>
dammit, it seems really fun
<Unhammer>
is there a common idiom for where you want to map through a list but have access to both the first and second element? (not that it's hard to let rec, just wondering)
nojb has quit [Ping timeout: 250 seconds]
<AlexRussia>
Unhammer: who you're asking? :)
badon has quit [Ping timeout: 272 seconds]
<AlexRussia>
strange
<AlexRussia>
i use after this gen_row(renamed to gen_columns) in gen_rows and i got wrong thing: [] at the end of list :/
samrat has quit [Quit: Computer has gone to sleep.]
samrat has joined #ocaml
AltGr has left #ocaml [#ocaml]
<AlexRussia>
oh
<AlexRussia>
i got just wrong logic i think
<AlexRussia>
hm
<AlexRussia>
dmbaturin: can i have variable which save value between recursive calls?
<dmbaturin>
You can use references, but before that try making it an additional argument and passing it around.
<AlexRussia>
dmbaturin: lol, idk why, but it anyway insert list in the end of list, even if i want to have sth like [ [1,2,3] ]
<AlexRussia>
dmbaturin: haha
<AlexRussia>
dmbaturin: i've got it, its cause i return [ [ ] ] in else(bound less than zero) and that fun
bjorkintosh has joined #ocaml
ggole has joined #ocaml
kaustuv has left #ocaml ["ERC Version 5.3 (IRC client for Emacs)"]
tani has quit [Quit: Verlassend]
_andre has joined #ocaml
Plazma has quit [Remote host closed the connection]
Plazma has joined #ocaml
hhugo has joined #ocaml
MercurialAlchemi has quit [K-Lined]
badon has joined #ocaml
divyanshu has quit [Quit: Computer has gone to sleep.]
koderok has quit [Quit: koderok]
samrat has quit [Quit: Computer has gone to sleep.]
<flux>
FoCaLiZe seems interesting. saying this as someone who hasn't quite found the time to get onto Coq :-)
nojb has joined #ocaml
oscar_toro has joined #ocaml
badon has quit [Ping timeout: 255 seconds]
<dmbaturin>
flux: What is it?
<flux>
it's a programming language from where you can extract both ocaml programs and Coq proofs
<flux>
not completely automatically, though, but it looks like it's less of an effort than to use Coq directly
<flux>
Coq on the other hand is a proof assistant, it helps you to prove statements
<flux>
in this case it's used for checking the proofs generated by the FoCaLiZe pipeline
divyanshu has joined #ocaml
hhugo has quit [Quit: Leaving.]
<dmbaturin>
I tried to read the "Software foundations" but it only caused massive headache. :)
<flux>
try aspirin :)
<dmbaturin>
I tried "Certified programming with dependent types" instead.
koderok has joined #ocaml
siddharthv is now known as siddharthv_away
<dmbaturin>
Part of the problem, of course, is that my formal CS education didn't exactly suck, but it didn't include any of those topics either.
jonludlam is now known as jonludlam^lunch
samrat has joined #ocaml
larhat has quit [Read error: No route to host]
larhat1 has joined #ocaml
BitPuffin has joined #ocaml
hhugo has joined #ocaml
hhugo has quit [Ping timeout: 246 seconds]
<gasche>
dmbaturin: moving from "Software Foundations" to the CPDT cannot be a good strategy if you want to minimize headaches
<gasche>
you must perservere with Software Foundations, it is the most beginner-friendly material on Coq
<gasche>
CPDT, on the contrary, is quite advanced and it's unreasonable to attack it before mastering the main parts of SF
divyanshu has quit [Quit: Computer has gone to sleep.]
<gasche>
if you want to try verified programming without the proof assistants parts, you should look at Why3 as well
<gasche>
(but if you want to learn about really formal proofs, the use of *some* proof assistant is a must-have)
divyanshu has joined #ocaml
cesar_ has joined #ocaml
cesar_ is now known as Guest79840
ygrek_ has quit [Ping timeout: 272 seconds]
<dmbaturin>
gasche: I think I should get back to software foundations for the rest of material. First chapters of CPDT sort of reduced the WTF feeling though.
<gasche>
I would bet that's a second-encounter effect and not really related to the respective content of the two books
<dmbaturin>
Hhm, good point, that's possible.
<gasche>
(not that I think any ill of CPDT; it's an excellent book, for more advanced and/or highly autonomous users)
SomeDamnBody has quit [Ping timeout: 240 seconds]
hhugo has joined #ocaml
hhugo has quit [Client Quit]
Guest79840 has quit [Ping timeout: 250 seconds]
<dmbaturin>
gasche: The funniest part is that my encounter with software foundations was absolutely random. Moreover, it was before I started with ocaml.
Thooms has joined #ocaml
<dmbaturin>
(And ocaml is the first functional language I started actively using)
Thooms has quit [Client Quit]
<dmbaturin>
Sometimes blindly following links people share gives you shock sites, or software foundations, or other things you wouldn't find on your own. :)
Thooms has joined #ocaml
samrat has quit [Quit: Computer has gone to sleep.]
divyanshu has quit [Quit: Computer has gone to sleep.]
bytbox has quit [Remote host closed the connection]
tane has joined #ocaml
<gasche>
knowing a bit about statically typed functional programming definitely helps to work with dependently-typed proof assistants
sepp2k has joined #ocaml
ontologiae has quit [Ping timeout: 244 seconds]
igstan has joined #ocaml
ygrek_ has joined #ocaml
darkf has quit [Quit: Leaving]
badkins has joined #ocaml
Thooms has quit [Ping timeout: 260 seconds]
ysz has quit [Quit: This computer has gone to sleep]
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
SethTisue has joined #ocaml
nojb has left #ocaml ["ERC Version 5.3 (IRC client for Emacs)"]
avsm has joined #ocaml
bytbox has joined #ocaml
divyanshu has joined #ocaml
koderok has quit [Quit: koderok]
sheijk has quit [Quit: .]
ontologiae has joined #ocaml
Thooms has joined #ocaml
fraggle-boate has quit [Remote host closed the connection]
Thooms has quit [Client Quit]
koderok has joined #ocaml
samrat has joined #ocaml
lordkryss has quit [Quit: Connection closed for inactivity]
fraggle-boate has joined #ocaml
shinnya has joined #ocaml
SethTisue has quit [Quit: SethTisue]
bytbox has quit [Remote host closed the connection]
SethTisue has joined #ocaml
koderok has quit [Quit: koderok]
ontologiae has quit [Ping timeout: 244 seconds]
thomasga has joined #ocaml
jonludlam^lunch is now known as jonludlam
tnguyen has quit [Ping timeout: 240 seconds]
_5kg has quit [Read error: Connection reset by peer]
cesar_ has joined #ocaml
cesar_ is now known as Guest54598
SethTisue has quit [Quit: SethTisue]
samrat has quit [Quit: Computer has gone to sleep.]
<ollehar>
gasche: such a pitty there's no physical copy of SF
Guest54598 has quit [Ping timeout: 246 seconds]
ygrek_ has quit [Ping timeout: 240 seconds]
lordkryss has joined #ocaml
<whitequark>
Drup: yay, all my patches accepted to findlib
<whitequark>
now I only need 4.02 :]
Thooms has joined #ocaml
<whitequark>
4.02.1*
<rks`>
so you're the kind of guy making us recompile all our opam packages
<rks`>
alright
<whitequark>
rks`: you won't have to, after opam 1.2
<rks`>
wow, ok
<rks`>
(cool)
<whitequark>
depends: ["ocamlfind" {build}
<rks`>
and err, what are your patches against findlib about?
<whitequark>
I added OCAMLFIND_TOOLCHAIN env variable that is equivalent to -toolchain, to aid cross compilling
<rks`>
ok
<whitequark>
and I added some moderately obscure ppxopt mechanism to META files
<whitequark>
so that the expressive power of ppx extension packages is on par with camlp4
<whitequark>
like, I would have a package "ppx_deriving_json" ( requires = "ppx_deriving" ppxopt = "ppx_deriving,./ppx_deriving_json.cma" )
<whitequark>
and package "ppx_deriving" ( ppx = "./ppx_deriving" )
<whitequark>
so ppx_deriving_json would add another argument to the invocation of ppx_deriving
samrat has joined #ocaml
amirmc has joined #ocaml
mcclurmc has joined #ocaml
<reynir>
is there an example of how to use ppx_deriving with ocamlbuild?
thomasga has quit [Quit: Leaving.]
<Drup>
foo.ml : package(ppx_deriving)
bytbox has joined #ocaml
morphles has joined #ocaml
ollehar has quit [Ping timeout: 260 seconds]
<reynir>
I get "Unrecognized [@@deriving] annotation syntax"
<reynir>
Oh
<reynir>
show should be Show
<whitequark>
reynir: sorry, ppx_deriving is in a bit of a transition period right now. I will make a new release very soon™
<AlexRussia>
can i am define function with dynamic length of arguments?
<whitequark>
yes, in 0.3 it's Show
ygrek_ has joined #ocaml
<AlexRussia>
something like int foo(...) {/* ... */ return 0;} in C
<Drup>
AlexRussia: maybe, but probably not what you will want, and it's complicated.
<AlexRussia>
Drup: but that may be recursive! :D
thomasga has joined #ocaml
igstan has quit [Quit: igstan]
<reynir>
whitequark: OK, thanks. I got it working for now. :)
ggole has quit [Ping timeout: 260 seconds]
araujo has quit [Ping timeout: 240 seconds]
<whitequark>
ooooooo
<whitequark>
"We have the pleasure of announcing the release of OCaml version 4.02.1. This is all about speed: not only this release fixes a large slowdown in the compiler, but today is also the anniversary of the first time a man broke the sound barrier with an airplane.
ggole has joined #ocaml
araujo has joined #ocaml
Bluddy has joined #ocaml
zpe has quit [Remote host closed the connection]
<companion_cube>
whitequark: can you say "now I only need 5.00.0 :]" just to check something?
<whitequark>
now I only need 5.00.0
roelof has joined #ocaml
<roelof>
Hello, Is this (http://ocaml-book.com ) a good book for a absolute beginner ?
oscar_toro has quit [Ping timeout: 250 seconds]
<companion_cube>
whitequark: aww, didn't work
<companion_cube>
maybe it's because you forgot the ":]"
<smondet>
roelof: yes, I've heard good feedback from beginners (but they had some prog experience in some other language like python or JS)
<whitequark>
now I only need 5.00.0 :]
<roelof>
smondet: thanks, Im looking the whole day for a good book with exercises
bytbox has quit [Remote host closed the connection]
<roelof>
smondet: which step or book can I follow after the book that im now following
marynate has quit [Quit: Leaving]
<reynir>
Ah, ppx_deriving_yojson is strict
<whitequark>
reynir: what do you mean?
cesar has joined #ocaml
<whitequark>
companion_cube: still doesn't work
<companion_cube>
yes, too bad :/
<whitequark>
what was it supposed to be?
<companion_cube>
I really wanted modular implicits! ^^
cesar is now known as Guest66967
<whitequark>
lol
<companion_cube>
trigger a mail from Damien to announce the OCaml version you wished for
ysz has joined #ocaml
<companion_cube>
it worked like 1 hour ago!
<whitequark>
oooooh
<whitequark>
:D
<reynir>
whitequark: "Objects are deserialized strictly; that is, all keys in the object have to correspond to fields of the record." :)
<companion_cube>
for a while I thought you were a OCaml release wizard :)
ollehar has joined #ocaml
<reynir>
Unfortunately, I have to deal with a web service that may add additional fields any time :/
<whitequark>
reynir: well, yeah. I suppose I could add an option for that.
Guest66967 has quit [Ping timeout: 260 seconds]
<whitequark>
reynir: you'll have to wait a bit, so that I could sort out the 4.02.1-related stuff
<reynir>
No problem at all! :)
<roelof>
anyone else who knows a good book for a beginner with exercises ??
<Drup>
roelof: real world ocaml ?
<whitequark>
^
<roelof>
Drup : Does that one has exercises. I did not find them , That's why I know read this book (http://ocaml-book.com/ )
<maurer>
which I thought would make ocamlfind query foo return foos from the first path first
<maurer>
but it doesn't seem to be doing so
Guest43247 has quit [Ping timeout: 272 seconds]
<maurer>
(it's returning a /usr/lib/ocaml path, which is the system version rather than the patched version)
<whitequark>
maybe the direction is wrong?
<ggole>
Hmm, doesn't seem to work for exceptions: things are a bit different than Frisch's original blog post
<whitequark>
ggole: it was *heavily* changed
<ggole>
Guess I should poke around for the discussion thread
<whitequark>
hhhahahaha
<maurer>
whitequark: I changed it to /usr/local/lib/ocaml/4.01.0:/usr/lib/ocaml:/usr/lib/ocaml/METAS:/usr/local/lib/ocaml/4.01.0
<whitequark>
the letters mantis sends me are like a kilometer long
<maurer>
whitequark: still no dice
<ggole>
Still, almost everything I want is there ♥
<whitequark>
ggole: what's not there?
<whitequark>
records?
<whitequark>
maurer: can you strace it?
<ggole>
And the t.A type stuff
<maurer>
whitequark: that was how I found ocamlfind.conf in the first place :P
<maurer>
but yeah, I'll look
<maurer>
...and I found the issue
<maurer>
the guy patching it silently switched from foo-bar as a package name to foo_bar
<maurer>
>_>
<maurer>
sorry for bothering you
<whitequark>
sure, no problem
<ggole>
Ah, the good old trivial-name-change-in-the-back.
<ggole>
Never see it coming.
ygrek_ has quit [Ping timeout: 240 seconds]
<whitequark>
gasche: ping
thomasga has quit [Quit: Leaving.]
thomasga has joined #ocaml
tristero has quit [Read error: Connection reset by peer]
Thooms has quit [Quit: WeeChat 1.0.1]
<Leonidas>
4.02.1 installed and guess what, Core fails to build
<companion_cube>
so surprising
<Leonidas>
I suppose I need to sacrifice a goat or something.
mcclurmc has joined #ocaml
<Bluddy>
ggole: the t.A type stuff was deemed too complex/controversial and was dropped
dsheets has quit [Ping timeout: 255 seconds]
<Bluddy>
for the sake of integration, the proposal was simplified
ggherdov has quit [Ping timeout: 260 seconds]
<companion_cube>
what's t.A ?
<whitequark>
the type of record embedded in the constructor A of variant type t
<companion_cube>
oh, ok
dwoos has quit [Ping timeout: 260 seconds]
AlexRussia has quit [Ping timeout: 240 seconds]
AlexRussia has joined #ocaml
dwoos has joined #ocaml
mcclurmc has quit [Ping timeout: 255 seconds]
ollehar has joined #ocaml
mcclurmc has joined #ocaml
bitbckt_ is now known as bitbckt
bitbckt has quit [Changing host]
bitbckt has joined #ocaml
thomasga has quit [Quit: Leaving.]
ontologiae has quit [Ping timeout: 260 seconds]
ggherdov has joined #ocaml
vfoley- has quit [Ping timeout: 240 seconds]
thomasga has joined #ocaml
<Unhammer>
hmm, tried porting a program from python to ocaml to see if I could get a speed-up – pretty much the same code (where the bottleneck is a hash table iteration) performs 1.15x better in ocaml than pypy on my 64-bit xubuntu laptop, 1.15x worse in ocaml than pypy on a 32-bit ubuntu server
<Unhammer>
(conclusion: upgrade the server to 64-bit? heh)
<whitequark>
interesting
<whitequark>
is pypy's hash table implemented in python?
<Unhammer>
what I read is that they implement the pypy interpreter in python and then have a general python-to-C compiler for all of their stuff
<ggole>
It's a meta-tracing thing with a bunch of strange layers
<ggole>
Very interesting approach
<whitequark>
yeah, it's not as simple as that
<whitequark>
very interesting indeed
<whitequark>
I wish Topaz (Ruby on PyPy) would have survived
<Unhammer>
(for comparison, standard python2 is 4.1x slower than pypy on the same code)
<whitequark>
Unhammer: you're benchmarking the C hash table impl in CPython though, so it's not very relevant
<whitequark>
if surprising
<whitequark>
OCaml has Hashtbl implemented in OCaml.
<ggole>
My incomplete understanding is that you write an interpreter in a subset of Python called RPython, and they have tooling to compile that into a JIT compiler that is generated C.
<ggole>
And the JIT compiler has a bunch of runtime specialisation machinery to make data structures less awful than they are in CPython.
<whitequark>
they also seem to have pretty powerful on-stack replacement stuff
<whitequark>
which was the most impressive part for me
<whitequark>
like unboxing that can be deoptimized when needed
<ggole>
Allocation sinking?
<whitequark>
yeah
<ggole>
That's just a special case of PRE as I understand it.
<Leonidas>
I suppose I need to sacrifice a goat or something.
<ggole>
Not really particular to JITs
<Leonidas>
sorry, mistyped
<ggole>
(Probably particularly *useful* for JITs that are running dynamic langs, though)
<whitequark>
PRE?
<ggole>
Partial redundancy elimination... you know what loop invariant code motion is?
<Unhammer>
o__O
<whitequark>
yeah, I know about LICM. never heard about PRE though
<ggole>
You take an operation that is available everywhere in the loop as the same value and hoist it above the loop
<ggole>
Allocation sinking is the inverse operation: you take code that is useless everywhere in the loop (the allocation) and sink it below the loop
<whitequark>
oh
<whitequark>
no, it's not like that
<ggole>
PRE is basically both of those things at once.
<whitequark>
I mean when you have, say, a class and you unbox it and put it on stack (or even in registers) as its constituent ivars
<whitequark>
and then some fucker does eval() and you see, whoa, you need the class back.
<ggole>
Yes, that's allocation sinking.
<whitequark>
ah.
<whitequark>
I see.
<ggole>
It's really nice, but you don't need a JIT for it.
<whitequark>
you need a JIT to deopt, don't you?
<whitequark>
or well, you could just add slow paths everywhere
<whitequark>
but that absolutely explodes your code size
<ggole>
Yes, so if you want to change your code based on various assumptions, then you need a JIT and deopt and all of that stuff.
<ggole>
But PRE/sinking/hoisting are orthogonal to that.
<whitequark>
I see your point, yes
<ggole>
Sinking is related in that deopt is going to require those values in their most conservative forms, eg, everything in memory in nice objects as the programmer specified them.
<ggole>
So JIT compilers with deopt are particularly motivated to implement that.
ollehar has quit [Ping timeout: 245 seconds]
manizzle has joined #ocaml
slash^ has quit [Read error: Connection reset by peer]
yomimono has joined #ocaml
ollehar has joined #ocaml
MercurialAlchemi has joined #ocaml
wwilly has joined #ocaml
WraithM has quit [Ping timeout: 240 seconds]
ontologiae has joined #ocaml
SethTisue has joined #ocaml
samrat has quit [Ping timeout: 250 seconds]
macdice has joined #ocaml
tnguyen has quit [Ping timeout: 260 seconds]
cesar has joined #ocaml
tane has quit [Quit: Verlassend]
cesar is now known as Guest51018
Guest51018 has quit [Ping timeout: 240 seconds]
claudiuc has joined #ocaml
claudiuc has quit [Read error: Connection reset by peer]
claudiuc has joined #ocaml
SethTisue has quit [Quit: SethTisue]
tac_ has joined #ocaml
vfoley- has joined #ocaml
manud has joined #ocaml
tnguyen has joined #ocaml
yomimono has quit [Ping timeout: 272 seconds]
ggole has quit []
malo has quit [Remote host closed the connection]
axiles has quit [Remote host closed the connection]
MercurialAlchemi has quit [Ping timeout: 258 seconds]
morphles has quit [Ping timeout: 258 seconds]
jonludlam has quit [Ping timeout: 260 seconds]
Hannibal_Smith has joined #ocaml
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
lordkryss has quit [Quit: Connection closed for inactivity]
mcclurmc has quit [Remote host closed the connection]
mcclurmc has joined #ocaml
Hannibal_Smith has quit [Quit: Sto andando via]
lordkryss has joined #ocaml
_andre has quit [Quit: leaving]
<Leonidas>
are there known issues with gprof and ocaml 4.02.1?
<Leonidas>
my executable runs for ~10 seconds, yet gprof displays cumulative times of 0.01s
manud has quit [Quit: manud]
ollehar has quit [Quit: ollehar]
<whitequark>
try `perf record` instead
fraggle-boate has quit [Read error: No route to host]
<Leonidas>
that seems to work much better
<Leonidas>
but that does not display which functions were called and how often. meh, profiling sucks
<Drup>
Leonidas: "perf report"
<Leonidas>
Drup: that only displays the "overhead", command, shared obj and symbol
<Leonidas>
not the callcounts or cumulative time
<whitequark>
perf is a sampling profiler
<whitequark>
it doesn't have a precise callcount, much less cumulative time
<Drup>
Leonidas: if you want the callgraph, compile your code with the opam switch -fp
<Leonidas>
okay, then I want gprof, but without the odd results
<Leonidas>
ah!
<Drup>
"+fp" in fact
<Drup>
it should exist for all compiler since 4.00.0
fraggle-boate has joined #ocaml
<Leonidas>
Drup: wait, you don't mean 4.02.1+fp?
<Drup>
yes, I do
<Leonidas>
okay, because this doesn't exist
<Leonidas>
need to go with 4.01.0+fp
<Drup>
maybe the 4.02.1+fp was not done yet
<Leonidas>
4.02.0+fp neither
<Drup>
hum, weird, should do a pr on opam-repo for that
<Leonidas>
not a problem atm, I'll just go with 4.01.0
<Drup>
Leonidas: it's quite easy to compile on your own, it's just an option to add when compiling the compiler
jonludlam has joined #ocaml
<Leonidas>
First I'll try the existing compiler and if that helps me with debugging, I'll do a PR
mcclurmc has quit [Read error: Connection reset by peer]
manud has joined #ocaml
<Drup>
it allows to get the call graph in perf, that's all