robbyoconnor has quit [Remote host closed the connection]
madb055 has joined #ruby-lang
priodev has quit [Ping timeout: 258 seconds]
robbyoconnor has joined #ruby-lang
priodev has joined #ruby-lang
cirenyc has joined #ruby-lang
cirenyc has quit [Client Quit]
ssssss has joined #ruby-lang
gregmoreno has quit [Ping timeout: 260 seconds]
soknee has joined #ruby-lang
cyndis has quit [Read error: Operation timed out]
cyndis has joined #ruby-lang
srbaker has quit [Quit: Computer has gone to sleep.]
Guest55873 has quit [Read error: Connection reset by peer]
ssssss has quit [Remote host closed the connection]
jbsan has quit [Ping timeout: 240 seconds]
idkazuma has quit [Remote host closed the connection]
srbaker has joined #ruby-lang
Gaelan has quit [Remote host closed the connection]
Gaelan has joined #ruby-lang
josephholsten has joined #ruby-lang
mistym has quit [Remote host closed the connection]
Domon has joined #ruby-lang
Gaelan has quit [Remote host closed the connection]
Gaelan has joined #ruby-lang
Domon has quit [Remote host closed the connection]
dingus_khan has joined #ruby-lang
madb055 has quit [Ping timeout: 264 seconds]
soknee has quit [Quit: Leaving.]
Averna has joined #ruby-lang
Wardrop has joined #ruby-lang
<Wardrop>
Is anyone else getting email notifications from bugs.ruby-lang.org? I'm watching a number of issues and never receive any email notifications when other comments on them.
jumpei has joined #ruby-lang
jbsan has joined #ruby-lang
Nisstyre-laptop has joined #ruby-lang
Domon has joined #ruby-lang
intellitech has joined #ruby-lang
wycats__ has joined #ruby-lang
soknee has joined #ruby-lang
wyhaines has quit [Remote host closed the connection]
havenwood has quit [Remote host closed the connection]
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
tylersmith has joined #ruby-lang
Nisstyre-laptop has quit [Read error: Operation timed out]
intellitech has quit [Quit: SMOKE BOMB!]
jumpei has quit []
jumpei has joined #ruby-lang
towski has quit [Ping timeout: 260 seconds]
KM has joined #ruby-lang
KM is now known as Guest23931
jumpei has quit [Client Quit]
jumpei has joined #ruby-lang
ridget has joined #ruby-lang
Nisstyre-laptop has joined #ruby-lang
fragamus has quit [Quit: Computer has gone to sleep.]
jumpei has quit []
febuiles has joined #ruby-lang
febuiles has joined #ruby-lang
febuiles has quit [Changing host]
jumpei has joined #ruby-lang
jumpei has quit [Remote host closed the connection]
jumpei has joined #ruby-lang
jumpei has quit []
jumpei has joined #ruby-lang
jumpei has quit [Remote host closed the connection]
voker57_ has quit [Read error: Connection reset by peer]
jumpei has joined #ruby-lang
anonymuse has joined #ruby-lang
jumpei has quit []
xxaM has joined #ruby-lang
dingus_khan has quit [Ping timeout: 258 seconds]
jumpei has joined #ruby-lang
towski has joined #ruby-lang
chimkan_ has joined #ruby-lang
crackit__ has joined #ruby-lang
josephholsten has quit [Quit: josephholsten]
jumpei has quit [Remote host closed the connection]
jumpei has joined #ruby-lang
spuk has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 246 seconds]
io_syl has quit [Quit: Computer has gone to sleep.]
josephholsten has joined #ruby-lang
havenwood has joined #ruby-lang
ilyam has joined #ruby-lang
dhruvasagar has joined #ruby-lang
lsegal has joined #ruby-lang
chimkan_ has quit [Quit: chimkan_]
jumpei has quit [Remote host closed the connection]
jumpei has joined #ruby-lang
<hakunin>
Is there a built-in version of Array#<< or Array#push that returns added object and not the array?
<hakunin>
would be nice to say record = records.find{...} || records.append(Record.new) (for one off script), but there are many other ways to write this cleanly so whatever
chrismar035 has joined #ruby-lang
chrismar035 has quit [Remote host closed the connection]
chrismar035 has joined #ruby-lang
chrismar035 has quit [Client Quit]
chimkan_ has joined #ruby-lang
spuk has quit [Read error: Operation timed out]
chimkan_ has quit [Client Quit]
<hakunin>
like record = records.find {...} || Record.new.tap{|r| records << r}
<Wardrop>
hakunin: you can always do something like: (my_array << obj).last
<Wardrop>
or: my_array << obj && obj
bzalasky has quit [Remote host closed the connection]
<hakunin>
hm, record = records.find {...} || (records << Record.new).last # is not bad
spuk has joined #ruby-lang
<hakunin>
not sure that vs tap
bzalasky has joined #ruby-lang
<hakunin>
on one hand tap feels more intended for modifying the object itself, not placing it into some external collection, but is calling .last on a long array slow i wonder?
ilyam has quit [Quit: ilyam]
<hakunin>
looks like it's counting length to get .last
<hakunin>
if that's what RARRAY_LEN() does
<Wardrop>
Well, you could revert back to my_array << obj && obj
<Wardrop>
Not as semantic, but it gets the job done
bzalasky has quit [Remote host closed the connection]
<hakunin>
Wardrop: in that case i slightly prefer tap cause I'm always confused with precendence
<Wardrop>
#tap probably less performant than #last
<Wardrop>
#tap creates a proc and all that stuff
<hakunin>
althouhg (records << record) && record is ok
<hakunin>
Wardrop: you're probably right
<hakunin>
Wardrop: oh wait, that won't work with inline constructor (records << Record.new) && ...?
<Wardrop>
hakunin: I'd use #last. Array's are indexed, so it'd be as quick as anything.
<hakunin>
alright
mjio has left #ruby-lang [#ruby-lang]
yours_truly has joined #ruby-lang
Nisstyre-laptop has quit [Read error: Connection reset by peer]
yours_truly has quit [Read error: Connection reset by peer]
Nisstyre-laptop has joined #ruby-lang
stonerfish has joined #ruby-lang
stonerfish has quit [Client Quit]
bzalasky has joined #ruby-lang
anonymuse has quit [Quit: Leaving...]
RickHull has joined #ruby-lang
<RickHull>
i just accepted a job offer in SF. they are asking me if i want a macbook (non-retina) or a thinkpad
<RickHull>
any suggestions?
<RickHull>
never owned apple, interested
<r0bglees0n>
having never used a thinkpad, nope.
<RickHull>
i'll probably run linux in a VM
<RickHull>
i'm guessing the thinkpad comes with windows?
<lianj>
RickHull: thats the question. osx or linux
<RickHull>
tempted to try the apple
kgrz has joined #ruby-lang
<lianj>
daily linux vm on osx sucks for io speed
io_syl has joined #ruby-lang
<r0bglees0n>
hakunin: maybe not slow, but prone to race conditions yes. what if another thread adds an element to the array _before_ you call .last, you might get a different object.
<RickHull>
lianj: oh, hm
<lianj>
RickHull: maybe it got better but you feel its not native
<hakunin>
RickHull: you're moving from nyc?
<RickHull>
hakunin: ha, good memory
<RickHull>
been a while :)
<hakunin>
RickHull: i remember very well
<RickHull>
i got knocked out already, hurricane sandy
<RickHull>
i'm in atlanta at the moment
rippa has joined #ruby-lang
<hakunin>
RickHull: ouch had no idea
<RickHull>
yeah, i had moved to long beach, long island
<hakunin>
RickHull: i'm reminded every time i see you responding on HN
<RickHull>
barrier island south shore, hit hard
<RickHull>
hakunin: heh, nice
<r0bglees0n>
hurricane sandy was NYC right?
<hakunin>
RickHull: coney island was hit hard too, but we're in apt building so nothing wrong except few days without power
<RickHull>
yeah NYC took some flooding
<r0bglees0n>
ah yeah. not too terrible compared to others though :)
<RickHull>
my apt took 4 feet of water, destroyed most of my stuff
<r0bglees0n>
that sucks. :<
<RickHull>
long beach lost power, madatory evac for about a month
<RickHull>
my company put me in a hotel in delaware for about a month
<hakunin>
r0bglees0n: it was terrible for homes near water for sure
<RickHull>
living with my parents now in Atlanta :/
<r0bglees0n>
damn. the people I know in NYC acted as if it wasn't a big deal.
<RickHull>
it was kind of a big deal for NYC for a few weeks, lower manhattan mostly i think
<RickHull>
maybe a week i guess
<RickHull>
major flooding at street and below street level
<hakunin>
not many tech people live in south brooklyn where i'm located, but a lot of damage here, some businesses never reopened
<RickHull>
yeah that's the sad part
<RickHull>
same in long beach
<RickHull>
that and people living in public housing without power for weeks on end
<RickHull>
in the dead of winter
<r0bglees0n>
NYC seems like a city that withstands almost anything though
<RickHull>
lianj: i'm thinking i'll be happy with osx desktop. i'd like to have a decent bash terminal environment, maybe just ssh into a server, or into a local linux VM
<RickHull>
yeah NYC will keep on ticking
<r0bglees0n>
OSX is good for that and more.
<RickHull>
a fair amount of businesses took huge losses with underground storage
<r0bglees0n>
you can nerd out almost as much with OSX
<RickHull>
some major art galleries and also run of the mill retail
<r0bglees0n>
damn yeah, losing your art in flooding would really suck.
<r0bglees0n>
i thought art galleries were run like fort knox
<RickHull>
the publicly accessible, sure
<RickHull>
but apparently some have underground vaults
<RickHull>
perhaps not unlike fort knox ;)
chao_ has joined #ruby-lang
snafoo_ has joined #ruby-lang
<r0bglees0n>
hidden treasures
kgrz has quit [Quit: Computer has gone to sleep.]
<r0bglees0n>
RickHull: what editor do you use?
<r0bglees0n>
I guess being new to OSX you'll want to try textmate/sublime text editor
<RickHull>
my dev environment is ssh to headless linux, emacs
<r0bglees0n>
i did when i first came to OSX but i eventually fell back onto vim
<RickHull>
i have played with sublime text, i like it
chao has quit [Read error: Connection reset by peer]
snafoo has quit [Read error: Connection reset by peer]
<r0bglees0n>
yeah, emacs has a native OSX client
<r0bglees0n>
i cant speak for how good/bad it is
<RickHull>
i just like the command line
<r0bglees0n>
cool
<RickHull>
i dont like the windows version of emacws
achiu has quit [Read error: Connection reset by peer]
<RickHull>
keeping the dev environment on the server, it's always available and always consistent
achiu has joined #ruby-lang
<r0bglees0n>
the cocoa version of vim is pretty good, and it is packaged with a console editor as well.
<RickHull>
i haven't developed on my desktop in a long time
<RickHull>
heh "always" available -- except on an airplane etc
shachaf_ has joined #ruby-lang
shachaf_ has quit [Changing host]
shachaf_ has joined #ruby-lang
quazimodo has quit [Ping timeout: 240 seconds]
shachaf has quit [Disconnected by services]
shachaf_ is now known as shachaf
<r0bglees0n>
interesting approach.
<r0bglees0n>
ill stick with git :)
<RickHull>
it is nice knowing that wherever you are, whatever machine, give me putty or ssh
<RickHull>
and i have my comfy env
<r0bglees0n>
true, but i usually have my machine.
quazimodo has joined #ruby-lang
<r0bglees0n>
it's a portable macbook air 11"
Domon has quit [Remote host closed the connection]
<RickHull>
i've never owned an apple product. nothign against them, just never decided to pony up. i think now might be the time
<RickHull>
hakunin: how is the startup going, same effort?
<r0bglees0n>
yeah macs are cool
<RickHull>
i like the unibody, magsafe, attention to detail
dhruvasagar has quit [Ping timeout: 248 seconds]
<RickHull>
i'm a little worried about keyboard layout but just short term
<eam>
you know, I'm not a huge fan of the thunderbolt. I don't like changing networks when I connect a display
<eam>
and I really dislike osx, not much of an apple fan. But the magsafe does it
<RickHull>
i'm ok if thunderbolt "optimizes" my network if i add a connection
<RickHull>
but if you add a 2nd monitor, do you drop i/o?
<eam>
mostly an issue of breaking existing long-lived connections for me
<lianj>
eam: … just watching out for the f'ing cable
<ggreer>
eam: I'm also glad that deep fryer power plug technology has been ported to computers :)
<r0bglees0n>
lol
apeiros has quit [Remote host closed the connection]
<eam>
I would be overjoyed to be able to get magsafe on other products :)
apeiros has joined #ruby-lang
<r0bglees0n>
apple wont license it
<ggreer>
I wish other companies made hardware similar to apple. I love my 11" air, but apple creates a lot of lock-in :/
<eam>
r0bglees0n: yeah, I mean re: ggreer's point about fryer safety plugs potentially being prior art
<lianj>
eam: did you actually destory that many machines because they had no magsafe?
<RickHull>
take 2 things that need connecting. do it with a magnet. file patent
<eam>
a few yeah
<RickHull>
:barf:
<eam>
lianj: more often I'll pick up a laptop and just yank it really yard by accident
<lianj>
eam: another option is to get a machine with decent battery life :P
<eam>
lianj: loving my Air :)
<eam>
(kinda...)
<r0bglees0n>
write your own OS, in Ruby!
<eam>
and don't tell anyone here but apple still ships 1.8.7
<r0bglees0n>
that's kind of because of macruby
<r0bglees0n>
it was suppose to be the 1.9 for OSX
<lianj>
loving my thinkpad with slice batteries. a day without power cord. let one slice batteries charge while another is in use. cord freedom
<r0bglees0n>
macruby is 1.9.1 though and really behind, so i hope they eventually put cruby 1.9.3 on there.
<ggreer>
the thinkpad x220/x230 is comically thick though
<RickHull>
let's say i go mac, what software would/should I be tempted to buy?
<lianj>
r0bglees0n: maybe when everyone switched to 2.0
<RickHull>
and how hard is it to run linux on the metal?
<jhn>
darn it is it hard to find a vim theme that looks consistent across terminal and gui and doesn't make my eyes bleed :-(
<ggreer>
not worth the trouble
<r0bglees0n>
lianj: yeah. doesn't bother me too much when i have rbenv/ruby-build ^_^
<lianj>
r0bglees0n: ack
<eam>
any OS can run a browser and terminals adequately. I just wish the OSX window management was less obnoxious
<lianj>
RickHull: you can get along with buying near to nothing or spending a bunch
<RickHull>
i'm more of a near nothing guy
<RickHull>
in terms of spending
havenn_ has joined #ruby-lang
havenwood has quit [Read error: Connection reset by peer]
<ggreer>
eam: divvy?
<ggreer>
or better touch tool
<lianj>
for some time you even had to buy a quicktime license to view fullscreen with it oO
<RickHull>
i'm guessing a debian distro runs pretty well on the thinkpad
<postmodern>
RickHull, netbook :P
<RickHull>
postmodern: i get a macbook or a thinkpad from the new job
<r0bglees0n>
divvy is awful if you compare it to what Linux has to offer in terms of window management
<postmodern>
RickHull, Fedora also runs well on thinkpads, just make sure to get the Intel HD Graphics
<ggreer>
r0bglees0n: there are more. I just mentioned the popular one
<RickHull>
interesting, i could fox with fedora
<ggreer>
my main system is a maxxed-out 11" air. it's by far my favorite system
<r0bglees0n>
ggreer: and none of them come close to Linux window management.
<ggreer>
some of my friends have thinkpad x220s with debian or ubuntu on them. it's amusing to see them deal with wireless drivers or sound problems
<lianj>
r0bglees0n: or filesystem/driver support
<jhn>
RickHull, I don't think you'll need to spend more than $30 on software (unless you want to get fancy).
<eam>
ggreer: I'm just cranky, and I don't really care enough to mess with it
<postmodern>
ggreer, no wireless or sound issues here (x230 running Fedora 17)
<lianj>
ggreer: running arch on x220 never had a driver problem
<RickHull>
jhn: cool, i mean i might want to, and that's fine. but i'm trying to think of up front costs
<r0bglees0n>
they can't really tile windows.
<RickHull>
yeah i haven't messed with tiling wms
<RickHull>
something i might look at now
<ggreer>
you should basically ignore cost when buying a computer. your computer is necessary for your livelihood, and it's a small percentage of your income if you're doing development
<postmodern>
im not cool enough for tiling, still running fluxbox :P
<r0bglees0n>
postmodern: if you use a tiled ruby WM your whole environment is scriptable pretty much.
<postmodern>
ggreer, or buy a netbook and suffer the small keyboard
<ggreer>
postmodern: heh. I have small hands so a netbook keyboard is perfect for me
<RickHull>
for me, i can use a $10 computer to ssh into my dev environment / livelihood
<ggreer>
RickHull: and if a $2000 computer made you 10% more productive, it'd totally be worth buying
<RickHull>
sure
<postmodern>
r0bglees0n, also your WM replaces tmux
<ggreer>
since the extra value you create more than outweighs the extra $1990 you have to lay out
<r0bglees0n>
postmodern: I live inside tmux almost.
<jhn>
I try to buy the best for things I use all the time: computer, software, toilet, toilet paper, etc.
<r0bglees0n>
apart from my browser.
<r0bglees0n>
and macvim.
baz_ has quit [Ping timeout: 256 seconds]
<ggreer>
I have xmonad on my netbook. it's nice
<ggreer>
jhn: hecks yes
<ggreer>
also nice: expensive nail clipper
<ggreer>
something sturdy and sharp that doesn't rust
baz_ has joined #ruby-lang
<RickHull>
ggreer: i'm still curious about the accounting. the apple keyboard is a glaring productivity issue. but it's all about assessing relative costs / curves
<ggreer>
things you shouldn't spend lots of money on: car, daily habits like buying coffee
<lianj>
ggreer: AND steam
<ggreer>
also make sure you have a really nice bed and work chair/desk, since you use those things for about 2/3rds of your day
<ggreer>
heh
<RickHull>
ggreer: agree totally
Wardrop has left #ruby-lang [#ruby-lang]
<hakunin>
RickHull: startup is growing, don't remember how it was back then, but now full time on it
<ggreer>
oh, and nice screen(s). you stare at those like 10 hours a day
<RickHull>
i like a standup desk with a stool
<postmodern>
ggreer, cars are the definition of spending money, constantly breaking down
<ggreer>
yeah and cars depreciate pretty quickly
<postmodern>
ggreer, buy a bike, doubles as transport and exercise
<r0bglees0n>
i cant even drive :(
<ggreer>
and you spend maybe 2 hours a day in them
<ggreer>
assuming a ridiculous 1 hour commute each way
<r0bglees0n>
id love to be able to take long distance car drives
<RickHull>
i have a 30 month lease on a honda civic, moving to SF FML
<r0bglees0n>
esp at 3/4AM in morning when i cant sleep
<ggreer>
RickHull: heh. I have an apartment in SF with a garage parking spot. I don't own a car so I keep two motorcycles there :D
<ggreer>
it's totally ridiculous
<RickHull>
nice, i'm thinking about a KLR
<ggreer>
ah. I went with a DRZ-400SM
<RickHull>
but i can't ditch the civic
<ggreer>
*DR-Z
<RickHull>
without a big hit
<RickHull>
$3000 pays for a lot of parking
<ggreer>
the KLR is cool as hell, but pricier
<ggreer>
I managed to find a salvaged DRZ for $2500
<hakunin>
RickHull: i had to pay ~$7k to get rid of my accord lease
<RickHull>
cool, i'd be tempted to supermoto it
<RickHull>
the DRZ
<RickHull>
the KLR, my dad and i want to do the continental divide
<ggreer>
yeah it is a supermotard
<RickHull>
canada to mexico
<RickHull>
cool!
<ggreer>
SM stands for supermotard
<ggreer>
or something tard
<RickHull>
ok right
<RickHull>
i haven't ridden one, but i've ridden some dirt bikes
<ggreer>
they're a lot of fun
<RickHull>
when i get out there, you gotta let me try it out. you can drive the civic :)\
<hakunin>
RickHull: well, that's a long story, short version: for fun
<RickHull>
you might have told me before
<RickHull>
it's been a while :)
Domon has joined #ruby-lang
<hakunin>
RickHull: i.e. the biz guy started out here, but wanted to explore uncharted territories of Russia's startup scene, and be one of the first on it, which he succeeded at pretty hard
<RickHull>
oh sure, do russia
<RickHull>
but why not throw up a US version
<hakunin>
definitely considering that
<ggreer>
because zazzle already exists?
<hakunin>
ggreer: which 1. validates the market, 2. doesn't much impact, 3. worse than us :)
<RickHull>
yeah it's a question of how much cost to adapt to US market
<ggreer>
hakunin: sorry if that came off as dismissive. I meant that you have an advantage over zazzle in russia because you know that market and can cater to it better
jumpei has quit [Remote host closed the connection]
quazimodo has quit [Ping timeout: 264 seconds]
<hakunin>
ggreer: not at all, you're right
<ggreer>
so if you're going to start a zazzle competitor, doing it in russia makes sense for you
<ggreer>
curses. you have more watchers than me :)
bzalasky has quit [Remote host closed the connection]
<ggreer>
stargazers
<ggreer>
whatever
jumpei has joined #ruby-lang
<hakunin>
ggreer: front-end projects tend to generally have more watchers
quazimodo has joined #ruby-lang
<ggreer>
yeah. nobody cares about stuff written in C
tylersmith has quit [Quit: tylersmith]
<hakunin>
i'm struggling with getting more exposure myself, it's easier in front end
<hakunin>
that account is my partner's
<hakunin>
he's famous in front end
Gaelan has quit [Remote host closed the connection]
<hakunin>
mine is github.com/maxim
<ggreer>
I meant the project, not the account
<RickHull>
ggreer: jeebus the jb weld on the engine case :(
<ggreer>
I don't pay attention to account followers
mistym has quit [Remote host closed the connection]
<hakunin>
ggreer: but it helps with project followers quite a lot
<hakunin>
ggreer: if person is known, their projects get more love
<hakunin>
:(
<hakunin>
damn meritocracy
<ggreer>
yeah. one of my friends has 150 stargazers on a repo that doesn't even have any working code
<charliesome>
injekt: would've been amazing if it was alert(\'lol\');
<injekt>
charliesome: :D
trulsjp has left #ruby-lang [#ruby-lang]
Gaelan has joined #ruby-lang
gnufied1 has joined #ruby-lang
truls has joined #ruby-lang
gnufied has quit [Ping timeout: 252 seconds]
Gaelan has quit [Ping timeout: 248 seconds]
alessio_rocco has quit [Ping timeout: 240 seconds]
alessio_rocco has joined #ruby-lang
sush24 has joined #ruby-lang
<ubersapiens>
yorick that was a perfect explanation
<ubersapiens>
thank you so much!
jhn has quit []
<GarethAdams>
ubersapiens: so we've covered freenode registration and UNIX permissions - any ruby questions? ;)
vmoravec_ has joined #ruby-lang
camilasan has joined #ruby-lang
camilasan has left #ruby-lang [#ruby-lang]
<andrewvos>
GarethAdams: wat is monkey perching?
<injekt>
monkey.respond_to?(:perch)
Elmago10 has joined #ruby-lang
Elmago10 has left #ruby-lang [#ruby-lang]
<andrewvos>
monkey.perch?
<injekt>
monkey.perch!
<andrewvos>
monkey.perch!(:tree)
<GarethAdams>
wat
<ubersapiens>
Gareth...no ruby questions yet...im in the middle of class...ill be shooting questions as soon as i get a break :)
<ubersapiens>
thanks for the great support
<andrewvos>
duck tapping
<efy>
Tap dem ducks.
<injekt>
I believe that's illegal
<andrewvos>
ermahgerd derck terping
<bnagy>
derk.terp {|drk| drk.querk}
maxmanders has quit [Quit: Computer has gone to sleep.]
<andrewvos>
Derk.new(:derk).drk!
maxmanders has joined #ruby-lang
havenwood has quit [Remote host closed the connection]
woollyams has joined #ruby-lang
woollyams has quit [Remote host closed the connection]
maxmanders has quit [Client Quit]
<ubersapiens>
ruby jedi masters...usually ruby courses have bad teachers because they are either very good programmers or very good teachers...but never both
<ubersapiens>
could you tell me what book i could follow?
<ubersapiens>
as complete as possible...or should i follow a tutorial
<GarethAdams>
ubersapiens: impossible to say without knowing your level
<GarethAdams>
i.e. with other languages
<ubersapiens>
Gareth i have tried learning python in the past, but whenever i reached OOP and even arrays/hashes...i would get confused with the methodology
<ubersapiens>
good example...why do you need to pass arguments in methods and things like that...but now im getting the hang of it...but its still slow...and i need to compliment with a book or something of that sort
<ubersapiens>
if i spoke the terminology or if know how each object type works properly i will understand the methodology and be able to read code in stack/elsewhere and then put it to practice
<ubersapiens>
but i need to understand what elements are needed when defining methods, or what elements are necessary when creating objects, or when to use if/loop/while/begin
<injekt>
you're over complicating things, ubersapiens
<ubersapiens>
i am?
<ubersapiens>
sorry injekt...
<injekt>
don't apologise :) but if you don't know when to use conditional statements or loops, you shouldn't be looking into OOP
<ubersapiens>
its just concepts are explained in class and then homeworks/projects blow them out of proportion (its like the teach us how to build toy cars and then for homework they make us build Ferraris)
<yorickpeterse>
injekt: monkey.perch?????????
<injekt>
look who roles up late to the party
<injekt>
rolls, too
<ubersapiens>
i do understand the conditionals and loops but when it comes time to looking at a problem i have a hard time knowing which tool to pick out of the tool chest
<ubersapiens>
thats why i asked about a book that clears up my mind...lets me understand every concept PERFECTLY...in laymans terms
<ubersapiens>
and maybe then i can try and pick up another book when i got those concepts nailed down in my head
<truls>
if one long method is too complicated, splitting it up into smaller methods or hiding away parts of the code in classes are your tools to cleaning up
<ubersapiens>
id just like to have a clear idea of how and when to use each object type....
Nisstyre-laptop has quit [Quit: Leaving]
<ubersapiens>
ive tried codecademy...its good but in the end it takes you by the hand too much....so when you put it into practice its not the same effect
<ubersapiens>
tahts why i wanted a book
<ubersapiens>
something between codecademy and the ruby course
<injekt>
uh
<injekt>
I gave you the link to a book
jg_ has quit [Ping timeout: 264 seconds]
<efy>
This is somewhat unrelated, but I'm curious if you've take any data structures or algorithms courses?
sush24 has quit [Quit: This computer has gone to sleep]
benlovell has quit [Quit: Computer has gone to sleep.]
ledestin has quit [Quit: ledestin]
<apeiros>
charliesome, judofyr, injekt: yepp, I started #ruby-pro, and it's indeed a couple of years back. Never really made it the channel I wanted it to make :-/ (once again - time is a bitch)
ubersapiens has joined #ruby-lang
<apeiros>
the original reason to found it was that I got pissed by trolls and wanted a "sanctuary"
<ubersapiens>
injekt i jus tmaanaged to download the book
sush24 has joined #ruby-lang
tonni_ has quit [Remote host closed the connection]
<yorickpeterse>
apeiros: so it's basically the apeiros appreciation club?
tonni has joined #ruby-lang
<apeiros>
appreciation? worship!
<apeiros>
it's a public channel, permanently moderated with voice being granted upon somebody vouching for you
<yorickpeterse>
pffff, no democracy
<yorickpeterse>
HERECY
<apeiros>
that is actually a form of democracy
<yorickpeterse>
ssssh
<apeiros>
(people vouching for each other, that is, not heresy)
postmodern has quit [Quit: Leaving]
<judofyr>
apieros: I just find the whole "this is a club of smart people" a bit weird. but then, I really like explaining stuff to noobs :)
<yorickpeterse>
define "smart"
nkr has joined #ruby-lang
agarie has quit [Read error: Connection reset by peer]
Gaelan has joined #ruby-lang
agarie has joined #ruby-lang
<ubersapiens>
how can i message a person directly here on the main chat
<yorickpeterse>
ubersapiens: /msg NICK message
<injekt>
/msg <user> <message>
gnufied1 has quit [Read error: Connection reset by peer]
gnufied has joined #ruby-lang
<injekt>
do note that if it's a ruby specific question, it's always best asked in the main chat
<apeiros>
can some sh/bash wizz how to do the equivalent of `File.delete(Dir.glob('*.foo').first) if Dir.glob('*.foo').first` ?
<ubersapiens>
cool
<apeiros>
+tell me
<apeiros>
judofyr: it's less a "club of smart people" and more a "club of non-assholes, -pricks, -help-vampires"
<apeiros>
but the channel is rather inactive
benlovell has joined #ruby-lang
<judofyr>
yeah
<truls>
apeiros: you can do a "for k in *.foo; rm $k; break; done" or something
<yorickpeterse>
apeiros: rm *.foo
<gnufied>
lol
<truls>
i assume you just want to delete the first
<apeiros>
yorickpeterse: that has non-zero exit status if no .foo file exists
<yorickpeterse>
hm
<judofyr>
apieros: || true
<judofyr>
:D
<apeiros>
truls: well, I expect there to be only one, but if there are multiple, it's fine to delete all of them
<apeiros>
truls: so I guess just remove the `break; `?
<truls>
yep
<truls>
well
<truls>
just do rm *.foo -f
<apeiros>
nice
<truls>
-f to avoid error if there are none
<apeiros>
d'oh
<apeiros>
even nicer then :D
<apeiros>
thanks @ truls & yorickpeterse
<ubersapiens>
INJEKT were you able to see those messages?
<apeiros>
bnagy: ew, odd? I should still own ruby-pro.org, wtf?
<yorickpeterse>
whitequark: I know Ripper is not the best, but you can take a look at the parser of ruby-lint
Muz has joined #ruby-lang
<yorickpeterse>
I'd say the AST for class/module/sclass blocks is quite ok
<whitequark>
generally, Ruby parsers work either in "lint-mode" or "execution-mode", the former collecting as much info as possible, and the latter only collecting line numbers for backtraces
<apeiros>
hrm, got to investigate that when I'm back home
<yorickpeterse>
give me a sec and I'll pastie an example
<whitequark>
yorickpeterse: a second
<whitequark>
(lint/execute mode) this is also demonstrated by JRuby, which has two parsers.
<whitequark>
I imagine that in a runtime, one could optimize for the common case and first parse the file while collecting just the line numbers, which should be somewhat faster and eat way less RAM
<whitequark>
if, however, a syntax error happens (a rare event), it's OK to reparse it in the lint mode.
<yorickpeterse>
same goes with begin/ends and what not. I actually went through quite a bit of trouble to get the order and everything right
<yorickpeterse>
(Ripper does it backwards from what I remember)
<whitequark>
first, the colon2 consists of the "base module" and "constant name". the former may be any value (a::B); the latter is always a bareword
maxmanders has joined #ruby-lang
<yorickpeterse>
whitequark: I don't maky any assumption that paths always consist out of constants
<yorickpeterse>
at least it shouldn't, let me verify
<whitequark>
yorickpeterse: sure, but why does your example s(:constant_path, s(:constant, 'A'), s(:constant, 'B')) have a s(:constant) as the second part?
<whitequark>
or was it A::B::C ?
<yorickpeterse>
To keep things consistent
ruby-lang025 has joined #ruby-lang
<yorickpeterse>
it makes iteration super easy
<yorickpeterse>
Because I can always assume that it is at least a Node and not some primitive type
<whitequark>
it doesn't, and I say that as an implementor :)
<yorickpeterse>
Let me get an example of begin/rescue/end (a fun one)
<whitequark>
there are generally three patterns of constant access I know of
<whitequark>
yorickpeterse: RP decomposes it into several parts. it's (ensure (rescue (begin ... code ...) (resbody ...) (resbody ...) (begin ... else code ...)) (begin ... ensure code ...))
arooni-mobile has joined #ruby-lang
<whitequark>
this actually makes somewhat more sense, because that's how a naïve interpreter would walk the tree, and how one would generate the bytecode, etc. it follows the control flow.
<yorickpeterse>
I thought about that as well and I suppose it does make more sense
<yorickpeterse>
I just never could be bothered changing it knowing I'll ditch my parser anyway
<whitequark>
sure
<mbj>
whitequark: Im busy today, I can hack on parser in the evening
<whitequark>
mbj: sure. I think I'll finish the spec
<mbj>
whitequark: So far I like the spec
<whitequark>
mbj: very well!
<whitequark>
yorickpeterse: my thoughts about constants.
tonni has quit [Remote host closed the connection]
<whitequark>
I want the declaration structure to follow access structure. Currently, this stands for lvars, ivars, etc: I can turn a (lvar :a) to assignment by (lvar :a).updated(:lvasgn) << (int 1)
<whitequark>
so for a hypothetical (const) node, I want it to work in a similar way. (const ...).updated(:cdecl) << (int 1)
<judofyr>
some for constpath?
<judofyr>
same*
<whitequark>
judofyr: yep
<whitequark>
I want to reify the lhs of tCOLON3 (::A)
<whitequark>
so that for ::A you would have: (const (cbase) :A)
chendo has joined #ruby-lang
tonni has joined #ruby-lang
<whitequark>
for just A it would be (const nil :A)
<whitequark>
and for B::A it'd be (const (const nil :B) :A)
tonni has quit [Remote host closed the connection]
<judofyr>
hm
<whitequark>
you can turn each into a declaration by changing `const to `cdecl` and appending a value
<yorickpeterse>
whitequark: hmm
<yorickpeterse>
heh, I just ignore the :: now
<yorickpeterse>
tssk tssk, not very nice (as in, ::A)
<whitequark>
also I think that class definition could well be (class (const nil :A) nil ... body)
<whitequark>
it is then easy to unpack the (const) to the base and the constant name to be declared
<mbj>
whitequark: I have to close this channel, to interesting and runins my ability to do my work ;)
<yorickpeterse>
classes/modules aren't that hard
mbj has left #ruby-lang [#ruby-lang]
<whitequark>
yorickpeterse: RP has them very inconsistent.
<tbuehlmann>
I'm trying to send a file over an TCP socket without loading the whole file in memory. this seems to work: https://gist.github.com/tbuehlmann/5300731 - is this reliable?
<whitequark>
eg ruby was not designed, by any measure
<charliesome>
there's an element of design in ruby
<charliesome>
in fact i think ruby was designed quite well, compared to all the other crap languages out there
<yorickpeterse>
Ruby well designed? *cough* parse.y
<whitequark>
charliesome: I attribute it to the fact that very clever people did work on Ruby, the language.
[1]Apollo has joined #ruby-lang
<whitequark>
but there was clearly not enough organization to call it a "design process".
<whitequark>
so it's kinda nice, most of the time, but no, not "designed".
<charliesome>
fair enough
<charliesome>
anyway, night
<whitequark>
it's night already in australia?!
<[1]Apollo>
beginner question, I'm read text from a file in to a string and I want to find all instances of a phrase using regex. However, using slice only finds the first instance, what's the best way to get every instance?
[1]Apollo has quit [Quit: HydraIRC -> http://www.hydrairc.com <- Nine out of ten l33t h4x0rz prefer it]
thinkdevcode has quit [Remote host closed the connection]
arooni-mobile has quit [Ping timeout: 258 seconds]
<ubersapiens>
hey jedi masters
<ubersapiens>
do you guys do Behavior Driven Development with your code (RSpec?)?
<ubersapiens>
and if you do, is it useful?
<whitequark>
BDD as in, Cucumber?
<whitequark>
waste of time IMO.
<ubersapiens>
doesnt it save a bunch of time as per debugging...even if it consumes a bit more time?
<whitequark>
ubersapiens: let me be more specific. Describing your behavior in a "business-friendly DSL", how they call it (http://cukes.info/ etc) is a waste of time. TDD itself is a valid metodhology.
<ubersapiens>
is TDD the same or the basis of BDD
<whitequark>
the basis
dhruvasagar has quit [Ping timeout: 252 seconds]
rippa has joined #ruby-lang
davejlong has joined #ruby-lang
davejlong has left #ruby-lang [#ruby-lang]
ubersapiens has quit [Ping timeout: 245 seconds]
maxmanders has joined #ruby-lang
dr_bob has joined #ruby-lang
io_syl has joined #ruby-lang
<injekt>
whitequark: I think he's talking about rspec, not cukes
<eval-in>
judofyr => /tmp/execpad-b9f5b2bda2e5/source-b9f5b2bda2e5:2:in `replace': wrong number of arguments (2 for 1) (ArgumentError) ... (http://eval.in/14591)
snafoo_ has quit [Read error: Connection reset by peer]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
rippa has joined #ruby-lang
tomzx_mac has quit [Ping timeout: 252 seconds]
bstrie has quit [Ping timeout: 252 seconds]
bstrie has joined #ruby-lang
Gaelan has joined #ruby-lang
snafoo has joined #ruby-lang
snafoo has joined #ruby-lang
snafoo has quit [Changing host]
log22 has joined #ruby-lang
log22 has quit [Client Quit]
dhruvasagar has joined #ruby-lang
tylersmith has quit [Quit: tylersmith]
ubersapiens has quit [Ping timeout: 245 seconds]
toranaga111___ has quit [Ping timeout: 245 seconds]
cored has quit [Read error: Connection reset by peer]
tjgillies has quit [Quit: No Ping reply in 180 seconds.]
tyler_ has joined #ruby-lang
Gaelan has quit [Remote host closed the connection]
bzalasky has joined #ruby-lang
gnufied has quit [Quit: Leaving.]
daniel__ has joined #ruby-lang
ivanoats has joined #ruby-lang
ivanoats has quit [Changing host]
ivanoats has joined #ruby-lang
banister`sleep has joined #ruby-lang
daniel__ has left #ruby-lang [#ruby-lang]
cored has joined #ruby-lang
cored has quit [Changing host]
cored has joined #ruby-lang
cored has quit [Read error: Connection reset by peer]
sepp2k has quit [Remote host closed the connection]
<whitequark>
meh
<whitequark>
these days I TDD, or at least aim for 100% test coverage for all of my projects... except rails ones
protagoras271 has quit [Quit: Konversation terminated!]
<whitequark>
it's just such an incredible pain in the ass that I'd rather spend time fixing bugs and testing the code manually
<whitequark>
(tssss don't tell my boss)
* lianj
hates slow capybara rails suites
* injekt
hates capybara rails suites
* whitequark
hates slow rails suites, i.e. all rails suites.
<injekt>
my rails test suite isnt slow
<whitequark>
injekt: minitest and no fucked up AR integration tests?
<injekt>
whitequark: yup :D
<whitequark>
please come and do my work, I'll pay you
<whitequark>
*come here
dhruvasagar has quit [Ping timeout: 264 seconds]
danielb has joined #ruby-lang
<injekt>
heh
<whitequark>
or rather convince someone to pay you, doesnt matter
danielb is now known as Guest85805
<injekt>
:D
kain has quit [Quit: exit]
<whitequark>
the end result is the same :D
<whitequark>
also you'll have to refactor 10KLOC of rspec integration tests
<whitequark>
or maybe 20KLOC
<injekt>
people hit the db too much in their tests (ie when they dont need to), it's a result of stuff like factories and how they're taught
Guest85805 has quit [Client Quit]
<whitequark>
which run for around 10 minutes
<injekt>
heh
<whitequark>
around 500 tests I think
<whitequark>
it was 700 but I refactored them
<whitequark>
i.e. deleted tests which didn't do anything useful AT ALL
* whitequark
cries
<injekt>
yeah mine sits around 400 right now
gregmore_ has joined #ruby-lang
danielb_ has joined #ruby-lang
cored has joined #ruby-lang
GarethAdams has quit [Quit: Leaving...]
<whitequark>
also I seriously want OMeta to be integrated in some industry-standard language
<whitequark>
and when I say integrated I mean *integrated*, not kinda-bolted-on
<whitequark>
but I'm probably asking for too much.
thone_ has quit [Ping timeout: 264 seconds]
<lianj>
injekt: some people hit capybara too much in their test (ie when they dont need to)
<injekt>
lianj: some people hit capybara in their test (when they dont need to)
<injekt>
:D
<injekt>
I hate, and will never use capybara
baba has joined #ruby-lang
<whitequark>
damn zoophiles
fire has quit [Ping timeout: 264 seconds]
<lianj>
some month ago i started to think, huh i should have a smoke when starting the suite because it took so long. already then i knew testing for this project just died
gregmoreno has quit [Ping timeout: 248 seconds]
<lianj>
i also freak out when foo.nil? or foo.present? is all over the place
<whitequark>
lianj: that makes sense when being applied to user input
<whitequark>
but nowhere else
<whitequark>
or do you mean "foo.nil? or foo.present?" :D
<whitequark>
also everyone who uses "or" and "and" in their code must be shot.
<lianj>
hah no
<injekt>
whitequark: no wae!
<injekt>
I <3 'or' and 'and'
* whitequark
gives inkjet foo or bar and baz
<injekt>
:D
<whitequark>
please proceed to shoot yourself.
<whitequark>
in the foot, I guess
kgrz has quit [Quit: Computer has gone to sleep.]
wyhaines has joined #ruby-lang
tehGaryColeman has joined #ruby-lang
<zzak>
you could never read rdoc source then
<zzak>
or anything by drbrain for that matter
wallclockbuilder has joined #ruby-lang
<whitequark>
zzak: I can confirm that
<whitequark>
also, seattlerb :/
cored has quit [Ping timeout: 255 seconds]
cored has joined #ruby-lang
cored has quit [Changing host]
cored has joined #ruby-lang
dingus_khan has joined #ruby-lang
<yorickpeterse>
all aboard the seattlerb hate train!
<yorickpeterse>
CHOO CHOO
<yorickpeterse>
also fuck yeah, holidays
cored has quit [Read error: Connection reset by peer]
<injekt>
how I'll write all my prints now: :puts.to_proc.call(Kernel, "helloo")
<yorickpeterse>
whitequark: not sure if I agree on (self)
towski has joined #ruby-lang
<yorickpeterse>
since it's a keyword
<yorickpeterse>
hm, then again it seems the rest follows that as wlel
<yorickpeterse>
I'm not a huge fan of abbrevations in this case
<whitequark>
I'm opposed to unnecessarily wordly ASTs
<whitequark>
it
<whitequark>
*it makes them hard to read
agarie has quit [Read error: Connection reset by peer]
mrsolo has joined #ruby-lang
Rhy0lite has joined #ruby-lang
agarie has joined #ruby-lang
<whitequark>
remember that you can always just take the Builders::Sexp and reimplement it in your parser to get any AST you want without speed penalty.
<yorickpeterse>
hmm
<whitequark>
extensivity, bitch
<Rhy0lite>
I incorrectly opened a new issue against Backport93 instead of ruby-trunk. Can someone change it or will it eventually be found?
<whitequark>
Rhy0lite: dunno, it just seems really ancient and obscure to me
<whitequark>
in the same ballpark as XENIX
<zzak>
whitequark: more ancient and obscure then yacc?
<whitequark>
zzak: tools live forever, distributions need support
<Rhy0lite>
whitequark: I'm trying to help make it less obscure
adam12 has joined #ruby-lang
<Rhy0lite>
because it is widely used in many large companies
<Rhy0lite>
but has not done well with maintaining its ecosystem
<whitequark>
Rhy0lite: I see
<zzak>
whitequark: <3
<Rhy0lite>
and general accessibility
<Rhy0lite>
for developers
<zzak>
Rhy0lite: its a noble cause
<whitequark>
zzak: huh?
<Rhy0lite>
zzak: thanks
<Rhy0lite>
any suggestions are appreciated
<zzak>
whitequark: your quotey
<whitequark>
what's with the sudden hearting? :D
<Rhy0lite>
mine or IBM's?
* whitequark
blushes
<zzak>
and my tasteless expression about russians earlier
wallclockbuilder has quit [Remote host closed the connection]
robbyoconnor has quit [Ping timeout: 260 seconds]
<Rhy0lite>
I created and maintain the PowerPC port of GCC, including AIX
<Rhy0lite>
and I'm a member of the GCC SC
<Rhy0lite>
I've been advocating this for 20 years :-)
<Rhy0lite>
IBM is starting to realize that whitequark's opinion of AIX, shared by many other members of the next generation of developers, is a problem ;-)
<whitequark>
hehe
<zzak>
just needs a rebranding and hip new marketing scheme
<Rhy0lite>
yeah, that'll do the trick
<Rhy0lite>
Raspberry AIX
<whitequark>
blargh
<whitequark>
god please no
<zzak>
comes with free case of pbr
closer has quit [Ping timeout: 276 seconds]
<Rhy0lite>
"I'm a Mac! I'm a PC! I'm Linux" ... "I'm AIX"
<whitequark>
(though I guess that *will* do the trick)
closer has joined #ruby-lang
<whitequark>
"WHO'S THERE?!"
<Rhy0lite>
AIX.
<Rhy0lite>
AIX who?
<zzak>
acronyms are so 1990's
<drbrain>
I think Ruby on AIX is slightly more popular than Ruby on HP-UX
<drbrain>
I think the order is linux, windows, BSD, AIX, HP-UX
<Rhy0lite>
I know! We just need to add cool colored cases!
<drbrain>
I think I've seen an S/390 bug report too, but I can't recall
duper has joined #ruby-lang
<zzak>
ive seen quite a few AIX bugs reported
<zzak>
dont forget solaris either
<Rhy0lite>
zzak: :-/
<whitequark>
"slightly more popular than on HP-UX" is an excellent way to insult software
<drbrain>
oh yeah, they're around BSD land
<Rhy0lite>
AIX is POSIX-compliant, but in slightly quirky ways
stardiviner has quit [Ping timeout: 245 seconds]
<whitequark>
are there non-quirky POSIX implementations around?..
jonahR has joined #ruby-lang
<drbrain>
↑ :D
<Rhy0lite>
drbrain: Linux runs on POWER and S/390
<Rhy0lite>
so it could be zLinux
<Rhy0lite>
or it could be Ruby on zOS
Bwild has joined #ruby-lang
<whitequark>
also S/390 has funky memory ordering iirc so it could be just the hardware
<Rhy0lite>
yes
krohrbaugh1 has quit [Quit: Leaving.]
* whitequark
<3 S/390
<Rhy0lite>
CPython has problems on zOS because of EBCDIC
ben has joined #ruby-lang
<whitequark>
(the architecture. not sure I'll ever get around the hardware in my life)
<Rhy0lite>
well, there actually are systems for developer access
<drbrain>
yeah, looks like linux on S/390
<Rhy0lite>
The hardware is cool
<Rhy0lite>
but it's not the 1960's mad scientist lab from movies any more
<Rhy0lite>
no spinning tape drives
dingus_khan has quit [Ping timeout: 240 seconds]
<Rhy0lite>
but I would, at least, like to get buildbots
dodtsair has left #ruby-lang [#ruby-lang]
<Rhy0lite>
both for the visibility
<Rhy0lite>
and to ensure that MRI releases continue to work correctly on PowerLinux and AIX
<dbussink>
zzak: could you open an issue in the rbx tracker?
<dbussink>
so we don't forget / don't keep of track of it?
<dbussink>
zzak: and could you include the repro steps as well there?
<ddfreyne>
I’d love to trace object lifetime with dtrace as well…
<ddfreyne>
But there’s only object-creation, not object-destruction (there are some GC hooks though)
<dbussink>
ddfreyne: how would you imagine that to work?
<dbussink>
well, object destruction doesn't exist as such
plains has joined #ruby-lang
plains has quit [Changing host]
plains has joined #ruby-lang
mbull9 has joined #ruby-lang
<ddfreyne>
dbussink: Hmmm… for each object, record the timestamp on which it was created, and on destruction (finalization, really) record another timestamp. That way, you could e.g. show average lifetime per class
<whitequark>
I imagine you could hook into the parts of GC which manage free lists and iterate the objects there
<ddfreyne>
average lifetime * number of allocations, maybe
srbaker has joined #ruby-lang
<dbussink>
that only works if the gc implementation has free lists
<zzak>
dbussink: is it ok if repro includes sinatra?
<whitequark>
dbussink: how can a GC function without them? or a similar way to mark free memory.
<whitequark>
I mean it can be hard, but there's always a way to fetch that info...
MehLaptop has joined #ruby-lang
<dbussink>
whitequark: there are algorithms i think where it's basically impossible
<dbussink>
zzak: yeah, although if you're able to do it without sinatra that would be even better :)
<dbussink>
usually the simpler the repro, the easier / faster to fix it
<dbussink>
whitequark: without free lists? well, for example a semi space collector doesn't have free list
<dbussink>
it copies over objects while scanning / marking
<dbussink>
and the old space will be reused / objects will be copied over it
<dbussink>
so the only way there would be to do additional work during gc, where after the gc phase you walk over the old space, check which objects aren't forwarded and see those as "dead"
<whitequark>
dbussink: yeah exactly what I was suggesting
<whitequark>
that would slow it down quite a bit but hey, tracing
<dbussink>
right, but for example the azul gc does a system which uses read barriers
<zzak>
dbussink: for sure, ill see what i can do
<dbussink>
so if an object is forwarded, it's only patched up when a pointer is encountered
<dbussink>
so there are ways i think to perhaps do it there to, but it adds a lot of machinery
workmad3 has quit [Ping timeout: 240 seconds]
<whitequark>
dbussink: true that.
<whitequark>
plus the lifetime collected this way would be quite imprecise
<dbussink>
that also yeah
workmad3 has joined #ruby-lang
hashbang_ has quit [Ping timeout: 245 seconds]
dc5ala has quit [Quit: Ex-Chat]
<dbussink>
zzak: if you can't easily, including sinatra is fine as well
jumpei has quit [Remote host closed the connection]
kain has joined #ruby-lang
gix has joined #ruby-lang
jumpei has joined #ruby-lang
jg_ has joined #ruby-lang
bright_day has quit [Remote host closed the connection]
workmad3 has joined #ruby-lang
intellitech has quit [Remote host closed the connection]
sailias has quit [Ping timeout: 276 seconds]
intellitech has joined #ruby-lang
jumpei has quit [Remote host closed the connection]
maxmanders has joined #ruby-lang
jumpei has joined #ruby-lang
tehGaryColeman has joined #ruby-lang
robbyoconnor has quit [Read error: Connection reset by peer]
jg_ has quit [Read error: Operation timed out]
dingus_khan has quit [Ping timeout: 256 seconds]
banaan has joined #ruby-lang
benanne has quit [Ping timeout: 252 seconds]
jumpei_ has joined #ruby-lang
jumpei has quit [Ping timeout: 252 seconds]
Luwe has joined #ruby-lang
workmad3 has quit [Ping timeout: 256 seconds]
dvxam has joined #ruby-lang
jonahR has quit [Quit: jonahR]
dvxam has quit [Client Quit]
pbjorklund has quit [Ping timeout: 264 seconds]
maxmanders has quit [Quit: Computer has gone to sleep.]
havenwood has quit [Remote host closed the connection]
pkrnj has joined #ruby-lang
havenn_ has joined #ruby-lang
Luwe has quit [Ping timeout: 252 seconds]
ggreer has quit [Excess Flood]
AngryParsley has joined #ruby-lang
AngryParsley has quit [Changing host]
AngryParsley has joined #ruby-lang
AngryParsley is now known as ggreer
stardiviner has joined #ruby-lang
<yorickpeterse>
whitequark: eh, how's that supposed to work
<yorickpeterse>
as in, what does it do
<ddfreyne>
magnets, man. magnets.
<whitequark>
yorickpeterse: tests for location info
<yorickpeterse>
right
<whitequark>
yorickpeterse: so, um, what's the question?..
ledestin has joined #ruby-lang
<whitequark>
"~~ name" tests that parsed_ast.loc.name.{begin,end} == {0,1}
<whitequark>
(and a couple more validity tests)
<yorickpeterse>
I was just curious what it was doing
<whitequark>
" ^~ expression (int)" the same, but it first searches for first child of type `int`
<whitequark>
you can actually write paths like array/1.dstr/2 there (first `array`, second `dstr` inside)
snarfmason has quit [Read error: Operation timed out]
cored has quit [Ping timeout: 264 seconds]
Xzyx987X_ has quit [Ping timeout: 245 seconds]
pbjorklund has joined #ruby-lang
cored has joined #ruby-lang
cored has quit [Changing host]
cored has joined #ruby-lang
srbaker has joined #ruby-lang
Xzyx987X has joined #ruby-lang
snarfmason has joined #ruby-lang
MehLaptop has quit [Remote host closed the connection]
rippa has quit [Ping timeout: 240 seconds]
maxmanders has joined #ruby-lang
tehGaryColeman has quit [Ping timeout: 264 seconds]
havenn_ has left #ruby-lang [#ruby-lang]
Luwe has joined #ruby-lang
Luwe has quit [Client Quit]
krohrbaugh has joined #ruby-lang
carloslopes has quit [Remote host closed the connection]
krohrbaugh has quit [Client Quit]
MaddinXx has joined #ruby-lang
havenwood has joined #ruby-lang
krohrbaugh has joined #ruby-lang
Tectonic has joined #ruby-lang
<yfeldblum>
is there a command for listing the versions of a gem installed locally, in a machine-readable way? or is parsing `gem list #{name}` supposed to be machine-readable?
tehGaryColeman has joined #ruby-lang
symm- has quit [Ping timeout: 245 seconds]
<drbrain>
yfeldblum: no, the `gem` commands are largely intended for human consumption
banaan has quit [Quit: kbai]
<injekt>
couldn't you enumerate Gem::Specification.each ?
<yfeldblum>
injekt, say it's a ruby program in one ruby (e.g. in the system ruby) trying to list the gem version of a gem installed in another ruby (e.g. in a ruby installed with rvm)
<injekt>
:|
<drbrain>
yfeldblum: use `gem env path` then set up the local ruby to examine the foreign ruby's gems
glebm has joined #ruby-lang
mistym has quit [Remote host closed the connection]
mr_white has quit [Read error: Connection reset by peer]
gix has joined #ruby-lang
mr_white has joined #ruby-lang
dustint has quit [Quit: Leaving]
symm- has joined #ruby-lang
mixandgo has quit [Quit: mixandgo]
chimkan_ has joined #ruby-lang
mytrile has quit [Remote host closed the connection]
kain has quit [Ping timeout: 240 seconds]
pygmael has joined #ruby-lang
tehGaryColeman has quit [Ping timeout: 245 seconds]
jumpei_ has quit [Remote host closed the connection]
glebm has quit [Quit: Computer has gone to sleep.]
gregmore_ has quit [Read error: Connection reset by peer]
gregmoreno has joined #ruby-lang
MaddinXx has quit [Remote host closed the connection]
benlovell has joined #ruby-lang
banisterfiend has quit [Read error: Connection reset by peer]
ledestin has quit [Quit: ledestin]
<cored>
hello
tdy_ has quit [Read error: Connection reset by peer]
cmaxw has joined #ruby-lang
<cored>
I create some methods for String for convinience inside a module
<cored>
I was thinking that I could do something like class String; extend MyExtensions; end
<cored>
and it will work for any instance of String, but the method is not appearing on some of the Strings
<cored>
I added that to the file that includes all the others
<cored>
that's the code where I'm extending String to do that
<whitequark>
include TM::StringExtensions
<whitequark>
at line 8, the `self` is the String class itself. by `extend`ing it, you have added the instance methods of TM::StringExtensions as class methods of String
<cored>
doesn't include add class methods instead of instance methods?
<whitequark>
you got it the other way :)
<cored>
whitequark: hm, checking
<cored>
whitequark: that's kinda confusing the thing that you said before
<whitequark>
huh?
<cored>
the part at line 8,
<cored>
oh ok
<cored>
I got it now
<cored>
extends adds the instance methods on TM::StringExtensions as class methods ok
<cored>
same thing with include
<cored>
undefined method to_hash on Strings
<whitequark>
no, include adds instance methods of TM::StringExtensions as instance methods of String