Index

Show enters and exits. Hide enters and exits.

00:34:20boyscoutFixed Proc#binding. - fed4fba - Brian Ford
00:34:20boyscoutPut the CI tag in the right file. - a91c70c - Brian Ford
00:41:57boyscoutCI: a91c70c success. 2709 files, 10678 examples, 33478 expectations, 0 failures, 0 errors
00:42:07evanyay CI.
00:43:32brixensweet
04:58:36tarcieriany of you fools around?
05:02:23brixen'course
05:03:52tarcieriI'm wondering how your compiler handles, like, scopes and stuff
05:03:53tarcieriheh
05:04:15slavahi tarcieri
05:04:19tarcierilike Erlang has two types of scopes, and Reia has... well... many more
05:04:20tarcierisup slava
05:04:28brixenwell, it puts them in little envelopes with stickers of kitties on them
05:04:50tarcieriit was funny, I was at Erlang factory and "Hello Robert" dude (who is a really cool guy by the way) is like "Erlang doesn't have scopes"
05:04:51slavamy compiler doesn't mess with scopes at all, its all in the library
05:05:16tarcierislava: well, what happens when you have a particular string of code you want to evaluate in a particular scope
05:05:34tarcieribrixen: I see, where can I procure kitty stickers to put on my ast fragments
05:05:58tarcierislava: like, parts of my language behave differently depending on the scope
05:06:02slavastring eval always uses the top-level lexical environment
05:06:03brixentarcieri: hmm, le'see..
05:06:08tarcieriand that's not just me
05:06:09tarcieriErlang too
05:06:31tarcierislava: well I'm having to do shit like rename variables because the output language has single assignment
05:06:47tarcieriand the rules for that vary depending on the scope
05:06:52slavaI convert local variables to stack code and the compiler takes stack code as input
05:07:09tarcierinormally I have to respect the outer environment but lambdas and list comprehensions have their own environment
05:07:38tarcieriand in Reia, so do blocks (which are just lambdas)
05:07:54tarcierior actually, rather
05:08:01tarcierithey enclose the outer environment
05:08:05tarcieribut arguments are special cased
05:08:09slavasounds complicated
05:08:12tarcierito where they override the outer environment
05:08:20tarcieriwell, they're both effectively closures
05:08:24slavaanything that compiles to LLVM is single-assignment also
05:08:27tarcierilist comprehensions are just closures that build lists
05:08:32slavaso that's not a difficulty at all
05:08:33tarcieriyeah
05:08:39tarcierithis isn't an uncommon problem
05:08:42tarcieriI call it "SSA"
05:08:48tarcierialthough it seems to be different from real SSA
05:08:59slavayou can't write ssa in erlag
05:09:08tarcieriyeah, it's pseudo-ssa
05:09:22slavahow do you convert code like this?
05:09:27slavaif(x) { a = 1; } else { a = 2; }
05:09:30slavathat's not ssa
05:09:36slavabecause a is assigned twice
05:09:49tarcieriso how that works
05:09:56tarcierithe if gets converted into a case statement
05:10:01tarcieriin each branch
05:10:08tarcierithe "oldest" a is measured
05:10:15tarcieriand all the branches bind to the "oldest" a
05:10:17brixentarcieri: http://gist.github.com/127015
05:10:27tarcierifor whatever their version of a happens to be
05:10:48tarcieriso that at the end of every branch all the same version numbers are bound for all variables
05:10:53brixentarcieri: we have 2 scopes, static_scope (what you see as push_scope in the bytecode) and variable_scope
05:11:05slavatarcieri: so that's not ssa so you shouldn't call it that to prevent confusion
05:11:13tarcieribrixen: well more specifically, what I suppose I should be asking
05:11:21tarcierislava: yeah my bad, dunno what else to call it
05:11:50tarcieribrixen: how do you implement module_eval vs class_eval vs eval
05:11:52tarcieriI suppose
05:11:59tarcieriit's really an issue with string eval in different scopes
05:12:11slavawhy do you want to eval strings in different scopes? there's no legitimate use-case for this
05:12:16brixenwell, you can pass eval a binding
05:12:18tarcierihow I treat a string differs depending on the scope
05:12:37tarcierislava: because it's easier for people to do metalinguistic abstraction with string eval than it is with AST munging
05:12:54brixentarcieri: kernel/common/eval.rb
05:13:00brixentarcieri: you have a look at that code
05:13:00tarcierinot everyone can be DING I GET IT
05:13:02tarcieriok
05:13:21tarcierislava: people can get "I can write a string that's like a piece of code but I can twiddle with it programatically"
05:13:38tarcieria lot easier than they can code is data and I need to mapfold some subtrees
05:13:44tarcierigranted immutable state is the huge bitch here
05:14:13tarcieriI just did some AST munging in Ruby and it's like "wow being able to change shit is a lot easier than having to mapfold my subtrees recursively"
05:15:14tarcieriyeah
05:15:15tarcieridamn
05:15:18tarcierithat's the solution a lot
05:15:25tarcieribrixen: heh evan fucking told me that shit before
05:15:36tarcieriuse a closure to build the environment
05:15:39brixentarcieri: you looking at eval.rb?
05:15:40tarcieridurrr
05:15:42tarcieriyes
05:15:45brixenok
05:15:52brixenneat code huh?
05:16:00brixenwell, kinda messy, but neat in ruby
05:16:07tarcieriyes
05:16:14tarcieriall right I totally asked this before and forgot
05:16:17tarcieriheh
05:16:22brixenbetter than looking through mri eval.c
05:16:26brixen:)
05:16:27tarcierirofl
05:16:33tarcierieval.c == bleeding eyes
05:17:16tarcierimy main reaction to eval.c was "okay so I/O was kinda tacked on as an afterthought"
05:17:44brixenhah
05:17:47brixenyeah
05:18:16tarcierislava gets mad props for being totally obsessive about doing I/O well
05:18:17tarcieriheh
05:18:58brixenslava gets mad props for most things, but don't tell him that, he's still young and it goes to his head :D
05:19:09tarcieriwhat's lulz is there's yet another discussion of single assignment on erlang-questions
05:19:12tarcieriand yeah
05:19:17tarcierislava's like younger than me and shit, right?
05:19:31brixenhe's a lot younger than me
05:19:33brixenheh
05:19:43tarcierilike I turn 27 in less than a month
05:19:49slavaI'm 25
05:19:56tarcieriyeah crazy
05:20:04slavanot that young
05:20:11brixencrazy, you guys are just chil'ren
05:20:16tarcieriyeah
05:20:16tarcieriheh
05:20:42tarcieriI'm going to go hang out with all the crazy Python people again this friday
05:20:54tarcieriand hopefully meet this dude who teaches an awesome compilers class
05:22:57tarcieriand maybe see a demonstration of the new PyPy JIT actually... running code and stuff
05:23:00tarcieriit was pretty crazy
05:23:05tarcierithe dude had a debugger written in Pygame
05:23:18tarcierifor perusing stack traces or something
05:23:21tarcieriit was pretty badass
05:23:40brixencool
05:23:54brixendoes the jit use llvm?
05:24:12tarcieriI think he wrote a JIT generator in Prolog :/
05:24:18brixenheh
05:24:20brixeninteresting
05:24:38tarcieriI asked him specifically about Prolog
05:24:45tarcieriand he told me Prolog was homoiconic
05:24:59tarcieriwhich I never realized and surprised me and I'm curious if that's actually true
05:25:05slavayeah it is
05:25:15slavayou can construct a list and add it to the facts database
05:25:15tarciericrazy
05:25:22slavaand turn facts back into lists
05:25:24slavaprolog sucks though
05:25:29tarcierihehe
05:26:03tarcieriyeah where Ruby got Perl "whale guts" on its shoes (at least as Steve Yegge put it) Erlang got Prolog whale guts plastered all over its body
05:27:46tarcieriman, I started working on some silly Rails app and it has totally distracted me from Reia
05:28:09tarcieritangible shit that's of valuable to joe average immediately is so much easier to work on than something super duper abstract like a language
05:28:28tarcieriplus it's a project I think I can get done in a few weeks as opposed to another year or two
05:28:59brixenyeah, the slog can be hard
05:29:09brixenimmediate satisfaction is a good motivator
05:29:38tarcieriit's just so much fun to code some silly webapp over the weekend and being able to start playing with it in a browser
05:29:42tarcieriand having it do some crazy shit
05:30:02slavaits like jerking off -vs- going out to a club and picking up a hot girl
05:30:02brixendoing a bunch of benchmarking of hash impl (which was little coding and lots of waiting and analyzing) reminded me how much I prefer tdd dev
05:30:07tarcieriheh
05:30:22tarcieribrixen: yeah I've been doing TDD exclusively lately at work
05:30:32tarciericertainly not how I work at home though
05:30:32tarcieriheh
05:30:33slavanot enough real men out there, everyone's just jacking off
05:31:05slavaI like it how one of the advertised features for OS X 10.6 is "more realiable disk eject"
05:31:07tarcierislava: I just love being able to automate something where people sit around and bitch about how fucking difficult it is
05:31:08slavalike, that's not a feature
05:31:16tarcierislava: in this case populating the playlist for a radio station
05:32:25tarcieribut my day job is writing a searchable media CMS... this is a lot simpler version of that
05:33:14tarcierislava: heh the disc eject is fucking buggy
05:39:13slavatarcieri: are you going to add goto to reia?
05:39:14slavaphp has it
05:39:28tarcieridude, someone mentioned that like a week ago
05:39:31tarcierito me
05:39:33tarcieriand I was all lulz
05:39:39tarcieriand today it blew up into a huge meme
05:40:08tarcieriFrom a purely technical perspective I am not clever enough to come up with a way to even implement goto if I wanted to
05:40:14tarcierialthough I have a cool hack for adding "return"
05:43:52brixentarcieri: with your concurrency, you should implement come_from instead
05:44:10brixenit will unconditionally pull in a thread of execution to the current context
05:45:24tarcierihaha
05:45:35tarcieridude instance_eval becomes nuts
05:45:52tarcieriyou shop off a lambda to go frob another object's precious bodily fluids
05:45:55tarcierierr
05:45:56tarcieriship off
06:26:27evantarcieri: does erlang have a 'phi' ?
06:26:41evanLLVM has 2 SSA escapes
06:26:50evanphi and memory
06:28:12tarcieriheh no, I implemented my own gimpy pseudo-phi
06:28:21tarcieriusing the method I described to slava
06:28:32evanyeah, you've mentioned it to me before
06:29:09tarcieriI just wanna rewrite my compiler from scratch in Reia, heh
06:29:17evanyou should!
06:29:34tarcierimaybe I will once I get this on disk format problem licked
06:30:41evanthats really the only way to do it
06:30:54evanwrite yourself a simple bootstrap in disk format
06:31:21tarcieriyeah, not even close to where I'm worried about trying to bootstrap
06:31:26tarcieribut that's how the Erlang compiler works
06:33:54slavahi evan
06:34:14evanadmiral slava!
06:34:23evanit's fun title day
06:34:48evanwe've got admiral slava and president tarcieri
06:34:56evanlets change that to
06:35:00tarcierilol
06:35:01evanel presidente tarcieri
06:35:03evanthats more fun
06:35:10tarcierihow about el jefe
06:35:16evansure!
08:17:15brixenjust realized that none of the papers that looked at cache consequences of hash algos used a language that has a compacting gc
08:17:55brixenthe tuple of entries and the entries would possibly end up packed together anyway
08:25:13evantrue
08:25:43evanbrixen: I thought of something, we should check out what GNU Classpath's HashMap uses
08:25:51evanit's a pretty battle tested hash
08:25:59evanand the semnatics would transfer directly to ruby
08:29:38brixenah good idea
08:29:57brixenI've just been fixing up our chained bucket a bit
08:30:03evanyeah, thats fine
08:30:06brixenit's such a sweetly simple algo
08:30:06evani'm sure we'll stick with that
08:30:18evanpretty sure HashMap does the same
08:30:26brixenbtw, compiling with RBX_LLVM=1 doesn't turn on anything, right?
08:30:30evanit might have a few little nuggets
08:30:39evanthat just makes LLVM compiled in
08:30:43brixenok
08:30:45evanyou still have to use -Xjit.enabled
08:30:48evanto turn the JIT on
08:30:56evanI'm thinking about changing that soon though
08:31:07evanand turning the jit on by default
08:31:25brixenok
08:31:58brixenI ran the hash benches without llvm linked and got 9m20s, then 9m15s with it linked in
08:32:02brixenso I was wondering
08:32:21brixendidn't want to wait another 10min to see if it was a random fluctuation :)
08:32:30evansounds like it
08:33:32brixenwhat do you think of using a LookupTable instead of Hash in ISeq?
08:33:42evanfine by me
08:34:19brixenRubinius::InstructionSet::OpCode#stack_produced is the top caller of Hash#[] in starting up the AR tests
08:34:32evanreally? zoinks.
08:34:38brixensec..
08:34:57evanthat code should be refactored a little
08:35:01brixenhttp://gist.github.com/127074
08:35:04evanto not require so many lookups
08:35:12brixenyeah, I was thinking that
08:35:23brixenthe profiler graph output is actually really useful
08:35:24evaneek.
08:35:31evanyay
08:35:49brixenI was thinking about what you said about Strongtalk looking up the call path for the method that calls a hot method
08:36:01evanyep
08:36:01brixenmakes a lot of sense looking at that profiler graph
08:36:06evanexactly
08:36:22evanthe profile graph shows you basically what it would try and collapse
08:36:27brixenyeah
08:36:54brixenso, wycats suggested a __hash_match__ method or something like that
08:37:05evanfor?
08:37:07brixenthe thing is, we use equal? now
08:37:15brixenbut that is not how MRI does it
08:37:24brixenand it actually makes it slower for String keys
08:37:37brixenbecause they are unlikely to be equal?
08:37:49brixenso then it does the hash compare and eql? call
08:37:54brixenso 3 calls instead of 2
08:38:12brixenbut for symbol, hash would be equal and it would still have to do the eql? call
08:38:21evansure
08:38:22brixenso 2 calls instead of one (equal?)
08:38:24evanthis is the smalltalk way
08:38:31evanyou establish a protocol
08:38:43evanthat is satisfied by sprinkling methods around the hiearchy
08:38:48evanto achieve the desired effect
08:38:53brixenso if Object has __hash_match__ that return hash == other.hash and key eql? other.key
08:39:20brixenand Symbol has __hash_match__ do self.equal? other, that should work, right?
08:39:20evanand Immediate has alias __hash_match__ equal?
08:39:25brixenyeah
08:39:27brixenright
08:39:31brixenon Immediate
08:39:31evansure
08:39:35evanyep
08:39:35brixenok
08:39:50evanso, this is what i mean by system methods
08:39:55evan__hash_match__ would be a system method
08:40:31evanit would be tagged as system and not show up by default, to tell people "don't mess with this, we need it to make your codes work yo"
08:40:43brixenyeah, makes sense
08:41:22evananyway, yeah, thats a fine way to do
08:41:24evanthats OO!
08:41:26brixenI guess just having the tag so the method doesn't show up under normal reflection makes a lot of sense
08:41:57brixenyeah, imagine that, writing OO code in a lang that boasts everything is an object!
08:42:04evan:D
08:44:46brixenthe specs using indirection for the Hash class makes it soo easy to write a new Hash class
08:44:51brixenI'm lovin it
08:44:51evan:D
08:44:54evanyeah, great idea.
08:46:01evani'm trying to coax JITd blocks into work
08:46:03evanworking
08:46:24brixensweet
08:48:02evanoh oh oh
08:48:04evanmaybe i gots it!
08:49:11evanwell, got it past where I was
08:49:12evanthats good.
08:49:15evangot it to crash
08:49:18evanthats.. ok.
08:49:42brixenheh, small victories
08:49:57brixenwill win you a war (I hope)
08:49:58evanoof. i blew SOMETHING up.
08:50:10evanwas getting all .
08:50:13evannow ALL E
08:50:28evani'm running the specs to test this.
08:50:42evanso i'm past the first 20 initial bugs
08:50:46brixennice
08:51:48evanweird.
08:51:58evanand strange
08:52:07evanman, i get really get this damn thing to blow up so WEIRD ways.
08:53:13evanoh oh.
08:53:28evanbrixen: bin/mspec injects all the files to run into mspec running in rbx
08:53:30evanright?
08:53:36evanwhere does it do the "injection"
08:53:43brixensec..
08:54:11brixenmspec/lib/mspec/utils/script.rb
08:55:27brixenmspec/lib/mspec/commands/mspec-ci.rb makes the call to #files with pattern
08:55:45brixenand then calls MSpec.register_files @files
08:56:09evanwhere does the file list come from
08:56:11brixenthe #files method is defined in utils/script.rb
08:56:16evanthats what i need to know
08:56:27brixenwell, it parses the cmd line to get it
08:56:42evanthe rbx command line
08:56:45brixensee mspec/lib/mspec/commands/mspec-ci.rb # 63
08:56:47evani need to know where that is set
08:56:53evanwhere does MRI call rbx
08:56:59brixenoh that
08:57:23brixensee mspec/lib/mspec/commands/mspec.rb at the bottom
08:57:26brixen#run
08:58:35evandoes it pass it a -e or something?
08:58:44evani can't see it doing that directly in #run here
08:58:49brixennope
08:59:07brixenjust bin/rbx -v <options> patterns
08:59:21brixenput a p *orgv in there
08:59:49evanhrm.
08:59:56evanwhere does it get the list of files then?
09:00:44brixeneg http://gist.github.com/127083
09:01:13brixenso, mspec/lib/mspec/utils/script.rb #files will turn core/hash into a list of actual files
09:02:07evanso the list is calculated in rbx
09:02:08evannot MRI
09:02:13brixenright
09:02:16evanok
09:02:19evanthats what i had wrong
09:02:43brixenmspec script just packages up the args and passes them on
09:02:44brixenbasically
09:03:03evanwhy is the mspec script there then?
09:03:07evanwhy not run it all in rbx?
09:03:08brixenmspec-ci mspec-run do all the work in the target exe
09:03:25brixento run various targets
09:04:03evanok
09:04:09brixenthe idea is that an impl may have very simple abilities, mspec could just pass a file list
09:04:24brixenbut the mspec-run mspec-ci are pretty sophisticated now
09:08:46evanhm
09:10:53evanoh oh
09:11:04evanI NEED to turn off the mspec striping
09:11:13evanit's confounding my debugging
09:11:16evanstripping of backtraces
09:11:20evanwhere is that?
09:11:56brixen-d
09:12:04evanbin/mspec -d
09:12:06brixenyeah
09:12:10evanor bin/mspec ci -d
09:12:15brixenoh yeah 2nd
09:12:18evank
09:12:23brixenI haven't fixed that yet :)
09:28:29evanyay
09:28:31evanfixed it.
09:29:33brixensweet
09:29:38brixenwhat was it?
09:29:53evannested blocks were broken
09:30:14evanso a block's parent wasn't pointing to the enclosing block, but the method's scope
09:30:27evanso when it did 'push_local_depth 1, 0'
09:30:32evanit was getting the wrong slot 0
09:30:53brixenahh
09:39:45evanok, bed time.
09:39:46evannite
09:40:55brixennite!
14:13:07yakischlobais there a way with the current ffi api to attach to special functions like fooFunction<<<x,y>>>(arg1,arg2) ? i dont really know anything about how this is implemented or how it is different than a normal function in c
17:57:51evanmorning.
18:01:01brixenmorning
19:20:48ddubwaves
19:22:29brixensup ddub
19:48:56brixenevan: what do you make of commit 43e2dbc5 ?
19:49:19brixendo you think real code exposed that?
19:58:40evanif there is no spec, then no.
19:58:56brixenk
20:30:31boyscoutConditionalize some debugging code - dadf3c6 - Evan Phoenix
20:30:31boyscoutAdd ability to JIT blocks - 1191e13 - Evan Phoenix
20:30:55brixenw00t!
20:31:11brixenI shall be testing your ability shortly
20:31:37brixenalthough I just removed a layer of blocks from Hash
20:31:49brixenstill, should be interesting
20:32:08evanyep
20:39:08boyscoutCI: 1191e13 success. 2709 files, 10678 examples, 33478 expectations, 0 failures, 0 errors
20:39:39brixen'atta boyscout
20:39:48evanhah
20:39:55evanok, lunch time.
20:40:02brixenk, me too
21:08:40radarekwhat is a proper way to build rubinius with JIT support?
21:08:52radarekexport RBX_LLVM="1" && rake ?
21:09:51evanno need for the export
21:09:52brixenradarek: just RBX_LLVM=1 rake works, but you can export it too
21:09:52evanjust
21:09:55evanRBX_LLVM=1 rake
21:09:59brixenjinx
21:10:21evanheh
21:11:18radarekthanks
21:11:38radarekit doesn't compile
21:11:40radarekhttp://pastie.org/507704
21:11:48radarekmy OS is ubuntu 64 bit
21:12:12evanyou need LLVM from svn
21:12:20evansorry
21:14:13radarekok, I'll try with llvm from svn
21:30:05evana gprof run on linux, sans JIT
21:30:16evanhas interpreter infrastructure taking up 48.55% of the time
21:30:19evanthats good.
21:31:03brixencool
21:31:18evanLookupTable::find_entry took 6.4%
21:31:19brixenhave a breakdown of the rest?
21:31:26brixenhm
21:31:36evanthats method lookup
21:31:42brixenah ok
21:31:46evani'm really thinking about changing MethodTable to not be a LookupTable
21:31:59evanand have it be a cuckoo hash
21:32:22evanthat can only map a symbol to an Executable
21:33:21brixenmight be just as good in a linear probe hash
21:33:50brixenthe hash function being random enough is the key
21:33:58evanright
21:34:54brixenalthough, cuckoo might work really well here
21:35:01brixenespecially with a simpler match function
21:35:08evanright
21:35:10brixenie just == on the key
21:35:23evana MethodTable is pretty stable
21:35:34brixenyeah
21:35:53brixenthe thing is, you want to hit the entry with only h1() and not have to do h2()
21:36:50brixenprobably won't get faster than h2(x) = h1(x) + 1
21:37:03brixensince you've already calc'd h1(x)
21:37:32radarekI did checkout llvm from svn to vm/external_libs/llvm; run rake and after couple of minutes I got:
21:37:34radarekDon't know how to build task 'vm/external_libs/llvm/include/llvm/ADT/iterator'
21:37:41radarekany ideas?
21:37:43brixenif you rehash when h2(x) fails to find a slot on insert, you may get slightly larger tables, but should be fast on lookup
21:38:23evanradarek: umm..
21:38:31evanradarek: try doing ./configure && make in just llvm
21:38:47radarekok
21:39:23evanGH is being slow
21:39:29evanbut I just pushed doc/vm/prof*
21:39:36evanwhich are the results from gprof
21:39:40evanif you wanna see them
21:39:44brixencool
21:40:27boyscoutAdd gprof results - de9956d - Evan Phoenix
21:43:03boyscoutCI: de9956d success. 2709 files, 10678 examples, 33478 expectations, 0 failures, 0 errors
22:06:19radarekguys, what about http://pastie.org/507773 ?
22:07:58brixenhm
22:08:30brixenwhy is that running during build
22:12:25radarekbrixen: it's run by /home/radarek/opt/src/rubinius/rakelib/extensions.rake:27:in `compile_extension'
22:14:50brixenradarek: yeah, but dunno why it appears to be running llvm
22:15:08brixenradarek: evan will have to take a look
22:15:41radarekbrixen: right, it's strange because it's called by compile_extension 'lib/ext/readline' :)