charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Coldblackice has joined #ruby
charliesome has joined #ruby
sid_fules has joined #ruby
nankyokusei has joined #ruby
millerti has quit [Client Quit]
montanonic has joined #ruby
antoniobeyah has quit [Quit: antoniobeyah]
nankyokusei has quit [Ping timeout: 252 seconds]
Pupeno has quit [Quit: Leaving...]
ta_ has quit [Remote host closed the connection]
roamingdog has joined #ruby
symm- has quit [Ping timeout: 245 seconds]
ramfjord has quit [Read error: Connection reset by peer]
ramfjord has joined #ruby
benlieb has quit [Quit: benlieb]
d0nn1e has quit [Ping timeout: 250 seconds]
d0nn1e has joined #ruby
cdg has quit [Remote host closed the connection]
ahuman has quit [Ping timeout: 258 seconds]
eblip has quit [Quit: WeeChat 1.4]
ahuman has joined #ruby
bturker has joined #ruby
<rapha>
Hi all!
montanonic has quit [Ping timeout: 252 seconds]
<rapha>
I wrote this class here (https://gist.github.com/sixtyfive/5955ca9e5817321af280c4f9a854beb9) which I would like to gemify and make available for all through GitHub, but I'm very anxious of doing so. Any comment on how it could be improved towards a point where it's "ready for the world" would be real swag!
sid_fules has quit [Read error: Connection reset by peer]
micromanyth has joined #ruby
toretore has quit [Ping timeout: 260 seconds]
dasher00 has quit [Ping timeout: 258 seconds]
Pupeno has joined #ruby
nikivi has joined #ruby
<Papierkorb>
rapha: Run `rubocop` on it and see what it tells you
<Papierkorb>
You can still choose to ignore some/all of rubocops complaints of course, but that's usually a good starting direction
tuxaddicted has joined #ruby
sid_fules has joined #ruby
vikaton has joined #ruby
<Papierkorb>
rapha: Then, tests are always useful, but I'll assume you have some, or want to write some, anyway before publishing
johnmccabe has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
pawnbox has quit [Remote host closed the connection]
bmurt has joined #ruby
nikivi has quit [Quit: irc]
mati_urunda has quit [Ping timeout: 265 seconds]
benlieb has joined #ruby
bmurt has quit [Client Quit]
benlieb has quit [Client Quit]
rfoust has joined #ruby
DLSteve has joined #ruby
bmurt has joined #ruby
SteenJobs has quit [Quit: SteenJobs]
ramfjord has quit [Ping timeout: 244 seconds]
ResidentBiscuit has joined #ruby
Pupeno has quit [Remote host closed the connection]
xyn has joined #ruby
<xyn>
hello
<adam12>
xyn: o/
<xyn>
i was wondering if someone could help me out with some simple rss parsing
<xyn>
im trying to have it select a random item.description parse feed
<xyn>
every 3 hours
<xyn>
i can only figure out how to make it grab everything from a rss page
pragmaticus has joined #ruby
<rapha>
Papierkorb: oh, I didn't know about rubocop! Thank you!
arescorpio has joined #ruby
<rapha>
As for tests, what do people outside of the Rails world nowadays prefer for ease-of-use? I never got into the testing mindset, but for this little project I'd go that extra mile, especially since the possible combinations of factors one can encounter in these tables is quite heinous.
SteenJobs has joined #ruby
wingwalker has joined #ruby
marr has quit [Ping timeout: 256 seconds]
wingwalker has quit [Client Quit]
wingwalker has joined #ruby
<adam12>
xyn: show us what you have so far
fullofcaffeine has quit [Remote host closed the connection]
<adam12>
rapha: i'm partial to minitest but it has it's warts. I feel like I'm bringing in half of rubygems.org when I install rspec.
domgetter has joined #ruby
fullofcaffeine has joined #ruby
roamingdog has quit []
sid_fules has quit [Read error: Connection reset by peer]
fullofcaffeine has quit [Ping timeout: 260 seconds]
axisys has quit [Quit: leaving]
<rapha>
warts? :)))
<rapha>
true that, about rspec
<rapha>
in principle i wouldn't mind the many dependencies, but i do dislike the 'heavyness' how i feel trying to use rspec...
<rapha>
*in how
jesush has quit [Quit: jesush]
ivanskie has left #ruby ["Closing Window"]
ramfjord has joined #ruby
sid_fules has joined #ruby
Limix has quit [Quit: Limix]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ramfjord has quit [Read error: Connection reset by peer]
ramfjord has joined #ruby
charliesome has joined #ruby
pawnbox has joined #ruby
bturker has quit [Ping timeout: 256 seconds]
pawnbox has quit [Remote host closed the connection]
<rapha>
adam12: first impressions very positive! What are the 'warts' you are having issue with?
Joufflu has quit [Ping timeout: 256 seconds]
<adam12>
I don't remember off the top of my head - formatters breaking on upgrade was one.
ur5us has joined #ruby
jaguarmagenta has joined #ruby
<rapha>
hmm okay that's something they might have learned to not do anymore
sepp2k has quit [Read error: Connection reset by peer]
matp has quit [Quit: Bye!]
iMadper has joined #ruby
yaewa has joined #ruby
matp has joined #ruby
moei has quit [Ping timeout: 244 seconds]
_c0111n has joined #ruby
<rapha>
good night!
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
CloCkWeRX has joined #ruby
johnmccabe has joined #ruby
nankyokusei has joined #ruby
ruby-lang327 has joined #ruby
antoniobeyah has joined #ruby
nankyokusei has quit [Ping timeout: 252 seconds]
sid_fules has quit [Read error: Connection reset by peer]
yaewa has quit [Quit: Leaving...]
moei has joined #ruby
harfangk has joined #ruby
sneakerhax has joined #ruby
jaguarmagenta has quit [Remote host closed the connection]
spacheco has joined #ruby
jaguarmagenta has joined #ruby
spacheco has quit [Client Quit]
spacheco has joined #ruby
sid_fules has joined #ruby
johnmccabe has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jesush has joined #ruby
ramfjord has quit [Read error: Connection reset by peer]
ramfjord has joined #ruby
jhass has quit [Ping timeout: 260 seconds]
coyo has quit [Read error: Connection reset by peer]
ur5us has quit [Remote host closed the connection]
ur5us_ has joined #ruby
yaewa has joined #ruby
ramfjord has quit [Read error: Connection reset by peer]
ramfjord has joined #ruby
wingwalker has quit [Ping timeout: 250 seconds]
_c0111n has quit [Read error: No route to host]
moei has quit [Ping timeout: 240 seconds]
iMadper is now known as iMadper|AFK
ur5us_ has quit [Ping timeout: 265 seconds]
rfoust has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ResidentBiscuit has quit [Remote host closed the connection]
ruby-lang327 has quit [Ping timeout: 260 seconds]
ryan_notabot has joined #ruby
ResidentBiscuit has joined #ruby
sneakerhax has quit [Ping timeout: 260 seconds]
yaewa has quit [Quit: Leaving...]
moei has joined #ruby
d^sh has quit [Ping timeout: 250 seconds]
jhass has joined #ruby
meshsmith has joined #ruby
d^sh has joined #ruby
tau has quit [Remote host closed the connection]
ryan_notabot has quit []
JoshS has quit [Read error: Connection reset by peer]
railswebdev has quit [Ping timeout: 260 seconds]
tvw has quit [Ping timeout: 260 seconds]
jackjackdripper has joined #ruby
nofxx has quit [Ping timeout: 265 seconds]
nofxx has joined #ruby
sid_fules has quit [Read error: Connection reset by peer]
ryan_notabot has joined #ruby
harai has quit [Ping timeout: 240 seconds]
moei has quit [Quit: Leaving...]
spacheco has quit [Remote host closed the connection]
spicerack has joined #ruby
spacheco has joined #ruby
araujo has quit [Read error: Connection timed out]
<elomatreb>
I hope this explains what I meant a little better
<xyn>
so
<xyn>
re leave sample as sample
<xyn>
or do we change it
<elomatreb>
Change it?
<xyn>
to feed.item.description
babykosh has quit [Quit: babykosh]
fullofcaffeine has quit [Remote host closed the connection]
<elomatreb>
If I'm understanding correctly, you want the description of a random item. So it would feed.items.sample.description
fullofcaffeine has joined #ruby
benlieb has joined #ruby
enterprisey has quit [Quit: Leaving]
meshsmith has quit [Remote host closed the connection]
vikaton has quit [Quit: Connection closed for inactivity]
fullofcaffeine has quit [Ping timeout: 260 seconds]
bocaneri has joined #ruby
maryo has quit [Ping timeout: 268 seconds]
<xyn>
that seems to be breaking
<xyn>
my source
<xyn>
:/
<matthewd>
xyn: Whole sentences are much easier to read. Your keyboard features several forms of punctuation other than newline.
conta has joined #ruby
<xyn>
elomatreb: well I did what you did and when I ran my command is said insecure operation - unlink
sameerynho has joined #ruby
lxsameer has quit [Ping timeout: 268 seconds]
p0wn3d has quit [Ping timeout: 250 seconds]
conta has quit [Ping timeout: 256 seconds]
eblip has joined #ruby
<xyn>
elomatreb: ??
charliesome has joined #ruby
ramfjord has joined #ruby
eblip is now known as eb0t
ledestin has quit [Ping timeout: 240 seconds]
jgnagy has quit [Remote host closed the connection]
warrshrike has joined #ruby
<warrshrike>
Okay guys this is way weird - sorry to bug you on thank giving btw
<warrshrike>
ruby says No such file or directory @ rb_sysopen - Asphalt_8/vtresults.json (Errno::ENOENT) but nano Asphalt_8/vtresults.json opens the file just fine
<warrshrike>
any ideas
ramfjord has quit [Ping timeout: 265 seconds]
brent__ has quit [Quit: Connection closed for inactivity]
lenwood has joined #ruby
futilegames has quit [Quit: futilegames]
ramfjord has joined #ruby
ejnahc has quit [Read error: Connection reset by peer]
blackbombay has quit [Ping timeout: 248 seconds]
wingwalker has quit [Ping timeout: 250 seconds]
p0wn3d has joined #ruby
<xyn>
hello can someone help me?
ur5us has joined #ruby
ejnahc has joined #ruby
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
Dimik has quit [Ping timeout: 250 seconds]
claudiuinberlin has joined #ruby
symm- has joined #ruby
bigtawm has quit [Ping timeout: 252 seconds]
<matthewd>
xyn: Update the gist with your current code? I don't see anything that would obviously be doing an unlink
<matthewd>
xyn: Though it should be noted that $SAFE is generally discouraged, if not deprecated, at this point
<matthewd>
xyn: Hmm. Well presumably the exception should at least be telling you where it's happening.
tmtwd has quit [Ping timeout: 246 seconds]
bturker has quit [Ping timeout: 256 seconds]
<xyn>
its saying insecure operation - unlink
Rodya_ has quit [Remote host closed the connection]
<matthewd>
.. and giving you a backtrace
<xyn>
ensure in open_uri
<xyn>
rssfeed handle_server_input block in main_loop
<matthewd>
Ah, does open_uri do something involving a temp file, maybe?
<matthewd>
So yeah, probably a "don't use $SAFE" problem
blackbombay has joined #ruby
<xyn>
yeah im getting a undefined method 'description' for #
ta_ has joined #ruby
<matthewd>
That's because you're calling description on items, which is an array
warrshrike has quit [Ping timeout: 260 seconds]
tuxaddicted_back has joined #ruby
manjaro-kde5- has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
blackbombay has quit [Ping timeout: 240 seconds]
fullofcaffeine has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
dionysus69 has joined #ruby
tuxaddicted has quit [Ping timeout: 252 seconds]
lenwood has quit [Ping timeout: 250 seconds]
charliesome has joined #ruby
fullofcaffeine has quit [Remote host closed the connection]
fullofcaffeine has joined #ruby
iMadper|AFK has quit [Remote host closed the connection]
iMadper|AFK has joined #ruby
fullofcaffeine has quit [Ping timeout: 256 seconds]
futilegames has joined #ruby
CloCkWeRX has quit [Ping timeout: 260 seconds]
SteenJobs has joined #ruby
SteenJobs has quit [Client Quit]
futilegames has quit [Client Quit]
conta has joined #ruby
JesseH has quit [Ping timeout: 260 seconds]
pragmaticus has quit [Ping timeout: 250 seconds]
<KrzaQ>
is there a command in pry that would allow me save current session to a .rb file? I.e. I'd like to play around with stuff, get it working and then save it and possibly enhance it in my standard editor
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
conta has quit [Ping timeout: 256 seconds]
nankyokusei has joined #ruby
xyn has left #ruby [#ruby]
JesseH has joined #ruby
cluckmaster has joined #ruby
<cluckmaster>
yo
SteenJobs has joined #ruby
<cluckmaster>
whos awake rn
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
<cluckmaster>
ur5us:
nankyokusei has quit [Ping timeout: 240 seconds]
harai has quit [Ping timeout: 256 seconds]
<apeiros>
cluckmaster: some people are
firstdayonthejob has joined #ruby
<apeiros>
cluckmaster: no pm please
ur5us has quit [Ping timeout: 244 seconds]
A5101 has quit [Ping timeout: 265 seconds]
<cluckmaster>
?
cibs has quit [Ping timeout: 268 seconds]
<apeiros>
if you have a question, ask it here, in the channel, not in my query
<apeiros>
pm = private message
<cluckmaster>
well i have a function and I would like to loop it on a timer to send to the ircchannel every 60 minutes
<apeiros>
loop do your_method; sleep(3600); end # executes your_method every 60 minutes
gnufied has quit [Ping timeout: 245 seconds]
hahuang65 has quit [Ping timeout: 258 seconds]
rippa has joined #ruby
<cluckmaster>
would I put that below my irc loop
dionysus69 has quit [Ping timeout: 252 seconds]
iMadper|` has joined #ruby
iMadper|AFK has quit [Remote host closed the connection]
<apeiros>
seems to me your question is incomplete - you want to run two loops concurrently?
manjaro-kde5- has quit [Ping timeout: 260 seconds]
<cluckmaster>
yes
<cluckmaster>
the one loop is for
<cluckmaster>
ping/pong
<cluckmaster>
to stay connected to irc
<apeiros>
then you either need threads or you need a different strategy, e.g. checking in your one main loop on every iteration whether timers are due.
<cluckmaster>
this is what I did what is wrong here?
Limix has joined #ruby
Limix has quit [Client Quit]
<apeiros>
I don't know. what makes you think something's wrong there?
<cluckmaster>
well its obviously
<cluckmaster>
outputting to the channel
<cluckmaster>
every 10 seconds
pawnbox has joined #ruby
<cluckmaster>
so obviously something is an issue there
<cluckmaster>
*not
byte512 has joined #ruby
<apeiros>
so your problem description is "I expect this code to write to the channel every 10 seconds, but it does not"?
wingwalker has joined #ruby
<cluckmaster>
yes.
<cluckmaster>
my apologies engish is not my niche
gnufied has joined #ruby
<apeiros>
that's ok, we can work with broken english. working with missing explanations however is difficult. so please try to explain to the best of your abilities.
benlieb has quit [Quit: benlieb]
benlieb has joined #ruby
benlieb has quit [Client Quit]
<apeiros>
you have 2 loops: irc.main_loop and irc.missingchatter. you want to run them concurrently. putting them after each other does not run them concurrently.
<apeiros>
that will run irc.main_loop until it ends, and only then start irc.missingchatter.
<cluckmaster>
ok
<cluckmaster>
so how do I combat this issue
<apeiros>
as I explained before - running 2 loops concurrently means you need threads.
<apeiros>
or you have to rewrite it so you don't have 2 loops but only one.
<matthewd>
Instead of synchronizing over the real work, I'd suggest using a read loop (like you currently have) on a Queue -- then having two threads that add jobs to that queue: one on new input, and one on a timer
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
r3vDev has joined #ruby
WangJianlin has joined #ruby
<WangJianlin>
sup
<WangJianlin>
losers
maryo has joined #ruby
<cluckmaster>
ya when i did that it literayy
<cluckmaster>
spammed myh window with rubaeus.rb:105:in `block in <main>'undefined method `main_loop' for main:Object
* apeiros
looks around
<cluckmaster>
rubaeus.rb:105:in `block in <main>'undefined method `main_loop' for main:Object
* apeiros
doesn't see any loser and hence wonders to whom WangJianlin is talking…
johnmccabe has joined #ruby
<cluckmaster>
apeiros: ?
<apeiros>
cluckmaster: you have a question?
<cluckmaster>
well when I put the thread join commands at the bottom fo the script and commented out the irc.mainloop function all it did was spam my window with undefined method main_loop
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
maattdd has joined #ruby
maryo has quit [Ping timeout: 268 seconds]
montanonic has quit [Ping timeout: 265 seconds]
tuxaddicted has quit [Ping timeout: 246 seconds]
dasher00 has joined #ruby
dionysus69 has joined #ruby
muelleme has joined #ruby
supergeek has quit [Quit: Goodbye cruel world...]
gingray has quit [Ping timeout: 256 seconds]
jcao219 has joined #ruby
charliesome has joined #ruby
manjaro-kde5- has joined #ruby
maryo has joined #ruby
futilegames has quit [Quit: futilegames]
tvw has joined #ruby
xall has quit [Ping timeout: 246 seconds]
blackbom1 has joined #ruby
nanoz has joined #ruby
tuxaddicted has joined #ruby
nowhere_man has quit [Ping timeout: 260 seconds]
savage has joined #ruby
blackbombay has quit [Ping timeout: 260 seconds]
aidalgol has quit [Ping timeout: 268 seconds]
SteenJobs has joined #ruby
nanoz has left #ruby ["Leaving"]
manjaro-kde5- has quit [Ping timeout: 246 seconds]
johnmccabe has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rsampaio_ has quit [Ping timeout: 246 seconds]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
hightower2 has joined #ruby
zenguy_pc has quit [Ping timeout: 240 seconds]
pawnbox_ has joined #ruby
pawnbox has quit [Ping timeout: 260 seconds]
hightower3 has quit [Ping timeout: 250 seconds]
zenguy_pc has joined #ruby
Yxhuvud has joined #ruby
pawnbox_ has quit [Remote host closed the connection]
tvw has quit []
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
lenwood has joined #ruby
pawnbox has joined #ruby
rafadc has quit [Ping timeout: 268 seconds]
last_staff has joined #ruby
ta_ has joined #ruby
kimegede has joined #ruby
nankyokusei has joined #ruby
jaguarmagenta has joined #ruby
jgnagy has joined #ruby
ramfjord has quit [Ping timeout: 258 seconds]
nankyokusei has quit [Ping timeout: 248 seconds]
ta_ has quit [Ping timeout: 250 seconds]
jaguarmagenta has quit [Ping timeout: 248 seconds]
jgnagy has quit [Ping timeout: 250 seconds]
dionysus69 has quit [Ping timeout: 258 seconds]
Puffball_ has quit [Remote host closed the connection]
Puffball has joined #ruby
symm- has quit [Ping timeout: 244 seconds]
Jackneill has joined #ruby
platzhirsch has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dionysus69 has joined #ruby
nikivi has joined #ruby
tomphp has joined #ruby
gingray has joined #ruby
zenguy_pc has quit [Ping timeout: 260 seconds]
domgetter has joined #ruby
zenguy_pc has joined #ruby
a3f has joined #ruby
a3f has quit [Client Quit]
hogetaro has quit [Quit: Leaving...]
hogetaro has joined #ruby
futilegames has joined #ruby
toretore has quit [Ping timeout: 265 seconds]
futilegames has quit [Client Quit]
a3f has joined #ruby
a3f has left #ruby [#ruby]
charliesome has joined #ruby
blackwind_123 has joined #ruby
McSoFake has joined #ruby
kimegede has quit [Quit: Leaving...]
symm- has joined #ruby
yottanami has joined #ruby
<yottanami>
Here is my string that I got it from a Rails API http://dpaste.com/3Z4A7W1 Now I want to parse it as a JSON so I used `@payments = JSON.parse(payments, :quirks_mode => true)` but it will put all string in @payments
nikivi has quit [Quit: zzz]
<yottanami>
and If I do `@payments = JSON.parse(@payments, :quirks_mode => true)` in next line it will return the correct JSON. How should I fix it/
symm- has quit [Ping timeout: 265 seconds]
c355e3b has joined #ruby
lenwood has quit [Quit: Konversation terminated!]
lenwood has joined #ruby
McSoFake has quit [Quit: WeeChat 1.5]
leitz has joined #ruby
sagax has joined #ruby
conta has quit [Ping timeout: 250 seconds]
karapetyan has joined #ruby
ta_ has joined #ruby
firstdayonthejob has quit [Ping timeout: 244 seconds]
chopin has joined #ruby
dviola has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
CloCkWeRX has quit [Ping timeout: 250 seconds]
nikivi has joined #ruby
nikivi has quit [Client Quit]
shinnya has quit [Ping timeout: 268 seconds]
ta_ has quit [Ping timeout: 260 seconds]
nankyokusei has joined #ruby
lenwood has quit [Ping timeout: 260 seconds]
SteenJobs has quit [Ping timeout: 260 seconds]
jcao219 has quit [Ping timeout: 246 seconds]
SteenJobs has joined #ruby
nankyokusei has quit [Ping timeout: 246 seconds]
p0wn3d has quit [Ping timeout: 256 seconds]
_whitelogger has joined #ruby
karapetyan has quit [Remote host closed the connection]
tomphp has joined #ruby
karapetyan has joined #ruby
montanonic has joined #ruby
raul782 has quit [Remote host closed the connection]
tvw has joined #ruby
sameerynho has quit [Quit: WeeChat 1.5]
karapetyan has quit [Remote host closed the connection]
Madplatypus has quit [Quit: Connection closed for inactivity]
william3 has joined #ruby
Kendos-Kenlen has joined #ruby
jaguarmagenta has joined #ruby
flying has joined #ruby
raul782 has joined #ruby
nadir has quit [Quit: Connection closed for inactivity]
jaguarmagenta has quit [Ping timeout: 256 seconds]
moei has quit [Ping timeout: 245 seconds]
moei has joined #ruby
xall has joined #ruby
raul782 has quit [Remote host closed the connection]
flying has quit []
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<ineb>
how to correctly parse a uri from string? i ended up with URI(URI.escape 'http://foo.bar/with spaces'). is there a shorter way?
<apeiros>
ineb: spaces are not valid in an uri.
rippa has joined #ruby
<ineb>
apeiros: so, escaping them is necessary
<domgetter>
Isn't that why there's an escape there?
JeanCarloMachado has quit [Ping timeout: 265 seconds]
<apeiros>
ineb: no, it means what you have there is not a uri
<domgetter>
apeiros what is passed to URI() is a uri though
<elomatreb>
If you escape the string like that, wouldn't it encode the slashes, colons, etc too?
<domgetter>
since the spaces get percent-encoded
<apeiros>
domgetter: yes. but this reeks of doing things wrong.
<apeiros>
looks to me like "I should have an uri, but it doesn't work, lets try to do stuff to it until it works" kind of puzzle mashing.
<ineb>
exactly
<domgetter>
apeiros agreed. there should be separate code to deal with the validity of the string as a uri, and then pass a known valid string to URI()
tau has joined #ruby
<apeiros>
ineb: why do you think your string was a uri? and why do you get invalid uri's in your string?
ta_ has joined #ruby
<ineb>
apeiros: depending on the way you inspect some html pages, you sometimes see urls with spaces
<ineb>
thats how i came across them
<apeiros>
ineb: so you use a broken way to collect the urls - fix that instead of mashing around with invalid data.
william3 has quit [Remote host closed the connection]
GodFather has joined #ruby
pawnbox has quit [Remote host closed the connection]
<ineb>
apeiros: sure. i have to do the escaping somewhere else then
<apeiros>
no
<apeiros>
unless the websites you scrape contain invalid urls to begin with, you shouldn't have to escape anything at all.
<ineb>
looks like this is the case
<ineb>
or its just a display thing and i got it wrong
<ineb>
but wget on that page and you see spaces in the urls
<matthewd>
ineb: Show the raw HTML of an <a href=".."> tag?
<ineb>
browser is happy with it btw
william3 has joined #ruby
<elomatreb>
Browsers are designed to even accept incredibly malformed data, a browser accepting something doesn't mean much
<apeiros>
ineb: that looks fake. if you have indeed something like that - well, then I wish you lots of luck because you have the fun job of sanitizing broken data.
raul782 has joined #ruby
<apeiros>
I'd not use heavy-handed tools like URI.escape for that. I'd use the most narrow methods which modify as little as possible.
<matthewd>
If that's literally how it looked in the source, and not a reproduction based on what you think it's doing, then you'll have to do some hackery.. I'm not sure URI.escape will do what you want. But if it does, then you're certainly not going to find something shorter.
<apeiros>
in this case I'd gsub spaces for %20
<ineb>
how to sanitizing broken data from a string to create a correct uri then? :)
<ineb>
ohh ok.
<elomatreb>
Mh, maybe split the URL at the first singular slash and URI encode everything after it?
<apeiros>
ineb: you ask for a generic way to fix broken data? I can sell you some pixie dust…
<blackbom1>
apeiros: ill buy some too, does it make me high though?
william3 has quit [Ping timeout: 260 seconds]
<apeiros>
ineb: you can dig through html5 specs, it contains information about how browsers are supposed to remedy common tagsoup issues
<apeiros>
might include mangled uris
<ineb>
i think ill stick to either URI.escape or gsub then
<ineb>
however, i appreciate that you spotted a possible xy problem in my quesetion
j416 has quit [Quit: o/]
Ropeney_ has joined #ruby
raul782 has quit [Remote host closed the connection]
raul782 has joined #ruby
ta_ has quit [Ping timeout: 256 seconds]
raul782 has quit [Remote host closed the connection]
tuxaddicted has quit [Ping timeout: 260 seconds]
platzhirsch has quit [Quit: WeeChat 1.4]
xall has quit [Ping timeout: 268 seconds]
xall has joined #ruby
toretore has joined #ruby
nankyokusei has joined #ruby
SteenJobs has quit [Ping timeout: 260 seconds]
troulouliou_dev has joined #ruby
karapetyan has joined #ruby
fatbob has quit [Ping timeout: 245 seconds]
nankyokusei has quit [Ping timeout: 256 seconds]
fatbob has joined #ruby
Kendos-Kenlen has quit [Quit: Konversation terminated!]
d0nn1e has quit [Ping timeout: 246 seconds]
chopin_ has joined #ruby
karapetyan has quit [Ping timeout: 252 seconds]
d0nn1e has joined #ruby
hahuang65 has quit [Read error: Connection reset by peer]
chihhsin has joined #ruby
hahuang65 has joined #ruby
dionysus69 has quit [Ping timeout: 260 seconds]
tpendragon has quit [Ping timeout: 260 seconds]
chopin has quit [Ping timeout: 252 seconds]
[`-`] has joined #ruby
savage is now known as Schmoe
dar123 has joined #ruby
pragmaticus has joined #ruby
Schmoe is now known as SAVAGE
maryo has quit [Ping timeout: 260 seconds]
[`-`] is now known as maryo
chopin has joined #ruby
SAVAGE is now known as OxOOBot
chopin_ has quit [Ping timeout: 248 seconds]
OxOOBot is now known as SAVAGE
troulouliou_dev has quit [Remote host closed the connection]
Prira_ has quit [Read error: Connection reset by peer]
sdothum has joined #ruby
jaguarmagenta has joined #ruby
chopin has quit [Remote host closed the connection]
chopin has joined #ruby
Rodya_ has joined #ruby
pawnbox has joined #ruby
kebolio has joined #ruby
<kebolio>
hiya
chopin has quit [Ping timeout: 245 seconds]
<kebolio>
i'm wondering if there is a source of documentation for ruby that's closer to python's aka prose
<kebolio>
i'm getting confused by api listings on ruby-doc, etc
<domgetter>
kebolio can you give an example of something you're confused about?
<blackbom1>
try rubydoc.info
<kebolio>
domgetter: i'd struggle to get you an example at the moment
<kebolio>
but overall i find ruby harder to use than python because of the docs
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<kebolio>
blackbom1: this looks very good, thank you
<domgetter>
kebolio perhaps your familiarity with Python has something to do with that ;)
tpendragon has joined #ruby
<kebolio>
hehe
<kebolio>
ty all
SteenJobs has joined #ruby
<blackbom1>
kebolio: yw, those docs are generated with yardoc btw.
<blackbom1>
the crappy ones use rdoc.
unpossible462 has joined #ruby
SteenJobs has quit [Ping timeout: 258 seconds]
chris2 has quit [Ping timeout: 256 seconds]
chopin has joined #ruby
cdg has quit [Remote host closed the connection]
ta_ has joined #ruby
BTRE has quit [Read error: Connection reset by peer]
SteenJobs has joined #ruby
pragmaticus has quit [K-Lined]
jhack has joined #ruby
raul782 has joined #ruby
<unpossible462>
Hi, I'm having a very tricky problem that I cannot figure out how to solve. I have an array of Regexps with capture groups, like /(.*) kicked (.*) from #.*/. Now I'm trying to match each Regexp against a string, and replace each string captured by one of the capture groups by a value returned by a method. Is this possible?
SteenJobs has quit [Ping timeout: 248 seconds]
<unpossible462>
I tried String#gsub with a block: str.gsub(/(.*) kicked (.*) from #.*/) { |s| realname(s) }
<unpossible462>
... but this only invokes the block once for the whole matched expression, not for each capture group
raul782 has quit [Ping timeout: 240 seconds]
<pabs>
unpossible462: you can do what you're asking for
spacheco has joined #ruby
SteenJobs has joined #ruby
<toretore>
use $~ in the block unpossible462
chris2 has joined #ruby
yardenbar has joined #ruby
futilegames has joined #ruby
jgnagy has joined #ruby
futilegames has quit [Client Quit]
<unpossible462>
Nice, I didn't know about $~. I have the MatchData object now, but I'm still not sure how to replace each of the capture groups in the Regexp with the matched string.
Rodya_ has quit [Quit: Leaving...]
<toretore>
you can't, you replace the match in its entirety
<unpossible462>
Would I need to use a Regexp to match the capture groups in the original Regexp?
<unpossible462>
But anything else would have surprised me to be honest
<unpossible462>
So I won't be able to loop over the Regexps, because I need to know the string between the capture groups?
xrlabs has joined #ruby
SCHAAP137 has quit [Quit: Leaving]
ropeney has quit [Ping timeout: 260 seconds]
<blackbom1>
could you share the code
frankiee_ has joined #ruby
maryo has quit [Quit: Leaving]
yottanami has quit [Remote host closed the connection]
ta_ has quit [Ping timeout: 250 seconds]
<frankiee_>
Can anybody else `gem install twurl` (https://github.com/twitter/twurl) and then run `twurl` from the commandline? I'm getting `zsh: command not found`. I see twurl in `.gem/ruby/2.3.1/gems/twurl-0.9.3/bin/twurl` but attempting to run that gives me `cannot load such file -- .gem/ruby/2.3.1/gems/twurl-0.9.3/bin/../lib/twurl`: https://gist.github.com/anonymous/ab16b05b7ea24495c0c7a4cf15f1601b
<unpossible462>
I guess I could #to_s each Regexp, use gsub to replace '(.*)' with '%s' and then format the resulting string with str % $~.captures
<pabs>
unpossible462: look at the gist above
<domgetter>
unpossible462 if you want the code to be "more readable" in the future, I suggest using Regexp.last_match instead of $~
Guest8420 is now known as marahin
marahin has quit [Changing host]
marahin has joined #ruby
karapetyan has quit [Ping timeout: 260 seconds]
<unpossible462>
pabs: wow, thank you! Looking at your code right now!
<pabs>
unpossible462: it uses MatchData#offset() to extract the beginning and ending position of each capture, dups the input string and replaces each submatch
<unpossible462>
domgetter: will do. Thanks, that does make it a lot more readable.
nankyokusei has joined #ruby
<unpossible462>
Hahaha, great. Exactly what I needed. Thank you so much!!
<matthewd>
Note that if you're dealing with arbitrary regexes you'll probably need to check for / avoid overlapping ranges (nested matches)
aryaching has joined #ruby
araujo has quit [Quit: Leaving]
claudiuinberlin has quit [Remote host closed the connection]
<unpossible462>
Luckily not, they're very straightforward. But thanks for the heads-up :-)
jaguarmagenta has quit [Remote host closed the connection]
dar123 has joined #ruby
johnny56_ has joined #ruby
johnny56 has quit [Ping timeout: 246 seconds]
symm- has joined #ruby
nankyokusei has quit [Ping timeout: 258 seconds]
SteenJobs has quit [Quit: SteenJobs]
bturker has joined #ruby
BTRE has joined #ruby
SteenJobs has joined #ruby
BTRE has quit [Client Quit]
manu___ has joined #ruby
manu___ has quit [Client Quit]
cdg has joined #ruby
spacheco has quit []
spacheco has joined #ruby
jhack has quit [Quit: jhack]
bmurt has joined #ruby
jhack has joined #ruby
leitz has quit [Quit: Nappy time]
rfoust has joined #ruby
mim1k|work has quit [Ping timeout: 250 seconds]
cdg has quit [Ping timeout: 240 seconds]
wingwalker has quit [Ping timeout: 268 seconds]
raul782 has joined #ruby
mim1k|work has joined #ruby
BTRE has joined #ruby
raul782 has quit [Ping timeout: 240 seconds]
BTRE has quit [Read error: Connection reset by peer]
kebolio has quit [Quit: kebolio]
kebolio has joined #ruby
pawnbox has quit [Remote host closed the connection]
<Zarthus>
you could do something like String#split and compare how many elements match, too. Or just discard the last piece of the dot assuming that's always dynamic.
<warrshrike>
right so the thing is this is a hash containing 1000's of results for various files. i thought of the split thing it wouldnt work for my second example
<Zarthus>
If you split it by a dot your second result will still compare with AndroidOS/GenPua, we don't know how unique they have to be.
dviola has quit [Quit: WeeChat 1.6]
kirun has joined #ruby
<Zarthus>
you could also just iterate over the string and see how many characters are identical in the same position. Regexes are another possible solution but it really depends at how competent you are at writing many varying regexes, assuming your examples aren't the only patterns.
<warrshrike>
i know regexes sure. ive done automata theory just havent used them in ruby but that shouldnt be hard
sagax has quit [Remote host closed the connection]
<warrshrike>
hmm i like your suggestion of how many chars in same place
<warrshrike>
how can i do that with regex?
<Zarthus>
what? why would that need a regex
<Zarthus>
that's just a simple for loop.
rfoust has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<warrshrike>
how can i do that with regex?
<Zarthus>
What.
montanonic has quit [Ping timeout: 258 seconds]
<warrshrike>
check how many chars in same pos
<warrshrike>
for two strings
<Zarthus>
Why do you think that needs a regex.
shadowak47 has joined #ruby
zeroDi has joined #ruby
psychicist__ has joined #ruby
<warrshrike>
i dont
BTRE has joined #ruby
<warrshrike>
but a loop will be clunky so i thought maybe theres an elegant solution
<Zarthus>
If you think regexes are more elegant..
<warrshrike>
idk i just hate loops
<warrshrike>
map or foreach is so much neater. why should i tell you HOW to iterate...
<warrshrike>
the looping in map is abstracted away. what part doesnt make sense brother?
<Zarthus>
Your way of thinking, mostly.
<warrshrike>
so basically nothing. cool
<Zarthus>
Anyways, you could also use levenhstein, but I dunno how well that will work for your usecase.
<Zarthus>
you'd have to try yourself.
psychicist__ has quit [Ping timeout: 256 seconds]
gingray has quit [Ping timeout: 268 seconds]
<warrshrike>
yeah i did find a gem for it earlier
<warrshrike>
thanks m8
<elomatreb>
If you want to check strings like this, Regexes are probably your best option
opsxcq has joined #ruby
<Zarthus>
elomatreb: I don't agree, based on what he's been saying his patterns change a lot.
<elomatreb>
Maybe have a few expressions in an array then and check if at least one matches? Seems a lot cleaner than using weird loop constructs
ta_ has quit [Ping timeout: 260 seconds]
futilegames has quit [Quit: futilegames]
chris2 has quit [Ping timeout: 260 seconds]
<Zarthus>
he mentioned thousands of results, I dunno how often the pattern changes but aside from maintability that just sounds suboptimal - without him providing all examples it'll be hard to judge.
<Zarthus>
Ideally his db has just a field for what type of message it is, but that has all been hidden away from the question
<elomatreb>
If it's the output of a program I doubt there are more than a handful (probably <5) patterns
<Zarthus>
I dunno, it sounds like the name of an android module (where Airpush is a dynamic value as well)
<apeiros>
they said virus definitions
<apeiros>
there's literally hundreds of thousands of those
<Zarthus>
ah yeah, i read over that
<elomatreb>
Of course, but why would something output them in so many different formats then?
<apeiros>
IMO they should first figure a definition of sameness
opsxcq has quit [Quit: leaving]
nfk has joined #ruby
<Zarthus>
(i'm not saying regexes aren't a viable solution, but this guy said he knows regexes so if it was easy he'd probably have whipped up a regex of his own already)
officialsandeep8 has joined #ruby
<apeiros>
elomatreb: I would assume there's some logic in how the names are built. but IMO that's the duty of warrshrike to figure out. along with their rule for sameness.
<elomatreb>
Mh, they said "warrshrike> check how many chars in same pos". Didn't see that
jaguarmagenta has quit [Remote host closed the connection]
<elomatreb>
"<warrshrike> but the looping is hidden so" -- Isn't it the other way around in Ruby? for just uses each interally
<Zarthus>
frankiee_: Sounds like you're missing libxml2
<Zarthus>
from the sounds of it (and don't think this as any certainty), gem install gets an already built gem, building it locally requires development headers.
<frankiee_>
Zarthus: I'm not, the `gem install` manages to find it
reaVer has quit [Remote host closed the connection]
futilegames has joined #ruby
shadowak47 has joined #ruby
reaVer has joined #ruby
chris2 has joined #ruby
<adam12>
frankiee_: That is super odd. Does mkmf.log have anything out of the ordinary in it?
<adam12>
I wonder if nokogiri will even build on openbsd...
tdy has quit [Ping timeout: 245 seconds]
<adam12>
Actually nm, you proved it does, outside of bundler.
<frankiee_>
adam12: Yep, seems to build just fine.
<matthewd>
frankiee_: The executable isn't working because your gem bin dir isn't on your path
cibs has quit [Ping timeout: 268 seconds]
<frankiee_>
matthewd: I have to add paths like `.gem/ruby/<version>/gems/<name>/bin/` for every gist I install?
<matthewd>
(so no, they're not related, beyond the fact you seem to have chosen a less common setup in general)
rfoust has joined #ruby
<matthewd>
There should be a higher level bin dir
<frankiee_>
I'll look into it, thanks
cibs has joined #ruby
nankyokusei has joined #ruby
nankyoku_ has joined #ruby
careta has joined #ruby
spacheco has quit []
nankyokusei has quit [Ping timeout: 260 seconds]
jackjackdripper has joined #ruby
<matthewd>
frankiee_: Does `pkg-config --cflags libxml-2.0` (say) give reasonable output?
<matthewd>
I haven't looked at how nokogiri/extconf is actually calling it, but the general question is whether pkg-config is on your path and working, I guess
shadowak47 has quit [Remote host closed the connection]
<matthewd>
.. ignoring the fact it must be because the direct gem install was fine.
agent_white has quit [Quit: agent_white]
akkmaxon has joined #ruby
rfoust has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
akkmaxon has quit [Client Quit]
unpossible462 has quit [Ping timeout: 250 seconds]
rfoust has joined #ruby
jaguarmagenta has joined #ruby
vuoto has joined #ruby
xall has quit [Ping timeout: 260 seconds]
skalfyfan has joined #ruby
saneax is now known as saneax-_-|AFK
eljimmy has joined #ruby
<frankiee_>
matthewd: Indeed, it outputs `-I/usr/local/include/libxml2 -I/usr/local/include`
<matthewd>
Seems plausible
<matthewd>
Does mkmf.log contain any clues?
futilegames has quit [Quit: futilegames]
SteenJobs has quit [Quit: SteenJobs]
nankyoku_ has quit [Remote host closed the connection]
vuoto has quit [Remote host closed the connection]
xrlabs has quit [Quit: Connection closed for inactivity]
libastral has joined #ruby
pi_ has joined #ruby
<matthewd>
frankiee_: I guess you should have a mkmf.log somewhere inside the gem that installed successfully too.. maybe comparing them will point to something?
officialsandeep8 has quit [Ping timeout: 252 seconds]
<apeiros>
sorry YaknotiS, should have gone @ ych, but they left :(
libastral has quit [Ping timeout: 250 seconds]
<adam12>
ruby-toolbox feels abandoned.
<adam12>
ie - I don't remember Oga being listed on it (maybe that's changed?)
yitsushi^away is now known as yitsushi
xall has quit [Ping timeout: 246 seconds]
libastral has joined #ruby
ta_ has joined #ruby
fullofcaffeine has joined #ruby
solocshaw has joined #ruby
benlieb has joined #ruby
riotjones has joined #ruby
raul782 has joined #ruby
fullofcaffeine has quit [Remote host closed the connection]
SteenJobs has quit [Quit: SteenJobs]
skalfyfan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
fullofca_ has joined #ruby
raul782 has quit [Ping timeout: 252 seconds]
cdg has joined #ruby
SteenJobs has joined #ruby
miqlas-H has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
cdg has quit [Read error: Connection reset by peer]
johnmccabe has joined #ruby
cdg has joined #ruby
solocshaw has quit [Ping timeout: 258 seconds]
fullofca_ has quit [Remote host closed the connection]
jesush has joined #ruby
johnmccabe has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
araujo has quit [Quit: Leaving]
ta_ has quit [Ping timeout: 245 seconds]
pawnbox has joined #ruby
hutch34 has quit [Ping timeout: 248 seconds]
dar123 has quit [Ping timeout: 245 seconds]
symm- has joined #ruby
hutch34 has joined #ruby
handicraftsman has joined #ruby
Salih has joined #ruby
Salih has joined #ruby
Salih has quit [Changing host]
<handicraftsman>
Lisp with ruby'es stdlib?
william3_ has joined #ruby
xall has joined #ruby
<handicraftsman>
Oh, i should really try that
william3 has quit [Ping timeout: 250 seconds]
Ishido has joined #ruby
jesush has quit [Quit: jesush]
araujo has joined #ruby
xall has quit [Ping timeout: 246 seconds]
william3_ has quit [Remote host closed the connection]
fullofcaffeine has joined #ruby
william3 has joined #ruby
swills has quit [Read error: Connection reset by peer]
william3 has quit [Remote host closed the connection]
swills has joined #ruby
william3 has joined #ruby
ramfjord has joined #ruby
jesush has joined #ruby
alexherbo2 has quit [Quit: WeeChat 1.6]
nankyokusei has joined #ruby
jhooker has joined #ruby
futilegames has quit [Quit: futilegames]
nankyokusei has quit [Ping timeout: 244 seconds]
chihhsin has quit [Quit: leaving]
chihhsin has joined #ruby
droids___ has joined #ruby
cdg has quit [Remote host closed the connection]
Rodya_ has joined #ruby
AlexRussia has quit [Ping timeout: 240 seconds]
careta has quit [Ping timeout: 250 seconds]
rfoust has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jaguarmagenta has joined #ruby
<droids___>
I'm using TracePoint to trace my code. The problem is that I would like some visibility when a Kernel.system is called. And by visibility I mean knowing which args are being passed to it.
govg has quit [Ping timeout: 260 seconds]
rwb has quit [Ping timeout: 256 seconds]
<droids___>
Is there any way to do this?
fullofcaffeine has quit [Remote host closed the connection]
karapetyan has quit [Remote host closed the connection]
fullofcaffeine has joined #ruby
karapetyan has joined #ruby
jaguarmagenta has quit [Ping timeout: 258 seconds]
<droids___>
Maybe overriding the call with a wraper?
fullofcaffeine has quit [Ping timeout: 244 seconds]
raul782 has joined #ruby
yardenbar has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
AlexRussia has joined #ruby
raul782 has quit [Ping timeout: 250 seconds]
ruby-lang957 has joined #ruby
<ruby-lang957>
dsf
karapetyan has quit [Remote host closed the connection]
<ruby-lang957>
Hi guys
yardenbar has quit [Ping timeout: 245 seconds]
SteenJobs has quit [Quit: SteenJobs]
ruby-lang957 has quit [Ping timeout: 260 seconds]
domgetter has joined #ruby
handicraftsman has quit [Quit: Leaving]
eljimmy has quit [Quit: This computer has gone to sleep]
jhooker has quit [Read error: Connection reset by peer]
govg has joined #ruby
jhooker has joined #ruby
SteenJobs has joined #ruby
ta_ has joined #ruby
sid_fules has joined #ruby
vuoto has joined #ruby
benlieb has quit [Quit: benlieb]
vuoto has quit [Remote host closed the connection]
solocshaw has joined #ruby
ta_ has quit [Ping timeout: 268 seconds]
ych has joined #ruby
zeroDi has quit [Quit: WeeChat 1.6]
byte512 has quit [Ping timeout: 260 seconds]
matp has quit [Remote host closed the connection]
nowhere_man has quit [Ping timeout: 252 seconds]
matp has joined #ruby
solocshaw has quit [Ping timeout: 245 seconds]
ych has quit [Max SendQ exceeded]
ericsupreme has joined #ruby
ericsupreme has quit [Remote host closed the connection]
ericsupreme has joined #ruby
govg has quit [Quit: leaving]
Wsewolod has joined #ruby
ericsupreme has quit [Client Quit]
Rutix has quit [Ping timeout: 265 seconds]
Rutix has joined #ruby
Rutix has joined #ruby
Rutix has quit [Changing host]
platzhirsch has joined #ruby
solocshaw has joined #ruby
vikaton has quit [Quit: Connection closed for inactivity]
karapetyan has joined #ruby
jesush has quit [Quit: jesush]
karapetyan has quit [Remote host closed the connection]
nankyokusei has joined #ruby
dviola has joined #ruby
miqlas-H has joined #ruby
centrx has joined #ruby
miqlas-H has quit [Client Quit]
nankyokusei has quit [Ping timeout: 265 seconds]
sid_fules has quit [Read error: Connection reset by peer]
sid_fules has joined #ruby
karapetyan has joined #ruby
vuoto has joined #ruby
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
jhooker has quit [Read error: Connection reset by peer]
Fichtenstein has joined #ruby
raul782 has joined #ruby
chris2 has quit [Ping timeout: 246 seconds]
flying has joined #ruby
Ishido has quit [Read error: Connection reset by peer]
raul782 has quit [Ping timeout: 250 seconds]
solocshaw has quit [Ping timeout: 240 seconds]
hahuang65 has quit [Ping timeout: 258 seconds]
jenrzzz has joined #ruby
BigDawg has joined #ruby
BDawg has joined #ruby
nikivi has joined #ruby
BDawg has quit [Remote host closed the connection]
nikivi has quit [Client Quit]
flying has quit []
jesush has joined #ruby
sid_fules has quit [Read error: Connection reset by peer]
nikivi has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
abc2 has quit [Ping timeout: 260 seconds]
chris2 has joined #ruby
wingwalker has joined #ruby
b0nn has joined #ruby
centrx has quit [Remote host closed the connection]
centrx has joined #ruby
nikivi has quit [Quit: irc]
Rutix has quit []
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Salih has quit [Quit: Leaving]
millerti has joined #ruby
sid_fules has joined #ruby
SCHAAP137 has quit [Read error: Connection reset by peer]
vuoto has quit [Remote host closed the connection]
jackjackdripper has joined #ruby
vuoto has joined #ruby
jackjackdripper1 has joined #ruby
jackjackdripper has quit [Read error: Connection reset by peer]
antoniobeyah has joined #ruby
Rutix has joined #ruby
Rutix has joined #ruby
Rutix has quit [Changing host]
smlocal has joined #ruby
ta_ has joined #ruby
platzhirsch has quit [Ping timeout: 248 seconds]
dnicole has joined #ruby
smlocal has quit [Client Quit]
SCHAAP137 has joined #ruby
toretore has quit [Ping timeout: 256 seconds]
nankyokusei has joined #ruby
Rodya_ has quit [Remote host closed the connection]
AnoHito has quit [Read error: Connection reset by peer]
bigtawm has joined #ruby
Rodya_ has joined #ruby
AnoHito has joined #ruby
droids___ has quit [Quit: bye...]
jenrzzz has quit [Ping timeout: 260 seconds]
ta_ has quit [Ping timeout: 250 seconds]
<Bish>
can i iterate over all accessors of an object?(those who are added by attr_reader/attr_accessor)
nankyokusei has quit [Ping timeout: 246 seconds]
Rodya_ has quit [Ping timeout: 240 seconds]
last_staff has quit [Quit: last_staff]
SCHAAP137 has quit [Read error: Connection reset by peer]
SAVAGE has quit [Quit: Connection closed for inactivity]
<centrx>
Bish: not sure about ones specifically defined with attr_
<centrx>
Bish: you can get methods, or instance variables
<centrx>
Bish: Rails/ActiveRecord has #attributes
<Bish>
i don
<Bish>
i don't do rails*
jaguarmagenta has joined #ruby
Coldblackice has joined #ruby
<centrx>
Bish: You could define your own attr_accessor method
<Bish>
yeah i know
bigtawm has quit [Ping timeout: 250 seconds]
<Bish>
but i will just take the method / instance variable approach
<Bish>
is enough in this case
ResidentBiscuit has joined #ruby
jackjackdripper1 has quit [Quit: Leaving.]
BigDawg has quit [Remote host closed the connection]
aidalgol has joined #ruby
aidalgol is now known as Guest76830
chocolatemario has joined #ruby
jaguarmagenta has quit [Ping timeout: 268 seconds]
jcao219 has joined #ruby
sid_fules has quit [Ping timeout: 265 seconds]
Guest76830 is now known as aidalgol
matp has quit [Remote host closed the connection]
matp has joined #ruby
raul782 has joined #ruby
Coldblackice has quit []
cats is now known as catsmas
tomphp has joined #ruby
hutch34 has quit [Ping timeout: 260 seconds]
terlar has quit [Ping timeout: 246 seconds]
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
fullofcaffeine has joined #ruby
raul782 has quit [Ping timeout: 265 seconds]
catsmas is now known as cats
cdg has joined #ruby
<chocolatemario>
ls
dnicole has quit [Remote host closed the connection]
minimalism has joined #ruby
<Bish>
chocolatemario: Directory listing for #ruby:
<Bish>
...
symm- has quit [Ping timeout: 248 seconds]
aryaching has quit [Ping timeout: 258 seconds]
kirun has quit [Quit: Konversation terminated!]
millerti has joined #ruby
sid_fules has joined #ruby
aryaching has joined #ruby
pi_ has quit [Quit: Verlassend]
SCHAAP137 has joined #ruby
chocolatemario has quit [Remote host closed the connection]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tdy has joined #ruby
fullofcaffeine has quit [Ping timeout: 268 seconds]
tau has quit [Remote host closed the connection]
Madplatypus has joined #ruby
fullofcaffeine has joined #ruby
sneakerhax has joined #ruby
<Diabolik>
what's the easiest way of setting all of the values in a 2d array to 0?
<Diabolik>
or to anything for that matter
nikivi has joined #ruby
william3 has quit [Remote host closed the connection]
<ResidentBiscuit>
The fill method?
montanonic has joined #ruby
naftilos76 has joined #ruby
marr has joined #ruby
symm- has joined #ruby
<centrx>
I'd say s
atom3_ has quit [Read error: Connection reset by peer]
Paradox has quit [Ping timeout: 246 seconds]
nankyokusei has joined #ruby
Paradox has joined #ruby
Rodya_ has joined #ruby
nankyokusei has quit [Ping timeout: 256 seconds]
tau has joined #ruby
blackbombay has joined #ruby
Rodya_ has quit [Ping timeout: 245 seconds]
minimalism has quit [Quit: minimalism]
greenbird has joined #ruby
blackbom1 has quit [Ping timeout: 245 seconds]
atom3 has joined #ruby
nikivi has quit [Quit: irc]
ta_ has joined #ruby
baweaver is now known as baweaver_away
claudiuinberlin has quit []
hutch34 has joined #ruby
Mon_Ouie has joined #ruby
xall has joined #ruby
ta_ has quit [Ping timeout: 260 seconds]
raul782 has joined #ruby
hutch34 has quit [Ping timeout: 256 seconds]
maryo has quit [Read error: Connection reset by peer]
maryo has joined #ruby
xall has quit [Ping timeout: 245 seconds]
raul782 has quit [Ping timeout: 260 seconds]
ResidentBiscuit has quit [Remote host closed the connection]
maloik has quit [Remote host closed the connection]
maloik has joined #ruby
vuoto has quit [Read error: Connection reset by peer]
pizzaops has quit [Ping timeout: 256 seconds]
jcao219 has quit [Ping timeout: 246 seconds]
brent__ has joined #ruby
pizzaops has joined #ruby
jcao219 has joined #ruby
antoniobeyah has quit [Quit: antoniobeyah]
greenbird has quit [Quit: This computer has gone to sleep]
fullofcaffeine has quit [Remote host closed the connection]
terlar has joined #ruby
fullofcaffeine has joined #ruby
ruby[bot] has quit [Remote host closed the connection]
ruby[bot] has joined #ruby
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
fullofcaffeine has quit [Ping timeout: 240 seconds]
greenbird has joined #ruby
mati_urunda has quit [Ping timeout: 244 seconds]
terlar has quit [Ping timeout: 258 seconds]
wingwalker has quit [Quit: Leaving]
pawnbox has quit [Remote host closed the connection]
sid_fules has quit [Read error: Connection reset by peer]
greenbird has quit [Quit: This computer has gone to sleep]
fullofcaffeine has joined #ruby
Sammichmaker has quit [Read error: Connection reset by peer]
fullofcaffeine has quit [Client Quit]
SteenJobs has quit [Quit: SteenJobs]
matp has quit [Remote host closed the connection]
matp has joined #ruby
marr has quit [Remote host closed the connection]
SCHAAP137 has quit [Remote host closed the connection]
marr has joined #ruby
nankyokusei has joined #ruby
ResidentBiscuit has joined #ruby
SCHAAP137 has joined #ruby
<apeiros>
Diabolik: Array.new to create such an array, and as ResidentBiscuit said, fill for an existing (each + fill)
ropeney has joined #ruby
nankyokusei has quit [Ping timeout: 256 seconds]
mati_urunda has joined #ruby
bturker has quit [Ping timeout: 256 seconds]
<Diabolik>
thanks apeiros and ResidentBiscuit
yeticry has quit [Ping timeout: 248 seconds]
chris2 has quit [Ping timeout: 260 seconds]
naftilos76 has quit [Quit: Αποχώρησε]
jaguarmagenta has joined #ruby
mati_urunda has quit [Ping timeout: 240 seconds]
symm- has quit [Quit: Leaving...]
yeticry has joined #ruby
firstdayonthejob has quit [Ping timeout: 260 seconds]
DoubleMalt has joined #ruby
DoubleMalt has quit [Remote host closed the connection]
jaguarmagenta has quit [Ping timeout: 256 seconds]