Index

Show enters and exits. Hide enters and exits.

06:30:58tarcierihttp://use.perl.org/~Ovid/journal/38818
06:31:01tarcieri*facepalm*
06:43:29brixenheh, djwhitt plugs rubyspec and keeps 'em honest
06:43:52brixenperl... what is this? '93 :)
06:54:52slavatarcieri: don't hate on perl man
06:56:04dkubbslava: yeah, the distributed test system that CPAN uses is genius work. I always wondered why something similar hasn't caught on in the ruby world.. for testing gems and other ruby projects
07:00:18brixenthere is http://seattlerb.rubyforge.org/tinderbox/
07:03:05boyscoutHandle missing backtrace more gracefully. - 2db6d95 - Brian Ford
07:03:05boyscoutConform $LOAD_PATH more closely to MRI. - 785621f - Brian Ford
07:04:31boyscoutCI: 785621f success. 1503 files, 7245 examples, 23659 expectations, 0 failures, 0 errors
07:05:34dkubbbrixen: it's been a while since I was heavily involved in the perl community, but as I recall people could install a deamon running on their site, and as new module were uploaded they'd run the test cases and upload the test output to a central server
07:05:45dkubber, on their computer.. not site
07:07:35dkubbmy only CPAN module (something embarrassingly simple) was tested on about 70 platforms and versions of perl, and I get some nice reports like http://matrix.cpantesters.org/?dist=CGI-State+0.02
07:07:55dkubbI guess the system is now called CPANTS
07:11:19brixencool
07:12:51erikhactually, drbrain tried to get something going with a project a while back related to CPAN testers
07:12:52slavaI'm revisiting the problem of integrating X11 into a non-blocking I/O event loop
07:13:06erikhI was going to hack in rubygems support, but then I got all jobbed up and had no time
07:13:33erikhI want to say he called it tinderbox?
07:13:46brixenerikh: yeah, I pasted that above
07:13:53erikhoh; sorry
07:14:01brixenheh, no worries
07:14:15brixenhttp://seattlerb.rubyforge.org/tinderbox/ if you're interested
07:14:36erikhyeah, basically someone just needs to hack in the support for it to run optionally for rubygems users and it becomes quite distributed
07:14:57erikhi just have no time for it
07:19:47dkubba few months ago I was working with someone to make a distributed test app to be used with DataMapper and DataObjects initially.. with the plan to make it available for any project that wanted it. a central place would still be needed for aggregating results, and there'd have to be some mechanism to let the clients know when there was a change.. I'd work on it if I wasn't already tied up with other projects
07:24:17brixenthere's a guy working on this http://rubyspecresults.org/
07:24:24brixenit's just for rubyspec atm
07:24:42brixenbut the idea is to accept submissions from CI bots
07:26:25dkubbwow, that's cool. that's what I was talking about
07:26:41boyscoutGenerate backtrace when primitives raise exceptions. - 94f4b58 - Brian Ford
07:27:30dkubbI think it's great that it's just for rubyspec atm. better to get things ironed out with a smaller scope, and then extract it into something usable by more projects later
07:27:37brixenit needs a lot of functionality still
07:27:41brixenyeah, true
07:29:11boyscoutCI: 94f4b58 success. 1503 files, 7245 examples, 23659 expectations, 0 failures, 0 errors
07:29:27erikhTAP would go a long way into standardizing how ruby users view tests.
07:30:25brixenerikh: tell me more
07:30:29brixentap is very cool
07:30:34erikhTAP - the test anything protocol
07:30:34brixenI want to get rbx to use it
07:30:36dkubbTAP: http://en.wikipedia.org/wiki/Test_Anything_Protocol
07:30:37brixenoh that
07:30:49brixenI thought you meant tap
07:30:51erikhit's just standardized test output
07:31:14brixenthis tap http://tap.rubyforge.org/ :{
07:31:56brixenI have a "tap" for mspec
07:32:02brixenit's called yaml :)
07:32:11erikhit's very effective. in the perl world, knowing that no matter what you use to build your modules or even architect your test suite you'll get the same output is priceless
07:34:24dkubblooks like bacon does tap output already
07:34:47erikhyeah, chris2 is a big fan of tap
07:34:48dkubbre: http://testanything.org/wiki/index.php/Testing_with_Ruby
07:35:14erikhhe actually wrote a little module that monkeypatches Test::Unit to emit TAP too
07:36:07dkubbit should be pretty easy to make a formatter for rspec to do TAP
07:36:13erikhok; gonna get in the zone for some prime free-hacking time, see you guys later.
07:56:32tarcierilol slava
07:56:40tarcieriI don't hate on Perl
07:56:50tarcieriLarry Wall is my second favorite language creator after Alan Kay
07:57:11tarcieriit's just Perl's time has passed
07:57:15tarcieriand everyone should move on
07:57:19tarcieribut some people are stuck
07:57:21slavachuck moore > alan kay
07:57:30tarcieriAlan Kay is the shit
07:57:37slavaI don't think perl is worse than any other scripting language
07:57:57tarcieriI like, umm, arguments... to functions
07:58:03tarcieribeing passed discretely
07:58:23tarcieriautomatically flattening structures? yeah in most cases that's bad
07:58:45tarcierilexical scoping is cool
07:58:55slavaruby has plenty of warts
07:59:05tarcieriyeah a lot of them were inherited from Perl
07:59:18tarcieriespecially the nonsensical $* crap
07:59:37tarcierithere's still cases I see people using that and it's just WTF
07:59:50slavathe way blocks work kind of sucks
07:59:55tarcieriyeah
08:00:00slavaso does the whole 'open class' thing
08:00:01tarcieriI'm trying to fix that
08:00:02tarcieriyep
08:00:05tarcieriespecially core
08:00:11tarciericore should not be open
08:00:21slavaneither should anything, the whole model is flawed
08:00:24tarcieriyeah
08:00:26slavabecause of name clashes
08:00:31tarcieriI would like an add-only approach
08:00:42slavano, the concept of adding methods to existing classes is wrong
08:00:52tarcieriI don't agree
08:01:01slavait amounts to having one global selector namespace
08:01:06slavaglobal names = bad
08:01:18tarcierihave you read open reusable object models?
08:01:28slavaif you're going to have message passing OO, do what Java does, and only allow new class definitions to introduce methods
08:01:50tarcieri"if you're going to have message passing OO, do what Java does" my brain shut off about there
08:02:21tarcierilike uhh
08:02:31tarcieriimperative OO is not message passing OO
08:02:44slavaI was talking about one specific aspect of Java's object model
08:02:49slavathe fact that classes are 'sealed'
08:02:49tarcieriI'm tired of people waving their hands in the air talking about messages when message really mean "function calls that act on mutable state"
08:03:07tarcieriin my languages, messages are real
08:03:10slavawhen I say 'message passing OO' I mean the smalltalk/java/ruby model
08:03:18tarcieriSmalltalk yes!
08:03:20tarcieriJava NO
08:03:22tarcieriRuby kinda
08:03:56tarcieriReia has real messages
08:03:59tarcierifirst class messages
08:04:05slavayeah, and its slow as hell
08:04:20tarcierinot a concern of mine
08:04:27slavayou took the slowest operation in erlang, and made it the central means of computation :)
08:04:43tarcierithat's one way of looking at it, I suppose
08:04:55tarcieriit's the central means of modeling identity and synchronizing state
08:05:16tarcierinot necessarily "computation"
08:05:55tarcierithe world around an object/process is free to change, because an object/process communicates with the outside world using messages
08:06:31tarcierinot """messages""" which is a fancy high falloting word for "function calls which mutate state"
08:06:31slavaif your processes are too fine grained, then its easy to write code that deadlocks or has races of various types
08:06:49slavafoo.bar() - bar dispatches on foo's type
08:06:52tarcierithere is a particular type of deadlock which is exceedingly common
08:06:53slavathat's message passing OO
08:07:02tarcieriI have a solution for that
08:07:09tarcierithe others are edge cases
08:09:08slavawithin a class, there's a list of methods named by strings
08:09:17slavaif more than one module can add methods to this list, then you have name clashes
08:09:21slavathat's unavoidable
08:09:28slavaso the solution is to say that a module is a class and you can't add methods to other classes
08:09:55tarcieriI'm aiming for an approach where only the metaclass can add methods to a class
08:11:17tarcierislava: have you ever read this guy's blog: http://james-iry.blogspot.com/
08:11:26tarcierihe's pretty awesome
08:13:21slavayes
08:14:44tarcieriI think what he's ultimately trying to get at is in Erlang, messages have side effects
08:15:03tarcierioh noes side effects
08:15:46tarcieriErlang people are OMG SIDE EFFECTS until it comes to I/O and concurrency
08:16:34tarcieriapparently those are the only two areas where side effects kick ass
08:17:36slavathat's an arbitrary line you're drawing there
08:17:46slavawhy allow side effects for I/O and concurrency but not anything else?
08:17:57slavahashtables and other data structures need side effects
08:18:10slavaon the other hand some people like even controlling I/O effects with monads
08:18:54tarcieriI don't draw that line
08:18:58tarcieriI add MORE SIDE EFFECTS!
08:19:08tarcierimost are localized
08:19:14tarcierisome aren't entirely localized
08:19:17tarcierilike hidden state
08:19:37tarcieribut I entirely agree the Erlang people draw an arbitrary line
08:20:44tarcieriErlang has a very imperative approach to I/O
08:20:50tarcierian approach I would call "practical"
08:20:51tarcieriheh
08:21:16tarcieriI/O is a very imperative sort of thing
08:21:25slavahow fast is erlang I/O ?
08:21:30tarcieritrying to wrap it up a neat pure functional package is retarded
08:21:43tarcieriextremely fast, unless you're talking about the "io" module
08:21:51tarcieriwhich is poorly named
08:21:57tarcierianother persistent Erlang problem
08:22:05tarcierithey suck at naming stuff
08:22:39tarcieriI think it's very hard to guess what the "io" module does by its name
08:23:30tarcieriit's basically terminal I/O
08:23:50tarcieriErlang is slow at terminal I/O because it provides some awesome abstractions for terminal I/O across distributed systems
08:23:58tarcierithe "group leader" system
08:24:10tarcieriall terminal I/O happens through the group leader
08:24:19tarcieriif you have one node it's a needless layer of indirection
08:24:37tarcieriif you have a cluster it's an invaluable way to get everything you're interested in directed to a particular node
08:25:11tarcieriit has nothing to do with file or socket I/O
08:25:53tarcierifor socket I/O Erlang has "kernel poll" which is an abstract interface to epoll/kqueue/etc
08:26:01tarcierifor file I/O Erlang has the async thread pool
08:26:27tarcieriwhich can be used for anything else which requires blocking system calls
08:29:16tarcieriyou should rename Factor to LSD and backronym it to "Language that Slava Designed"
08:29:45slavahaha
08:29:56slavawhat about getting data in and out of string form in erlang?
08:30:12tarcieriif by "string" you mean binary that's easy
08:30:29slavano, suppose its a long file and I want to process each line, and its utf8
08:30:34slavanot a binary file
08:30:37slavano mmap
08:30:39tarcierithen it sucks
08:30:49tarcieriwell
08:30:52tarcieriif it's UTF-8
08:30:56tarcieriand you're running R13A
08:31:02tarcierithen it doesn't suck so bad
08:31:29tarcieribut yeah, you need the absolute latest bleeding edge release
12:30:33tilmanbrixen: how about this? http://235d48fe2c846551.paste.se/
12:30:56tilmanbrixen: has the advantage that it works with any target, and not just those who know about an --valgrind switch
13:44:30tilmandid my patch get through to the mailing list?
16:27:10brixentilman: yeah, that's fine
16:27:20brixenwhich mailing list did you send the patch to?
16:28:43brixentilman: do you have specs for it?
16:29:22tilmani mailed rubinius-dev@googlegroups.com
16:29:38tilmanbut i guess i failed somehow :)
16:29:46tilmanbrixen: specs for what? the valgrind thing?
16:35:22brixenoh rubinius-dev
16:35:28brixenI was looking at rubyspec ml
16:35:43brixenyeah, specs for the valgrind thing
16:35:50tilmansorry; that patch is unrelated to the mspec diff
16:36:13brixenheh ok
16:36:23tilmananyway, i don't have spces, no
16:37:08brixenk, I can add the patch and write some
16:37:16tilman\o/
16:38:42tilmanso...
16:38:57tilmanthis isn't well by rbx atm: [1,2,3].each
16:39:07tilmanie, call a method that yields without having a block to yield to
16:40:11tilmanit will try to read before the stk array in CallFrame... ie the sp points at the first item in stk, and then the yield_stack instruction calls CallFrame::stack_back_position(1)
16:40:32brixendrm
16:40:34tilmanand we up reading memory _before_ stk (-> 'unwinds')
16:40:36brixenhrm
16:40:59rueThat returns an enumerator in 1.8.7
16:41:08rueError in 1.8.6
16:41:08tilmantrue
16:41:30tilmanrue: what kind of error? i don't have .6 handy right now
16:41:37tilmanLocalJumpError or somesuch?
16:41:39brixenshould raise
16:41:41brixenyeah
16:41:46tilmanah, i see
16:41:49rueLocalJumpError: no block
16:42:11tilmanfor now i can add an assertion that will at least kill the vm if it tries to do that
16:42:18rueThe check should be in yield
16:42:36brixentilman: I can't repro that in rbx in irb
16:42:39brixenwhat's your code?
16:42:49tilmanary = [1, 2, 3]
16:42:49tilmanary.each
16:43:06brixenlocaljumperror
16:43:24tilmanheh, hang on
16:43:42tilmanbrixen: the invalid memory access is now caught by an assertion i added. so it dies before it can raise, i think
16:43:50tilmanyes, that's it.
16:43:55tilmansec
16:44:25tilmanrue: gen/instructions.cpp, ca. 1897. it's not a block, it's not a proc, so let's raise there?
16:44:32tilmanop_iml_yield_stack
16:44:37tilmanop_impl_yield_stack
16:45:14brixenhttp://gist.github.com/97664
16:45:34tilmansure, i believe you
16:45:38tilmanbut my analysis is correct
16:45:39brixenNilClass#call raises
16:45:51brixenwell, I'm trying to repro it
16:45:54tilmanif unwind[maxunwind] contains a special kind of crap, you'd probably see a segfault
16:45:56brixenyour case gives me lje
16:46:29tilmanbrixen: sec
16:46:51tilmanbrixen: http://e40dfd299962cab5.paste.se/
16:46:58tilmantry running with that
16:47:31tilmanso i guess we need a nil_p check in that code
16:47:41tilmanand not call call_frame->stack_back_position in that case
16:48:02brixenwe don't need a nil_p check
16:48:10brixenNilClass#call raises
16:48:37tilmanread again please
16:49:19brixenwe need to make sure nil is on the stack for the block
16:49:51brixentilman: ok, I get your assert abort
16:51:37brixenyou'll have to check with evan, but since any method can take (or ignore) a block, there should be a nil on the stack if a block wasn't passed
16:51:44brixenmaybe he's changed that
16:53:46tilmanmmh
16:57:03tilmanyield_stack is called with the number of arguments that are to be passed to the block, right?
16:57:48ruetilman: How is it a Proc if there is no block?
16:58:49tilmanrue: it's not a proc either. both conditions are false
17:01:27brixentilman: hehe, only problem with your assert is a = [1,2,3]; a.each &nil also aborts
17:02:23brixenand so does a.each { }
17:03:52brixenhelozjisky: sup? where you the one trying to install rbx?
17:08:19brixenhrm, something seems to be wrong with the profiler's total sec under certain conditions
17:08:45brixenprobably missing a leave() somewhere
17:11:30boyscoutAdded -P<sort column> to run profiler and sort output. - ef93221 - Brian Ford
17:11:41tilman[].each &nil should raise LJE, right?
17:11:48brixenyeah
17:11:58ruedbussink: Will attend EuRuKo after all
17:12:00tilmanokay, that's working with my crappy patch
17:12:11tilmanbut [].each {} isn't handled yet
17:12:22tilmanneed to see how the bytecode looks for that
17:12:34dbussinkrue: i've read it :)
17:12:41dbussinkrue: that you got a ticket from someone
17:12:58boyscoutCI: ef93221 success. 1503 files, 7245 examples, 23659 expectations, 0 failures, 0 errors
17:13:23ruetilman: `[].each {}` seems to work fine :)
17:13:41tilmanrue: damn my laziness. [1,2,3].each{} should die though
17:13:48rueNope
17:13:58tilmanrue: did you apply my assert diff?
17:14:13rueNah
17:14:27brixentilman: .each {} shouldn't die
17:14:29ruedbussink: Ah, yeah, I was not sure if anyone actually read it since thingy did not have posts anytime recently
17:14:30brixenwhy would it?
17:14:36tilmanbrixen: i know, but it does ;)
17:14:51brixenperhaps because your assert is not right?
17:14:52rueIs it compiling right?
17:15:06tilmanthe assertion is correct
17:15:18rueassert(assert())
17:17:02tilmanrue: i'm staring at the output of lib/bin/describe right now, but i don't really get it :D
17:17:24tilmani think i need to see how send_stack_with_block is implemented
17:17:50rueIs it `[].each({})` or `[].each {}`?
17:18:02tilmanary = [1,2,3]; ary.each {}
17:22:27tilmanseems like yield doesn't push the value onto the stack if the block doesn't take an argument
17:23:34rueYeah, but the block should not be worrying about the stack then anyway?
17:24:03tilmanyield_stack is called with 1 though, so it tries to pop 1 value off the stack
17:24:42tilmanit knows not to push, but it pops anyway
17:24:46tilmanor something
17:28:23malumaluis there some way to temporarly switch off garbage collection in the vm?
17:49:36tilmanactually with [1,2,3].each{} another assertion is hit -- the one in CallFrame::push
17:59:30tilmanbut that assertion is backwards
18:01:25tilmanoh man
18:03:23tilmanwith all assertions enabled, http://8cfacdf45ab9b3ee.paste.se/ will work, i believe. without invalid memory accesses. (i realize it might not be the correct/best bugfix)
18:17:06tilmanbrixen: turns out my assertion _is_ flawed. the return value may be stk-1 if position is 0 :)
18:17:25brixentilman: :)
18:17:44tilmani hit that case with "catch :foo"
18:18:03brixenI remember this when we first switched to c++
18:18:14brixenbut I couldn't remember the details
18:18:24brixenI figured you'd figure it out eventually :P
18:20:23tilmans/if position is 0// *cough*
18:22:16brixentilman: there was some debugging output for the stack
18:22:22brixenthat's why I knew it could be -1
18:22:33brixenI wonder if that's still in there
18:24:26brixenyou might assume that Class.new would be a relatively little used method
18:24:29tilmanGAH
18:24:31tilmanno.
18:24:34tilmanasdf
18:24:42brixenunless you happened to profile starting rails
18:24:49brixen330974 calls to Class.new
18:24:55tilmanbrixen: the return value cannot be at stk-1,because that's obviously outside the memory allocated for stk
18:25:34tilmanbut the assert should only be done if position > 0
18:25:42brixenhrm
18:25:45tilmanbecause: if the stack is empty, js.stack points at stk[-1]
18:25:51brixenok
18:25:55brixenthat's what I remember
18:25:55tilmanhumhum
18:26:04tilmanshould it be okay to call stack_back_position(0) in that case?
18:26:10tilmanprobably not
18:26:12tilmanwhat a mess %)
18:26:29brixenright, not if it *accesses* stk[-1]
18:26:46tilmanyeah
18:59:39rueLook hjyeah
19:00:21ruemalumalu: No, although it could be added reasonably simply. Why?
19:54:54malumalurue: just thought about ObjectSpace.each_object; i just thought about making an array of each object of each gc and call .each on this array
19:56:03malumaluand because i don't want the objects to disapear while .each'ing the array
19:57:19malumalueh, moment, when the objects are in the array they shouldn't disappear because there is a reference to it
20:00:35rueRight
20:00:55rueOf course you should never ever use ObjectSpace but you know
20:29:19flgrbrixen: what does Rails it Class.new for?
21:00:33brixenflgr: heh, the profiler is messed up, it's more like 600 calls to Class.new
21:01:37brixenmalumalu: you don't want to make an array of each object
21:02:00brixenwe will probably need to make an iterator in OM that can call a block with an abject
21:02:18brixenI plan on talking to evan about it next week
21:41:09headiusanyone around?
21:43:35slavaI am but I'm useless to you
21:45:02headiusyes you are
21:45:07headiusbut I won't hold it against you
21:46:10headiustrying to find a short list of rubinius opcodes
21:46:17headiuswe're going to start coming up with an IR for jruby
21:53:10malumaluheadius: kernel/compiler/iseq.rb maybe
21:54:33headiusyeah, just found that, thanks
21:54:36headiusthat's good enough
22:19:55tilmanbrixen: i suck so much. the real fix is like to use stack_back_position(count - 1) :(
22:20:10tilmanlikely*