apeiros changed the topic of #ruby-lang to: Nick registration required to talk || Ruby 2.0.0-p195: http://ruby-lang.org (Ruby 1.9.3-p429) || Paste >3 lines of text on http://gist.github.com
<darix>
postmodern: maybe that will help me with my gpg problem too
<darix>
but something for after sleeping
guns has quit [Remote host closed the connection]
GarethAdams has quit [Quit: Leaving...]
workmad3 has quit [Ping timeout: 264 seconds]
stamina has quit [Ping timeout: 260 seconds]
mrsolo has quit [Quit: Leaving]
MartynKeigher has quit [Read error: Operation timed out]
Bosox20051 has quit [Remote host closed the connection]
__butch__ has quit [Quit: Leaving.]
teleological has joined #ruby-lang
teleological has quit [Remote host closed the connection]
MartynKeigher has joined #ruby-lang
gregmoreno has joined #ruby-lang
gregmoreno has quit [Ping timeout: 248 seconds]
diegoviola has joined #ruby-lang
tylersmith has joined #ruby-lang
_jpb_ has quit [Ping timeout: 248 seconds]
_jpb_ has joined #ruby-lang
tylersmith has quit [Ping timeout: 256 seconds]
tkuchiki has joined #ruby-lang
marr has quit [Ping timeout: 260 seconds]
duph has joined #ruby-lang
lcdhoffman has joined #ruby-lang
lcdhoffman has quit [Client Quit]
cofin has joined #ruby-lang
Mawk has quit [Quit: Mawk]
jds__ has quit [Read error: Connection reset by peer]
jds_ has joined #ruby-lang
nathanstitt has joined #ruby-lang
mootpointer has joined #ruby-lang
brianpWins has quit [Quit: brianpWins]
synthetix has quit [Ping timeout: 260 seconds]
runeb has quit [Remote host closed the connection]
jonahR has quit [Quit: jonahR]
diegoviola has quit [Ping timeout: 256 seconds]
tylersmith has joined #ruby-lang
runeb has joined #ruby-lang
runeb has quit [Remote host closed the connection]
arubin has joined #ruby-lang
dhruvasagar has joined #ruby-lang
GeissT has joined #ruby-lang
diegoviola has joined #ruby-lang
gja has quit [Quit: This computer has gone to sleep]
benten has joined #ruby-lang
Sambalero has quit [Remote host closed the connection]
benten has left #ruby-lang [#ruby-lang]
nathanstitt has quit [Quit: I growing sleepy]
_jpb_ has quit [Ping timeout: 264 seconds]
_jpb_ has joined #ruby-lang
duph has quit [Quit: Leaving.]
Sambaler_ has joined #ruby-lang
fosky has joined #ruby-lang
Sambaler_ has quit [Remote host closed the connection]
publicvoid_ has quit [Ping timeout: 248 seconds]
enebo has joined #ruby-lang
nathanstitt has joined #ruby-lang
enebo has quit [Client Quit]
SilverKey has joined #ruby-lang
pbjorklund has joined #ruby-lang
SilverKey has quit [Client Quit]
brianpWins has joined #ruby-lang
duph has joined #ruby-lang
lsegal has joined #ruby-lang
tylersmith has quit [Remote host closed the connection]
x0f_ has quit [Ping timeout: 240 seconds]
x0f has joined #ruby-lang
pbjorklund has quit [Ping timeout: 264 seconds]
x0f has quit [Ping timeout: 256 seconds]
x0f has joined #ruby-lang
pbjorklund has joined #ruby-lang
duph has quit [Quit: Leaving.]
jxpx777 has quit [Quit: Leaving...]
jxpx777 has joined #ruby-lang
_jpb_ has quit [Ping timeout: 252 seconds]
_jpb_ has joined #ruby-lang
hogeo has joined #ruby-lang
hogeo has quit [Remote host closed the connection]
cored has quit [Ping timeout: 264 seconds]
cofin has quit [Remote host closed the connection]
Sambalero has joined #ruby-lang
fenicks has quit [Read error: Connection reset by peer]
Sambalero has quit [Remote host closed the connection]
woollyams has joined #ruby-lang
jonahR has joined #ruby-lang
machuga|away is now known as machuga
roadt has joined #ruby-lang
pbjorklund has quit [Ping timeout: 264 seconds]
fridim_ has quit [Ping timeout: 252 seconds]
_jpb_ has quit [Ping timeout: 248 seconds]
_jpb_ has joined #ruby-lang
hogeo has joined #ruby-lang
vlad_starkov has joined #ruby-lang
runeb has joined #ruby-lang
pbjorklund has joined #ruby-lang
hogeo has quit [Remote host closed the connection]
bougyman has quit [Remote host closed the connection]
bougyman has joined #ruby-lang
_jpb_ has quit [Ping timeout: 240 seconds]
benxao has joined #ruby-lang
benxao has quit [Remote host closed the connection]
tbuehlmann has quit [Remote host closed the connection]
_jpb_ has joined #ruby-lang
vlad_starkov has joined #ruby-lang
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
relix has joined #ruby-lang
relix has quit [Client Quit]
MartynKeigher has quit [Read error: Operation timed out]
MartynKeigher has joined #ruby-lang
tenderlove has joined #ruby-lang
gja has quit [Quit: This computer has gone to sleep]
tenderlove has quit [Ping timeout: 256 seconds]
SilverKey has quit [Ping timeout: 264 seconds]
<darix>
postmodern: btw: just converted my mail script to the parts api and yes the mail looks better. but mutt still doesnt want to decrypt it properly
pskosinski has joined #ruby-lang
machuga|away is now known as machuga
M_BlX has joined #ruby-lang
bougyman has quit [Remote host closed the connection]
bougyman has joined #ruby-lang
Zeeo has joined #ruby-lang
GarethAdams has joined #ruby-lang
Weems has quit [Ping timeout: 246 seconds]
Domon has quit [Remote host closed the connection]
Kero has quit [Read error: Operation timed out]
Kero has joined #ruby-lang
hogeo has quit [Remote host closed the connection]
_jpb_ has quit [Ping timeout: 264 seconds]
_jpb_ has joined #ruby-lang
t0h has quit [Ping timeout: 256 seconds]
t0h has joined #ruby-lang
barttenbrinke has quit [Remote host closed the connection]
barttenbrinke has joined #ruby-lang
mbj has quit [Ping timeout: 256 seconds]
workmad3 has joined #ruby-lang
hhatch has quit [Ping timeout: 240 seconds]
krz has quit [Quit: krz]
mbj has joined #ruby-lang
t0h has quit [Ping timeout: 256 seconds]
relix has joined #ruby-lang
barttenbrinke has quit [Ping timeout: 240 seconds]
scholar01 has joined #ruby-lang
scholar01 has quit [Changing host]
scholar01 has joined #ruby-lang
t0h has joined #ruby-lang
stardiviner has quit [Ping timeout: 256 seconds]
GeissT has quit [Quit: MillBroChat AdIRC User]
Oak has quit [Quit: Leaving]
stardiviner has joined #ruby-lang
Criztian has quit [Remote host closed the connection]
machuga has quit [Ping timeout: 246 seconds]
machuga has joined #ruby-lang
jstorimer has joined #ruby-lang
jstorimer has quit [Ping timeout: 260 seconds]
roadt has joined #ruby-lang
philnyc has joined #ruby-lang
Zeeo has quit [Quit: and then one day you'll pack up, fly down south... hide your head in the sand]
zomgbie has quit [Read error: Connection reset by peer]
M_BlX has quit [Remote host closed the connection]
<postmodern>
darix, interesting, i havent but probably will have to send PGP emails
x0f has quit [Ping timeout: 256 seconds]
<judofyr>
postmodern: dealing with secret stuff again?
<judofyr>
:D
x0f has joined #ruby-lang
barttenbrinke has joined #ruby-lang
<postmodern>
judofyr, sadly no
<postmodern>
judofyr, boring html multipart emails
vlad_starkov has quit [Remote host closed the connection]
<yorickpeterse>
postmodern: are you hacking the government? Only hackers use PGP
<yorickpeterse>
do you also use that hacker os lunix?
pbjorklund has joined #ruby-lang
cofin has quit [Quit: cofin]
henrikhodne has joined #ruby-lang
pbjorklund has quit [Ping timeout: 264 seconds]
_jpb_ has quit [Ping timeout: 260 seconds]
jxie has quit [Quit: leaving]
_jpb_ has joined #ruby-lang
ldnunes has joined #ruby-lang
charliesome_ has joined #ruby-lang
barttenbrinke has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 256 seconds]
rikai has quit [Remote host closed the connection]
<andrewvos>
Try paste any errors on gist.github.com
barttenbrinke has quit [Ping timeout: 240 seconds]
hashkey has joined #ruby-lang
<mighub>
Oh i thought you could not see the code on IRC because it was not printing good. Stupid me.
<mighub>
How changing from double quote to single quote would change the behaviour?
sush24_ has quit [Ping timeout: 252 seconds]
tenderlove has quit [Ping timeout: 246 seconds]
hogeo has joined #ruby-lang
wmoxam has joined #ruby-lang
<andrewvos>
Well because if you copied it from word or from the internet then the quotes might be different types of quotes.
<mytrile>
andrewvos: thanks
<andrewvos>
mytrile: Pleasure
<mytrile>
andrewvos: I was thinking that net/http would pick up https address automatically and then apply use_ssl = true and verify_mode by itself, but it doesn't
<mighub>
Ah no I wrote that code to start with. I just copied it from the internet because I was looking at my code on github. These are basic double quotes.
<andrewvos>
mighub: Ok well you really need to show the error then.
<judofyr>
mighub: andrewvos: you probably want to check for https: (with the column)
Voker57 has joined #ruby-lang
<andrewvos>
mytrile: You could just try using a different http gem
<andrewvos>
judofyr: Yup
<judofyr>
err
<andrewvos>
mytrile: httparty is quite nice
<judofyr>
I mean mytrile
<injekt>
mytrile: /\Ahttps?:/
<mytrile>
andrewvos: I prefer minimizing deps
<judofyr>
and if you want to be kind to hackers: /\A(javascript|https?):/
<mytrile>
injekt: I actually wanted to know if the standard lib would pick that automatically
hashkey has quit [Remote host closed the connection]
io_syl has quit [Quit: Computer has gone to sleep.]
hashkey has joined #ruby-lang
ykk` has joined #ruby-lang
tenderlove has joined #ruby-lang
ZenDruid has quit [Ping timeout: 246 seconds]
jstorimer has quit [Remote host closed the connection]
GeissT has quit [Quit: MillBroChat AdIRC User]
<ykk`>
hey guys
ZenDruid has joined #ruby-lang
henrikhodne has quit [Ping timeout: 248 seconds]
<ykk`>
So I am building a script to tweet images from a folder of pictures. What would be a good way of keeping track of what has been uploaded so the script doesn't upload anything twice?
<ykk`>
I'm looking for guidance to be pointed in the right direction not the technical :P maybe a suggestion or two?
<andrewvos>
ykk`: put the file names into a file?
tenderlove has quit [Ping timeout: 264 seconds]
<andrewvos>
ykk`: Rename the file from .jpg to .uploaded-already
<andrewvos>
?
<andrewvos>
ykk`: Delete the file?
<andrewvos>
ykk`: Use a key value store like Redis?
vlad_starkov has quit [Remote host closed the connection]
<ykk`>
i can even move the file
<ykk`>
dir_upload dir_complete
<ykk`>
key value store? I'll look that up never heard of Redis
<andrewvos>
ykk`: No no that's probably not what you want here :)
<ykk`>
haha no to the Redis?
<andrewvos>
What I meant was store the uploaded file in a database.
<andrewvos>
files
<andrewvos>
*
<ykk`>
I've never done that, that would be good to learn
<ykk`>
so like a csv file?
<andrewvos>
Nahh just throw each file on a new line
<injekt>
use a db like sqlite if you want faster querying
<andrewvos>
Or store the file in json
sush24 has joined #ruby-lang
<ykk`>
the db sounds like best practice and a good learning curve
krames has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<judofyr>
Joni_79: you could also just google "ruby inject" and you'll get some tutorials/descriptions
justinram has joined #ruby-lang
<Joni_79>
judofyr: I've been reading that and still it hard for me to grasp
jonahR has quit [Quit: jonahR]
<judofyr>
Joni_79: well, you use inject (or "fold" or "reduce" as it's also called) whenever you need to loop over an array and work with and accumulator
<Joni_79>
so, it iterates trhough the array, is the zero in inject(0) the starting position in the array?
cofin has quit [Quit: cofin]
<judofyr>
Joni_79: no. the 0 is the first value of "sum"
<injekt>
no it's the starting value of sum
<judofyr>
(aka. the first parameter of the block)
<Joni_79>
ok
<judofyr>
Joni_79: so the first time the block executes, "sum" is 1. the next time, "sum" is the result from the previous block
<Joni_79>
item is the number from the array each time it iterates..?
<judofyr>
yes
<judofyr>
like #each
<Joni_79>
okey.. maby I got it
<Joni_79>
thanks
hakunin has quit [Remote host closed the connection]
hakunin has joined #ruby-lang
<judofyr>
charliesome: what if you use that together with refinements?
fridim_ has joined #ruby-lang
<judofyr>
oh
<judofyr>
it's already scoped
<judofyr>
doh
pipework has joined #ruby-lang
<Joni_79>
so first time it runs 1 * 2 = 2, next time it runs 2 * 3 = 6 and the last time it runs 6 * 4 = 24 and returns that?
<injekt>
I dont think the huge CheapStrings gave it away :D
<judofyr>
Joni_79: yup
<Joni_79>
ok, cool
<judofyr>
injekt: I thought first it was included/extended into Kernel
<Joni_79>
is that "sum" a keyword or just any variable name?
<judofyr>
Joni_79: any variable name
krames has joined #ruby-lang
<judofyr>
Joni_79: people often use "acc" or "memo" as well
<Joni_79>
erhm.. so it's not a method name etc?
<judofyr>
Joni_79: it's a variable
tRAS has quit [Quit: Mother, did it need to be so high?]
runeb has quit [Remote host closed the connection]
mrfelix has quit [Quit: Computer has gone to sleep.]
judofyr has joined #ruby-lang
wmoxam has quit [Ping timeout: 260 seconds]
intellitech has joined #ruby-lang
workmad3 has joined #ruby-lang
_jpb_ has quit [Ping timeout: 240 seconds]
_jpb_ has joined #ruby-lang
krohrbaugh1 has joined #ruby-lang
workmad3 has quit [Read error: Operation timed out]
enebo has quit [Quit: enebo]
krohrbaugh has quit [Ping timeout: 248 seconds]
carloslopes has quit [Remote host closed the connection]
runeb has joined #ruby-lang
runeb has quit [Remote host closed the connection]
synthetix has quit [Quit: Ex-Chat]
synthetix has joined #ruby-lang
carloslopes has joined #ruby-lang
gja has quit [Quit: This computer has gone to sleep]
tRAS has joined #ruby-lang
Sambalero has joined #ruby-lang
glebm has joined #ruby-lang
judofyr_ has joined #ruby-lang
jstorimer has quit [Remote host closed the connection]
synthetix has quit [Quit: Ex-Chat]
judofyr has quit [Ping timeout: 264 seconds]
cofin has joined #ruby-lang
krohrbaugh1 has quit [Quit: Leaving.]
wmoxam has joined #ruby-lang
krohrbaugh has joined #ruby-lang
saarinen has joined #ruby-lang
<Aloysius1>
Howdy, guys. I'm having gem troubles: I've got a gem of my own making and am trying to use it in a project. I've got it in the Gemfile and it shows up as installed, but when I try to use the class I get an "Uninitialized constant ClientModule:GemClass".
<Aloysius1>
So it looks like it's trying to find GemClass in the current module namespace, where it does not exist. Now, if I add 'require gem_class' at the top, I get a 'cannot load such file -- gem_class', though I see 'gem_class.rb' in the appropriate bundler directory.
havenn_ has left #ruby-lang [#ruby-lang]
havenwood has joined #ruby-lang
<Joni_79>
what's the significancy of ":" before a parameter, array item or return item..? My vim knows to highlight it differently so there must be somwthing special about it..? :)
<Joni_79>
eg. yield(:peanut), or else :no_block etc
<Aloysius1>
crap...I made a name change, I think that's the reason I'm pulling down the old un-lib-ed thing.
<Joni_79>
havenwood: thank you, I'll read that.
<erikh>
heh
<erikh>
Aloysius1: well, yeah -- make sure it's in lib and your require will work just fine.
<erikh>
so, ruby has a concept called the load path, if you're not familiar
<erikh>
you can ruby -e 'p $LOAD_PATH' to see it
<erikh>
these are the directories it uses to find .rb files when you use "require"
jinie is now known as jinie_
runeb has quit [Ping timeout: 245 seconds]
mrfelix has joined #ruby-lang
mrfelix has quit [Client Quit]
fenicks has joined #ruby-lang
havenwood has quit [Remote host closed the connection]
cofin has quit [Quit: cofin]
pygmael has left #ruby-lang [#ruby-lang]
publicvoid_ has quit [Ping timeout: 246 seconds]
marr has joined #ruby-lang
RickHull1 has joined #ruby-lang
henrikhodne has joined #ruby-lang
_jpb_ has quit [Ping timeout: 246 seconds]
<Aloysius1>
erikh: I'm all about the $LOAD_PATH... and finally pullng down the right code, thanks for you help.
runeb has joined #ruby-lang
<erikh>
np!
_jpb_ has joined #ruby-lang
cofin has joined #ruby-lang
<Aloysius1>
I've been using the "version.rb" practice as well, though someone here made an argument that it was not good practice.
runeb has quit [Remote host closed the connection]
tRAS has quit [Quit: Mother, did it need to be so high?]
<Aloysius1>
It does create an interesting situation, in that this current code is just a class, no module, but I've always seen the practice as "module whatever; VERSION = "1"; end".
bgant has quit [Read error: Connection reset by peer]
pygmael has left #ruby-lang [#ruby-lang]
duph has quit [Quit: Leaving.]
justinram has joined #ruby-lang
Weems has joined #ruby-lang
yalue has quit [Quit: Leaving]
symm- has joined #ruby-lang
judofyr_ has quit [Remote host closed the connection]
judofyr has joined #ruby-lang
<Aloysius1>
So, yesterday I discovered the joys of using "Process.daemon" to turn my code into a daemon, which was awesome and fairly easy...but now I have these daemons that just say "ruby" in the system monitor, and I don't see a way to change that.
swav has quit [Read error: Connection reset by peer]
swav has joined #ruby-lang
krames has joined #ruby-lang
Pupeno has joined #ruby-lang
Pupeno has joined #ruby-lang
Pupeno has quit [Changing host]
judofyr has quit [Ping timeout: 256 seconds]
carloslopes has quit [Remote host closed the connection]
<matled>
Aloysius1: changing $0 might do what you want. note that this behaviour may be platform/implementation specific.
<matled>
i.e. $0 = "foo" will make the ruby process show up as "foo" in ps
runeb has joined #ruby-lang
<Aloysius1>
matled: I'll give it a try, thanks!
scottschecter has joined #ruby-lang
pskosinski has quit [Remote host closed the connection]
pskosinski has joined #ruby-lang
workmad3 has joined #ruby-lang
runeb has quit [Ping timeout: 241 seconds]
<Aloysius1>
matled: No joy.
w1zeman1p has joined #ruby-lang
kgrz has quit [Remote host closed the connection]
<Aloysius1>
matled: I notice that "irb" has a $0 of "irb" but still has "ruby" for a process name.
<matled>
Aloysius1: what system are you on?
<Aloysius1>
linux (mint 14)
<Aloysius1>
I wonder if it's just not showing up in the Process Monitor right.
workmad3 has quit [Read error: Operation timed out]
<matled>
not sure what system monitor is, might be true that it shows something else than ps
rippa has quit [Ping timeout: 248 seconds]
<Aloysius1>
yeah, "System Monitor" gui
Uranio has quit [Quit: while you reading this, a kitty dies]
cofin has quit [Quit: cofin]
<Aloysius1>
matled: OK, I'm seeing it now. Thanks!
walkslow has joined #ruby-lang
<rickhull>
yeah, set $0 manually
<eam>
there are two separate process fields, one is the simple command and one contains the entire argv (including argv[0])
<eam>
it's possible for the command name to be different than argv[0]
<rickhull>
that's what 'c' toggles in `top` ?
runeb has joined #ruby-lang
mbj has quit [Quit: leaving]
_jpb_ has quit [Ping timeout: 240 seconds]
<eam>
rickhull: I believe so, yes
_jpb_ has joined #ruby-lang
Aloysius1 has quit [Remote host closed the connection]
walkslow has left #ruby-lang [#ruby-lang]
fenicks has quit [Read error: Connection reset by peer]
<eam>
rickhull: on linux, /proc/stat has the name and /proc/cmdline has the entire argv
kgrz has joined #ruby-lang
Criztian has joined #ruby-lang
rsepassi has joined #ruby-lang
cofin has joined #ruby-lang
_jpb_ has quit [Ping timeout: 252 seconds]
kgrz has quit [Ping timeout: 256 seconds]
_jpb_ has joined #ruby-lang
<erikh>
proc exe can be readlinked too for the bin
<erikh>
sorry phone
cofin has quit [Client Quit]
scampbell has quit [Remote host closed the connection]
havenwood has joined #ruby-lang
justinra_ has joined #ruby-lang
justinram has quit [Ping timeout: 246 seconds]
cofin has joined #ruby-lang
swav has quit [Read error: Connection reset by peer]
swav has joined #ruby-lang
_jpb_ has quit [Remote host closed the connection]
fridim__ has quit [Ping timeout: 276 seconds]
_jpb_ has joined #ruby-lang
jstorime_ has joined #ruby-lang
hakunin has quit [Remote host closed the connection]
jstorimer has quit [Ping timeout: 252 seconds]
hakunin has joined #ruby-lang
rsepassi has left #ruby-lang [#ruby-lang]
workmad3 has joined #ruby-lang
s0ber_ has joined #ruby-lang
RickHull1 has quit [Quit: Leaving.]
RickHull1 has joined #ruby-lang
ia___ has joined #ruby-lang
s0ber has quit [Ping timeout: 248 seconds]
s0ber_ is now known as s0ber
SilverKey has joined #ruby-lang
hhatch has quit [Ping timeout: 246 seconds]
hakunin has quit [Ping timeout: 268 seconds]
henrikhodne has quit [Ping timeout: 276 seconds]
duph has joined #ruby-lang
MartynKeigher has quit [Ping timeout: 245 seconds]
spacesuit has quit [Quit: spacesuit]
ldnunes has quit [Quit: Leaving]
MartynKeigher has joined #ruby-lang
mbj has joined #ruby-lang
bgant1 has quit [Quit: Leaving.]
cofin has quit [Quit: cofin]
Sambalero has quit [Remote host closed the connection]
M_BlX has quit [Remote host closed the connection]
Voker57 has joined #ruby-lang
diegoviola has quit [Ping timeout: 248 seconds]
Squarepy has quit [Quit: Leaving]
zmike123 has quit [Quit: ~]
<darix>
eam: /proc/cmdline is the kernel cmdline. dont you mean /proc/<pid>/cmdline ?
<eam>
yeah
io_syl has quit [Ping timeout: 264 seconds]
symm-_ has joined #ruby-lang
symm- has quit [Read error: Connection reset by peer]
io_syl has joined #ruby-lang
wmoxam has quit [Ping timeout: 276 seconds]
priodev has quit [Ping timeout: 252 seconds]
priodev has joined #ruby-lang
pothibo has joined #ruby-lang
dllama has joined #ruby-lang
x0f has quit [Ping timeout: 256 seconds]
x0f has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
mbj has quit [Read error: Operation timed out]
vlad_starkov has joined #ruby-lang
duph has quit [Quit: Leaving.]
vlad_starkov has quit [Ping timeout: 256 seconds]
krames has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pipework has quit [Remote host closed the connection]
pipework has joined #ruby-lang
pipework has quit [Remote host closed the connection]
mbj has joined #ruby-lang
Criztian has quit [Remote host closed the connection]
hogeo has joined #ruby-lang
kgrz has joined #ruby-lang
w1zeman1p has left #ruby-lang [#ruby-lang]
dllama has left #ruby-lang [#ruby-lang]
GarethAdams has joined #ruby-lang
hogeo_ has quit [Ping timeout: 276 seconds]
hakunin has joined #ruby-lang
w00x has quit [Ping timeout: 256 seconds]
retro|cz has joined #ruby-lang
SilverKey has quit [Quit: Zzzzzz.]
breakingthings has quit [Quit: breakingthings]
kgrz has quit [Ping timeout: 246 seconds]
jstorime_ has quit [Remote host closed the connection]
mbj has quit [Quit: Lost terminal]
RickHull1 has quit [Quit: Leaving.]
benanne has joined #ruby-lang
__butch__ has quit [Quit: Leaving.]
RickHull1 has joined #ruby-lang
workmad3 has quit [Ping timeout: 252 seconds]
philnyc has quit [Ping timeout: 256 seconds]
vlad_starkov has joined #ruby-lang
stamina has quit [Ping timeout: 246 seconds]
saarinen has quit [Quit: saarinen]
fragamus has joined #ruby-lang
saarinen has joined #ruby-lang
cored has quit [Ping timeout: 248 seconds]
joshuawscott has quit [Quit: Leaving.]
cored has joined #ruby-lang
cored has joined #ruby-lang
cored has quit [Changing host]
Wardrop has joined #ruby-lang
hashkey has quit []
nathanstitt has quit [Quit: I growing sleepy]
jstorimer has joined #ruby-lang
_jpb_ has quit [Ping timeout: 240 seconds]
_jpb_ has joined #ruby-lang
duph has joined #ruby-lang
postmodern has joined #ruby-lang
ffio has quit [Quit: WeeChat 0.4.1]
hashkey has joined #ruby-lang
blargh has joined #ruby-lang
_jpb_ has quit [Ping timeout: 268 seconds]
_jpb_ has joined #ruby-lang
blargh has left #ruby-lang [#ruby-lang]
MaddinXx_ has quit [Remote host closed the connection]
blarghlarghl has joined #ruby-lang
<blarghlarghl>
Hi all. I have a Set of classes, some of which are anonymous (ie they show up as #<Class:0x....> when printing the Set).
<blarghlarghl>
How can I separate those from named classes?
<drbrain>
blarghlarghl: Class#name will be nil for anonymous classes
<blarghlarghl>
drbrain: still gives me #<Class:0x007fbdd28e0778>
SilverKey has joined #ruby-lang
<injekt>
actually in 187 it'll be ""
<injekt>
I think
<drbrain>
blarghlarghl: if you want to separate them, use #partition
lutfidemirci has joined #ruby-lang
<drbrain>
or #select
<drbrain>
they still won't have names until you give them names
<blarghlarghl>
drbrain: how do you mean?
<blarghlarghl>
drbrain: i don't want to have them in the list at all
<blarghlarghl>
drbrain: but they're there, and i can't get rid of them without ridiculous things like regexing for #<Class because class.name also gives me #<Class...>
<blarghlarghl>
drbrain: and then as per you i do ObjectSpace.classes.select { |c| c.name }
<blarghlarghl>
drbrain: (that snippet is simplified from padrino-core, so i'm not to blame for it.)
hashkey has quit []
<blarghlarghl>
drbrain: and i have to admit i'm not good enough to understand exactly what could be going on with these classes to be able to make an informed guess.
hapster has joined #ruby-lang
<drbrain>
I wonder why they use a Set, it's already going to be unique
<blarghlarghl>
drbrain: either way for some reason it chokes on these anonymous classes. not sure why it does that only in my app and now in everyone else's, either, but it should be able to handle anonymous classes if they exist even in a regular irb shell, so.
<andrewvos>
HELLO
sepp2k1 has quit [Quit: Leaving.]
tylergillies is now known as amanaplanacanalp
amanaplanacanalp is now known as tylergillies
glebm has quit [Ping timeout: 256 seconds]
RickHull1 has quit [Quit: Leaving.]
RickHull1 has joined #ruby-lang
glebm has joined #ruby-lang
pipework has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 240 seconds]
fosky has joined #ruby-lang
hashkey has joined #ruby-lang
firstdayonthejob has quit [Ping timeout: 256 seconds]
<blarghlarghl>
drbrain: huh
duph has quit [Ping timeout: 246 seconds]
<blarghlarghl>
drbrain: class.name.inspect actually gives me #<Class:0x007f86f0cf2898>::InitError
<drbrain>
heh, it's a named subclass of an anonymous class
ia___ has quit [Quit: ia___]
<blarghlarghl>
drbrain: jesus, this is a clusterfuck.
<drbrain>
I wonder how you create that
<blarghlarghl>
drbrain: I wonder how you get rid of it. I just don't care, I just want it to die already :(
<blarghlarghl>
drbrain: you can tell I've been working on this for six hours :)
cored has quit [Read error: Operation timed out]
cored has joined #ruby-lang
cored has joined #ruby-lang
cored has quit [Changing host]
_jpb_ has quit [Ping timeout: 240 seconds]
<erikh>
hi friends
<rue>
Hi friend, hi friend, hi friend
_jpb_ has joined #ruby-lang
<injekt>
ohi
<erikh>
is that a fish
<erikh>
ohi
firstdayonthejob has joined #ruby-lang
Weems has quit [Ping timeout: 256 seconds]
andrewvos has quit [Ping timeout: 256 seconds]
krombr has joined #ruby-lang
stamina has joined #ruby-lang
krombr has quit [Client Quit]
havenwood has quit [Remote host closed the connection]
hapster has quit [Quit: Leaving]
jstorimer has quit [Remote host closed the connection]
jstorimer has joined #ruby-lang
<rickhull>
don't play koi
mootpointer has joined #ruby-lang
justinra_ has quit [Remote host closed the connection]
zomgbie has quit [Ping timeout: 264 seconds]
andrewvos has joined #ruby-lang
tomzx_mac has joined #ruby-lang
_jpb_ has quit [Ping timeout: 252 seconds]
hogeo has quit [Remote host closed the connection]
havenwood has joined #ruby-lang
mootpointer has quit [Read error: Connection reset by peer]
nathanstitt has joined #ruby-lang
benanne has quit [Quit: kbai]
_jpb_ has joined #ruby-lang
mdedetrich has joined #ruby-lang
jstorimer has quit [Remote host closed the connection]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
stamina has quit [Ping timeout: 256 seconds]
verto has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]