Index

Show enters and exits. Hide enters and exits.

00:00:13evanyep
00:00:26evanonce an object has been set it memory, you can't change it's size
00:00:32evanso you can't add new slots to it after the fact
00:00:43evanso you keep an extra slot at the beginning around to store any ivars that you missed
00:00:51evankresten was saying that it works great
00:02:32dgtizedbut what if you never refered to them by name, what if you generated a symbol table for the class, and then just layered the symbol table for the subclass but instead of doing a lookup each time you just used it's static scope, as in depth/offset?
00:02:58evandoesn't work
00:03:01dgtizedbut you kept around the symbol table for send lookups?
00:03:02evanbecause you'll miss something
00:03:09evanand then where do you put this new ivar?
00:03:11evanor someone will do
00:03:14evandef "".blah
00:03:17evan @weee = 3
00:03:17evanend
00:03:23evanwhere does @weee go?
00:03:32dgtizedas a monkey patch you mean?
00:03:33evanwhat does send have to do with this?
00:03:38evanor extend
00:03:46evanor including a Module into the object's class
00:03:54evanthere are zillions of ways to introduce new ivars in ruby
00:04:11dgtizedyou just append it to the symbol table, at this current level, and then replace further instances with that depth/offset?
00:04:12manveruheh
00:04:32manveru1.instance_variable_set('@a', 1); 1.instance_variable_get('@a')
00:04:33manveru# 1
00:04:36manverustill my favorite
00:04:50evandgtized: what about current instances?
00:04:59evanhave the GC replace all of them?
00:05:03evanyikes.
00:05:10evanfor the record
00:05:13evani tried this last year
00:05:15evanat MWRC
00:05:17dgtizedthey can share the symbol table for that class though can't they?
00:05:26evanand quickly realized that you can never know all the ivars an object might use
00:05:40evandgtized: but old instances are too small now
00:08:06dgtizedso what are you doing for all of the ones that aren't in this initial numbered ivars scheme?
00:08:23dgtizedare they the only ones that are fast access or something?
00:08:26evanthrow them in a lookuptable
00:08:30evanthats referenced in slot 0
00:09:06dgtizedso every single object has a lookuptable anyway, or only if an unknown instance variable gets allocated?
00:09:17evanthe later
00:09:22evanyou allocate it lazily
00:09:50dgtizedbut that lookuptable is not shared?
00:09:58evancourse not
00:10:03evanobjects don't share ivars.
00:10:09enebo_ enters the room.
00:10:19evanthis lookuptable maps ivar names (@weeee) to values (1)
00:11:45headius_ enters the room.
00:12:53dgtizedso whenever you fail a lookup at the current level you check your superclasses ivar lookup or no?
00:13:07evanno
00:13:26evanyou alter the specialized methods to access the slots directly
00:14:06evanand for ivars that are added later, emit code that accesses them via the lookup table
00:15:52dgtizedso if you had a contrained lookup table using a regular tuple, and you just spit out the offsets directly instead of doing a hash lookup that would be the same right?
00:16:05dgtizedby constrained I mean it took up the same amount of space as you had instance variables
00:16:52evanum.
00:16:57evanyeah, you could do that
00:17:05evanthen you could enlarge the tuple later
00:17:17rubuildius_amd64Vladimir Sizikov: e12d21a90; 2097 files, 6777 examples, 24236 expectations, 0 failures, 4 errors; http://rafb.net/p/toobig.html
00:17:18rubuildius_amd64Marnen Laibow-Koser: 68cfef604; 2097 files, 6771 examples, 24232 expectations, 0 failures, 0 errors; http://rafb.net/p/dW4mNF75.html
00:17:26evanbut you'd have to check at every access to see if the table needs to be enlarged
00:17:48dgtizedno, you would only have to do it if the access was out of bounds
00:17:48evanbecause when the ivar is added, you don't want to go out and find all instances and enlarge their ivars table
00:18:02evanand how do you think out of bounds checks are done?
00:18:07evanby checking the size.
00:18:10evansame thing.
00:18:55dgtizeddon't we do that with tuples anyway though?
00:19:12dgtizedwhich is what those ivars are stored in right?
00:19:29ezmobius_ enters the room.
00:19:32dgtizedthat's what infinite Access reference out of range errors are right?
00:19:36evani've lost ya now.
00:19:41Arjen_ leaves the room.
00:19:41evani don't get what you're trying to do.
00:19:55dgtizedright now we have a tuple for each object right, with a set number of slots
00:20:03evanno
00:20:12rueBack up.
00:20:34dgtizedyou have a static C array for each slot?
00:20:34rueObjects have slots for predefined, and they have a table for runtime ivars
00:20:35evanthere is an optimization that stores ivars in a tuple, but not by slot number. It's basically just a tiny, linearly searched hash table
00:20:39evandgtized: no
00:20:48evanan object is fixed size in memory
00:20:50dgtizedI'm talking about for predefined
00:20:55evana header, with a fixed number of slots after it
00:21:00dgtizedI know that's what I meant by the tuple
00:21:00evaneach slot can hold a reference to another object
00:21:26dgtizedSo each object is a vector of slots, where one slot is defined to be for a lookup table if you need to add slots?
00:21:42evanno
00:21:53evani wasn't talking about current code
00:22:06evani was talking in the future
00:22:13evana scheme that the java hotruby uses
00:22:16evanthat we might use too
00:23:02nicksieger leaves the room.
00:23:05headius leaves the room.
00:23:13enebo leaves the room.
00:23:30anteaya leaves the room.
00:23:40therealadam leaves the room.
00:24:01Fullmoon leaves the room.
00:24:10dgtizedok so right now we stick those extra ivars in __ivars__ right?
00:24:17dgtizedand the rest should map to an existing slot
00:24:40evanno
00:25:08evani think you're confusing yourself between now and the future.
00:25:14evanthere are builtin classes
00:25:17evanthat use the slots
00:25:19dgtizedok, well neither were explained well
00:25:26dgtizedas in I thought you were talking about now
00:25:38evandgtized: no need to be snippy.
00:25:55srbaker enters the room.
00:26:02evananyway, some builtin class use the slots directly
00:26:09evanthe name to slot index is hard coded
00:26:17dgtizedsorry I didn't mean to be snippy I just thought we had been talking about now and then all of a sudden I was informed otherwise
00:26:45evani guess you missed where I said this was a scheme we might do in the future.
00:26:53evananyway, they're hardcoded
00:27:02dgtizedok so in those builtin's the ivars are actually instance variables on the C++ class?
00:27:13evanthe compiler is taught to map certain ivars in certain classes to slots
00:27:17evanagain, hardcoded.
00:27:34evanall other ivars are stored in a lookuptable
00:27:39dgtizedor rather the builtin slots map to builtin C++ class instance variables
00:27:42evanwhich can be stored in 1 or 3 places:
00:27:50evanthe external_ivars table (for immediates)
00:27:57evanthe metaclass (for things like Array and String)
00:28:01evanthe first slot
00:28:11evancase 2 should be eliminated
00:28:15evanit's there because of legacy
00:28:36evandgtized: the mapping to C++ ivars is in the new VM yes
00:28:43evanbut it's essentially exactly the same
00:28:47dgtizedok good same page then
00:28:48evanjust with new syntax in the VM
00:29:30dgtizedare you arguing for removing the metaclass in general or just for ivars, not following the argument on number 2
00:29:57dgtizedor I'm probably confusing the issue more there
00:30:56evanall builtins should just have a slot 0 reserved for ivars
00:31:10evanthe case 2) is for builtins that doen't
00:32:36dgtizedok, but that's an implementation decision that makes them have 3 cases correct?
00:33:21evanyeah
00:35:42rudebwoy leaves the room.
00:37:59enebo_ leaves the room.
00:38:02dgtizedok, and those slots need to be fast access in C++ land so that when they get used by C++ methods they are direct access and don't have to walk back into the VM and back out again?
00:38:07dc_ leaves the room.
00:42:32srbaker leaves the room.
00:43:15dgtizedcan we figure out a way for that ivar_index stuff to be defined in C++ automatically and then passed out to ruby so they don't show up looking weird and special?
00:43:29ezmobius leaves the room.
00:43:29ezmobius_ leaves the room.
00:43:42evanweird and special how?
00:44:10avibryant enters the room.
00:44:55ruedgtized: You are thinking that ivar lookups could be intercepted transparently for those?
00:45:53ezmobius enters the room.
00:47:32dgtizedwhere is ivars_as_index defined?
00:47:41evanit's not
00:47:44evanit's a compiler directive.
00:47:48dgtizedoh
00:48:46dgtizedhow many other compiler directives that look exactly like methods do we have?
00:49:19evanum.
00:49:21evanone i think
00:49:23evanRuby.primitive
00:49:39evanthe ivar_as_index stuff is a mistake
00:49:42evanit's too confusing.
00:50:13dgtizedyea because I thought we were definining the tuple used to store that object right there
00:50:22evannope
00:50:54evanplus, if you reopen, say, Array and try and access one of the sloted ivars
00:50:59evanit silently doesn't work.
00:51:06dgtizedRuby.primitive could just be written to rewrite the method the first time it was called instead of being a compiler directive right?
00:51:48evanno
00:51:49dgtizedah, because it's not actually adding those variables to the symbol table for that class
00:51:52evannot at all.
00:52:15evanhaving Ruby.primitive rewrite is so overly complicated.
00:52:23evanand Ruby.primitive is very isolated.
00:52:36dgtizedok
00:53:44dgtizedwait so the problem with the ivars is that the compiler knows about them when they are first being used, but then later on, it doesn't have them in that first slot __ivars__ table because it only gets defined if something other then those variables get used?
00:54:26dgtizedie it knows about them at file compile time but not at user compile time?
00:54:49evanthe hints aren't loaded when running user code.
00:55:04evanthe hints say, "map @total in Array it slot 1"
00:55:05dgtizedbecause they might do weird stuff compiling user code?
00:55:06evanfor instance.
00:55:18evanbecause it doesn't make sense for a user code to do that.
00:55:24evanwas my original thinking.
00:55:38mkrauskopf leaves the room.
00:56:09dgtizedhmm seems like that makes the turtle stack unduly shallow
00:56:12agardinerhmmm... it looks like Rubinius doesn't support BEGIN blocks - is that right?
00:56:23evanagardiner: pretty sure thats true.
00:56:25agardineri don't even see it appearing in the sexp
00:56:34evandgtized: depends on your perspective.
00:56:38evanyeah
00:56:44evanBEGINs are dum
00:56:45evanb
00:56:50evanthe parser puts them in a seperate sexp
00:56:54agardinerand used by rdebug...
00:56:55evanwhich we aren't exporting currently
00:56:58agardinerah
00:56:59evanUG.
00:57:02evanit uses BEGIN?
00:57:05evantake that shit out.
00:57:10agardineryeah, pretty clever actually
00:57:19evanhow does it use it?
00:57:30agardinerit uses an eval around a BEGIN block to see if the user typed a valid expression for a breakpoint condition
00:57:44agardinereval("BEGIN {return true}\n#{code}", nil, "", 0)
00:57:45evanTHE HORROR
00:57:49evanMY EYES
00:57:51evanMYYYYYY
00:57:54evanEEEYYYYYEEES
00:57:55agardiner:-)
00:57:55ezmobiussay THE HORROR
00:57:55boyscoutTHE HORROR
00:57:56rubuildius_amd64THE HORROR
00:57:56rubuildius_ppcTHE HORROR
00:58:02jp_tixlol
00:58:22jp_tixthat actually got me out of lurking :)
00:58:28evanagardiner: i don't get how that works.
00:58:33agardinerthat line is wrapped in a rescue
00:58:36evanjp_tix: NOW WE HAVE YOU.
00:58:43agardinerso, if the eval is successful, you get true
00:58:55agardinerif the rescue is invoked, it returns false
00:59:06evanwhy not put it in a begin/rescue
00:59:25agardinerbecause you don't want to invoke the user code, just test it is valid
00:59:36avibryantwhy not just return true\n#{code}
00:59:36avibryant?
00:59:41evanyeah
00:59:45evanforget the begin
00:59:49agardineri dunno, i didn't write it!
00:59:56dgtizedwait is code a single lone
00:59:58dgtizedline
00:59:58evaneval "return :awesome; #{code}"
01:00:07dgtizedor the whole file?
01:00:07agardinerjust found it doesn't work! :-)
01:00:12evan:)
01:00:18agardinercode is a single line
01:00:28agardinere.g. break blah:4 if <code>
01:00:49evanit's just testing if +code+ is syntaticly correct?
01:00:51bricolage leaves the room.
01:00:53agardineryeah
01:01:03dgtizedoh just run it through Compile
01:01:09agardinerthe method is called syntax_valid?
01:01:12evanbegin; code.to_sexp; return true; rescue SyntaxError; return false; end
01:01:15benstiglitz leaves the room.
01:01:29evanor do what avibryant said
01:01:32agardineri have no problem coming up with alternative ways of testing it, but this is in rdebug...
01:01:33evannix the BEGIN
01:01:38evanso?
01:01:41evanwe'll send in a patch.
01:01:57agardineryeah, we could do that, but i wanted to avoid it
01:02:07agardinerthis is the sort of stuff we'll have to deal with in code in the wild
01:02:14evanwe should fix BEGIN though...
01:02:15evan:/
01:02:17evanBLAH.
01:02:17dgtizedevan: thank you for the illumination on ivars in ruby, I think I get it better now
01:02:18evan:)
01:02:23evandgtized: cool.
01:03:02agardinerfyi what i am doing is building a rubinius implementation of the ruby-debug-base gem
01:03:11agardineri don't want to touch ruby-debug at all
01:03:12evansweeeet
01:03:20agardinersince it is supposed to be platform neutral
01:03:37Maledictus leaves the room.
01:03:43agardineryeah, this allows us to leverage everything that rdebug provides
01:03:53agardinerremote debugging, IDE integration, etc
01:04:02rueWhat is an IDE?
01:04:14agardineri dunno...?
01:04:27evanI Don't Edit
01:04:28agardinerits an acronym, so i fiugred it must be good!?!
01:04:36agardiner:-)
01:06:13agardinerok, so on BEGIN - you say we aren't even getting the sexp out at present?
01:06:29evanyep.
01:06:57agardineri may be able to monkey-patch this in ruby-debug-base, but i'm not sure what the load order is...
01:08:19evanagardiner: you should have zenspider see if he can help get the begin sexp out.
01:08:26fabiokung enters the room.
01:08:41agardinerso this is a parsetree fix needed?
01:08:50radarek enters the room.
01:10:38agardinerdamn... can't monkey patch it, it seems, since it looks like my code is loaded before the code that uses BEGIN :-(
01:17:08benny leaves the room.
01:17:29evanagardiner: the version of parsetree we use, yeah.
01:17:48agardinerok, will do
01:21:59headius_ leaves the room.
01:22:56TheVoic1 enters the room.
01:23:03djwhitt_ enters the room.
01:23:30lopex_ enters the room.
01:24:18kevwil enters the room.
01:24:46jp_tix_ enters the room.
01:25:02TheVoice leaves the room.
01:25:02lopex leaves the room.
01:25:02smparke1 leaves the room.
01:25:02hornbeck leaves the room.
01:25:02joachimm leaves the room.
01:25:02Ingmar leaves the room.
01:25:02jicksta leaves the room.
01:25:02rue leaves the room.
01:25:02jp_tix leaves the room.
01:25:02goodney leaves the room.
01:25:02_goodney_ leaves the room.
01:25:02djwhitt leaves the room.
01:25:02Defiler leaves the room.
01:25:02brixen leaves the room.
01:25:50crafterm enters the room.
01:25:56Defiler enters the room.
01:26:37rue enters the room.
01:27:40rueWeird
01:28:02djwhitt_ leaves the room.
01:30:08djwhitt enters the room.
01:30:31smparke1 enters the room.
01:30:44avibryant leaves the room.
01:31:25Ingmar enters the room.
01:31:25TheVoice enters the room.
01:31:25lopex enters the room.
01:31:25joachimm enters the room.
01:31:25jicksta enters the room.
01:31:25brixen enters the room.
01:31:25goodney enters the room.
01:31:25_goodney_ enters the room.
01:33:22ctennis leaves the room.
01:33:25enebo enters the room.
01:34:07djwhitt leaves the room.
01:34:17djwhitt enters the room.
01:35:31ruehttp://rubyforge.org/projects/rubob
01:36:55tarcieriwhoa
01:38:12lopex leaves the room.
01:39:43djwhitt leaves the room.
01:40:06djwhitt enters the room.
01:40:23rudebwoy enters the room.
01:40:52brixen_ enters the room.
01:40:53_goodney_ leaves the room.
01:40:53goodney leaves the room.
01:40:53joachimm leaves the room.
01:40:53Ingmar leaves the room.
01:40:53TheVoice leaves the room.
01:40:53brixen leaves the room.
01:40:53jicksta leaves the room.
01:40:59_goodney_ enters the room.
01:41:03Ingmar_ enters the room.
01:41:14goodney enters the room.
01:41:20joachimm enters the room.
01:42:17kevwil leaves the room.
01:45:58ctennis enters the room.
01:47:17twbray leaves the room.
01:47:17ctennis leaves the room.
01:47:38ctennis enters the room.
01:48:14headius enters the room.
01:49:30GMFlash leaves the room.
01:50:11benburkert leaves the room.
01:50:38jtoy enters the room.
01:55:00dlee leaves the room.
02:10:14sambo leaves the room.
02:11:08nicksieger enters the room.
02:11:16ctennis leaves the room.
02:11:16headius leaves the room.
02:11:16rue leaves the room.
02:11:16rubuildius_amd64 leaves the room.
02:11:16flori leaves the room.
02:11:16rudebwoy leaves the room.
02:11:16fabiokung leaves the room.
02:11:16rubuildius_ppc leaves the room.
02:11:16olabini leaves the room.
02:11:16VVSiz leaves the room.
02:11:16ttmrichter leaves the room.
02:11:16meanphil leaves the room.
02:11:16kAworu leaves the room.
02:11:16zenspider leaves the room.
02:11:16ko1_away leaves the room.
02:11:16maharg leaves the room.
02:11:16jammi leaves the room.
02:11:16smparke1 leaves the room.
02:11:16lopex_ leaves the room.
02:11:16mass leaves the room.
02:11:16oweff leaves the room.
02:11:16zf leaves the room.
02:11:52smparke1 enters the room.
02:11:52lopex_ enters the room.
02:11:52fabiokung enters the room.
02:11:52rubuildius_ppc enters the room.
02:11:52olabini enters the room.
02:11:52VVSiz enters the room.
02:11:52ttmrichter enters the room.
02:11:52meanphil enters the room.
02:11:52kAworu enters the room.
02:11:52zenspider enters the room.
02:11:52ko1_away enters the room.
02:11:52maharg enters the room.
02:11:52jammi enters the room.
02:11:52mass enters the room.
02:11:52oweff enters the room.
02:11:52zf enters the room.
02:12:42samruby enters the room.
02:12:42ctennis enters the room.
02:13:18headius enters the room.
02:13:18rue enters the room.
02:13:18rubuildius_amd64 enters the room.
02:13:18flori enters the room.
02:14:10trythil enters the room.
02:15:08boyscout1 commit by Adam Gardiner
02:15:09boyscout * Add unique ids to breakpoints; 171d4be
02:15:16benny enters the room.
02:19:12headius leaves the room.
02:21:18ezmobius leaves the room.
02:22:25rubuildius_amd64Adam Gardiner: 171d4be20; 2097 files, 6770 examples, 24231 expectations, 0 failures, 0 errors; http://rafb.net/p/FP2cJo45.html
02:23:27benburkert enters the room.
02:29:44radarek leaves the room.
02:30:16rubuildius_ppcAdam Gardiner: 171d4be20; 2097 files, 6772 examples, 24257 expectations, 0 failures, 0 errors; http://pastie.caboo.se/paste/189705
02:32:54sambo enters the room.
02:32:55samruby leaves the room.
02:33:47lopex_ leaves the room.
02:40:05benburkert leaves the room.
02:41:55benburkert enters the room.
02:44:05headius enters the room.
02:44:57cored enters the room.
02:45:35VVSiz_ enters the room.
02:52:42rudebwoy enters the room.
02:54:11twbray enters the room.
02:54:55ezmobius enters the room.
02:55:28hornbeck leaves the room.
02:56:47headius_ enters the room.
02:57:27twbray leaves the room.
02:57:54headius leaves the room.
02:58:26benburkert leaves the room.
02:59:47anteaya enters the room.
03:00:06crafterm_ enters the room.
03:02:24crafterm leaves the room.
03:02:44brweber2 enters the room.
03:04:00VVSiz leaves the room.
03:04:22wdperson enters the room.
03:05:44AndrewO leaves the room.
03:07:25wmoxam enters the room.
03:08:31ezmobius leaves the room.
03:08:54sambo82 enters the room.
03:11:44AndrewO enters the room.
03:18:20rudebwoy leaves the room.
03:20:09twbray enters the room.
03:20:25KirinDave enters the room.
03:20:38wdperson leaves the room.
03:20:59ezmobius enters the room.
03:24:33knowtheory enters the room.
03:25:22agile leaves the room.
03:29:47sambo leaves the room.
03:31:39agile enters the room.
03:32:18sambo82 leaves the room.
03:39:23wycats_ enters the room.
03:42:34benburkert enters the room.
03:43:40vertiginous enters the room.
03:45:02twbray leaves the room.
03:50:43ko1http://www.infoq.com/news/2008/04/maglev-gemstone-builds-ruby
03:50:56dysinger leaves the room.
03:51:03ko1no relation with rubinius?
03:52:23xxi enters the room.
03:52:25brixenko1_: no relation, but we had talked with avi here today about core ruby libs
03:52:52brixenko1_: you can read the logs here: http://www.donttreadonme.co.uk/rubinius-irc/rubinius.log.20080430.html
03:53:19ko1thank you!
03:53:26ko1so we have more rivals
03:53:51brixenheh indeed :)
03:54:06brixenruby is so hot, all the cool kids on the block want one :)
03:55:05djwhittrivals, nah, not as long as everyone colaborates
03:55:40brixenwell, sort of like sibling rivalry
03:55:43djwhitthehe
03:55:53brixennot like say U.S. vs U.S.S.R
03:55:54brixen:)
03:56:03sambo enters the room.
03:56:14sambo leaves the room.
03:58:33evansomeone called me a 'snarky cow' on my Rubinius Retort post
03:58:35evan:/
03:59:19rueNot cool, dude, you are a totally mellow cow
03:59:57evanchews the cud.
04:01:19brixenhaha, snarky? evan?
04:01:30brixenmaybe they're confusing you with headius :)
04:01:40brixenthey got their wires crossed
04:01:55vertiginousI think they were talking about another commenter
04:03:17ixx leaves the room.
04:04:20fabiokung leaves the room.
04:04:27knowtheoryi'm confused why there's snarkiness to begin with
04:04:41headiusevan: give me back my snark.
04:04:45knowtheoryseems like everyone's still cooperating
04:05:02evanheadius: seriously.
04:05:21evanknowtheory: headius was having a slow monday
04:05:23djwhittevan: yeah, pretty sure "Mr eel" was addressing "nothanks" with that snarky comment
04:05:38knowtheoryheadius: Liked your post, it's convinced me that i should be contributing to Rubinius :P
04:05:49knowtheory(perhaps not your intended effect ;) )
04:05:59brixenheh
04:06:27knowtheoryer, i think Mr. Eel is a mate of mine, should i ask for clarification?
04:07:09headiusknowtheory: glad I could help
04:08:02knowtheoryheadius: I've been following the vm progress through your writings, which i greatly appreciate, so thanks!
04:08:20headius"the vm"?
04:08:36knowtheoryProgress on the vm fronts generally
04:09:11cored leaves the room.
04:10:35trythil_ enters the room.
04:10:35trythil leaves the room.
04:13:42dysinger enters the room.
04:16:37twbray enters the room.
04:17:41crafterm leaves the room.
04:26:33benburkert leaves the room.
04:28:00wmoxam leaves the room.
04:32:36crafterm enters the room.
04:37:34GMFlash enters the room.
04:37:58marnen enters the room.
04:38:39marnen leaves the room.
04:46:56brweber2 leaves the room.
04:48:21enebo leaves the room.
04:50:49MenTaLguY enters the room.
04:51:53headiusknowtheory: ahh ok, well glad to keep you up-to-date then
04:54:10knowtheory leaves the room.
04:54:31AndrewO leaves the room.
04:54:31rudebwoy enters the room.
04:54:31knowtheory enters the room.
04:59:18jennyw enters the room.
05:22:13benburkert enters the room.
05:28:40ezmobius leaves the room.
05:30:47agardinerdrbrain: what should i be setting the platform to in a gem that is targeting rubinius?
05:30:51femtowin enters the room.
05:30:54yugui enters the room.
05:30:56femtowin leaves the room.
05:31:08Erlang enters the room.
05:31:44Erlang leaves the room.
05:31:51Erlang000 enters the room.
05:34:51Erlang00t enters the room.
05:35:07Erlang00thello
05:35:30Erlang00tfor rubinius io
05:35:33drbrainagardiner: I don't know
05:35:34Erlang000 leaves the room.
05:35:45Erlang00tsomething that io#read-->io#fill_from
05:36:26Erlang00tScheduler.send_on_readable @channel ...
05:36:34Erlang00tobj=@channel.receive
05:36:42agardinerdrbrain: does that mean there isn't any auto-detection for rubinius in gems yet?
05:36:45tarcierihey ostensible Erlang lover guy
05:36:57tarcieriI'd like to do a Port(s) interface
05:37:02drbrainthere is not
05:37:04tarcierifor any I/O object
05:37:06Erlang00twhat does this mean? could someone please explain this?
05:37:08Erlang00t:)
05:37:12Erlang00tyes
05:37:18tarcierithat way you don't have to deal with Scheduler
05:37:19Erlang00tI supposed that for io to work
05:37:33Erlang00tyou should have something like fd or FILE*
05:37:34tarcieriyou just point a Port at the Actor you want to receive datagrams
05:37:42tarcieriand then the Actor deals with Scheduler for you
05:37:47Erlang00tor use stdc like getc or putc's routine
05:37:49Erlang00tstdio related
05:37:59tarcieriAla Erlang active mode
05:38:13Erlang00tbut I can't see the related code that in rubinius that implements File
05:38:31tarcieriIf Ports worked for arbitrary IO objects you could use them with File
05:39:13Erlang00tI'm not sure, what does that mean?
05:39:31tarcieriAre you familiar with active once semantics?
05:39:35rueI am completely lost :P
05:39:57rueagardiner: Send a patch :)
05:39:59Erlang00tI'm not familiar with Actor
05:40:05tarcierierr
05:40:09tarcieriso do you know Erlang?
05:40:22Erlang00tbut I checked out with the ruby implementation
05:40:24Erlang00tor MRI
05:40:24tarcieriErlang processes follow the Actor model
05:40:24Erlang00tsaid
05:40:29agardinerrue: i might have to! :-)
05:40:42Erlang00tI just understands Erlang a bit:)
05:40:53tarcieriErlang provides ports as an interfacing mechanism between Erlang processes and things that aren't Erlang processes
05:40:54Erlang00tnot much, yes, about Actor, process send each other message
05:40:56tarcieriLike sockets
05:41:04tarcieriOr external programs
05:41:10tarcieriOr external programs which pretend to be sockets
05:41:29Erlang00toh, yes, so what's related with IO?
05:41:41Erlang00tor what I want to understand is how ruby/rubinius implement File#read
05:41:48tarcieriWell, I guess I just assumed from your nickname there you were looking for a more Erlangesque approch to I/O
05:41:50tarcieriapparently not
05:41:50tarcieriheh
05:42:05headius_ enters the room.
05:42:19Erlang00tno, apparently not:)
05:42:36tarcieriErlang: Scheduler provides what's effectively a message driven approach to I/O
05:42:55wycats_ leaves the room.
05:43:34tarcieriScheduler sends messages to Channels when I/O events occur
05:43:56tarcierithis wakes up the associated Task and lets it process the incoming I/O event
05:44:00antares enters the room.
05:44:25ryantmulligan leaves the room.
05:44:52Erlang00tyes, for obj=@channel.receive to work
05:45:08Erlang00tbut @channel.receive must delegate to something that fd.read, or FILE.read
05:45:18MenTaLguY@channel.receive doesn't
05:45:21Erlang00tI just want to find out the related code in order to understand more
05:45:23MenTaLguYScheduler handles that
05:45:41Erlang00toh, yes, so where is the code?
05:45:45MenTaLguYbasically you enqueue a request to the scheduler to notify you when IO is ready
05:45:53MenTaLguYand then scheduler itself writes back on the channel you provided
05:46:50Erlang00tyes, so where's the code about scheduler work, writes the channel when IO is ready
05:46:50tarcieriit's so much like Ports already it'd be so easy to wrap up in an API designed to work directly with Actors
05:47:06Erlang00tthere should be some code like fd.read or FILE.read in somewhere
05:47:16tarcieriErlang: a lot of it is in C, or Ruby that generates C
05:47:21tarcieriafaik
05:47:39tarcierithe underpinnings are libev, which is a C library
05:48:05tarcieri(which works ala kernel poll in Erlang)
05:48:32anteaya leaves the room.
05:48:33MenTaLguYfor the current VM, see shotgun/lib/cpu_event.c
05:48:52MenTaLguYcpu_event_wait_readable and _cpu_wake_channel_and_read
05:49:46MenTaLguYto see how reads work
05:51:33Erlang00tyes
05:51:41Erlang00tsee something like while(1)
05:51:47GMFlash leaves the room.
05:51:58Erlang00ti = read(ti->fd, buf,sz)
05:51:58GMFlash enters the room.
05:52:10Erlang00tso seems to use libev-->Unix System Call
05:52:23Erlang00tis this correct?
05:52:25tarcieriyes
05:52:35Erlang00twhile c ruby uses io#read-->stdio
05:52:44tarcieriselect()
05:52:53tarcieriis the system call behind all MRI IO
05:53:21tarcieriand it's pretty much hardwired in all over the place
05:53:31tarcierie.g. rb_thread_select()
05:53:54tarcierithat's the basis of how MRI schedules green threads alongside I/O events
05:53:57MenTaLguYwell, pretty much any blocking operation really
05:54:08tarcieriit's ooooglaaay
05:54:22MenTaLguYif a thread needs to block it goes back into the select loop and another thread is scheduled from there
05:54:41tarcieriIn Rev I effectively busy wait on the thread scheduler
05:54:48tarcieriin 1.8 at least
05:54:51tarcieriit's ooglaaaay
05:54:55Erlang00tI checked out the MRI, there's rb_io_readchar function
05:54:57trythil_ leaves the room.
05:54:59tarcieri1.9 actually lets one thread make a blocking call
05:55:09tarcieriyes all of those type of calls ultimately call rb_thread_select()
05:55:10trythil enters the room.
05:55:19Erlang00trb_io_readchar-->rb_io_getc
05:55:19tarcieriwhich calls rb_thread_schedule() alongside select()
05:55:24Erlang00tso it seems use stdio
05:55:28tarcieriyep
05:55:31Erlang00tyou mean 1.9 he changes to use select()?
05:55:33tarcieriRuby is hardwired into iolib
05:55:42tarcieri1.8 uses select()
05:56:00Erlang00t1.8? but in 1.8 I see rb_io_readchar-->rb_io_getc
05:56:06Erlang00tnot seems to use select()
05:56:24tarcierirb_io_getc() calls rb_io_wait_readable()
05:56:29tarcierirb_io_wait_readable() calls rb_thread_select()
05:56:40MenTaLguYyou can guess what rb_thread_select() calls
05:56:55tarcieriheh
05:57:38tarcierirb_thread_select() is a busywaiting mechanism which runs green threads while polling the kernel with select()
05:57:38Erlang00tso you mean at the end he still use Unix System Call, not thru stdio?
05:58:01tarcieriif you ever strace/ktrace an MRI process doing I/O you'll see it calling select() an asston of times
05:58:21Erlang00tc=getc(f)
05:58:23tarcieriit's using select() to do event monitoring
05:58:23MenTaLguYI wouldn't really call it a busywaiting mechanism
05:58:36headius leaves the room.
05:58:37MenTaLguYsince it blocks if there are no runnable threads and no ready events
05:58:44Erlang00tI see this in rb_getc(f)
05:59:15tarcieriMenTaLguY: Does it? I think it keeps calling rb_thread_schedule() regardless of if there's a runnable thread
05:59:15yugui leaves the room.
05:59:33tarcieriMenTaLguY: rb_thread_schedule() just doesn't do anything if there isn't a runnable thread
05:59:50tarcieriif there's a way to defer to a blocking state if there's no runnable threads in MRI I'd really love to hear it
05:59:53tarcieriit's such a hack in Rev now
05:59:55Erlang00tit first calls rb_thread_wait_fd, then called getc(f)
06:00:25MenTaLguYcrap, it does keep calling select even when it's blocking
06:00:26MenTaLguYthat's awful
06:00:37tarcieriyep
06:01:28benburkert leaves the room.
06:01:31fleadope enters the room.
06:01:36tarcierirb_thread_blocking_region() in 1.9 is nice
06:01:44tarcieriit lets you actually make blocking syscalls
06:02:04tarcieriRev is a *lot* faster on 1.9
06:02:14tarcierilike 4X faster
06:02:51Erlang00tRev, what's Rev?
06:03:08MenTaLguYevent-driven IO library
06:03:15tarcieriIt's a libev binding for MRI/YARV
06:03:45KirinDave leaves the room.
06:03:46Erlang00tyes
06:04:01ko1wow
06:04:33tarcierihey ko1
06:04:39tarcieriYARV is nice for I/O
06:04:41tarcieri:)
06:05:43ko1does it have portability?
06:05:53ko1i mean that it works on windows?
06:06:07tarcierilibev works on Windows
06:06:10tarcierisupposedly
06:06:13tarcieriwith mingw maybe
06:06:24ko1great
06:06:25tarcieriRev does not build on Windows right now
06:06:50fleadope enters the room.
06:07:00ko1Rev is wrapper?
06:07:03tarcieriyes
06:07:04fleadope leaves the room.
06:07:04ko1or scratch?
06:07:07ko1i see
06:07:33tarcieriit uses rb_thread_blocking_region() on YARV
06:07:42tarcierion MRI it busy-waits and calls rb_thread_schedule()
06:08:29ko1it's my purpose :)
06:08:47tarcieriyeah it's certainly been fast for us
06:09:29ko1completely replace default I/O?
06:09:39tarcieriyep
06:09:39ko1or can be use as extension library?
06:09:45wycats_afk leaves the room.
06:09:54tarcieriit's a C extension + a bunch of Ruby
06:09:58tarcieriavailable as a gem
06:09:59tarcieri"rev"
06:10:23ko1i see
06:10:23tarcieribut it does act as a replacement for default I/O when you use it
06:10:29tarcierisince it calls the thread scheduler directly
06:10:36tarcieriin MRI at least
06:10:49tarcierion YARV it just does blocking calls
06:11:12tarcierithe Ruby on top is a full fledged Reactor library
06:11:20tarcierisort of like EventMachine
06:11:24tarcierior Twisted
06:12:11tarcieribut unlike EventMachine it works directly with Ruby IO objects
06:12:20tarcieriAnd Ruby openssl
06:12:41Erlang00tjust looks some code of MRI 1.8
06:13:05Erlang00trb_getc calls rb_thread_wait_fd which calls rb_thread_schedule
06:13:15Erlang00tand then rb_getc called getc(fd)
06:13:26tarcieriwhat version are you lookning at?
06:13:30Erlang00tso it seems that it will first invoke something like select() to wait
06:13:35tarcieriI'm looking at 1.8.6 p111
06:13:41tarcieribut yes
06:13:45Erlang00t1.8.6
06:13:45tarcierithat's what it does
06:14:08Erlang00tand then getc(fd)
06:14:17tarcieriuses select() to wait for the event, then getc() to consume it
06:14:20Erlang00tso actually it still uses stdio to implement File#read
06:14:27Erlang00tyes
06:14:28tarcieriyes
06:14:33Erlang00tthat's what I want to ask
06:14:33Erlang00tyes
06:14:34tarcieriselect() for the event waiting
06:14:37tarcieriheh
06:14:46tarcieriyes, maybe I wasn't clear as iolib is kind of a glibc thing
06:14:51Erlang00tbecause the Unix call it self is too low level and ugly
06:14:56tarcieriyep
06:14:58Erlang00tthe read() call
06:15:01tarcierinot the only place Ruby is like that
06:15:08Erlang00tharder use than stdio
06:15:17Erlang00tthough stdio of course implements thru it
06:15:24tarcieriI/O is an afterthought for most people and Ruby didn't wrap it up very well
06:15:29Erlang00tand for windows system, it of course doesn't have the Unix call
06:15:39tarcieriyeah it uses some sort of compatibility library
06:15:41Erlang00tso, the natural questions come to me
06:15:46tarcieriRubinius is trying to avoid that
06:15:47tarcieriI believe
06:15:54Erlang00tis how do ruby implement that
06:15:59tarcieriand reimplement the POSIX semantics without relying on the underlying POSIX syscalls
06:16:04Erlang00tso it turns out using stdio, which is quite natural
06:16:07tarcierimostly in Ruby, I think
06:16:10Erlang00tand not use Unix call directly
06:16:15tarcieriI haven't looked at the code so I may be speaking out my ass here
06:16:23Erlang00trubinius?
06:16:24tarcieris/syscalls/library calls/
06:16:48Erlang00tbecause the problem with direct calling open() calls, is first, is too low level
06:16:53Erlang00tsecond, can't handle windows
06:17:16Erlang00tbut I see some code read() in rubnius
06:17:20tarcieriRuby's using POSIX extensions to ANSI C
06:17:36tarcieriThat let you get to the underlying open() syscall that fopen() is using
06:17:39Erlang00tjust MentaLu refered in cpu_event
06:17:43tarcierie.g. IO#fileno
06:18:50Erlang00tI'm not sure, the IO#fileno is more like an ANSI C, (C standard thing)
06:19:00Erlang00tor more like some common Unix call,like POSIX thing
06:19:13Erlang00tPOSIX make all Unix work, but just Unix
06:21:14tarcierifileno() isn't ANSI C because file descriptors aren't ANSI C
06:21:28tarcieristdio is ANSI C
06:21:36Erlang00tyes, so a POSIX thing
06:21:39tarcieriyep
06:21:47tarcieria POSIX thing that's hardwired into Ruby
06:22:12tarcierinot the only place
06:22:22Erlang00tyes, you are talking about MRI?
06:22:43tarcieriyes
06:23:36Erlang00tso how does it handles windows?
06:23:56tarcierisome sort of compatibility library
06:24:01tarcieriI don't really know
06:24:05tarcieriI've never used Ruby on Windows
06:24:10Erlang00tyes
06:24:19Erlang00tsome sort of thought experiment here
06:24:32Erlang00tit ANSI c can run both on Unix and windows
06:24:38Erlang00tand already can handle file
06:24:50Erlang00tthen MRI just directly uses ANSI c to handle file
06:24:54Erlang00tthen it's done
06:24:57Erlang00tno need to use POSIX
06:25:07Erlang00tjust some sort of thought experiment here
06:25:29tarcieriumm
06:25:35Erlang00tbut for rubnius, because it uses read() call, that's what makes me confuse here.
06:25:36tarcieriI kind of just explained the problem there
06:25:42tizianobis enters the room.
06:25:48tarcieriBeing able to multiplex FILEs with select()
06:25:49wycats enters the room.
06:25:51tarcieriuses fileno()
06:25:54tarcieriwhich is a POSIXism
06:26:05Erlang00tyes, you can see that as an optimization for Unix
06:26:06tarcierithe entire mechanism by which the scheduler waits for I/O is based around POSIX semantics
06:26:24Erlang00tyes, can see that as an optimzation for Unix
06:26:48tarcieriYou pretty much have to do something to that effect on Unix
06:27:02tarcieriConvert an IO object to its file descriptor
06:27:14tarcieriand hand that to whatever you're using as your scheduler
06:27:37Erlang00tyou means windows or Rubinius?
06:27:50tarcierifor any program you write in a Unix environment
06:27:55tarcieriPOSIX environment
06:28:23Erlang00twell, yes, I don't care
06:28:30Erlang00tif ANSI c lib's implemetation
06:28:38Erlang00tlike getc() underlying uses read()
06:28:46Erlang00tbut if you uses ANSI c's getc() directly
06:28:51tarcieriit uses select() to know when to read()
06:29:02Erlang00tthen your program is directly portable on everything supports ANSI c
06:31:03tarcierino it's not
06:31:07tarcieribecause the scheduler isn't portable
06:31:15tarcieriand that's way more important than how it interfaces with files
06:31:46Erlang00tscheduler, you mean in MRI?
06:31:50tarcieriyes
06:31:57KirinDave enters the room.
06:32:12Erlang00trubinius seems to use read() system call directly?
06:32:18tarcieriRubinius uses libev
06:32:23tarcierifor its scheduler
06:32:40Erlang00tyes, but for real call? real getting the char
06:32:47Erlang00tignore the scheduler now here
06:33:24tarcierithe point is you're not going to implement a virtual machine for any language that supports I/O without some way of scheduling I/O alongside the rest of what you're doing
06:33:45tarcieriand there's no portable way of doing that short of something like libevent/libev
06:36:04Erlang00tyes
06:36:54Erlang00tI'm confused by how the real getting char is
06:37:07tizianobis_ enters the room.
06:37:09Erlang00tthen you are making me more confused by the scheduler ..:)
06:37:13tarcierihaha
06:37:25tarcierion Unix it's calling getc() which is calling read()
06:37:34Erlang00tyes, I know
06:37:40tarcierion Win32 it's probably calling the Win32 ANSI getc()
06:37:40Erlang00tin unix getc() underlying uses read()
06:37:48Erlang00tbut getc() also works in win32
06:37:48tarcierifor files
06:37:52tarcieriand something else for sockets
06:37:55Erlang00tyes, that's what I mean
06:38:00tarcieriwhich is probably all abstracted in some compatibility later somewhere
06:38:04tarcieriso you want to know about Windows
06:38:06tarcieriwell don't ask me
06:38:08tarcieriI don't really know
06:38:10tarcieriI can just guess
06:38:19Erlang00thaha
06:38:34Erlang00tbecause rubinius uses read() unix call direclty
06:38:39tarcierijust put it at: Windows was an afterthought
06:38:44Erlang00tso I wonder how future rubinius is going to support windows
06:38:47tarcieriRubinius isn't portable to Win32 yet
06:38:53tarcierias in the API
06:39:00tarcieripeople are trying to get it going through Cygwin I think
06:39:30Erlang00tyes
06:39:37Erlang00tkind of getting the problem here
06:39:46Erlang00tfor real getchar, MRI uses getc()
06:39:50Erlang00tso it's not a problem
06:39:54Erlang00twhere rubinius uses read()
06:39:56Erlang00tso there's a problem
06:40:04Erlang00tok, then the scheduler
06:40:16Erlang00tfor scheduler, yes, I can agree with that no portable way
06:40:32tarcieriRubinius is trying to reimplement the POSIX semantics in Ruby rather than have a big nasty portability mess in C
06:40:42tarcieriafaik
06:40:49Erlang00tbut something like #ifdef windows windows_way_of_scheduler #ifdef unix posix_way_of_scheduler
06:41:00tarcierithat's already abstracted in libev
06:41:06Erlang00tsomething like that, just mental model
06:41:14tarcieri(kind of)
06:41:17Erlang00tlibev is portable to windows?
06:41:21tarcieriyes
06:41:35tarcierialthough the backend isn't enabled per default
06:41:36tarcieriwhich is silly
06:41:47jennyw leaves the room.
06:42:00tarcieriby default libev on Windows uses select() which is part of Winsock and thus only works with sockets
06:42:28irbwoy enters the room.
06:43:25Erlang00tyes, so for the scheduler, I guess there shouldn't be a problem
06:43:25Erlang00tbut to use the scheduler, you are targeting a high performance?
06:43:25Erlang00tbecause directly implement
06:43:25Erlang00tlike in rubinius directly implemnt File#read
06:43:25Erlang00tI would just File#read --> getc(fd)
06:43:26Erlang00tthen it's ok
06:43:28Erlang00tno need to go thru scheduler, or event or something
06:43:32Erlang00tthat's my mental model here
06:44:44tizianobis__ enters the room.
06:46:30evanErlang00t: you a big erlang guy I suppose.
06:46:42Erlang00tno
06:46:48rueMuhahaa. I have now opened 1200 buffers in this vim session
06:46:50Erlang00tI do not know Erlang too much..
06:47:11evanooh look at everything I missed
06:47:11yugui enters the room.
06:47:18evandrbrain and I were killing eachother in GTA4
06:48:21headius leaves the room.
06:48:38headius enters the room.
06:49:21headius leaves the room.
06:49:37headius enters the room.
06:49:39tarcierihaha evan
06:49:52tarcieriI should really go play GTA4
06:50:06evanmultiplayer is good
06:50:11evanprobably more fun with a ton of people though
06:50:11tarcieriso I've heard
06:50:12headius_ enters the room.
06:50:14evanthan with just 2
06:50:16tarcierinice
06:50:17smparke1 leaves the room.
06:50:18evanbecause you have access to the entire map
06:50:21tarcierithere's like a coop free-for-all mode?
06:50:26evanand helicopters, boats, the whole gamit
06:50:27evanyep
06:50:34tarcieriyou're both PS3?
06:50:42MenTaLguYErlang00t: anyway, the trouble with doing File#read directly is that nothing else can happen in that thread while it is waiting for the read to be ready/complete
06:50:42headiusblast
06:50:44headiusbrb
06:50:46rue"Misdemeanor Jaywalking 3" is more my speed
06:50:59evantarcieri: y.p
06:51:16tarcieriwell uhh, let me know next time you're playing
06:51:17headiusgamut
06:51:21headiuswow...wtf
06:51:21tarcieriI should really go beat some more missions
06:51:23headiussome kind of screwball lag
06:51:24tarcieriI don't even have a gun yet
06:51:25headiusmaybe irc dropping issues aren't my problem
06:51:38tarcieriI assume I'm about to get one already, ugh
06:52:01tarcieriI mean, i took one from a cop, and uhh, drove around for awhile and shot some stuff
06:52:12Erlang00tMentaLguY: but I guess for the programmer to write simple ruby program
06:52:27Erlang00tsome ruby logic-->read some file-->anyway,there's already a block call here
06:52:27evantarcieri: sure, we'll let ya know
06:52:29tarcieriMenTaLguY: so how about something like Actor.bind(IO) -> Port
06:52:32evanwe're going to play coop tomorrow evening I think
06:52:34evanif you're around.
06:52:39Erlang00tthe programmer anyway assumes need to read something
06:52:42tarcierievan: cool
06:53:12MenTaLguYtarcieri: can you try it in Rubinius, see how it works?
06:53:23MenTaLguYlib/actor/port.rb or something
06:53:29tarcieriok
06:53:36tarcieriI'm just wondering where I should be interfacing
06:53:38tarcieriwhich Channel
06:53:39tarcieri@ready?
06:54:02MenTaLguYoh, hm
06:54:06tarcieriThe idea is to let an Actor directly receive I/O events from scheduler
06:54:09MenTaLguYit should be part of the normal message stream shouldn't it?
06:54:29tarcieriWithout any middleman
06:54:33tarcieriThere doesn't need to be
06:54:46tarcieriThe semantics are practically there already
06:54:48MenTaLguYI'm not sure how to do this without a middleman right now
06:54:52tarcieriJust needs a pretty face for Actors
06:55:07tarcieriwhatever Channel is waiting for message events
06:55:14MenTaLguYI think it's more feasible for an actor that doesn't have to implement termination-on-exit
06:55:14tarcierihave Scheduler send messages there
06:55:19tizianobis leaves the room.
06:55:42MenTaLguYWell, the thing is that in order to implement terminate-on-exit, there isn't really a channel waiting for messages anymore
06:55:58tarcieriso what does an Actor do when it calls receive now?
06:56:01MenTaLguYit's more of a "conceptual" channel cobbled out of a couple real ones
06:56:07tarcieriand please note GTA4 is calling
06:56:09tarcieriheh
06:56:18headius leaves the room.
06:56:29MenTaLguYwell, it acquires the semaphore encoded by @lock
06:56:39MenTaLguYchecks to see if there's anything of interest in the mailbox
06:56:42tarcierisemaphore implemented on top of a Channel?
06:56:55MenTaLguYif not, it sets up @ready, indicates that it's waiting, and then releases @lock
06:57:22MenTaLguYand waits on @ready to get either true or false, to indicate timeout or not (or is it the other way around?)
06:57:32MenTaLguYeither way it re-acquires @lock
06:57:45twbray leaves the room.
06:57:46MenTaLguYqueues up the action to do
06:57:48MenTaLguYreleases @lock
06:57:51MenTaLguYand then does the action
06:57:59MenTaLguYin the kitchen
06:58:01MenTaLguYwith the candlestick
06:58:09tarcieriheh
06:58:38MenTaLguYbut, yes, a semaphore is just a channel where we ignore the value written
06:58:42MenTaLguYconceptually
06:59:00MenTaLguYthe count of a semaphore is really just a count of unconsumed writes
06:59:01tarcieriokay, well... could that be changed to be interruptable
06:59:04tarcieriby an I/O event
06:59:08tarcieriin addition to a timeout
06:59:21MenTaLguYyou'd need to be very careful in that case
06:59:28MenTaLguYsince you don't want stale stuff in @ready
06:59:39MenTaLguYnote the care that is taken to "reset" it to a pristine state after use
07:00:33tarcieriwell, the next Scheduler event would be triggered by the first being processed... although it's possible spurious events could occur if whatever triggered the event were processed elsewhere
07:00:55MenTaLguYthat and you could have multiple events triggering I think?
07:01:05tarcieriyes, but they'd have a unique fileno
07:01:13tarcierijust read events
07:01:18MenTaLguYyes, but the rest would still get written to the channel too
07:01:29tarcierithe problem I forsee
07:01:37tarcieriyou have an "active" Port
07:01:43tarcieriit becomes readable
07:01:48drbrainsomebody should right all this down in RDoc somewhere...
07:01:51tizianobis_ leaves the room.
07:01:55tarcieriokay, well, the solution to the problem
07:02:07tarcieriPorts should only be "active" during Actor.receive
07:02:16tarcierithat's how you prevent spurious messages
07:02:32MenTaLguYdrbrain: write what, exactly? the parts of the conversation so far that aren't a literal narration of the code are speculative
07:03:10MenTaLguYI do think, semantically, that the port notifications do need to be submitted via the normal actor system as well
07:03:12drbrainMenTaLguY: well, if you figure something out that's concrete, I guess you should write that down
07:03:14tarcieriwhen Actor.receive completes, it needs to cancel all the I/O wait events
07:03:24tarcieriand that's where it'd be nice to have nested event loops
07:03:24drbrainI certainly don't know how it works :(
07:05:19MenTaLguYtarcieri: I think we'll need to hash this out more than we can do tonight
07:05:42evandrbrain: it's pretty crazy you can go anywhere on the map in deathmatch mode
07:05:49evanand a bitch that you always start in the same palec.
07:05:50evanplace.
07:05:51drbrainyeah
07:06:10drbrainflying the helicopter is still hard
07:06:16evanyea
07:06:17drbrainI tried to shoot at you some
07:06:23drbrainbut I was too unstable
07:06:26evanfrom the helicopter?
07:06:31evanwhat weapon?
07:06:35tarcieriMenTaLguY: I think it's doable now if you used sent a marker object, cancelled all the I/O events, and reaped everything upto it
07:06:41drbrainthe helicopter guns
07:06:55tarcieriMenTaLguY: that'd ensure it's flushed clean after Actor.receive finishes
07:07:21evandrbrain: i didn't realize it had dedicated guns.
07:07:25evani wonder if there is a tank.
07:07:27drbrainthe nothernmost part of the starting building has a helicopter with guns on it
07:07:37drbrainprobably somewhere
07:07:38tarcierijust needs to look up cheat codes
07:07:40tarcieriand go do that
07:07:42MenTaLguYtarcieri: well, yeah, that is the approach used for timeouts right now actually
07:07:45agardinerevan: want me to commit a fix for Tuple#to_a as discussed yesterday?
07:07:51evanpleas
07:07:55agardinerok
07:08:11tarcieriMenTaLguY: well, as timeouts are already a type of interrupt, I can probably just piggyback on that, and have I/O events be a new type of interrupt
07:08:51drbrainalthough, you can probably shoot out of the helicopter with the SMG or pistol
07:08:57drbrainL1 shoots while in a car
07:09:02tarc