<narya>
banisterfiend: why isn't "X.instance_methods" updated accordingly when I append more methods? I tested the same thing in irb and it works as expected
<narya>
bug or something one should understand about it?
<banisterfiend>
narya: i don't believe it isn't :)
<banisterfiend>
narya: can you show a gist proving that?
<narya>
ah, gist and not pastebin. hold on
<narya>
ok now this is freakish, of course it worked now. I have to check wtf I did last time
<banisterfiend>
narya: btw, use ls instead of X.instance_methods
<narya>
cause my old module is still buggy. It has both methods working, but not listed. But I can't seem to repsoruce it
<banisterfiend>
narya: ls -M X
<narya>
<3
<banisterfiend>
narya: type: ls -h
<banisterfiend>
for more info
<narya>
that shit was long to write
<narya>
instead of dir(object)
tdy has quit [Quit: WeeChat 0.3.9.2]
<narya>
.. now I feel stupid.
<narya>
I am so used to the whole self.y shit
<narya>
: )
<narya>
no wonder the new ones didn't show up
jtoy has quit [Quit: jtoy]
richardjortega has left #ruby-lang [#ruby-lang]
arooni-mobile has quit [Read error: Connection reset by peer]
Musfuut has joined #ruby-lang
arooni-mobile has joined #ruby-lang
eileen_ has quit [Quit: eileen_]
Mellett68 has quit [Quit: No Ping reply in 180 seconds.]
benanne has joined #ruby-lang
drbrain has joined #ruby-lang
mistym has quit [Remote host closed the connection]
mpan has quit [Quit: Leaving]
mpan has joined #ruby-lang
Aria has joined #ruby-lang
drbrain has quit [Ping timeout: 260 seconds]
<zenspider>
gah. need heroku help if someone has some cycles
<zenspider>
n/m. help == use my wireless stick, not cafe's
jbsan_ has joined #ruby-lang
jbsan has quit [Ping timeout: 256 seconds]
jbsan_ is now known as jbsan
sailias1 has quit [Quit: Leaving.]
jtoy has joined #ruby-lang
tdy has joined #ruby-lang
BigFatFatty has quit [Quit: leaving]
wyhaines has quit [Remote host closed the connection]
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
benanne has quit [Quit: kbai]
havenn has quit [Remote host closed the connection]
havenn has joined #ruby-lang
marr has quit [Ping timeout: 265 seconds]
havenn has quit [Read error: Operation timed out]
m3nd3s has quit [Remote host closed the connection]
m3nd3s has joined #ruby-lang
m3nd3s has quit [Remote host closed the connection]
seanstickle has joined #ruby-lang
lordnaz has joined #ruby-lang
chessguy has quit [Remote host closed the connection]
dankest has quit [Quit: Leaving...]
nignaztic has joined #ruby-lang
<zenspider>
wow. it is DEAD here :(
<fowl>
im zenspider and i base my facial emotions on #ruby-lang 's activity
<Aria>
It really is.
<zenspider>
Aria: long time no talk... how goes?
<Aria>
It's good!
<zenspider>
im fowl and I'm simply annoying
<Aria>
Aw.
<Aria>
Too much holiday?
reppard has quit [Ping timeout: 264 seconds]
<zenspider>
Aria: good good. did you happen to make it to rubyconf this year? it was in your neck of the woods, no?
jonahR has joined #ruby-lang
<Aria>
I didn't, sadly.
<Aria>
And actually, I'm in Boston at the moment.
<Aria>
Business upsets drove me out of the rural hinterlands, so I ditched Colorado for the time being.
<zenspider>
boston? wow. that's a tad different
jtoy has quit [Read error: Connection reset by peer]
jtoy has joined #ruby-lang
<Aria>
Yeah, though in some ways not.
<Aria>
Still walkable.
dankest has joined #ruby-lang
sn0wb1rd has quit [Quit: sn0wb1rd]
Rarrikins has joined #ruby-lang
gsav has quit [Quit: Lost terminal]
<zenspider>
Aria: where were you in Colorado again? I have yet to find anything in Denver "walkable". TBH, I've wanted to nuke that city from orbit every time I go there
reppard has joined #ruby-lang
Rarrrikins has quit [Ping timeout: 260 seconds]
drbrain has joined #ruby-lang
<mhall>
LOL, America, where the towns want to nuke the cities, and the cities want to nuke the towns, and same with the Red and the Blue, etc. etc. :)
<Aria>
Ridgway, CO
<Aria>
Deep rural
<Aria>
Denver is no fun unless you stay right downtown
<Aria>
Even then, ew
<mhall>
LOL, I've been through Ridgway
<Aria>
Really?
<Aria>
Such a tiny place
<mhall>
Yeah, part of my family is from GJ
<mhall>
My dad went to HS there, then to USAFA and CU
<Aria>
Oh fun.
jonahR has quit [Quit: jonahR]
<mhall>
It's along a decent route to 4 Corners, and we had a friend with a homestead near there
<mhall>
I guess you had a remote job FTW?
<mhall>
I wouldn't mind one someday but I worry about stability because I have to have insurance for my chronic disease. :(
<Aria>
Heh, yeah. We have a few big clues we leave for people interviewing.
sn0wb1rd has joined #ruby-lang
<mhall>
The name should be a good hint
elixir has joined #ruby-lang
<telemachus>
zzak: grats
<mhall>
In this case they didn't go into any of the details
<Aria>
Well, the company name is more benign.
<mhall>
Oddly enough he didn't mind once he got used to it
<Aria>
Yeah, it's not really about the content.
<mhall>
And developed a good collection of test accounts and external disks and rsync skills ;)
<telemachus>
Aria: I'll bite - what is the company's name?
<Aria>
Online Buddies, Inc.
<mhall>
After a while, the normal stuff got boring, so then they collected bloopers and outtakes, hehe
<Aria>
Heh.
gsav has joined #ruby-lang
mercwithamouth has joined #ruby-lang
* telemachus
nods
jtoy has quit [Quit: jtoy]
<zzak>
telemachus: thank you
gsav has quit [Ping timeout: 244 seconds]
sn0wb1rd_ has joined #ruby-lang
mame0 has quit [Ping timeout: 244 seconds]
banister`sleep has quit [Ping timeout: 255 seconds]
sn0wb1rd has quit [Ping timeout: 265 seconds]
sn0wb1rd_ is now known as sn0wb1rd
mame0 has joined #ruby-lang
ssl has joined #ruby-lang
jbsan has quit [Quit: jbsan]
emocakes has quit [Quit: emocakes]
blazes816 has quit [Ping timeout: 256 seconds]
mhall has quit [Quit: leaving]
mjio has quit []
xalei has quit [Remote host closed the connection]
blazes816 has joined #ruby-lang
fowl has quit [Ping timeout: 265 seconds]
swav has quit [Remote host closed the connection]
sepp2k has quit [Read error: Connection reset by peer]
drbrain has joined #ruby-lang
banister_ has joined #ruby-lang
banister_ has quit [Ping timeout: 252 seconds]
tdy has quit [Read error: Connection reset by peer]
drbrain has quit [Ping timeout: 250 seconds]
tdy has joined #ruby-lang
tdy has quit [Read error: Connection reset by peer]
voker57__ has joined #ruby-lang
voker57_ has quit [Ping timeout: 244 seconds]
imajes has quit [Excess Flood]
sailias has joined #ruby-lang
imajes has joined #ruby-lang
ssl has quit [Ping timeout: 250 seconds]
tdy has joined #ruby-lang
fowl has joined #ruby-lang
charliesome has joined #ruby-lang
imajes has quit [Excess Flood]
imajes has joined #ruby-lang
elixir has quit [Quit: ChatZilla 0.9.89 [Firefox 17.0.1/20121129151842]]
mjio has joined #ruby-lang
chendo_ has quit [Quit: Computer has gone to sleep.]
srbaker has joined #ruby-lang
scheibo has joined #ruby-lang
tyman_ has joined #ruby-lang
tyman_ has quit [Read error: Connection reset by peer]
scheibo is now known as scheibo_
reppard has quit [Ping timeout: 260 seconds]
scheibo_ is now known as scheibo
srbaker has quit [Quit: Computer has gone to sleep.]
drbrain has joined #ruby-lang
<ggreer>
aww, rmagick gem is broken with imagemagick 6.8 or later :/
<ggreer>
yes I know it's really old
gix has quit [Ping timeout: 246 seconds]
drbrain has quit [Ping timeout: 248 seconds]
gix has joined #ruby-lang
tyman has joined #ruby-lang
postmodern has joined #ruby-lang
tyman has quit [Remote host closed the connection]
<charliesome>
is there any reason why cross compiling ruby would result in [#<Encoding:ASCII-8BIT>, #<Encoding:UTF-8>, #<Encoding:US-ASCII>] being the only known encodings?
phil_sam has joined #ruby-lang
breakingthings has joined #ruby-lang
ioga_wrk has quit [Ping timeout: 255 seconds]
rippa has joined #ruby-lang
scheibo has quit []
<heftig>
charliesome: no iconv
megharsh has quit [Quit: WeeChat 0.3.9.2]
<charliesome>
does ruby rely on iconv?
<charliesome>
i wasn't aware of that
<charliesome>
i thought it had its own encoding stuff
<heftig>
for utf-8 only
<charliesome>
hm
<charliesome>
heftig: i don't think it's that, i just tried compiling a sample program that uses iconv in my cross compilation environment and it worked
ioga_wrk has joined #ruby-lang
<heftig>
charliesome: right, i was mistaken
dorao has joined #ruby-lang
jtoy has joined #ruby-lang
<heftig>
oniguruma has its own conversion engine, the transcoder (econv)
stevechiagozie has joined #ruby-lang
<charliesome>
got any other thoughts? i'm pretty stuck here :|
<dorao>
I'm looking to upload files to s3 using ruby. what library is popular? aws-sdk?
<rking>
charliesome: Does it rely on the system locales?
<rking>
E.g. is locale -a showing that exact same list?
<charliesome>
i believe ruby only looks at the system locale to determine source file encoding
<charliesome>
# locale -a
<charliesome>
-sh: locale: command not found
<charliesome>
hehe
<heftig>
charliesome: not even that
<heftig>
source file encoding is US-ASCII by default
<charliesome>
it does *something* based on LANG like that
<charliesome>
but not much
<heftig>
the default external encoding
<charliesome>
ah
<charliesome>
close enough :p
wyhaines has joined #ruby-lang
<dorao>
does anybody here use AWS ?
imajes has quit [Excess Flood]
<badeball>
dorao: i havn't used s3 with ruby, but it is my understanding that you have two (real?) options: aws-sdk and aws-s3.
imajes has joined #ruby-lang
<badeball>
(name of two gems, both on RubyGems)
imajes has quit [Excess Flood]
<dorao>
I'm having an issue with writing a file to my bucket; I get an NetworkError which is odd
<dorao>
within the same scipt, I'm able to download files from s3, and using s3cmd, I'm able to upload
My_Hearing has joined #ruby-lang
<dorao>
*shrug*
Mon_Ouie has quit [Read error: Operation timed out]
<dorao>
I guess I can always call s3cmd
imajes has joined #ruby-lang
<charliesome>
oh what the fuck
drbrain has joined #ruby-lang
<charliesome>
heftig: so it turns out that ruby didn't compile the encoding bundles for the right architecture
<heftig>
ow
<charliesome>
either i'm doing it wrong, or ruby sucks at being cross compiled
<heftig>
it's probably not tested well
<charliesome>
cross compilating is an edge case i guess
<charliesome>
compilation*
<charliesome>
yay all the encodings are loaded properly now
chimkan has joined #ruby-lang
gsav has joined #ruby-lang
gsav has quit [Read error: Connection reset by peer]
drbrain has quit [Ping timeout: 245 seconds]
chimkan___ has joined #ruby-lang
dorao has quit [Quit: messy but working]
davidbalbert is now known as davidbalber|away
chimkan has quit [Ping timeout: 248 seconds]
chimkan___ is now known as chimkan
mistym has quit [Remote host closed the connection]
adzdavies has joined #ruby-lang
wyhaines has quit [Remote host closed the connection]
chimkan has quit [Ping timeout: 245 seconds]
sailias has quit [Quit: Leaving.]
blazes816 has quit [Quit: blazes816]
seanstickle has quit [Quit: seanstickle]
RubyHead has quit []
srbaker has joined #ruby-lang
guns has joined #ruby-lang
briantrust has joined #ruby-lang
srbaker has quit [Quit: Computer has gone to sleep.]
megharsh has joined #ruby-lang
stevechiagozie has quit [Ping timeout: 255 seconds]
imajes has quit [Excess Flood]
<andrewvos>
Umm does anyone use Prompt.app on ipad? It doesn't have a pgup or pgdown button :/
imajes has joined #ruby-lang
sush24 has joined #ruby-lang
drbrain has joined #ruby-lang
phil_sam has quit [Quit: leaving]
drbrain has quit [Ping timeout: 265 seconds]
sush24 has quit [Quit: This computer has gone to sleep]
jtoy has quit [Quit: jtoy]
schroedinbug1 has quit [Quit: WeeChat 0.3.8]
schroedinbug has joined #ruby-lang
gregmoreno has joined #ruby-lang
io_syl has joined #ruby-lang
havenn has joined #ruby-lang
JohnBat26 has joined #ruby-lang
dankest is now known as dankest|away
lele has quit [Ping timeout: 246 seconds]
sush24 has joined #ruby-lang
sush24 has quit [Client Quit]
mjio has quit []
lele has joined #ruby-lang
sush24 has joined #ruby-lang
Sean__ has joined #ruby-lang
Sean__ has quit [Client Quit]
gregmoreno has quit [Remote host closed the connection]
Sean__ has joined #ruby-lang
briantrust has quit [Remote host closed the connection]
alphonse23 has joined #ruby-lang
Sean__ has quit [Ping timeout: 245 seconds]
alphonse23 has quit [Client Quit]
sush24 has quit [Quit: This computer has gone to sleep]
sush24 has joined #ruby-lang
dorao has joined #ruby-lang
breakingthings has quit []
sush24 has quit [Ping timeout: 244 seconds]
<dorao>
hello. I have a tempfile question
<andrewvos>
dorao: yay!
imajes has quit [Excess Flood]
<dorao>
if I externally run gunzip, will tempfile complain (it removes 'gz')
<andrewvos>
Will it not be a different file dorao?
imajes has joined #ruby-lang
<dorao>
hmm
Aria has quit [Remote host closed the connection]
drbrain has joined #ruby-lang
<dorao>
I guess I should just use a regular file
voker57__ has quit [Ping timeout: 244 seconds]
Asher has quit [Quit: Leaving.]
<dorao>
(and just use pid in the filename)
jsilver has quit [Read error: Connection reset by peer]
drbrain has quit [Ping timeout: 248 seconds]
<dorao>
woop works like a charm
slyphon has quit [Ping timeout: 245 seconds]
chendo_ has joined #ruby-lang
cyndis_ has quit [Read error: Operation timed out]
voker57__ has joined #ruby-lang
jxie has quit [Quit: leaving]
turbolihis has quit [Ping timeout: 252 seconds]
shaman42 has quit [Ping timeout: 252 seconds]
jxie has joined #ruby-lang
srbaker has joined #ruby-lang
ryanf has quit [Quit: leaving]
ryanf has joined #ruby-lang
solars has joined #ruby-lang
jxie has quit [Quit: leaving]
sush24 has joined #ruby-lang
<dorao>
yay! done!
dorao has quit [Quit: BitchX: Now available for the Gibson]
mpan has quit [Ping timeout: 255 seconds]
srbaker has quit [Quit: Computer has gone to sleep.]
mercwithamouth has quit [Ping timeout: 260 seconds]
spinagon has joined #ruby-lang
rippa has quit [Read error: Connection reset by peer]
Rarrrikins has joined #ruby-lang
Rarrikins has quit [Ping timeout: 265 seconds]
fowl is now known as fowl-zzz
jbsan has joined #ruby-lang
dankest|away has quit [Quit: Leaving...]
chendo_ has quit [Changing host]
chendo_ has joined #ruby-lang
arooni-mobile has quit [Read error: Connection reset by peer]
imajes has quit [Excess Flood]
imajes has joined #ruby-lang
drbrain has joined #ruby-lang
akram has joined #ruby-lang
rue has quit [Remote host closed the connection]
rue has joined #ruby-lang
hakunin has quit [Remote host closed the connection]
drbrain has quit [Ping timeout: 244 seconds]
spinagon has quit [Ping timeout: 240 seconds]
wallerdev has quit [Quit: wallerdev]
ddfreyne has quit [Excess Flood]
ddfreyne has joined #ruby-lang
sush24 has quit [Quit: This computer has gone to sleep]
dhruvasagar has joined #ruby-lang
shaman42 has joined #ruby-lang
cyndis has joined #ruby-lang
turbolihis has joined #ruby-lang
marr has joined #ruby-lang
antbody has joined #ruby-lang
<yorickpeterse>
Morning
havenn has quit [Remote host closed the connection]
<rue>
Morning everywhere
gnufied has joined #ruby-lang
<yorickpeterse>
whitequark: any release plans for the next furnace version?
vlad_starkov has joined #ruby-lang
antbody has quit [Quit: leaving]
Nisstyre-laptop has quit [Quit: Leaving]
dc5ala has joined #ruby-lang
sulo has joined #ruby-lang
chendo_ has quit [Quit: Computer has gone to sleep.]
<injekt>
darix: what's \a? /\afoo\z/ =~ "foo" #=> nil (that's why I used \A I wasn't aware of an \a)
drbrain has quit [Ping timeout: 252 seconds]
megharsh has quit [Read error: Operation timed out]
<injekt>
\a is a bell character :D
cyri_ has joined #ruby-lang
chendo_ has joined #ruby-lang
gaveen has joined #ruby-lang
gaveen has joined #ruby-lang
gaveen has quit [Changing host]
tonni has joined #ruby-lang
antbody has joined #ruby-lang
MaddinXx has joined #ruby-lang
<Paradox>
injekt, \a is the start of a string in regex
<Paradox>
not the start of a line
<Paradox>
the start of a string
<Paradox>
no
<Paradox>
wait
<Paradox>
thats \A
<Paradox>
no clue what \a is, probably a bell
guns has quit [Quit: guns]
vlad_starkov has quit [Read error: Connection reset by peer]
vlad_starkov has joined #ruby-lang
sulo has joined #ruby-lang
<injekt>
Paradox: so exactly what i just said eh? :P
<Paradox>
injekt, yop
<Paradox>
its been a long day
<Paradox>
i've had to deal with the worst monster ever to exist in programming
<Paradox>
banking apis
zz_chrismcg is now known as chrismcg
sulo has quit [Remote host closed the connection]
emocakes has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
megharsh has joined #ruby-lang
drbrain has joined #ruby-lang
drbrain has quit [Ping timeout: 260 seconds]
<gnufied>
bell bell
chendo_ has quit [Quit: Computer has gone to sleep.]
fjfish has quit [Remote host closed the connection]
My_Hearing is now known as Mon_Ouie
swav has joined #ruby-lang
voker57__ has quit [Read error: Connection reset by peer]
ddfreyne has quit [Excess Flood]
voker57__ has joined #ruby-lang
jondot` has joined #ruby-lang
ddfreyne has joined #ruby-lang
RyanScottLewis has joined #ruby-lang
megharsh has quit [Quit: WeeChat 0.3.9.2]
blacktulip has joined #ruby-lang
tbuehlmann has joined #ruby-lang
leopard_me has joined #ruby-lang
swav has quit [Remote host closed the connection]
francisfish has joined #ruby-lang
emocakes has quit [Quit: emocakes]
emocakes has joined #ruby-lang
erikh has joined #ruby-lang
dous has joined #ruby-lang
<erikh>
sup bros
<erikh>
broheims
<erikh>
bronies
dankest has joined #ruby-lang
<gnufied>
good good. I have been hacking around on a single page app. DOM is a b***h
<erikh>
I just really came to say that walter white is the best rails developer ever
<gnufied>
who the heck is walter white?
<yorickpeterse>
What is a walter?
<erikh>
walt is a whater?
<ddfreyne>
waltz with waltzer!
<antbody>
How much does it cost and can you eat it?
<gnufied>
is it tasty?
<gnufied>
and more importantly, stay off IRC while you are drunk
<erikh>
not very expensive supposedly, and I believe a common way to eat it is to rub it against your teeth
<erikh>
I forget this is the european crowd at this hour; have any of you seen "Breaking Bad"?
seoaqua has joined #ruby-lang
<RyanScottLewis>
Yesh
<RyanScottLewis>
Very much
<Paradox>
erikh, walt shoots mike
<RyanScottLewis>
=0
<Paradox>
in an old western shootout
<erikh>
I haven't actually watched any of s4 yet
<erikh>
or beyond. too busy making noise with vim
<Paradox>
and they get cowboy hats
<erikh>
cool. do they have a rap interlude in the middle of the show?
<Paradox>
yup
<Paradox>
with 90s will smith
<erikh>
hot damn you get all my jokes. will you marry me?
__BigO__ has joined #ruby-lang
<RyanScottLewis>
Methheads just don't understand.
<seoaqua>
hi guys, i got a problem, how to parse hosts with "_",pls? /usr/lib/ruby/1.9.1/uri/generic.rb:213:in `initialize': the scheme http does not accept registry part: 79660556199_qyzone.groups.tianya.cn (or bad hostname?) (URI::InvalidURIError)
<RyanScottLewis>
It just splits the URI string into an object that has helper methods for extracting different parts of the URI, like the top-level domain, the hostname, scheme, etc..
<erikh>
gnufied: fwiw, ruby's URI encoder implements one spec, and there's another, more modern spec that some web services use
chendo_ has joined #ruby-lang
<erikh>
(AWS's API needs it, for example)
imajes has joined #ruby-lang
<RyanScottLewis>
it'll also use PublicSuffixList to make sure it can parse the complicated TLDs like co.jp
Spaceghostc2c has joined #ruby-lang
<erikh>
basically the difference involves in what characters have to be encoded
drbrain has joined #ruby-lang
<gnufied>
it is somewhat crazy. I think dragonfly was once generating base64 encoded urls, which were being rejected by URI lib
<erikh>
"use this gem to really piss off your ops team"
<erikh>
"why are the app servers out of memory?"
<RyanScottLewis>
XD
<gnufied>
it took me awhile to figure out what is happening. but they base 64 encode each part and when you access that resource back, the rack app - decodes those base64 parts and puts them back together
<erikh>
it's not a bad idea I guess -- probably ok for small things.
<gnufied>
base64*
<erikh>
why? what's the reason
drbrain has quit [Ping timeout: 265 seconds]
<RyanScottLewis>
I have to make pretty much an ActiveModel clone in PHP >_< Boy, I hate this language.
antbody has joined #ruby-lang
<yorickpeterse>
hahahah
<gnufied>
erikh: I have no idea, I suspect a GUID'sh uri, that is all
<yorickpeterse>
I got 99 problems but PHP aint one
<RyanScottLewis>
yorickpeterse: I used to think the same thing =<
<gnufied>
^ thats what they use to serialize uris
* erikh
blinks
<erikh>
yeah
<erikh>
run away
<RyanScottLewis>
gnufied: Why?
<RyanScottLewis>
Oh sorry, didn't see your last comment
<yorickpeterse>
RyanScottLewis: I've more or less made an oath not to write a single line of PHP anymore
<erikh>
that's gotta tear the garbage collector a new asshole for any significantly-sized image
<gnufied>
RyanScottLewis: like I said, no idea. wasn't it considered a good practice to server static image directly from front end web server?
<RyanScottLewis>
yorickpeterse: Honestly, it's a bit refreshing to get out of the same old swing of things.. bringing Ruby concepts into PHP
<gnufied>
why will I want a rack app to server my static images
<gnufied>
(i know sometimes there is a reason)
<yorickpeterse>
RyanScottLewis: I'd rather hang myself
<gnufied>
I don't like this trend!
__BigO__ has quit [Remote host closed the connection]
<RyanScottLewis>
XD
dankest has quit [Quit: Leaving...]
<erikh>
generally you want to keep any kind of static asset completely off your app server
<RyanScottLewis>
Well, right now PHP is paying better than Ruby for me right now so this is where I'm at =<
<erikh>
(if you can)
<antbody>
Got the best christmas present when the company I work for started to port all legacy apps from PHP to RoR.
<antbody>
True nerd tears right there.
<RyanScottLewis>
=p
<antbody>
And this was legacy to the max.
<injekt>
heh, whilst I'm moving more stuff away from ruby :)
<antbody>
Like if $var = "1" $var = 1
<gnufied>
worst yet. in case of dragonfly, the request hits your rack first and then dragonfly deserializes the url, computes S3 bucket, fetches the image from bucket and returns it
<gnufied>
rack app(
<erikh>
yeah
<erikh>
that's sloooow
<RyanScottLewis>
injekt: Moving from Ruby to what?
<erikh>
I had a nginx serving straight from the filesystem, which was presented with s3fs
<erikh>
still too slow
<erikh>
injekt: heading there myself for non-chef stuff.
<erikh>
but you already know that I think.
<injekt>
RyanScottLewis: well, our work apps are written in ruby, but the api is written in Go
<injekt>
erikh: :)
<yorickpeterse>
Ah, you're a Go hipster now
<erikh>
just when I think the ghetto can't get any worse, someone from the rubinius team has to start talking
<gnufied>
lol
<injekt>
yorickpeterse: looks that way, I work in a lot of languages and go fits in well for what i'm doing
<injekt>
it probably wont ever be used for the main app because in that case, i don't think it'll fit so well
dankest has joined #ruby-lang
<RyanScottLewis>
I've dedicated myself to learning C better and learning the internals of MRuby. I'm sick of learning other peoples programming languages and have an internal need to create my own... It's tearing me apart.
m3nd3s has joined #ruby-lang
<RyanScottLewis>
But, I suck at C and they mock me in the C channel =<
<yorickpeterse>
So you're building yourself a slightly less round wheel?
<RyanScottLewis>
A very small octagon, if you will
<gnufied>
RyanScottLewis: C channel needs thick skin. it is only next to #scala
<injekt>
fuck #scala those assholes are pretty much the reason I stopped writing it
<RyanScottLewis>
gnufied: Too true, they really /really/ look down on newcomers to the language O_o
<antbody>
scala *shivers*
<ddfreyne>
#go-nuts is cool ;)
<injekt>
:P
<injekt>
it actually really is, people in there are super cool
<gnufied>
good to hear.
<RyanScottLewis>
Did the creator of Go realize that there was already a programming language with the same name?
<RyanScottLewis>
Or does Google just not give a fuck
<injekt>
The latter, of course
<ddfreyne>
RyanScottLewis: it is Go vs Go! (exclamation mark)
<injekt>
:D
<ddfreyne>
But yeah probably the latter :)
<RyanScottLewis>
Gee, I wonder which one has more results in a Google search
<RyanScottLewis>
Haha
<injekt>
meh, the name of the language frankly sucks
<ddfreyne>
injekt: I agree
<injekt>
but I really enjoy writing it
<ddfreyne>
I wish I had more Go projects
<ddfreyne>
I wrote a Go app at my Smalltalk company, but I'm sure nobody wants to touch it :D
<injekt>
I have a lot of Go work, but it's all closed sauce
<erikh>
RyanScottLewis: just a small pro tip -- unless you're zhivago, you're getting mocked in the C channel
<erikh>
brian fuckin' kernighan could go in there and get mocked.
Rarrrikins has quit [Remote host closed the connection]
<erikh>
you could do something lik that with fork
<erikh>
but you're basically playing russian roulette with your foot
<injekt>
didn't tom build bert?
<erikh>
fork only carries over the current thread
jbsan has quit [Quit: jbsan]
m3nd3s has quit []
m3nd3s has joined #ruby-lang
<erikh>
so, presuming you detach the forks and they ran their own threads, and you forked for each running thread, you could have the behavior the readme describes
<darix>
erikh: you would still need some way to access data on other threads
<erikh>
of course, fork bombing your system when a service has a critical error -- probably not the best behavior
Rarrikins has joined #ruby-lang
<darix>
also you would need something like drb, zmq so the threads could talk to each other
<erikh>
darix: yeah; I never actually write my threaded code that way but it could be a problem sure
lsegal has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
<gnufied>
this how rails gets a reputation of, build next facebook in 10 minutes
<gnufied>
:-)
<erikh>
wow, uh, he got perl running on heroku
<erikh>
what a beautiful, beautiful man
<darix>
perl *shudders* :p
vlad_starkov has joined #ruby-lang
<erikh>
it's funny, I started shitting out a rails app yesterday and really wanted to do it with dancer/dbic
<erikh>
heroku was the reason I didn't
<erikh>
so, uh, maybe I'll throw this away
<darix>
erikh: because rails is the only ruby webframework?:)
<injekt>
I've used mojo on heroku before
tbuehlmann has quit [Remote host closed the connection]
francisfish has joined #ruby-lang
<darix>
injekt: mojo?
<injekt>
darix: mojolicious, a perl web framework
dous has joined #ruby-lang
dous has quit [Changing host]
dous has joined #ruby-lang
<injekt>
I used the tool judofyr built
<erikh>
injekt: why didn't you tell me this yesterday when I was bitching about sinatra and rails
<injekt>
erikh: haha I didn't know you werent aware of perl on heroku
<injekt>
you can pretty much run anything on heroku tbh
<dominikh>
way to troll him injekt :D
vlad_starkov has quit [Remote host closed the connection]
<injekt>
you had fun though right?
<erikh>
sure, if you mean learning new and creative ways of using sed to eliminate mindless boilerplate editing
<erikh>
darix: didn't know -- is that POSIX, ksh, beyond?
<darix>
works on zsh and bash at least
<erikh>
good to know, thanks.
<injekt>
I use stuff like !! and !$ more than anything in my shell
<erikh>
I try not to have too much faith in the shell I use
<erikh>
just a consequence of being on a lot of machines
vlad_starkov has joined #ruby-lang
rue|w has joined #ruby-lang
chendo_ has quit [Changing host]
chendo_ has joined #ruby-lang
<injekt>
blah too much rails today
<injekt>
~/code/allur[master]% ls **/*.rb | wc -l 470
<injekt>
no wonder rails is slow to start
<erikh>
that's pretty small?
<injekt>
reltively yeah, that's before optimizations too
<erikh>
oh ha
<erikh>
that's the number of files. lol.
<injekt>
ya 470 files
<dominikh>
yeah not lines of code :>
<erikh>
this chef-workflow thing is getting largeish
<erikh>
simplifying some things that firmly fell into the "Deal with it later" category now, so it's getting better.
<injekt>
:D
<injekt>
117 js files, that's the worst part I think
<erikh>
ooff
<erikh>
all asset pipeline stuff?
rue|w has quit [Ping timeout: 255 seconds]
<erikh>
oh btw, did I ever show you my sprockets hack to speed up asset pipeline compilation?
<injekt>
yeah sort of, i deal with asset compiling myself because the asset pipeline sucks ass
<injekt>
nope?
<yorickpeterse>
I've heard people complain about but never dived into it, what's so bad about it?
<injekt>
yorickpeterse: it's slow and not very smart, i dont think it's solving the problem very well
jbsan has joined #ruby-lang
<yorickpeterse>
define "not very smart"
<yorickpeterse>
(I'm genuinely curious)
madish has joined #ruby-lang
<injekt>
one of our developers was having lots of issues with javascript compiling and such, when I couldn't find/fix the issue I stopped using the asset pipeline and implemented something myself, haven't had issues since. I can't really remember all of the issues I was having but there were plenty, probably a lot of stuff on google
<injekt>
it doesn't mix well with engines very much, either
vlad_starkov has quit [Remote host closed the connection]
<erikh>
injekt: my little rake hack nearly tripled the speed at our place
<erikh>
it was taking ~7 minutes before, ~2 after
<injekt>
wow
<erikh>
basically, during precompile it does a bunch of work, and then to reset the cache it actually forks and execs ruby -- from the shell -- to execute another rake task
<erikh>
so I put the effort in to identify what caches needed to be cleared
<injekt>
eh
<erikh>
you'd be surprised how much faster it gets when it doesn't have to re-execute that mess a second time
<injekt>
heh, rails and its related 'core' dependencies just seem to be getting slower
<injekt>
our work app has so many hacks to speed things up
<erikh>
yeah, sounds about right
<injekt>
I read an article a few weeks ago about a raw insert being ~70x faster than ar processing and inserting itself
<yorickpeterse>
> Rails
<yorickpeterse>
> Performance
<yorickpeterse>
lol
<erikh>
injekt: well, yeah -- I tried to fix that a few years ago
<injekt>
erikh: what happened?
<erikh>
but I think you know that for some reason
<erikh>
(I think you still have a commit bit!)
<injekt>
oh
<injekt>
yes
<injekt>
:)
<injekt>
I just dont understand how these things arent being fixed
<erikh>
they don't see them as problems.
<erikh>
devise, when you use case insensitive modes, runs this query against hte login key
<injekt>
yeah I guess that's my biggest issue with rails
<erikh>
select * from users where LOWER(email) = LOWER(?);
<erikh>
it doesn't take rocket science to figure out that's not going to hit an index
<yorickpeterse>
erikh: wat
<injekt>
it uses that entire query? not column selects, no limits?
<erikh>
it might do id or something, really doens't matter for this case
<injekt>
'heh
<erikh>
the LOWER() in the where is busting the index
<injekt>
the title is a little misleading, but I spoke to about 8 guys in the rails channel and no one could work it out so im not even entirely sure what the problem is
<dominikh>
beats my 119 for explaining how to run gem build :D
<dominikh>
injekt: "one of the best answers i've ever gotten to a programming question. thanks"
<injekt>
dominikh: haha yeah
<injekt>
dominikh: haha did you downvote it?
<dominikh>
maybe
drbrain has quit [Ping timeout: 265 seconds]
<erikh>
injekt: can you send the query now() or current_timestamp() instead of using the time value from AR?
<erikh>
those are the sql functions that postgres supports natively -- they run on the query itself
<injekt>
erikh: trying that
chendo_ has joined #ruby-lang
<erikh>
e.g., equivalent sql: update teams set user_id=blah, last_assigned_contact_at=now() where id=420;
<erikh>
another advantage to this is, if you have a ton of app servers, that time will always be consistent regardless of any clock skew between the app servers
<erikh>
(because it actually executes on the db server)
<injekt>
well shit
<erikh>
let me know if you need an address to send that check to
<injekt>
fuck you rails
<injekt>
and <3 erikh
sush24 has joined #ruby-lang
<injekt>
I wonder why rails is choking on this
<darix>
injekt: you cant blame it on rails yet
<yorickpeterse>
because fuck you
sepp2k has joined #ruby-lang
<injekt>
darix: sure i can, it works when I use now() but not when I use Time.current, who elses fault is it?
<darix>
from all the infos we had so far it could also be the sql server
<darix>
thats why i asked in the query if the same results happen if you use plain sql queries to do the actions
Banistergalaxy has quit [Ping timeout: 246 seconds]
<injekt>
darix: I dont know I haven't tested it, as I said I lost patience for this a long time ago, so I'll probably revisit and try and work out the real issue when i have time again
<injekt>
darix: the app is there and only a clone away if you're interested in debugging it, though
<injekt>
a few people have looked at it and couldn't figure out what was happening
<erikh>
well
<erikh>
now() is a postgres-ism IIRC
<erikh>
so that's hard to abstract
<erikh>
it's also variant on type
<erikh>
you'll notice that select now()::timestamp is different from now()::date, for example
<erikh>
it's not the sql server.
<injekt>
yeah and i need microsecond precision because records are being updated so fast
<erikh>
I'd put money on the rails app generating the time and sending it to the database
<erikh>
largely because it's hard to remain portable unless you do that
<erikh>
that's one of many problems with ORMs.
<injekt>
yeah it definitely does that I can see it in the logs, but if the timestamp is including ms then it shouldn't be a problem anyway? as long as the stamps are unique
<erikh>
just to be clear, it's not an easy problem to solve and I can't really fault AR's architects for not caring
<erikh>
injekt: well, depends
<erikh>
are you running multiple app servers? how long does it take to get to the database? how long before the transaction completes?
<erikh>
all are ways to fuck with something that has such high precision
<injekt>
heh
<erikh>
and that's long before you get into things like caching and so on which make this harder to debug
<erikh>
anyhow
<darix>
erikh: well they already have some things where they emulate stuff for DBs that doesnt support the feature. so adding another hook for time.now like queries ... shouldnt be hard
<erikh>
well, 'emulate' very likely means "do as little as possible to keep people happy"
<erikh>
and honestly if they generated now() it would have other repercussions
Nss has joined #ruby-lang
<erikh>
let's say you did this: foo = FooModel.new; foo.time = Time.current; foo.save; p foo.time
<erikh>
what happens between foo.save and foo.time?
<erikh>
(a reload, if you want to give a valid answer)
<erikh>
what if you use foo.time before the save? what should happen then? etc etc
<injekt>
fun stuff
<erikh>
basically the only way you're getting around it is by generating the time at the time Time.current is called, but implementing it in a way that it matches, type-for-type, what now() would produce
<erikh>
which is probably close to what they do now -- and also why it doesn't work for injekt's case
xalei has quit [Remote host closed the connection]
<darix>
erikh: dont you already have the problem for things like updated_at/created_at ?
<erikh>
I'd be very surprised if it doesn't have this problem too
stevechiagozie has joined #ruby-lang
x0F has quit [Disconnected by services]
x0F_ has joined #ruby-lang
<injekt>
that's what the guy who answered my questions brought up, he said it doesn't happen and using write_attribute should work because it bypasses any time zone conversion (where rails rounds off the usec) but his solution didn't work, either
<erikh>
what's really gonna beat your brain down is that not only do IEEE floats start becoming a liability at this point of precision, but also that for the longest time, ruby's Date libraries couldn't present this much precision
x0F_ is now known as x0F
<erikh>
it's almost like I've written database libraries for postgres before and handled this exact issue
<erikh>
:P
<erikh>
injekt: that's not really the problem I think. it's a classic race
<injekt>
erikh: yeah, the thing is it should be easy to reproduce by updating a ton of records in quick succession and ordering by updated_at, but that works fine
<erikh>
Time.current simply doesn't represent the time the record was written
<erikh>
and that's enough time to matter
<erikh>
injekt: are you typing it in or hitting it with a script?
<erikh>
I bet if you hit it with a script that did it, you'd see it.
stevechiagozie has quit [Ping timeout: 250 seconds]
<erikh>
well, something that did several writes in parallel
<injekt>
erikh: right, but mine doesn't do writes in parallel (the original), if I do pretty much the exact same script except just touch the object and order by updated, they're fine
<erikh>
hmm
<erikh>
does the script hit the web server or does it run the queries directly?
<injekt>
directly, i threw them in db/seeds that's how I've been testing them on the app I linked to
jonahR has joined #ruby-lang
<erikh>
hmmmmmm
<erikh>
what happens if you team.reload after the update_attributes?
<erikh>
I still think you're doing this wrong if you're not using now(), but it could be, in your case, just a stupid caching issue
Nss has quit [Ping timeout: 255 seconds]
<injekt>
erikh: it's an lvar im not sure how that would help
<erikh>
just try it :)
megharsh has joined #ruby-lang
kurko_ has joined #ruby-lang
Nss has joined #ruby-lang
seanstickle has joined #ruby-lang
<injekt>
yeah no workie
jonahR has quit [Quit: jonahR]
stevechiagozie has joined #ruby-lang
<erikh>
meh
<erikh>
no idea then
Banistergalaxy has joined #ruby-lang
Nss has quit [Ping timeout: 248 seconds]
jstemmer has joined #ruby-lang
Nss has joined #ruby-lang
<erikh>
I should probably do something more productive than bitch in irc
<erikh>
ttfn
erikh has left #ruby-lang ["WeeChat 0.3.9.2"]
rsl__ has joined #ruby-lang
seanstickle has quit [Quit: seanstickle]
Nss has quit [Client Quit]
imajes has quit [Excess Flood]
lcdhoffman has joined #ruby-lang
imajes has joined #ruby-lang
drbrain has joined #ruby-lang
emocakes has quit [Quit: emocakes]
Rarrikins has quit [Read error: Connection reset by peer]
<yorickpeterse>
Hm that reminds me, my new parser probably doesn't do op assigns
sush24 has quit [Quit: This computer has gone to sleep]
<whitequark>
yorickpeterse: he tried to use RP's lexer but it fails on pathological inputs
<yorickpeterse>
hmm
<whitequark>
through there isn't really much sense to rewrite it to get basically the same shit again
<whitequark>
as per parser, I dunno, probably NIH syndrome
<whitequark>
because there isn't really a reason to not use RP's grammar.y. it's quite good and only needs a minor cleanup.
briantrust has joined #ruby-lang
<whitequark>
yorickpeterse: talking about opal, I don't exactly see a reason for it to exist.
tdy has quit [Read error: Connection reset by peer]
rippa has joined #ruby-lang
<yorickpeterse>
tbh I think it would be better suited than Coffeescript, at least when targeting Rubyists
tdy has joined #ruby-lang
slyphon has joined #ruby-lang
<whitequark>
exactly. it explicitly cannot run existing code
<whitequark>
and unless you can run existing code unmodified, transpilers are not worth it
slyphon_ has joined #ruby-lang
slyphon has quit [Ping timeout: 245 seconds]
dafalcon` has joined #ruby-lang
srbaker has joined #ruby-lang
chimkan has joined #ruby-lang
sush24 has joined #ruby-lang
dafalcon has quit [Ping timeout: 245 seconds]
tonni has quit [Read error: Connection reset by peer]
tonni has joined #ruby-lang
chimkan has quit [Quit: chimkan]
gnufied has quit [Quit: Leaving.]
AndChat- has joined #ruby-lang
Banistergalaxy has quit [Ping timeout: 252 seconds]
wyhaines has joined #ruby-lang
ambethia has joined #ruby-lang
Asher has quit [Quit: Leaving.]
chimkan has joined #ruby-lang
drbrain has joined #ruby-lang
dhsmith has joined #ruby-lang
scheibo has joined #ruby-lang
jxie has joined #ruby-lang
srbaker has quit [Quit: Computer has gone to sleep.]
neocoin has quit [Remote host closed the connection]
drbrain has quit [Ping timeout: 255 seconds]
neocoin has joined #ruby-lang
mercwithamouth has joined #ruby-lang
fowlertm has joined #ruby-lang
lempface has joined #ruby-lang
fowlertm has left #ruby-lang [#ruby-lang]
<lempface>
I am having the hardest time getting this regular expression to work. Basically I am using Watir to automate some web browser tasks here at work and I need to find the ID of the button I want to click. I am attempting to do this by location a line that will give me that ID through regex searching the entire html source. If I test my expression in a regex tester app after pasting in the source I get the match I want. If I explicitly
<lempface>
in ruby I also get the match, but not when I pull the html from Watir.
<canton7>
yuck, html + regex don't work well together, in general
<canton7>
(html isn't regular, so can't be described by regular expressions, etc etc)
<yorickpeterse>
lempface: First rule of parsing HTML is to **NOT** use regular expressions
<lempface>
well maybe you have another idea, I am basically deactivating a work order. I give a function the name of the workorder i.e. "Company Box 10000" and in the html I have <option rowid="21110">Company Box 10000</option>, then the button I want to click is going to be id="21110_submitSave"
<lempface>
so I need that id to make sure I am pressing the correct button
<injekt>
doc.at_xpath('//option[. = "Company Box 10000"]')['value'] should also work
kentos has joined #ruby-lang
<lempface>
cool that seems to be working!
tbuehlmann has quit [Remote host closed the connection]
<lempface>
frustrating time clock system, they give us read only access to the mysql db, so to automate some tasks that take 10+ hrs a week I can't easily just change values but have to use web browser automation.. coming from vb.net ruby is a bit of a mind blower
gnufied has joined #ruby-lang
<lempface>
any thoughts on building the gui front end for this? IronRuby maybe?
<lempface>
eh maybe just a windows form that produces a parsable output file for the rb to execute
<injekt>
oh god
<injekt>
guis
<lempface>
hah the people that will use this app are not the mightiest and brightest in the world
ivanoats has joined #ruby-lang
drbrain has quit [Ping timeout: 244 seconds]
dankest has joined #ruby-lang
<lempface>
Ahhh... so much easier to specify the button you want when you have the id =) That worked absolutely beautifully.
lcdhoffman has quit [Quit: lcdhoffman]
tbuehlmann has joined #ruby-lang
<zzak>
good morning!
<lempface>
morning zzak
reppard has joined #ruby-lang
dous has quit [Remote host closed the connection]
imperator has joined #ruby-lang
Nss has joined #ruby-lang
Nss has quit [Remote host closed the connection]
Artheist_ has joined #ruby-lang
lcdhoffman has joined #ruby-lang
blazes816 has joined #ruby-lang
sush24 has joined #ruby-lang
<imperator>
yo
sulo has joined #ruby-lang
gnufied has quit [Quit: Leaving.]
reppard has quit [Ping timeout: 255 seconds]
marr has joined #ruby-lang
sulo has quit [Remote host closed the connection]
sailias has quit [Quit: Leaving.]
sailias has joined #ruby-lang
briantrust has quit [Remote host closed the connection]
<lempface>
with nokigiri if I want to find <div class="pageSelect"> is it html.doc.css("div#pageSelect") ?
<lempface>
html_doc rather
richardjortega has joined #ruby-lang
<seanstickle>
div.pageSelect
ivanoats has quit [Remote host closed the connection]
<seanstickle>
# is for ids
<banisterfiend>
seanstickle: sup stick.
<lempface>
thanks
<seanstickle>
Heya banisterfiend .
ivanoats has joined #ruby-lang
<banisterfiend>
seanstickle: Stick.
<seanstickle>
Yup
vlad_starkov has joined #ruby-lang
dhruvasagar has joined #ruby-lang
dankest is now known as dankest|away
dankest|away has quit [Quit: Leaving...]
<injekt>
lempface: yeah, I think .pageSelect would work too
lcdhoffman has quit [Quit: lcdhoffman]
gnufied has joined #ruby-lang
gnufied has quit [Client Quit]
<lempface>
is there an easy way to validate the existence of an 'a' with innertext "foobar" that would be a child of that <div class="pageSelect"> ?
ivanoats has quit [Remote host closed the connection]
<injekt>
lempface: //div[contains(text(), 'a')]
jondot` has joined #ruby-lang
dhruvasagar has quit [Read error: Connection reset by peer]
<injekt>
oh wait [text()[contains(., 'a')]
francisfish has quit [Remote host closed the connection]
<injekt>
I believe
<injekt>
I cant check right now
emocakes has quit [Quit: emocakes]
emocakes has joined #ruby-lang
nyuszika7h has quit [Read error: Connection reset by peer]
drbrain has joined #ruby-lang
nyuszika7h has joined #ruby-lang
<lempface>
thanks again injekt ill try it momentarily
nyuszika7h has quit [Read error: Connection reset by peer]
imajes has quit [Excess Flood]
dankest has joined #ruby-lang
imajes has joined #ruby-lang
zmack has joined #ruby-lang
<lempface>
sorry injekt I wasn't clear, the div has children link tags <a ..>foobar</a>, I wan't to verify that a link tag exists with innertext foobar
<injekt>
lempface: can you paste a snippet of html and the output you want?
<injekt>
I'm a little confused
<lempface>
sure
drbrain has quit [Ping timeout: 260 seconds]
<lempface>
what is the preferred paste site?
cyri_ has quit [Quit: cyri_]
<ambethia>
lempface, looks like gist, from the topic
<lempface>
thanks ambethia, I forget to check those sometimes
<ambethia>
:D
<lempface>
i just recalled that someone mentioned they didn't prefer pastebin last time I was here
<injekt>
yeah man fuck pastebin
<lempface>
lawl
<zzak>
someone actually updated the topic, nice
<zzak>
needs p362 tho
cirwin has joined #ruby-lang
<injekt>
aye
<injekt>
damn no-one changing it on xmas day
<seanstickle>
lempface: gist
<zzak>
injekt: seriously, someone is fired
<injekt>
zzak: yeah or just like not pay them for a month, that'll show them
<zzak>
injekt: and dont tell them, just keep redirecting them between payroll and hr
<injekt>
YEAH
<injekt>
matz and matz
<zzak>
i try to stay on matz good side, because we all know MINBSHCBAHD
<injekt>
man I am trying to come up with something
<zzak>
matz is nice but sometimes he can be a huge dick
<lupine>
you could define Foo::Xyz and Bar::Xyz as the respective subclasses
<lempface>
forgot the nil?
drbrain has joined #ruby-lang
<lupine>
but that'd get weird if you forgot
<injekt>
lempface: the nil is only to force boolean value, you dont need it
ivanoats has quit [Ping timeout: 265 seconds]
sailias has joined #ruby-lang
Artheist_ has quit [Remote host closed the connection]
<llaskin>
lupine: ty. that is the answer I was looking for. are all class variables available within modules inside of a class?
GitNick has quit [Ping timeout: 240 seconds]
<injekt>
class variables :(
GitNick has joined #ruby-lang
AndChat- has quit [Ping timeout: 248 seconds]
<lupine>
llaskin, I never use them, so can't answer sanely
<lupine>
you can look it up, or try it out
<lupine>
or find a different way to do what you want ^^
<lempface>
zzak same error with or without the nil?
drbrain has quit [Ping timeout: 245 seconds]
llaskin1 has joined #ruby-lang
<injekt>
lempface: you mean unexpected '1' after equal not 'l' :P
llaskin1 has quit [Changing host]
llaskin1 has joined #ruby-lang
<llaskin1>
wait
<llaskin1>
why are class vars bad?
<whitequark>
llaskin1: no, class variables aren't available in nested modules inside a class
<llaskin1>
i would assume they are better then using global...
<llaskin1>
they aren't
<llaskin1>
hrmmm
<llaskin1>
is there any way to share a var between modules
<lempface>
injekt most likely this rubymine font looks very similar 1s and ls
<zzak>
you could use class getter/setter methods
<injekt>
lempface: anyway, you just need to write the 1 in quotes, that's all
llaskin has quit [Ping timeout: 248 seconds]
<llaskin1>
or does each module have to have its own set of vars?
<whitequark>
llaskin1: they're considered harmful for some because when you change the value of a class variable in a subclass, you are actually changing the value of a class variable at the point of its definition
<injekt>
lempface: page=1 is invalid, page="1" is fine
<zzak>
injekt: thank you
<injekt>
yeah, use class instance variables SAY WHAT
<injekt>
zzak: <3
<lupine>
well, there's class variables, and class instance variables, and they're different
cyri_ has quit [Quit: cyri_]
<whitequark>
injekt: class variables have valid use cases
<injekt>
whitequark: I never said they didn't?
<lupine>
class Foo ; @bar = 1 ; end vs class Foo ; @@bar = 1 ; end
<whitequark>
injekt: hmpf, nevermind
Banistergalaxy has joined #ruby-lang
<llaskin1>
sorry, i meant instance varaibles
<injekt>
whitequark: ;)
zmack has quit [Remote host closed the connection]
<lupine>
the main thing I use them for would be class registries
<lupine>
which are occasionally useful
<whitequark>
lupine: there are also times when being able to access a var with @@something from both class context and instance context is extremely useful
<lupine>
the eloquent ruby book goes over both types in quiter some detail IIRC
sepp2k has joined #ruby-lang
tjadc has joined #ruby-lang
zmack has joined #ruby-lang
<lempface>
injekt/zzak what does the '>' function as in that code
voker57__ has quit [Read error: Connection reset by peer]
<rue>
The xpath subset is mostly OK, you can program the rest with a real language
<injekt>
document enterprises you
chimkan has quit [Quit: chimkan]
<lempface>
I've decided navigating html sucks
marr has quit [Ping timeout: 255 seconds]
<zzak>
hah
swav has joined #ruby-lang
<tockitj>
is there a way of retrieving a fully qualified class name of ruby class (with all name-spaces it belongs to) ?
<lupine>
Class#name ?
<tockitj>
like A::B::C::D
<injekt>
[2] pry(main)> module A; class B; p self.ancestors; end; end
<injekt>
[A::B, ...]
<tockitj>
it works! :)
<tockitj>
thanks
swav has quit [Remote host closed the connection]
reppard has joined #ruby-lang
<lempface>
I need to write a routine that loops through an html tables 2nd cell of rows with a specific class and compares a div's innertext for equality
<lempface>
this should be fun!
<injekt>
seems trivial
<injekt>
table/tr[2] <- second row
<lempface>
2nd cell
<injekt>
o
<injekt>
table/td[2] come at me bro
<lempface>
table class=pagedata / tbody / tr class="pdtRow hi header" / div text equalto? workorder
cyri_ has quit [Quit: cyri_]
<injekt>
you forgot the cell
<lempface>
and that
vlad_starkov has quit [Read error: Connection reset by peer]
<injekt>
table[@class="pagedata"]/tbody/tr[@class="pdtRow hi header"]/td/div[.="workorder"]
vlad_sta_ has joined #ruby-lang
<injekt>
could probably be well simplified depending on the rest of the document
lcdhoffman has joined #ruby-lang
<lempface>
/td[2]?
<injekt>
right
<lempface>
I guess I could just get the pdtRow hi header trs
vlad_sta_ has quit [Read error: Connection reset by peer]
vlad_starkov has joined #ruby-lang
<injekt>
:)
reppard has quit [Ping timeout: 264 seconds]
stonerfish has quit [Quit: Leaving.]
<injekt>
I would probably do tr[..]/following::div[.="wordorder"] or something
<injekt>
following-sibling i guess
<injekt>
*shrug*
adambeynon has joined #ruby-lang
MaddinXx has quit [Remote host closed the connection]
larrylv has joined #ruby-lang
sush24 has quit [Ping timeout: 255 seconds]
drbrain has joined #ruby-lang
ebouchut has joined #ruby-lang
MaddinXx has joined #ruby-lang
<lempface>
I tihnk I am almost there I have a list of all the <a> tags how do I extract the text? //tr[@class="foobar"]/td[2]/div/a[text()] or a[text] doesn't seem to work
<lempface>
I feel like I did when learning regex, its pretty simple but the syntax is so wildly different it is hard to wrap your head around at the beginning
zmack has quit [Remote host closed the connection]
drbrain has quit [Ping timeout: 252 seconds]
burgestrand has joined #ruby-lang
<lempface>
can't I return the list of link.text in one line?
<lempface>
hi = html_doc.xpath("//tr[@class='pdtRow hi header']/td[2]/div/a")
<lempface>
I figure ruby will have a nifty trick up its sleeve for doing such a thing
zmack_ has joined #ruby-lang
chimkan has joined #ruby-lang
larrylv has quit [Remote host closed the connection]
sush24 has joined #ruby-lang
pabloh has joined #ruby-lang
drbrain has joined #ruby-lang
<injekt>
lempface: .map(&:text)
drbrain has quit [Remote host closed the connection]
drbrain has joined #ruby-lang
<darix>
why not using html_doc.xpath("//tr[@class='pdtRow hi header']/td[2]/div/a/text()") ?
drbrain has quit [Ping timeout: 244 seconds]
srbaker has joined #ruby-lang
<injekt>
because that'll still return nokokiri objects not strings
__BigO__ has joined #ruby-lang
m3nd3s has quit [Remote host closed the connection]
sush24 has quit [Ping timeout: 260 seconds]
<lempface>
Well i'd try that but my first array index has some erroneous data in it that isn't from a tr with the class i specified. is this normal?
dankest|away is now known as dankest
ivanoats has joined #ruby-lang
ivanoats has quit [Changing host]
ivanoats has joined #ruby-lang
Rarrikins_z has joined #ruby-lang
Rarrikins is now known as Guest34956
Guest34956 has quit [Killed (gibson.freenode.net (Nickname regained by services))]
Rarrikins_z is now known as Rarrikins
<lempface>
well at least printing to the console returned expected results
<injekt>
what kind of results?
sush24 has joined #ruby-lang
<lempface>
html_doc.xpath("//tr[@class='pdtRow hi header']/td[2]/div/a").map {|link| link.text} -- returns an array of half of the work orders for me to compare
<lempface>
the other half are pdtRow lo header class
ivanoats has quit [Remote host closed the connection]
<lempface>
do it twice and combine the array or is there a way to get both classes at the same time
<lempface>
conditional and maybe
<injekt>
im confused
Ober has quit [Excess Flood]
<lempface>
well the dev's of this webapp use tr class "pdtRow hi header" and class "pdtRow lo header" to color alternating rows differently
<lempface>
so that line i just pasted gets me all of the white backgrounded row data, and if I did it again with LO I'd get the grey backgrounded row data
srbaker has quit [Quit: Computer has gone to sleep.]
<lempface>
can do something like @class='pdtRow hi header' AND 'pdtRow lo header'
<lempface>
?
lsegal has joined #ruby-lang
<lempface>
I could just create 2 arrays, and .zip.flatten to get them back in order
<injekt>
yeah you can do that
jaimef has joined #ruby-lang
<lempface>
easy enough then
<injekt>
@class='foo' and @class='bar'
jaimef has quit [Excess Flood]
adambeynon has quit [Quit: Computer has gone to sleep.]
<lempface>
it did not like that
<lempface>
returned empty array
<injekt>
oh you want or
<injekt>
of course
<lempface>
derp
<injekt>
and makes no sense there :)
<lempface>
I'm derpin
<lempface>
oh boy =)
<lempface>
perfecto
<injekt>
:)
<emocakes>
oh ruby, why can't you be more like php...
Ober has joined #ruby-lang
sulo has joined #ruby-lang
<lempface>
gb2php?
<injekt>
wtf
<emocakes>
gb? good bye?
<injekt>
fophp
<injekt>
I think you can work that one out
<emocakes>
ahh, clever!
<injekt>
:)
<injekt>
and who in their right mind would want ruby to be ANYTHIGN like php
<lempface>
go back 2
<injekt>
do not past go do not collect 200 bucks
<emocakes>
someone who knows php and is trying to hammer ruby into his head :p
<injekt>
emocakes: what are you trying to do?
<lempface>
I'm doing the same from .net
<emocakes>
i actually wish I could replace the php stuff in my head with ruby
<emocakes>
then id be happy injekt
<lempface>
but I did ruby a while ago prior to .net and <3 it still
tdy has quit [Read error: Connection reset by peer]
<emocakes>
nothing in particular, just feel retarded productivity wise
<injekt>
I wish ruby was a lot of things, too
<zzak>
injekt: its a trap!
<lempface>
wish ruby had a gui ide
<injekt>
zzak: D:
swav has joined #ruby-lang
<emocakes>
rubymine lempface
<injekt>
ew rubymine
<lempface>
that is what i am working i
<emocakes>
most ruby i did was in 2007
<lempface>
and it is such a hogggg
<emocakes>
a bot
tdy has joined #ruby-lang
<emocakes>
hpricot and nokogiri <3
<lempface>
I'm learning nokogiri today too with tons of help from zakk and injekt
<Paradox>
and some people who are probably stupid dont like it
swav has quit [Remote host closed the connection]
<lempface>
bahahah
jaimef has joined #ruby-lang
<zzak>
lempface: if you feel confused, its probably because you are learning, that is a good thing!
GarethAdams has joined #ruby-lang
rippa has quit [Ping timeout: 240 seconds]
zmack_ has quit [Ping timeout: 260 seconds]
chimkan has quit [Quit: chimkan]
<zzak>
its important to try things on your own in this stage, and learn at your own pace
<zzak>
if we give you the answers all the time you won't be learning anything
<emocakes>
zzak, i never thought of it that way
<emocakes>
i've been feeling confused and have just been calling myself stupid and crying myself to sleep with a tub of choc-chip ice cream recently
<emocakes>
guess you can see the glass half full or half empty
chimkan_ has joined #ruby-lang
Ober has quit [Read error: Connection reset by peer]
<lempface>
.map or .collect, who you got?!
<nyuszika7h>
hi, any idea what am I doing wrong here? http://ix.io/3Mq/ - ruby 1.9.3p327 (2012-11-10 revision 37606) [x86_64-linux]
swav has joined #ruby-lang
sulo has quit [Remote host closed the connection]
<lempface>
are there any lighter weight ruby ide's that have a nice debug interface similar to ruby mine? code completion is nice but not required just seems crazy to me this thing will chew as much memory as you give it. Also when looking through debug variable data I often run out of memory.
<jost>
hi! I'm new to ruby and rails etc., and am running into trouble when running 'rake db:migrate' after scaffolding a simple model: If I run it with the mysql2 adapter, migration aborts with "undefined method `accept' for nil:NilClass". If he database connections are changed to the mysql adapter, the error message becomes "database configuration specifies nonexistent mysql adapter". What is the problem?
<zzak>
jost: try #rubyonrails
<jost>
zzak, ok, I'll do that
<jost>
thanks
<injekt>
jost: what version of mysql2?
<jost>
injekt: 0.3.11
<injekt>
jost: can you paste your gemfile and database.yml
<jost>
and 2.9.0 of mysql
<injekt>
dont have them both in the gemfile at the same time :)
sulo_ has quit [Remote host closed the connection]