apeiros changed the topic of #ruby-lang to: Ruby 2.0.0-p195: http://ruby-lang.org (Ruby 1.9.3-p429) || Paste >3 lines of text on http://gist.github.com
tylersmith has quit [Remote host closed the connection]
krombr has quit [Remote host closed the connection]
<zenspider> rawr
towski has quit [Remote host closed the connection]
saarinen has quit [Quit: saarinen]
<erikh> hi
marr has quit [Ping timeout: 252 seconds]
<Aloysius1> Hmmm. So bunny does not show up as a dependency in mygem's Gemfile.lock
towski has joined #ruby-lang
<erikh> ri Gem::Specification#add_dependency
justinmb_ has quit [Remote host closed the connection]
blaix has joined #ruby-lang
tomzx_mac has quit [Read error: Operation timed out]
dkam has quit [Quit: dkam]
ikrima has joined #ruby-lang
thatJasonSmith has quit [Quit: thatJasonSmith]
blaix has quit [Ping timeout: 248 seconds]
mrsolo has quit [Quit: This computer has gone to sleep]
mbj has quit [Quit: leaving]
arubin has joined #ruby-lang
dkam has joined #ruby-lang
fowl has joined #ruby-lang
krohrbaugh has joined #ruby-lang
<Aloysius1> erikh: Thank you. That was very educational.
Johz has quit [Read error: Connection reset by peer]
krohrbaugh has quit [Client Quit]
dmwuw has joined #ruby-lang
catphive has quit [Ping timeout: 260 seconds]
krohrbaugh has joined #ruby-lang
io_syl has joined #ruby-lang
krohrbaugh has quit [Client Quit]
krohrbaugh has joined #ruby-lang
teleological has joined #ruby-lang
joevandyk has joined #ruby-lang
<joevandyk> basically, i have three items. i need to come up with all the different types of ways of shipping those items (so i can find the cheapest method). so they could be all in one box, could be shipped separately, items 1 and 2 in one box, items 1 and 3 in one box, etc
<joevandyk> but i don't know the name for this sort of algorithm
nathanstitt has quit [Quit: I growing sleepy]
teleological has quit [Ping timeout: 252 seconds]
snarfmason has quit [Ping timeout: 252 seconds]
hogeo has joined #ruby-lang
snarfmason has joined #ruby-lang
saarinen has joined #ruby-lang
saarinen has quit [Client Quit]
snarfmason has quit [Quit: Computer has gone to sleep.]
djwonk has quit [Quit: djwonk]
ffio_ has quit [Quit: WeeChat 0.4.0]
roadt has joined #ruby-lang
teleological has joined #ruby-lang
glebm has quit [Quit: Computer has gone to sleep.]
brianpWins has quit [Quit: brianpWins]
<Senjai> joevandyk:
<Senjai> is this a homework question?
<joevandyk> no
<joevandyk> but it doesn't perform well for larger arrays
<joevandyk> larger being 8 or so
catphive has joined #ruby-lang
catphive has quit [Client Quit]
<fowl> z
<joevandyk> i know that for a shipment with 10 items, there could be thousands of different possibilities of ways to pack it
<Senjai> firstly
<Senjai> execute the program with profile
tylersmith has joined #ruby-lang
dankest has quit [Quit: Leaving...]
spuk_ has quit [Ping timeout: 264 seconds]
<Senjai> joevandyk: ruby -r profile test.rb
blaix has joined #ruby-lang
brianpWins has joined #ruby-lang
<Senjai> This will take a while, but it will show you were the slowest parts of your code is
<joevandyk> i see that Array#hash, Array#eql?, Array#sort, and Array#uniq are the slow bits
krohrbaugh has quit [Quit: Leaving.]
<joevandyk> i think the problem is that the algorithm i picked is bad
spuk has joined #ruby-lang
<Senjai> joevandyk: So how can you improve upon that? For larger arrays, each and the loops will be increasingly more intensive
<joevandyk> i need a better algorithm, but i don't know off the top of my head what it would be
tomzx_mac has joined #ruby-lang
jperry has quit [Quit: jperry]
<joevandyk> i really only need this to work with up to 50 elements or so
tylersmith has quit [Ping timeout: 252 seconds]
blaix has quit [Ping timeout: 248 seconds]
<bnagy> joevandyk: you promise it's not a homework problem?
pipework has joined #ruby-lang
<joevandyk> bnagy: i can pay whoever helps me from my company's account if it helps :)
<bnagy> ok then if you google 'knapsack problem' you'll find a ton of approaches
<bnagy> it's NP complete, so it will be slow, whatever you do
<joevandyk> is there an "approximate" fast solution?
rwilcox has quit [Quit: Computer has gone to sleep.]
S1kx has quit [Quit: Leaving]
<Senjai> bnagy too pro
<bnagy> joevandyk: in CS I did it with genetic algorithms
<bnagy> but I doubt that's a good approach IRL
<joevandyk> bnagy: any advice for what would work in real life?
<joevandyk> :)
catphive has joined #ruby-lang
<bnagy> joevandyk: are you reading the wikipedia article yet?
<joevandyk> i do have a couple orders with more than 50 items in them. one apparently with 534.
justinmb_ has joined #ruby-lang
dankest has joined #ruby-lang
ykk` has quit [Quit: ykk`]
<joevandyk> bnagy: yes, making my way through it
fedesilva has quit [Ping timeout: 256 seconds]
<rickhull> joevandyk: to go back to your initial question, you are looking for Array#combination
spuk has quit [Read error: Operation timed out]
<joevandyk> rickhull: you are sure?
benxao has joined #ruby-lang
towski has quit [Remote host closed the connection]
<joevandyk> rickhull: if i have an array of [1,2,3], I'd want [[[1], [2], [3]], [[1, 2], [3]], [[1, 2, 3]], [[1, 3], [2]], [[1], [2, 3]]]
dankest has quit [Quit: Linkinus - http://linkinus.com]
<fowl> lul #ruby-lang best homework channel
<erikh> fowl: not sure why you keep coming back to insult everyone
<fowl> <newb> how do i... <rubyist> o itz easy here's ur one-liner
<fowl> because its fun
<erikh> someone piss in your wheaties or something?
<erikh> oh, ok
<erikh> the ass burgers.
<fowl> yeah i encountered one of zenspiders dsls and came here to lul at his pretentiousness but hes not around
<erikh> yeah, it's pretty pathetic.
<fowl> agreed, im worthless
spuk has joined #ruby-lang
<joevandyk> rickhull: not quite right: [[1, 2], [1, 3], [2, 3]]
spuk has quit [Client Quit]
<rickhull> well, play with it. i think #combination is the tool you are looking for, to start with
charliesome has joined #ruby-lang
<bnagy> >>a=[1,2,3];(1...a.size).map {|i| a.combination(i).to_a}.to_a.flatten(1).map {|c| [c,a-c]}.uniq
<eval-in> bnagy => [[[1], [2, 3]], [[2], [1, 3]], [[3], [1, 2]], [[1, 2], [3]], [[1, 3], [2]], [[2, 3], [1]]] (http://eval.in/31730)
setmeaway has joined #ruby-lang
<bnagy> bleah need to be sorted
<joevandyk> bnagy: well, sorted was just to get rid of the dups
<joevandyk> i.e. [[1,3], 2] and [3,1], 2]
dingus_khan has joined #ruby-lang
<bnagy> (1...a.size).map {|i| a.combination(i).to_a.sort}.to_a.flatten(1).map {|c| [c,a-c].sort}.uniq that looks right-ish
<joevandyk> bnagy: i'm still trying to work through that -- it's missing the case with all of them in separate and all of them in one
<joevandyk> but i could probably just add those
<joevandyk> ah, that one just splits it into a maximum of two packages
<bnagy> oh, yeah you're right
<bnagy> recursion
<bnagy> but even that will be unfeasible on > 10 elems, so I'd give it up
<bnagy> like, that's the NP complete version
<bnagy> get all possible packing solutions and test each one
lsegal has joined #ruby-lang
roadt has quit [Ping timeout: 256 seconds]
<joevandyk> so how do people figure out the cheapest way to ship stuff? right now, i've got a few hand coded rules like "if order weight < 1 pound, ship UPSMI. 1..3 pounds, ship UPS Surepost. >3 pounds, UPS Ground." it doesn't know that if you split up an order into 5 shipments, shipping to a US territory via UPSMI is way cheaper than shipping it in one package via ground.
<joevandyk> i wonder if I could precompute this
roadt has joined #ruby-lang
vbatts|work has quit [Ping timeout: 252 seconds]
rmascarenhas has joined #ruby-lang
teleological has quit [Remote host closed the connection]
nathanstitt has joined #ruby-lang
roadt has quit [Ping timeout: 256 seconds]
roadt has joined #ruby-lang
pr0ton has joined #ruby-lang
catphive has quit [Quit: Leaving.]
vbatts|work has joined #ruby-lang
teleological has joined #ruby-lang
ykk` has joined #ruby-lang
amerine has quit [Ping timeout: 252 seconds]
hashkey has quit [Ping timeout: 260 seconds]
hashkey has joined #ruby-lang
hashkey is now known as Guest99948
fedesilva has joined #ruby-lang
amerine has joined #ruby-lang
justinmb_ has quit [Remote host closed the connection]
blaix has joined #ruby-lang
justinmb_ has joined #ruby-lang
<zzak> yorickpeterse: nice!
blaix has quit [Ping timeout: 256 seconds]
<zzak> injekt: pong
<zzak> probably too early for them
<zzak> bbl
fedesilva has quit [Remote host closed the connection]
pr0ton has quit [Quit: pr0ton]
fedesilva has joined #ruby-lang
Guest99948 is now known as hashkey
teleological has quit [Remote host closed the connection]
amerine has quit [Ping timeout: 248 seconds]
fosky has quit [Ping timeout: 252 seconds]
spuk has joined #ruby-lang
scottschecter has quit [Ping timeout: 256 seconds]
teleological has joined #ruby-lang
justinmb_ has quit [Remote host closed the connection]
Nisstyre has quit [Read error: Connection reset by peer]
Nisstyre has joined #ruby-lang
justinmb_ has joined #ruby-lang
machuga is now known as machuga|away
amerine has joined #ruby-lang
fosky has joined #ruby-lang
io_syl has quit [Ping timeout: 260 seconds]
Senjai has quit [Remote host closed the connection]
woollyams has quit [Quit: Computer has gone to sleep.]
pipework has quit [Remote host closed the connection]
woollyams has joined #ruby-lang
jerrytgarcia has joined #ruby-lang
scottschecter has joined #ruby-lang
pkrnj has quit [Ping timeout: 276 seconds]
jerrytgarcia has quit [Quit: Linkinus - http://linkinus.com]
pkrnj has joined #ruby-lang
dingus_khan has quit [Remote host closed the connection]
pkrnj has quit [Remote host closed the connection]
cordax has joined #ruby-lang
Jungy has quit [Read error: Operation timed out]
cofin has quit [Quit: cofin]
blaix has joined #ruby-lang
cordax has quit [Ping timeout: 252 seconds]
teleological has quit [Remote host closed the connection]
roadt_ has joined #ruby-lang
woollyams has quit [Quit: Computer has gone to sleep.]
ykk` has quit [Quit: ykk`]
roadt has quit [Ping timeout: 252 seconds]
blaix has quit [Ping timeout: 256 seconds]
woollyams has joined #ruby-lang
sush24 has joined #ruby-lang
xxaM has quit [Ping timeout: 256 seconds]
teleological has joined #ruby-lang
xxaM has joined #ruby-lang
Bosox20051 has joined #ruby-lang
io_syl has joined #ruby-lang
teleological has quit [Remote host closed the connection]
woollyams has quit [Quit: Computer has gone to sleep.]
woollyams has joined #ruby-lang
pr0ton has joined #ruby-lang
riffraff has quit [Quit: This computer has gone to sleep]
saarinen has joined #ruby-lang
Asher has quit [Ping timeout: 245 seconds]
Asher has joined #ruby-lang
scottschecter has quit [Ping timeout: 256 seconds]
Nisstyre-laptop has joined #ruby-lang
nathanstitt has quit [Quit: I growing sleepy]
rippa has joined #ruby-lang
woollyams has quit [Quit: Computer has gone to sleep.]
justinmb_ has quit [Remote host closed the connection]
justinmb_ has joined #ruby-lang
woollyams has joined #ruby-lang
krz has joined #ruby-lang
justinmb_ has quit [Remote host closed the connection]
blaix has joined #ruby-lang
dingus_khan has joined #ruby-lang
blaix has quit [Ping timeout: 276 seconds]
Senjai has joined #ruby-lang
Senjai has quit [Changing host]
Senjai has joined #ruby-lang
fedesilva has quit [Remote host closed the connection]
scottschecter has joined #ruby-lang
towski has joined #ruby-lang
sush24 has quit [Quit: This computer has gone to sleep]
mose has joined #ruby-lang
dingus_khan has quit [Remote host closed the connection]
fosky has quit [Ping timeout: 260 seconds]
benxao has quit [Remote host closed the connection]
teleological has joined #ruby-lang
teleological has quit [Ping timeout: 240 seconds]
cordax has joined #ruby-lang
woollyams has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
macmartine has joined #ruby-lang
roadt_ has quit [Read error: Connection reset by peer]
GeissT has quit [Ping timeout: 276 seconds]
macmartine has quit [Read error: Connection reset by peer]
macmartine has joined #ruby-lang
voker57_ has quit [Remote host closed the connection]
voker57 has joined #ruby-lang
voker57 has quit [Changing host]
voker57 has joined #ruby-lang
mistym has quit [Remote host closed the connection]
arubin has quit [Quit: Textual IRC Client: www.textualapp.com]
ritek has left #ruby-lang [#ruby-lang]
blaix has joined #ruby-lang
blaix has quit [Ping timeout: 260 seconds]
apeiros has joined #ruby-lang
tomzx_mac has quit [Ping timeout: 256 seconds]
sush24 has joined #ruby-lang
macmartine has quit [Quit: Computer has gone to sleep.]
DEac-_ has joined #ruby-lang
DEac- has quit [Read error: Connection reset by peer]
Bosox20051 has quit [Ping timeout: 240 seconds]
GeissT has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
woollyams has joined #ruby-lang
dingus_khan has joined #ruby-lang
apeiros has quit [Remote host closed the connection]
rmascarenhas has quit [Ping timeout: 245 seconds]
vlad_starkov has quit [Remote host closed the connection]
vlad_starkov has joined #ruby-lang
dingus_khan has quit [Ping timeout: 252 seconds]
vlad_starkov has quit [Remote host closed the connection]
seoaqua has joined #ruby-lang
rippa has quit [Ping timeout: 240 seconds]
towski has quit [Remote host closed the connection]
justinmb_ has joined #ruby-lang
ia___ has joined #ruby-lang
justinmb_ has quit [Remote host closed the connection]
riffraff has joined #ruby-lang
rippa has joined #ruby-lang
noop has joined #ruby-lang
tylersmith has joined #ruby-lang
dingus_khan has joined #ruby-lang
fosky has joined #ruby-lang
robbyoconnor has joined #ruby-lang
pipework has joined #ruby-lang
blaix has joined #ruby-lang
robbyoconnor has quit [Remote host closed the connection]
blaix has quit [Ping timeout: 248 seconds]
stardiviner_ has quit [Ping timeout: 245 seconds]
ffio has joined #ruby-lang
stardiviner has joined #ruby-lang
tonni has quit [Remote host closed the connection]
<dingus_khan> what are people's thoughts on project euler as a means to becoming a better ruby programmer?
hogeo has quit [Remote host closed the connection]
hogeo has joined #ruby-lang
<bnagy> it's ok for tactical programming
tonni has joined #ruby-lang
hogeo has quit [Remote host closed the connection]
workmad3 has joined #ruby-lang
rippa has quit [Ping timeout: 240 seconds]
PaulePanter has joined #ruby-lang
<PaulePanter> whitequark: Hi. Thanks for that nice parser gem!
<PaulePanter> … and your blog posts.
<PaulePanter> Any idea, why the require (and comments) cause problems as reported in https://github.com/whitequark/parser/issues/57 ?
mytrile has joined #ruby-lang
workmad3 has quit [Read error: Operation timed out]
AgentWillyWonka has joined #ruby-lang
benlovell has joined #ruby-lang
<PaulePanter> whitequark: No. It seems to be the CLRFs at the end.
<AgentWillyWonka> What's the difference between this channel and #ruby
mdedetrich has quit [Quit: Computer has gone to sleep.]
<fowl> this one is more pretentious, a lot of big names hang out in here
benxao has joined #ruby-lang
<fowl> and #ruby is unofficial
vlad_starkov has joined #ruby-lang
buzzybron has joined #ruby-lang
cordax has quit [Quit: Computer has gone to sleep.]
dfdf has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 252 seconds]
<AgentWillyWonka> sorry jumped away from this fowl - serious answer?
<AgentWillyWonka> or should I say is that the "official" answer :)
<fowl> i represent myself alone and i will never retract that statement
<AgentWillyWonka> lol
<AgentWillyWonka> ok so fowl is on record
apeiros has joined #ruby-lang
vlad_starkov has joined #ruby-lang
Cakey has joined #ruby-lang
sush24 has quit [Ping timeout: 252 seconds]
vlad_starkov has quit [Ping timeout: 245 seconds]
tonni has quit [Ping timeout: 252 seconds]
tonni has joined #ruby-lang
JohnBat26 has joined #ruby-lang
dr_bob has joined #ruby-lang
solars has joined #ruby-lang
Senjai has quit [Ping timeout: 256 seconds]
strmpnk has quit [Ping timeout: 256 seconds]
mdedetrich has joined #ruby-lang
strmpnk has joined #ruby-lang
dkam has quit [Quit: dkam]
blaix has joined #ruby-lang
blaix has quit [Ping timeout: 252 seconds]
dingus_khan has quit [Remote host closed the connection]
Criztian has joined #ruby-lang
dingus_khan has joined #ruby-lang
dfdf has quit [Remote host closed the connection]
pipework has quit [Remote host closed the connection]
dhruvasagar has joined #ruby-lang
mdedetrich has quit [Ping timeout: 276 seconds]
achiu has quit [Quit: WeeChat 0.4.0]
mdedetrich has joined #ruby-lang
havenwood has quit [Remote host closed the connection]
charliesome_ has joined #ruby-lang
tbuehlmann has joined #ruby-lang
rolfb has joined #ruby-lang
charliesome has quit [Disconnected by services]
charliesome_ is now known as charliesome
mdedetrich has quit [Quit: Computer has gone to sleep.]
saarinen has quit [Quit: saarinen]
achiu has joined #ruby-lang
Cakey has quit [Ping timeout: 252 seconds]
dingus_khan has quit [Remote host closed the connection]
tonni has quit [Remote host closed the connection]
lsegal has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
dingus_khan has joined #ruby-lang
vlad_starkov has joined #ruby-lang
judofyr has joined #ruby-lang
ikrima has quit [Read error: Connection reset by peer]
gnufied has joined #ruby-lang
workmad3 has joined #ruby-lang
<injekt> zzak: :D
<injekt> zzak: cat all the things
tonni has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 256 seconds]
ikrima has joined #ruby-lang
dfdf has joined #ruby-lang
woollyams has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<yorickpeterse> morning
<yorickpeterse> zzak: lol, my cat already wrecked the toy
fosky has quit [Remote host closed the connection]
barttenbrinke has joined #ruby-lang
hogeo has joined #ruby-lang
stamina has joined #ruby-lang
blaix1 has joined #ruby-lang
tylersmith has quit [Ping timeout: 264 seconds]
blaix1 has quit [Ping timeout: 245 seconds]
dingus_khan has quit [Remote host closed the connection]
tylersmith has joined #ruby-lang
ykk` has joined #ruby-lang
blaix has joined #ruby-lang
S1kx has joined #ruby-lang
S1kx has joined #ruby-lang
mbj has joined #ruby-lang
ykk` has quit [Quit: ykk`]
jbsan has joined #ruby-lang
Johz has joined #ruby-lang
mucker has quit [Quit: leaving]
Guest13894 has quit [Remote host closed the connection]
jsullivandigs has joined #ruby-lang
noop has quit [Ping timeout: 260 seconds]
mbj has quit [Ping timeout: 256 seconds]
workmad3 has quit [Quit: Lost terminal]
snarfmason has joined #ruby-lang
jsullivandigs has quit [Ping timeout: 264 seconds]
benlovell has quit [Ping timeout: 245 seconds]
workmad3 has joined #ruby-lang
dingus_khan has joined #ruby-lang
dingus_khan has quit [Remote host closed the connection]
Nisstyre has quit [Quit: Leaving]
henrikhodne has joined #ruby-lang
hakunin_ has joined #ruby-lang
Kabaka has quit [Excess Flood]
hakunin has quit [Read error: Connection reset by peer]
benlovell has joined #ruby-lang
Kabaka has joined #ruby-lang
Nisstyre-laptop has quit [Quit: Leaving]
<yorickpeterse> zzak: also, if you have time and want to check out some wack, go here: http://www.ooedoonsen.jp/higaeri/english/
<yorickpeterse> * something]
henrikhodne has quit [Quit: Computer has gone to sleep.]
marr has joined #ruby-lang
ikrima has quit [Quit: Computer has gone to sleep.]
vlad_starkov has joined #ruby-lang
sirfilip has joined #ruby-lang
<sirfilip> morning
noop has joined #ruby-lang
kn0tsel has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 256 seconds]
dfdf has quit [Ping timeout: 245 seconds]
crudson has quit [Read error: Connection reset by peer]
jbsan has quit [Quit: jbsan]
toretore has joined #ruby-lang
ruurd has joined #ruby-lang
mbj has joined #ruby-lang
elia has joined #ruby-lang
elia has quit [Ping timeout: 252 seconds]
dingus_khan has joined #ruby-lang
crudson has joined #ruby-lang
mikewintermute has joined #ruby-lang
dingus_khan has quit [Ping timeout: 248 seconds]
snafoo has joined #ruby-lang
elia has joined #ruby-lang
ikrima has joined #ruby-lang
tomzx_mac has joined #ruby-lang
riffraff has quit [Quit: Leaving]
elia has quit [Ping timeout: 252 seconds]
beho has joined #ruby-lang
beho has quit [Remote host closed the connection]
krombr has joined #ruby-lang
GarethAdams has joined #ruby-lang
<injekt> moin
benxao has quit [Remote host closed the connection]
kn0tsel has quit [Remote host closed the connection]
krombr has quit [Remote host closed the connection]
elia has joined #ruby-lang
<whitequark> PaulePanter: hm
<whitequark> lemme see
ffio has quit [Quit: WeeChat 0.4.0]
<PaulePanter> whitequark: Hi. Thanks again for parser.
<PaulePanter> whitequark: When running dos2unix over them, it seems to work now.
<yorickpeterse> whitequark: quick dirty fix: find replace all \r\n with \n before parsing
<PaulePanter> whitequark: I am thinking about using parser to convert/transform a ruby file with lots of PDF commands from Prawn to a new format, or just extract the coordinates.
<whitequark> yorickpeterse: I do that
<whitequark> yorickpeterse: aaaand it screws up source maps
<PaulePanter> yorickpeterse, whitequark: I read, that File.Open("…").read should take care of the conversion.
<whitequark> PaulePanter: you can also use parser 2.0.0.beta3
<yorickpeterse> whitequark: hm
<whitequark> but then replace all `node.src' with `node.loc' in the rewriter script
<whitequark> there are a few more changes. https://github.com/whitequark/parser/issues/51
<whitequark> PaulePanter: btw
<whitequark> you'd be better off patching Prawn to output the file in whatever format you like.
<PaulePanter> whitequark: I am new to Ruby. So let me think about that.
barttenbrinke has quit [Remote host closed the connection]
dhruvasagar has quit [Ping timeout: 245 seconds]
<PaulePanter> whitequark: `gem install` got 1.4.0. Any hint how I can get the beta version?
<yorickpeterse> gem install --prerelease
<yorickpeterse> or `gem install parser -v 2.0.0.beta3`
snarfmason has quit [Ping timeout: 260 seconds]
<PaulePanter> yorickpeterse: Thanks!
dhruvasagar has joined #ruby-lang
_elia has joined #ruby-lang
elia has quit [Read error: Connection reset by peer]
skade has joined #ruby-lang
<PaulePanter> whitequark: Wow. Such a quick solution. Awesome and thanks.
<judofyr> PaulePanter: your new to Ruby and already working on the AST? nice!
<injekt> you're
<injekt> </>
<judofyr> fakk
<judofyr> you're*
<injekt> also eager load all the things \o/
stardiviner has quit [Remote host closed the connection]
<judofyr> .eager(:all)
<whitequark> judofyr: he could have learned ASTs in another language, you know ;)
<whitequark> C# has pretty neat tricks with LINQ
<injekt> I wish I was using sequel
pskosinski has joined #ruby-lang
<PaulePanter> I feel, I am in a little over my head. Let’s see how it goes.
<whitequark> injekt: sequel's "DSL" is a hilarious parody of linq
<whitequark> it leaks all over the place. meh.
<whitequark> I'd rather use activerecord.
<injekt> I dont see how sequel is comparable to linq vs AR not being so
<injekt> I mean, I don't mind AR (arel is a pita for advanced stuff), but I'm so much more used to Sequel. I prefer writing SQL anyway, to be honest
<whitequark> injekt: I was only talking about their DSLs, or lack thereof
<whitequark> as in, I would rather not use any kind of language-integrated DSL as opposed to a broken one.
<injekt> whitequark: ah, I think it's a hard problem to solve, and gets messy very quick
<whitequark> injekt: it's not
<whitequark> if your language is not ruby.
<whitequark> it's rather simple in C#, as the parser just has a bunch of new keywords
<whitequark> and when they're used, the "value" of the expression is not a value, but an AST
ij has joined #ruby-lang
<whitequark> (I'm skimming over quite a bit of details)
teleological has joined #ruby-lang
<whitequark> however, I don't see how Ruby's grammar could be extended in a meaningful way to add something LINQ-like
<canton7> C# expressions are pretty awesome
<whitequark> one way to achieve it would be to standardize an AST format and mandate Proc#to_ast in the standard
<whitequark> I guess this is the "Ruby way", something that would have even a slim chance of approval by matz
<whitequark> however, I don't see this happening any time soon.
vlad_starkov has joined #ruby-lang
barttenbrinke has joined #ruby-lang
fowl has left #ruby-lang ["Leaving"]
<PaulePanter> whitequark: Could you please elaborate on patching Prawn?
<PaulePanter> The above is an excerpt from a much bigger file.
<whitequark> judofyr: this is sad
<judofyr> whitequark: what part?
<judofyr> whitequark: I think it's mostly sad that I never got anything done on it :(
<PaulePanter> The plan is to find out the attribute and the coordinates automatically.
noop has quit [Ping timeout: 252 seconds]
<PaulePanter> I wanted `ruby-rewrite.rb` as a template and start from there.
vlad_starkov has quit [Ping timeout: 260 seconds]
ij has left #ruby-lang ["WeeChat 0.3.9.2"]
<judofyr> whitequark: re: Sequel: I find Sequel to be practically better. SQL isn't relational algebra, and I find it awkward to work with the ARel abstraction.
<whitequark> judofyr: it's sad that there is no agreement over *whether ASTs should be included in the language*
<whitequark> even
<whitequark> there's grammar, therefore they should be.
<yorickpeterse> "Nothing wrong with your code as far as I can see.
<yorickpeterse> Reboot your PC and try again. Maybe something is messing with your development environment and preventing your server from using your latest code. "
<yorickpeterse> hahaha
<whitequark> PaulePanter: where exactly did you get that file from, and what do you want to do with it?
<whitequark> judofyr: (sequel) maybe. I was only talking about DSLs.
<judofyr> ah
<whitequark> I personally don't find ARel awkward, however, I do find that blending AR and ARel is.
<PaulePanter> whitequark: The file is from a former project and has all the values hardcoded in it.
<whitequark> PaulePanter: ah, so it is handwritten
<PaulePanter> whitequark: The creation should be done automatically now.
<PaulePanter> whitequark: Yes, unfortunately written by hand.
<whitequark> then you are indeed better off extracting the values with parser
<whitequark> if you're going to do it once (I hope)
<whitequark> judofyr: it's also true that the best solution is Proc#source
<whitequark> because optimizing implementations already don't store ASTs (that is silly)
<whitequark> V8, for example, *only* stores machine code
<PaulePanter> Reading the doc and you example, I could not find, how I would check for a command(?) expression, like `pdf.text`. I only found `on_if`, `on_case` and so on.
<judofyr> true
<judofyr> PaulePanter: on_send
<whitequark> PaulePanter: that would be (send (send nil :pdf) :text ..)
<PaulePanter> Ah. Thanks.
<judofyr> whitequark: still, then Proc#to_ast should just use #source internally
<judofyr> using the Ruby's parser
<whitequark> judofyr: Proc#to_ast should be provided by a pure-Ruby, vendored gem
<whitequark> headius is right: hooking stuff to the ruby's parser is a) complex b) requires constant maintenance
<whitequark> even in the case of a self-hosted implementation
<whitequark> besides, it doesn't provide you with significant advantages
kirin` has quit [Ping timeout: 248 seconds]
<whitequark> ruby's parsers are optimized first and foremost for speed
<judofyr> whitequark: yeah, I think `parser` has made my initial request obsolete
<judofyr> whitequark: and there's already this: https://github.com/banister/method_source
<whitequark> judofyr: def a; end; def b; en
<whitequark> it breaks.
adambeynon has joined #ruby-lang
<judofyr> whitequark: does MRI even store the column somewhere?
vlad_starkov has joined #ruby-lang
<whitequark> judofyr: no
<whitequark> parse.y doesn't record it afaik
<judofyr> whitequark: I'm not touching parse.y, so I guess this is the best we can do (method_source + parser)
kirin` has joined #ruby-lang
vlad_sta_ has joined #ruby-lang
<whitequark> judofyr: neither do rbx's parser and jruby's parser
vlad_st__ has joined #ruby-lang
<whitequark> because they are basically parse.y.
<judofyr> whitequark: I think the current situation (parser + method_source) is just fie
<judofyr> fine
vlad_starkov has quit [Ping timeout: 248 seconds]
mdedetrich has joined #ruby-lang
noop has joined #ruby-lang
vlad_sta_ has quit [Ping timeout: 252 seconds]
<whitequark> judofyr: it can't be used for any practical work
<whitequark> but it's rather hard to improve.
<judofyr> whitequark: define practical?
<whitequark> judofyr: anything except toys.
<whitequark> it breaks on: generated code. code written in a REPL. code which includes chains like .map{}.reduce{}.
freedrull has joined #ruby-lang
henrikhodne has joined #ruby-lang
blaix has quit [Quit: Leaving.]
<charliesome> whitequark, judofyr: you could rip an AST out of the bytecode
<whitequark> charliesome: no
<charliesome> whitequark: i've done a proof of concept type thing before, it works surprisingly well
<whitequark> it's an irreversible process
<whitequark> "surprisingly well" is not enough
<charliesome> compiling an AST to bytecode is slightly lossy
<whitequark> you either have the AST back, or you don't.
<charliesome> but you can get decent results going the other way
<charliesome> you have an expression tree somewhat resembling the original AST
<charliesome> which is often all you need
<whitequark> charliesome: I'm well aware of which can be done. I wrote a deobfuscating decompiler
ldnunes has joined #ruby-lang
<whitequark> however, it doesn't get you an AST. it gives you, well, some tree
<whitequark> in some cases
jxie has quit [Quit: leaving]
<charliesome> yeah but in most cases all you need is 'some tree'
<whitequark> (you'd have a hard time guaranteeing that every possible bytecode combination can be decompiled)
<whitequark> charliesome: I hardly agree
<whitequark> the simplest thing of all, displaying the source, requires proper AST
<whitequark> not even taking into account that the bytecode is undocumented MRI implementation detail and is subject to change without notice
<charliesome> you could implement some amazing DSLs with the "some tree" you get
<charliesome> especially when you consider Proc#binding
<judofyr> whitequark: generated code is a biggie
<whitequark> charliesome: ... which won't work on rbx/jruby
<whitequark> I have no need in such "amazing" DSLs.
<charliesome> whitequark: sure but that doesn't concern me as much
<whitequark> oh and Proc#binding is going to be removed as well
<whitequark> even from MRI ;)
<charliesome> :(
<charliesome> going to be, or proposed?
mdedetrich has quit [Ping timeout: 248 seconds]
<whitequark> (doesn't concern you as much) then please don't promote this non-solution to the Ruby community, or at least explicitly mark it as MRI-specific, and MRI-version-specific.
<whitequark> charliesome: (binding) I think there's a consensus that it should be removed.
<whitequark> mri folks agreed
<charliesome> ah bummer
<charliesome> that sucks
<whitequark> it doesn't
<whitequark> Proc#binding kills performance
<whitequark> (apart from breaking encapsulation)
<charliesome> i'm well aware that Proc#binding kills a lot of potential optimizations
<judofyr> charliesome: oh btw: I was thinking about writing a Minitest runner in the browser. and using something like better_errors to present a REPL at every error. would I be able to use better_errors' code?
<charliesome> judofyr: it's MIT licensed, i can't stop you ;)
<judofyr> charliesome: well, I meant more like if I could use it as a library
<charliesome> you have my full blessing though
<judofyr> present_repl_for(binding)
sush24 has joined #ruby-lang
<charliesome> present_repl_for {}
krz has quit [Quit: krz]
blaix has joined #ruby-lang
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
yalue has joined #ruby-lang
machuga|away is now known as machuga
ffio has joined #ruby-lang
ffio has quit [Client Quit]
rmascarenhas has joined #ruby-lang
charliesome has quit [Read error: Connection reset by peer]
cored has joined #ruby-lang
cored has joined #ruby-lang
cored has quit [Changing host]
cored has quit [Client Quit]
cored has joined #ruby-lang
cored has quit [Changing host]
cored has joined #ruby-lang
noop has quit [Ping timeout: 252 seconds]
tonni has quit [Remote host closed the connection]
charliesome has joined #ruby-lang
<yorickpeterse> charliesome: what's your obsession with these weird MRI only features anyway?
<charliesome> yorickpeterse: tis fun
<apeiros> charliesome: feature request - can you use -> instead of => for stdout output in eval-in?
<charliesome> apeiros: how come?
<apeiros> make it easy to distinguish whether something is just a return value or output
<charliesome> in fact why don't i just get rid of that thing completely
<apeiros> eval-in?
<whitequark> =>?
<charliesome> nah the =>
rmascarenhas has quit [Ping timeout: 248 seconds]
<whitequark> charliesome: you have a strange definition of fun
rsl has joined #ruby-lang
glebm has joined #ruby-lang
noop has joined #ruby-lang
closer has quit [Ping timeout: 256 seconds]
closer has joined #ruby-lang
_elia has quit [Read error: Connection reset by peer]
elia has joined #ruby-lang
Jungy has joined #ruby-lang
<charliesome> woah TIL that case statements in MRI can dispatch in almost constant time
tonni has joined #ruby-lang
<whitequark> opt_case?
<charliesome> opt_case_dispatch, but yeah
<yorickpeterse> God damn it, there are a lot of people that have proposals for me these days
<charliesome> uses a hash table
<whitequark> every stack VM looks the same :]
<yorickpeterse> lol, this is just it: http://is.gd/9SWrc1
<yorickpeterse> looks totally legit
glebm has quit [Quit: Computer has gone to sleep.]
<yorickpeterse> wait what the hell, it doesn't have a To: address
noop has quit [Ping timeout: 276 seconds]
jperry has joined #ruby-lang
jperry has quit [Client Quit]
dr_bob has quit [Quit: Leaving.]
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
sush24 has quit [Quit: This computer has gone to sleep]
mdedetrich has joined #ruby-lang
dr_bob has joined #ruby-lang
AgentWillyWonka has quit [Quit: Linkinus - http://linkinus.com]
elia has quit [Ping timeout: 252 seconds]
elia has joined #ruby-lang
noop has joined #ruby-lang
scampbell has joined #ruby-lang
ykk` has joined #ruby-lang
_elia has joined #ruby-lang
buzzybron has quit [Ping timeout: 252 seconds]
elia has quit [Ping timeout: 248 seconds]
<sirfilip> jruby
rmascarenhas has joined #ruby-lang
<yorickpeterse> wat
<sirfilip> nothing yorickpeterse just felt the urge to say it out loud
<injekt> I wish people wouldn't take advantage for optional [] on array assignments
<apeiros> ?
<injekt> foo = "one", "two", "etc" is annoying when quickly scanning code
<apeiros> ah
<apeiros> agreed
<apeiros> I only do it in pry/irb
<injekt> yeah
<apeiros> in normal code I'm explicit
<apeiros> I find ruby's autosplat a bad idea anyway :-/
<injekt> agreed
<apeiros> at least I found out that `x,* = *foo` is valid :D
<erikh> hello
<erikh> >> puts "hi"
<eval-in> erikh => hi ... (http://eval.in/31761)
<ykk`> how is that valid apeiros? just typed it in the shell
postmodern has quit [Quit: Leaving]
<whitequark> >> a = "b", "c"
<eval-in> whitequark => ["b", "c"] (http://eval.in/31762)
<whitequark> >> x, * = *[]
<eval-in> whitequark => [] (http://eval.in/31763)
adambeynon has joined #ruby-lang
<whitequark> ykk`: ^
<apeiros> >> a,* = *[1,2,3]; a
<eval-in> apeiros => 1 (http://eval.in/31764)
<judofyr> * = *
<apeiros> heh
<erikh> emoji
<ykk`> whitequark: x==(_)==x
<erikh> ykk`: there's actually a pattern in perl that looks similar tot hat.
<erikh> called the "goatse operator"
<erikh> =()=
<ykk`> omg gross
<erikh> hah yes.
<whitequark> erikh: why do you like it so much
<erikh> because it's goatse
<ykk`> in high school googling goats = butthole
<yorickpeterse> nice feature of perl: the yadya operator
<ykk`> err goats or whatev
<yorickpeterse> e.g. derp(...)
<yorickpeterse> err, yada yada apparently
<erikh> wat
<erikh> ... is just a range
<ykk`> you men are pervie
<erikh> ykk`: welcome to the internet?
<yorickpeterse> erikh: neg, in Perl it can be used for function prototypes
<ykk`> lol
<apeiros> :D
<yorickpeterse> something like `sub foo(...) { }` from what I remember
<yorickpeterse> (as in, the actual "...")
<erikh> yorickpeterse: you don't need it
<erikh> sub foo { } # equivalent
<ykk`> i give you x-wing you give me butt.. don't think one fits in the other
<yorickpeterse> erikh: neg, I believe using the yada makes it throw an error
<erikh> oh?
<apeiros> ykk`: nah, goatse could probably fit the x-wing easily…
<yorickpeterse> ykk`: depends on teh size of the x-wing
<ykk`> hahah
<erikh> yorickpeterse: gonna ask a friend
<yorickpeterse> or the butt
<yorickpeterse> erikh: http://eval.in/31766
<injekt> ... in perl is an ellipsis statement (or the range/flip-flop) you can use it whenever you havent implemented something
<injekt> {...} is valid perl for example
<whitequark> injekt: as if there isn't a sequence of non-alphanumerics which is NOT valid perl
<injekt> as is ...; iirc
<injekt> whitequark: :P
<whitequark> s,isn't,is,
mucker has joined #ruby-lang
<erikh> heh
<erikh> @apeiron | one breaks your code, the other doesn't
<erikh> that's what my friend says.
<yorickpeterse> like I said
<yorickpeterse> yorickpeterse | erikh: neg, I believe using the yada makes it throw an error
Cakey has joined #ruby-lang
<apeiros> erikh: was that aimed at me?
<injekt> I have a weird fetish for perl
<apeiros> that's a pleonasm
<erikh> apeiros: no, you are apeiros, that is apeiron
<erikh> welcome to my life.
barttenbrinke has quit [Remote host closed the connection]
<erikh> where I have two irc friends that literally differ by the tense of a greek term
<apeiros> ^^
<apeiros> his gender is undefined.
<yorickpeterse> you just defined it
<apeiros> its gender is undefined.
<erikh> ha
<whitequark> undefined is not a gender
<erikh> it's a vertical line IIRC
breakingthings has joined #ruby-lang
<yorickpeterse> apeiros: just as "they" already
<erikh> anyhow, time to swap trains, back later.
<yorickpeterse> * use
<whitequark> template<class T> swap<train>(train &a, train &b);
<apeiros> them gender is undefined
<whitequark> (or was it template<>?..)
<yorickpeterse> whitequark: you need halp
crankharder has quit [Quit: leaving]
crankharder has joined #ruby-lang
<workmad3> mmm, C++ templates :)
* crankharder wonders if that went through or not
<crankharder> can I delegate all the things to something else? e.g. "delegate *, :to => :foobar" -- obviously splat doesn't work
tonni has quit [Ping timeout: 240 seconds]
wallerdev has joined #ruby-lang
machuga is now known as machuga|away
wmoxam has joined #ruby-lang
machuga|away has quit [Excess Flood]
<whitequark> crankharder: just use method_missing
machuga has joined #ruby-lang
<injekt> crankharder: no, use method_missing
<whitequark> workmad3: tasty?
<injekt> heh
<erikh> delegateclass?
<erikh> sorry
<injekt> delegateass
<injekt> im not sorry
<erikh> class Foo < DelegateClass(InjektIsAPooHead)
<injekt> erikh: NO U R
<erikh> hahah
<injekt> erikh: how's your first week been btw?
<erikh> good.
<injekt> sweet
<erikh> commute sucks
<injekt> ouch, how long?
<injekt> I refused to commute because I believe I wouldn't be able to stick with it
<erikh> around 3h round trip
<injekt> I dont have that kind of patience :(
<injekt> heh that sucks
<injekt> do you have to leave early?
<erikh> nah
<erikh> just woke up early today
<injekt> that's not so bad
<injekt> the mornings wouldn't bother me, getting home late would, though
<erikh> i get there around 10am
<erikh> yeah, that and that most of my coworkers live in the city
<erikh> refuse to pay $2.5k a month for a studio apt
jperry has joined #ruby-lang
<injekt> do you save much money? I mean, living further with $ weighted towards the city?
<injekt> right, exactly
benxao has joined #ruby-lang
<injekt> I'm the same (with the new job, anyway) I get to stay at home though
<injekt> mostly
* apeiros loves his ~20min/trip
<apeiros> 25min by bike
<erikh> not atm. will when i move
<erikh> big place currently, bigger than we need
<erikh> yeah, london right? 'spensive
<erikh> brb
<injekt> yeah
tonni has joined #ruby-lang
ffio has joined #ruby-lang
cofin has joined #ruby-lang
ffio has quit [Client Quit]
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
dhruvasagar has quit [Ping timeout: 264 seconds]
<ykk`> bleh, all the documentation resources that peter cooper has in his book are out of date
<ykk`> ruby brain is nonexistent and all the mailing lists are archived
<ykk`> at least i got you guys =P
<ykk`> and an api
<workmad3> ykk`: dead-tree books tend to get like that
dfdf has joined #ruby-lang
<ykk`> is dead-tree a publisher or a nickname for a type of book
<GarethAdams> ykk`: any book made of dead trees
mistym has quit [Remote host closed the connection]
<GarethAdams> i.e. not an electronic one
<ykk`> well its a pdf i downloaded, i'll check the electronic one on my kindle now… maybe the resources are diff
<injekt> peter hasn't updated that book just fyi
<injekt> so that probably wouldn't help
<ykk`> yeah it is diff then the pdf but still has a broken link. no biggie
<injekt> fwiw you can find similar worthwhile content online still, just takes more digging
northelks has quit [Read error: Connection reset by peer]
skade has quit [Quit: Computer has gone to sleep.]
<erikh> where did cooper vanish to?
<injekt> he's still around
cofin has quit [Quit: cofin]
<erikh> cool
<erikh> maybe since i'm no longer on twitter i'm missing a lot
<injekt> you're not
<erikh> ha
cofin has joined #ruby-lang
<erikh> need to do more with go atm
<injekt> are you using it at work at all?
<erikh> have several ideas, no time
tonni has quit [Remote host closed the connection]
<erikh> not yet, looking for the appropriate excuse
<injekt> :D
<erikh> might build a load tester.
<erikh> work specific
teleological has quit [Remote host closed the connection]
northelks has joined #ruby-lang
glebm has joined #ruby-lang
blaix has quit [Quit: Leaving.]
mbj_ has joined #ruby-lang
<ykk`> well rubyist is gone lol
mbj has quit [Ping timeout: 248 seconds]
henrikhodne has quit [Quit: Computer has gone to sleep.]
tocki has joined #ruby-lang
<matti> erikh: Having fun in Japan?
<matti> Oh, is that drbrain ...
<injekt> he's not in japan
<matti> Yeah, sorry. drbrain is.
<injekt> yes drbrain and anyone else at kaigi :)
<matti> zzak is too.
<injekt> yup
<matti> There is a nice sushi place in Ginza.
<matti> Ah, I miss Japan.
tocki has quit [Client Quit]
teleological has joined #ruby-lang
carloslopes has joined #ruby-lang
<yorickpeterse> :<<<
kirune77 has joined #ruby-lang
kirune77 has left #ruby-lang [#ruby-lang]
<yorickpeterse> probably the perfect country would be a mix of Japan, South Korea and NL
<yorickpeterse> at least for me
<yorickpeterse> Handsome men/women, decent laws/rights, awesome tech, awesome food
<yorickpeterse> nice architecture (well most of it)
mbj_ is now known as mbj
<injekt> i like handsome women
<yorickpeterse> pick your style: if you like plastic surgery or faces with strong angles, go south korea
<yorickpeterse> if you like round young looking faces, go Japan
<yorickpeterse> (ofc I'm generalizing here)
<ykk`> why can't a round face be plastic surgery
<ykk`> hrmmm?
dfdf has quit [Remote host closed the connection]
fys has joined #ruby-lang
<yorickpeterse> it can
<yorickpeterse> but plastic surgery is almost a trend in SK sadly
<yorickpeterse> from my little experience in Japan it's less the case over there, but I could be wrong
rwilcox has joined #ruby-lang
allan_farrell has joined #ruby-lang
Jungy has quit [Ping timeout: 256 seconds]
vlad_st__ has quit [Remote host closed the connection]
vlad_starkov has joined #ruby-lang
pipework has joined #ruby-lang
rsl has quit [Quit: Computer has gone to sleep.]
rsl has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 248 seconds]
apeiros has quit [Remote host closed the connection]
henrikhodne has joined #ruby-lang
roadkith has joined #ruby-lang
<ykk`> hey if i were to look for a company that hires noob developers and pay for their CS degree how would I go about that? any ideas?
snarfmason has joined #ruby-lang
<injekt> ykk`: for writing ruby?
<ykk`> yes
<injekt> rails?
<ykk`> yeah either
<ykk`> it's all beautiful to me
<injekt> have you done any rails?
<whitequark> ykk`: why do you need a CS degree then.
<injekt> ^
<ykk`> no not yet, bridging myself from intermediate to pro with Ruby right now
<ykk`> then i'll tackle ror
<fys> Anyone know how to check XML version w/ REXML?
<injekt> if I hired you for a rails job I would not want to pay for your cs degree because I dont think I would get enough out of it
<yorickpeterse> ykk`: no company is going to pay for your entire degree
<whitequark> also: country?
<ykk`> USA
GeissT has quit [Quit: MillBroChat AdIRC User]
<fys> Paying for a degree is very very very expensive and a huge investment in someone, these days you're lucky for a company to relocate you on the cheap.
<ykk`> from a business perspective i can understand that injekt and i would still be happy to do it
<bougyman> ykk`: i think your initial premise is flawed.
<yorickpeterse> don't count on it happening unless you're the next Dennis richie
<bougyman> That is, it presumes that getting a CS degree would be advantageous to your career.
<injekt> ^
<bougyman> That is often not the result.
<injekt> this
wallerdev has quit [Quit: wallerdev]
<bougyman> In fact I've never hired anyone with a CS degree, in 20 years of IS/IT management.
<ykk`> correct but i'm in NYC and reading craigslist now I need like 2-5 years programming experience for a good job… I don't know but thinking of a CS degree would help with that experience maybe? but I hear its not necessary
<ykk`> wow
<ykk`> really?
<bougyman> No, it wouldn't help one bit.
<bougyman> really. I've hired a few CompE's
<yorickpeterse> it helps in very specific areas
<ykk`> well that saves me money
<yorickpeterse> e.g. if you're doing programming for banks it probably helps if you've done a related education
<ykk`> tbh
<wmoxam> take a CS degree if you are interested in CS
<ykk`> i want to work on a team of people that i can learn from and be happy coding
<bougyman> If you want to get a programming job, start programming.
<bougyman> Nothing is better on your resume than a body of work.
<ykk`> yeah bougyman you're right
<yorickpeterse> ykk`: do some open sores, go to meetups, start there
rolfb has quit [Quit: Linkinus - http://linkinus.com]
<ykk`> yeah i've been to female coder meet ups those are pretty awesome
<ykk`> well my plan of action is to finish up this book and code 1 program a week on my github and look for an entry level position
<fys> Degrees are fast approaching a point of being completely optional.
<ykk`> i am going to start applying august after a surgery in july
<fys> In fact, almost all the jobs I've had have asked for a degree.
<fys> I have 'some college' and it was for art.
<ykk`> gives me enough time to rock out this peter cooper book
<yorickpeterse> ykk`: what's your experience level?
<injekt> I have nothing and I co-own a company
<wmoxam> degree is totally optional
<injekt> im a carpenter
<fys> injekt: I envy you.
roadkith has quit [Quit: Linkinus - http://linkinus.com]
<fys> lol
<ykk`> i'm 33 and was born in front of a computer :P not new to computers at all but am new to coding. Started a few months ago but i'm learning real quick
<injekt> fys: why?
<wmoxam> but it doesn't make a degree pointless
<fys> injekt: I wish computers were a hobby still.
<ykk`> after chris pines book i was writing web scrapers and now stepping up my game and really learning ruby on a pro level. i read each chapter like 5 times over
<injekt> fys: they're not a hobby for me I own a tech company, I just meant I trained as a carpenter :P
<wmoxam> fys: why?
<yorickpeterse> injekt: yeah, you also have an empty office with a black leather couch in it
scottschecter has quit [Ping timeout: 252 seconds]
<injekt> yorickpeterse: ;-)
<fys> injekt: Ah, gotcha.
<ykk`> inject i've seen your company
<fys> wmoxam: Ever since I've been an engineer for hire, I come home and work on engines.
<injekt> casting couch inc?
<fys> ive seen those videos
<yorickpeterse> injekt: http://imgur.com/gallery/A6nmz this one
<fys> ..
<fys> nm
<yorickpeterse> I like it how that was the first result of "anybody recognize this couch"
<injekt> lol
<fys> :D
<yorickpeterse> only 2000s kids will get this
<yorickpeterse> lelelelelel uptokes
<ykk`> injekt: where is your company located
<fys> the cloud
* fys snickers
vbatts|work has quit [Ping timeout: 256 seconds]
rsl has quit [Read error: Connection reset by peer]
<injekt> heh you're not too wrong, everywhere, but canada mostly
rsl has joined #ruby-lang
<fys> If I could get a desktop support idiot to join my company I could probably stop coming into the office.
<yorickpeterse> also related http://i.imgur.com/V4m3W.jpg
<yorickpeterse> ok I'm done
<fys> yorickpeterse: haha, that's turrible.
<yorickpeterse> you can tell fys knows what I'm talking about
<yorickpeterse> giggity
<fys> :D
<ykk`> ok so that still doesn't answer how i could find an employer willing to take on a newbie. even after i got some programs on my github… how would i put myself out there?
<erikh> helo again
<ykk`> hail
<wmoxam> ykk`: start applying to jobs?
<wmoxam> :p
<yorickpeterse> ykk`: by just asking
rippa has joined #ruby-lang
<ykk`> pffft, i want them to find me hahaha
<erikh> not gonna happen
<injekt> ykk`: do you have a github profile yet?
<yorickpeterse> go to meetups, get to know them, just flat out ask them
<crankharder> companies want to hire jr engineers and pay them next to nothing. go for that.
<workmad3> ykk`: not gonna happen for a while :P
<wmoxam> ykk`: walk before you run
<wmoxam> :p
<ykk`> yeah i do
<injekt> Want them to find you? haha no chance
<injekt> ykk`: what is it?
<ykk`> typical woman, come to me i don't go to you haha
<erikh> yeaaaaah
<erikh> so, things like that.
<erikh> not going to fly at a job.
<yorickpeterse> ykk`: to bring it into context: we have a 35-40 year old woman who's an ex heavy metal bassist
<yorickpeterse> until about 6 months ago she never wrote any code
<workmad3> ykk`: I think you have the relationship the wrong way around in your head :P
<yorickpeterse> she basically tackled me during a meetup
marr has quit [Ping timeout: 256 seconds]
<injekt> giggity
<erikh> add descriptions for your repos.
<ykk`> yeah i did a web scraper and a little combat program
<ykk`> you get to fight an orc with a rusty spoon
<injekt> you need some work on your indentation
<injekt> it's a little hard to read some of your code, and that'll easily put people off
<yorickpeterse> jesus the pedantics
<injekt> oh come on
<injekt> this shit matters, you know it
<injekt> I know it
<workmad3> it especially matters if it's what you expect people to judge you on
<yorickpeterse> is that why your company has only two employers?
<yorickpeterse> (re injekt )
* yorickpeterse runs
<ykk`> you mean use two space indents?
<injekt> har
<erikh> two employers at a company is usually one more than usual
<erikh> also praise me for my repeated re-use of the repetitive usual
<ykk`> after peter's book i'm going to write a timer for the pomodoro technique
<injekt> ykk`: two space indents and making sure indents are not mismatched
<ykk`> then a few more programs, maybe a simple packet sniffer
<injekt> a packet sniffer isn't going to help find you work :)
<yorickpeterse> that's the spriti
<ykk`> haha
<yorickpeterse> * spirit
<yorickpeterse> actually injekt, you're wrong
<yorickpeterse> it's a billion times better than Yet Another Stupid Blag
<injekt> I'm not saying dont build one
<injekt> I'm saying dont use it to advertise yourself
<erikh> horsecrap
<ykk`> that makes sense
<erikh> i'd hire someone that could build a serious business packet sniffer
<injekt> this isn't the same league as someone new to programming looking for a job
<erikh> agreed
<erikh> which is why I can say what I will hire or not
<erikh> without getting pm spammed into oblivion
<yorickpeterse> I'd be pretty fucking impressed if somebody were to walk up to me and say "I'm new to coding, here's a pretty decent packet sniffer I wrote"
<injekt> :D
<ykk`> lol
<erikh> yorickpeterse: yep
<workmad3> yorickpeterse: you're making the assumption it would be a decent packet sniffer ;)
<injekt> yorickpeterse: yeah, thanks for applying for our rails job, nice packet sniffer, so how is your rails-fu?
<workmad3> no offence ykk` :)
<erikh> injekt: I hate you
<ykk`> if i wrote it then it would be
<injekt> erikh: :D
<erikh> this is like, my whole fucking career with ruby in a nutshell
<ykk`> i' am a noob at programming but not with compuers
<ykk`> and computers too
<injekt> erikh: we all know the same thing, it's horrible but it's true
nathanstitt has joined #ruby-lang
<erikh> "hi, we see that you actually understand unix and networking and sql -- how well do you know all the bullshit in activesupport?"
<injekt> ^
<injekt> precisely
<gnufied> lol.
<yorickpeterse> injekt: before I got this job I hadn't written Rails for 2 years
<gnufied> well, I lost my head once tracking load_dependencies, does it count?
<yorickpeterse> they didn't give a fuck
<injekt> yorickpeterse: before I got my job I hadn't written rails
<erikh> did you see my better supporter than activesupport/
<yorickpeterse> Rails is a tool, it's much more important that you can learn concepts
<injekt> yorickpeterse: that's different, we have ruby experience, ykk` is learning
<erikh> I have to link it in here occasionally just for shock value
<yorickpeterse> injekt: yes, and I think a packet sniffer is a great way to learn
<yorickpeterse> and to show that you can actually do it
<yorickpeterse> given it works
wallerdev has joined #ruby-lang
<erikh> it's a supporter
<injekt> erikh: LOL
<workmad3> tbh, I kinda agree with both sides
<erikh> injekt: did you see what it does?
<ykk`> i just wanna code with some smart people and not feel like i have to quit and find another job
<workmad3> a packet sniffer is a good learning exercise, and it would be a nice appendix to a portfolio
<ykk`> i wanna stay someplace for years and years and years
<injekt> erikh: im working it out
<workmad3> but it's unlikely to be your main portfolio piece unless you're applying for a network analysis job somewhere
<erikh> injekt: run it with any code
<erikh> :)
<injekt> erikh: hah
<erikh> it's portable if I use echo
<injekt> or should I say
<injekt> haha
wesside has joined #ruby-lang
<workmad3> erikh: awesome!!! I'm pulling that into all my projects right now
<injekt> damn jocks
<erikh> workmad3: was thinking about distributing it as a gem with an autorequire
<workmad3> erikh: it'll go great on the server alongside my clientside JS error-roller :)
sush24 has joined #ruby-lang
<erikh> but it'd probably make drbrain mad
<yorickpeterse> ykk`: in all seriousness though, meetups are important and a great way to get to know people
<injekt> ykk`: railsgirls is also really popular at the moment
vbatts|work has joined #ruby-lang
<injekt> fwiw
<ykk`> yeah you're right yorick
<yorickpeterse> employers don't just fall out of the sky, unless it's called "Icarus development"
Uranio has quit [Quit: while you reading this, a kitty dies]
jperry_ has joined #ruby-lang
<workmad3> yorickpeterse: at least, not until you have some word of mouth and reputation in your area
<ykk`> thank you fellas
<ykk`> talk to you all later
<yorickpeterse> taters
<whitequark> erikh: why do you do `unbind`?
ykk` has quit [Quit: ykk`]
<erikh> whitequark: I don't remember now
apeiros has joined #ruby-lang
<erikh> oh!
<erikh> so the methods won't work if htey're defined in some other way
jxie has joined #ruby-lang
<erikh> I'm not sure if it's actually necessary
<erikh> but w/e
<erikh> it's a joke.
<injekt> erikh: no dude you could have saved a line.. jeez
<erikh> haha
<erikh> ok, I need to worky work now
<whitequark> erikh: actually
<injekt> has phun
<whitequark> what is that supposed to do
<erikh> you'll have to run it.
hogeo has quit [Remote host closed the connection]
<erikh> it's a great supporter
<erikh> anyhow, gtg
<whitequark> supporter?
<yorickpeterse> Ruby russian roulette
<whitequark> wtf
<erikh> it's harmless
blaix has joined #ruby-lang
<erikh> now, I really have to go.
<erikh> unless you guys have good hadoop primers
<erikh> then we need to chat
tomzx_mac has quit [Ping timeout: 252 seconds]
<yorickpeterse> Ruby russian roulette: `rand(100) & 6 == 0 ? require 'active_support' : puts 'You win, for now'
<GarethAdams> lol
vbatts|work has quit [Ping timeout: 252 seconds]
noop has quit [Ping timeout: 248 seconds]
blaix has quit [Ping timeout: 245 seconds]
ffio has joined #ruby-lang
mdedetrich has quit [Quit: Computer has gone to sleep.]
justinmb_ has joined #ruby-lang
kleech has joined #ruby-lang
<kleech> Anyone know if `Thread.current['__whatever'] = some_var` is threadsafe or does it need protecting with a mutex?
gnufied has quit [Quit: Leaving.]
<judofyr> kleech: that's thread-safe
<kleech> judofyr: thanks :)
dhruvasagar has joined #ruby-lang
rmascarenhas has quit [Ping timeout: 256 seconds]
justinmb_ has quit [Ping timeout: 252 seconds]
jsullivandigs has joined #ruby-lang
<apeiros> judofyr: sure?
arooni-mobile has quit [Ping timeout: 252 seconds]
arooni-mobile__ has quit [Ping timeout: 252 seconds]
<judofyr> apieros: what part shouldn't be thread-safe? or what does in "thread-safe" mean?
<judofyr> (in this context)
sirfilip has quit [Quit: Leaving]
<apeiros> granted, the question as such makes actually no sense
<judofyr> Thread.current will always return the current thread
<injekt> heh it's always thread local
<judofyr> (or fiber local or whatever)
<injekt> but thread safe in all contexts probably not
<injekt> but yeah, bad question
<apeiros> all assignments are "thread-safe". it's when the data is accessed by other threads when problems occur.
<apeiros> and Thread#[] is not limited to Thread.current
<judofyr> that is true
<apeiros> kleech: are all threads only ever accessing data via Thread.current? if so then you don't need a mutex. if not, then you should be more specific.
dhruvasagar has quit [Ping timeout: 256 seconds]
cofin has quit [Quit: cofin]
<kleech> apeiros: Many threads will be setting Thread.current['_foo'], my understanding was each thread gets its own var?
<apeiros> kleech: every thread is a different object, so your threads are not sharing data.
io_syl has quit [Quit: Computer has gone to sleep.]
<injekt> kleech: Thread.current is fine, but if you fetched a thread a did thread['__whatever'] then you're asking for problems and should probably use a mutex
<apeiros> hence the question whether it is thread-safe is irrelevant.
<injekt> I can't type today so im gonna stop
<apeiros> y u kant typ?
<yorickpeterse> fixed typ
<apeiros> dinamycali tiped?
<injekt> also god damn fiber-local vs thread-local
<injekt> gtfo
<apeiros> indeed
<apeiros> 1.9 vs. 2.0
<kleech> I guess I should write a spec to confirm if its a problem!
<apeiros> Thread#[] is fiber-local in 2.0, not thread-local.
<injekt> 1.8 vs 1.9+ no
dr_bob has quit [Ping timeout: 256 seconds]
<injekt> 1.9 Thread#[] is fiber local too
<apeiros> good luck with that kleech - ruby sadly does not provide access to the scheduler, so speccing thread issues is virtually impossible.
mytrile has quit [Remote host closed the connection]
<kleech> Now its getting complicated! :)
<apeiros> injekt: oh, right
<apeiros> 1.9 just doesn't have the thread-local equivalent
<injekt> apeiros: eitherway: herp derp threadsizzurp
<apeiros> (as I just recently found out)
glebm has quit [Quit: Computer has gone to sleep.]
djwonk has joined #ruby-lang
justinmb_ has joined #ruby-lang
solars has quit [Read error: Operation timed out]
<yorickpeterse> lol threads in MRI
<workmad3> lol threads
gnufied has joined #ruby-lang
<erikh> they're fine if you're just doing a lot of i/o
vlad_starkov has joined #ruby-lang
<erikh> not especially speedy, but that can be said about MRI as a whole
<yorickpeterse> I prefer an actual threading system that actually allows me to run more than one thread at a time
<yorickpeterse> but yeah, IO is one area where they can be useful in MRI
<apeiros> aaach, go fork yourself ;-)
<injekt> wait mri is slow?
<apeiros> no, those are baseless rumors.
justinmb_ has quit [Ping timeout: 248 seconds]
<apeiros> it still calculates 49! thousands of times faster than you!
<injekt> hey if i practiced hard!
<apeiros> even then!
<injekt> damn, that's fast!
<injekt> apeiros: I think we just sold Ruby
<apeiros> how much do I earn?
vlad_starkov has quit [Ping timeout: 248 seconds]
<injekt> I'll forward your 50% karma
<apeiros> weee!
* apeiros buys a karmaporsche
<injekt> you must have been saving those things are expensive
<yorickpeterse> dat comma
tbuehlmann has quit [Remote host closed the connection]
<injekt> thanks now it's even bugging me
<injekt> I clicked and edited it, can you see the change?
vbatts|work has joined #ruby-lang
blaix has joined #ruby-lang
krombr has joined #ruby-lang
<apeiros> injekt: 8 or 9 years of helping on irc baby!
<apeiros> though, being an op had some detrimental effect…
fedesilva has joined #ruby-lang
scottschecter has joined #ruby-lang
dhruvasagar has joined #ruby-lang
<kleech> just found out Set#merge mutates itself, I would have expected this to be a bang method...
judofyr has quit [Remote host closed the connection]
<workmad3> kleech: there's no non-destructive version
<kleech> workmad3: so you only get the bang if there are both versions?
<apeiros> kleech: so you also want shift!, pop!, push! etc.?
<apeiros> it's not how it works
<workmad3> kleech: the rule of thumb through most of the stdlib and core ruby is that a ! method exists when there are two versions and one version is something you should be more aware of
<apeiros> and generally (as per quote of matz) ! just means "be careful"
<kleech> workmad3: understood, I didn't realise that...
<workmad3> kleech: yeah, a lot of people see the !s and think of the lisp usage 'this is destructive!'
<workmad3> but the ruby use is 'be careful, here be dragons!'
<apeiros> DRAGONS?!?
* apeiros runs
<workmad3> apeiros: would you prefer 'it's dangerous to go on alone. here, take this !'
<apeiros> indeed
justinmb_ has joined #ruby-lang
<kleech> got it, I can do `set_1 + set_2`, pretty ob
<kleech> *obvious
IPGlider has joined #ruby-lang
benlovell has quit [Ping timeout: 252 seconds]
avdi has joined #ruby-lang
Senjai has joined #ruby-lang
Senjai has quit [Changing host]
Senjai has joined #ruby-lang
krombr has quit [Remote host closed the connection]
IPGlider has quit [Quit: IPGlider]
dankest has joined #ruby-lang
carloslopes has quit [Remote host closed the connection]
<Olipro> is there an event-driven way I can monitor a file's modified time?
<matti> Olipro: EM has thing for it.
<matti> Olipro: If not EM then look for inotify fanotify bindings.
UziMonkey___ has quit [Ping timeout: 257 seconds]
slash_nick has joined #ruby-lang
ia___ has quit [Quit: ia___]
teleological has quit [Remote host closed the connection]
allan_farrell has quit [Quit: Leaving]
<injekt> there's ffsm too but never used that
carloslopes has joined #ruby-lang
rwilcox has quit [Quit: Computer has gone to sleep.]
ffio has quit [Quit: WeeChat 0.4.0]
snarfmason has quit [Read error: Connection reset by peer]
snarfmason has joined #ruby-lang
GarethAdams has quit [Quit: Leaving...]
ikrima has quit [Quit: Computer has gone to sleep.]
kleech has quit [Remote host closed the connection]
tylersmith has quit [Remote host closed the connection]
snarfmason has quit [Quit: Computer has gone to sleep.]
<erikh> guard uses rb-fsnotify
<erikh> chances are you just want guard anyhow
<ericwood> inotify is a linux-only thing
<erikh> 'cause guard is pretty f'n awesome
<ericwood> OS X doesn't support it from my experience :|
<erikh> rb-fsnotify uses all the methods
<erikh> IIRC
<ericwood> yeah
<ericwood> I used it once, pretty neat
<ericwood> idk how efficient it is, but it worked
<erikh> yeah, good enough for my uses
snarfmason has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 252 seconds]
_elia has quit [Ping timeout: 256 seconds]
apeiros_ has joined #ruby-lang
seoaqua has quit [Ping timeout: 240 seconds]
snarfmason has quit [Ping timeout: 252 seconds]
seoaqua has joined #ruby-lang
apeiros has quit [Ping timeout: 252 seconds]
JohnBat26 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
teleological has joined #ruby-lang
justinmb_ has quit [Remote host closed the connection]
fedesilva has quit [Read error: Connection reset by peer]
fedesilva has joined #ruby-lang
LinkedoT has joined #ruby-lang
rmascarenhas has joined #ruby-lang
blaix has quit [Quit: Leaving.]
io_syl has joined #ruby-lang
awkisopen has joined #ruby-lang
towski has joined #ruby-lang
<Olipro> what's the scope of $?
<Olipro> is it per-thread?
<Olipro> i.e. if I have two separate threads calling Process.spawn and then Process.wait on the returned PID, am I running the risk of a race condition if I need to check $?
machuga is now known as machuga|away
<whitequark> I think it's frame-local
<whitequark> but it is definitely not global, be assured
vlad_starkov has joined #ruby-lang
fedesilva has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 252 seconds]
Cakey has quit [Ping timeout: 252 seconds]
<PaulePanter> So in parser, http://rdoc.info/search/github/whitequark/parser/master?q=children does not give any results although node.children is used in whitequark’s `eq_align.rb` example in his blog post.
justinmb_ has joined #ruby-lang
<PaulePanter> I still have not set up Vim in a way to easily find the definition of it.
<PaulePanter> Grepping through the source probably means that is a generic(?) Ruby method.
<PaulePanter> Anyway, is there a `parent` method for nodes in Parser?
jonahR has joined #ruby-lang
justinmb_ has quit [Read error: Connection reset by peer]
henrikhodne has quit [Quit: Computer has gone to sleep.]
justinmb_ has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
justinmb_ has quit [Read error: Connection reset by peer]
justinmb_ has joined #ruby-lang
justinmb_ has quit [Read error: Connection reset by peer]
justinmb_ has joined #ruby-lang
yalue has quit [Quit: Leaving]
vlad_starkov has joined #ruby-lang
justinmb_ has quit [Read error: Connection reset by peer]
justinmb_ has joined #ruby-lang
machuga|away is now known as machuga
sush24 has quit [Quit: This computer has gone to sleep]
yalue has joined #ruby-lang
justinmb_ has quit [Remote host closed the connection]
tylersmith has joined #ruby-lang
fedesilva has joined #ruby-lang
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
fedesilva has quit [Remote host closed the connection]
fedesilva has joined #ruby-lang
pr0ton has joined #ruby-lang
mrsolo has joined #ruby-lang
snarfmason has joined #ruby-lang
cofin has joined #ruby-lang
glebm has joined #ruby-lang
achiu has quit [Quit: WeeChat 0.4.0]
<yorickpeterse> PaulePanter: as in, a method to get a parent node?
<yorickpeterse> If so, there isn't as far as I'm aware of
dingus_khan has joined #ruby-lang
countdigi has joined #ruby-lang
krohrbaugh has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
symm- has joined #ruby-lang
anonymuse has joined #ruby-lang
skade has joined #ruby-lang
cofin has quit [Quit: cofin]
agile has quit [Quit: Ex-Chat]
cofin has joined #ruby-lang
dingus_khan has quit [Remote host closed the connection]
<whitequark> PaulePanter: check the ast gem
<whitequark> and no, nodes do not have a link to their parent
skade has quit [Quit: Computer has gone to sleep.]
UziMonkey___ has joined #ruby-lang
rwilcox has joined #ruby-lang
swav has quit [Remote host closed the connection]
tbuehlmann has joined #ruby-lang
slash_nick has quit [Quit: Lost terminal]
justinmb_ has joined #ruby-lang
havenwood has joined #ruby-lang
benxao has quit [Remote host closed the connection]
justinmb_ has quit [Remote host closed the connection]
justinmb_ has joined #ruby-lang
djwonk has quit [Quit: djwonk]
zommi has joined #ruby-lang
glebm has quit [Quit: Computer has gone to sleep.]
gnufied has quit [Quit: Leaving.]
symm- has quit [Ping timeout: 252 seconds]
scottschecter has quit [Ping timeout: 248 seconds]
saarinen has joined #ruby-lang
saarinen has quit [Client Quit]
glebm has joined #ruby-lang
<apeiros_> drbrain maintains something for drb, funny since drb-rain
djwonk has joined #ruby-lang
saarinen has joined #ruby-lang
sush24 has joined #ruby-lang
io_syl has quit [Quit: Textual IRC Client: www.textualapp.com]
io_syl has joined #ruby-lang
justinmb_ has quit [Remote host closed the connection]
vlad_starkov has joined #ruby-lang
vlad_starkov has quit [Read error: Connection reset by peer]
vlad_starkov has joined #ruby-lang
solars has joined #ruby-lang
vlad_sta_ has joined #ruby-lang
jperry has quit [Quit: jperry]
jperry_ is now known as jperry
jperry_ has joined #ruby-lang
glebm has quit [Quit: Computer has gone to sleep.]
fedesilva has quit [Read error: Connection reset by peer]
skade has joined #ruby-lang
fedesilva has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 252 seconds]
jperry_ has quit [Quit: jperry_]
snarfmason has quit [Quit: Computer has gone to sleep.]
symm- has joined #ruby-lang
djwonk has quit [Quit: djwonk]
mrfelix has joined #ruby-lang
vlad_sta_ has quit [Remote host closed the connection]
benlovell has joined #ruby-lang
towski has quit [Remote host closed the connection]
mrfelix has quit [Quit: Computer has gone to sleep.]
havenwood has quit [Remote host closed the connection]
carloslopes has quit [Remote host closed the connection]
jxie_ has joined #ruby-lang
havenwood has joined #ruby-lang
djwonk has joined #ruby-lang
jxie has quit [Ping timeout: 264 seconds]
havenwood has quit [Ping timeout: 276 seconds]
swav has joined #ruby-lang
jperry_ has joined #ruby-lang
krohrbaugh has quit [Quit: Leaving.]
krohrbaugh has joined #ruby-lang
sush24 has quit [Quit: This computer has gone to sleep]
vlad_starkov has joined #ruby-lang
henrikhodne has joined #ruby-lang
forrest has joined #ruby-lang
carloslopes has joined #ruby-lang
glebm has joined #ruby-lang
pr0ton has quit [Ping timeout: 264 seconds]
krohrbaugh has quit [Quit: Leaving.]
ffio has joined #ruby-lang
symm- has quit [Ping timeout: 252 seconds]
ffio has quit [Client Quit]
ffio has joined #ruby-lang
ffio has quit [Client Quit]
ffio has joined #ruby-lang
benlovell has quit [Ping timeout: 265 seconds]
setmeaway has quit [Ping timeout: 256 seconds]
symm- has joined #ruby-lang
justinmb_ has joined #ruby-lang
achiu has joined #ruby-lang
rippa has quit [Ping timeout: 240 seconds]
cofin_ has joined #ruby-lang
saarinen has quit [Quit: saarinen]
brianpWins_ has joined #ruby-lang
amateurhuman_ has joined #ruby-lang
<Aloysius1> Style/design question: I have a class that creates an object from two parameters (A, B) but I'd like to the class to ensure that all objects that the same value of A and B are the same. IOW, if I the user specifies Animal("dog", "collie"), that should always return the same object. Is it better stylistically to override #new or create a class method that either passes back new or returns existing?
<erikh> same object or can it be a different object that's equal in some fashion?
tdy has quit [Read error: Connection reset by peer]
<Aloysius1> Same object. Assume these objects will end up being heavyweight, and since they are functionally identical if their A&B parms match, I don't want to have multiple copies.
pr0ton has joined #ruby-lang
crankhar1er has joined #ruby-lang
tdy has joined #ruby-lang
steez_ has joined #ruby-lang
<erikh> I'm going to give you the secret sobcheckian pattern
<erikh> "you're entering a world of pain"
__butch__ has joined #ruby-lang
<Aloysius1> OVER THE LINE!!!
znz_v0 has joined #ruby-lang
<erikh> exactly
Dan_ has joined #ruby-lang
stamina1 has joined #ruby-lang
<Aloysius1> OK, so I'll mark it a zero.
<erikh> I'm going to suggest you think about hwo you can do it with multiple objects.
cofin has quit [Ping timeout: 276 seconds]
amateurhuman has quit [Ping timeout: 276 seconds]
brianpWins has quit [Ping timeout: 276 seconds]
chendo_ is now known as chendo
brianpWins_ is now known as brianpWins
stamina has quit [Ping timeout: 276 seconds]
znz_v has quit [Ping timeout: 276 seconds]
egyp7 has quit [Ping timeout: 276 seconds]
dankest has quit [Ping timeout: 276 seconds]
workmad3 has joined #ruby-lang
crankharder has quit [Ping timeout: 276 seconds]
steez has quit [Ping timeout: 276 seconds]
Dan_ is now known as Guest51987
egypt has joined #ruby-lang
krohrbaugh has joined #ruby-lang
<Aloysius1> Oh, it's not hard to do it with multiple objects. Just from a design standpoint, I like the idea of creating these objects once and reusing them. Which I can also do by having the client code check to see if the object they need exists. It just seemed like some class intelligence would be more elegant.
<erikh> well, what you want is this
<erikh> $global_object_table = { "uuid here" => object }
<erikh> which I hope I don't have to explain how broken that is
<erikh> (because ruby already has one of those)
<erikh> anyhow, train cuts in a sec.
<erikh> gotta go
<Aloysius1> Thanks, erikh!
arooni-mobile has joined #ruby-lang
arooni-mobile__ has joined #ruby-lang
<Aloysius1> (Eight year olds, dude.)
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
justinmb_ has quit [Remote host closed the connection]
__butch__ has quit [Ping timeout: 252 seconds]
wmoxam has quit [Read error: Connection reset by peer]
wmoxam has joined #ruby-lang
machuga is now known as machuga|away
krohrbaugh has quit [Ping timeout: 264 seconds]
yalue has quit [Quit: Leaving]
carloslopes has quit [Remote host closed the connection]
machuga|away is now known as machuga
vbatts|work has quit [Ping timeout: 248 seconds]
mbj has quit [Quit: leaving]
anjen has joined #ruby-lang
<PaulePanter> whitequark, yorickpeterse: Thanks.
mbj has joined #ruby-lang
Criztian has quit [Remote host closed the connection]
<yorickpeterse> folks, I have to admit something
<yorickpeterse> sometimes, just sometimes I like Ruby
<yorickpeterse> I swear it doesn't happen often, I just...I just..I need help
krohrbaugh has joined #ruby-lang
vlad_starkov has quit [Read error: Connection reset by peer]
vlad_starkov has joined #ruby-lang
Guest51987 has quit [Ping timeout: 264 seconds]
ia___ has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
s0ber has quit [Read error: Connection reset by peer]
s0ber has joined #ruby-lang
rsl has quit [Quit: Textual IRC Client: www.textualapp.com]
dankest has joined #ruby-lang
<Aloysius1> You mean, like, a hug?
<yorickpeterse> well that wouldn't be a bad thing either
marr has joined #ruby-lang
saarinen has joined #ruby-lang
ajack has joined #ruby-lang
<rue> *hugs*
swav has quit [Remote host closed the connection]
mbj has quit [Quit: leaving]
maxmanders has joined #ruby-lang
cjs226 has joined #ruby-lang
havenwood has joined #ruby-lang
jperry_ has quit [Quit: jperry_]
roadkith has joined #ruby-lang
blaix has joined #ruby-lang
anjen has quit [Quit: anjen]
vbatts|work has joined #ruby-lang
roadkith has quit [Read error: Connection reset by peer]
henrikhodne has quit [Quit: Computer has gone to sleep.]
symm- has quit [Ping timeout: 264 seconds]
wmoxam has quit [Ping timeout: 256 seconds]
maxmanders has quit [Ping timeout: 264 seconds]
dankest has quit [Ping timeout: 260 seconds]
elia has joined #ruby-lang
amerine has quit [Ping timeout: 256 seconds]
agile has joined #ruby-lang
krohrbaugh1 has joined #ruby-lang
jonahR has quit [Quit: jonahR]
skade has quit [Quit: Textual IRC Client: www.textualapp.com]
krohrbaugh1 has quit [Read error: Connection reset by peer]
krohrbaugh has quit [Ping timeout: 264 seconds]
krohrbaugh2 has joined #ruby-lang
amerine has joined #ruby-lang
elia has quit [Ping timeout: 256 seconds]
swav has joined #ruby-lang
ldnunes has quit [Quit: Saindo]
jonahR has joined #ruby-lang
elia has joined #ruby-lang
cored has quit [Ping timeout: 264 seconds]
ajack has quit [Ping timeout: 252 seconds]
ffio has quit [Ping timeout: 256 seconds]
ffio_ has joined #ruby-lang
saarinen has quit [Ping timeout: 264 seconds]
<injekt> aw
saarinen has joined #ruby-lang
mucker has quit [Quit: leaving]
<erikh> d'awwwwwwwwwwwww
krohrbaugh2 has quit [Quit: Leaving.]
dingus_khan has joined #ruby-lang
swav has quit [Remote host closed the connection]
zommi has quit [Read error: Connection reset by peer]
scampbell has quit [Quit: Leaving]
machuga is now known as machuga|away
justinmb_ has joined #ruby-lang
jonahR has quit [Ping timeout: 256 seconds]
<Aloysius1> OK, question on project structure. I have a class X in myprojects/x/ and a script Y in myprojects/y/. Best way to get class X into script Y? (X is uploaded to a local gitlab. Others will use X. Y may or may not create a descendant of class X.)
<whitequark> argh, python
<yorickpeterse> self.__lol__
<apeiros_> join(self)
fys has quit [Ping timeout: 240 seconds]
pipework has quit [Remote host closed the connection]
<yorickpeterse> hahaha yeah that one pisses me off
<yorickpeterse> ','.join([10, 20, 30]) # who invented this shit
<injekt> that always annoyed me
<yorickpeterse> it's like yoda code
<yorickpeterse> numbers join you must
<Olipro> what's a convenient yet secure equivalent to `` for the purposes of running a hardcoded command, but with user-defined arguments
<yorickpeterse> in Guido's defense, we Dutch people are kinda wack
<injekt> Olipro: lol secure
<yorickpeterse> Olipro: Shellwords.shellescape or w/e it was called
<Olipro> injekt: in a relative sense
vlad_starkov has joined #ruby-lang
<apeiros_> Olipro: don't use `` but a sane variant
<apeiros_> like spawn
<Senjai> Im pulling my hair out trying to understand metaprogramming
<apeiros_> where you can pass the command and arguments as an array, bypassing shell interpretation
<Olipro> apeiros_: yeah, I was considering that, because I already use it in certain places - how would I pass the arguments as a separate parameter, the documentation doesn't look terribly clear
<apeiros_> Senjai: you can stop now. you won't understand metaprogramming any better when you're bald.
<Senjai> apeiros_: somehow I feel like I should
<Olipro> Process.spawn('mycmd', myargs) ?
<yorickpeterse> right bed tiem, toodles
ikrima has joined #ruby-lang
wesside has quit [Quit: Computer has gone to sleep.]
workmad3 has quit [Ping timeout: 276 seconds]
Criztian has joined #ruby-lang
tonni has joined #ruby-lang
Oloryn_lt2 has joined #ruby-lang
tonni has quit [Remote host closed the connection]
krohrbaugh has joined #ruby-lang
Averna has joined #ruby-lang
breakingthings has quit [Quit: breakingthings]
blaix has quit [Quit: Leaving.]
krohrbaugh has quit [Client Quit]
jperry_ has joined #ruby-lang
joevandyk_ has joined #ruby-lang
krohrbaugh has joined #ruby-lang
joevandyk has quit [Disconnected by services]
joevandyk_ is now known as joevandyk
<joevandyk> is it possible to build ruby with default values for RUBY_HEAP_MIN_SLOTS and friends?
mrfelix has joined #ruby-lang
rmascarenhas has quit [Read error: Operation timed out]
apeiros has joined #ruby-lang
__butch__ has joined #ruby-lang
mrfelix has quit [Client Quit]
dingus_khan has quit [Remote host closed the connection]
<matti> joevandyk: You mean, you cannot use it as environment variables?
<joevandyk> matti: would be nicer to not have to set them everywhere
<joevandyk> i.e. in runit startup scripts
<matti> What if you decide suddenly to change a thing?
<joevandyk> easy to build a new one
<matti> LOL
<matti> Dude.
forrest has quit [Quit: Leaving]
<joevandyk> already building our own version of ruby
apeiros_ has quit [Ping timeout: 248 seconds]
<joevandyk> so it would be nice not to have to set the environment vars for the various ways ruby is started
<joevandyk> in the shell, via runit, etc
machuga|away is now known as machuga
<joevandyk> think i found it in gc.c
__butch__ has quit [Ping timeout: 256 seconds]
ruurd has quit [Quit: Leaving...]
<matti> joevandyk: http://rxr.whitequark.org/
<matti> joevandyk: With all due respect, I think this idea is rather not clever.
fys has joined #ruby-lang
<matti> joevandyk: But, whatever floats your boat.
<joevandyk> most of my ideas aren't :(
<matti> If a member of my team.
<erikh> man env
<matti> Would approach me and said the same thing like you did.
<erikh> seriously, you're going to burn a lot of cycles.
<matti> I would bitch slap the living crap out of him.
<erikh> haha
<matti> But.
<matti> ;]
<matti> Which might look like this: http://www.youtube.com/watch?v=IhJQp-q1Y1s
FlyingLeap has quit [Read error: Operation timed out]
tbuehlmann has quit [Remote host closed the connection]
joast has quit [Quit: Leaving.]
nathanstitt has quit [Quit: I growing sleepy]
havenwood has quit [Remote host closed the connection]
havenwood has joined #ruby-lang
fys has quit [Ping timeout: 260 seconds]
FlyingLeap has joined #ruby-lang
<joevandyk> erikh: burn a lot of cycles?
<joevandyk> meaning compiling ruby?
<erikh> patching it.
havenwood has quit [Ping timeout: 264 seconds]
jperry_ has quit [Quit: jperry_]
joevandyk has quit [Quit: joevandyk]
cofin_ has quit [Quit: cofin_]
elia has quit [Quit: Computer has gone to sleep.]
Wardrop has joined #ruby-lang
mistym has quit [Remote host closed the connection]
pskosinski has quit [Quit: pskosinski]
teleological has quit [Remote host closed the connection]
<injekt> I just killed spider bro
swav has joined #ruby-lang
elia has joined #ruby-lang
elia has quit [Client Quit]
joast has joined #ruby-lang
pr0ton has quit [Quit: pr0ton]
pipework has joined #ruby-lang
<whitequark> oh this actually works
pr0ton has joined #ruby-lang
<whitequark> it's a python script which emulates linux joystick from keyboard
swav has quit [Ping timeout: 264 seconds]
<whitequark> however it's totally unusable together with a device which *requires* analog axis, four of them
* whitequark has crashed this tiny copter into the wall a few dozen times
<whitequark> it's also surprisingly sturdy.
pipework has quit [Remote host closed the connection]
<zzak> good morning!
<apeiros> good evening!
<zzak> apeiros: did you find the doc project?
<erikh> leave it to a bunch of fucking programmers to formalize that
<erikh> pardon my expletives
<erikh> zzak: are you doing a doc project beyond being awesome by yourself?
__butch__ has joined #ruby-lang
<zzak> i think he means documenting-ruby.org
<erikh> bluepojo and I were talking about an idea where people could submit diffs from a website
<erikh> e.g., some kind of ACE editor or whatever that would generate diffs, similar to how a wiki works
<erikh> obv we both got stupid busy with devops things and never got around to it
marr has quit [Ping timeout: 260 seconds]
<erikh> I miss that bar
<erikh> that bar was like, a muse
<erikh> it was just some crusty philly neighborhood bar
fys has joined #ruby-lang
<zzak> hah
fys has quit [Client Quit]
Criztian has quit [Remote host closed the connection]
krombr has joined #ruby-lang
jperry_ has joined #ruby-lang
snarfmason has joined #ruby-lang
mdedetrich has joined #ruby-lang
mdedetrich has quit [Max SendQ exceeded]
mdedetrich has joined #ruby-lang
mdedetrich has quit [Max SendQ exceeded]
mdedetrich has joined #ruby-lang
dingus_khan has joined #ruby-lang
tomzx_mac has joined #ruby-lang
<injekt> zzak: o hai
<zzak> hi!
<injekt> how is JP?
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
woollyams has joined #ruby-lang
<zenspider> zzak: you still attacking doco?
<zzak> zenspider: yes sir
<zzak> injekt: its great! awesome place
<zzak> had some really good (expensive) tempura in ginza last night
charliesome has joined #ruby-lang
<injekt> :D
anonymuse has quit [Quit: Leaving...]
<zenspider> zzak: can you attack Array.new ?
<zenspider> "In the first form" isn't a listed form
<zenspider> I suspect it is just stale
<zzak> ive seen it
<zzak> ill see what i can do, getting ready for rubykaigi now
<zenspider> *nod*
<zenspider> it's obviously no rush
<zzak> proofreading koichi's slides
<zenspider> it's been broken doco since 1.8 :)
<zenspider> nice
<zenspider> and thank you :)
<zzak> np!
mdedetrich has quit [Ping timeout: 276 seconds]
<zenspider> zzak: you prefer to focus on API-level doco or?
<zzak> high level
<zzak> but a doc bug is a doc bug
djwonk has quit [Quit: djwonk]
sonne has quit [Read error: Operation timed out]
<zenspider> zzak: I'd like to work with you on mt5 high level doco then
<zenspider> corundum: seen headius?
<corundum> who knows?
<corundum> headius was last seen 5 days, 1 hours, 28 minutes and 57 seconds ago, quitting IRC (Quit: headius)
<zzak> hes here i think
<zzak> ive told you to give me commit before :P
<zzak> corundum: jruby jruby jruby
<zenspider> zzak: I'll happily give you commit to minitest. but know that I work in perforce, not git
<zenspider> I don't yet have a 2 way sync between the two vcs
<zzak> ohh, yeah true
<zzak> let me know we should do
toretore has quit [Quit: Leaving]
havenwood has joined #ruby-lang
sonne has joined #ruby-lang
krombr has quit [Remote host closed the connection]
saarinen has quit [Quit: saarinen]
fedesilva has quit [Ping timeout: 252 seconds]
tylersmith has quit [Remote host closed the connection]
<charliesome> zenspider: why perforce?
<zenspider> if you're on homebrew, the first step is just `brew install perforce`
<zenspider> charliesome: because it works well and stays out of my way
<zenspider> haha... fuckers
mrsolo has quit [Quit: Leaving]
<zzak> gotta catch the train to rubykaigi, ttyl!
<zenspider> looks like it is now http://www.perforce.com/downloads
<zenspider> and doesn't have anything more focused
<zenspider> fixed. thanks.
<zenspider> damn. Finished in 0.132135s, 2035.7967 runs/s, 5191.6600 assertions/s.
dingus_khan has quit [Remote host closed the connection]
dingus_khan has joined #ruby-lang
symm- has joined #ruby-lang
<Senjai> anyone have any input on the stackoverflow question I posted?
AgentWillyWonka has joined #ruby-lang
fedesilva has joined #ruby-lang
nathanstitt has joined #ruby-lang
teleological has joined #ruby-lang
fedesilva has quit [Remote host closed the connection]
rmascarenhas has joined #ruby-lang
<zenspider> Senjai: what's the question
<zenspider> ?
<zenspider> lots of words... not much clarity
<zenspider> your title mentions "class methods" and never says it in the body
<Senjai> I just want to know if what I'm saying is correct
<zenspider> and all your examples are instance methods
<Senjai> I'm sorry, then I would agree that the title is misleading
<Senjai> I'll change it
mikewintermute has quit [Quit: mikewintermute]
<zenspider> Senjai: is this a learning exercise?
<zenspider> or are you actually using this?
<zenspider> why not use the tracer than ships with ruby?
<Senjai> It's a snippet from Programming Ruby 1.9
<Senjai> I think its trying to explain how some of those classes work
__butch__ has quit [Quit: Leaving.]
<Senjai> with metaprogramming, just like how it showed how OpenStruct is defined.
ikrima has quit [Quit: Computer has gone to sleep.]
<Senjai> I just want to make sure my thinking is solid and correct
<Senjai> It's kind of difficult for me to understand whats going on
<zenspider> I would, at first glance, assume that it is sufficient to do the define method on the object's singleton class and just use super when you want to call up to the original functionality
fedesilva has joined #ruby-lang