apeiros changed the topic of #ruby to: http://ruby-community.com || Ruby 2.2.2; 2.1.6; 2.0.0-p645: https://ruby-lang.org || Paste >3 lines of text on https://gist.github.com || log @ http://irclog.whitequark.org, other public logging is prohibited
diegoaguilar has quit [Ping timeout: 252 seconds]
jackjackdripper has quit [Quit: Leaving.]
GaryOak_ has quit [Remote host closed the connection]
Akagi201 has joined #ruby
juanpablo____ has quit [Quit: (null)]
juanpablo____ has joined #ruby
attlasbot has quit [Read error: Connection reset by peer]
jph98 has quit [Quit: jph98]
blaines has quit [Ping timeout: 264 seconds]
attlasbot has joined #ruby
Ropeney has joined #ruby
mjuszczak has quit []
Akagi201 has quit [Ping timeout: 264 seconds]
robustus has quit [Ping timeout: 264 seconds]
juanpablo____ has quit [Ping timeout: 240 seconds]
kayzon has joined #ruby
Guest64256 has quit [Excess Flood]
Affix has joined #ruby
Affix is now known as Guest82515
robustus has joined #ruby
<rahsd> anyone?
<havenwood> rahsd: Have zlib-dev package installed?
vdamewood has joined #ruby
jackjackdripper has joined #ruby
<rahsd> havenwood: zlib yes zlib-dev no.
reset has joined #ruby
JoshGlzBrk has joined #ruby
reset has quit [Client Quit]
<choke> pretty sure its zlib1g-dev ( i could be mistaken )... but either way installing libssl-dev should install it for you
Perdomo has joined #ruby
asmodlol has quit [Ping timeout: 264 seconds]
diegoaguilar has joined #ruby
bruno- has quit [Ping timeout: 250 seconds]
<Perdomo> i keep hear ruby is a fab and that its not a stable lang for big aplliactions. what do you guys thing?
<Perdomo> *hearing
kayzon has quit []
JoshGlzBrk has quit [Client Quit]
paulcsmith has quit [Quit: Lingo: www.lingoirc.com]
wallerdev has joined #ruby
snockerton has quit [Quit: Leaving.]
Ellis has quit [Quit: Ellis]
<choke> At one time this was true maybe. It's not a fad however, and I see it going nowhere.
<havenwood> fab \ˈfab\ (adjective) : extremely good
cryptarium has quit [Ping timeout: 276 seconds]
icebourg has joined #ruby
<choke> if you look at the global usage stats, while ruby may only account for 0.6% of all websites on the internet, it's steadily increasing... and only counts websites
lkba_ has joined #ruby
<choke> doesnt count public api's, etc...
MatthewsFace[SEA has quit [Remote host closed the connection]
<choke> and languages like php are in a steady decline
PhantomSpank has joined #ruby
jack_rabbit_ has joined #ruby
attlasbot has quit [Quit: Leaving]
ascarter_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
roolo has quit [Remote host closed the connection]
dorei has quit []
lkba has quit [Ping timeout: 256 seconds]
sevenseacat has joined #ruby
attlasbot has joined #ruby
sankaber has joined #ruby
kblake has quit [Remote host closed the connection]
luksaur has quit [Quit: Leaving]
leafybasil has joined #ruby
serivich has joined #ruby
towski_ has quit [Remote host closed the connection]
redlegion has joined #ruby
lotyrin has joined #ruby
ismaelga has joined #ruby
that1guy has quit [Ping timeout: 276 seconds]
exadeci has quit [Quit: Connection closed for inactivity]
that1guy has joined #ruby
scripore has joined #ruby
serivich has quit [Ping timeout: 255 seconds]
qwertme has joined #ruby
failshell has quit [Ping timeout: 265 seconds]
zzing has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
FrankD has quit [Ping timeout: 244 seconds]
charliesome has joined #ruby
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mostlybadfly has quit [Quit: Connection closed for inactivity]
that1guy has quit [Ping timeout: 244 seconds]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mistermocha has quit [Read error: Connection reset by peer]
gz_rain has joined #ruby
oo_ has joined #ruby
mistermocha has joined #ruby
failshell has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
scripore has joined #ruby
zotherstupidguy has quit [Quit: Lost terminal]
mistermocha has quit [Ping timeout: 276 seconds]
Deele has joined #ruby
laurentide has joined #ruby
asmodlol has joined #ruby
yeticry has quit [Ping timeout: 245 seconds]
ismael_ has joined #ruby
baweaver has joined #ruby
baweaver has quit [Remote host closed the connection]
baweaver has joined #ruby
yeticry has joined #ruby
ismaelga has quit [Ping timeout: 272 seconds]
bricker has quit [Quit: leaving]
icebourg has quit []
riceandbeans has quit [Ping timeout: 256 seconds]
ascarter has joined #ruby
Xoro has quit [Read error: Connection reset by peer]
Xoro has joined #ruby
ascarter_ has joined #ruby
mitchellhenke has joined #ruby
yfeldblum has joined #ruby
zz_barkerd427 is now known as barkerd427
KrzaQ has quit [Disconnected by services]
KrzaQ has joined #ruby
greenbagels has quit [Ping timeout: 245 seconds]
tus has quit []
greenbagels has joined #ruby
wallerdev has quit [Ping timeout: 240 seconds]
bootstrappm has left #ruby [#ruby]
gz_rain has quit []
endash has joined #ruby
alvaro_o has quit [Quit: Ex-Chat]
iteratorP has joined #ruby
frem has quit [Quit: Connection closed for inactivity]
beneggett has joined #ruby
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
GriffinHeart has joined #ruby
vikaton has joined #ruby
bruno- has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
MatthewsFace[SEA has joined #ruby
bruno- has quit [Ping timeout: 256 seconds]
programhappy has joined #ruby
delianides has joined #ruby
yh has quit [Ping timeout: 256 seconds]
DEA7TH_ has quit [Ping timeout: 244 seconds]
Akagi201 has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
lidenskap has quit [Remote host closed the connection]
amclain has joined #ruby
jshultz has joined #ruby
iasoon has quit [Ping timeout: 264 seconds]
programhappy has quit [Client Quit]
jackjackdripper has quit [Quit: Leaving.]
baweaver has quit [Read error: Connection reset by peer]
workmad3 has joined #ruby
baweaver has joined #ruby
mostlybadfly has joined #ruby
unreal_ has joined #ruby
qwertme has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
vickleton has quit [Ping timeout: 276 seconds]
emptyflask has joined #ruby
unreal has quit [Ping timeout: 256 seconds]
guest1241234 has quit [Quit: Connection closed for inactivity]
DerisiveLogic has quit [Ping timeout: 244 seconds]
workmad3 has quit [Ping timeout: 240 seconds]
baweaver has quit [Ping timeout: 244 seconds]
casadei_ has joined #ruby
beneggett has quit [Read error: Connection reset by peer]
mitchellhenke has quit [Quit: Computer has gone to sleep.]
rodfersou has quit [Remote host closed the connection]
casadei_ has quit [Ping timeout: 256 seconds]
metalic has joined #ruby
<attlasbot> How should you write rspecs about classes?
wolflee has joined #ruby
that1guy has joined #ruby
<lotyrin> attlasbot: elaborate?
<attlasbot> I'm trying to learn ruby not as my first programming language but one of the thing that really caught my attention was rspec testing, but now I have no idea where to start and I have no idea how to start writing them.
<weaksauce> attlasbot test each public function
<attlasbot> I'm just really no understanding how to go about writing them for a class really
davedev2_ has joined #ruby
multi_io has quit [Ping timeout: 264 seconds]
ascarter_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<weaksauce> do you have a specific class?
Pisuke has quit [Ping timeout: 255 seconds]
<attlasbot> yeah i'm doing a simple socket searcher it was how I started learning cpp and python so I figured why not in ruby.
babykosh_ has joined #ruby
<weaksauce> what do you mean socket searcher?
nobitanobi has quit [Remote host closed the connection]
mitchellhenke has joined #ruby
<attlasbot> an open port searcher
<weaksauce> ah
<lotyrin> well, you'd `describe` your class, each method and their behavior in various contexts
nobitanobi has joined #ruby
davedev24_ has quit [Ping timeout: 264 seconds]
multi_io has joined #ruby
<mostlybadfly> lotyrin: this might help too http://betterspecs.org/
<lotyrin> I reccomend the Rspec Book pretty highly, but there's countless tutorials.
<mostlybadfly> the very first blurb shows how to start describing a class
babykosh has quit [Ping timeout: 256 seconds]
<lotyrin> And yes, betterspecs is a great resource.
<weaksauce> I don't like the rspec book for rails at all
<sevenseacat> its quite outdated now.
babykosh_ is now known as babykosh
<ruboto> attlasbot, we in #ruby do not like pastebin.com, it loads slowly for most, has ads which are distracting and has terrible formatting. Please use https://gist.github.com
almostworking has joined #ruby
<attlasbot> when I try run the spec I get a no load of the file
<attlasbot> anyone got any idea?
<lotyrin> attlasbot: it doesn't / can't figure out where your class lives. You'll need to require lib/whatever.rb from your spec or spec_helper
<attlasbot> isn't that what require_relitive does?
<lotyrin> oh, sorry, I missed the require there
<sevenseacat> let's start with the error message
<sevenseacat> what is it?
<weaksauce> attlasbot remove the .rb
<attlasbot> require_relitive cannot load such file (loaderror)
Papierkorb has quit [Ping timeout: 264 seconds]
<attlasbot> thats after removing the rb as well weaksauce
<sevenseacat> so where is the file you're trying to require?
<sevenseacat> in your directory tree
<attlasbot> in lib/liqud_fist/
<weaksauce> require relative is relative to the spec file attlasbot
RegulationD has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
<weaksauce> where's the spec file
<sevenseacat> and where is lib in relation to your spec file
Pisuke has joined #ruby
<attlasbot> lib and spec are in the current directory
<attlasbot> so there is gemname/
<sevenseacat> so whats the '../' for then, if lib is in the same folder as the spec?
fgo has quit [Ping timeout: 240 seconds]
<attlasbot> gemname/ spec/ lib/
<sevenseacat> grrr
nobitanobi has quit [Remote host closed the connection]
<attlasbot> lib and spec are only in the same gemname_folder
<sevenseacat> too many people describing things and not showing them
* sevenseacat goes back to work
<weaksauce> attlasbot take a screenshot of the folder heirarchy
<weaksauce> hierarchy*
<mostlybadfly> if for rails this post might help too https://robots.thoughtbot.com/how-we-test-rails-applications
<sevenseacat> nope, not for rails.
mitchellhenke has quit [Quit: Computer has gone to sleep.]
DynamicMetaFlow has joined #ruby
mistermocha has joined #ruby
_ixti_ has quit [Ping timeout: 265 seconds]
<weaksauce> you misspelled it
<weaksauce> er I guess not
RegulationD has quit [Ping timeout: 256 seconds]
<al2o3-cr> *misspelt ;p
emptyflask has quit []
davedev2_ has quit []
gambl0re has joined #ruby
<weaksauce> the os x dictionary doesn't say so: http://i.imgur.com/0XpXAOf.png
Agent604 has joined #ruby
scripore has joined #ruby
<attlasbot> weaksauce, your spelling is fine.
fgo has joined #ruby
tkuchiki has joined #ruby
<al2o3-cr> weaksauce: my sincere apologies ;p
<weaksauce> :)
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<weaksauce> attlasbot that's curious. try double quotes instead of single quotes perhaps?
ismael_ has quit [Ping timeout: 276 seconds]
KramerC has quit [Ping timeout: 256 seconds]
<weaksauce> attlasbot are you absolutely sure you are editing the correct spec file?
<weaksauce> you have two there
<attlasbot> The current spec is searcher_spex
<attlasbot> The current spec is searcher_spec
<weaksauce> cat the file to make sure it's got the removed .rb
<attlasbot> where are you wanting the removed .rb?
<weaksauce> in the require_relative
<attlasbot> It was the double quote ?????
<attlasbot> Its now working
<weaksauce> heh
KramerC has joined #ruby
<attlasbot> Whats going on with that?
<sevenseacat> gist the code now?
Motoservo has quit [Quit: Motoservo]
<weaksauce> yeah I suppose they don't interpolate the .. with single quotes. strange
iotouch has joined #ruby
<sevenseacat> well, no
ramfjord has quit [Ping timeout: 264 seconds]
<weaksauce> seems like it should work both ways
<sevenseacat> it should
<weaksauce> I agree
<sevenseacat> suspect the .rb only just got removed now at the same time as quotes got changed
<attlasbot> Its now working single quotes as well?
<sevenseacat> see?
<attlasbot> okay thank you guys so damn much
<weaksauce> must bee
<weaksauce> be*
<attlasbot> so now back to the whole writing specs
<weaksauce> basically write tests that you would manually do.
<weaksauce> it "should not crash when passed in an invalid port number"
<weaksauce> it "should find an open port"
<weaksauce> it "..."
<attlasbot> okay so describe '#new' do
<attlasbot> it 'should return searcher object' do
willharrison has joined #ruby
Motoservo has joined #ruby
<weaksauce> I typically only test the code that I write
<sevenseacat> thats testing ruby itself, your code
<sevenseacat> *not your code
<attlasbot> and then @s.should be_instance_of(Searcher)
mistermocha has quit [Ping timeout: 245 seconds]
<sevenseacat> new will always return you an instance of the class you called new on
<weaksauce> that will get implicitly tested because every other test depends on new working.
Rickmasta has joined #ruby
Rickmasta has quit [Max SendQ exceeded]
<attlasbot> thank you!
Rickmasta has joined #ruby
<sevenseacat> if youre doing things like setting values in the initialize method, that might be worth testing
<sevenseacat> (note: might)
Soda has joined #ruby
Soda has quit [Remote host closed the connection]
icebourg has joined #ruby
mrmargolis has joined #ruby
FernandoBasso has quit [Quit: leaving]
barhum2013 has joined #ruby
barhum2013 has left #ruby [#ruby]
phutchins1 has quit [Ping timeout: 240 seconds]
tjohnson has quit [Quit: Connection closed for inactivity]
GriffinHeart has quit [Remote host closed the connection]
konsolebox has joined #ruby
GriffinHeart has joined #ruby
mistermocha has joined #ruby
GriffinHeart has quit [Remote host closed the connection]
freerobby has joined #ruby
konsolebox has quit [Max SendQ exceeded]
konsolebox has joined #ruby
jack_rabbit_ has quit [Quit: Leaving]
jack_rabbit_ has joined #ruby
juanpablo____ has joined #ruby
barkerd427 is now known as zz_barkerd427
jack_rabbit_ has quit [Client Quit]
jack_rabbit has joined #ruby
Irfan_A has joined #ruby
jeromelanteri has joined #ruby
babykosh_ has joined #ruby
willharrison has quit [Ping timeout: 250 seconds]
endash has quit [Quit: endash]
juanpablo____ has quit [Ping timeout: 265 seconds]
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
babykosh_ has quit [Read error: Connection reset by peer]
babykosh has quit [Ping timeout: 272 seconds]
G has quit [Remote host closed the connection]
<DynamicMetaFlow> Hello, has anyone had any experience with bootcamps?
mistermocha has quit [Ping timeout: 256 seconds]
lidenskap has joined #ruby
oo_ has quit [Remote host closed the connection]
Spami has quit [Quit: This computer has gone to sleep]
delianides has quit [Remote host closed the connection]
BTRE has joined #ruby
redlegion has quit [Read error: error:1408F119:SSL routines:SSL3_GET_RECORD:decryption failed or bad record mac]
redlegion has joined #ruby
HTH_ has joined #ruby
<sevenseacat> thankfully no
b4tm4n has quit [Quit: Leaving]
<havenwood> DynamicMetaFlow: I know folk who have.
<havenwood> DynamicMetaFlow: Considering it?
mistermocha has joined #ruby
<weaksauce> I learned programming before the internet and before bootcamps
freerobby has quit [Quit: Leaving.]
<sevenseacat> i learned programming when the internet was becoming big
<sevenseacat> before bootcamps :P
gsd has joined #ruby
fgo has quit [Ping timeout: 240 seconds]
ramfjord has joined #ruby
redlegion has quit [Quit: Too function to stoned.]
dfinninger has joined #ruby
mistermo_ has joined #ruby
thatslifeson has joined #ruby
tyler617 has joined #ruby
mistermocha has quit [Ping timeout: 272 seconds]
parduse has joined #ruby
nobitanobi has joined #ruby
gusrub has quit [Quit: Leaving]
PhantomS_ has joined #ruby
thumpba has joined #ruby
PhantomSpank has quit [Ping timeout: 272 seconds]
oo_ has joined #ruby
harlen has joined #ruby
oo_ has quit [Remote host closed the connection]
oo_ has joined #ruby
ramfjord has quit [Ping timeout: 256 seconds]
claptor has joined #ruby
mrmargolis has quit []
millerti has joined #ruby
<that1guy> Thankfully no?
<that1guy> I'm considering a bootcamp, anyone want to expound on that?
gazay has joined #ruby
kwd has quit [Remote host closed the connection]
<sevenseacat> i dont see the purpose. you spend a shitload of money for some intensive course, or you can just gather your own materials and do your own learning in your own time.
willharrison has joined #ruby
claptor has quit [Client Quit]
<that1guy> My wife is working now, and I just quit my job to study full time. I've been gathering material and resources and trying problems but feel that I'm not making as much progress as I'd like. How would you suggest to structure the learning?
<pipework> Some people like others to direct their learning and curate their experience.
DerisiveLogic has joined #ruby
dvlwrk has quit [Ping timeout: 256 seconds]
Eiam_ has joined #ruby
<pipework> that1guy: generally, I'd suggest going through gettingstarted, maybe pick up r4ia, and then work on projects.
<havenwood> that1guy: I haven't done the bootcamp route but I know a couple people who found it really rewarding. I actually don't know someone who's been burned by one so my feelings are pretty positive.
<sevenseacat> its mainly the price and the speed of learning that bugs me. the quicker you shove this stuff down your throat, the less you're going to remember.
mistermo_ has quit [Ping timeout: 244 seconds]
hmsimha has joined #ruby
<Eiam_> hmm this isn't making a lot of sense. https://gist.github.com/anonymous/a167293e12f275efa6b1 redis says that keys is a public method, so I call it and it says its unknown
<sevenseacat> the redis gem knows the method, but the redis server itself doesnt
<Eiam_> okay.. so I guess im sending the wrong object the method
diegoviola has joined #ruby
<havenwood> sevenseacat: It seems to me the more you were self-taught going in the more you could glean from it. I want to go to coding camp!! :)
ismaelga has joined #ruby
<havenwood> I'm jealous.
<sevenseacat> i didnt think they were aimed at people that already knew how to code.
<sevenseacat> that makes even less sense to me.
<that1guy> I'm pretty sold on going to app academy. I think the social aspect of it is going to help a lot. I wish I wasn't working on it alone all the time. I found an error that kept be back a few hours because of spelling.
jeromelanteri has quit [Ping timeout: 272 seconds]
nobitanobi has quit [Remote host closed the connection]
<sevenseacat> that1guy: did you ask us about it and gist your code?
ramfjord has joined #ruby
<pipework> Everything you really need to learn is free, but that might not translate to it being easy to learn from.
<Eiam_> sevenseacat: i mean, "keys" is something you CAN tell redis server, so I'm not sure I follow
jack_rabbit has quit [Ping timeout: 240 seconds]
<havenwood> pipework: So much code to read! We don't have to hunt down floppy drives or anything.
bruno- has joined #ruby
<that1guy> sevenseacat: I usually do, I don't understand gist yet, but I send links like https://github.com/Willardgmoore/practice/blob/master/17.rb
rkazak has joined #ruby
<havenwood> sevenseacat: The ones that cater to folk who can already code tend not to charge.
nobitano_ has joined #ruby
parduse has quit []
<sevenseacat> i see. maybe i have the wrong definition of bootcamp. i think of those 'we'll turn people from novice to ninja in six weeks if you give us 10k'
<sevenseacat> ones
<havenwood> sevenseacat: Like Recurse Center, they offer optional jobs at the end and somehow make a cut.
BTRE has quit [Quit: Leaving]
zz_barkerd427 is now known as barkerd427
<Eiam_> k guess ill compile the redis-cli and just bypass ruby
<that1guy> I usually use the channel called ##new2ruby and just monitor this channel because I feel in over my head here still.
almostworking has quit [Quit: Leaving]
<pipework> havenwood: Probably recruiter bonus.
<that1guy> I believe the recruiter bonus, app academy gets that on top of students paying.
BTRE has joined #ruby
bruno- has quit [Ping timeout: 240 seconds]
diegoaguilar has quit [Remote host closed the connection]
jeromelanteri has joined #ruby
Matachines has joined #ruby
lotyrin has quit [Ping timeout: 256 seconds]
jalcine has quit [Quit: ZNC - http://znc.in]
braincra- has quit [Quit: bye bye]
Matachines has quit [Max SendQ exceeded]
Matachines has joined #ruby
BTRE has quit [Client Quit]
dfinninger has quit [Remote host closed the connection]
nobitano_ has quit [Remote host closed the connection]
diegoaguilar has joined #ruby
diegoaguilar has quit [Max SendQ exceeded]
BTRE has joined #ruby
<havenwood> sevenseacat: They say "educational retreat" not bootcamp. Maybe I'm the one who has the wrong definition of bootcamp. :O
<havenwood> Anyways, yay learning!
jalcine has joined #ruby
<sevenseacat> \o/
fgo has joined #ruby
<sevenseacat> hey look we didn't just start abusing each other when we disagreed - progress in the world!
Perdomo has quit [Ping timeout: 245 seconds]
tenseiten has joined #ruby
attlasbot has quit [Quit: Leaving]
workmad3 has joined #ruby
<that1guy> Is there a way to get my links to show up anonymously here? Should I care?
jalcine has quit [Client Quit]
Bagezio has joined #ruby
jalcine has joined #ruby
seitensei has quit [Ping timeout: 276 seconds]
<that1guy> What IRC clients do you guys use?
Bagezio has quit [Client Quit]
<Criten> irssi
<al2o3-cr> weechat-curses
<sevenseacat> textual
<havenwood> that1guy: You can be anonymous if you'd like to be. I'm not with private info on my Githubs.
baweaver has joined #ruby
PhantomS_ has quit [Read error: Connection reset by peer]
moeabdol2 has quit [Ping timeout: 255 seconds]
PhantomSpank has joined #ruby
<that1guy> Is that like a paid feature though? I don't remember seeing it around.
<havenwood> that1guy: You can ask for a cloak in #freenode if you'd like to cloak your IP while they have SASL/TOR blocked.
casadei_ has joined #ruby
KramerC has quit [Ping timeout: 240 seconds]
braincras has joined #ruby
lidenskap has quit [Remote host closed the connection]
<havenwood> that1guy: To be anonymous you don't post any personally identifying information and probably also connect via Tor's Tails and take other measures if you actually care.
workmad3 has quit [Ping timeout: 240 seconds]
<pipework> sevenseacat: You're a shit person for having opinions that don't directly align with mine. Or was it that I'm the shit person? I can never recall.
<sevenseacat> pipework: a little of column a, a little of column b :P
apurcell has quit [Quit: Be back later ...]
Jaood has joined #ruby
jalcine has quit [Client Quit]
<havenwood> that1guy: A minority of folk operate solely under a nom de plume, and that's generally respected. But most just use real names.
sinkensabe has joined #ruby
juanpablo____ has joined #ruby
jalcine has joined #ruby
Jaood has left #ruby [#ruby]
jalcine has quit [Client Quit]
<havenwood> Real name behind the nick.
jalcine has joined #ruby
<al2o3-cr> peoples opinions please about constansts: DEFAULT or Default ?
<havenwood> al2o3-cr: yes
<al2o3-cr> which one?
<sevenseacat> SCREAMING_SNAKE_CASE for constants IMO.
<sevenseacat> thats the technical term.
<havenwood> +1 SCREAMING_SNAKES
jgrevich has quit [Read error: Connection reset by peer]
jgrevich has joined #ruby
<havenwood> just no headlessCamels
* havenwood shudders
juanpablo____ has quit [Ping timeout: 240 seconds]
<al2o3-cr> lol ok
<al2o3-cr> so SCREAMING_SNAKES it is ;p
that1guy has quit [Ping timeout: 265 seconds]
chipotle has joined #ruby
<al2o3-cr> i'm not fussy ;)
jalcine has quit [Client Quit]
patcable has left #ruby [#ruby]
sinkensabe has quit [Ping timeout: 276 seconds]
jalcine has joined #ruby
charliesome has quit [Quit: zzz]
<al2o3-cr> sevenseacat: just for you http://bit.ly/1HP3uxd ;)
<sevenseacat> awwwwwwwwwwwwwwww
charliesome has joined #ruby
<al2o3-cr> yw
metalic has quit [Quit: Leaving]
<al2o3-cr> or maybe this http://bit.ly/1zDnVKr
<havenwood> Unsafe.
GriffinHeart has joined #ruby
conanza has joined #ruby
<al2o3-cr> well cats do have 9 lives ;p
conanza has quit [Client Quit]
Irfan_A has quit [Quit: Leaving.]
<havenwood> Think of the poor train derailed though as the cat scampers away...
<al2o3-cr> LMAO ;p
GriffinHeart has quit [Remote host closed the connection]
<al2o3-cr> this is why cats have nine lives http://cheezburger.com/6469524480
TheNet has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nobitanobi has joined #ruby
GriffinHeart has joined #ruby
frem has joined #ruby
peteykun has joined #ruby
babykosh has joined #ruby
thatslifeson has quit [Remote host closed the connection]
tyler617 has quit [Remote host closed the connection]
iotouch has quit [Read error: Connection reset by peer]
<Eiam_> havenwood: ha. this channel is logged anyway
nobitanobi has quit [Remote host closed the connection]
iotouch has joined #ruby
<Eiam_> havenwood: i just have a totally seperate identity with a real name & address, real twitter etc, but its just me..
<Eiam_> sock puppet i suppose
<Eiam_> only connects to irc via a remote bouncer
<Eiam_> I've given far too much thought on how to secure a Social Security # & Birth certificate for said identity
<Eiam_> =0
nobitanobi has joined #ruby
RegulationD has joined #ruby
PhantomSpank has quit [Read error: Connection reset by peer]
PhantomSpank has joined #ruby
electriv has joined #ruby
<al2o3-cr> >> ":lilbot!~nodebot@107.19.155.104.bc.googleusercontent.com PRIVMSG #filmsbykris :al2o3-cr|bot, welcome!"; data.scan /:(.+)!~|([#]{1,2}.+?)\s|@(.+?)\s/
<ruboto> al2o3-cr # => undefined local variable or method `data' for main:Object (NameError) ...check link for more (https://eval.in/332563)
<ElderFain> sounds a bit.. paranoid? =0
<al2o3-cr> >> data = ":lilbot!~nodebot@107.19.155.104.bc.googleusercontent.com PRIVMSG #filmsbykris :al2o3-cr|bot, welcome!"; data.scan /:(.+)!~|([#]{1,2}.+?)\s|@(.+?)\s/
<ruboto> al2o3-cr # => [["lilbot", nil, nil], [nil, nil, "107.19.155.104.bc.googleusercontent.com"], [nil, "#filmsbykris", ...check link for more (https://eval.in/332564)
KramerC has joined #ruby
blazes816 has joined #ruby
<al2o3-cr> is this correct way of extracting the data?
poguez_ has quit [Quit: Connection closed for inactivity]
<al2o3-cr> or can the regex be bettered some how?
RegulationD has quit [Ping timeout: 255 seconds]
Spami has joined #ruby
greenbagels has quit [Quit: Leaving]
tcrypt has quit [Ping timeout: 244 seconds]
babykosh_ has joined #ruby
diegoaguilar has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
babykosh has quit [Ping timeout: 240 seconds]
babykosh_ has quit [Read error: Connection reset by peer]
blazes816 has quit [Ping timeout: 244 seconds]
babykosh has joined #ruby
peteykun has quit [Quit: Leaving]
cjim_ has joined #ruby
zzing has joined #ruby
that1guy has joined #ruby
zzing has quit [Client Quit]
babykosh has quit [Read error: Connection reset by peer]
babykosh has joined #ruby
zzing has joined #ruby
mrdmi has quit [Read error: Connection reset by peer]
mrdmi has joined #ruby
willharrison has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tkuchiki has quit [Remote host closed the connection]
scripore has joined #ruby
bigmac has joined #ruby
tkuchiki has joined #ruby
tubulife- has quit [Ping timeout: 250 seconds]
<bigmac> Dir.glob("place/*"){|x| puts x.gsub("place/")}
<bigmac> #<Enumerator:0x00000000bae0c8>
havenwood has quit [Ping timeout: 276 seconds]
<bigmac> i notice, i made a mistake @ x.gsub("place/", "")
NateHiggers has joined #ruby
<bigmac> but why does ruby say #<Enum...
<NateHiggers> have you seen ayak?
<mozzarella> does it execute at least once?
tkuchiki has quit [Ping timeout: 246 seconds]
<bigmac> it puts #<Enum... for each array
<mozzarella> yes but it's not a parsing error
<Eiam_> damnit, my download of Confident Ruby expired
<Eiam_> and I didn't get the final copy. grrr
<bigmac> maybe it should have displayed a error?
CloCkWeRX has quit [Read error: Connection reset by peer]
michael_mbp has quit [Excess Flood]
<bigmac> "lol".gsub("o") => #<Enumerator: "lol":gsub("o")>
<bigmac> should have said gsub requires a second parameter?
jshultz has quit [Quit: Connection closed for inactivity]
tkuchiki has joined #ruby
<sevenseacat> Eiam_: time to go buy the final copy!
<Eiam_> sevenseacat: why would I by it again, I already bought it
<sevenseacat> then how did it expire?
<Eiam_> shiprise just isn't letting me download it again
<mozzarella> "When neither a block nor a second argument is supplied, an Enumerator is returned."
tectonic has joined #ruby
<Eiam_> I dunno; ask those fuckers?
<Eiam_> I clicked the email link with the download and it tells me its expired
<mozzarella> bigmac: so yeah, it's expected
<sevenseacat> log in to your shiprise account and download it?
<mozzarella> it's in the doc
<Eiam_> sevenseacat: http://i.imgur.com/8s0ikAe.png
<Eiam_> I am?
scripore has quit [Quit: This computer has gone to sleep]
michael_mbp has joined #ruby
<sevenseacat> if you say so
<Eiam_> not sure what you mean about if I say so. I click the invoice, it shows my invoice for the book. I try to download, it says its expired
<Eiam_> how is that somehow my problem? =0
attlasbot has joined #ruby
astrobunny has joined #ruby
agent_white has joined #ruby
<baweaver> All else fails you can probably just straight ask avdi on twitter
iotouch has quit [Quit: This computer has gone to sleep]
<Eiam_> sevenseacat: http://i.imgur.com/DKSAj9q.png
<NateHiggers> has anyone seen ayak?
oo_ has quit [Remote host closed the connection]
<Eiam_> paid. conclusion? ShipRise shouldnt' be trusted to provide content you've paid for at any point in the future so don't buy ebooks from them.
<sevenseacat> Eiam_: so contact avdi.
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
<sevenseacat> NateHiggers: can you change your screen name, please?
<baweaver> He's a stand up guy, and whining on channel isn't doing much
<NateHiggers> sevenseacat: are we not allowed to use our real names?!
<sevenseacat> thats a very unfortunate real name if thats true.
* baweaver technically uses his real name
<NateHiggers> well i ain't exactly fortunate... never been rich in my life
tkuchiki has quit [Remote host closed the connection]
<Eiam_> sevenseacat: I did
tkuchiki has joined #ruby
jack_rabbit has joined #ruby
tkuchiki has quit [Remote host closed the connection]
CloCkWeRX has joined #ruby
agent_white has quit [Read error: Connection reset by peer]
arescorpio has quit [Quit: Leaving.]
agent_white has joined #ruby
that1guy has quit [Ping timeout: 250 seconds]
agent_white has quit [Read error: Connection reset by peer]
agent_white has joined #ruby
DynamicMetaFlow has quit [Remote host closed the connection]
tkuchiki has joined #ruby
attlasbot has quit [Quit: Leaving]
astrobunny has quit [Remote host closed the connection]
barkerd427 is now known as zz_barkerd427
bigmac has quit [Ping timeout: 256 seconds]
iotouch has joined #ruby
GriffinHeart has quit [Remote host closed the connection]
xjiujiu has joined #ruby
lidenskap has joined #ruby
sinkensabe has joined #ruby
agent_white has quit [Read error: Connection reset by peer]
lotyrin has joined #ruby
agent_white has joined #ruby
agent_white has quit [Read error: Connection reset by peer]
agent_white has joined #ruby
jeromelanteri has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
agent_white has quit [Read error: Connection reset by peer]
agent_white has joined #ruby
lidenskap has quit [Remote host closed the connection]
astrobunny has joined #ruby
lidenskap has joined #ruby
that1guy has joined #ruby
sinkensabe has quit [Ping timeout: 240 seconds]
CloCkWeRX1 has joined #ruby
Joufflu has joined #ruby
philoserf has joined #ruby
jack_rabbit has quit [Ping timeout: 245 seconds]
agent_white has quit [Read error: Connection reset by peer]
CloCkWeRX has quit [Ping timeout: 256 seconds]
djbkd has quit [Remote host closed the connection]
philoserf has quit [Remote host closed the connection]
wolflee has quit [Remote host closed the connection]
nobitanobi has quit [Remote host closed the connection]
wolflee has joined #ruby
agent_white has joined #ruby
That1Guy_ has joined #ruby
philoserf has joined #ruby
duderonomy has joined #ruby
GriffinHeart has joined #ruby
riceandbeans has joined #ruby
riceandbeans has joined #ruby
GriffinHeart has quit [Remote host closed the connection]
jack_rabbit has joined #ruby
Sembei has joined #ruby
nobitanobi has joined #ruby
lavros has joined #ruby
tectonic has quit []
philoserf has quit [Remote host closed the connection]
philoserf has joined #ruby
gaboesquivel has joined #ruby
chrissonar has joined #ruby
Pisuke has quit [Ping timeout: 256 seconds]
casadei_ has quit [Remote host closed the connection]
thatslifeson has joined #ruby
That1Guy_ has quit [Quit: Textual IRC Client: www.textualapp.com]
That1Guy_ has joined #ruby
balazs_ has joined #ruby
havenwood has joined #ruby
philoserf has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 276 seconds]
NateHiggers has quit [Quit: Page closed]
charliesome has quit [Quit: zzz]
Hirzu has joined #ruby
fedexo has joined #ruby
thatslifeson has quit [Ping timeout: 256 seconds]
GriffinHeart has joined #ruby
A205B064 has joined #ruby
iotouch has quit [Quit: This computer has gone to sleep]
bluOxigen has joined #ruby
Hirzu_ has quit [Ping timeout: 240 seconds]
jalcine has quit [Quit: ZNC - http://znc.in]
jalcine has joined #ruby
charliesome has joined #ruby
psy_ has quit [Ping timeout: 246 seconds]
iotouch has joined #ruby
philoserf has joined #ruby
longfeet has quit [Quit: Leaving]
xjiujiu_ has joined #ruby
xjiujiu has quit [Ping timeout: 256 seconds]
philoserf has quit [Quit: Palaver]
chipotle has quit [Quit: cheerio]
shadoi has quit [Quit: Leaving.]
IrishGringo has joined #ruby
mikecmpbll has quit [Quit: ciao.]
Soda has joined #ruby
Hirzu has quit [Remote host closed the connection]
xjiujiu has joined #ruby
nahtnam has joined #ruby
dseitz has quit [Quit: g'night]
astrobunny has quit [Remote host closed the connection]
xjiujiu_ has quit [Ping timeout: 265 seconds]
astrobunny has joined #ruby
xjiujiu has quit [Read error: Connection reset by peer]
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
SegFaultAX has quit [Ping timeout: 272 seconds]
balazs_ has quit [Remote host closed the connection]
oo_ has joined #ruby
That1Guy_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
SegFaultAX has joined #ruby
ismaelga has quit [Ping timeout: 244 seconds]
That1Guy_ has joined #ruby
iotouch has quit [Quit: This computer has gone to sleep]
electriv has quit [Read error: No route to host]
mtakkman has joined #ruby
agent_white has quit [Read error: Connection reset by peer]
wolflee_ has joined #ruby
agent_white has joined #ruby
juanpablo____ has joined #ruby
diegoviola has quit [Quit: WeeChat 1.1.1]
nobitanobi has quit [Remote host closed the connection]
diegoviola has joined #ruby
That1Guy_ has quit [Client Quit]
wolflee has quit [Ping timeout: 246 seconds]
nobitanobi has joined #ruby
GriffinHeart has quit [Remote host closed the connection]
nobitanobi has quit [Remote host closed the connection]
juanpablo____ has quit [Ping timeout: 245 seconds]
vickleton has joined #ruby
that1guy has quit [Ping timeout: 264 seconds]
vikaton has quit [Quit: Connection closed for inactivity]
mtakkman has quit [Read error: Connection reset by peer]
wolflee_ is now known as wolflee
riotjones has joined #ruby
IrishGringo has quit [Ping timeout: 256 seconds]
Matachines has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
aganov has joined #ruby
Spami has quit [Quit: Leaving]
sinkensabe has joined #ruby
mtakkman has joined #ruby
riotjones has quit [Ping timeout: 252 seconds]
Matachines has joined #ruby
GriffinHeart has joined #ruby
that1guy has joined #ruby
him has joined #ruby
Oka has quit [Quit: さようなら]
babykosh has quit [Quit: babykosh]
iotouch has joined #ruby
tagrudev has joined #ruby
sinkensabe has quit [Ping timeout: 252 seconds]
RegulationD has joined #ruby
diegoaguilar has quit [Quit: Leaving]
cellar_door has joined #ruby
djbkd has joined #ruby
thatslifeson has joined #ruby
that1guy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mtakkman has quit [Ping timeout: 272 seconds]
RegulationD has quit [Ping timeout: 264 seconds]
djbkd has quit [Ping timeout: 244 seconds]
jenrzzz has joined #ruby
him has quit [Ping timeout: 272 seconds]
electriv has joined #ruby
jenrzzz has quit [Ping timeout: 272 seconds]
djbkd has joined #ruby
SOLDIERz has joined #ruby
zzing has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
djellemah has joined #ruby
Ropeney has quit [Ping timeout: 244 seconds]
djbkd has quit [Ping timeout: 272 seconds]
cellar_door has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
zzing has joined #ruby
joelataylor has quit [Ping timeout: 240 seconds]
joelataylor has joined #ruby
swgillespie has joined #ruby
rkazak has quit [Quit: Sleep.....ing....]
icebourg has quit []
Soda has quit [Remote host closed the connection]
electriv has quit [Read error: No route to host]
<flughafen> morning everybody\
zzing has quit [Client Quit]
quazimodo has quit [Read error: No route to host]
ismaelga has joined #ruby
speaking1ode has joined #ruby
Matachines has quit [Ping timeout: 272 seconds]
speakingcode has quit [Ping timeout: 256 seconds]
duncannz has joined #ruby
Hirzu has joined #ruby
yfeldblum has quit [Remote host closed the connection]
yfeldblum has joined #ruby
fedexo has quit [Ping timeout: 256 seconds]
lotyrin has quit [Ping timeout: 256 seconds]
Hirzu has quit [Ping timeout: 245 seconds]
zenguy_pc has quit [Ping timeout: 276 seconds]
AlexRussia has quit [Ping timeout: 265 seconds]
sohrab has quit [Quit: leaving]
ismaelga has quit [Ping timeout: 276 seconds]
riotjones has joined #ruby
thatslif_ has joined #ruby
emilkarl has joined #ruby
SouL_|_ has joined #ruby
thatslifeson has quit [Ping timeout: 240 seconds]
ismaelga has joined #ruby
bigmac has joined #ruby
frem has quit [Quit: Connection closed for inactivity]
mrconfused has joined #ruby
<mrconfused> hi everyone
<mrconfused> what does this do ? set -ex
<mrconfused> code <<-EOH set -ex
decoponio has joined #ruby
sigurding has joined #ruby
ta has quit [Remote host closed the connection]
Joufflu has quit [Read error: Connection reset by peer]
<mrconfused> mozzarella: i'm familiar with heredocs but dont' know what set -ex does
bigmac has quit [Ping timeout: 272 seconds]
<sevenseacat> nothing, its part of the block
oo_ has quit [Remote host closed the connection]
<flughafen> set -ex is a bash thing
<flughafen> ?
<flughafen> -x displays all the output and -e exits on error
oo_ has joined #ruby
GriffinHeart has quit [Remote host closed the connection]
sinkensabe has joined #ruby
thatslifeson has joined #ruby
neanderslob has joined #ruby
GriffinHeart has joined #ruby
<mrconfused> flughafen: thanks. \
codecop has joined #ruby
thatslif_ has quit [Ping timeout: 240 seconds]
Hirzu has joined #ruby
chipotle has joined #ruby
rocknrollmarc has joined #ruby
bebijlya has quit [Ping timeout: 264 seconds]
bebijlya has joined #ruby
chimmy has joined #ruby
jenrzzz has joined #ruby
djbkd has joined #ruby
bruno- has joined #ruby
jenrzzz has quit [Ping timeout: 250 seconds]
SOLDIERz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
lotyrin has joined #ruby
vdamewood has quit [Quit: Computer has gone to sleep.]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
gagrio_ has joined #ruby
oo_ has quit [Remote host closed the connection]
bruno- has quit [Ping timeout: 245 seconds]
chimmy has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
apurcell has joined #ruby
Hirzu has quit [Remote host closed the connection]
workmad3 has joined #ruby
SOLDIERz has joined #ruby
apurcell has quit [Ping timeout: 272 seconds]
amclain has quit [Quit: Leaving]
lotyrin has quit [Ping timeout: 256 seconds]
thatslifeson has quit [Remote host closed the connection]
lotyrin has joined #ruby
jeromelanteri has joined #ruby
vickleton has quit [Quit: Ex-Chat]
workmad3 has quit [Ping timeout: 252 seconds]
Matachines has joined #ruby
juanpablo____ has joined #ruby
oo_ has joined #ruby
andikr has joined #ruby
moeabdol2 has joined #ruby
fella5s has joined #ruby
djbkd has quit []
rippa has joined #ruby
juanpablo____ has quit [Ping timeout: 265 seconds]
babykosh has joined #ruby
babykosh has quit [Client Quit]
babykosh has joined #ruby
kwd has joined #ruby
ismaelga has quit [Ping timeout: 272 seconds]
rkazak has joined #ruby
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
AlexRussia has joined #ruby
babykosh has quit [Client Quit]
baweaver has quit [Remote host closed the connection]
failshell has quit [Remote host closed the connection]
msgodf has joined #ruby
thumpba has quit [Remote host closed the connection]
Alina-malina has quit [Ping timeout: 264 seconds]
Alina-malina has joined #ruby
RegulationD has joined #ruby
exadeci has joined #ruby
ta has joined #ruby
gauke has joined #ruby
DynamicMetaFlow has joined #ruby
poguez_ has joined #ruby
Hirzu has joined #ruby
RegulationD has quit [Ping timeout: 240 seconds]
sinkensabe has quit [Remote host closed the connection]
msgodf has quit [Ping timeout: 252 seconds]
astrobunny has quit [Remote host closed the connection]
arup_r has joined #ruby
roolo has joined #ruby
Matachines has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Spami has joined #ruby
alex88 has joined #ruby
cjim_ has quit [Quit: (null)]
troulouliou_dev has joined #ruby
hanmac has quit [Ping timeout: 256 seconds]
MatthewsFace[SEA has quit [Remote host closed the connection]
SuperTaz has quit [Ping timeout: 256 seconds]
Irfan_A has joined #ruby
ta has quit [Read error: Connection reset by peer]
ta has joined #ruby
sinkensabe has joined #ruby
diegoviola has quit [Remote host closed the connection]
sinkensabe has quit [Remote host closed the connection]
terlar has joined #ruby
ismaelga has joined #ruby
msgodf has joined #ruby
casadei_ has joined #ruby
DynamicMetaFlow has quit [Ping timeout: 240 seconds]
jenrzzz has joined #ruby
selu has joined #ruby
sinkensabe has joined #ruby
sepp2k has joined #ruby
SuperTaz has joined #ruby
hanmac has joined #ruby
gazay has quit [Quit: gazay]
Hounddog has joined #ruby
casadei_ has quit [Ping timeout: 276 seconds]
sinkensabe has quit [Remote host closed the connection]
ShortCode has quit [Ping timeout: 276 seconds]
craigp has joined #ruby
<adaedra> Hi
moeabdol2 has quit [Ping timeout: 265 seconds]
sinkensabe has joined #ruby
kenndel has joined #ruby
marr has joined #ruby
sandelius has joined #ruby
doertedev has joined #ruby
<flughafen> hey adaedra
doertedev has quit [Client Quit]
hanmac1 has joined #ruby
kenndel has quit [Client Quit]
Irfan_A has left #ruby [#ruby]
sinkensabe has quit [Remote host closed the connection]
djbkd has joined #ruby
duncannz has quit [Ping timeout: 272 seconds]
TheHodge has joined #ruby
neanderslob has quit [Read error: Connection reset by peer]
djbkd has quit [Ping timeout: 256 seconds]
astrobunny has joined #ruby
neanderslob has joined #ruby
f3lp has joined #ruby
ismaelga has quit [Read error: Connection reset by peer]
doertedev has joined #ruby
ndrei has quit [Ping timeout: 250 seconds]
Zen-Zen has quit [Ping timeout: 264 seconds]
hmsimha has quit [Ping timeout: 256 seconds]
neanderslob has quit [Read error: Connection reset by peer]
craigp has quit [Ping timeout: 265 seconds]
livathinos has joined #ruby
kenndel has joined #ruby
sinkensabe has joined #ruby
Hirzu_ has joined #ruby
tesuji has joined #ruby
kyrylo has joined #ruby
fgo has quit [Ping timeout: 272 seconds]
joonty has joined #ruby
platzhirsch has left #ruby [#ruby]
Hirzu has quit [Ping timeout: 240 seconds]
PhantomSpank has quit [Remote host closed the connection]
CloCkWeRX1 has quit [Quit: Leaving.]
lidenskap has quit [Remote host closed the connection]
mrconfused has quit [Ping timeout: 245 seconds]
charliesome has quit [Quit: zzz]
granthatcher has joined #ruby
granthatcher has quit [Max SendQ exceeded]
ismaelga has joined #ruby
granthatcher has joined #ruby
granthatcher has quit [Max SendQ exceeded]
granthatcher has joined #ruby
granthatcher has quit [Max SendQ exceeded]
Pumukel has quit [Ping timeout: 265 seconds]
fgo has joined #ruby
granthatcher has joined #ruby
granthatcher has quit [Max SendQ exceeded]
mdw has joined #ruby
granthatcher has joined #ruby
granthatcher has quit [Max SendQ exceeded]
harlen has quit [Quit: Leaving.]
rkazak has quit [Quit: Sleep.....ing....]
yh has joined #ruby
granthatcher has joined #ruby
bigmac has joined #ruby
ralku has joined #ruby
ghr has joined #ruby
rdark has joined #ruby
lotyrin has quit [Quit: leaving]
ismaelga has quit [Read error: Connection reset by peer]
Zai00 has joined #ruby
PhantomSpank has joined #ruby
GriffinHeart has quit [Remote host closed the connection]
PhantomS_ has joined #ruby
PhantomSpank has quit [Read error: Connection reset by peer]
ramfjord has quit [Ping timeout: 264 seconds]
kenndel has quit [Quit: Leaving]
duckson has joined #ruby
PhantomSpank has joined #ruby
PhantomS_ has quit [Read error: Connection reset by peer]
Igorshp has joined #ruby
SOLDIERz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
astrobunny has quit [Read error: Connection reset by peer]
astrobun_ has joined #ruby
craigp has joined #ruby
PhantomSpank has quit [Read error: Connection reset by peer]
vtunka has joined #ruby
PhantomSpank has joined #ruby
Pumukel has joined #ruby
GriffinHeart has joined #ruby
SOLDIERz has joined #ruby
huddy has joined #ruby
arup_r has quit [Remote host closed the connection]
PhantomSpank has quit [Read error: Connection reset by peer]
mtakkman has joined #ruby
PhantomSpank has joined #ruby
lloyd is now known as Lloyd
PhantomSpank has quit [Read error: Connection reset by peer]
lkba_ has quit [Ping timeout: 276 seconds]
PhantomSpank has joined #ruby
<certainty> ok i don't understand the whitespace between method and black rule. The block lucks as if it didn't belong to the method. foo { something } ... even worse if you use the result of the block. foo { something }.something_else .. This looks as if the result of { something }.something_else is passed as an argument to foo
PhantomSpank has quit [Read error: Connection reset by peer]
duncannz has joined #ruby
mdw has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
PhantomSpank has joined #ruby
workmad3 has joined #ruby
<certainty> can someone please explain the rationale behind that rule?
<certainty> also my typing is shit. black = block, lucks = looks
thatslifeson has joined #ruby
haxrbyte has quit [Ping timeout: 245 seconds]
edwinvdgraaf has joined #ruby
mtakkman has quit [Read error: Connection reset by peer]
PhantomSpank has quit [Read error: Connection reset by peer]
PhantomS_ has joined #ruby
PhantomS_ has quit [Read error: Connection reset by peer]
ralku is now known as ralku[away]
PhantomSpank has joined #ruby
PhantomS_ has joined #ruby
PhantomSpank has quit [Read error: Connection reset by peer]
edwinvdgraaf has quit [Remote host closed the connection]
edwinvdgraaf has joined #ruby
thatslifeson has quit [Ping timeout: 265 seconds]
workmad3 has quit [Ping timeout: 272 seconds]
einarj has joined #ruby
PhantomS_ has quit [Read error: Connection reset by peer]
mengu__ has joined #ruby
PhantomSpank has joined #ruby
edwinvdgraaf has quit [Remote host closed the connection]
moeabdol2 has joined #ruby
juanpablo____ has joined #ruby
GriffinHeart has quit [Remote host closed the connection]
PhantomS_ has joined #ruby
PhantomSpank has quit [Read error: Connection reset by peer]
moeabdol2 has quit [Ping timeout: 264 seconds]
juanpablo____ has quit [Ping timeout: 272 seconds]
toretore has joined #ruby
ki0 has joined #ruby
duncan_ has joined #ruby
craigp has quit [Remote host closed the connection]
edwinvdgraaf has joined #ruby
craigp has joined #ruby
ralku[away] is now known as ralku
Deele has quit [Ping timeout: 256 seconds]
kaspernj has joined #ruby
colli5ion has joined #ruby
colli5ion has quit [Max SendQ exceeded]
craigp has quit [Remote host closed the connection]
edwinvdgraaf has quit [Remote host closed the connection]
colli5ion has joined #ruby
edwinvdgraaf has joined #ruby
craigp has joined #ruby
A205B064 has quit [Ping timeout: 255 seconds]
ismaelga has joined #ruby
quimrstorres has joined #ruby
leafybasil has quit [Remote host closed the connection]
quimrstorres has quit [Remote host closed the connection]
arup_r has joined #ruby
GriffinHeart has joined #ruby
arup_r has quit [Remote host closed the connection]
jph98 has joined #ruby
arup_r has joined #ruby
quimrstorres has joined #ruby
RegulationD has joined #ruby
Perdomo has joined #ruby
electriv has joined #ruby
scripore has joined #ruby
scripore has quit [Client Quit]
RegulationD has quit [Ping timeout: 244 seconds]
havenwood has quit [Ping timeout: 250 seconds]
TRManderson has joined #ruby
<TRManderson> is there a rails-specific IRC channel?
charliesome has joined #ruby
<shevy> yeah #rubyonrails
<TRManderson> ty
mrconfused has joined #ruby
failshell has joined #ruby
<shevy> you have to be registered with freenode perhaps
<shevy> flughafen how are things in Berlin with you?
Perdomo has quit [Ping timeout: 256 seconds]
wolflee has quit [Remote host closed the connection]
wolflee has joined #ruby
duncannz has quit [Quit: Leaving]
lidenskap has joined #ruby
Cust0sL1men has joined #ruby
Guest49691 has quit [Ping timeout: 272 seconds]
jenrzzz has quit [Ping timeout: 250 seconds]
failshell has quit [Ping timeout: 256 seconds]
yfeldblum has quit [Read error: Connection reset by peer]
Mohan has joined #ruby
Mohan is now known as Guest28649
yfeldblum has joined #ruby
DeBot has joined #ruby
astrobun_ has quit [Remote host closed the connection]
edwinvdgraaf has quit [Remote host closed the connection]
duncan_ has quit [Ping timeout: 245 seconds]
edwinvdgraaf has joined #ruby
lidenskap has quit [Ping timeout: 240 seconds]
mikecmpbll has joined #ruby
DeBot has quit [Ping timeout: 272 seconds]
leafybasil has joined #ruby
gazay has joined #ruby
leafybasil has quit [Remote host closed the connection]
sigurding has quit [Quit: sigurding]
leafybasil has joined #ruby
ismaelga has quit [Remote host closed the connection]
timonv1 has joined #ruby
otisZart has joined #ruby
sevenseacat has quit [Quit: Me dun like you no more.]
sigurding has joined #ruby
workmad3 has joined #ruby
ralku is now known as ralku[away]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
PhantomSpank has joined #ruby
PhantomS_ has quit [Read error: Connection reset by peer]
GriffinHeart has quit [Remote host closed the connection]
ralku[away] is now known as ralku
glen has joined #ruby
<glen> "3.14".to_f >= 3.5
<glen> => false
<glen> why it's false?
<adaedra> because 3.14 < 3.5
mengu__ has quit [Remote host closed the connection]
yfeldblum has quit [Read error: Connection reset by peer]
terlar has quit [Ping timeout: 252 seconds]
yfeldblum has joined #ruby
<glen> how to compare it like 3.05 vs 3.14
<adaedra> >> "3.14".to_f >= 3.05
<ruboto> adaedra # => true (https://eval.in/333437)
<adaedra> I don't really see your problem here
<glen> i have two versions 3.14 and 3.5
<adaedra> ah, you're comparing version numbers
<glen> 3.14 is bigger than 3.5 (14 vs 5)
<adaedra> I don't know if there's a ready-to use method for that, you may have to split on '.' and compare individuals components
jeromelanteri has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
ralku is now known as ralku[away]
jgrevich has quit [Quit: jgrevich]
<al2o3-cr> %listadm
<adaedra> This is with chef
<glen> so as i understood, i should use like: Chef::VersionConstraint.new(">= 3.5").include?("3.14")
<glen> => true
<al2o3-cr> oops wrong chan
<adaedra> you're under chef, glen ?
<glen> yes, i'm yunder chef
<adaedra> so it should be ok
ikeike443 has joined #ruby
PhantomSpank has quit [Read error: Connection reset by peer]
<glen> that .include? is confusing, i hope i put arguments in proper order! :)
PhantomSpank has joined #ruby
<adaedra> Read the line from left to right
<adaedra> "Does >= 3.5 includes 3.14"
<glen> ok :)
TRManderson has left #ruby [#ruby]
haxrbyte has joined #ruby
<hanmac1> glen you also might use:
<hanmac1> >> Gem::Version.new("3.14") > Gem::Version.new("3.5")
<ruboto> hanmac1 # => true (https://eval.in/333475)
<adaedra> yeah, there's also
robbyoconnor has joined #ruby
<adaedra> >> Gem::Dependency.new('', '~> 3.5).match?('', '3.14')
<ruboto> adaedra # => /tmp/execpad-b3882bb50a13/source-b3882bb50a13:2: syntax error, unexpected tFLOAT, expecting ')' ...check link for more (https://eval.in/333476)
thatslifeson has joined #ruby
<adaedra> uh
<adaedra> >> Gem::Dependency.new('', '~> 3.5').match?('', '3.14')
<ruboto> adaedra # => true (https://eval.in/333478)
wolfleemeta has joined #ruby
<adaedra> allows you to use the whole range of gem dependency 'operators' like >=, ~>, =, ...
jeromelanteri has joined #ruby
<hanmac1> adaedra: ah ok i didnt know that its working like that too ... i did use Requirement class for that:
<hanmac1> >> Gem::Requirement.new("~> 3.5").satisfied_by?(Gem::Version.new("3.14"))
<ruboto> hanmac1 # => true (https://eval.in/333484)
<adaedra> hanmac1: to be honest, I just learned that. Thanks StackOverflow :p
PhantomSpank has quit [Read error: Connection reset by peer]
PhantomS_ has joined #ruby
wolflee has quit [Ping timeout: 250 seconds]
bruno- has joined #ruby
thatslifeson has quit [Ping timeout: 256 seconds]
<glen> pff
<glen> Chef::VersionConstraint.new('>= 3.5').include?("3.10".to_f)
<glen> => false
ralku[away] is now known as ralku
kaspernj has quit [Remote host closed the connection]
<adaedra> Don't do .to_f
<adaedra> %(3.10).to_f => 3.1
<glen> but my input is 3.10.33-1
<adaedra> and?
<glen> Gem::Version.new("3.10.33-1") >= Gem::Version.new("3.5")
<glen> ArgumentError: Malformed version number string 3.10.33-1
<al2o3-cr> who does that codewars thingy ma bob?
<glen> the chef one throws too:
<glen> Chef::VersionConstraint.new('>= 3.5').include?("3.10.33-1")
<glen> NameError: uninitialized constant Chef::Exceptions
<adaedra> >> Gem::Version.new("3.10.33-1".split('-').first) >= Gem::Version.new("3.5")
<ruboto> adaedra # => true (https://eval.in/333502)
<glen> yeah, split... looks like hack
<glen> "3.10.33-1".split(/-/)[0]
<glen> => "3.10.33"
bruno- has quit [Ping timeout: 272 seconds]
<adaedra> it just keeps the part before the first -
<jhass> could also .tr("-", ".")
Leef_ has joined #ruby
<glen> thx
<glen> blah. still fails
<glen> '3.4.15.longterm' does not match 'x.y.z' or 'x.y'
<glen> i may just need to split on . and join just two elements
jeromelanteri has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<glen> how do i get first two?
<glen> "3.4.15.longterm".split('.')[0,1]
<glen> => ["3"]
colli5ion has quit []
<avril14th> "3.4.15.longterm".split('.')[0..1]
<avril14th> >> "3.4.15.longterm".split('.')[0..1]
<ruboto> avril14th # => ["3", "4"] (https://eval.in/333526)
<glen> found slice too
<glen> "3.4.15.longterm".split('.').slice(0,2)
<glen> => ["3", "4"]
fabrice31 has joined #ruby
jeromelanteri has joined #ruby
ralku is now known as ralku[away]
DerisiveLogic has quit [Ping timeout: 255 seconds]
ralku[away] is now known as ralku
haxrbyte has quit [Quit: Leaving...]
jeromelanteri_ has joined #ruby
moeabdol2 has joined #ruby
<jhass> >> "3.4.14.longterm"[/\d+(\.\d+)+/]
<ruboto> jhass # => "3.4.14" (https://eval.in/333528)
edwinvdg_ has joined #ruby
jeromelanteri_ has quit [Client Quit]
parduse has joined #ruby
jeromelanteri has quit [Ping timeout: 265 seconds]
lancetw has joined #ruby
bruno- has joined #ruby
rbennacer has joined #ruby
edwinvdgraaf has quit [Ping timeout: 240 seconds]
moeabdol2 has quit [Ping timeout: 264 seconds]
<adaedra> welcome to the wonderful world of version numbering
craigp has quit [Ping timeout: 256 seconds]
ndrei has joined #ruby
AlphaAtom has joined #ruby
craigp has joined #ruby
leafybas_ has joined #ruby
<adaedra> Aaaah, here it is
<adaedra> "This is XeTeX, Version 3.1415926-2.5-0.9999.3"
haxrbyte has joined #ruby
<hanmac1> glen: works with Gem::Version:
<hanmac1> >> Gem::Requirement.new("~> 3.1").satisfied_by?(Gem::Version.new("3.4.15.longterm"))
<ruboto> hanmac1 # => true (https://eval.in/333559)
segfalt has joined #ruby
rbennacer has quit [Ping timeout: 264 seconds]
<hanmac1> also :
<hanmac1> >> Gem::Requirement.new("~> 3.1").satisfied_by?(Gem::Version.new("3.4.15-1"))
<ruboto> hanmac1 # => true (https://eval.in/333560)
segfalt has quit [Remote host closed the connection]
lolmaus has joined #ruby
Hirzu_ has quit [Read error: Connection reset by peer]
<hanmac1> >> Gem::Version.new("3.10.33-1") >= Gem::Version.new("3.5")
<ruboto> hanmac1 # => true (https://eval.in/333561)
Hirzu has joined #ruby
segfalt has joined #ruby
leafybasil has quit [Ping timeout: 246 seconds]
AlphaAtom has quit [Ping timeout: 264 seconds]
lkba has joined #ruby
thumpba has joined #ruby
colli5ion has joined #ruby
charliesome_ has joined #ruby
failshell has joined #ruby
chrissonar has quit [Remote host closed the connection]
jimms has joined #ruby
iteratorP has quit [Remote host closed the connection]
rmoriz has joined #ruby
emilkarl has quit [Quit: emilkarl]
charliesome has quit [Ping timeout: 256 seconds]
thumpba has quit [Ping timeout: 250 seconds]
failshell has quit [Ping timeout: 256 seconds]
serivich has joined #ruby
alexherbo2 has quit [Quit: WeeChat 1.1.1]
yh has quit [Ping timeout: 252 seconds]
ValicekB has quit [Ping timeout: 246 seconds]
xcesariox has joined #ruby
poguez_ has quit [Quit: Connection closed for inactivity]
bruno- has quit [Quit: Lost terminal]
edwinvdg_ has quit [Remote host closed the connection]
Rickmasta has joined #ruby
bruno- has joined #ruby
fabrice31 has quit [Remote host closed the connection]
sandelius has joined #ruby
jayeshsolanki has joined #ruby
ArchRogem has joined #ruby
edwinvdgraaf has joined #ruby
fabrice31 has joined #ruby
arup_r_ has joined #ruby
alexherbo2 has joined #ruby
arup_r has quit [Ping timeout: 264 seconds]
pushpak has joined #ruby
Zai00 has quit [Quit: Zai00]
<hanmac1> glen: what is your ruby version or what ruby is your Chef using? ...
yh has joined #ruby
Rickmasta has quit [Ping timeout: 272 seconds]
electriv has quit [Quit: Textual IRC Client: www.textualapp.com]
fabrice31 has quit [Ping timeout: 250 seconds]
<hanmac1> there is a reason why i HATE bundled stuff like what Chef or vagrant doing with ruby
ValicekB has joined #ruby
mostlybadfly has quit [Quit: Connection closed for inactivity]
ralku is now known as ralku[away]
juanpablo____ has joined #ruby
jhass has quit [Quit: Bye]
<claw> /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- net/http (LoadError)
<claw> wtf?
<claw> what am i doing wrong ?
harly has joined #ruby
<harly> join #rubyonrails
<harly> yeah
<harly> pro.
<claw> got it
<claw> there no need to require net/http anymore
sgambino has joined #ruby
Leef_ has quit [Quit: Leaving]
juanpablo____ has quit [Ping timeout: 244 seconds]
haxrbyte_ has joined #ruby
pushpak has quit [Quit: Linkinus - http://linkinus.com]
vikaton has joined #ruby
avril14th has quit [Remote host closed the connection]
djbkd has joined #ruby
yh has quit [Ping timeout: 276 seconds]
NinjaOps has joined #ruby
jhass has joined #ruby
haxrbyte has quit [Ping timeout: 276 seconds]
terlar has joined #ruby
mengu has joined #ruby
<hanmac1> claw: hm are you sure its there? because it does works for me .-
<claw> theres no need to require it for me
ralku[away] is now known as ralku
shortCircuit__ has joined #ruby
djbkd has quit [Ping timeout: 256 seconds]
<shortCircuit__> I want to write a method that acts like rails's validate, I mean inside the method some actions will be executed if a condition passed like if: proc { 1 === 1 } is evaluated to true or false
mengu has quit [Ping timeout: 240 seconds]
jeromelanteri has joined #ruby
scripore has joined #ruby
jimms has quit [Remote host closed the connection]
rodfersou has joined #ruby
scripore has quit [Client Quit]
trouloulioud_dev has joined #ruby
ralku is now known as ralku[away]
troulouliou_dev has quit [Ping timeout: 246 seconds]
charliesome has joined #ruby
RegulationD has joined #ruby
fabrice31 has joined #ruby
mengu has joined #ruby
charliesome_ has quit [Ping timeout: 256 seconds]
turtil has quit [Ping timeout: 255 seconds]
mrconfused has quit [Read error: Connection timed out]
<jhass> what are you stuck with?
RegulationD has quit [Ping timeout: 265 seconds]
mrconfused has joined #ruby
charliesome has quit [Ping timeout: 256 seconds]
leafybas_ has quit [Read error: Connection reset by peer]
leafybasil has joined #ruby
another_eddie has joined #ruby
sdothum has joined #ruby
moeabdol2 has joined #ruby
charliesome has joined #ruby
lidenskap has joined #ruby
ahmetkapikiran has joined #ruby
delianides has joined #ruby
another_eddie has quit []
mathie has quit [Quit: Quitting...]
ralku[away] is now known as ralku
emilkarl has joined #ruby
mathie has joined #ruby
ndrei has quit [Ping timeout: 246 seconds]
moeabdol2 has quit [Ping timeout: 264 seconds]
lidenskap has quit [Ping timeout: 272 seconds]
ndrei has joined #ruby
avril14th has joined #ruby
serivich has quit [Ping timeout: 244 seconds]
ralku has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Guest28649 has quit [Ping timeout: 276 seconds]
Mohan__ has joined #ruby
haxrbyte has joined #ruby
<certainty> hmm i don't know what i did, but somehow emacs tried to ping the domain under point
<certainty> xD
<wasamasa> ffap
<wasamasa> certainty: the probably most bizarre bug I've ever found
ValicekB has quit []
haxrbyte has quit [Remote host closed the connection]
yh has joined #ruby
haxrbyte has joined #ruby
haxrbyte_ has quit [Ping timeout: 256 seconds]
charliesome has quit [Ping timeout: 256 seconds]
Zai00 has joined #ruby
charliesome has joined #ruby
blueOxigen has joined #ruby
ndrei has quit [Ping timeout: 255 seconds]
Spami has quit [Quit: This computer has gone to sleep]
<shortCircuit__> i has found it .. with .call
trouloulioud_dev has quit [Ping timeout: 276 seconds]
<shortCircuit__> \o/
<shortCircuit__> buddha moment
thatslifeson has joined #ruby
bluOxigen has quit [Ping timeout: 265 seconds]
_ixti_ has joined #ruby
<ddv> wasamasa: nice os
vtunka has quit [Quit: Leaving]
Akagi201 has quit [Remote host closed the connection]
sameerynho has joined #ruby
<wasamasa> ddv: pardon?
leafybasil has quit [Remote host closed the connection]
leafybasil has joined #ruby
yh has quit [Ping timeout: 264 seconds]
ValicekB has joined #ruby
lxsameer has quit [Ping timeout: 256 seconds]
charliesome has quit [Ping timeout: 256 seconds]
trouloulioud_dev has joined #ruby
trouloulioud_dev has quit [Max SendQ exceeded]
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
almostworking has joined #ruby
sgambino has joined #ruby
trouloulioud_dev has joined #ruby
sgambino has quit [Client Quit]
ndrei has joined #ruby
almostworking has left #ruby [#ruby]
charliesome has joined #ruby
ShortCode has joined #ruby
fabrice31 has quit [Remote host closed the connection]
fabrice31 has joined #ruby
jeromelanteri has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
jeromelanteri has joined #ruby
cassianoleal has joined #ruby
sandelius has quit [Quit: Textual IRC Client: www.textualapp.com]
ldnunes has joined #ruby
arup_r has joined #ruby
trouloulioud_dev has quit [Ping timeout: 265 seconds]
jph98 has quit [Quit: jph98]
glen has left #ruby [#ruby]
workmad3 has quit [Ping timeout: 272 seconds]
agent_white has quit [Quit: gnight!bbq]
arup_r_ has quit [Ping timeout: 256 seconds]
yfeldblum has quit [Ping timeout: 265 seconds]
doodlehaus has joined #ruby
Hobogrammer_ has joined #ruby
jph98 has joined #ruby
konsolebox has quit [Ping timeout: 256 seconds]
SouL_|_ has quit [Ping timeout: 276 seconds]
Hobogrammer has quit [Ping timeout: 256 seconds]
mengu has quit [Remote host closed the connection]
dvlwrk has joined #ruby
mrconfused has quit [Ping timeout: 256 seconds]
Hobogrammer has joined #ruby
terlar has quit [Ping timeout: 264 seconds]
workmad3 has joined #ruby
<shevy> wasamasa: nice tits
DeBot has joined #ruby
<wasamasa> shevy: wat
<shevy> what window manager is that on the last link?
<wasamasa> i3wm
jenrzzz has joined #ruby
Hobogrammer_ has quit [Ping timeout: 272 seconds]
nhhagen has joined #ruby
moeabdol2 has joined #ruby
AlphaAtom has joined #ruby
dvlwrk has quit [Ping timeout: 240 seconds]
ShortCode has quit [Ping timeout: 265 seconds]
PhantomS_ has quit [Read error: Connection reset by peer]
PhantomSpank has joined #ruby
fgo has quit [Ping timeout: 255 seconds]
moeabdol2 has quit [Client Quit]
jenrzzz has quit [Ping timeout: 250 seconds]
psy_ has joined #ruby
konsolebox has joined #ruby
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
diegoaguilar has joined #ruby
doodlehaus has quit [Remote host closed the connection]
diegoaguilar has quit [Read error: Connection reset by peer]
jenrzzz has joined #ruby
jph98 has quit [Quit: jph98]
fabrice31 has quit [Remote host closed the connection]
DEA7TH has joined #ruby
DEA7TH has quit [Changing host]
DEA7TH has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
AlphaAtom has joined #ruby
gazay has quit [Quit: gazay]
delianides has quit [Remote host closed the connection]
mostlybadfly has joined #ruby
failshell has joined #ruby
jph98 has joined #ruby
mengu has joined #ruby
fabrice31 has joined #ruby
wpp has joined #ruby
roolo has quit [Read error: Connection reset by peer]
roolo has joined #ruby
failshell has quit [Ping timeout: 272 seconds]
PhantomSpank has quit [Read error: Connection reset by peer]
PhantomSpank has joined #ruby
cmckee has joined #ruby
cmckee has quit [Client Quit]
PhantomSpank has quit [Read error: Connection reset by peer]
PhantomSpank has joined #ruby
yh has joined #ruby
fabrice31 has quit [Remote host closed the connection]
fabrice31 has joined #ruby
joonty has quit [Quit: joonty]
postmodern has quit [Quit: Leaving]
roolo has quit [Quit: Leaving...]
roolo has joined #ruby
fgo has joined #ruby
quimrstorres has quit [Remote host closed the connection]
edwinvdgraaf has quit [Remote host closed the connection]
tkuchiki has quit [Remote host closed the connection]
edwinvdgraaf has joined #ruby
tkuchiki has joined #ruby
jimms has joined #ruby
ahmetkapikiran has quit [Quit: ahmetkapikiran]
but3k4 has joined #ruby
yeticry has quit [Ping timeout: 256 seconds]
tkuchiki has quit [Ping timeout: 255 seconds]
yeticry has joined #ruby
edwinvdg_ has joined #ruby
PhantomSpank has quit [Read error: Connection reset by peer]
PhantomSpank has joined #ruby
serivich has joined #ruby
edwinvdgraaf has quit [Ping timeout: 240 seconds]
oo_ has quit [Remote host closed the connection]
ndrei has quit [Ping timeout: 240 seconds]
jph98 has quit [Quit: jph98]
juanpablo____ has joined #ruby
doodlehaus has joined #ruby
bigmac has quit [Ping timeout: 246 seconds]
PhantomSpank has quit [Read error: Connection reset by peer]
PhantomS_ has joined #ruby
emilkarl has quit [Quit: emilkarl]
sigurding has quit [Quit: sigurding]
juanpablo____ has quit [Ping timeout: 250 seconds]
vudew has joined #ruby
ndrei has joined #ruby
doodlehaus has quit [Remote host closed the connection]
ismaelga has joined #ruby
sigurding has joined #ruby
iotouch has quit [Read error: Connection reset by peer]
roolo has quit [Read error: Connection reset by peer]
PhantomS_ has quit [Read error: Connection reset by peer]
roolo has joined #ruby
PhantomSpank has joined #ruby
PhantomS_ has joined #ruby
PhantomSpank has quit [Read error: Connection reset by peer]
zz_barkerd427 is now known as barkerd427
failshell has joined #ruby
iasoon has joined #ruby
scripore has joined #ruby
harly has quit [Quit: Leaving]
Rapier- has joined #ruby
Mohan__ has quit [Ping timeout: 276 seconds]
livathinos has quit [Ping timeout: 246 seconds]
CamonZ has joined #ruby
craigp has quit [Ping timeout: 255 seconds]
Mohan__ has joined #ruby
craigp has joined #ruby
pusewicz2 has joined #ruby
pusewicz2 has quit [Client Quit]
pusewicz2 has joined #ruby
gazay has joined #ruby
pusewicz2 has quit [Client Quit]
anisha has joined #ruby
RegulationD has joined #ruby
Python_JP has joined #ruby
badhatter has quit [Ping timeout: 256 seconds]
<Python_JP> Hello?
<apeiros> hi
<shevy> a python!
<apeiros> snakes on an irc!
startupality has joined #ruby
<Python_JP> I'm not core Ruby programmer, in fact.
<Python_JP> However, I believe Ruby is the best language in the world ever and forever.
sigurding has quit [Quit: sigurding]
badhatter has joined #ruby
sigurding has joined #ruby
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<shevy> cool
RegulationD has quit [Ping timeout: 272 seconds]
<shevy> like that snake in jungle book
vtunka has joined #ruby
<shevy> hypnotic to mowgli
lidenskap has joined #ruby
merqlove has joined #ruby
qwertme has joined #ruby
bmurt has joined #ruby
thatslifeson has quit [Remote host closed the connection]
python_JP_ has joined #ruby
Python_JP has quit [Ping timeout: 246 seconds]
turtil has joined #ruby
granthatcher has quit []
jimms has quit [Remote host closed the connection]
joonty has joined #ruby
lidenskap has quit [Ping timeout: 272 seconds]
emilkarl has joined #ruby
kappy has joined #ruby
python_JP_ is now known as zenny
zenny is now known as xenny
quimrstorres has joined #ruby
terlar has joined #ruby
delianides has joined #ruby
xenny is now known as akira
akira is now known as test
test is now known as Guest90345
Guest90345 has quit [Quit: Page closed]
Porfa has joined #ruby
<Porfa> hey matteys
workmad3 has quit [Ping timeout: 256 seconds]
teruterubouzu has joined #ruby
sankaber has joined #ruby
Python_Core_JP has joined #ruby
<Porfa> ruby is spiting this out, but i would like to get only the URL… => "javascript:registaClick(1432270);window.open('http://www.free_gold.lol/deals/emagrece-5-kg-em-8-dias-sumos-detox-magic-juice-100-saudavel?utm_source=wone&utm_medium=promos&utm_campaign=website';)"
apurcell has joined #ruby
<Porfa> i basely want whatever is in from of the first occurrence of (' and drop everything that's after the first occurrence of ')
millerti has quit [Ping timeout: 272 seconds]
phoo1234567 has joined #ruby
BTRE has quit [Ping timeout: 250 seconds]
cryptarium has joined #ruby
<avril14th> how does one debug a segmentation fault when running a spec?
<avril14th> it yields no stack trace or anything
phoo1234567 has quit [Max SendQ exceeded]
<adaedra> a segmentation fault?
<avril14th> yes
vikaton has quit [Quit: Connection closed for inactivity]
<avril14th> "Segmentation fault (core dumped)"
<adaedra> Congratulations on your ruby bug :/
<avril14th> thx :)
<avril14th> any idea?
phoo1234567 has joined #ruby
<adaedra> --trace, maybe
<avril14th> doesn't work
<adaedra> does it generates a core dump?
<adaedra> derp
<hanmac1> avril14th: hm you might start ruby with gdb
<adaedra> If I knew how to read...
teruterubouzu has quit [Ping timeout: 246 seconds]
<adaedra> hanmac1: this won't get him very far if he hasn't the ruby debug symbols, though
apurcell has quit [Ping timeout: 276 seconds]
<adaedra> but normally, he has a ruby.core file which contains information about the crash
jph98 has joined #ruby
<avril14th> adaedra: where would that be located?
<avril14th> there's nothing at the root of the rails project
<mikecmpbll> feahgeahgrhac.
<mikecmpbll> >> Array({ foo: 1, bar: 2 })
<ruboto> mikecmpbll # => [[:foo, 1], [:bar, 2]] (https://eval.in/334017)
<mikecmpbll> didn't know that casted hashes to array.
<hanmac1> mikecmpbll: why shouldnt it?
joelataylor has quit [Ping timeout: 265 seconds]
rahsd has quit [Ping timeout: 246 seconds]
<mikecmpbll> hanmac1: because in every other case I can think of where the argument isn't an array, it just wraps it in an array
<hanmac1> avril14th: do you use bundler or did you recently updated your ruby version?
uri_ has joined #ruby
<avril14th> hanmac1: yes and yes
qwertme has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
craigp has quit [Ping timeout: 256 seconds]
<hanmac1> avril14th: reinstall your gems
cryptarium has quit [Quit: Leaving]
<avril14th> tried that
jerius has joined #ruby
<avril14th> I removed both ruby and the gems
chipotle has quit [Quit: cheerio]
<hanmac1> mikecmpbll: no, it does try to call to_ary, than to_a and then it does wrap it in a array
<avril14th> I can try again, is there a bundler method to reinstall the gems without removing them by hand first?
<mikecmpbll> hanmac1: i gather that now :)
<mikecmpbll> makes what I want to do somewhat awkward tho
stef204 has joined #ruby
<mikecmpbll> [obj].flatten is okay for the hash, but not if it's a nested array
Akagi201 has joined #ruby
JDiPierro has joined #ruby
yalue has quit [Quit: return 0;]
zz_Outlastsheep is now known as Outlastsheep
krz has joined #ruby
iasoon has quit [Ping timeout: 246 seconds]
uri_ has quit [Read error: Connection reset by peer]
enebo has joined #ruby
<apeiros> mikecmpbll: IMO accepting either array/non-array as arguments is an anti-pattern
nhhagen has quit []
<mikecmpbll> apeiros: it's not my choice, this shitty API is inconsistent
<apeiros> mikecmpbll: normalization of arguments should not happen at consumer side, it should happen at producer side
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<mikecmpbll> if it's a singleton, it returns a single item, if there's multiple it returns an array type
zenguy_pc has joined #ruby
almostworking has joined #ruby
<mikecmpbll> so, i have to handle both cases.
qwertme has joined #ruby
<mikecmpbll> seems that activesupport's Array.wrap does exactly what I want, shame i'm not in rails :p
phoo1234567 has quit [Quit: Leaving]
<apeiros> Array.wrap uses to_ary
<mikecmpbll> but nvm, it's either an array of hashes or a hash, so I can use [obj].flatten.
emilkarl has quit [Quit: emilkarl]
woodruffw has quit [Ping timeout: 276 seconds]
<apeiros> IMO proper way is obj.instance_of?(Array) ? obj : [obj]
<mikecmpbll> apeiros: Array({ foo: 1 }) == [[:foo, 1]]
<mikecmpbll> Array.wrap({ foo: 1 }) == [{ foo: 1 }]
<mikecmpbll> that's the distinction i care about
juanpablo____ has joined #ruby
davedev24_ has joined #ruby
SouL_|_ has joined #ruby
<apeiros> mikecmpbll: not really. but it's your code.
codecop has quit [Remote host closed the connection]
<mikecmpbll> not really what?
phutchins1 has joined #ruby
kblake has joined #ruby
<apeiros> as said, Array.wrap uses to_ary. it doesn't care whether the value is an array or not. only whether it responds to to_ary.
<mikecmpbll> are you saying that the behaviour i described is wrong?
mary5030 has joined #ruby
<mikecmpbll> don't really know what point you're making
doodlehaus has joined #ruby
bigmac has joined #ruby
<apeiros> you say, and I paraphrase: "I get either an array or not an array and I want to turn not-arrays into single element arrays". and I say Array.wrap is not the right tool for that.
<apeiros> since "is Array" and "responds to_ary" is not the same.
<apeiros> same for [obj].flatten. which is even worse. but as said, it's your code.
juanpablo____ has quit [Ping timeout: 244 seconds]
Deele has joined #ruby
sameerynho has quit [Quit: Leaving]
<apeiros> and as you found out yourself, Array() isn't the right tool either.
* al2o3-cr hides under cover
<mikecmpbll> apeiros: can you provide an example where Array.wrap doesn't meet that criteria?
<mikecmpbll> that's where i'm struggling to understand you.
<apeiros> mikecmpbll: any object which responds to to_ary but isn't an array. isn't that obvious?
twistedpixels is now known as zz_twistedpixels
ndrei has quit [Ping timeout: 256 seconds]
freerobby has joined #ruby
<apeiros> 15:24 apeiros: since "is Array" and "responds to_ary" is not the same.
<apeiros> don't know how to say it any more clear than this.
* avril14th understood why ruby segfaults and jumps out the window
thiagovsk has joined #ruby
Rickmasta has joined #ruby
iasoon has joined #ruby
nettoweb has joined #ruby
Outlastsheep is now known as zz_Outlastsheep
DexterLB has quit [Read error: Connection reset by peer]
nettoweb has quit [Max SendQ exceeded]
emilkarl has joined #ruby
jph98 has quit [Quit: jph98]
<mikecmpbll> apeiros: i never explicitly said those were my requirements, that's probably the confusion
<mikecmpbll> you've extrapolated on them somewhat and gave me the impression that the Array.wrap wasn't suitable for my needs. but interesting none-the-less, thanks :)
DexterLB has joined #ruby
jph98 has joined #ruby
<apeiros> *shrug* as said, it's your code.
redjack1964 has joined #ruby
ndrei has joined #ruby
zenguy_pc has quit [Read error: Connection reset by peer]
<mikecmpbll> haha, yet another implication that this is a bad way to do it
<mwlang> are there any gems out there that would allow me to log into my bank and collect balance and account activity? I’m thinking to aggregate my view on all my accounts….something like what https://www.futureadvisor.com does.
shellfu_afk is now known as shellfu
<avril14th> mwlang: that's their core business, I don't think you have a gem for it
<avril14th> but if you do find one, let me know :)
<apeiros> mikecmpbll: no. it is your code. this means you have to know what you need and what satisfies your needs. nothing more, nothing less.
<apeiros> no implications. I've been, and try to be, explicit about what I think and what means what.
allcentury has joined #ruby
RegulationD has joined #ruby
endash has joined #ruby
<mwlang> avril14th: I would think their core business is offering financial advice and ability to log into any bank/service is secondary.
nettoweb has joined #ruby
<avril14th> well, in Europe people start business with core business as "I can log into your bank". Don't know about elsewehere
gsd has joined #ruby
jph98 has quit [Quit: jph98]
AlphaAtom has joined #ruby
<apeiros> mwlang: there are some banking format standards. not sure whether there are also API standards. but it almost certainly depends on your specific bank whether and what it supports
AlphaAtom has quit [Max SendQ exceeded]
jenrzzz has joined #ruby
<mwlang> avril14th: it’s akin to shopify being able to connect to any merchant with active_merchant. they can do it, but it’s not their “core business”
vtunka has quit [Quit: Leaving]
<avril14th> mwlang: look at OpenBanking maybe https://www.openbankproject.com/
AlphaAtom has joined #ruby
<toretore> most banking apis consist of manually logging in and downloading an excel file
AlphaAtom has quit [Max SendQ exceeded]
Hirzu has quit [Read error: Connection reset by peer]
<apeiros> that'd somewhat defy the name "API"
pushpak has joined #ruby
<mwlang> apeiros: yeah, it’s the figuring out what those standards are. with capitalone360.com, it’s easy because they make it accessible (i.e. documented where I can find it). The other banks I have accounts at are not so transparent, but they seem to be using the same 3rd party provider behind the scenes (with a domain cname masking that).
<toretore> considering that banks usually require 2f auth, integrating that with an api sounds painful
AlphaAtom has joined #ruby
<toretore> aka i wouldn't want to be a developer at a bank
RegulationD has quit [Ping timeout: 240 seconds]
workmad3 has joined #ruby
<apeiros> seems hbci is only for germany
<apeiros> that's the only standard for more than just format I knew about
AlphaAtom has quit [Max SendQ exceeded]
<ddv> lots of banks still use cobol
<apeiros> banks and IT is a mess from my experience.
zenguy_pc has joined #ruby
<mwlang> 2f login means password + mobile confirm or dongle generating a key, right?
<ddv> aka the best language ever
<toretore> usually
Python_Core_JP has quit [Ping timeout: 246 seconds]
<mwlang> I don’t consider the picture + password as 2f.
AlphaAtom has joined #ruby
<apeiros> mwlang: it isn't
dblessing has joined #ruby
denver has joined #ruby
<mwlang> ddv: surely ye jest!? Fortran is the best language ever!
<apeiros> unless I misunderstand "the picture" - you mean a captcha?
Leef_ has joined #ruby
<toretore> he uploads a picture of himself to prove that it's really him
<toretore> biometric
granthatcher has joined #ruby
zenguy_pc has quit [Read error: Connection reset by peer]
lidenskap has joined #ruby
Akagi201_ has joined #ruby
<apeiros> toretore: you know what's sad? I'm not even sure whether you're kidding…
<mwlang> apeiros: no, that silly picture they display and say, “type your password only if you recognize your picture”
<apeiros> mwlang: that might be an anti-phishing measure. but not 2f
<mwlang> basically the thing that’s supposed to prevent phishing
sevenseacat has joined #ruby
<mwlang> apeiros: it was toretore that mentioned 2f login — your interpretation is same as mine, it seems.
krz has quit [Ping timeout: 256 seconds]
DexterLB has quit [Read error: Connection reset by peer]
<toretore> apeiros: with today's paper obviously, then it gets sent to a bunch of people who manually inspect it and click approve/disprove
<apeiros> that sounds actually like a good idea. wouldn't work against MITM, but phishing with non-dimwits? probably.
thatslifeson has joined #ruby
<apeiros> toretore: you know, I still could imagine a bank actually doing that…
<toretore> lol
Akagi201 has quit [Ping timeout: 244 seconds]
<toretore> i laugh, but inside i cry :(
<apeiros> I said it's sad.
mattp has quit [Disconnected by services]
mattp_ has joined #ruby
zenguy_pc has joined #ruby
tus has joined #ruby
blueOxigen has quit [Ping timeout: 256 seconds]
scripore has quit [Quit: This computer has gone to sleep]
lidenskap has quit [Ping timeout: 276 seconds]
scripore has joined #ruby
thatslifeson has quit [Ping timeout: 240 seconds]
DexterLB has joined #ruby
scripore has quit [Client Quit]
michael_mbp has quit [Excess Flood]
<mwlang> I’ll tell you what’s sad…when you move across the country and set up a utility account and to prove that you’re who you really are before the account is created and before you give your SSN for “verification” the system is able to ask you about the last 5 addresses you lived at, the first name of your brother (pick from a list of names) and what is your mortgage amount from a loan you had 15 years ago. Then and only then does the
<mwlang> system say, “ok, I believe you, gimme your ssn so we can do a credit check to determine if a security deposit is required."
edwinvdg_ has quit [Remote host closed the connection]
bluOxigen has joined #ruby
startupality has quit [Quit: startupality]
Igorshp has quit [Remote host closed the connection]
edwinvdgraaf has joined #ruby
michael_mbp has joined #ruby
krz has joined #ruby
werelivinginthef has joined #ruby
gambl0re has quit [Ping timeout: 255 seconds]
al2o3-cr has quit [Ping timeout: 240 seconds]
timonv1 has quit [Ping timeout: 246 seconds]
wasamasa is now known as vms
EagleDelta has joined #ruby
jottr has joined #ruby
rbennacer has joined #ruby
vms is now known as wasamasa
<mwlang> inerestingly: https://www.plaid.com/ for banking infrastructure api
fabrice31_ has joined #ruby
jeromelanteri has quit [Ping timeout: 265 seconds]
riotjones has quit [Remote host closed the connection]
pushpak has quit [Quit: Linkinus - http://linkinus.com]
al2o3-cr has joined #ruby
al2o3-cr is now known as Guest66778
granthatcher has quit []
jayeshsolanki has quit [Quit: bye!]
juanpablo____ has joined #ruby
PhantomSpank has joined #ruby
PhantomS_ has quit [Read error: Connection reset by peer]
jenrzzz has quit [Ping timeout: 272 seconds]
EagleDelta has quit [Remote host closed the connection]
paulcsmith has joined #ruby
EagleDelta has joined #ruby
fabrice31 has quit [Ping timeout: 272 seconds]
pwattste has joined #ruby
arup_r has quit []
scripore has joined #ruby
mitchellhenke has joined #ruby
rahult has joined #ruby
rahult has quit [Client Quit]
Guest66778 has quit [Quit: WeeChat 1.1.1]
rahult has joined #ruby
lrocknrolmarc has joined #ruby
scripore has quit [Client Quit]
turtil has quit [Ping timeout: 256 seconds]
aganov has quit [Quit: Leaving]
edwinvdg_ has joined #ruby
lrocknrolmarc has quit [Max SendQ exceeded]
gr33n7007h has joined #ruby
<bigmac> page.xpath("//div[contains(@itemprop, 'description')]//p")
lrocknrolmarc has joined #ruby
lrocknrolmarc has quit [Max SendQ exceeded]
RegulationD has joined #ruby
<bigmac> <p>some string<em class="nope"> <a href="some stuff"></p>
lrocknrolmarc has joined #ruby
<bigmac> how do i separate these items
Mohan__ has quit [Ping timeout: 264 seconds]
umgrosscol has joined #ruby
<bigmac> i want the first string [0]
lrocknrolmarc has quit [Max SendQ exceeded]
moeabdol has joined #ruby
The_Phoenix has joined #ruby
startupality has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
wildroman2 has joined #ruby
lrocknrolmarc has joined #ruby
Mohan has joined #ruby
edwinvdgraaf has quit [Ping timeout: 256 seconds]
lrocknrolmarc has quit [Max SendQ exceeded]
sinkensabe has quit [Remote host closed the connection]
revoohc has joined #ruby
<toretore> bigmac: explain better
rahult_ has joined #ruby
Mohan is now known as Guest90804
tjohnson has joined #ruby
rahult has quit [Read error: Connection reset by peer]
revoohc has quit [Client Quit]
revoohc has joined #ruby
<ddv> nice nickname lol
bruno- has quit [Ping timeout: 246 seconds]
edwinvdg_ has quit [Remote host closed the connection]
<bigmac> <p>some description<em class="nope">another description<a href="link">description<a/></em></p>
jenrzzz has joined #ruby
edwinvdgraaf has joined #ruby
jeromelanteri has joined #ruby
tagrudev has quit [Remote host closed the connection]
<bigmac> <p>1<em>2<a>3</a></em></p>
timonv_ has joined #ruby
insidious has joined #ruby
<bigmac> looks like 3 sections inside this <p>
jobewan has joined #ruby
rahult has joined #ruby
rahult_ has quit [Ping timeout: 250 seconds]
jobewan has quit [Read error: Connection reset by peer]
jobewan has joined #ruby
timonv_ has quit [Remote host closed the connection]
shazaum has joined #ruby
jobewan has quit [Client Quit]
allcentury has quit [Ping timeout: 265 seconds]
einarj has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 250 seconds]
<bigmac> i need to look threw some better documents on this html path
<shevy> ddv you mean the nickname makes you hungry?
Kricir has joined #ruby
edwinvdg_ has joined #ruby
jenrzzz has joined #ruby
allcentury has joined #ruby
ta has quit [Remote host closed the connection]
jobewan has joined #ruby
slash_nick has joined #ruby
terlar has quit [Quit: WeeChat 1.1.1]
<ddv> shevy: yeah
<ddv> went to McD couple of weeks ago
<ddv> they are becoming expensive
<ddv> damn
timonv has joined #ruby
lidenskap has joined #ruby
edwinvdgraaf has quit [Ping timeout: 252 seconds]
scripore has joined #ruby
agarie has joined #ruby
lidenskap has quit [Remote host closed the connection]
Leef_ has quit [Quit: Leaving]
c0def00d has joined #ruby
Peetooshock has joined #ruby
gr33n7007h is now known as al2o3-cr
Peetooshock has quit [Changing host]
Peetooshock has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
rahult has quit [Read error: Connection reset by peer]
rahult has joined #ruby
emilkarl has quit [Quit: emilkarl]
<toretore> bigmac: what you want is to access the text node children of an element node
<toretore> and not just "inner html" or whatever
nfk has joined #ruby
shortCircuit__ has quit [Read error: Connection reset by peer]
redjack1964 has quit [Remote host closed the connection]
jenrzzz has joined #ruby
zz_twistedpixels is now known as twistedpixels
senayar has joined #ruby
senayar has joined #ruby
rocknrollmarc has quit [Ping timeout: 252 seconds]
bruno- has joined #ruby
Porfa has quit [Ping timeout: 245 seconds]
jenrzzz has quit [Ping timeout: 265 seconds]
emilkarl has joined #ruby
SOLDIERz has quit [Ping timeout: 256 seconds]
c0def00d has quit [Quit: c0def00d]
Igorshp has joined #ruby
Porfa has joined #ruby
Guest90804 has quit [Ping timeout: 250 seconds]
The_Phoenix has quit [Read error: Connection reset by peer]
Porfa has quit [Client Quit]
Mohan_ has joined #ruby
PhantomSpank has quit [Read error: Connection reset by peer]
PhantomSpank has joined #ruby
selu has quit [Read error: Connection reset by peer]
allenn has joined #ruby
redjack1964 has joined #ruby
snath has quit [Ping timeout: 252 seconds]
<shevy> ddv hehe
twistedpixels is now known as zz_twistedpixels
thatslifeson has joined #ruby
startupality has quit [Read error: Connection reset by peer]
allenn has quit [Remote host closed the connection]
startupality has joined #ruby
duckpunch has quit [Ping timeout: 244 seconds]
thatslifeson has quit [Ping timeout: 240 seconds]
scripore has quit [Quit: This computer has gone to sleep]
duckpunch has joined #ruby
akkad has quit [Excess Flood]
workmad3 has quit [Ping timeout: 265 seconds]
slash_nick has joined #ruby
slash_nick has quit [Changing host]
Mohan_ has quit [Ping timeout: 244 seconds]
sevenseacat has quit [Quit: Me dun like you no more.]
Mohan_ has joined #ruby
akkad has joined #ruby
allcentury has quit [Ping timeout: 272 seconds]
Matachines has joined #ruby
woodruffw has joined #ruby
Igorshp has quit [Remote host closed the connection]
Matachines has quit [Read error: Connection reset by peer]
delianides has quit [Remote host closed the connection]
vudew has quit [Ping timeout: 252 seconds]
allenn has joined #ruby
quimrstorres has quit [Remote host closed the connection]
snockerton has joined #ruby
delianides has joined #ruby
workmad3 has joined #ruby
allcentury has joined #ruby
senayar has quit [Remote host closed the connection]
havenwood has joined #ruby
allenn has quit [Remote host closed the connection]
dorei has joined #ruby
rahult has quit [Read error: Connection reset by peer]
senayar has joined #ruby
dblessing has quit [Quit: Textual IRC Client: www.textualapp.com]
senayar has quit [Changing host]
senayar has joined #ruby
rahult has joined #ruby
c0def00d has joined #ruby
<c0def00d> hullo
Papierkorb has joined #ruby
antgel has quit [Ping timeout: 250 seconds]
riotjones has joined #ruby
<c0def00d> Imagine I’m using Rake as a means to automate certain operations in non-ruby projects, how would you go around sharing the evolutions of that Rakefile between projects? I tried creating a gem and requiring it with bundler, but can’t figure out how to have rake detect it automatically…
mengu has quit [Remote host closed the connection]
antgel has joined #ruby
tvw has joined #ruby
akkad has quit [Excess Flood]
krz has quit [Quit: WeeChat 1.0.1]
Igorshp has joined #ruby
jobewan has quit [Quit: leaving]
PhantomSpank has quit [Read error: Connection reset by peer]
jobewan has joined #ruby
PhantomSpank has joined #ruby
riotjones has quit [Ping timeout: 264 seconds]
nobitanobi has joined #ruby
charliesome has quit [Quit: zzz]
dfinninger has joined #ruby
pdoherty has joined #ruby
uri_ has joined #ruby
akkad has joined #ruby
banister has joined #ruby
willharrison has joined #ruby
<alex88> having a process that imports some data into an in-memory sqlite database, is it possible, at the end of the import, to run an sql shell in-process so I can use the memory database?
snath has joined #ruby
<adaedra> you can just read commands and execute them
Channel6 has joined #ruby
Rollabunna has quit [Remote host closed the connection]
Rollabunna has joined #ruby
ixti has joined #ruby
<alex88> adaedra: ok so I've to do the reading the executing/output by myself
<alex88> thanks
emilkarl has quit [Quit: emilkarl]
_ixti_ has quit [Read error: Connection reset by peer]
<adaedra> I'm not sure if there's no other way, but that's what I'd probably do
jobewan has quit [Quit: leaving]
jobewan has joined #ruby
Eiam_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
almostworking has left #ruby ["Leaving"]
jobewan has quit [Client Quit]
charliesome has joined #ruby
sinkensabe has joined #ruby
haxrbyte has quit [Read error: Connection reset by peer]
PhantomSpank has quit [Read error: Connection reset by peer]
haxrbyte has joined #ruby
PhantomSpank has joined #ruby
tectonic has joined #ruby
disgrntld has joined #ruby
coderhs has joined #ruby
gagrio_ has quit [Ping timeout: 240 seconds]
nobitanobi has quit [Remote host closed the connection]
antgel has quit [Ping timeout: 240 seconds]
jobewan has joined #ruby
antgel has joined #ruby
huddy has quit [Quit: Connection closed for inactivity]
hsps_ has joined #ruby
PhantomSpank has quit [Read error: Connection reset by peer]
PhantomSpank has joined #ruby
sinkensabe has quit [Ping timeout: 252 seconds]
wpp has quit [Quit: ZZZzzz…]
coderhs has quit [Ping timeout: 264 seconds]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
ndrei has quit [Ping timeout: 256 seconds]
premera has quit [Ping timeout: 256 seconds]
rahult has quit [Read error: Connection reset by peer]
rahult has joined #ruby
Papierkorb_ has joined #ruby
jobewan has quit [Quit: leaving]
St1gma has quit [Remote host closed the connection]
swgillespie has joined #ruby
failshell has quit [Remote host closed the connection]
dblessing has joined #ruby
Papierkorb has quit [Ping timeout: 264 seconds]
ascarter has joined #ruby
gauke has quit [Quit: gauke]
hsps_ has quit [Ping timeout: 244 seconds]
ascarter has quit [Max SendQ exceeded]
jordanm has joined #ruby
Pumukel has quit [Remote host closed the connection]
Papierkorb has joined #ruby
quimrstorres has joined #ruby
jobewan has joined #ruby
ascarter has joined #ruby
Igorshp has quit [Remote host closed the connection]
hsps_ has joined #ruby
rahult has quit [Ping timeout: 272 seconds]
jobewan has quit [Client Quit]
swgillespie has quit [Client Quit]
ascarter has quit [Max SendQ exceeded]
jobewan has joined #ruby
failshell has joined #ruby
failshell has quit [Remote host closed the connection]
failshell has joined #ruby
ascarter has joined #ruby
Papierkorb_ has quit [Ping timeout: 265 seconds]
jobewan has quit [Client Quit]
ascarter has quit [Max SendQ exceeded]
ascarter has joined #ruby
c0def00d has quit [Quit: c0def00d]
PhantomSpank has quit [Read error: Connection reset by peer]
Papierkorb has quit [Ping timeout: 246 seconds]
sigurding has quit [Quit: sigurding]
PhantomSpank has joined #ruby
rippa has joined #ruby
ascarter has quit [Max SendQ exceeded]
PhantomSpank has quit [Read error: Connection reset by peer]
PhantomS_ has joined #ruby
Spami has joined #ruby
hanmac1 has quit [Quit: Leaving.]
ascarter has joined #ruby
<adaedra> Mmmmh, using opal makes me downgrade sprockets and tilt to old versions
rdark has quit [Quit: leaving]
rahult has joined #ruby
quimrstorres has quit [Ping timeout: 276 seconds]
ascarter has quit [Max SendQ exceeded]
jottr_ has joined #ruby
rgb-one has joined #ruby
ki0_ has joined #ruby
laurentide has quit [Quit: Leaving]
jottr has quit [Ping timeout: 276 seconds]
ascarter has joined #ruby
GaryOak_ has joined #ruby
Papierkorb has joined #ruby
edwinvdg_ has quit [Remote host closed the connection]
Igorshp has joined #ruby
ascarter has quit [Max SendQ exceeded]
edwinvdgraaf has joined #ruby
ascarter has joined #ruby
<mwlang> alex88: use pry-debugger and call binding.pry at the point you want to stop executation and get a console to work with: https://github.com/nixme/pry-debugger
rahult is now known as rahult_
quimrstorres has joined #ruby
ki0 has quit [Ping timeout: 245 seconds]
rahult_ is now known as rahult
jenrzzz has joined #ruby
Dopagod has joined #ruby
ascarter has quit [Max SendQ exceeded]
<alex88> mwlang: awesome! thanks a lot!
Guest1421 has joined #ruby
ascarter has joined #ruby
ki0_ has quit [Ping timeout: 246 seconds]
edwinvdg_ has joined #ruby
failshell has quit [Remote host closed the connection]
ascarter has quit [Max SendQ exceeded]
lidenskap has joined #ruby
ascarter has joined #ruby
ascarter has quit [Max SendQ exceeded]
Papierkorb has quit [Ping timeout: 246 seconds]
rahult has quit [Ping timeout: 256 seconds]
lidenskap has quit [Remote host closed the connection]
ascarter has joined #ruby
edwinvdgraaf has quit [Ping timeout: 255 seconds]
lidenskap has joined #ruby
startupality has quit [Quit: startupality]
ascarter has quit [Max SendQ exceeded]
delianides has quit [Remote host closed the connection]
that1guy has joined #ruby
ascarter has joined #ruby
him has joined #ruby
delianides has joined #ruby
ascarter has quit [Max SendQ exceeded]
tectonic has quit []
zz_twistedpixels is now known as twistedpixels
ascarter has joined #ruby
Akagi201_ has quit [Remote host closed the connection]
ascarter has quit [Max SendQ exceeded]
ascarter has joined #ruby
moted has joined #ruby
rahult has joined #ruby
ascarter has quit [Max SendQ exceeded]
rhllor has joined #ruby
DEA7TH has quit [Remote host closed the connection]
adac has joined #ruby
Astrologos_ has joined #ruby
ascarter has joined #ruby
<adac> what is the best way to transform a date like 07.05.2015 to 2015-05-07 ?
casadei_ has joined #ruby
ascarter has quit [Max SendQ exceeded]
moeabdol has quit [Read error: Connection reset by peer]
<havenwood> >> '07.05.2015'.split('.').reverse.join('-')
<ruboto> havenwood # => "2015-05-07" (https://eval.in/334417)
<havenwood> adac: ^ one way
dseitz has joined #ruby
moeabdol has joined #ruby
ascarter has joined #ruby
dorei has quit [Ping timeout: 256 seconds]
<adac> havenwood, ha how cool is that :)
dvlwrk has joined #ruby
<adaedra> adac: you can also use Date.strptime then Date#strftime
<adaedra> should check date is valid
ascarter has quit [Max SendQ exceeded]
moeabdol has quit [Read error: Connection reset by peer]
diegoaguilar has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
moeabdol has joined #ruby
ascarter has joined #ruby
jimms has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
bruno- has quit [Ping timeout: 265 seconds]
ascarter has quit [Max SendQ exceeded]
lidenskap has quit [Remote host closed the connection]
fabrice31_ has quit [Remote host closed the connection]
gambl0re has joined #ruby
icebourg has joined #ruby
<adac> adaedra, thanks!
ascarter has joined #ruby
haxrbyte has quit [Read error: Connection reset by peer]
merqlove has quit [Quit: Connection closed for inactivity]
spider-mario has joined #ruby
haxrbyte has joined #ruby
failshell has joined #ruby
sepp2k has quit [Quit: Leaving.]
rahult has quit [Ping timeout: 256 seconds]
Papierkorb has joined #ruby
jimms has quit [Remote host closed the connection]
chinmay_dd has joined #ruby
skinny_much has quit [Quit: Ruh Roh...]
thatslifeson has joined #ruby
that1guy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
joonty has quit [Quit: joonty]
senayar has quit [Remote host closed the connection]
slash_nick has quit [Read error: Connection reset by peer]
senayar has joined #ruby
alex88 has quit []
gauke has joined #ruby
thatslifeson has quit [Ping timeout: 240 seconds]
tkuchiki has joined #ruby
skinny_much has joined #ruby
serivich has quit [Quit: Leaving]
MasterPiece has joined #ruby
him has quit [Ping timeout: 272 seconds]
c0def00d has joined #ruby
haxrbyte has quit [Remote host closed the connection]
jerius has quit [Quit: /quit]
baweaver has joined #ruby
rahult has joined #ruby
hsps_ has quit [Ping timeout: 246 seconds]
hsps_ has joined #ruby
JDiPierro has quit [Remote host closed the connection]
haxrbyte has joined #ruby
tkuchiki has quit [Ping timeout: 246 seconds]
bricker has joined #ruby
timonv has quit [Ping timeout: 255 seconds]
Pupeno has joined #ruby
Pupeno has quit [Changing host]
Pupeno has joined #ruby
that1guy has joined #ruby
him has joined #ruby
wildroman2 has quit [Remote host closed the connection]
rahult has quit [Ping timeout: 272 seconds]
ArchRogem has quit [Quit: Textual IRC Client: www.textualapp.com]
mrconfused has joined #ruby
mistermocha has joined #ruby
lidenskap has joined #ruby
senayar has quit []
rahult has joined #ruby
michaeldeol has joined #ruby
xcesariox has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Spami has joined #ruby
Pupeno has quit [Remote host closed the connection]
jackjackdripper has joined #ruby
jordanm has quit [Read error: Connection reset by peer]
apurcell has joined #ruby
jordanm has joined #ruby
jordanm has quit [Read error: Connection reset by peer]
andikr has quit [Remote host closed the connection]
jordanm has joined #ruby
ramfjord has joined #ruby
hsps_ has quit [Quit: Leaving]
metalic has joined #ruby
Igorshp has quit [Remote host closed the connection]
jenrzzz has joined #ruby
allcentury has quit [Ping timeout: 256 seconds]
rahult has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Papierkorb has quit [Ping timeout: 265 seconds]
nobitanobi has joined #ruby
mistermocha has quit [Read error: Connection reset by peer]
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mistermocha has joined #ruby
willharrison has quit [Quit: Textual IRC Client: www.textualapp.com]
lidenskap has quit [Remote host closed the connection]
hutch78 has joined #ruby
hexhaxtron has joined #ruby
Zen-Zen has joined #ruby
<hexhaxtron> I'm having problems in running msfupdate and I read that doing 'rvm use 1.9.2' but I get this error: RVM is not a function, selecting rubies with 'rvm use ...' will not work.
jerius has joined #ruby
jenrzzz has quit [Ping timeout: 272 seconds]
<hexhaxtron> What should I do?
<hexhaxtron> *that doing ... would fix it
ascarter has joined #ruby
ascarter has quit [Read error: Connection reset by peer]
<havenwood> hexhaxtron: source ~/.rvm/scripts/rvm
mikecmpbll has quit [Ping timeout: 256 seconds]
ki0 has joined #ruby
ramfjord has quit [Ping timeout: 276 seconds]
hobodave has joined #ruby
<hexhaxtron> havenwood, I get the same problem...
haxrbyte has quit [Remote host closed the connection]
<havenwood> hexhaxtron: Using gnome terminal or a non-login shell?
haxrbyte has joined #ruby
haxrbyte has quit [Read error: Connection reset by peer]
gauke has quit [Quit: gauke]
tcrypt has joined #ruby
<hexhaxtron> havenwood, I'm using XFCE terminal.
haxrbyte has joined #ruby
<hexhaxtron> havenwood, by the way, msfupdate is ran as root.
<havenwood> hexhaxtron: Gist?: rvm info
Hirzu has joined #ruby
ki0 has quit [Ping timeout: 256 seconds]
JoshGlzBrk has joined #ruby
<havenwood> hexhaxtron: I suspect you just need to: "Run command as login shell"
<hexhaxtron> havenwood, http://sprunge.us/aODR
<hexhaxtron> I tried that, let me try again.
<havenwood> hexhaxtron: Change xfce preferences. ^
Cust0sL1men has quit [Ping timeout: 272 seconds]
Igorshp has joined #ruby
gazay has quit [Quit: gazay]
anisha has quit [Quit: Leaving]
<hexhaxtron> havenwood, I did that "Run command as login shell' then I opened a new tab and did source /root/.rvm/script/rvm and then rvm use 1.9.2 and I get the same error, is not a function...
<havenwood> hexhaxtron: Ah, yeah another issue is that you have a multi-user install in /usr/local instead of the recommended single user install in the user home dir.
einarj has joined #ruby
<havenwood> hexhaxtron: Install RVM without sudo and as a non-root user for a single user install.
<hexhaxtron> havenwood, but I think I need to run it as root because msfupdate needs root.
<havenwood> hexhaxtron: You can run commands with escalated privileges even using a single user install. RVM even has a `rvmsudo` script to keep the env vars around so things work when you rvmsudo.
<hexhaxtron> Like this? rvmsudo rvm use 1.9.2
Hounddog has quit [Read error: Connection reset by peer]
<havenwood> hexhaxtron: 1.9 is past end of life. Use Ruby 2.2.
einarj has quit [Read error: Connection reset by peer]
<havenwood> hexhaxtron: No, you don't need to sudo to change rubies.
codecop has joined #ruby
dfinninger has quit [Remote host closed the connection]
qwertme has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
einarj has joined #ruby
<havenwood> hexhaxtron: Like if you wanted to run on port 80: rvmsudo ruby -run -ehttpd .
marr has quit [Ping timeout: 276 seconds]
<hexhaxtron> havenwood, can you see that link?
<havenwood> I can.
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
antgel has quit [Ping timeout: 246 seconds]
poguez_ has joined #ruby
leafybasil has quit [Ping timeout: 244 seconds]
ghr has quit [Ping timeout: 255 seconds]
wildroman2 has joined #ruby
redjack1964 has quit [Quit: Konversation terminated!]
<havenwood> hexhaxtron: So someone a couple years ago was using an old Ruby?
dorei has joined #ruby
<hexhaxtron> I don't know how to fix it now-a-days.
<havenwood> hexhaxtron: Fix what?
rocknrollmarc has joined #ruby
<hexhaxtron> msfupdate
Astrologos_ has quit [Ping timeout: 244 seconds]
fgo has quit [Quit: WeeChat 1.1.1]
c0def00d has quit [Quit: c0def00d]
wildroman2 has quit [Read error: No route to host]
baweaver has quit [Remote host closed the connection]
jenrzzz has joined #ruby
bruno- has joined #ruby
Akagi201 has joined #ruby
JDiPierro has joined #ruby
hutch78 has quit [Quit: hutch78]
vikaton has joined #ruby
ramfjord has joined #ruby
jenrzzz has quit [Ping timeout: 255 seconds]
towski_ has joined #ruby
quimrstorres has quit [Remote host closed the connection]
bootstrappm has joined #ruby
<havenwood> hexhaxtron: There is #rvm if you're still having RVM trouble after following single user installation instructions. And for Metasploit-specific stuff there is #metasploit.
charliesome has quit [Quit: zzz]
djbkd has joined #ruby
phoo1234567 has joined #ruby
Akagi201 has quit [Ping timeout: 264 seconds]
<havenwood> hexhaxtron: Just a non-RVM non-Metasploit aside, but here's a nifty way of switching between Rubies on Archlinux: https://gist.github.com/jhass/8839655bb038e829fba1
moeabdol has quit [Ping timeout: 256 seconds]
ki0 has joined #ruby
phoo1234567 has quit [Max SendQ exceeded]
pwattste has quit [Quit: Textual IRC Client: www.textualapp.com]
phoo1234567 has joined #ruby
davedev2_ has joined #ruby
<hexhaxtron> Thanks!
Zai00 has quit [Quit: Zai00]
redjack1964 has joined #ruby
<havenwood> hexhaxtron: It seems that Metasploit tests on TravisCI against Ruby 2.1, but ask what Ruby to use in #metasploit. Don't use Ruby 1.9 or earlier though, they're past end-of-life.
davedev24_ has quit [Ping timeout: 256 seconds]
wallerdev has joined #ruby
Hobogrammer has quit [Ping timeout: 256 seconds]
jottr_ has quit [Ping timeout: 255 seconds]
ki0 has quit [Remote host closed the connection]
vickleton has joined #ruby
ki0 has joined #ruby
lidenskap has joined #ruby
agarie has quit []
shadeslayer has quit [Ping timeout: 245 seconds]
mtakkman has joined #ruby
lkba has quit [Ping timeout: 246 seconds]
shadeslayer has joined #ruby
ki0 has quit [Ping timeout: 256 seconds]
yalue has joined #ruby
jobewan has joined #ruby
Hirzu has quit [Remote host closed the connection]
mrsolo has joined #ruby
moeabdol has joined #ruby
mrsolo has left #ruby [#ruby]
jobewan has quit [Client Quit]
Hijiri has quit [Quit: WeeChat 1.0.1]
einarj has quit [Read error: Connection reset by peer]
einarj has joined #ruby
noname has quit [Remote host closed the connection]
ramfjord has quit [Ping timeout: 256 seconds]
bruno- has quit [Read error: No route to host]
<ght> Question: I'm am using RestClient to access API resources that utilize OAuth2, and I've successfully pulled and stored an OAuth2 bearer token, but I can't seem to pass that bearer token for further RestClient statements.
jobewan has joined #ruby
Igorshp has quit [Remote host closed the connection]
<ght> Does anyone have an example of a RestClient get statement for any resource that uses OAuth v2 and passes a bearer token?
thumpba has joined #ruby
<ght> The syntax is supposed to include the Authoriziation parameter. The curl equivalent is: -H "Authorization: Bearer <Bearer-Token>"
noname has joined #ruby
him has quit [Quit: Leaving]
ismaelga has quit [Remote host closed the connection]
jobewan has quit [Client Quit]
qwertme has joined #ruby
jobewan has joined #ruby
towski_ has quit [Remote host closed the connection]
thumpba has quit [Read error: Connection reset by peer]
Papierkorb has joined #ruby
thumpba has joined #ruby
merqlove has joined #ruby
thumpba_ has joined #ruby
jobewan has quit [Client Quit]
<xxneolithicxx> most rest clients will let you add a headers hash so thats where you should put that
jobewan has joined #ruby
<ght> Never mind, got it.
<ght> Thank you.
allcentury has joined #ruby
<mwlang> so mechanize doesn’t support javascript, right?
jobewan has quit [Client Quit]
<mwlang> just making sure that’s for the ruby mechanize and not the python/perl mechanize
nobitanobi has quit [Read error: Connection reset by peer]
jobewan has joined #ruby
jobewan has quit [Client Quit]
<umgrosscol> mwlang: I thought you could pipe it into something like phantomjs
nobitanobi has joined #ruby
<mwlang> I got three pages into logging into my bank using mechanize then hit a wall with “Javascript must be enabled for you to log in"
thumpba has quit [Ping timeout: 256 seconds]
einarj has quit [Read error: Connection reset by peer]
einarj has joined #ruby
jobewan has joined #ruby
<mwlang> umgrosscol: I was actually starting to hunt down more info on phantomjs and figuring out how I might use that outside a testing environment.
uri__ has joined #ruby
uri_ has quit [Read error: Connection reset by peer]
jobewan has quit [Client Quit]
<GaryOak_> mwlang: I've used phantomjs to do some webscraping
jobewan has joined #ruby
fumduq has quit [Quit: die()]
longfeet has joined #ruby
Lloyd is now known as lloyd
tuelz has joined #ruby
gsd has joined #ruby
moeabdol has quit [Ping timeout: 246 seconds]
fabrice31 has joined #ruby
jottr_ has joined #ruby
lidenskap has quit [Remote host closed the connection]
<mwlang> GaryOak_: looks like I’m going to have to write some js to drive the webscraping rather than ruby.
uri__ has quit [Client Quit]
<GaryOak_> mwlang: you can use selenium to drive phantomjs at a high level
fumduq has joined #ruby
<umgrosscol> I don't recall having to write any js to do my webscraping in ruby, but I'd have to check back on how that was done.
<mwlang> GaryOak_: hmmmm…I’d like to avoid this issue if possible: “The obvious downside to Selenium is that it requires a full graphical desktop for any and all tests.”
gaboesquivel has quit [Ping timeout: 245 seconds]
<GaryOak_> sure, but it's super easy to just say webdriver.Firefox and then webdriver.PhantomJS
<mwlang> as far as I know, I don’t actually *need* to do anything with JS…I just need to tell the website I’m visiting that I’m Javascript enabled.
<bricker> mwlang: it doesn't, really
<umgrosscol> mwlang: Found it. Watir
<mwlang> ah…watir — haven’t seen that one since 2007ish
<bricker> I run thousands of selenium tests every day headlessly on an ubuntu server
<tuelz> sounds awful
<GaryOak_> hahaha
<umgrosscol> Yeah. It looks like I just got the resulting DOMs and then murdered them apart with nokogiri
<bricker> tuelz: it is :)
<GaryOak_> bricker: are you using Selenium grid?
<bricker> GaryOak_: I don't know what that is, so I guess not
mtakkman has quit [Ping timeout: 265 seconds]
<GaryOak_> bricker: oh it just makes a Webdriver pool basically
<mwlang> bricker: I see further down the page that selinium can drive phantomjs just like it does for browsers.
blueOxigen has joined #ruby
<mwlang> so I guess that just getting selenium set up to use phantomjs is my ticket.
<bricker> mwlang: yes, phantomjs works pretty well and is relatively fast (relative to booting up firefox, that is)
bluOxigen has quit [Ping timeout: 256 seconds]
MatthewsFace[SEA has joined #ruby
iamninja has joined #ruby
<tuelz> I don't believe in testing views, mostly because it's slow and painful to upkeep, but also because I'll always have to visually QA anyways so I don't bother writing tests
<bricker> Your opinion has been noted.
<tuelz> #feelingvalidated
<workmad3> (and ignored ;) )
<bricker> hehe
browncow has joined #ruby
that1guy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
angryzor has quit [Quit: ZNC - http://znc.sourceforge.net]
<GaryOak_> Selenium Grid "supposedly" keeps a pool of clients running to make connections, never used it but it sounds useful
zotherstupidguy has joined #ruby
insidious has quit [Ping timeout: 256 seconds]
fabrice31 has quit [Remote host closed the connection]
gaboesquivel has joined #ruby
rbennacer has quit [Remote host closed the connection]
marr has joined #ruby
jenrzzz has joined #ruby
<workmad3> tuelz: something like this can be useful too: https://github.com/BBC-News/wraith
<workmad3> tuelz: as you can then tie it in and have automation telling you that the views haven't changed :)
nahtnam has quit [Quit: Connection closed for inactivity]
j_mcnally has joined #ruby
<bricker> cool
ramfjord has joined #ruby
parduse has quit [Ping timeout: 256 seconds]
ki0 has joined #ruby
lavros has quit [Quit: leaving]
parduse has joined #ruby
towski_ has joined #ruby
einarj_ has joined #ruby
einarj has quit [Read error: Connection reset by peer]
allcentury has quit [Ping timeout: 244 seconds]
griffindy has joined #ruby
postmodern has joined #ruby
sargas has joined #ruby
gauke has joined #ruby
rbennacer has joined #ruby
<tuelz> that does look nice workmad3
<tuelz> that's a view test I could actually trust.
browncow has quit [Quit: leaving]
yfeldblum has joined #ruby
DEA7TH_ has joined #ruby
<mwlang> bricker: I have it installed and I can hit the first page, but how would I step through multiple pages, collecting cookies and the likes a mechanize does?
<workmad3> tuelz: personally, I do 'view testing' in the form of 'does the important information actually get spat out onto the page somewhere?' rather than doing fragile structural tests against the HTML :)
metalic has quit [Ping timeout: 272 seconds]
<bricker> mwlang: click links
moeabdol has joined #ruby
hutch78 has joined #ruby
<workmad3> tuelz: it still needs manual checking for the style side, but it gives at least a safety net when developing that the view is at least displaying the correct stuff
xcyclist has joined #ruby
colli5ion has quit []
leafybasil has joined #ruby
doertedev has quit [Quit: Lost terminal]
<xcyclist> My gemfile update seems to be not doing anything. How can I make sure the gems get updated completely from the gem file, or that my Gemfile.lock is properly updated?
einarj has joined #ruby
einarj_ has quit [Read error: Connection reset by peer]
aldarsior has joined #ruby
rocknrollmarc has quit [Ping timeout: 272 seconds]
RegulationD has quit []
dfinninger has joined #ruby
mikecmpbll has joined #ruby
moeabdol has quit [Ping timeout: 255 seconds]
leafybasil has quit [Ping timeout: 246 seconds]
BTRE has joined #ruby
jobewan has quit [Quit: leaving]
jobewan has joined #ruby
denver has quit [Read error: Connection reset by peer]
workmad3 has quit [Ping timeout: 244 seconds]
diegoaguilar has quit [Remote host closed the connection]
ta has joined #ruby
that1guy has joined #ruby
Guest1421 has quit [Ping timeout: 265 seconds]
Guest1421 has joined #ruby
thatslifeson has joined #ruby
<tuelz> xcyclist: trying to update everything?
iasoon has quit [Ping timeout: 256 seconds]
<tuelz> if so I believe you can just delete the gemfile.lock and update
<tuelz> sounds dangerous though, I'd recommend updating one at a time
Hirzu has joined #ruby
robertodecurnex has joined #ruby
balazs_ has joined #ruby
DeBot has quit [Remote host closed the connection]
<havenwood> xcyclist: You can always rename or move your Gemfile.lock for safe keeping and rebuild it with a fresh: bundle
jhass has quit [Quit: Bye]
<xcyclist> Ok. Sorry.
DEA7TH_ has quit [Changing host]
DEA7TH_ has joined #ruby
<xcyclist> Does the bundle run also compile my coffeescript and scss files?
<havenwood> nope
<havenwood> a rake task for that, no?
sohrab has joined #ruby
shazaum has joined #ruby
shazaum has quit [Changing host]
gaboesqu_ has joined #ruby
yfeldblum has quit [Ping timeout: 265 seconds]
<havenwood> xcyclist: What kind of app do you have?
<xcyclist> Thank you havenwood.
<havenwood> yw
ShortCode has joined #ruby
<xcyclist> It is something supporting a company specific gitlab installation / site.
mistermocha has quit [Read error: Connection reset by peer]
Hirzu has quit [Remote host closed the connection]
that1guy has quit [Quit: Textual IRC Client: www.textualapp.com]
mistermocha has joined #ruby
that1guy has joined #ruby
gaboesquivel has quit [Ping timeout: 255 seconds]
sinkensabe has joined #ruby
pontiki has joined #ruby
<havenwood> xcyclist: Ah, so Rails. If you run into Rails questions, #RubyOnRails is the Rails channel.
<pontiki> hi
balazs_ has quit [Remote host closed the connection]
<shevy> hey pontikers
hutch78 has quit [Quit: hutch78]
Mohan_ has quit [Ping timeout: 264 seconds]
<xcyclist> Ok. I didn't go there today because nobody ever responded yesterday when I was there.
<xcyclist> I'll try again.
baweaver has joined #ruby
bmurt has quit [Ping timeout: 256 seconds]
jhass has joined #ruby
<xcyclist> Sorry. Looks like people are there today. Perhaps it was my problem anyway.
<havenwood> xcyclist: Maybe you tried #rails, dunno?
Mohan has joined #ruby
<xcyclist> I bet I just got disconnected and didn't realize it.
Mohan is now known as Guest70261
<havenwood> xcyclist: Or were muted? Check the channel join message.
<pontiki> also, in #rubyonrails, you have to be registered and identified to nickserv in order to talk
<xcyclist> I have never heard of that.
jhass has quit [Excess Flood]
jhass has joined #ruby
<havenwood> xcyclist: When you join the channel, the message says: "-ChanServ-Register with nickserv in order to talk: /msg nickserv help"
<shevy> xcyclist yeah some channels here require registration; we here on #ruby don't! \o/
xcesariox has joined #ruby
bmurt has joined #ruby
djbkd has quit [Quit: My people need me...]
<shevy> I mean, *some channels on freenode
baweaver has quit [Ping timeout: 255 seconds]
<shevy> #python too
unreal_ is now known as unreal
<GaryOak_> python! yeah!
chinmay_dd has quit [Quit: Leaving]
<xcyclist> I am registered as xcyclist. I am logged in as nickserv user.
<shevy> \o/
<mwlang> with selenium, how do I select a link inside a form that doesn’t have an id or name? I can get a handle on the form, but not the link… what I want: pseudo_code => password_form = connection.find_element(id: “passwordForm”); password_form.links.first
baweaver has joined #ruby
snockerton has quit [Quit: Leaving.]
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<GaryOak_> mwlang: find_element(:xpath => "xpath/to/the/element")
<GaryOak_> or you can do :css
flughafen has quit [Ping timeout: 255 seconds]
arashb has joined #ruby
<mwlang> GaryOak_: I haven’t done a lot of xpath… copying “unique descriptor” from firebug says the button can be selected with “.bluebutton > a:nth-child(1)”
jhass has quit [Ping timeout: 272 seconds]
yh has quit [Ping timeout: 245 seconds]
MatthewsFace[SEA has quit [Remote host closed the connection]
<mwlang> how do I turn that into an xpath selector?
<GaryOak_> you can just use css if you want
jackjackdripper has quit [Quit: Leaving.]
<GaryOak_> find_element(:css, ".bluebutton > a:nth-child(1)")
RegulationD has joined #ruby
<mwlang> GaryOak_: too easy
nobitanobi has quit [Remote host closed the connection]
lidenskap has joined #ruby
snockerton has joined #ruby
davedev2_ has quit []
MatthewsFace[SEA has joined #ruby
nobitanobi has joined #ruby
baroquebobcat has joined #ruby
baroquebobcat has quit [Client Quit]
jackjackdripper has joined #ruby
maasha has joined #ruby
jhass has joined #ruby
DeBot has joined #ruby
<mwlang> wowee…I am actually able to drive all the way to my bank account page.
<shevy> is there a simple way to reposition a class from one module-namespace, into top module space, without include-ing that module? so
<mwlang> its a little slow though…not sure if that’s selenium’s fault or the capitalone360.com site’s fault.
<shevy> module Foo; class Bar ... to become Bar, without include on Foo. I wanna steal the class
allcentury has joined #ruby
<maasha> I have an assertion that checks that the number forked process in my script is less than Parallell.processor_count
<maasha> Now, processor_count returns the core count of the current node (28), but I am on machine here with 15000 cores. Somehow I should detect if the script is called through qsub?
<GaryOak_> mwlang: I think it also speeds stuff up if you disable images and css from loading
Guest70261 has quit [Ping timeout: 264 seconds]
ta has quit [Remote host closed the connection]
tuelz has quit [Ping timeout: 256 seconds]
Mohan_ has joined #ruby
parduse has quit []
<wasamasa> maasha: where do you get access to such machines
tjbiddle has joined #ruby
yh has joined #ruby
<maasha> wasamasa: university
x1337807x has joined #ruby
jenrzzz has quit [Ping timeout: 250 seconds]
ebonics has joined #ruby
<wasamasa> damn
<wasamasa> guess I shouldn't have went for a crappy college
sevvie has joined #ruby
<ebonics> is there another way to define at_exit besides.. at_exit
<ebonics> there's some random ruby library i'm using and it's override the exit function. but grepping for at_exit doesn't return any results
<GaryOak_> wasamasa: yeah we had cheap ps3 clusters lol
sargas has quit [Quit: This computer has gone to sleep]
flughafen has joined #ruby
<mwlang> GaryOak_: good idea. I think I’ll try that once I stop taking screenshots as I move along the chain of pages and actually have it functioning like I want it.
<maasha> So any ideas to detect from Ruby if you are running in a queue system?
ta has joined #ruby
<mwlang> where’s the complete API documented? In the docs https://code.google.com/p/selenium/wiki/RubyBindings I just keep ending up back at this page with some examples.
<wasamasa> closest thing I have to that is rented access for supercomputers from a nearby research plant
<GaryOak_> mwlang: https://code.google.com/p/selenium/source/browse/#git%2Frb%2Flib%2Fselenium%2Fwebdriver
<wasamasa> but eh
<GaryOak_> mwlang: easy enough to look through the codebase
<wasamasa> it's not the same as being able to just fool around on such a thing with ruby
Hijiri has joined #ruby
<maasha> wasamasa: yes, it is pretty cool. When I run a job, the excess heat warms the nearest town -> they are gonna sweat!
bmurt has quit [Ping timeout: 246 seconds]
thebastl has joined #ruby
phutchins1 has quit [Ping timeout: 255 seconds]
<mwlang> maasha: nuts.
tuelz has joined #ruby
<mwlang> maasha: maybe I can process my 5gb of XML files on your servers. instead of a 4 day process, I’d be done in 4 minutes. :-)
<shevy> 5gig of XML
<maasha> XML is pure eveil
<shevy> have you been java infected
lidenskap has quit [Remote host closed the connection]
<wasamasa> shevy is so pure and uncorrupted
<shevy> yeah
mrconfused has quit [Ping timeout: 240 seconds]
<shevy> XML free
<wasamasa> kind of cute
Akagi201 has joined #ruby
lidenskap has joined #ruby
bmurt has joined #ruby
<mwlang> shevy: no. I do my best to stay away from Java.
rhllor has quit [Quit: rhllor]
yh has quit [Ping timeout: 256 seconds]
<havenwood> ebonics: begin; exit; rescue SystemExit; puts 'Bye!'; raise end
yalue has quit [Read error: Connection reset by peer]
shellfu has quit [Read error: Connection reset by peer]
<havenwood> ebonics: But did they really override Kernel?: Kernel.at_exit { puts 'Bye!' }
turtil has joined #ruby
shellfu has joined #ruby
mistermocha has quit [Remote host closed the connection]
Akagi201 has quit [Ping timeout: 265 seconds]
ShortCode has quit [Quit: Leaving]
<mwlang> GaryOak_: do you know how to get at the body of the page’s HTML?
<ebonics> havenwood, i don't think so
<GaryOak_> mwlang: page_source, at in python
<ebonics> i just don't know any ruby really and i thought you had to override that
<ebonics> but they overrode the exit code
<ebonics> when i try to use kernel.exit 1 without the direct ! thing, it always exits with 0
djbkd has joined #ruby
<GaryOak_> mwlang: yeah it's driver.page_source
<mwlang> GaryOak_: yeah, that worked perfectly.
<GaryOak_> cool
<havenwood> ebonics: so `abort` doesn't exit with a 1 exit status?
dfinninger has quit [Remote host closed the connection]
<mwlang> GaryOak_: just trying to figure out what I have so I can construct the next steps.
yh has joined #ruby
Mohan_ has quit [Ping timeout: 245 seconds]
kohvihoor has quit [Ping timeout: 276 seconds]
<havenwood> ebonics: (use `abort 'warning'` instead of `STDERR.puts 'warning'; exit 1`)
turtil has quit [Client Quit]
thatslifeson has quit [Remote host closed the connection]
turtil-kun has joined #ruby
bruno- has joined #ruby
<ebonics> havenwood, im trying to just call exit(1)
<havenwood> ebonics: abort
bluOxigen has joined #ruby
kohvihoor has joined #ruby
turtil-kun has quit [Client Quit]
swgillespie has joined #ruby
jobewan has quit [Quit: Leaving]
turtil has joined #ruby
jobewan has joined #ruby
<havenwood> ebonics: Kernel.abort is effectively Kernel.exit(false)
sargas has joined #ruby
Mohan_ has joined #ruby
blueOxigen has quit [Ping timeout: 276 seconds]
lidenskap has quit [Remote host closed the connection]
thebastl has quit [Quit: Leaving...]
choke|work has joined #ruby
moeabdol has joined #ruby
insidious has joined #ruby
<ebonics> havenwood, i need to be able to have multiple exit codes though
<havenwood> ebonics: Does `Kernel.exit` work?
thatslifeson has joined #ruby
yfeldblum has joined #ruby
<havenwood> warn 'Error: run for the hills!'; Kernel.exit 911 # 143
<ebonics> havenwood, it does if i override it
<ebonics> with Kernel.exit!(1)
<ebonics> if i just do Kernel.exit(1) it doesn't work
Rollabunna has quit [Remote host closed the connection]
<havenwood> ebonics: Why are you calling exit!?
<havenwood> ebonics: I think I'm not following.
Rollabunna has joined #ruby
<ebonics> havenwood, because im overriding raise
NinjaOps has quit [Remote host closed the connection]
<ebonics> and i need it to return different exit codes depending on the reason for the raise
moeabdol has quit [Ping timeout: 272 seconds]
<pontiki> something about this sounds quite wrong
<ebonics> pontiki, how so
<baweaver> very wrong
momomomomo has joined #ruby
<baweaver> don't monkeypatch core behaviors like that
<baweaver> you don't know what else uses it
<baweaver> especially internally
<baweaver> but go ahead, you'll find out very quickly on that one, just giving fair warning
<ebonics> the library i'm working with already did that
<baweaver> which library?
<pontiki> if you want to do special things with errors, define specific errors in your code that inherit from RuntimeError or possibly other StandardError types. Create an error handler that can deal with those errors, and inject that in where you want it
<havenwood> Signal.trap('EXIT') { exit 2 }
<ebonics> pontiki, it's not _my_ code
<mwlang> hmmm…I see a <TABLE> of accounts in the screenshot and also when I inspect the same page with firefox and can see it in the DOM/source in Firefox as well, but it’s not in the #page_source…I’m guessing because JavaScript is writing those parts to the DOM. So next question is how to re-eval the page_source to get the asyncronously loaded elements.
<baweaver> don't use it, it'll cause you all types of issues later.
<ebonics> havenwood, thanks that works
<ebonics> i know what i'm doing is disgusting
jottr_ has quit [Ping timeout: 272 seconds]
<ebonics> but my question isn't how to write good ruby code
<ebonics> i just need to do something, that's it
<ebonics> thanks havenwood
frem has joined #ruby
<ebonics> actually havenwood that's great
<ebonics> i can even call super.raise with that
<ebonics> and still have it use my exit code
<havenwood> It's alive, it's moving, it's alive, IT'S ALIVE!
<havenwood> ebonics: You're welcome.
griffindy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Dopagod has quit [Ping timeout: 256 seconds]
lolmaus has quit [Remote host closed the connection]
griffindy has joined #ruby
bigmac has quit [Ping timeout: 272 seconds]
kirun has joined #ruby
yfeldblum has quit [Remote host closed the connection]
baweaver has quit [Remote host closed the connection]
existensil has quit [Ping timeout: 255 seconds]
insidious has quit [Ping timeout: 240 seconds]
JoshGlzBrk has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
freerobby has quit [Quit: Leaving.]
chinmay_dd has joined #ruby
chipotle has joined #ruby
bigmac has joined #ruby
djbkd has quit [Remote host closed the connection]
sohrab has quit [Ping timeout: 252 seconds]
j_mcnally has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
spider-mario has quit [Ping timeout: 256 seconds]
SouL_|_ has quit [Ping timeout: 240 seconds]
jottr_ has joined #ruby
djbkd has joined #ruby
vudew has joined #ruby
Rollabunna has quit [Remote host closed the connection]
Rollabunna has joined #ruby
dfinninger has joined #ruby
longfeet has quit [Ping timeout: 255 seconds]
danzilio has joined #ruby
jobewan has quit [Quit: leaving]
jobewan has joined #ruby
allcentury has quit [Ping timeout: 240 seconds]
pocketprotector has quit [Quit: leaving]
<shevy> guys I need advice
pocketprotector has joined #ruby
Guest1421 has quit [Ping timeout: 240 seconds]
Mohan_ has quit [Ping timeout: 244 seconds]
Hijiri has quit [Quit: WeeChat 1.0.1]
<shevy> is there a way to force Abbrev into supplying a random shortened key
<shevy> or perhaps there is another way, my head is very unclear right now
existensil has joined #ruby
<shevy> the latter happens, I assume, because "sad" could mean both "sadly" and "sadistically"; in this case, I'd use a rule that picks the shorter variant (so, sad -> sadly)
mrconfused has joined #ruby
alexherbo2 has quit [Ping timeout: 272 seconds]
Mohan has joined #ruby
jottr_ has quit [Ping timeout: 255 seconds]
Mohan is now known as Guest8664
LJT has joined #ruby
mengu has joined #ruby
merqlove has quit [Quit: Connection closed for inactivity]
chinmay_dd has quit [Ping timeout: 244 seconds]
Guest1421 has joined #ruby
Kricir has quit [Remote host closed the connection]
slash_nick has joined #ruby
slash_nick has quit [Changing host]
slash_nick has joined #ruby
<weaksauce> shevy do a .each and merge the results?
<weaksauce> order the array by length first
jottr_ has joined #ruby
nym has quit [Quit: Connection closed for inactivity]
Rollabunna has quit [Remote host closed the connection]
Rollabunna has joined #ruby
diegoaguilar has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
kadoppe has quit [Ping timeout: 250 seconds]
kadoppe has joined #ruby
djbkd has quit [Remote host closed the connection]
bigmac has quit [Ping timeout: 256 seconds]
vikaton has quit []
gregf has quit [Quit: WeeChat 1.1.1]
lkba has joined #ruby
slash_nick has quit [Ping timeout: 256 seconds]
jackjackdripper has joined #ruby
insidious has joined #ruby
failshell has quit [Remote host closed the connection]
allcentury has joined #ruby
bigmac has joined #ruby
sevvie has quit [Ping timeout: 265 seconds]
ki0 has quit [Remote host closed the connection]
henrikhodne has quit [Ping timeout: 272 seconds]
gregf has joined #ruby
mistermocha has joined #ruby
Leef_ has joined #ruby
ebernhardson has joined #ruby
endash has quit [Quit: endash]
<ebernhardson> in rspec, i know i can do expect(list).to include(string) to assert that a particular string is in list, how might i go about asserting that the string is a substring of a string in the list htough?
endash has joined #ruby
<jhass> doubt there's a premade matcher, I'd opt for writing my own for clarity, it's easy enough
gsd has joined #ruby
alexherbo2 has joined #ruby
<mwlang> for selenium, how do I select elements that are either td or th? i.e. table_rows = connection.find_elements(css: “tr”); cells = table_rows.map{|tr| tr.find_elements(css: “??”)
gsd has quit [Max SendQ exceeded]
gsd has joined #ruby
<jhass> doesn't td, th work?
Hirzu has joined #ruby
<ebonics> no point in using css selectors if you're just using tags to identify the elements
<ebonics> use the tag selector instead
<weaksauce> ebernhardson epxect(string).to match(/some regex/)
einarj_ has joined #ruby
vikaton has joined #ruby
<weaksauce> oh in a list. nevermind you'd need to write your own
einarj has quit [Read error: Connection reset by peer]
jimms has joined #ruby
jimms has quit [Client Quit]
<havenwood> shevy: A quick hackup of stdlib Abbrev that at least meets your one case: https://gist.github.com/havenwood/b8da6c6763f6cf325366
<ebernhardson> ok, i'll poke at it a bit
<mwlang> jhass: yup, that worked perfectly. thanks
<ebernhardson> i'm imagining it must be possible to make a matcher thats not crazy long, because i just looked at the implementation of the Include matcher and it goes on for pages
<ebernhardson> although .. it looks like expect(results).to include(include(title)) might work..must try
<havenwood> shevy: I didn't bother to really look what the existing Abbrev is doing, just yanked stuff out to get the output you asked for. :P
<aewffwea> Best crow-funding project ever: https://www.youtube.com/watch?v=ALKssQpX2v4
<weaksauce> actually ebernhardson just use include with a regex. I tried it and it worked fine
<havenwood> shevy: But yeah, Abbrev isn't flexible. Custom write a better one that works for your purpose.
msgodf has quit [Ping timeout: 272 seconds]
yfeldblum has joined #ruby
nini1294 has joined #ruby
<ebernhardson> weaksauce: excellent, thanks!
<weaksauce> np
mitchellhenke has quit [Quit: Computer has gone to sleep.]
that1guy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
einarj has joined #ruby
ghr has joined #ruby
baweaver has joined #ruby
sevvie has joined #ruby
einarj_ has quit [Read error: Connection reset by peer]
livathinos has joined #ruby
moeabdol has joined #ruby
ghr has quit [Read error: Connection reset by peer]
swgillespie has quit [Quit: Textual IRC Client: www.textualapp.com]
mitchellhenke has joined #ruby
ghr has joined #ruby
<shevy> havenwood hmm I see
thumpba_ has quit [Ping timeout: 245 seconds]
LJT has quit [Ping timeout: 240 seconds]
quimrstorres has joined #ruby
<weaksauce> shevy what's the actual problem you are trying to solve?
LJT has joined #ruby
sevvie has quit [Ping timeout: 240 seconds]
djbkd has joined #ruby
<shevy> weaksauce you can type commands in a MUD and use adverbs
Guest8664 has quit [Read error: Connection reset by peer]
<shevy> so "smile sad" should be expanded to "smile sadly"
bigmac has quit [Ping timeout: 252 seconds]
<shevy> via Abbrev this was not possible to get as a solution because "sad" would be discarded in the above situation
moeabdol has quit [Ping timeout: 244 seconds]
JDiPierro has quit [Read error: Connection reset by peer]
snockerton has quit [Quit: Leaving.]
tvw has quit [Ping timeout: 256 seconds]
JDiPierro has joined #ruby
bigmac has joined #ruby
davedev24_ has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
phutchins1 has joined #ruby
Mohan has joined #ruby
delianides has quit []
Mohan is now known as Guest19720
quimrstorres has quit [Ping timeout: 264 seconds]
bluOxigen has quit [Ping timeout: 240 seconds]
edwinvdg_ has quit [Remote host closed the connection]
alexherbo2 has quit [Quit: WeeChat 1.1.1]
mrconfused has quit [Ping timeout: 272 seconds]
asmodchan has joined #ruby
asmodchan has quit [Read error: Connection reset by peer]
edwinvdgraaf has joined #ruby
moeabdol has joined #ruby
maasha has quit [Quit: Page closed]
ndrei has joined #ruby
yh has quit [Ping timeout: 264 seconds]
alexherbo2 has joined #ruby
neanderslob has joined #ruby
ismaelga has joined #ruby
<weaksauce> >> results = {}; x =['sadly','sadistically', "I" ].sort_by(&:length).reverse.each do |x| results = results.merge(Abbrev.abbrev([x])); end
<ruboto> weaksauce # => uninitialized constant Abbrev (NameError) ...check link for more (https://eval.in/335186)
snockerton has joined #ruby
<weaksauce> >> require 'abbrev'; results = {}; x =['sadly','sadistically', "I" ].sort_by(&:length).reverse.each do |x| results = results.merge(Abbrev.abbrev([x])); end
<ruboto> weaksauce # => ["sadistically", "sadly", "I"] (https://eval.in/335187)
ebernhardson is now known as ebernhardson|lch
mrconfused has joined #ruby
<weaksauce> >> require 'abbrev'; results = {}; x =['sadly','sadistically', "I" ].sort_by(&:length).reverse.each do |x| results = results.merge(Abbrev.abbrev([x])); end; results
<ruboto> weaksauce # => {"sadistically"=>"sadistically", "sadisticall"=>"sadistically", "sadistical"=>"sadistically", "sadis ...check link for more (https://eval.in/335188)
Channel6 has quit [Quit: Leaving]
<weaksauce> shevy^
msgodf has joined #ruby
msgodf has quit [Max SendQ exceeded]
<havenwood> shevy: Or just use sort the way you want and #find: sort_by(&:size).find { |word| word.start_with? 'sad' }
gauke has quit [Quit: gauke]
<baweaver> Damerau–Levenshtein distance
haylon has joined #ruby
<haylon> Hello all! If I am to connect to a DB2 server using ruby, would just installing the db2 gem work for me, or do I need to install the DB2 client as well?
freerobby has joined #ruby
livathinos has quit []
msgodf has joined #ruby
<shevy> cool
<shevy> weaksauce my brain has to understand that code first...
<shevy> why do we sort by length first?
msgodf has quit [Max SendQ exceeded]
jottr_ has quit [Ping timeout: 240 seconds]
quimrstorres has joined #ruby
bashusr has quit [Ping timeout: 244 seconds]
<havenwood> >> require 'rubygems/text'; include Gem::Text; ['sadly','sadistically'].sort_by { |word| levenshtein_distance word, 'istically' }
<ruboto> havenwood # => ["sadistically", "sadly"] (https://eval.in/335191)
that1guy has joined #ruby
<weaksauce> so merge works correctly. you wanted the smallest abbreviation to take precedence? each merge overwrites the already set values so we want to start with the longest first
<havenwood> shevy: You said you want the shortest word.
pdoherty has quit [Ping timeout: 264 seconds]
hexhaxtron has left #ruby ["Leaving"]
<weaksauce> shevy put a puts statement in the each block and you will see what's happening
moretti has joined #ruby
<shevy> havenwood oh yes
pontiki has quit [Ping timeout: 240 seconds]
redjack1964 has quit [Remote host closed the connection]
<shevy> I think I need to add that explanation in the comments since I already forgot 1 hour afterwards :)))
redjack1964 has joined #ruby
jobewan has quit [Quit: leaving]
ta has quit [Remote host closed the connection]
jobewan has joined #ruby
ta has joined #ruby
jenrzzz has joined #ruby
codecop has quit [Remote host closed the connection]
baweaver has quit [Remote host closed the connection]
<shevy> weaksauce yeah, the other part is easier to understand; .merge to merge into the hash, and .abbrev to find the abbrevitations... I really forgot why we would want to use sort by length though lol
<shevy> *abbreviations
<shevy> now you see why def intialize errors can happen!
Rapier- has quit [Quit: (null)]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ismaelga has quit [Remote host closed the connection]
moeabdol has quit [Ping timeout: 256 seconds]
jobewan has quit [Quit: leaving]
LJT has quit [Quit: Quiting...]
x1337807x has joined #ruby
jobewan has joined #ruby
<weaksauce> shevy here's a more complete example with words that are subwords. sadist and sadistically
<havenwood> >> require 'abbrev'; ['sadly','sadistically', 'I'].sort_by { |word| -word.size }.map { |word| Abbrev.abbrev [word] }.inject :merge
<ruboto> havenwood # => {"sadistically"=>"sadistically", "sadisticall"=>"sadistically", "sadistical"=>"sadistically", "sadis ...check link for more (https://eval.in/335245)
jobewan has quit [Client Quit]
einarj_ has joined #ruby
<shevy> havenwood huh... how did you avoid the .reverse there
<shevy> the -word.size it is?
<havenwood> shevy: just another derivation of weaksauce's solution
<weaksauce> yeah -word.size shevy
<shevy> well that's cool or? I get rid of one method call, just by adding one more character, the - :)
einarj has quit [Ping timeout: 245 seconds]
<weaksauce> well not really one character but yeah that's the idea.
<shevy> true
<shevy> I have to add the {} part
<shevy> if only we could add arguments to stuff like .sort_by(&:size)
mrconfused has quit [Ping timeout: 264 seconds]
lidenskap has joined #ruby
haylon has quit [Quit: Page closed]
<havenwood> >> ['sadly','sadistically', "I" ].sort_by { |word| -word.size }.flat_map { |word| 1.upto(word.size).map { |n| [word[0, n], word] }.to_h }.inject :merge
<ruboto> havenwood # => {"s"=>"sadly", "sa"=>"sadly", "sad"=>"sadly", "sadi"=>"sadistically", "sadis"=>"sadistically", "sadi ...check link for more (https://eval.in/335250)
jobewan has joined #ruby
revoohc has quit [Quit: revoohc]
<havenwood> shevy: ^ not using abbrev
<shevy> huh
<shevy> did you just implement an abbrev without abbrev
<havenwood> shevy: i do what i want!
<shevy> I don't think I have seen .flat_map before. That is a combination of .flatten.map ?
njs126 has quit [Ping timeout: 272 seconds]
<havenwood> shevy: map and flatten(1)
<shevy> ah
edwinvdg_ has joined #ruby
Akagi201 has joined #ruby
spider-mario has joined #ruby
ismaelga has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
lidenskap has quit [Remote host closed the connection]
edwinvdgraaf has quit [Ping timeout: 245 seconds]
nobitanobi has quit [Read error: Connection reset by peer]
davedev24_ has quit [Ping timeout: 264 seconds]
davedev2_ has joined #ruby
nobitano_ has joined #ruby
Akagi201 has quit [Ping timeout: 272 seconds]
kblake has quit [Ping timeout: 255 seconds]
nini1294 has quit [Quit: AndroIRC - Android IRC Client ( http://www.androirc.com )]
ki0 has joined #ruby
baweaver has joined #ruby
Guest19720 has quit [Ping timeout: 272 seconds]
moeabdol has joined #ruby
Mohan_ has joined #ruby
swgillespie has joined #ruby
Hirzu has quit [Remote host closed the connection]
decoponio has quit [Quit: Leaving...]
qwertme has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jobewan has quit [Quit: leaving]
startupality has joined #ruby
<mwlang> This may be asking for trouble, but I don’t suppose the vcr gem can be used with selenium + phantomjs to set up cached server responses (I’m not using selenium + phantomjs to test, but rather to automate a data retrieval process from protected websites).
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
yh has joined #ruby
noname has quit [Ping timeout: 256 seconds]
Motoservo has quit [Quit: Over & out.]
andrew-l has quit [Ping timeout: 276 seconds]
speaking1ode has quit [Ping timeout: 276 seconds]
startupality has quit [Client Quit]
that1guy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<ebonics> is it possible to enable line numbers in "compile?" error messages in rubymine
pocketprotector has quit [Read error: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number]
speakingcode has joined #ruby
lidenskap has joined #ruby
<ebonics> all i get is these generic errors with no line numbers: no implicit conversion of Symbol into Integer
Channel6 has joined #ruby
iasoon has joined #ruby
moretti has quit [Remote host closed the connection]
<xxneolithicxx> are you capturing the exception and only printing the message?
jobewan has joined #ruby
<ebonics> xxneolithicxx, maybe. i'm modifying a library
<ebonics> this is painful not knowing ruby :)
woodruffw_ has joined #ruby
redjack1964 has quit [Remote host closed the connection]
woodruffw has quit [Read error: Connection reset by peer]
<xxneolithicxx> have any code you can gist?
jobewan has quit [Client Quit]
<ebonics> xxneolithicxx, the library is quite big
jobewan has joined #ruby
jobewan has quit [Client Quit]
<xxneolithicxx> ok well without being able to see it look for a piece of code that expects an integer but you are giving it a symbol instead, a value that looks like :symbol_name
griffindy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
allcentury has quit [Ping timeout: 272 seconds]
<xxneolithicxx> convert that symbol to an integer by calling .to_i on it, best i can guess without seeing something
barkerd427 is now known as zz_barkerd427
<ebonics> xxneolithicxx, i think it's because i'm trying to insert map key/values into an array
woodruffw_ is now known as woodruffw
jobewan has joined #ruby
failshell has joined #ruby
<ebonics> derp
<xxneolithicxx> lol
<ebonics> still i'd like to be able to turn on line nubmers
<shevy> ebonics hmm you use rubymine but don't know ruby?
<ebonics> sure why not shevy
bigmac has quit [Ping timeout: 246 seconds]
redjack1964 has joined #ruby
failshell has quit [Remote host closed the connection]
JDiPierro has quit [Remote host closed the connection]
<shevy> you have a special variable __LINE__ which holds the line number
lele is now known as Guest24
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy> normally the exceptions have all of that information
<ebonics> shevy, i meant when an exception gets thrown i'm not getting the stacktrace
<shevy> and there is caller() too
<ebonics> i guess it's probably related to the library and not rubymine
<shevy> yeah I would not trust this rubymine thingy too much :)
DynamicMetaFlow has joined #ruby
<shevy> I don't know... I remember years ago someone was doing stuff in rubymine
bigmac has joined #ruby
pocketprotector has joined #ruby
<shevy> and rubymine did stuff to counteract that stuff
<shevy> automatically
<ebonics> intellij products are typically top notch so
<xxneolithicxx> lol
<ebonics> i doubt it's on their end
<xxneolithicxx> no no... dont do that stuffs
quimrstorres has quit [Remote host closed the connection]
<shevy> his code worked all fine for everyone else from his pastie
<ebonics> or it's not configured properly
qwertme has joined #ruby
<ebonics> i think years ago rubymine was just a plugin
<ebonics> so it probably had bugs
pocketprotector has quit [Client Quit]
<adaedra> it's still more or less
bmurt has quit [Ping timeout: 245 seconds]
<ebonics> well yeah
<adaedra> RubyMine is just a cut down version of IntelliJ
<ebonics> just like phpstorm is "more or less" a plugin though
quimrstorres has joined #ruby
<adaedra> I've got IntelliJ at work and RubyMine at home
<ebonics> i have intellij, rubymine, phpstorm, and webstorm
<ebonics> all on here :p
startupality has joined #ruby
greenbagels has joined #ruby
vdamewood has joined #ruby
<adaedra> meh
yfeldblum has quit [Remote host closed the connection]
<ebonics> i don't understand who would want to strip stacktraces on errors
<adaedra> why have all of them when IntelliJ alone does all?
moeabdol has quit [Quit: WeeChat 1.1.1]
colin___ has joined #ruby
yh has quit [Ping timeout: 240 seconds]
<ebonics> adaedra, so all my workspaces and default settings are decoupled
yfeldblum has joined #ruby
colin___ has quit [Changing host]
colin___ has joined #ruby
colin___ is now known as drocsid
<adaedra> ah
mrconfused has joined #ruby
blackmesa has joined #ruby
<drocsid> I'm trying to handle an exception in a simple ruby script. http://pastie.org/10176540
<drocsid> but I'm getting a jump error
<ebonics> HAHAHA
<ebonics> drocsid, you just helped answer my question
<ebonics> thanks
<drocsid> cool
<ebonics> you're the man
<drocsid> maybe I can get some help with mine
<ebonics> i would if i could
momomomomo has quit [Quit: momomomomo]
ebernhardson|lch is now known as ebernhardson
nini1294 has joined #ruby
lidenskap has quit [Remote host closed the connection]
jobewan has quit [Quit: leaving]
<drocsid> ebonics: I just entered the room, what was your question?
tuelz has quit [Ping timeout: 272 seconds]
moeabdol has joined #ruby
<ebonics> drocsid, i'm modifying a library and the damn thing was recueing an exception and removing the stacktrace. but i didnt know the syntax or whatever that was used to do that
<ebonics> so i just grepped rescue and found it
<ebonics> (i don't know any ruby)
quimrstorres has quit [Remote host closed the connection]
Zai00 has joined #ruby
nini1294 has quit [Client Quit]
jobewan has joined #ruby
granthatcher has joined #ruby
jobewan has quit [Client Quit]
nini1294 has joined #ruby
quimrstorres has joined #ruby
nini1294 has quit [Client Quit]
nini1294 has joined #ruby
<mwlang> ebonics: I think you’re starting to know at least some ruby. ;-)
jobewan has joined #ruby
<drocsid> I don't know too much ruby myself
jobewan has quit [Client Quit]
nini1294 has quit [Client Quit]
<ebonics> mwlang, to be honest i quite like the syntax
<drocsid> wish I could figure out this jump error
<ebonics> i might start using it
<ebonics> it's really intuitive
<drocsid> it's pretty nice
<mwlang> drocsid: what jump error?
<drocsid> I'm trying to handle an exception in a simple ruby script. http://pastie.org/10176540
jobewan has joined #ruby
jobewan has quit [Client Quit]
ldnunes has quit [Quit: Leaving]
<drocsid> " \n ArgumentError\n \n invalid date\n \n /usr/lib/ruby/1.8/date.rb:1576:in `new_by_frags'/usr/lib/ruby/1.8/date.rb:1621:in `parse'./check_files.rb:7./check_files.rb:7:in `foreach'./check_files.rb:7./check_files.rb:7:in `glob'./check_files.rb:7\n"
<drocsid> ./check_files.rb:19: unexpected next (LocalJumpError)
<mwlang> drocsid: lose the next. it’s not necessary
jobewan has joined #ruby
<drocsid> I tried that first
jobewan has quit [Client Quit]
<drocsid> ruby ./check_files.rb
<drocsid> "/var/log/oozie/oozie.log-2015-04-24-06"
<drocsid> " \n NoMethodError\n \n undefined method `+' for nil:NilClass\n \n ./check_files.rb:7./check_files.rb:7:in `foreach'./check_files.rb:7./check_files.rb:7:in `glob'./check_files.rb:7\n"
<gambl0re> how can i check when a file was created on linux...
<mwlang> let’s back up…what are you trying to accomplish with that script?
<gambl0re> i only see last accessed and last modified
<drocsid> read through log files line by line
<mwlang> gambl0re: File.mtime(“somefilename”) I think.
<drocsid> pick the timestamp up from each line
<havenwood> gambl0re: File.birthtime
<drocsid> compare it to the last
<gambl0re> ok
gojira_ has joined #ruby
<drocsid> maybe I need to fix the timestamps on the exception
babykosh has joined #ruby
but3k4 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rodfersou has quit [Quit: leaving]
<gambl0re> it's not working...
<gambl0re> im typing myfilename.birthtime
<gambl0re> in the terminal
<gambl0re> whats the command i gotta put..
CloCkWeRX has joined #ruby
<gambl0re> doesnt matter...nevermind
jobewan has joined #ruby
jobewan has quit [Client Quit]
Asher has quit [Quit: Leaving.]
Asher has joined #ruby
tuelz has joined #ruby
jobewan has joined #ruby
jobewan has quit [Client Quit]
yfeldblum has quit [Quit: Leaving...]
jerius has quit [Quit: /quit]
x1337807x has joined #ruby
JoshGlzBrk has joined #ruby
<mwlang> drocsid: totally untested: https://gist.github.com/mwlang/5135f64914c4b9a5a0c7
<mwlang> xxneolithicxx: nice flip
baweaver has quit [Remote host closed the connection]
uptownhr has joined #ruby
<mwlang> drocsid: just realized a mistake in the gist and corrected it: https://gist.github.com/mwlang/5135f64914c4b9a5a0c7
Rickmasta has joined #ruby
yqt has joined #ruby
jobewan has joined #ruby
alexherbo2 has quit [Ping timeout: 245 seconds]
jobewan has quit [Client Quit]
revoohc has joined #ruby
that1guy has joined #ruby
<mwlang> drocsid: you may need to adjust the regexp in the timestamp method as this was some code I pulled from one of my log parsers and I see your timestamps aren’t quite the same as mine.
<havenwood> mwlang: commented on your gist
mengu has quit [Remote host closed the connection]
yfeldblum has joined #ruby
jobewan has joined #ruby
jottr_ has joined #ruby
<xxneolithicxx> interesting, fyi the one i posted should be (retries_left + 1).times so as to not count the first attempt as a retry
revoohc has quit [Client Quit]
Astrologos_ has joined #ruby
<xxneolithicxx> ive never used retry, how does that decide what to retry is it the current block
EagleDelta has quit [Remote host closed the connection]
jobewan has quit [Client Quit]
<mwlang> havenwood: #retry ? :-o
dorei has quit [Ping timeout: 244 seconds]
einarj has joined #ruby
<havenwood> xxneolithicxx: it retries from begin, or if an implicit begin the beginning of the method
einarj_ has quit [Read error: Connection reset by peer]
robertodecurnex has quit [Remote host closed the connection]
leafybasil has joined #ruby
n008f4g_ has joined #ruby
workmad3 has joined #ruby
<mwlang> I have definitely learned something new today
thatslifeson has quit [Remote host closed the connection]
<xxneolithicxx> TIL to retry
umgrosscol has quit [Quit: Quit]
Hijiri has joined #ruby
<mwlang> there’s also a #redo
rbennacer has quit [Remote host closed the connection]
woodruffw has quit [Quit: And then he took off.]
woodruffw has joined #ruby
momomomomo has joined #ruby
<ebonics> man this language is so easy haha
pocketprotector has joined #ruby
Aww is now known as cutevibes
jobewan has joined #ruby
<havenwood> mwlang: redo is a keyword not a method, but you use it in a loop like you would `next` but instead of proceeding to the next it redoes the current iteration
tuelz has quit [Read error: No route to host]
quimrstorres has quit [Remote host closed the connection]
baweaver has joined #ruby
workmad3 has quit [Ping timeout: 276 seconds]
mitchellhenke has quit [Quit: Computer has gone to sleep.]
tuelz has joined #ruby
quimrsto_ has joined #ruby
sohrab has joined #ruby
nfk has quit [Quit: yawn]
<mwlang> havenwood: got it. reading through some of this on http://www.tutorialspoint.com/ruby/ruby_loops.htm
jobewan has quit [Client Quit]
that1guy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jobewan has joined #ruby
jobewan has quit [Remote host closed the connection]
adac has quit [Ping timeout: 264 seconds]
ndrei has quit [Ping timeout: 244 seconds]
nini1294 has joined #ruby
quimrsto_ has quit [Remote host closed the connection]
paulcsmith has quit [Quit: Be back later ...]
<drocsid> mwlang, thanks. But I would still like to try to understand why my script. I am not having any issues till I hit a line which throws an exception
<drocsid> mwlang: ^^^
<havenwood> >> retwos = 2; 1.upto(3) { |n| puts n; if retwos > 0 && n == 2; retwos -= 1; redo end }
<ruboto> havenwood # => 1 ...check link for more (https://eval.in/335433)
jobewan has joined #ruby
doodlehaus has quit [Remote host closed the connection]
werelivinginthef has quit [Remote host closed the connection]
ndrei has joined #ruby
quimrstorres has joined #ruby
quimrstorres has quit [Remote host closed the connection]
Zai00 has quit [Quit: Zai00]
jblancet1 has quit [Quit: Reconnecting]
jblancett has joined #ruby
qwertme has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<drocsid> does my exception handling need to take place around the Datetime, due to the way I'm using blocks?
quimrstorres has joined #ruby
<havenwood> drocsid: what's that `next` doing there?
<havenwood> oh, you didn't indent
quimrstorres has quit [Remote host closed the connection]
<drocsid> I'll repaste what I'm doing now
<drocsid> havenwood: ^^^
<havenwood> drocsid: properly indenting your code makes it much more readable
WillAmes has joined #ruby
<drocsid> havenwood: I'll try to indent it also...
nini1294 has quit [Ping timeout: 240 seconds]
<adaedra> (under vim it's =)
zzing has joined #ruby
nini1294 has joined #ruby
jobewan_ has joined #ruby
dblessing has quit [Quit: Textual IRC Client: www.textualapp.com]
Filete has joined #ruby
jobewan_ has quit [Client Quit]
FernandoBasso has joined #ruby
jobewan has quit [Quit: leaving]
jobewan has joined #ruby
jobewan has quit [Client Quit]
mistermocha has quit [Read error: Connection reset by peer]
Hijiri has quit [Quit: WeeChat 1.0.1]
mistermocha has joined #ruby
mistermocha has quit [Remote host closed the connection]
<ebonics> i think i'm not understanding something
<aewffwea> how do I test ruby code?
<ebonics> is this completely wrong? https://dpaste.de/B3mb
<aewffwea> here?
tejasmanohar has joined #ruby
<ebonics> to reference a def that returns a hash as the hash itself
tejasmanohar has quit [Client Quit]
jobewan has joined #ruby
tejasmanohar has joined #ruby
jobewan has quit [Client Quit]
jobewan has joined #ruby
<adaedra> aewffwea: if you're looking at code testing as in unit testing, look at rspec or minitest. If you're looking at exploring and testing small bits of ruby, try irb or pry. If you want to run ruby code from a file, `ruby file.rb`.
aldarsior has quit [Ping timeout: 244 seconds]
DynamicMetaFlow has quit [Remote host closed the connection]
<ebonics> oh im an idiot
<aewffwea> I wanted to test in the chat :p
<aewffwea> anyway, found it
<aewffwea> Return fucking returns from the method where you define it...
<aewffwea> amazing
<adaedra> like any return
insidious has quit [Quit: Textual IRC Client: www.textualapp.com]
nini1294 has quit [Read error: Connection reset by peer]
<adaedra> anyway
<aewffwea> adaedra: In most languages, return returns from the current "execution" unit... like, if you return inside a block, you return the result of the block, not of the method
<adaedra> >> %(like this, aewffwea)
<ruboto> adaedra # => "like this, aewffwea" (https://eval.in/335465)
<drocsid> not sure If I'm using great indentation, but http://pastie.org/10176611
<drocsid> havenwood: ^^^
<adaedra> aewffwea: if you want to return from a block, use next or break
<aewffwea> >> def first(c); c.each { |i| return i }; end; first((1..20))
<ruboto> aewffwea # => 1 (https://eval.in/335466)
<aewffwea> >> def first(c); c.each { |i| return i }; end; first((20..30))
cutevibes is now known as PrincessAww
<ruboto> aewffwea # => 20 (https://eval.in/335467)
<aewffwea> adaedra: I like this behavior... I was just surprised it works like this...
<drocsid> do I have to begin / rescue inside the block?
jobewan has quit [Client Quit]
badhatter has quit [Read error: Connection reset by peer]
<aewffwea> adaedra: As far as I knew, Smalltalk was the only language that supported this "weird" return xD
<adaedra> aewffwea: it's logical
<aewffwea> adaedra: not really :p
Zai00 has joined #ruby
<drocsid> to "continue" / next , get the next line?
badhatter has joined #ruby
<drocsid> after the exception
<aewffwea> adaedra: it's also quite difficult to implement....
<drocsid> is that the issue
<adaedra> aewffwea: well, for me it is :)
<aewffwea> adaedra: good for you :)
mistermocha has joined #ruby
<adaedra> also, be careful about return in blocks.
<adaedra> >> c = proc do return end; c.call
<mwlang> drocsid: sorry, I stepped away for a bit….still have a question on the exception handling?
<ruboto> adaedra # => unexpected return (LocalJumpError) ...check link for more (https://eval.in/335496)
<drocsid> I'm printing quite a bit of debugging
pontiki has joined #ruby
<aewffwea> adaedra: that's just because you are running the code outside a method
<adaedra> yes
jenrzzz_ has joined #ruby
<aewffwea> anyway, I am 100% familiar with this behavior... I just didn't know ruby had it
<adaedra> got bitten some times :p
quimrstorres has joined #ruby
jobewan has joined #ruby
baweaver has quit [Remote host closed the connection]
henrikhodne has joined #ruby
<drocsid> yes, I'm just asking about my program above. It seems to work except the exception handling part. Do I have to handle the exception in the block, guess I will try that next
HTH_ has left #ruby ["Leaving"]
jenrzzz has quit [Ping timeout: 240 seconds]
<mwlang> aewffwea: ruby does take many of its cues from smalltalk.
shazaum has quit [Quit: This computer has gone to sleep]
baweaver has joined #ruby
<aewffwea> mwlang: I've noticed
<aewffwea> mwlang: Sadly it doesn't do keyword messages: p
Guest1421 has quit [Ping timeout: 252 seconds]
<aewffwea> mwlang: Sadly it doesn't do keyword messages: :p
<mwlang> drocsid: yes, if you want to continue trying files. where it is now, you’re escaping the dir.glob loop
<mwlang> aewffwea: and what are keyword messages?
pontiki has quit [Ping timeout: 240 seconds]
thatslifeson has joined #ruby
DexterLB has quit [Ping timeout: 240 seconds]
<drocsid> mwlang: the exception is thrown due to a bad date in a specific file
<drocsid> or a line without a timestamp first
<drocsid> a bad line
<drocsid> Date cannot parse the line
<drocsid> just asking why I can't recover from the exception, get to the next line, or how to appropriatly get the next line
pengin_ has quit []
<mwlang> drocsid: because your rescue block is outside the loops
moeabdol has quit [Read error: Connection reset by peer]
yfeldblu_ has joined #ruby
zz_barkerd427 is now known as barkerd427
bigmac has quit [Ping timeout: 252 seconds]
moeabdol has joined #ruby
DexterLB has joined #ruby
<drocsid> mwlang: that's what I was suspecting. Will try to figure out how to get it right. Thanks..
chimche has quit [Quit: Leaving.]
bigmac has joined #ruby
gsd has joined #ruby
<ebonics> is it possible to overload the hash/array access syntax
<mwlang> drocsid: it might help to make your code more ruby-like. Your code is challenging to read as-is.
<ebonics> like.. if i want to add functionality to myhash[:mysymbol]
quimrstorres has quit [Remote host closed the connection]
<apeiros> ebonics: you can define [] as a method, yes
<apeiros> ebonics: it's not overloading, though. ruby by definition can't have that.
yfeldblum has quit [Ping timeout: 265 seconds]
metalic has joined #ruby
A205B064 has joined #ruby
chimche has joined #ruby
Astrologos_ has quit []
jobewan has quit [Quit: leaving]
<apeiros> (overloading requires typed params - which ruby doesn't have)
moeabdol has quit [Read error: Connection reset by peer]
metalic has quit [Max SendQ exceeded]
dorei has joined #ruby
<aewffwea> apeiros: You could have multimethods though'
<ebonics> i want to make it so that when i access a key that's nil that it creates it
<apeiros> aewffwea: how do you define that term?
metalic has joined #ruby
pontiki has joined #ruby
<ebonics> but i don't want all the code in the entire library to have that functionality
subtwo has joined #ruby
<aewffwea> apeiros: A multimethod chooses which method to use for answering a message based on the type of the receiver plus all the parameters
gambl0re has quit [Ping timeout: 256 seconds]
jobewan has joined #ruby
Peetooshock has quit [Quit: Leaving]
<pontiki> hi
<aewffwea> (String, Int, Int) vs (String, Int, String) vs (Int, Int, Int) may all go to diffeernt methods
<apeiros> aewffwea: ruby only considers the receiver. never the parameters. so no, by that definition, it doesn't.
Peetooshock has joined #ruby
Peetooshock has quit [Changing host]
Peetooshock has joined #ruby
moeabdol has joined #ruby
chipotle has quit [Quit: cheerio]
<aewffwea> apeiros: You could extend ruby to support multimethods
<apeiros> aewffwea: it'd still not be ruby, the language, which supports it.
bashusr has joined #ruby
<aewffwea> apeiros: Who cares?
<ebonics> apeiros or aewffwea, could i make this a multimethod for [] https://dpaste.de/HOui
<ebonics> for example?
<apeiros> aewffwea: it makes your statement pointless.
<apeiros> so if you don't care - why make it in the first place?
<aewffwea> ebonics: I'm talking more on a theoretical level... If you want to implement something right now, I'd advise you not to use multimethods xD
jobewan has quit [Client Quit]
<ebonics> ic
<aewffwea> apeiros: I don't care that the language doesn't support it, and you'll need a library for it
<ebonics> having to call those methods is pretty redundant though
<aewffwea> ebonics: What problem are you trying to solve?
<ebonics> like if i call somehash[:somesymbol] = blah
<pontiki> please don't take my beautiful beautiful ruby and turn it into C++
m3t4l1c_s0ul has joined #ruby
<apeiros> ebonics: you define the [] method for your class by doing `class Foo; def [](arg1, …); …code… end; end`
ki0 has quit [Remote host closed the connection]
<ebonics> i want it to create an array or hash for :mysymbol
<ebonics> if it doesn't exist already
<aewffwea> what?
<apeiros> ebonics: and `somehash[arg1] = arg2` is the []= method with 2 args
lidenskap has joined #ruby
ki0 has joined #ruby
<ebonics> apeiros, ooo
moeabdol1 has joined #ruby
jottr_ has quit [Quit: WeeChat 1.1.1]
<ebonics> ok cool thanks
<apeiros> I'm not quite sure I understand "i want it to create an array or hash for :mysymbol"
barkerd427 is now known as zz_barkerd427
ebernhardson has left #ruby [#ruby]
disgrntld has quit [Quit: Leaving.]
<ebonics> apeiros, when i access an element that doesnt exist, i want it to create it
<apeiros> ebonics: also the convention is that _var means the variable is not used.
<ebonics> o
<apeiros> i.e. don't call your local variables _foo if you actually use it
<ebonics> ok
lkba has quit [Ping timeout: 272 seconds]
<apeiros> ebonics: hash[key] ||= value
<ebonics> .
<apeiros> note that it will override an existing nil or false value
<ebonics> o
jobewan has joined #ruby
<apeiros> if you don't want that, you have to test for existence explicitly: hash[key] = value unless hash.has_key?(key)
jobewan has quit [Client Quit]
<ebonics> apeiros, that's what i want to add into the operator
lkba has joined #ruby
<apeiros> also note that that behavior depends on using a Hash with nil as default.
jobewan has joined #ruby
<apeiros> ebonics: well then, have fun coding :)
<zenspider> (or false)
moeabdol has quit [Ping timeout: 272 seconds]
<apeiros> moin zenspider
<ebonics> wait can i "overload" ||=
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<apeiros> redefine
metalic has quit [Ping timeout: 240 seconds]
<apeiros> or define
<apeiros> and no, ||= is syntax sugar
<ebonics> ok
<apeiros> a ||= b expands to a || a = b
<zenspider> 'lo apeiros
<apeiros> and foo[arg1] ||= arg2 expands to foo[arg1] || foo[arg1] = arg2
<apeiros> so the methods you need for ||= with [] are [] and []=
<ebonics> honestly ruby is pretty dope
<ebonics> i gave it too little respect before
<ebonics> i'm not the biggest fan of scripting languages
ki0 has quit [Ping timeout: 256 seconds]
moeabdol1 has quit [Ping timeout: 240 seconds]
<zenspider> define "scripting language"
jobewan has quit [Client Quit]
<apeiros> <3 urbandict
<apeiros> helps with keeping up with slang…
<ebonics> non-compiled languages
<apeiros> ebonics: like C?
<apeiros> because you know, there are C interpreters…
lidenskap has quit [Remote host closed the connection]
<ebonics> ok well i don't use those lol
<apeiros> also there are compiled versions of ruby. even without counting jruby which compiles to java byte code…
that1guy has joined #ruby
<ebonics> i'm not tyring to get into semantics. plus i know you can compile ruby to java bytecode
jobewan has joined #ruby
<ebonics> you know what i'm saying though
jobewan has quit [Client Quit]
<apeiros> ebonics: yes. and we tell you it's a flawed view.
jobewan has joined #ruby
<apeiros> compiled/interpreted is not a property of the language
<pontiki> never want to argue of the meaning of things....
<pontiki> then we can call pretend we understand
<aewffwea> i'm not tyring to get into semantics. plus i know you can compile ruby to java bytecode ---> Is that actually a thing?
<aewffwea> I though JRuby was an interpreter
<ebonics> it is, but it's compiled to bytecode
<ebonics> to run on the jvm
<weaksauce> java runs on java bytecode
msgodf has joined #ruby
<aewffwea> ebonics: But does Ruby actually run on Java Bytecode? Or does ruby run on the JRuby interpreter which runs on java bytecode?
<aewffwea> it's not thes ame
<ebonics> afaik it gets compiled at runtime to actual btyecode and gets executed directly on the jvm
<ebonics> but i'm not 100% that was just my interpretation
<apeiros> you can ask headius over in #ruby-lang
that1guy has quit [Client Quit]
<ebonics> i've heard arguments that using jruby speeds up your code
<ebonics> so i assume it does get compiled, else the ruby interpreter would be faster since it's running at a lower level
<apeiros> for code which runs more than just a couple of seconds, jruby is quite probably faster
<ebonics> you mean because of JIT
<ebonics> that could be the reason
<apeiros> more because of java having quite a long time to boot
<apeiros> or jvm rather
<ebonics> the boot time is typically omitted from benchmarks
<ebonics> it's not really a fair comparison that way. and you can use the jvm as a server to avoid that
jobewan has quit [Quit: leaving]
<ebonics> not saying im advocating java, but yeah
<apeiros> ebonics: that's bollocks
jackjackdripper1 has joined #ruby
<apeiros> it's pointless if your benchmark says it's the fastest when stuff like `git commit` takes 10s…
duderonomy has quit [Ping timeout: 256 seconds]
qwertme has joined #ruby
jobewan has joined #ruby
<Eiam> anyone use the Naught gem?
<ebonics> apeiros, you can just run the jvm as a server and not have that overhead
<Eiam> was just reading through the readme
<ebonics> so it's not really bollocks.
<apeiros> ebonics: does that now work with any jvm based program?
<ebonics> not out of the box afaik
<ebonics> but it's simple to do yourself
<apeiros> ebonics: or do you need to start an individual jvm per program? also how about required jvm versions?
jackjackdripper has quit [Read error: Connection reset by peer]
<apeiros> well, then I'll still call it bollocks :)
<ebonics> you wouldnt need to run a jvm per program
<ebonics> apeiros, it's like VERY VERY trivial to do yourself
<ebonics> and it might already be a thing, i just don't know
<ebonics> there's also some other techniques like pre-booting depending on use case
<ebonics> either way it's not a fair comparison of "speed" if you include java's boot time
vikaton has quit [Quit: Connection closed for inactivity]
<ebonics> typically it's omitted as i said
tuelz has quit [Ping timeout: 264 seconds]
jackjackdripper has joined #ruby
hobodave has quit [Quit: Computer has gone to sleep.]
jackjackdripper1 has quit [Read error: Connection reset by peer]
jenrzzz_ has quit [Ping timeout: 240 seconds]
einarj_ has joined #ruby
<ebonics> the only reaosns i could see jruby being faster than normal ruby is: a) the ruby gets compiled directly to bytecode or b) JIT
<apeiros> ebonics: like in everything, context matters. and I stand by that. if you want to know how your long running code performs - of course you take out boot time. if you want to know how your 1s running programm will do, of course you will include it.
einarj has quit [Ping timeout: 255 seconds]
jenrzzz has joined #ruby
havenwood has quit []
<ebonics> apeiros, the context was "is jruby faster than ruby", you implied it would probably be faster after the boot time was negligible
icebourg has quit []
<ebonics> my statement was talking about processing time, of course
<apeiros> 00:28 headius: aewffwea: JRuby has an interpreter written in Java and a JIT that converts hot Ruby code into JVM bytecode
<apeiros> over from #ruby-lang
<ebonics> so are there tools to do the compilation statically
bruno- has quit [Quit: Lost terminal]
<apeiros> macruby and rubymotion compile ruby
<ebonics> ic
<apeiros> I think there are other compilers
bruno- has joined #ruby
that1guy has joined #ruby
<ebonics> pretty cute
<apeiros> I'm not sure about how much of ruby's syntax each can actually compile
<ebonics> i'm not sure of the benefit though
<apeiros> rubymotion afaik has limits for legal reasons already.
<ebonics> apeiros, pretty sure jruby itself handles everything
<ebonics> if you cared you could probbaly just hook the internal compiler it uses and dump the bytecode
<ebonics> would be decent for eliminating some overhead anyway
<ebonics> i think if you're using ruby you already don't care about speed though so it's not really important imo
<apeiros> I wouldn't wonder if jruby already created cache files for that
tjbiddle has quit [Quit: tjbiddle]
<apeiros> but as said, headius over in #ruby-lang will know all that
PrincessAww is now known as Aww
jobewan has quit [Quit: leaving]
rgb-one has quit [Quit: rgb-one]
jobewan has joined #ruby
<ebonics> i wonder if there's native compilers for ruby
rodfersou has joined #ruby
<ebonics> i would seriously consider ruby if that were possible
rodfersou has quit [Client Quit]
rodfersou has joined #ruby
zz_barkerd427 is now known as barkerd427
startupality has quit [Quit: startupality]
dfinninger has quit [Remote host closed the connection]
gojira_ has quit [Remote host closed the connection]
that1guy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Cust0sL1men has joined #ruby
startupality has joined #ruby
Ropeney has joined #ruby
snath has quit [Ping timeout: 256 seconds]
<ebonics> apeiros, i dont understand this redefining implementation
<ebonics> can i redefine [] for a specific method
jobewan has quit [Quit: leaving]
<apeiros> um, [] is a method
ujjain has quit [Ping timeout: 250 seconds]
<apeiros> and you define methods on classes, not on methods
<ebonics> method1()[blah]
<apeiros> so not sure what you're asking for…
kirun has quit [Quit: Client exiting]
<ebonics> can i redefine [] for method1
<apeiros> ok, you misunderstand something there
mary5030_ has joined #ruby
<apeiros> method1() returns an object
<apeiros> and you call [] on that object, not on method1
<ebonics> oh
<ebonics> so basically i can subclass Hash
<ebonics> and then override the [] method?
<apeiros> you could. it's generally a bad idea to subclass classes you don't own, though.
<ebonics> really
<ebonics> what the hell lol
<ebonics> how's that a bad idea
<aewffwea> <apeiros> you could. it's generally a bad idea to subclass classes you don't own, though. ---> why?
failshell has joined #ruby
<zenspider> ebonics: how is it a good idea?
<apeiros> aewffwea: because you have no control over changes
<aewffwea> apeiros: That doesn't matter... The changes should be reasonable... Assuming that class is meant to be subclasses
<aewffwea> d
<apeiros> aewffwea: also chances are that you miss stuff even without changes happening
<apeiros> even reasonable changes can break your subclasses.
<ebonics> zenspider, i'm not saying it's a good idea
<ebonics> i'm asking why it's a bad idea
Deele has quit [Ping timeout: 256 seconds]
<ebonics> i didn't make the claim that it's a good idea :|
that1guy has joined #ruby
<ebonics> reading comprehension son
<adaedra> son
<apeiros> and Hash/Array are not specifically built to be subclassed. such classes are usually called *Abstract or *Base
* baweaver waits for ban hammer for mouthyness
<aewffwea> apeiros: I agree with that statement... You should basically never subclass something that it's not meant to be subclassed....
<apeiros> that's not my statement, though
ujjain has joined #ruby
ujjain has quit [Changing host]
ujjain has joined #ruby
mary5030 has quit [Ping timeout: 264 seconds]
<apeiros> my statement is: don't subclass classes you don't own.
cosmicfires has joined #ruby
<aewffwea> apeiros: My statement is: Don't subclass classes that are not meant to be subclassed....
<ebonics> it's weird how you can still do it if you're not meant to
<cosmicfires> does ruby come with getopt() or do I have to install a gem?
<apeiros> see, so we don't actually agree :)
<ebonics> seems like you should have a final keyword in ruberino
<aewffwea> apeiros: We agree only on a subset
<apeiros> cosmicfires: there's optparse and another option parsers. check the stdlib.
<cosmicfires> thanks
diegoaguilar has quit [Remote host closed the connection]
<apeiros> ebonics: it's not "you're not meant to"
<apeiros> and ruby doesn't handhold the developers. and that's good.
mary5030_ has quit [Ping timeout: 256 seconds]
<apeiros> just because it's *IMO* not a good idea doesn't mean that a) it's *never* a good idea or b) that you share that opinion
<ebonics> right, but if something in the standard library is going to break by subclassing it then there should be restrictions imo
CloCkWeRX has left #ruby [#ruby]
<shadoi1> "not a good idea" != "is going to break"
<ebonics> you say not a good idea because the behaviour isn't defined
snockerton has quit [Quit: Leaving.]
bruno- has quit [Quit: Lost terminal]
failshell has quit [Ping timeout: 265 seconds]
<ebonics> which means it could break, which means it's unsafe
<apeiros> ebonics: stdlib is all owned by "ruby". so a subclass there is not a subclass of a class which is not owned by it.
paulcsmith has joined #ruby
bruno- has joined #ruby
<apeiros> the behavior is defined. I say you have no control over changes.
<ebonics> i'm not understanding the distinction
<ebonics> i'm too new to the language probably
<apeiros> well, see, lets say you subclass Hash
<apeiros> there's a ton of methods on Hash which return a Hash
<apeiros> now you define those methods in your subclass too, to make them return instances of your class
<apeiros> sane, right?
<ebonics> yeah
<apeiros> now a new version of ruby is released which adds a new method to Hash
<ebonics> although i don't think you would need to do that
<ebonics> unless i don't understand properly
sargas has quit [Quit: Leaving]
<apeiros> your subclass there will return a Hash, as your implementation does not define it.
<ebonics> if you have an instance of the subclass then won't you still have all the same access to your subclass when the super class returns itself
vickleton has quit [Quit: Ex-Chat]
<apeiros> who says it returns itself?
<apeiros> many methods return new hashes. take select/reject
Guest1421 has joined #ruby
<ebonics> if it returns a new instance then i guess you would need to define that
<apeiros> they don't return self. they return a new copy of self with elements removed.
<ebonics> i see
bigmac has quit [Ping timeout: 240 seconds]
baweaver has quit [Remote host closed the connection]
<ebonics> so i guess it's better to just wrap it
<apeiros> correct
<apeiros> that's the suggested approach
that1guy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Contigi777 has quit [Quit: Leaving]
<ebonics> so much code required though
<ebonics> ugh
KC9YDN has joined #ruby
<ebonics> i think for my use case i'm going to just subclass it
<ebonics> but i understand what you mean
<apeiros> ebonics: not necessarily. stuff like Forwardable help a ton
<apeiros> also for Array/Hash I think there are gems helping with wrapping them.
<apeiros> personally I never had the need, though
einarj_ has quit [Remote host closed the connection]
<apeiros> mostly because I believe in SRP. a class should focus on its task. Hash/Array are rather unfocused classes (which is ok, but should IMO be the exception)
m3t4l1c_s0ul has quit [Quit: Leaving]
<ebonics> the only reason i want to extend their functionality is because im lazy
harlen has joined #ruby
<ebonics> the fact that you can have your own [] implementation is pretty cool to me
<apeiros> you can also modify the existing class or modify a single instance
<ebonics> how
<apeiros> for the former, google for "ruby refinements". for the latter: define the method in a module and use Object#extend
baweaver has joined #ruby
<apeiros> >> module WeirdUpcase; def upcase; chars.map { |c| rand(2).zero? ? c : c.upcase }.join(""); end; end; a = "hello"; b = "world"; a.extend WeirdUpcase; [a.upcase, b.upcase]
<ruboto> apeiros # => ["HeLLO", "WORLD"] (https://eval.in/335619)
that1guy has joined #ruby
<Eiam> does anyone integrate NullObject into their actual code?
<ebonics> that's hot
<Eiam> conceptually its nice, and im amused at it offering Maybe and Just
<crowell> null object is hot?
<ebonics> nah that code apeiros showed
<apeiros> Eiam: no, but to make a coworker happy I once changed nil:NilClass error to NullPointerException :D
juanpablo____ has quit [Quit: (null)]
<Eiam> apeiros: why don't you use it?
<apeiros> the pattern?
<Eiam> I'm about to sit down and refactor a bunch of code that I was prototyping out
<Eiam> yep
<Eiam> and just debating which way I want to go with it
juanpablo____ has joined #ruby
paulcsmith has quit [Ping timeout: 256 seconds]
juanpablo____ has quit [Client Quit]
<apeiros> I find the pattern interesting actually. maybe I even used it without noticing. not using it - probably because I don't think about it / doesn't occur to me to use it in situations where it might be used.
juanpablo____ has joined #ruby
toretore has quit [Quit: This computer has gone to sleep]
<ebonics> apeiros, can i just do liek
mistermocha has quit [Remote host closed the connection]
<ebonics> this.extend Module; in my class' constructor
tuelz has joined #ruby
<ebonics> or self.extend
<ebonics> leme see
<apeiros> sure. but if you use it in the constructor, why not just add those methods to the class?
babykosh has quit [Read error: Connection reset by peer]
umby24|offline is now known as umby24
thatslifeson has quit [Remote host closed the connection]
<ebonics> yeah that's redundant
<ebonics> nvm
xxneolithicxx has quit [Ping timeout: 255 seconds]
juanpablo_____ has joined #ruby
juanpablo____ has quit [Read error: Connection reset by peer]
baweaver has quit [Remote host closed the connection]
<shevy> NullPointerException
<shevy> that makes people happy?
<apeiros> shevy: seasoned java developer.
doodlehaus has joined #ruby
ghr has quit [Ping timeout: 244 seconds]
<shevy> hehe
doodlehaus has quit [Read error: Connection reset by peer]
doodlehaus has joined #ruby
nini1294 has joined #ruby
that1guy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
juanpablo_____ has quit [Ping timeout: 246 seconds]
<adaedra> NullPointerExceptionFactory
roolo has quit [Remote host closed the connection]
longfeet has joined #ruby
doodleha_ has joined #ruby
wallerdev has quit [Quit: wallerdev]
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
doodlehaus has quit [Ping timeout: 252 seconds]
jenrzzz has quit [Ping timeout: 244 seconds]
<ebonics> apeiros, do i need to call self.[] key, value if i call extend on it? or does it already get called
jenrzzz has joined #ruby
<apeiros> ebonics: I don't follow. maybe gist actual code?
tuelz has quit [Ping timeout: 240 seconds]
<ebonics> i dont even know if its going to work
<ebonics> cause i have to change my implementation
<ebonics> but 1 sec
<Radar> lol if you think explaining a problem with words is as useful as explaining it with code
<ebonics> not sure when i said i think that
xcyclist has quit [Quit: Page closed]
<ebonics> apeiros, you're prob gonna cringe or this code won't even work
fschuindt has joined #ruby
<ebonics> but lol 1 sec
workmad3 has joined #ruby
<apeiros> ebonics: I cringe at almost all foreign code. so don't let that stop you :-p
<ebonics> apeiros, https://dpaste.de/pxUM
<apeiros> ebonics: [] with key & value?
<apeiros> did you want to define []= instead?
<Radar> ^
<apeiros> you'd call it like this: `self[key] = value`
<apeiros> (that's the []= method)
<apeiros> actually…
<apeiros> you'd call super(key, value)
<apeiros> if you called self[key] = value, you'd just create an infinite recursion
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<ebonics> wait so it doesnt get injected
<ebonics> it "subclasses" it on a per method basis?
<apeiros> extend uses inheritance chain, yes
<apeiros> and no, not on a per method basis. as said, methods are on objects.
<apeiros> the implication is, that individual objects can have an inheritance chain
<apeiros> the method as-is is relatively pointless btw.
<apeiros> the value you assign to the key is overridden by the value passed into the method
Fire-Dragon-DoL has joined #ruby
that1guy has joined #ruby
<ebonics> so like this apeiros https://dpaste.de/egLQ
workmad3 has quit [Ping timeout: 255 seconds]
noname has joined #ruby
<apeiros> no
<apeiros> super(key, value)
<ebonics> :|
<apeiros> as I said
<ebonics> ohh
<apeiros> or super(key, {})
<ebonics> wait wot
<ebonics> OH
<apeiros> super just calls the method of the same name on the next class in the inheritance chain
<apeiros> also, I'm reasonably sure you want `def []=(key, value)`, not `def [](key, value)`
<ebonics> arent the first two lines redundant then
doodleha_ has quit [Remote host closed the connection]
<ebonics> if i can just do that
<ebonics> wtf
segfalt_ has joined #ruby
segfalt has quit [Ping timeout: 250 seconds]
segfalt_ is now known as segfalt
jackjackdripper has quit [Quit: Leaving.]
<apeiros> that's what I said - your method at the moment is pointless
<ebonics> apeiros, i want to define for this: myhash[mykey] = myvalue;
<ebonics> that's []= ?
<apeiros> hash[key] = value # will always work, key does not need to be set
<apeiros> ebonics: yes
<ebonics> that doesn't work
DynamicMetaFlow has joined #ruby
<apeiros> >> h = {}; h[:new_key] = "new value"; h
<ruboto> apeiros # => {:new_key=>"new value"} (https://eval.in/335667)
<apeiros> yes, yes, that does work
<ebonics> yeah on the first one
<apeiros> >> module Upassign; def []=(key, value); super(key, value.upcase); end; end; h = {}; h.extend Upassign; h[:k] = "new value"; h
<ruboto> apeiros # => {:k=>"NEW VALUE"} (https://eval.in/335668)
<apeiros> and super works too
Zai00 has quit [Quit: Zai00]
<ebonics> >> h = {}; h[:h1][:h2] = 'new value'; h
<ruboto> ebonics # => undefined method `[]=' for nil:NilClass (NoMethodError) ...check link for more (https://eval.in/335669)
<apeiros> ebonics: um… that thing about "you call methods on the returned object" matters. really :)
CloCkWeRX has joined #ruby
<apeiros> h[:h1][:h2] = 'value' # <-- which methods are called and on what?
Hijiri has joined #ruby
<apeiros> hash[key] --> syntax sugar for hash.[](key)
<ebonics> h returns a hash, [] returns a value (nil in this case)
<apeiros> hash[key] = value --> syntax sugar for hash.[]=(key, value)
<apeiros> ebonics: yes, you call [] on h, not []=
doodlehaus has joined #ruby
<apeiros> you call []= on the *result* of h's []
<ebonics> so overloading []= and instantiating the hash should fix it, no?
baweaver has joined #ruby
<ebonics> i mean redefining
<adaedra> what you're doing is h.[](:h1).[]=(:h2, 'new value')
<apeiros> ebonics: `h[key]` in `h[key][k2] = v` will never see v
<apeiros> only []= see's v
<apeiros> *sees
<ebonics> yeah i understand
<apeiros> so your logic of changing the returned value depending on the assigned value won't work
jenrzzz has quit [Ping timeout: 244 seconds]
<apeiros> you can make h[key] always return a hash. there are easier ways to do that, though:
<ebonics> the initial [] is going to always return a hash
baweaver has quit [Remote host closed the connection]
<apeiros> >> deep_hash = Hash.new { |h,k| h[k] = Hash.new(&h.default_proc) }; h[:a][:b][:c] = "weee!"; h
<ruboto> apeiros # => undefined local variable or method `h' for main:Object (NameError) ...check link for more (https://eval.in/335670)
<apeiros> grah
nini1294 has quit [Ping timeout: 272 seconds]
<ebonics> dafuq
<apeiros> >> deep_hash = Hash.new { |h,k| h[k] = Hash.new(&h.default_proc) }; deep_hash[:a][:b][:c] = "weee!"; deep_hash
<ruboto> apeiros # => {:a=>{:b=>{:c=>"weee!"}}} (https://eval.in/335671)
<apeiros> this comes with a draw-back - looking up a non-existent key will create it:
<apeiros> >> deep_hash = Hash.new { |h,k| h[k] = Hash.new(&h.default_proc) }; deep_hash[:a]
<ruboto> apeiros # => {} (https://eval.in/335672)
<ebonics> that's what i want
snath has joined #ruby
<apeiros> hm, not what I wanted to show, retry :)
<apeiros> >> deep_hash = Hash.new { |h,k| h[k] = Hash.new(&h.default_proc) }; deep_hash[:a]; deep_hash
bruno- has quit [Quit: Lost terminal]
<ruboto> apeiros # => {:a=>{}} (https://eval.in/335673)
henrikhodne has quit [Ping timeout: 252 seconds]
<ebonics> that's literally exactly what i want hehe, except it need sto work recursively
bruno- has joined #ruby
<ebonics> and with arrays too
<apeiros> ||= will not work with that, as every key will always have a value. only .has_key? will still work.
<apeiros> well, as demonstrated - it works recursively.
<apeiros> with arrays, that does not exist, though.
nobitano_ has quit [Remote host closed the connection]
<ebonics> i don't understand what tht syntax does
<ebonics> is it a closure
<apeiros> `Hash.new { |h,k| h[k] = Hash.new(&h.default_proc) }` is what you don't understand?
<ebonics> yeah
MatthewsFace[SEA has quit [Remote host closed the connection]
<apeiros> you know what a block is in ruby?
<ebonics> i will in a second
Perdomo has joined #ruby
that1guy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<apeiros> foo { |arg1, arg2, …| code } # the { … } part is a block passed to foo
<apeiros> a block is a piece of code, passed as a (special) argument to a method. the method can invoke the block or store it.
nobitano_ has joined #ruby
<apeiros> Hash.new takes a block to define its default value:
jerius has joined #ruby
nobitano_ has quit [Remote host closed the connection]
<apeiros> >> h = Hash.new { Time.now }; a = h[:a]; [a, h]
<ruboto> apeiros # => [2015-05-07 23:44:13 +0000, {}] (https://eval.in/335674)
<ebonics> ok yeah cool it's a closure
<apeiros> as you can see, the hash remains empty
<ebonics> neat how you can call it on new
<apeiros> the block is invoked with 2 args - the hash itself and the missing key. so you can add the missing key and return the value:
<ebonics> so hash.new internally has to support blocks right
blackmesa has quit [Ping timeout: 244 seconds]
<apeiros> >> h = Hash.new { |h,k| h[k] = Time.now }; a = h[:a]; [a, h]
<ruboto> apeiros # => [2015-05-07 23:45:12 +0000, {:a=>2015-05-07 23:45:12 +0000}] (https://eval.in/335675)
<apeiros> define "support". yes, it has to actively do something with the block. what it does with it is store it away and call it whenever you use [] with a missing key.
<ebonics> yeh
malcolmva has quit [Ping timeout: 255 seconds]
<ebonics> and it wont work with arrays because array class doesnt support blocks
<ebonics> ?
<apeiros> Array.new does take a block but does something differently with it
<apeiros> Array doesn't have a concept of missing key/default value
<ebonics> it seems like there's a damn lot of gotchas with this language
<apeiros> not really
phoo1234567 has quit [Quit: Leaving]
<ebonics> that or you're expected to read the source code lol
<apeiros> most stuff which matters follows from a relatively small set of knowledge.
<apeiros> but it takes a bit to figure that small set out and understand how actually all comes from that.
<ebonics> ic
<ebonics> apeiros, thanks for your help :) you're awesome
<apeiros> heh, thanks
longfeet has quit [Ping timeout: 255 seconds]
<ebonics> i think i figured out how to do it though apeiros with extend
attlasbot has joined #ruby
<ebonics> cause i sorta need it to work with arrays
moeabdol1 has joined #ruby
<apeiros> the final bit to the story of `Hash.new { |h,k| h[k] = Hash.new(&h.default_proc) }` - Hash#default_proc returns that block you passed to Hash.new
nobitanobi has joined #ruby
<apeiros> so with Hash.new(&h.default_proc) we create a hash which uses the same default proc.
<apeiros> that's how it becomes recursive.
<ebonics> yeah
<ebonics> i see
danzilio has quit [Quit: Baiii!]
<apeiros> the & there is syntax to instruct ruby to treat the argument as a block
<ebonics> shouldn't this work apeiros https://dpaste.de/kcpZ
enebo has quit [Quit: enebo]
<apeiros> since h.default_proc returns an object (and blocks aren't objects)
<ebonics> blocks arent objects?
DynamicMetaFlow has quit [Remote host closed the connection]
<apeiros> no. their object equivalent is a Proc instance
rahult has joined #ruby
nobitanobi has quit [Remote host closed the connection]
rahult is now known as rahult_
<apeiros> and with & you can convert from/to block/proc
rahult_ is now known as rahult
<ebonics> ah ic
<ebonics> and yield won't work on it when its a proc?
<apeiros> yield will always call the block passed to a method. even if you "capture" it as a proc using def foo(&block_arg)
<ebonics> so whats the point of using & at all
<apeiros> but yield won't work if you pass a proc as a normal argument, e.g. `def foo(arg); yield; end; foo(proc { "hi" })`
<ebonics> ah ok
lidenskap has joined #ruby
<apeiros> well, that recursive hash is an example for why to use & :)
<adaedra> and with & you can store it for later
freerobby has quit [Quit: Leaving.]
<adaedra> or pass it again
<adaedra> you get the proc as a variable, when with yield you can just call
moeabdol1 has quit [Ping timeout: 256 seconds]
<apeiros> ebonics: `class Hash; def initialize(&default_proc); @default_proc = default_proc; end; def [](key); if has_key?(key); fetch(key); else; @default_proc.call(self, key); end; end`
doodlehaus has quit [Remote host closed the connection]
jenrzzz has joined #ruby
<apeiros> that's an approximation of how Hash's new + [] work
<apeiros> (probably copy & paste it and write out the ; as newlines)
<apeiros> re 01:50 ebonics: shouldn't this work apeiros https://dpaste.de/kcpZ
<apeiros> define "work"
segfalt has quit [Quit: segfalt]
<ebonics> it's pretty funny since you're probably teaching me some hgiher level language cosntructs
<ebonics> and i dont even know wtf @ does
jeramy_s has joined #ruby
Astrologos_ has joined #ruby
<ebonics> work as in have the functionality i need lol
<apeiros> your []= method is still pointless as super(key,value) will override the value set with previous two super() calls
wallerdev has joined #ruby
<apeiros> and the [] method misses a space between def and [], and for Hash it only takes a single argument
tuelz has joined #ruby
michael_mbp has quit [Excess Flood]
<adaedra> @ is a very basic thing in ruby
<apeiros> and for Array it takes 1-2 arguments, but the second argument isn't value
nobitanobi has joined #ruby
michael_mbp has joined #ruby
thiagovsk has quit [Quit: Connection closed for inactivity]
<apeiros> @ on itself does nothing. it's part of the name of instance variables. and instance variables are those which belong to a specific object.
<ebonics> oh it's a shortcode for self?
<apeiros> @foo = 12 is similar to this.foo = 12 in other languages (not necessarily the same, though)
uptownhr has quit [Quit: uptownhr]
<ebonics> coolio
<apeiros> it's not really short for self. self.foo = 12 in ruby calls the method foo=
<apeiros> whereas @foo = 12 does not call a method. it only assigns a variable.
duderonomy has joined #ruby
marr has quit [Ping timeout: 244 seconds]
dorei has quit [Ping timeout: 272 seconds]
malcolmva has joined #ruby
nobitanobi has quit [Remote host closed the connection]
<ebonics> ah ok
pontiki has quit [Ping timeout: 264 seconds]
nobitanobi has joined #ruby
Deele has joined #ruby
<apeiros> also the method foo= might do anything. it might even not assign to @foo at all in its code :)