Index

Show enters and exits. Hide enters and exits.

16:02:53evanmorning gents!
16:10:25brixenmorning!
16:21:37cremeshey guys; what are the priorities for this week?
16:24:54brixenunicorns and rainbows
16:25:02brixenbut sometimes I get my priorities confused
16:25:12brixenso that may in fact be rainbows and unicorns
16:25:15brixen:)
16:28:44brixenand by that I mean, unicorns == pack/unpack, rainbows == tickets
16:30:29cremesah, the unicorns are still a thorn in your side i see
16:30:35cremesdid you figure out the floating point packing yet?
16:33:01brixenyeah, it's all done
16:33:16brixeneverything that is done has new specs
16:33:36brixenso you can look at spec/ruby/core/array/pack/* and spec/ruby/core/string/unpack/*
16:47:46evanhm, i'd really like a C parser as a ruby library.
16:48:15evanthere is the weird gcc-xml thingy
16:49:54brixencould we wrap clang in FFI?
16:51:14evani'd just use rbgccxml if i was going to do that.
17:07:27dbussinkevening peeps
17:08:04dbussinkbrixen: you accidently hit #450?
17:09:03brixendbussink: come again?
17:09:24dbussinkbrixen: just curious how you found that :)
17:12:51brixenI had a signed value (-4) passed as a size_t due to a boundary error in unpack
17:13:07brixenString.pattern(-4, 0) will do it though :)
17:16:08evanbrixen: oh, on that.
17:16:29evanByteArray::create should bounds check the size
17:16:45evanalign has that issue, yes, but it shouldn't be fixed in align.
17:18:30dbussinkshouldn't String::create also check whether the value is sane?
17:18:33dbussinkand not for example < 0 ?
17:18:48dbussinkotherwise it will try to allocate a huge bytearray, since it's already casted to a size_t at that point
17:19:36dbussinkfor allocating a string with a negative size that is
17:20:41brixendbussink: that would be fixed with the bounds check in bytearray
17:21:00brixenevan: ok, that was the most reasonable solution
17:21:17dbussinkbrixen: true, but just wondering whether it should be checked there too
17:21:20brixenevan: what do you think about not using memset in BA creation
17:21:29evancould give it a shot.
17:21:41brixenok, I'll audit that
17:22:26dbussinkbrixen: it would be fixed with a signed upper bound i guess yeah
17:22:40dbussinkdoes mri have a limit on string length?
17:23:01brixenof course
17:24:42brixenevan: I have a repro for #411 (PackedObject as Module TypeError)
17:25:03brixenevan: time for a call? I have a bunch of questions so I can write docs for PackedObject
17:25:10evansure.
17:25:14brixenk
17:25:21brixenhttp://gist.github.com/557721
17:25:25brixencall whenever
17:26:11evanwhat is this doc?
17:26:20evani mean, i see what it details
17:26:30evanbut... any particular reason why?
17:26:32brixenit's the basis of various questions
17:26:38brixenso we can discuss
17:26:49evank
17:27:02brixenthe repro is: create a vanilla rails 2.1.2 app, then run http://gist.github.com/557724
17:31:12brixenhttp://gist.github.com/557731
17:37:25brixenhttp://gist.github.com/557740
17:45:56brixenhttp://gist.github.com/557746
17:48:02srbakerDefiler: ping
17:48:17srbakerDefiler: aware of a change in ruby 1.8 that changes how objects are calculated, assigned, managed, etc?
17:48:38brixen#<MetaClass:Class <some object>:0x5175dd0>
17:49:48srbakerhrm
17:50:09srbakeri've got a test suite that passes on 1.8.7pl72 and fails on 1.8.7pl306 (i think, it's in the low 300s)
17:50:20srbakerwith no real explanation why. the only diffs are object ids.
17:50:33srbakerand wilson mentioned some weirdness while we were beer and hotdogging in NYC
17:51:10brixen"a test suite"?
17:51:22srbakeryeah, the test suite for our app
17:51:23brixendo you mean something unrelated to rbx or rubyspec?
17:51:27brixenahh ok
17:51:35srbakeryes. sorry, i was just talking about it here because i know Defiler to hang out here
17:51:52brixenhm, no idea off hand
17:52:51srbakeri want to avoid the situation with this codebase that we had when i worked at postrank
17:53:15srbakerat postrank, the code was so shit, full of bugs, and dependency on bugs, they passed around a VirtualBox VM that you were expected to SSH into and develop on
17:54:45BrianRice-work:o
17:54:52srbakeri wish i was joking
17:56:04srbakerwhen i first started here at goldstar, we had to custom compile ruby, and it had to be a very specific patchlevel of 186.
17:56:11srbakerbut we've moved past that
18:00:28srbakerah, the diff is @name.
18:00:29srbakerweird
18:02:42srbakerin fact, here's the outptu
18:03:04srbakerhttp://pastie.org/private/ctfokwo7c5yojhprmwwuda
18:03:11srbakercan you see if that looks simple to you?
18:03:16srbakerthat test passes on several other machiens
18:11:50brixenare you saying you have tests with embedded object_id values?
18:15:24dwaitebrixen: are you trying to imply object_id's aren't portable? :D
18:15:38brixenheh
18:16:08brixenI'm wondering if I need to link to evan's *facepalm* pics
18:17:45evanbrixen: http://skitch.com/evanphx/n6hid/cam
18:18:07brixenI should hot link that to something
18:18:21brixenoh, I know! http://github.com/dwaite/mac-text-substitutions
18:18:25dwaitenoooo
18:18:27brixenI'll create a txt sub
18:18:36dwaiteI like my little project
18:18:44brixendwaite: did you get some good drugs for your foot?
18:18:54dwaiteanti-inflammatories
18:18:58evanbrixen: i'd use http://img.skitch.com/20100830-jy18jeatteyt8ydai6ee5xe36g.png
18:19:06evanif you want to hot link it.
18:19:21brixenok
18:19:45dwaitewill take one soon
18:20:01brixendwaite: if only they made those for egos :)
18:20:27dbussinkevan: that even embeds in linkinus :P
18:20:34evandbussink: limechat too!
18:20:40brixendwaite: not that you need it, just saying
18:20:50dwaitebrixen: yeah, I wouldn't mind an anti-inflammatory that worked on other people's forum posts and blog comments
18:21:32dwaitebrixen: you and evan keep me humble
18:22:05dwaiteshame the anti-inflammatory isn't the sort of drug that will give me more small hack project ideas
18:23:18dwaiteI forgot how fun it can be to go from idea to done on a sunday night
18:24:55brixenyeah, that is fun
18:25:11evanbrixen: worked on marlowe a bit yesterday
18:25:25brixensweet
18:25:28evani've got the interpreter able to bind to external functions via FFI
18:26:24brixennice!
18:26:34dbussinkevan: hmm, no readme :) http://github.com/evanphx/marlowe
18:27:35evan:D
18:28:10evani've been trying to balance the idea that marlowe is powerful enough to not require you to write in another language to write it's core classes at all
18:29:34brixenevan: but does it have web scale via /dev/null ?
18:29:44evanof course it's web scale.
18:29:54evanit uses atomic tokens to facility lock free computing!
18:29:55brixenthat would be an important point in the readme or FAQ or both :)
18:30:02evanfacilitate, rather.
18:30:33dwaiteI like atomic tokens, so space-age
18:30:52evansort of like nuclear clock radios
18:37:05BrianRice-worknuclear turbines
18:37:43evanatomic wristwatches
18:43:17dbussinkevan: it's a typed language?
18:43:24evanyep
18:43:41evanit's a language you'd write a GC in.
18:43:55evanrich, static types. no memory management.
18:47:11dbussinkevan: it generates some c code now?
18:47:19evanit will
18:47:25evanand/or LLVM LL
18:47:36evanbut i'm mandating it also have an interpreter
18:47:40evanwhich is what i'm working on first.
18:48:07evanI want it to have an interpreter because i want there to be the ability to run code at compile time
18:48:30bakkdoormacros! =)
18:48:49evan:D
18:49:13evanyes, code macros, not just string substitution macros.
18:49:27bakkdoorcool :)
18:50:00BrianRice-workinteresting
18:50:00evanit's a language to write a high level language in
18:50:27evanbut that doesn't mean it has has to be a pain in the ass.
18:50:31BrianRice-workslate still has its C-level dialect (which flattens multimethods and infers types)
18:50:40evannice
18:50:59BrianRice-workit isn't interpretable, though. I guess that'd be a fun project.
18:51:13BrianRice-workmaybe a good reason to start leveraging llvm
18:51:24evanmy interpreter is just a simple AST walker
18:51:30evanit's not meant to be performant.
18:51:35evanat least, not at this stage.
18:51:37BrianRice-worksure, just something cranked out
18:51:42evanyep.
18:51:49evani'm pretty early on in the lang
18:52:22evanworking out the best balance between modern conventions and lowlevel concerns
18:54:43dwaiteas long as it has a string eval
18:55:05evanhah
18:55:11evancompile time string eval, sure.
18:55:54dwaiteI've never tried to write C code with string eval
18:55:55bakkdoor=D
18:56:13dwaite(open new temp file, make shared library with gcc, load shared library)
18:56:28evanbasically, in rbx, we do this stuff with autogenerating C++ code
18:56:37evani want that to be in language with marlowe
18:57:16dwaiteI had someone once try and explain code macros vs. text substitution macros to me
18:57:25dwaitebut they had such a horrible lisp I really couldn't understand it
18:57:32dwaiteLisp, rather
18:57:36evanit's easy
18:57:50evancode macros are just methods that take other code as objects as arguments
18:57:55dwaitestring manipulation vs. AST manipulation?
18:57:59evanyep
18:59:23dwaiteyeah if only they had just said that
18:59:32dwaiteinstead they kept saying left-paren this, and right-paren that
18:59:42evanhah
18:59:53evanyes, lispers have a hard time seeing beyond the lisp sometimes.
19:22:32BrianRice-workas a lisper, I vaguely agree. slate macros are indeed methods on syntax node types
19:24:00BrianRice-workand the worst lisp code as a mature lisp user is the code you see other people writing when they talk about lisp but haven't used it in anger
19:24:34evanheh
20:05:18boyscoutMore FFI API merging. Support auto-offset calculation in Struct - 6e91c52 - Evan Phoenix
20:06:39BrianRice-workdwaite: out of curiosity, which horrible lisp was this? maybe elisp or autolisp
20:14:55boyscoutCI: rubinius: 6e91c52 successful: 3522 files, 15298 examples, 43156 expectations, 0 failures, 0 errors
20:44:01dbussinkbrixen: you're post is already outdated ;)
20:44:15dbussink"with Ruby 1.9 due to be released shortly"
20:56:59brixendbussink: blast it
20:57:08brixensuch are the perils of corporate blogging...
20:57:26dbussinkbrixen: hehe, i can imagine you probably wrote it some time ago :)
20:57:28brixenmy post edit cycle predates 1.9.2 release :(
20:57:34dbussinkbefore hell froze over in the ruby world :0
20:57:35dbussink:)
20:57:54brixenyes, I did not want to be typing frozen
20:58:15brixensince I seem to be inhabiting hell (ie rubyspecs for class variables)
21:16:45boyscoutCheck the number of bytes to allocate. Fixes #450. - 053d94c - Evan Phoenix
21:19:56brixenevan: I think an ArgumentError there with a reason would be better
21:20:07brixenI was working on specs for this (and the class var issues) :P
21:20:07evanok
21:20:13evanoh sorry.
21:20:16brixenn/p
21:20:19evanfeel free to change it
21:20:21brixenk
21:26:40boyscoutCI: rubinius: 053d94c successful: 3522 files, 15298 examples, 43156 expectations, 0 failures, 0 errors
21:56:15brixenevan: what do you think of String::MAX_SIZE and Array::MAX_SIZE ?
21:56:20brixenI'd like to formalize this a bit
21:56:27brixenit's pretty haphazard now
21:56:36evanwell,
21:56:41evani'm not particularly in favor of them.
21:56:49evanhow does one define what they are?
21:56:56brixenyou just did for String
21:57:08evanso just pick some value?
21:57:34evanit would be ByteArray::MAX and Tuple::MAX
21:57:35brixenyes
21:57:35evanbtw
21:57:38evannot String or Array
21:57:55brixenwell, those are implementation details
21:58:04brixenI think it should be exposed on String and Array too
21:58:06evanthen i'm against it
21:58:07evanno
21:58:09evani don't think so.
21:58:25evanthe size restriction is 100% implementation detail
21:58:30brixenso, some ruby code uses a random value and it works, another value and it fails
21:58:34evanie, if we supported array ranges
21:58:35brixenand that's hidden
21:58:42evanwe could allow for indexes in the trillions
21:58:48evanwithout actually allocating that much memory
21:58:53evanthat would be perfectly legal
21:58:59brixenok
21:58:59evanso the restriction is fully based on our implementation.
21:59:06brixenthat's reasonable
21:59:20brixenbut if we have the limit, which we absolutely do, it should be consistent
21:59:26brixenand visible somewhere
21:59:37brixenour Ruby code is not just user Ruby code
21:59:39evanmy limit was not a real limit.
21:59:51evanthats more like a sentenal value
22:00:23brixennot exactly
22:00:43brixenour C++ code makes assumptions like size_t on the values it can pass to eg memset
22:00:51evani don't believe your system would support a string with 2 billion chars
22:00:56evanso it's not a realy limit
22:01:02evansince it's unattainable.
22:01:05brixenif we changed the impl to ropes, there would be a different set of assumptions
22:01:34brixenok, perhaps we need some definitions then
22:01:42evanfor instance
22:01:48evanon my machine
22:01:51brixenbecause 1. we should not be able to segfault the vm, 2. we could very easily
22:01:55evani'd have made that be INT64_MAX
22:02:02evanwhich is clearly an unattainable value
22:02:10evanand is thusly not a user limit.
22:02:11brixensure, but whatever you set we could use to set the constant
22:02:16brixenFixnum::MAX exists
22:02:19brixenshould we remove that?
22:02:31evanI believe that Fixnum::MAX is entirely different.
22:02:42brixenhow so?
22:02:44evansince that max value is fully attainable and used.
22:03:02evanit represents a maximum value that a user will actually see
22:03:07evanand could consider
22:03:26evanArray::MAX of 2 ** 64 doesn't represent a value the user is concerned with
22:03:38evanbecause it is unattainable.
22:03:47brixenI'm not concerned with the user
22:03:49evanunder the current implementation
22:03:49brixenonly
22:03:59brixenI'm concerned about not having these bugs
22:04:15evanexposing Array::MAX in ruby doesn't solve these bugs
22:04:17evanimgo.
22:04:17brixenby having formally defined limits based on the actual implementation
22:04:18evanimho.
22:04:34evanwhere would you use Array::MAX?
22:04:36brixenthe value would be known in ruby and whatever is underneath
22:04:44brixentesting for one
22:04:51evantesting what?
22:04:57evanbecause you can't actually do
22:05:02evana[Array::MAX-1] = nil
22:05:06evanand expect your machine to work
22:05:08brixenthat I cannot segfault the vm with String.pattern(-1)
22:05:14brixenno
22:05:15evangiven MAX is 2**64
22:05:22evanthe negative numbers is a different situation
22:05:24brixenthat an exception is raised
22:05:38evanbut not an exception based on the value of MAX
22:05:54brixenthe negative becomes an out of bounds value due to being interpreted as a size_t
22:06:04evanspecing that pattern doesn't support negative numbers i totally agree with
22:06:13evanand that we cast negatives into a giant positives is bad
22:06:19evanwe should spec and fix all of those.
22:06:33brixensure
22:06:39evannot allow those negatives to be giant positives, and then attempt to spec the giant positive value in a range.
22:06:40brixenbut I'm still concerned with code in the vm
22:07:35brixenthere should be a definitive set of constraints for bounds given the actual implementation
22:07:44brixenByteArray, Tuple, Array indices, etc
22:08:02evanthey apply only to ByteArray and Tuple though
22:08:09evanis my argument.
22:08:21brixenthat's not true
22:08:22evanbecause those 2 classes mandate their implementation
22:08:27evanle sigh.
22:08:30brixenthey apply to anything that accesses those
22:08:36brixenand that code is not easily isolated
22:08:45brixennot really a fan of le sigh here
22:08:50evanno, i know.
22:08:51evansorry.
22:08:56brixenI spent time trying to figure out why that segfault existed
22:09:05evanyeah, you did.
22:09:17evanok
22:09:29evanif you feel it's important to have Array::MAX and String::MAX, i guess thats fine
22:09:32evanshould probably be
22:09:36evanMAX_SIZE though.
22:09:49evanFixnum::MAX is the maximum value
22:09:54evanwhich makes no sense for Array
22:09:57brixenI honestly don't know the best approach
22:10:06brixenbut I can give you the principles I'm concerned with
22:10:18brixen1. it's consistent and knowable in both C++ and Ruby
22:10:25brixeneven if only on our internal Ruby classes
22:10:35brixen2. it's definitive and in one place
22:10:56brixeneg for the bounds of Tuple/ByteArray/Array indices
22:11:00brixen3. it's doc'd :)
22:11:26evani'm fine on all but /Array
22:11:28evanhonestly.
22:11:55brixenok, but our C++ code iterates elements in an Array
22:11:57evanmy code was not an attempt to define a maximum size value
22:12:02evanat all.
22:12:03brixenand we have a @total attribute, tec
22:12:10brixensure
22:12:21brixenI'm not arguing for a particular approach
22:12:25brixenI'm just concerned
22:12:25evanit was simply to clamp the input value to the range of the type being used.
22:12:41evaninteger type
22:13:00evani don't see where you'd use a maxmimum value when iterating an Array in C++
22:13:02brixenyes, but these details are often subtle and distributed
22:13:09evanperhaps you could show me an example.
22:13:13evanto me, it's a number without use.
22:13:22evanand is therefore confusing.
22:13:35brixenwell...
22:13:38brixenlooks
22:13:43brixenArray::from_tuple uses size_t
22:14:00brixenArray::aref uses native_int
22:14:02evanso?
22:14:07evani don't get what you mean
22:14:15brixenArray::concat uses size_t
22:14:21brixenso?
22:14:23brixenseriousl?
22:14:26brixen:(
22:14:32evancall me.
22:14:32brixengoes for a walk...
22:15:25evanmy point was related to Array
22:15:31evanthat all those backend with tuple
22:15:35evanso Tuple would clamp the value
22:15:52evanso a max size/index on Tuple does make sense.
22:30:23rueStrictness and defensiveness in type usage is valuable.
22:31:36rueAs is clear and consistent type policy. If Array is dependent on Tuple, it ought be so constructed
23:16:07boyscoutDeal with being interrupted while writing better. Fixes #373. - 569e69f - Evan Phoenix
23:16:09evanfuck yeah. finally got that signal spam bug fixed.
23:16:21brixennice
23:16:51evanMRI handles signal handlers so weirdly
23:17:20evanif it can, it evaluates the ruby code for the signal FROM WITHIN the C signal handler function.
23:17:47evanwhich is not all the time.
23:19:08brixencrazy
23:19:37brixenI was taught to do the minimum possible in the handler and get out
23:25:59boyscoutCI: rubinius: 569e69f successful: 3522 files, 15298 examples, 43156 expectations, 0 failures, 0 errors
23:27:00evanboyscout: yeah, thats the proper way.
23:27:02evanrunning ruby code is scary.