<rgrinberg>
ShalokShalom_: there's a point to ;; in the source sometimes. I find that if i have a syntax error and the compiler is spewing some bogus locs
<rgrinberg>
;;'s make it show better error locationos
<flux>
(I think it might have even been the biggest bug of Lwt, so I really appreciate this change.)
sam_ has joined #ocaml
al-damiri has joined #ocaml
sam_ has quit [Ping timeout: 248 seconds]
pigeonv has joined #ocaml
KeyJoo has joined #ocaml
ygrek has quit [Remote host closed the connection]
ygrek has joined #ocaml
<ShalokShalom_>
rgrinberg: thanks
ShalokShalom_ is now known as ShalokShalom
<hannes>
rwmjones: IIUC your patch introduces lots of new symbols? is this measurable in the binary size?
<companion_cube>
rgrinberg: I'm happy with jbuilder, but it's not very flexible so far (e.g. for compiler-specific options)
two_wheels has joined #ocaml
TheLemon1an has quit [Read error: Connection reset by peer]
TheLemonMan has joined #ocaml
<rwmjones>
hannes: they're just hidden aliases so I wouldn't expect them to have any effect (except on debuginfo)
<rwmjones>
otoh I didn't look because I'm more interested in whether it works or not
<hannes>
rwmjones: working is for sure a good argument :) -- but I'd be interested (since in the issue there were several potential solutions outlined AFAIR)
<rwmjones>
hannes: none of the other solutions work
TheLemonMan has quit [Ping timeout: 246 seconds]
<hannes>
rwmjones: oh, ok.
samrat_ has quit [Ping timeout: 246 seconds]
ygrek has quit [Ping timeout: 248 seconds]
_andre has joined #ocaml
<aantron>
flux: indeed. it's still the old terminology in most of the the rest of the manual at this point, though :/
copy_ has joined #ocaml
Orion3k has quit [Ping timeout: 255 seconds]
Orion3k has joined #ocaml
sam_ has joined #ocaml
wklm has joined #ocaml
AltGr has joined #ocaml
sam_ has quit [Ping timeout: 260 seconds]
mbuf has quit [Quit: Leaving]
sepp2k has quit [Remote host closed the connection]
samrat_ has joined #ocaml
steve_gh has joined #ocaml
dakk_ has joined #ocaml
AltGr has left #ocaml [#ocaml]
sz0 has quit [Quit: Connection closed for inactivity]
sh0t has joined #ocaml
TheLemonMan has joined #ocaml
Denommus has joined #ocaml
AltGr has joined #ocaml
TobiasBales has quit [Ping timeout: 248 seconds]
Mercuria1Alchemi has quit [Ping timeout: 248 seconds]
sam___ has joined #ocaml
sam___ has quit [Ping timeout: 255 seconds]
dakk_ has quit [Ping timeout: 260 seconds]
AltGr has left #ocaml [#ocaml]
TheLemonMan has quit [Ping timeout: 246 seconds]
TheLemonMan has joined #ocaml
argent_smith has quit [Quit: Leaving.]
wklm has quit [Quit: leaving]
tokomak has joined #ocaml
al-damiri has quit [Quit: Connection closed for inactivity]
FreeBirdLjj has joined #ocaml
Denommus has quit [Ping timeout: 252 seconds]
aciniglio has joined #ocaml
jao has joined #ocaml
dakk_ has joined #ocaml
AltGr has joined #ocaml
KeyJoo has quit [Ping timeout: 240 seconds]
<rgrinberg>
companion_cube: i knew you'd come around :P. Yeah, I'm aware that's issue, there's some ideas on how to fix it. Maybe this upcoming jbuilder hackathon will make some progress?
<companion_cube>
bah, it's just for one project
<companion_cube>
where I also decided to restrict myself to OCaml >= 4.04.0+flambda :p
<rgrinberg>
companion_cube: do you believe the speed claims yet?
<companion_cube>
meh
<companion_cube>
with flambda, it's slow anyway ;)
<companion_cube>
(but granted, the startup is faster)
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
MercurialAlchemi has joined #ocaml
superherointj has joined #ocaml
samrat_ has quit [Ping timeout: 248 seconds]
Denommus has joined #ocaml
ygrek has joined #ocaml
pigeonv has quit [Ping timeout: 248 seconds]
flux has quit [Ping timeout: 240 seconds]
flux has joined #ocaml
enterprisey has joined #ocaml
AltGr has left #ocaml [#ocaml]
flx_ has joined #ocaml
flux has quit [Read error: Connection reset by peer]
flx_ is now known as flux
govg has joined #ocaml
andreas__ has joined #ocaml
kakadu has quit [Quit: Konversation terminated!]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
superherointj has quit [Quit: Leaving]
jlam has quit [Quit: Leaving]
FreeBirdLjj has quit [Ping timeout: 246 seconds]
mengu has quit [Remote host closed the connection]
TheLemonMan has joined #ocaml
samrat has joined #ocaml
philtor has quit [Ping timeout: 248 seconds]
zlsyx has joined #ocaml
FreeBirdLjj has joined #ocaml
<zlsyx>
If you have TLB with 32 slots and you iterate over 200 000 longs, how many misses will you get?
<zlsyx>
Assume 46-bit virt. address space and 32 bit physical address space.
<mrvn>
So for 4 byte longs = 800000 byte < 1MB page it's one TLB miss for a 2MB page.
<zlsyx>
Page size if 8KB so TLB entry covarage will be also 8KB right?
<zlsyx>
Page size of 8KB so TLB entry covarage will be also 8KB right?
<mrvn>
depends on your cpu
<mrvn>
most architectures have 4k pages. are you on sparc?
<zlsyx>
No, just exam problem.
<zlsyx>
Page size is given and 64 bits are read consecutively.
<zlsyx>
Shouldn't it be that we read 8 bytes at a time so we get a miss and then load it in the TLB 8KB so 1024 read longs for 1 miss. So 200 000 / 1024 I'm assuming they are consecutive in memmory which I think they should be?
<mrvn>
if the longs are unaligned you might get an extra TLB fault.
<zlsyx>
Like ok, you read the first long, since TLB empty you get one 8KB so you are good for 1024.
<mrvn>
if they are random access every one may fault.
<zlsyx>
And if alligned?
<mrvn>
actually, random and unaligned might fault twice per long.
<mrvn>
zlsyx: if you read sequentially and aligned then yes, you get one fault on the first read and then the next 1023 longs will hit.
<zlsyx>
What I don't understand is why the 32 slots matter at all. Like when you aren't finding it in cache it's a miss so you must overwrite the TLB cache, am I wrong?
jao has quit [Ping timeout: 255 seconds]
<mrvn>
the number of slots is totally irelevant for sequential access. Only matters for random access or repeated access.
<mrvn>
But that's really not an ocaml problem, is it?
<zlsyx>
So if sequential then 200 000 / 1024 misses?
<aantron>
i don't know how this play out, hopefully well. if you want to work on it, its extra important to claim it to avoid disappointing others if they work concurrently. im basically going to ignore the bounty, and work with any contributors as normal (hopefully in a helpful way :))
Ragora has quit [Read error: Connection reset by peer]
Ragora has joined #ocaml
superherointj has joined #ocaml
mengu has joined #ocaml
mengu has quit [Ping timeout: 248 seconds]
kakadu has joined #ocaml
nahra has joined #ocaml
ygrek has quit [Remote host closed the connection]
ygrek has joined #ocaml
zlsyx has quit [Quit: Leaving...]
ayxih has joined #ocaml
sam___ has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
ygrek has quit [Remote host closed the connection]
sam___ has quit [Ping timeout: 260 seconds]
FreeBirdLjj has quit [Read error: Connection reset by peer]
TobiasBales has joined #ocaml
FreeBirdLjj has joined #ocaml
enterprisey has quit [Ping timeout: 240 seconds]
TobiasBales has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
Algebr` has joined #ocaml
FreeBirdLjj has quit [Read error: No route to host]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
superherointj has quit [Quit: Leaving]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
FreeBird_ has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 240 seconds]
MercurialAlchemi has quit [Ping timeout: 260 seconds]
FreeBird_ has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
samrat has quit [Ping timeout: 240 seconds]
FreeBird_ has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 240 seconds]
FreeBird_ has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Read error: No route to host]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
jao has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Read error: Connection reset by peer]
FreeBirdLjj has joined #ocaml
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
_andre has quit [Quit: leaving]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
enterprisey has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 252 seconds]
enterprisey has quit [Ping timeout: 240 seconds]
dh_work has joined #ocaml
<dh_work>
I am moving some elements of a compiler pass into a separate file in order to share them with another pass, and the context for this pass requires some callbacks to the parent.
<dh_work>
(which require access to the parent context)
<dh_work>
just using functions for the callbacks means the child context has to refer to the parent context (implicitly or explicitly)
<dh_work>
I don't suppose there's any way to name "the record currently being defined", is there?
<dh_work>
I would prefer to avoid having to set the whole thing up as a functor because that's a big nuisance
mengu has joined #ocaml
<mrvn>
# type r = { bla : r };;
<mrvn>
type r = { bla : r; }
<mrvn>
just works out of the mox. no magic required.
<mrvn>
s/mox/box/
jlam has joined #ocaml
infinity0_ has joined #ocaml
infinity0_ has quit [Changing host]
infinity0_ has joined #ocaml
infinity0 is now known as Guest35835
sam___ has joined #ocaml
<dh_work>
mrvn: was that for me?
<dh_work>
if so, I don't follow
<dh_work>
oh wait, maybe I do but it's not the question I was asking
<dh_work>
is there anything that can be used in place of (self ())?
<Armael>
let rec x = { foo = ... x ... } ?
<dh_work>
does that work?
<dh_work>
hmm
sam___ has quit [Ping timeout: 248 seconds]
<dh_work>
Error: This kind of expression is not allowed as right-hand side of `let rec'
<dh_work>
apparently not.
<Armael>
well, it usually is when it makes sense
<Armael>
I can do: type t = { foo : t };; let rec x = { foo = x };;
<Armael>
(which builds a cyclic data structure)
<dh_work>
let rec ctx = {
<dh_work>
}
<dh_work>
otherstuff = ref (0, 0);
<dh_work>
fooctx = mkfoocontext ctx barlookup;
<dh_work>
in ctx
<dh_work>
doesn't work
<ayxih>
If it needs to access x when building x, OCaml won't accept.
<Armael>
yea
<ayxih>
Because x is still not really defined.
<dh_work>
right, that's what I figured
<dh_work>
doesn't help to close the context into the callback, either
<dh_work>
oh well, I suppose I need to make it a functor
<dh_work>
could also probably stratify it but that'll be uglier than functorizing it. :(
<dh_work>
(by "stratify", I mean split the part of the upper-level context the lower-level context needs to access into its own type)
<mrvn>
you can make it a mutable option and set it after creation
<mrvn>
Otherwise you have to specify the record as a literal. You can't call a function in the creation of the record and pass it.
<mrvn>
Or make the callbacks in foocontext take a barcontext as argument
<dh_work>
they do, just abstractly
<dh_work>
ugh I think it needs to be stratified regardless of whether foo ends up as a functor
<dh_work>
grr
<mrvn>
functors would work on modules. you can pass first class modules around instead of your records
<dh_work>
right, except it ends up with the same problem of being circular
<mrvn>
but you wouldn't have a value that triggers the restricion
<mrvn>
the 't in foocontext would go away
<dh_work>
instead you get a circular module reference
copy_ has quit [Quit: Connection closed for inactivity]
<dh_work>
the Foo functor gets the parent context type from its arg, but then when you go to define a Bar to be the arg, you end up needing a value whose type is Foo's context type
<mrvn>
yes, you can't have that. the module wouldn't exist at that point to call the functor with it.
<mrvn>
you can do it with recursive modules. but then they are in the same file again.
<mrvn>
as said, simplest solution is to pass the barcontext to the callbacks, not the constructor.
<dh_work>
I think the only way is to stratify the type, like this: