havenwood changed the topic of #ruby to: Rules & more: http://ruby-community.com || Ruby 2.2.3; 2.1.7; 2.0.0-p647: https://ruby-lang.org || Paste >3 lines of text on https://gist.github.com || log @ http://irclog.whitequark.org/ruby/
RegulationD has quit [Remote host closed the connection]
roshanavand has joined #ruby
finisherr has joined #ruby
hooker has joined #ruby
grotewold has joined #ruby
replay has quit [Ping timeout: 260 seconds]
shazaum_ has joined #ruby
roshanavand has quit [Ping timeout: 250 seconds]
Xeago has joined #ruby
peteyg_ has quit [Quit: leaving]
sepp2k1 has quit [Read error: Connection reset by peer]
fmcgeough has joined #ruby
fmcgeough has quit [Client Quit]
maloik has joined #ruby
SleepySensei has joined #ruby
peteyg has joined #ruby
Xeago has quit [Remote host closed the connection]
calderonroberto has quit [Ping timeout: 250 seconds]
maloik has quit [Ping timeout: 260 seconds]
gigetoo has quit [Ping timeout: 260 seconds]
pjs has joined #ruby
Xeago has joined #ruby
jhn has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
gigetoo has joined #ruby
<pjs> Hey all.. Trying to update redmine from 2.6-stable to 3.0-stable. Doing bundle update gives me compat errors with json module, which isn't installed. See output & gem list here:
Xeago has quit [Remote host closed the connection]
Xeago has joined #ruby
<jhass> isn't there a #redmine?
<pjs> any ideas? I'm not really a Ruby guy so beyond the basics, I'm a little lost.
hooker has quit [Quit: Lost terminal]
<jhass> I'm tempted to tell you let them deal with their broken bundler setup
<pjs> jhass, yes, but this isn't necessarily redmine specific. I did ask there
astrobun_ has joined #ruby
astrobunny has quit [Read error: Connection reset by peer]
<zenspider> pjs: you're listing json in your gemfile and other stuff is depending on a different version.
<jhass> it kinda is in the sense that you as a user shouldn't need to deal with such issues, so if redmine doesn't get its act together to hide them from you, it's kinda their problem to explain them to you
kies has joined #ruby
<sfmk> So I'm trying to define a class method (publicKey) within class (Diffie) https://gist.github.com/aburgd/79c03a1534633882ba58
<pjs> zenspider I see.. Gemfile.lock has json 1.6.5.. is the .lock file safe to remove?
<jhass> pjs: no, in your Gemfile
<jhass> pjs: bundle update ignores the lock already
<zenspider> if you're doing a bundle update, the .lock file is being regenerated anyways, so yes... but your Gemfile is the source of the problem
<pjs> jhass, Gotcha. Well, json isn't mentioned at all in the Gemfile.
stannard has joined #ruby
<jhass> sfmk: you didn't show the code that's throwing the error. Look at the error message, it has a file and line number
<jhass> pjs: what's your bundler version?
tomchapin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<pjs> jhass 1.9.8
tw1sted has quit [Changing host]
tw1sted has joined #ruby
<jhass> we're at 1.10.6 and it had some resolver improvements, give updating bundler a shot
<ruboto> sfmk, we in #ruby do not like irccloud.com, I reposted your paste to gist for you: https://gist.github.com/02a8647f6886fff51fc1
<ruboto> irccloud.com has no syntax highlighting, distracting formatting and loads slowly for most.
roshanavand has joined #ruby
howdoicomputer has joined #ruby
<pjs> jhass, thx.. trying now
<jhass> sfmk: well, you set Diffie to nil, used it, then defined the class
azgil has quit [Quit: Leaving]
<jhass> sfmk: ruby doesn't prescan the file and reads class definitions first, it's run in order
SleepySensei has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<pjs> jhass, same thing :-/
IanV0rn2341 has joined #ruby
dlitvak has joined #ruby
Outlastsheep has joined #ruby
stannard has quit [Ping timeout: 260 seconds]
<jhass> pjs: different output for running `bundle update json`?
freerobby has joined #ruby
<sfmk> jhass: Ah, alright. Well the error I was DHKE.rb:13:in `<main>': uninitialized constant Diffie (NameError)
<pjs> jhass yes, http://dpaste.com/18FFSRC
<sfmk> *error I was thrown
<jhass> sfmk: since you call your class before you define it
<zenspider> jhass: I doubt the problem is the resolver... the update past 1.9 seems mostly annoying to teams at this oint
<zenspider> point
dimik has quit [Ping timeout: 260 seconds]
patdohere has joined #ruby
roshanavand has quit [Ping timeout: 250 seconds]
<jhass> zenspider: yeah, we had a fight with them over the whole writing the bundler version to the lock thing
tsou has joined #ruby
<jhass> zenspider: 1.10 has optional groups though <3
Gnut has quit [Ping timeout: 260 seconds]
IanV0rn2341 has quit [Client Quit]
<pjs> could the issue be that active support version 3.2.22 and 3.2.21 are already installed and that's an issue for the 4.x.x versions? (just thinking out loud)
<jhass> pjs: let's try something different. copy your Gemfile somewhere so you have a backup, get a new Gemfile (and Gemfile.lock if they provide one) from the upstream git or a release tarball or something. Do the minimal mess you have to do for redmine to it and run bundle install
<jhass> pjs: no, it has nothing to do with which gems are installed or not
<jhass> that's completely irrelevant really
<mg^> last time I installed Redmine, I grabbed a docker container and used that instead...
arthurnn has quit [Ping timeout: 260 seconds]
maloik has joined #ruby
patdohere has quit [Ping timeout: 260 seconds]
jottr_ has quit [Quit: WeeChat 1.3]
<jbrhbr> Ox0dea: well, i either missed it in the docs or it isn't documented, but i dug through the code and found that Pry has a truncated output option built-in, although it's not partial display, it's a more draconian approach
<jbrhbr> you just type 'change-inspector clipped' into the pry console
cwong_on_irc has quit [Quit: Leaving.]
spacemud has quit [Ping timeout: 260 seconds]
tubulife- has joined #ruby
<pjs> jhass, Just tried.. same thing. The Gemfile from the repo and the one locally were an exact match as well
<jhass> pjs: wat
<jhass> then they made a broken release or something
spacemud has joined #ruby
<jhass> really, go and complain to them to fix their shit
arthurnn has joined #ruby
<pjs> jhass, hah
<pjs> jhass, I'll def do that
Outlastsheep has quit [Quit: ZNC - http://znc.in]
<pjs> let me try jumping to 3.1-stable which is what I was going to do in the end anyway.. I just prefer stepping through major versions
<pjs> jhass yea, same thing. The 3.1 Gemfile is different than the 3.0 but only for specific gem versions (rails, pg, etc.)
maloik has quit [Ping timeout: 250 seconds]
<pjs> bundle install and bundle output provide the same error..
howdoicomputer has quit [Ping timeout: 245 seconds]
baweaver has quit [Remote host closed the connection]
<jhass> pjs: bundle is just a shorthand for running bundle install, it's the same command
<jhass> pjs: well, idk, I'd need some hands on at this point since I'm not familiar with redmine's dependency tree
hooker has joined #ruby
woven has joined #ruby
<jhass> which is why I'm saying that they let users deal with it at all is a huge fuck up
hooker has quit [Client Quit]
shanemcd has joined #ruby
casadei has joined #ruby
<pjs> jhass, ok thanks man.
devbug has quit [Read error: Connection reset by peer]
hxegon has quit [Ping timeout: 245 seconds]
skweek has joined #ruby
roshanavand has joined #ruby
<jbrhbr> Ox0dea: i can't figure out how to make this the default though :/
devbug has joined #ruby
cajone has quit [Remote host closed the connection]
Rickmasta has joined #ruby
roshanavand has quit [Ping timeout: 250 seconds]
diegoaguilar has quit [Remote host closed the connection]
cajone has joined #ruby
shanemcd_ has joined #ruby
casadei has quit [Remote host closed the connection]
shanemcd has quit [Read error: Connection reset by peer]
devbug has quit [Ping timeout: 260 seconds]
<sfmk> I switched the class and method definitions, and now I'm thrown a NoMethodErrorhttps://gist.github.com/aburgd/a76ee10ed393fa7b4f3a
<sfmk> Ah crap
dopie has quit [Quit: This computer has gone to sleep]
vikas027 has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
maloik has joined #ruby
<jhass> sfmk: so, you defined instance methods
<jhass> not class methods
<zenspider> sfmk: your line numbers or your code is lying
<sfmk> oh
<jhass> ?styleguide sfmk
<ruboto> sfmk, I don't know anything about styleguide
<jhass> eh
<jhass> ?styleguides sfmk
<ruboto> sfmk, here are three popular styleguides, you should read and follow at least one: https://github.com/styleguide/ruby https://github.com/bbatsov/ruby-style-guide https://github.com/thoughtbot/guides/tree/master/style/ruby
<zenspider> I'd tell you to look at line 43 to figure it out, but it is blank
<jhass> apeiros: I need my aliases :P
casadei has joined #ruby
<apeiros> jhass: remind me in ~3 weeks.
SleepySensei has joined #ruby
<zenspider> jhass: define styleguide to tell you it is styleguides :P
<sfmk> Ah, sorry, fixed that
<jhass> zenspider: I actually coded an alias feature for it, just not deployed :P
grotewold has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
symm- has quit [Ping timeout: 260 seconds]
<zenspider> sfmk: so, how do you fix your problem?
RegulationD has joined #ruby
<zenspider> what does the error message say and what hints do you get from line 43?
maloik has quit [Ping timeout: 250 seconds]
<sfmk> Well jhass mentioned that I made an instance method, so I need to figure out how to define a class method for publicKey
grotewold has joined #ruby
reaVer_ is now known as reaVer
vikas027 has quit [Read error: Connection reset by peer]
<sfmk> which would be http://dpaste.com/1HQ5M7E
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
finisherr has quit [Quit: finisherr]
_5moufl has quit [Ping timeout: 272 seconds]
<jhass> yup
<sfmk> awesome, thank you guys
RegulationD has quit [Ping timeout: 250 seconds]
<jhass> I gather this purely experimental/educational purposes and we don't need to do the don't actually use it for anything discussion?
weemsledeux has joined #ruby
minimalism has quit [Quit: leaving]
_5moufl has joined #ruby
htmldrum_ has joined #ruby
roshanavand has joined #ruby
CloCkWeRX has quit [Quit: Leaving.]
<sfmk> That's correct
CloCkWeRX has joined #ruby
<zenspider> haha
<zenspider> aka "please don't run your business on this"
<sfmk> It's weird how zenspider knew that's how I go through problems though
<zenspider> that's how _I_ go through problems. it works. well. you just need to learn ruby's peculiarities
<sfmk> Yeah, I'm learning three languages at once and it gets a little jumbled
<sfmk> I do not recommend it
htmldrum has quit [Ping timeout: 260 seconds]
<zenspider> it can be fun that way... when you're in information sponge mode, suck up everything you can
<zenspider> it doesn't last forever :)
<sfmk> haha, thanks for the tip
shanemcd has joined #ruby
roshanavand has quit [Ping timeout: 250 seconds]
CloCkWeRX has quit [Client Quit]
baweaver has joined #ruby
CloCkWeRX has joined #ruby
SleepySensei has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
babblebre has quit [Quit: Connection closed for inactivity]
reoring has joined #ruby
RobertBirnie has quit [Ping timeout: 245 seconds]
minimalism has joined #ruby
SleepySensei has joined #ruby
maloik has joined #ruby
<sfmk> Alright, so I've changed them to class methods, and when I puts the result of either method
<sfmk> It puts >> Share this with your contact: 4Share this with your contact:
<jhass> yes
<sfmk> I guess you need the gist huh
reoring has quit [Remote host closed the connection]
<jhass> well, tell me some about what the print and puts methods do
<zenspider> print doesn't do newlines. puts does
SleepySensei has quit [Client Quit]
<zenspider> oops. didn't read fast enough
nateberkopec has quit [Quit: Leaving...]
<zenspider> but it kinda doesn't matter, because of the way the methods are written
<zenspider> prints all over the place
Wsewolod has quit [Ping timeout: 260 seconds]
<jhass> that was where I was trying to lead them to :P
baweaver has quit [Remote host closed the connection]
s00pcan has quit [Ping timeout: 276 seconds]
<sfmk> well, what zenspider said
Xeago has quit [Remote host closed the connection]
<sfmk> https://gist.github.com/aburgd/a76ee10ed393fa7b4f3a but I guess I can eliminate the escape characters now
maloik has quit [Ping timeout: 250 seconds]
<sfmk> oh dang
<sfmk> I see what I did
s00pcan has joined #ruby
benlieb has quit [Quit: benlieb]
beast has joined #ruby
<sfmk> I had it print as part of the method, and had a puts in the if-elsif
<sfmk> aha, fixed it
<sfmk> I got rid of the puts in the method definition and now it's fine
AccordLTN has quit []
Wsewolod has joined #ruby
robbyoconnor has joined #ruby
stannard has joined #ruby
<sfmk> Thank you for your help jhass and zenspider
banister has joined #ruby
shazaum_ has quit [Quit: This computer has gone to sleep]
Dood_ has joined #ruby
nkwsy___1 has joined #ruby
arescorpio has joined #ruby
roshanavand has joined #ruby
psy has joined #ruby
stannard has quit [Ping timeout: 245 seconds]
baweaver has joined #ruby
calderonroberto has joined #ruby
jeremie_ has quit [Quit: ChatZilla 0.9.92 [Firefox 42.0/20151029151421]]
roshanavand has quit [Ping timeout: 250 seconds]
sfmk has left #ruby [#ruby]
jdawgaz has joined #ruby
baweaver has quit [Ping timeout: 260 seconds]
blackmesa has quit [Quit: WeeChat 1.3]
<pjs> jhass, *sigh* I'm an idiot. It was a plugin specifically calling for json 1.6.5. I didn't realize it read plugin Gemfiles as well.
<jhass> it's a stupid architecture for sure
calderonroberto has quit [Ping timeout: 250 seconds]
tvw has quit []
houhoulis has joined #ruby
Outlastsheep has joined #ruby
maloik has joined #ruby
pfg_ has quit []
pfg has joined #ruby
baweaver has joined #ruby
<pjs> jhass and zenspider - Thanks for your help. All is well now.
pjs has left #ruby [#ruby]
maloik has quit [Ping timeout: 250 seconds]
stannard has joined #ruby
jessemcgilallen has quit [Quit: jessemcgilallen]
Outlastsheep has quit [Quit: ZNC - http://znc.in]
TomPeed has joined #ruby
shanemcd_ has quit [Remote host closed the connection]
roshanavand has joined #ruby
dimik has joined #ruby
solenoids has quit [Ping timeout: 250 seconds]
stannard has quit [Ping timeout: 245 seconds]
banister has quit [Read error: Connection reset by peer]
roshanavand has quit [Ping timeout: 250 seconds]
psy has quit [Disconnected by services]
shanemcd_ has joined #ruby
TheHodge has quit [Quit: Connection closed for inactivity]
allcentury has quit [Ping timeout: 260 seconds]
maloik has joined #ruby
reoring has joined #ruby
shanemcd_ has quit [Ping timeout: 245 seconds]
djbkd has quit [Quit: My people need me...]
tubulife- has quit [Remote host closed the connection]
grotewold is now known as grotewold[afk]
dfinninger has joined #ruby
grotewold[afk] has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Tempesta has joined #ruby
maloik has quit [Ping timeout: 250 seconds]
skweek has quit [Ping timeout: 260 seconds]
tubuliferous has quit [Remote host closed the connection]
thejamespinto has joined #ruby
mostlybadfly has joined #ruby
phillips1012 has joined #ruby
phillips1012 is now known as solenoids
sparr has quit [Changing host]
sparr has joined #ruby
kies has quit [Ping timeout: 250 seconds]
whiteline has joined #ruby
roshanavand has joined #ruby
amclain has quit [Quit: Leaving]
nateberkopec has joined #ruby
roxtrongo has joined #ruby
znz_jp has quit [Quit: kill -QUIT $$]
roshanavand has quit [Ping timeout: 250 seconds]
ElSif has quit [Read error: Connection reset by peer]
znz_jp has joined #ruby
ElSif has joined #ruby
griffindy has joined #ruby
nateberkopec has quit [Quit: Leaving...]
Ox0dea has quit [Ping timeout: 250 seconds]
nateberkopec has joined #ruby
maikowblue has quit [Quit: .]
Xeago has joined #ruby
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
baweaver has quit [Remote host closed the connection]
dfinninger has quit [Remote host closed the connection]
I has joined #ruby
I is now known as Guest16359
johnhamelink has quit [Ping timeout: 250 seconds]
Klumben has quit [Ping timeout: 250 seconds]
gusTester has joined #ruby
Bellthoven has joined #ruby
alem0lars has quit [Ping timeout: 250 seconds]
roshanavand has joined #ruby
<mobson> how to get this down to 20 characters: p !((gets=~/(.)\1/)==nil)
<apeiros> golfing?
<mobson> yeh
<apeiros> what's the purpose?
mary5030 has joined #ruby
<mobson> just to check for repeated chars
<apeiros> p(gets!~/(.)\1/)
h99h9h88 has joined #ruby
simplyianm has joined #ruby
<apeiros> hm, might need a space, since gets! is a valid name
<apeiros> p(gets !~/(.)\1/)
<apeiros> oh, I might have inverted true/false. p !!(gets=~/(.)\1/)
roshanavand has quit [Ping timeout: 250 seconds]
SleepySensei has joined #ruby
Xeago has quit [Ping timeout: 260 seconds]
babblebre has joined #ruby
weemsledeux has joined #ruby
howdoicomputer has joined #ruby
towski_ has quit [Remote host closed the connection]
crdpink has quit [Ping timeout: 250 seconds]
crdpink2 has joined #ruby
maloik has joined #ruby
cpup has quit [Ping timeout: 260 seconds]
ramortegui has quit [Quit: Leaving]
cpup has joined #ruby
<zenspider> remove double bang too
krobzaur has joined #ruby
maloik has quit [Ping timeout: 245 seconds]
<zenspider> 23, but more useful imo: p $` if (gets=~/(.)\1/)
Guest16359 has quit [Quit: This computer has gone to sleep]
Azure|dc has joined #ruby
<apeiros> well, if you want the string or nil: gets[/(.)\1/]
Azure has quit [Ping timeout: 260 seconds]
<apeiros> wait, $`?
<apeiros> why $` and not $&?
hanmac1 has joined #ruby
reaVer has quit [Remote host closed the connection]
roshanavand has joined #ruby
dlitvak has quit [Remote host closed the connection]
grotewold has joined #ruby
banister has joined #ruby
reaVer has joined #ruby
hanmac has quit [Ping timeout: 260 seconds]
qiukun has joined #ruby
shanemcd has quit [Remote host closed the connection]
roshanavand has quit [Ping timeout: 250 seconds]
dorei has quit []
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Dood_ has quit [Ping timeout: 260 seconds]
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nkwsy___1 has quit [Ping timeout: 260 seconds]
RobertBirnie has joined #ruby
mjuszczak has quit []
nateberkopec has quit [Quit: Leaving...]
shanemcd has joined #ruby
jdawgaz has joined #ruby
maloik has joined #ruby
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
stannard has joined #ruby
grotewold has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
r0bby_ has joined #ruby
cdg has quit [Remote host closed the connection]
robbyoconnor has quit [Read error: Connection reset by peer]
r0bby_ is now known as robbyoconnor
Rickmasta has joined #ruby
frem has quit [Quit: Connection closed for inactivity]
roshanavand has joined #ruby
maloik has quit [Ping timeout: 245 seconds]
shanemcd has quit [Remote host closed the connection]
stannard has quit [Ping timeout: 260 seconds]
qiukun has quit [Remote host closed the connection]
qiukun has joined #ruby
marr has quit [Ping timeout: 260 seconds]
roshanavand has quit [Ping timeout: 250 seconds]
Kartikay has joined #ruby
Gnut has joined #ruby
skweek has joined #ruby
favadi has joined #ruby
htmldrum has joined #ruby
woven has quit [Quit: Leaving]
CloCkWeRX has quit [Ping timeout: 250 seconds]
CloCkWeRX has joined #ruby
htmldrum_ has quit [Ping timeout: 245 seconds]
towski_ has joined #ruby
TheBloke has quit [Quit: Textual IRC Client: www.textualapp.com]
bronson has quit [Remote host closed the connection]
TheBloke has joined #ruby
TheBloke has quit [Client Quit]
jessemcgilallen has joined #ruby
TheBloke has joined #ruby
jbrhbr has quit [Ping timeout: 250 seconds]
TheBloke has quit [Client Quit]
baweaver has joined #ruby
roshanavand has joined #ruby
bronson has joined #ruby
Kartikay has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
skweek has quit [Ping timeout: 250 seconds]
th0m__ has joined #ruby
baweaver has quit [Ping timeout: 260 seconds]
roshanavand has quit [Ping timeout: 250 seconds]
bb010g has joined #ruby
h99h9h88 has quit [Remote host closed the connection]
cwong_on_irc has joined #ruby
karapetyan has joined #ruby
patdohere has joined #ruby
h99h9h88 has joined #ruby
towski_ has quit [Remote host closed the connection]
RickHull has joined #ruby
casadei has quit [Remote host closed the connection]
Bellthoven has quit []
yqt has quit [Ping timeout: 245 seconds]
patdohere has quit [Ping timeout: 250 seconds]
<RickHull> anyone use Rye (successor to rush, the ruby shell)?
grotewold has joined #ruby
<RickHull> I am using it for remote command exec
devbug has joined #ruby
<RickHull> trying to troubleshoot a strange issue -- likely bug
duncan_bayne has joined #ruby
roshanavand has joined #ruby
TomPeed has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
karapetyan has quit [Remote host closed the connection]
roshanavand has quit [Ping timeout: 250 seconds]
jessemcgilallen has quit [Quit: jessemcgilallen]
krobzaur has quit [Ping timeout: 245 seconds]
maloik has joined #ruby
karapetyan has joined #ruby
casadei has joined #ruby
duncan_bayne has quit [Quit: Page closed]
cmoneylulz has joined #ruby
SleepySensei has quit [Read error: Connection reset by peer]
cmoneylulz has quit [Remote host closed the connection]
pwnd_nsfw has quit [Quit: Leaving]
reoring has quit []
johnhamelink has joined #ruby
pwnd_nsfw has joined #ruby
railswebdev has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pwnd_nsfw has quit [Read error: Connection reset by peer]
maloik has quit [Ping timeout: 260 seconds]
<RickHull> anyone want to help me confirm a bug?
aspiers has quit [Ping timeout: 260 seconds]
casadei has quit [Ping timeout: 245 seconds]
shinenelson has joined #ruby
<RickHull> hmm, i seem to have found some `ri` weirdness
<RickHull> on a debian system: type "ri" (no quotes) then <tab key> then "-h"
<RickHull> then <enter key>
pwnd_nsfw has joined #ruby
braincrash has quit [Quit: bye bye]
<RickHull> alternatively: "ri<space><tab>-h"
casadei has joined #ruby
<RickHull> <enter> ... what should happen?
gusTester has left #ruby [#ruby]
karapetyan has quit [Remote host closed the connection]
Eiam_ has joined #ruby
ur5us has quit [Remote host closed the connection]
<RickHull> compare to: "ls<space><tab>-h<enter>"
grotewold is now known as grotewold[afk]
braincrash has joined #ruby
cycorld has joined #ruby
jdawgaz has quit [Read error: Connection reset by peer]
railswebdev has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
grotewold[afk] is now known as grotewold
<blubjr> whats your problem
h99h9h88 has quit [Remote host closed the connection]
juddey has quit [Ping timeout: 260 seconds]
<blubjr> ls -h is for printing file sizes neatly..
cmoneylulz has joined #ruby
<RickHull> i think it's that `ri -h` opens an interactive console
<RickHull> but something with tab completion is messing with it on debian
roshanavand has joined #ruby
calderonroberto has joined #ruby
<RickHull> what happens when you type "ri<space><tab>-h<enter>" ?
casadei has quit [Remote host closed the connection]
<RickHull> for me, i get a blank prompt, and I have to SIGTERM out of it
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<RickHull> it might just be `-h` weirdness specific to ri
<RickHull> though i would say that `-h` is the standard help output switch
<RickHull> but my real problem is with Rye -- it has different behavior for Rye::Set#disable_safe_mode versus Rye::Set#safe = false
<havenwood> RickHull: ri --help
alem0lars has joined #ruby
<RickHull> havenwood: what happens with "ri<space><tab>--help<enter>" ?
<RickHull> i get a blank prompt, waiting for (who knows what) input
<blubjr> if its the tab that does it i would imagine the problem is with whatever completion your bash is configured with
Guest16359 has joined #ruby
<blubjr> -h is not standard for help on unix
<RickHull> i think it is the tab that is pivotal
<RickHull> i should have a bog standard debian system in this respect
bronson has quit [Remote host closed the connection]
<RickHull> it is not problematic for e.g. `ls` only `ri` so far
<blubjr> i dont know about how debian's bash comes preconfigured, but that would be where to look
<blubjr> ri wont even be seeing the tab
<RickHull> compare "ls<space><tab>-h<enter>" to "ri<space><tab>--help<enter>"
roshanavand has quit [Ping timeout: 250 seconds]
<RickHull> totally different behavior on my system
<blubjr> yes, bash has programmable tab completion
<blubjr> again, ri won't even be seeing the tab. bash is screwing something up
rikai_ has quit [Ping timeout: 244 seconds]
<RickHull> only for ri, not for ls?
<RickHull> based on the behavior, it looks like ri is doing a $stdin.gets before it ought to
<blubjr> bash has programmable tab completion, ie, it can be set up to complete differently for different commands
baweaver has joined #ruby
grotewold is now known as grotewold[afk]
maloik has joined #ruby
<RickHull> hm, I haven't done any setup there
rikai has joined #ruby
<blubjr> the debian maintainers probably did
jdawgaz has joined #ruby
<RickHull> the closest thing I've done to mess with tab completion for bash is git completion
<RickHull> anyway, the `ri` thing is just a curiousity
<RickHull> i was trying to find a valid command on my system that is not on the Rye whitelist of commands
Xeago has joined #ruby
<RickHull> the main issue I'm having is that Rye::Set#safe is reporting false, yet I'm hitting an exception on a line that strongly implies @safe == true
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
arescorpio has quit [Quit: Leaving.]
cmoneylulz has quit [Remote host closed the connection]
daivyk has quit [Read error: Connection reset by peer]
cmoneylulz has joined #ruby
grotewold[afk] is now known as grotewold
pawnbox has joined #ruby
maloik has quit [Ping timeout: 260 seconds]
dfinninger has joined #ruby
Guest16359 has quit [Quit: This computer has gone to sleep]
<RickHull> there are two ways to disable safe mode for Rye: obj.disable_safe_mode vs obj = Rye::Foo.new(safe: false)
<RickHull> only the latter seems to work
bronson has joined #ruby
<RickHull> the former seems broken and looks like a bug
Xeago has quit [Ping timeout: 250 seconds]
<RickHull> safe mode means that @safe is true and method_missing will raise quickly if the command is not on the whitelist
graydot has joined #ruby
Guest16359 has joined #ruby
<RickHull> i was trying to use `ri` for a command that is not on the whitelist -- and then I hit the weirdness with tab completion
<RickHull> a better command that is not on the whitelist is `find`. e.g. Rye::Box.new(host).find '.'
<RickHull> that will fail, because find is not on the whitelist
calderonroberto has quit [Ping timeout: 250 seconds]
<RickHull> you can do Rye::Box#disable_safe_mode # seems broken
h99h9h88 has joined #ruby
<RickHull> or Rye::Box.new(host, safe: false) # works
djbkd has joined #ruby
<RickHull> in my specific case, I am working with a Rye::Set, a container of Rye::Box
<RickHull> but the API takes pains to be consistent across Sets vs individual boxes
dfinninger has quit [Client Quit]
solocshaw has quit [Ping timeout: 245 seconds]
juddey has joined #ruby
slawrence00 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
roshanavand has joined #ruby
lakin has quit [Quit: WeeChat 0.4.2]
djbkd has quit [Quit: My people need me...]
h99h9h88 has quit [Remote host closed the connection]
pawnbox has quit []
graydot has quit [Quit: graydot]
maloik has joined #ruby
cmoneylulz has quit [Remote host closed the connection]
graydot has joined #ruby
htmldrum_ has joined #ruby
roshanavand has quit [Ping timeout: 250 seconds]
<RickHull> here's the problem case for rye, using `find` command: https://gist.github.com/anonymous/d32fd6028bb3774c9060
<RickHull> it shows where calling #disable_safe_mode has different behavior than instantiation with safe: false
woollyams has joined #ruby
zast has joined #ruby
<RickHull> can anyone please confirm locally -- copy / paste / exec
<RickHull> if so, i'll file an issue
maloik has quit [Ping timeout: 260 seconds]
htmldrum has quit [Ping timeout: 245 seconds]
gix has quit [Ping timeout: 260 seconds]
devbug has quit [Ping timeout: 250 seconds]
cycorld has quit [Remote host closed the connection]
gix has joined #ruby
mloy has joined #ruby
babblebre has quit [Quit: Connection closed for inactivity]
juddey has quit [Ping timeout: 260 seconds]
<RickHull> issue filed
<RickHull> anyone have alternative recommendations to Rye for remote command exec?
<RickHull> one critical feature is that after `cd $DIR` on the remote end, any subsequent commands execute with PWD==DIR
h99h9h88 has joined #ruby
<RickHull> modulo sessions, etc.
shanemcd has joined #ruby
<RickHull> i think net/ssh makes this difficult
<RickHull> speaking as a reluctant "maintainer" of net/ssh/shell
<RickHull> (i took over maintainership from mitchellh, intending to pass it on. that offer is still open)
freerobby has quit [Quit: Leaving.]
Rickmasta has joined #ruby
towski_ has joined #ruby
graydot has quit [Quit: graydot]
<RickHull> my own attempt at maintaining a persistent ssh session using net/ssh: https://github.com/rickhull/runsible
<RickHull> i'll probably pick it back up at some point
<RickHull> but I'm wondering if the net/ssh approach is just fatally flawed, or if i'm missing something major
h99h9h88 has quit [Ping timeout: 260 seconds]
shanemcd has quit [Ping timeout: 260 seconds]
<RickHull> the Rye developer has a similar complaint: http://delanotes.com/rye/classes/Rye/Box.html
<RickHull> > I haven't been able to wrangle Net::SSH to do my bidding. "My bidding" in this case, is maintaining an open channel between commands. I'm using Net::SSH::Connection::Session#exec for all commands which is like a funky helper method that opens a new channel each time it's called. This seems to be okay for one-off commands but changing the directory only works for the channel it's executed in. The next time exec is called, there's a new channel
<RickHull> which is back in the default (home) directory.
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
<RickHull> anyone else gone through similar frustrations?
anaeem1 has joined #ruby
slawrence00 has joined #ruby
xelfer has joined #ruby
cdg has joined #ruby
beast has quit [Ping timeout: 244 seconds]
anaeem1 has quit [Read error: Connection reset by peer]
howdoicomputer has quit [Ping timeout: 245 seconds]
anaeem1 has joined #ruby
grotewold has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
anaeem1 has quit [Remote host closed the connection]
qiukun has quit [Quit: qiukun]
Klumben has joined #ruby
<xelfer> ive installed 2.2.3 (on osx el capitan) 3 times and i'm still getting "kernel_require.rb:54:in `require': cannot load such file -- bundler/setup (LoadError)" on gem install bundle, any ideas what might be wrong here? my google isnt helping
h99h9h88 has joined #ruby
beast has joined #ruby
maloik has joined #ruby
roshanavand has joined #ruby
BlackCoyote has quit [Remote host closed the connection]
<RickHull> xelfer: paste a gist, with some basic system info
<RickHull> then a gist with the commands you're running, and the error messages / failures
<RickHull> the info you've posted so far is insufficient for troubleshooting, at least from here
h99h9h88 has quit [Ping timeout: 245 seconds]
<xelfer> ah.. even my gist command is no longer working. haha. one sec
<RickHull> i'm not sure what commands you need for basic system info for Mac OS. `uname -a` `which gem` `gem env` come to mind, at least
darkf has joined #ruby
<xelfer> gem env gives the same error as gem install bundle
<Radar> xelfer: `which ruby` and `which gem` please.
<Radar> xelfer: Output of `gem env` could be helpful to know too.
<xelfer> they're both in the gist above, thanks Radar
<RickHull> `gem env` too
<xelfer> 16:16 <xelfer> gem env gives the same error as gem install bundle
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
maloik has quit [Ping timeout: 260 seconds]
* RickHull sad trombone
<Radar> `gem env` is not in that gist.
<RickHull> lol
<RickHull> xelfer: may as well just paste it explicitly ;(
<xelfer> as i said above..
<xelfer> here you go
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mary5030 has quit [Remote host closed the connection]
roshanavand has quit [Ping timeout: 250 seconds]
<xelfer> i used this to reinstall:
<xelfer> RUBY_CONFIGURE_OPTS=--with-readline-dir="/usr/lib/libreadline.so" rbenv install 2.2.3
<RickHull> those quotes look bad
<RickHull> i could be mistaken, but that looks suspicious
Dood has joined #ruby
qiukun has joined #ruby
<Radar> Oh, it is there and I'm just being dumb.
<xelfer> which ones?
nkwsy___2 has joined #ruby
<Radar> xelfer: this is the guide that I wrote and it works all the time.
toretore has quit [Ping timeout: 260 seconds]
<xelfer> radar: thank you, i'll give that a go
<RickHull> xelfer: i don't think it matters, but why quote only the filesystem portion of the var assignment?
<RickHull> on the one hand, the quotes aren't necessary
<RickHull> on the other, why not quote the entire var value?
<xelfer> that's a good point
<xelfer> i see what you mean now
<xelfer> following some work doco and one of them seems to be like that, the rest are all quoted
<RickHull> links?
<xelfer> internal documentation at work :)
<RickHull> ohdear
<xelfer> actually, my usual ruby guru pasted it to me for that one
<RickHull> on that note, i would say, try to stick to normal conventions. even if the interal docs contradict normal conventions
* xelfer tries
<xelfer> yeah the 1.9.3 doco bit says
<xelfer> RUBY_CONFIGURE_OPTS="--with-readline-dir=/usr/include/readline" rbenv install 1.9.3-p125
<xelfer> which looks more sane
peteyg has quit [Quit: leaving]
<RickHull> agreed
<xelfer> trying that out before trashing my entire rbenv
<RickHull> though given bash conventions and evaluation rules, i honestly have given up any prediction / expectation
<RickHull> if it works, great. if not, keep trying
<RickHull> last resort: try seriously to understand the execution / evaluation model
<xelfer> yeah, if this fails ill go with Radar's blog and trash .rbenv
peteyg has joined #ruby
CloCkWeRX has quit [Ping timeout: 260 seconds]
saneax_AFK is now known as saneax
codecop has joined #ruby
paradisaeidae has joined #ruby
maloik has joined #ruby
snockerton has joined #ruby
pawnbox has joined #ruby
roshanavand has joined #ruby
slawrence00 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
railswebdev has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<snockerton> once I have a RestClient::Resource defined with a url, how can i update a single attribute (url) of that object without recreating it from scratch?
qiukun has quit [Quit: qiukun]
<RickHull> snockerton: probably you can't -- resource is a noun-oriented approach
howdoicomputer has joined #ruby
karapetyan has joined #ruby
<RickHull> snockerton: what's the problem case?
<RickHull> snockerton: btw https://github.com/rickhull/mudbug
maloik has quit [Ping timeout: 260 seconds]
cycorld has joined #ruby
<snockerton> i define a RestClient::Resource object with a bunch of custom options + headers, then need to pass entire (new) urls to it, rather than appending to the url
roshanavand has quit [Ping timeout: 250 seconds]
karapetyan has quit [Remote host closed the connection]
<snockerton> i have to do GETs on lots of urls, and was hoping to just pass the entire thing to RestClient without carving up the URI and using the resource[suffix] syntax
<RickHull> the resource abstraction wants to be 1-1 from URL - resource
<RickHull> so you don't want to make 1 resource that represents many URLs
<snockerton> drat
<RickHull> there are many alternative models
karapetyan has joined #ruby
<snockerton> i also tried doing one offs of `RestClient.get( url, headers )` - but I need to add verify_ssl: false
<snockerton> this only seems to work as an option with Resource.new
<RickHull> yeah, that is probably the right approach
karapetyan has quit [Read error: Connection reset by peer]
<snockerton> cool gem btw
<RickHull> please let me know if it works for your use case
<RickHull> and if not, why not
pontiki has quit [Ping timeout: 272 seconds]
<Radar> xelfer: how'd it go?
<RickHull> one problem is: lacking robust https support
pontiki has joined #ruby
<snockerton> i just need verify_ssl: false
<RickHull> that should be trivial
<RickHull> not sure about your use case
<snockerton> laziness
<RickHull> well, get unlazy
karapetyan has joined #ruby
<RickHull> step 1: don't be lazy. step 2: get unlazy
karapetyan has quit [Remote host closed the connection]
<RickHull> important corollary: if the reason you are asking a question here is laziness: don't
favadi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<snockerton> s/laziness/internal political issues/
karapetyan has joined #ruby
<RickHull> fair enough...
Cork has quit [Ping timeout: 246 seconds]
karapetyan has quit [Read error: Connection reset by peer]
<RickHull> but setting that particular option should be no trouble for RestClient::Resource -- without Mudbug
<snockerton> right, confirmed that Resource is necessary: https://github.com/rest-client/rest-client/issues/297
<RickHull> nice catch
<snockerton> the one off methods don't support options
<RickHull> that's a bug, not a missing feature imho
yfeldblum has quit [Ping timeout: 250 seconds]
thejamespinto has quit []
<RickHull> that said, #get and friends are clearly "helper" / "convenience" methods
<snockerton> yea that's what it appears to be
<RickHull> there should be a similar way to achieve same, with say 40ch extra
Wsewolod has quit [Ping timeout: 250 seconds]
<snockerton> 40ch?
<RickHull> 40 characters
<RickHull> half a screen width
<snockerton> i see what you mean
<snockerton> i concur
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
karapetyan has joined #ruby
paradisaeidae has quit [Remote host closed the connection]
pawnbox has quit [Remote host closed the connection]
karapetyan has quit [Read error: Connection reset by peer]
pawnbox has joined #ruby
stannard has joined #ruby
troulouliou_dev has quit [Quit: Leaving]
vakor has quit [Ping timeout: 240 seconds]
diegoaguilar has joined #ruby
qiukun has joined #ruby
roshanavand has joined #ruby
stannard has quit [Ping timeout: 250 seconds]
pawnbox has quit [Read error: Connection reset by peer]
pawnbox has joined #ruby
karapetyan has joined #ruby
hahuang65 has quit [Ping timeout: 245 seconds]
karapetyan has quit [Read error: Connection reset by peer]
howdoicomputer has quit [Ping timeout: 245 seconds]
AlexRussia has quit [Ping timeout: 260 seconds]
roshanavand has quit [Ping timeout: 250 seconds]
krz has joined #ruby
qiukun has quit [Remote host closed the connection]
qiukun has joined #ruby
Cork has joined #ruby
skweek has joined #ruby
favadi has joined #ruby
<Radar> xelfer was never heard from again
<RickHull> the pessimistic reactions: RIP, welp
<RickHull> the optimistic reaction: problem solved, gj #ruby
griffindy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
simplyianm has quit [Remote host closed the connection]
krz has quit [Ping timeout: 260 seconds]
simplyianm has joined #ruby
daBllemSsreggiN has joined #ruby
daBllemSsreggiN was kicked from #ruby by ChanServ [Banned: Unacceptable nick - http://ruby-community.com/pages/user_rules#rule_2_10]
<RickHull> later yallz
RickHull has left #ruby [#ruby]
roshanavand has joined #ruby
rghose has joined #ruby
howdoicomputer has joined #ruby
ESpiney has quit [Quit: Leaving]
qiukun has quit [Remote host closed the connection]
qiukun has joined #ruby
roshanavand has quit [Ping timeout: 250 seconds]
jackcom has joined #ruby
ta has quit [Remote host closed the connection]
RickHull has joined #ruby
bronson has quit [Remote host closed the connection]
moeabdol has quit [Ping timeout: 260 seconds]
edwinvdgraaf has quit [Remote host closed the connection]
edwinvdgraaf has joined #ruby
mary5030 has joined #ruby
edwinvdg_ has joined #ruby
qiukun has quit [Remote host closed the connection]
qiukun has joined #ruby
edwinvdgraaf has quit [Ping timeout: 250 seconds]
roxtrongo has quit [Read error: Connection reset by peer]
roxtrongo has joined #ruby
edwinvdg_ has quit [Ping timeout: 250 seconds]
mary5030 has quit [Ping timeout: 260 seconds]
RickHull has left #ruby [#ruby]
krz has joined #ruby
ff7f00 has joined #ruby
haraoka has joined #ruby
roshanavand has joined #ruby
mooru has joined #ruby
aganov has joined #ruby
lxsameer has joined #ruby
karapetyan has joined #ruby
cycorld has quit [Remote host closed the connection]
karapetyan has quit [Remote host closed the connection]
roshanavand has quit [Ping timeout: 250 seconds]
karapetyan has joined #ruby
cycorld has joined #ruby
karapetyan has quit [Read error: Connection reset by peer]
<ff7f00> Hi, I just created a new gem using the "bundle gem tool-subtool" command. This organizes my gem into Tool::Subtool where Tool and Subtool are both modules. The problem is that for this gem it makes more sense for Subtool to be a class. However my directory structure also includes tool/subtool/package.rb where Tool::Subtool::Package.new would also make sense. Should I instead leave Subtool as a module and do something like Tool::Subtool::SubtoolInstance.new?
karapetyan has joined #ruby
<ff7f00> (sorry, struggling a bit on how to explain this and that's the best I could do)
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
yfeldblum has joined #ruby
claw has quit [Ping timeout: 245 seconds]
karapetyan has quit [Read error: Connection reset by peer]
tomchapin has joined #ruby
<xybre> ff7f00: The general pattern is to use the top level namespace of your gem (Subtool in this case) for one or two invokation/helper methods and then put all the actual functionality into objects in that namespace.
karapetyan has joined #ruby
<ff7f00> xybre: all right, yea that's the feeling I got. I think I found a class name that will make sense here. thanks
skade has joined #ruby
ss_much has joined #ruby
trautwein has joined #ruby
tagrudev has joined #ruby
<shevy> ff7f00 I often found that, the simpler to use an API the better; Tool::Subtool::Package.new would strike me intuitively as easier to use than Tool::Subtool::SubtoolInstance.new; you could also add to the Subtool namespace and make e. g. a module method there, depending on what it does. like, I dunno ... Tool::Subtool.create_project('dragons')
karapetyan has quit [Read error: No route to host]
qiukun has quit [Quit: qiukun]
rony has joined #ruby
rony has left #ruby [#ruby]
claw has joined #ruby
maloik has joined #ruby
yardenbar has joined #ruby
sapslaj_ has quit [Ping timeout: 240 seconds]
sapslaj has joined #ruby
roshanavand has joined #ruby
aufi has joined #ruby
mooru has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
maloik has quit [Ping timeout: 245 seconds]
towski_ has quit [Remote host closed the connection]
skade has quit [Quit: Computer has gone to sleep.]
ta has joined #ruby
roshanavand has quit [Ping timeout: 250 seconds]
timonv has joined #ruby
rghose has quit [Quit: Leaving.]
rghose has joined #ruby
lokulin has quit [Changing host]
lokulin has joined #ruby
pawnbox has quit [Remote host closed the connection]
vdamewood has joined #ruby
<blubjr> whats the best way to capitalise the first alpha char in a string
<blubjr> eg '12ab' => '12Ab'
qiukun has joined #ruby
pawnbox has joined #ruby
<shevy> hmm
stannard has joined #ruby
<havenwood> >> '12ab'.sub /[a-z]/, &:upcase
<ruboto> havenwood # => "12Ab" (https://eval.in/478187)
<blubjr> there we go, thank you
<blubjr> thats a very useful function
sandstrom has joined #ruby
tomchapin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pawnbox has quit [Client Quit]
qiukun has quit [Remote host closed the connection]
qiukun has joined #ruby
akosednar has quit [Quit: byeee....]
maloik has joined #ruby
stannard has quit [Ping timeout: 260 seconds]
roshanavand has joined #ruby
timonv has quit [Ping timeout: 260 seconds]
gaussblurinc1 has joined #ruby
jas02 has joined #ruby
roshanavand has quit [Ping timeout: 250 seconds]
maloik has quit [Ping timeout: 245 seconds]
skade has joined #ruby
qiukun has quit [Quit: qiukun]
zast has quit [Quit: Leaving.]
ta has quit [Remote host closed the connection]
<blubjr> so im calling a method on an object, using case to pick which method to call. in lisp i would write (funcall (cond (case-1 fn-1) (case-2 fn-2)) obj), is that sort of thing done in ruby, and if so how do you write it, or should i just have when case_1; obj.fn_1; when case_2; obj.fn_2
bronson has joined #ruby
Eiam_ has quit [Quit: ╯°□°)╯︵ǝpouǝǝɹɟ]
qiukun has joined #ruby
Guest90599 is now known as aps
gambl0re has quit [Read error: Connection reset by peer]
gambl0re has joined #ruby
bronson has quit [Ping timeout: 260 seconds]
tvw has joined #ruby
bronson has joined #ruby
kerunaru has joined #ruby
maloik has joined #ruby
kerunaru has quit [Read error: Connection reset by peer]
<shevy> you could try via .send
solars has joined #ruby
<shevy> via .instance_methods(false) you should be able to reliably determine what methods your object responds to, then you could use .select to find the proper match
maloik has quit [Ping timeout: 245 seconds]
kerunaru has joined #ruby
roshanavand has joined #ruby
roshanavand has quit [Remote host closed the connection]
kerunaru has quit [Read error: Connection reset by peer]
qiukun has quit [Remote host closed the connection]
qiukun has joined #ruby
Gnut has quit [Ping timeout: 260 seconds]
JamesArlen has joined #ruby
<JamesArlen> I HATE RUBY
<JamesArlen> why does such an awful language exist?
kerunaru has joined #ruby
<JamesArlen> so much room to make mistakes with ruby that it's not even funny
bronson has quit [Remote host closed the connection]
snockerton has quit [Quit: Leaving.]
<JamesArlen> finding syntax errors in ruby is horrible
vdamewood has quit [Quit: Life beckons.]
<shevy> lol
<shevy> our good old webchatster friend has returned
solars has quit [Quit: WeeChat 0.4.2]
ff7f00 has quit [Quit: Leaving.]
andikr has joined #ruby
solars has joined #ruby
<blubjr> ty shevy
<JamesArlen> why are you a fucking NIGGER shevy
<shevy> countdown started!
<havenwood> !ban JamesArlen !P racism
JamesArlen was banned on #ruby by ChanServ [JamesArlen!*@*]
JamesArlen was kicked from #ruby by ChanServ [Banned: racism]
kerunaru has quit [Read error: Connection reset by peer]
kerunaru has joined #ruby
qiukun has quit [Quit: qiukun]
Macaveli has joined #ruby
kerunaru has quit [Read error: Connection reset by peer]
rghose has quit [Quit: Leaving.]
skade has quit [Quit: Computer has gone to sleep.]
qiukun has joined #ruby
rghose has joined #ruby
PaulCapestany has quit [Quit: .]
sigurding has joined #ruby
ur5us has joined #ruby
anisha has joined #ruby
kerunaru has joined #ruby
weemsledeux has joined #ruby
PaulCapestany has joined #ruby
cycorld has quit [Remote host closed the connection]
cycorld has joined #ruby
ta has joined #ruby
Pupp3tm4st3r has joined #ruby
woollyams has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
kerunaru has quit [Read error: Connection reset by peer]
mobson has quit [Ping timeout: 250 seconds]
ta_ has joined #ruby
ur5us has quit [Ping timeout: 260 seconds]
omegahm has left #ruby ["Textual IRC Client: www.textualapp.com"]
kerunaru has joined #ruby
allomov has joined #ruby
kerunaru has quit [Read error: Connection reset by peer]
qiukun has quit [Remote host closed the connection]
qiukun has joined #ruby
ta has quit [Ping timeout: 245 seconds]
roshanavand has joined #ruby
maloik has joined #ruby
beast has quit [Quit: Leaving]
kerunaru has joined #ruby
allomov has quit [Ping timeout: 245 seconds]
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
timonv has joined #ruby
rghose has quit [Quit: Leaving.]
htmldrum_ has quit [Quit: Lost terminal]
kerunaru has quit [Read error: Connection reset by peer]
SCHAAP137 has joined #ruby
kerunaru has joined #ruby
houhoulis has quit [Remote host closed the connection]
desmondhume has joined #ruby
TomyWork has joined #ruby
qiukun has quit [Remote host closed the connection]
symm- has joined #ruby
sigurding has quit [Quit: sigurding]
qiukun has joined #ruby
zast has joined #ruby
joonty has joined #ruby
kerunaru has quit [Read error: Connection reset by peer]
sigurding has joined #ruby
howdoicomputer has quit [Ping timeout: 260 seconds]
kerunaru has joined #ruby
vondruch_ has quit [Quit: Ex-Chat]
cdg has quit [Remote host closed the connection]
vondruch has joined #ruby
kerunaru has quit [Read error: Connection reset by peer]
vasilakisfil has joined #ruby
shanemcd has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
kerunaru has joined #ruby
kerunaru has quit [Read error: Connection reset by peer]
qiukun has quit [Remote host closed the connection]
qiukun has joined #ruby
shanemcd has quit [Ping timeout: 260 seconds]
al2o3-cr has joined #ruby
rdark has joined #ruby
kimegede has joined #ruby
kerunaru has joined #ruby
qiukun has quit [Remote host closed the connection]
qiukun has joined #ruby
lubekpl has joined #ruby
kerunaru has quit [Read error: Connection reset by peer]
e7d has joined #ruby
stannard has joined #ruby
desmondhume has quit [Read error: Connection reset by peer]
kerunaru has joined #ruby
desmondhume has joined #ruby
Hounddog has joined #ruby
brunto has joined #ruby
epistrephein has joined #ruby
hahuang65 has joined #ruby
e7d has quit [Client Quit]
e7d has joined #ruby
stannard has quit [Ping timeout: 245 seconds]
kerunaru has quit [Read error: Connection reset by peer]
b0yzn01z3 has quit [Ping timeout: 260 seconds]
kerunaru has joined #ruby
mooe has joined #ruby
aspiers has joined #ruby
iateadonut has joined #ruby
qiukun has quit [Remote host closed the connection]
qiukun has joined #ruby
bronson has joined #ruby
skullcrasher_ has left #ruby ["Leaving"]
cycorld has quit [Ping timeout: 250 seconds]
NeverTired has joined #ruby
Couch has quit [Ping timeout: 245 seconds]
kerunaru has quit [Read error: Connection reset by peer]
cycorld has joined #ruby
bronson has quit [Ping timeout: 245 seconds]
mooru has joined #ruby
kerunaru has joined #ruby
Couch has joined #ruby
jackcom has left #ruby [#ruby]
CamonZ has quit [Quit: Textual IRC Client: www.textualapp.com]
dimik has quit [Ping timeout: 245 seconds]
huyderman has joined #ruby
qiukun has quit [Remote host closed the connection]
thisuser has quit [Ping timeout: 260 seconds]
qiukun has joined #ruby
Emmanuel_Chanel has joined #ruby
tvw has quit []
sandstrom has joined #ruby
timonv has quit [Ping timeout: 250 seconds]
vikas027 has joined #ruby
kerunaru has quit [Read error: Connection reset by peer]
blaxter has joined #ruby
kerunaru has joined #ruby
Shapeshifter has joined #ruby
ur5us has joined #ruby
kerunaru has quit [Read error: Connection reset by peer]
<Shapeshifter> Is there a name for when doing something like Config[:some_prop]? and what exactly would this do? Does it check whether the property exists or does it check if it's true?
skade has joined #ruby
baweaver has quit [Remote host closed the connection]
<apeiros> Shapeshifter: [] is a method in ruby, it just has a sugared syntax.
bweston92 has joined #ruby
<apeiros> i.e., the name of the method is "[]". you can call it like any other method too: Config.[](:some_prop). and Config[:some_prop] is just syntax sugar for that.
edwinvdgraaf has joined #ruby
<apeiros> and like all methods, what [] does depends on the object you call it on. in most classes it's looking up a value by key or index (like Hash/Array)
kerunaru has joined #ruby
kerunaru has quit [Read error: Connection reset by peer]
qiukun has quit [Remote host closed the connection]
qiukun has joined #ruby
Pumukel has joined #ruby
vondruch has quit [Quit: Ex-Chat]
skweek has quit [Quit: Leaving]
Weethus has quit [Ping timeout: 264 seconds]
elaptics`away is now known as elaptics
<Shapeshifter> apeiros: thanks!
epistrephein has quit [Quit: Textual IRC Client: www.textualapp.com]
desmondhume has quit [Read error: Connection reset by peer]
desmondhume has joined #ruby
kerunaru has joined #ruby
poorBastard has joined #ruby
InvGhost has joined #ruby
<xybre> Shapeshifter: most types that use [] will return nil if nothing is found
kerunaru has quit [Read error: Connection reset by peer]
<al2o3-cr> Shapeshifter: fetch can return a default value happy days
Puffball has quit [Read error: Connection reset by peer]
<xybre> s/use/respond_to
vondruch has joined #ruby
Puffball has joined #ruby
kerunaru has joined #ruby
qiukun has quit [Remote host closed the connection]
qiukun has joined #ruby
kerunaru has quit [Read error: Connection reset by peer]
kerunaru has joined #ruby
kerunaru has quit [Read error: Connection reset by peer]
howdoicomputer has joined #ruby
al2o3-cr has quit [Ping timeout: 260 seconds]
al2o3-cr has joined #ruby
qiukun has quit [Remote host closed the connection]
qiukun has joined #ruby
marr has joined #ruby
qiukun has quit [Remote host closed the connection]
kerunaru has joined #ruby
qiukun has joined #ruby
howdoicomputer has quit [Ping timeout: 250 seconds]
kerunaru has quit [Read error: Connection reset by peer]
qiukun has quit [Remote host closed the connection]
qiukun has joined #ruby
qiukun has quit [Remote host closed the connection]
qiukun has joined #ruby
edwinvdgraaf has quit []
qiukun has quit [Remote host closed the connection]
stan has joined #ruby
kerunaru has joined #ruby
qiukun has joined #ruby
qiukun has quit [Remote host closed the connection]
kerunaru has quit [Read error: Connection reset by peer]
qiukun has joined #ruby
qiukun has quit [Remote host closed the connection]
senayar has joined #ruby
senayar has joined #ruby
qiukun has joined #ruby
desmondhume has quit [Remote host closed the connection]
desmondhume has joined #ruby
kerunaru has joined #ruby
unshadow has joined #ruby
qiukun has quit [Remote host closed the connection]
qiukun has joined #ruby
symm- has quit [Ping timeout: 260 seconds]
kerunaru has quit [Read error: Connection reset by peer]
rghose has joined #ruby
qiukun has quit [Remote host closed the connection]
kerunaru has joined #ruby
qiukun has joined #ruby
kerunaru has quit [Read error: Connection reset by peer]
adeponte has left #ruby [#ruby]
al2o3-cr has quit [Quit: WeeChat 1.3]
bMalum has joined #ruby
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
al2o3-cr has joined #ruby
devbug has joined #ruby
Macaveli has joined #ruby
kerunaru has joined #ruby
poorBastard is now known as freddyG
freddyG has quit [Quit: Leaving]
kerunaru has quit [Read error: Connection reset by peer]
Xzanron has joined #ruby
dlitvak has joined #ruby
kerunaru has joined #ruby
sdoda has joined #ruby
adeponte has joined #ruby
blaxter has quit [Ping timeout: 250 seconds]
haraoka has quit [Ping timeout: 260 seconds]
kerunaru has quit [Read error: Connection reset by peer]
glenny has joined #ruby
qiukun has quit [Remote host closed the connection]
dlitvak has quit [Ping timeout: 260 seconds]
rghose1 has joined #ruby
rghose1 has quit [Max SendQ exceeded]
glenny has quit [Read error: Connection reset by peer]
rghose1 has joined #ruby
rghose1 has quit [Max SendQ exceeded]
rghose1 has joined #ruby
glenny has joined #ruby
kerunaru has joined #ruby
kerunaru has quit [Read error: Connection reset by peer]
davedev2_ has quit [Remote host closed the connection]
rghose has quit [Ping timeout: 250 seconds]
ruby-lang730 has joined #ruby
<TomyWork> hi
qiukun has joined #ruby
b0yzn01z3 has joined #ruby
<TomyWork> i've traced a proxy problem from gitlab to httparty to Net::HTTP. The problem is that it seems to ignore the "no_proxy" environment variable. Is there anything I can do about it? like setting a different environment variable that it doesnt ignore?
kerunaru has joined #ruby
stannard has joined #ruby
rodfersou has joined #ruby
kerunaru has quit [Read error: Connection reset by peer]
qiukun has quit [Remote host closed the connection]
qiukun has joined #ruby
baweaver has joined #ruby
<xybre> TomyWork: what versions?
<TomyWork> gitlab 7.1.1, let me check the other ones
jsaak_ has quit [Ping timeout: 260 seconds]
arup_r has joined #ruby
stannard has quit [Ping timeout: 250 seconds]
jsaak has joined #ruby
gaussblurinc1 has quit [Quit: Leaving.]
AlexRussia has joined #ruby
rodfersou has quit [Client Quit]
kerunaru has joined #ruby
rodfersou has joined #ruby
<TomyWork> /usr/local/rvm/rubies/ruby-2.0.0-p247/bin/ruby
gaussblurinc1 has joined #ruby
huyderman has quit [Ping timeout: 260 seconds]
gaussblurinc1 has quit [Client Quit]
Pupp3tm4_ has joined #ruby
<TomyWork> i also found this ruby issue. whch version was that fixed in? I can't quite see it. https://bugs.ruby-lang.org/issues/6546
Pupp3tm4st3r has quit [Read error: Connection reset by peer]
TPBallbag has joined #ruby
TPBallbag is now known as Snowy
kerunaru has quit [Read error: Connection reset by peer]
baweaver has quit [Ping timeout: 260 seconds]
blaxter has joined #ruby
favadi has quit [Ping timeout: 250 seconds]
ruby-lang730 has quit [Ping timeout: 252 seconds]
<xybre> TomyWork: try setting NET::HTTP.proxy_from_env = false?
<xybre> and maybe also proxy_address
<TomyWork> well i kinda know how to do it in ruby
diegoaguilar has quit [Remote host closed the connection]
kerunaru has joined #ruby
kerunaru has quit [Read error: Connection reset by peer]
<TomyWork> however, the part that invokes Net::HTTP is HTTParty, which is a gem used by gitlab. that's 2 layers removed from what i'm willing to mess with
BSaboia has joined #ruby
cwong_on_irc has quit [Quit: Leaving.]
howdoi has joined #ruby
kerunaru has joined #ruby
<xybre> Hmm, I don't know too much about gitlab itself, but I'm not seeing no_proxy mentioned in its source code.
<xybre> Ditto with HTTParty.
kerunaru has quit [Read error: Connection reset by peer]
symm- has joined #ruby
<xybre> It is mentioned in URI though.
yfeldblum has quit [Quit: Leaving...]
kerunaru has joined #ruby
ss_much has quit [Quit: Connection closed for inactivity]
<Bish> i need to patch a gem, what's the best approach to do that?
kerunaru has quit [Read error: Connection reset by peer]
<Bish> install locally? patch?
symm- has quit [Ping timeout: 260 seconds]
kerunaru has joined #ruby
yfeldblum has joined #ruby
ur5us has quit [Remote host closed the connection]
mooru has quit [Ping timeout: 260 seconds]
yfeldblum has quit [Remote host closed the connection]
mooru has joined #ruby
kerunaru has quit [Read error: Connection reset by peer]
yfeldblum has joined #ruby
nettoweb has joined #ruby
<pontiki> fork it, install that version? send back the PR and wait for the owner to merge it
<pontiki> idk, i tend to forget to look for updates when i do that :(
<Bish> how do i fork a gem?
<adaedra> Go the the GitHub page, click "Fork"
<Bish> or do you mean like, on filsystem level
<Bish> yeah okay.. sigh
<pontiki> i'm assuming it's source is on github or bitbucket
<Bish> yeah and i have a feeling that people would never use my patch
<pontiki> yeah, and then you're sort of stuck with that dance forever
<adaedra> Do a PR afterwards to have it merged upstream?
<xybre> Bish: is it possible to wrap the gem instead of modifying the source?
kerunaru has joined #ruby
kerunaru has quit [Read error: Connection reset by peer]
platzhirsch has joined #ruby
<Bish> xybre, im afraid not, because the gem will use that class, even if i create my own, could make monkeypatch it, but i already done that too much :D
<Bish> and the fact there is a comment "this is not like rails does it herpderp" does tell me, they don't want it that way
<Bish> since the comment is longer than the code that would actually do it
<xybre> Bish: if you can't work around it, then you'll have to either not use that gem, or else monkey patch it :(
krz has quit [Ping timeout: 260 seconds]
<Bish> you never see sh* like that coming.
<pontiki> it's exactly like remodeling a kitchen
<pontiki> "whoa, wtf? what's *that* doing there???"
<Bish> i found a LTE usb stick unter my kitchen i built in 3 years ago
<Bish> i never owned a LTE usb stick, nor many people visit me, who could have one
krz has joined #ruby
<Bish> it has a sim card and everything, still clueless how it got there
<pontiki> when we were tearing out a ceiling to join two rooms, i got hit on the head with a metal tape measure
kerunaru has joined #ruby
<adaedra> Bish: NSA.
<pontiki> LOL
<Bish> :D i actually that came to my mind, because seriously none could've lost it there
kerunaru has quit [Read error: Connection reset by peer]
<Bish> not nsa, but bka/lka in my case :3
<pontiki> the spook was crawling around under your kitchen flooring and it fell out of their pocket
<xybre> "Even though you can't see us, we'rs always watching."
gaussblurinc1 has joined #ruby
<Bish> but most likely is my father in law, who always buys shit he thinks he needs, and apparently throws under my refridgerator
<pontiki> maybe the kitty :)
<Bish> BACK TO TOPIC
<Bish> would it be stupid, to download that game, on change it on fs?
<Bish> game, eh eh, s/game/gem/
<pontiki> same same :D
Snowy has quit [Changing host]
Snowy has joined #ruby
<Bish> or do i have a dirty.rb file, which monkey patches all the classes
<xybre> Bish: it'll get overwritten eventually, if you mean vendor it, then well, you're voiding the warranty, but it can be done.
<pontiki> if you don't want to contribute changes back, just clone it, so you can still merge from upstream
<Bish> i don't own a github account, maybe it's time to create one
<adaedra> Bish: either fork and use the forked version, or have a file to savagely monkey patch.
<xybre> Bish: ONE OF US
kerunaru has joined #ruby
<pontiki> do you have another place you store your repos?
<Bish> do usb sticks count?
<adaedra> You can also fork to bitbucket, but merging back would be a bit more difficult :)
<pontiki> cos you can just clone it from github, rename origin to upstream or something, and add a new origin to where you store them
gaussblurinc1 has joined #ruby
<pontiki> usb sticks are absolutely *horrible* long term storage
kerunaru has quit [Read error: Connection reset by peer]
dhjondoh has joined #ruby
workmad3 has joined #ruby
gaussblurinc1 has quit [Client Quit]
<Bish> people who wrote that gem are absolutely hilarious
* Bish always uses PUT as update
<Bish> documentation says "DON'T DO IT THIS WAY, USE PATCH FOR THAT"
<Bish> documentation also says "PATCH is not supported in like forever"
Pupp3tm4_ has quit [Read error: Connection timed out]
<xybre> Bish: sounds like the gem needs a new maintainer
* xybre nudges Bish
Snowy has quit [Quit: don't try and hack my account Ballkenende]
<Bish> if i was the right person for that kind of job, i would do it, im serious
TPBallbag has joined #ruby
Pupp3tm4st3r has joined #ruby
kerunaru has joined #ruby
* adaedra patches Bish
<pontiki> patch is not supported?
TPBallbag has quit [Client Quit]
Snowy has joined #ruby
* xybre puts Bish ?
kerunaru has quit [Read error: Connection reset by peer]
<Bish> pontiki, the HTTP patch command, *specifies*
Schmidt has quit [Ping timeout: 245 seconds]
BSaboia has quit [Ping timeout: 250 seconds]
bronson has joined #ruby
jschmid has quit [Ping timeout: 264 seconds]
kimegede has quit [Read error: Connection reset by peer]
kimegede has joined #ruby
KnownSyntax has quit [Read error: Connection reset by peer]
kerunaru has joined #ruby
kerunaru has quit [Read error: Connection reset by peer]
KnownSyntax has joined #ruby
KnownSyntax has joined #ruby
desmondhume has quit [Read error: Connection reset by peer]
desmondhume has joined #ruby
sigurding has quit [Read error: Connection reset by peer]
sigurding has joined #ruby
edwinvdgraaf has joined #ruby
M-prosodyContext has quit [Ping timeout: 245 seconds]
Macaveli has quit [Ping timeout: 260 seconds]
linc01n has quit [Ping timeout: 260 seconds]
bronson has quit [Ping timeout: 250 seconds]
dlitvak has joined #ruby
Macaveli has joined #ruby
<pontiki> that's deprecated?
linc01n has joined #ruby
kerunaru has joined #ruby
<Bish> pontiki, the patch command?
sandstrom has quit [Quit: My computer has gone to sleep.]
kerunaru has quit [Read error: Connection reset by peer]
nfk|laptop has joined #ruby
M-prosodyContext has joined #ruby
<pontiki> oh, sorry, *webmachine* hasn't supported PATCH in forever
tvw has joined #ruby
<Bish> yep
yfeldblum has quit [Remote host closed the connection]
dmcp has joined #ruby
dmcp has quit [Remote host closed the connection]
dmcp has joined #ruby
dhjondoh has quit [Remote host closed the connection]
bMalum has quit [Quit: bMalum]
jschmid has joined #ruby
dhjondoh has joined #ruby
bubbys has joined #ruby
baweaver has joined #ruby
kerunaru has joined #ruby
towski_ has joined #ruby
<Bish> >> "test"[/t(es)t/]
<ruboto> Bish # => "test" (https://eval.in/478333)
<Bish> can i make it honor groups?
<Bish> yes i can!
kerunaru has quit [Read error: Connection reset by peer]
Macaveli has quit [Ping timeout: 260 seconds]
dhjondoh has quit [Remote host closed the connection]
dhjondoh has joined #ruby
sphex has quit [Ping timeout: 244 seconds]
karapetyan has joined #ruby
infernix has quit [Ping timeout: 244 seconds]
jschmid has quit [Quit: Leaving]
towski_ has quit [Ping timeout: 260 seconds]
baweaver has quit [Ping timeout: 260 seconds]
kerunaru has joined #ruby
jschmid has joined #ruby
kerunaru has quit [Read error: Connection reset by peer]
<canton7> >> "test"[/t(es)t/, 1]
<ruboto> canton7 # => "es" (https://eval.in/478335)
b0yzn01z3 has quit [Remote host closed the connection]
<Bish> yeah i already checked the docs, my mouth was faster once again
dionysus69 has joined #ruby
PaulCape_ has joined #ruby
b0yzn01z3 has joined #ruby
<gregf_> >> "test"[/t(es)t/]; $1
<ruboto> gregf_ # => "es" (https://eval.in/478337)
PaulCapestany has quit [Ping timeout: 260 seconds]
saneax is now known as saneax_AFK
simplyianm has quit [Remote host closed the connection]
kerunaru has joined #ruby
<gregf_> does that [] mean [] is overridden?
simplyianm has joined #ruby
infernix has joined #ruby
<gregf_> something like: class String ; def [] val; self =~ val ? $1 : nil;end;end; "foo"[/(o)/]
<gregf_> >> class String ; def [] val; self =~ val ? $1 : nil;end;end;p [ %r{(i)},%r{(o)} ].map { |r| "foo"[r] } # rather
<ruboto> gregf_ # => [nil, "o"] ...check link for more (https://eval.in/478338)
kerunaru has quit [Read error: Connection reset by peer]
<Bish> why overwritten, it's defined like that in the very string class i guess.
brunto has quit [Ping timeout: 260 seconds]
<Bish> more like def string something; case something; when RegExp ....
AlexRussia has quit [Ping timeout: 245 seconds]
<gregf_> canton7: cheers! :)
gaussblurinc1 has joined #ruby
kerunaru has joined #ruby
ldnunes has joined #ruby
stannard has joined #ruby
spt0 has joined #ruby
kerunaru has quit [Read error: Connection reset by peer]
howdoicomputer has joined #ruby
shredding has joined #ruby
lxsameer has quit [Ping timeout: 250 seconds]
Rickmasta has joined #ruby
kerunaru has joined #ruby
devbug_ has joined #ruby
kerunaru has quit [Read error: Connection reset by peer]
devbug has quit [Ping timeout: 260 seconds]
stannard has quit [Ping timeout: 260 seconds]
karapetyan has quit [Remote host closed the connection]
glenny has quit [Quit: Konversation terminated!]
dravine has quit [Read error: Connection reset by peer]
howdoicomputer has quit [Ping timeout: 260 seconds]
dravine has joined #ruby
nfk|laptop has quit [Ping timeout: 260 seconds]
kerunaru has joined #ruby
gaussblurinc1 has joined #ruby
gaussblurinc1 has quit [Client Quit]
kerunaru has quit [Read error: Connection reset by peer]
rclements has quit [Ping timeout: 260 seconds]
h99h9h88 has joined #ruby
kerunaru has joined #ruby
Mon_Ouie has joined #ruby
kerunaru has quit [Read error: Connection reset by peer]
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rclements has joined #ruby
jgorak has quit [Read error: Connection reset by peer]
KnownSyntax has quit [Read error: Connection reset by peer]
h99h9h88 has quit [Ping timeout: 260 seconds]
KnownSyntax has joined #ruby
kerunaru has joined #ruby
yfeldblum has joined #ruby
lxsameer has joined #ruby
Spleeze has quit [Ping timeout: 260 seconds]
workmad3 has quit [Read error: Connection reset by peer]
jgorak has joined #ruby
workmad3 has joined #ruby
Puffball has quit [Quit: No Ping reply in 180 seconds.]
shanemcd has joined #ruby
prestorium has joined #ruby
akem has joined #ruby
jayne has quit [Read error: Connection reset by peer]
kerunaru has quit [Read error: Connection reset by peer]
connor_goodwolf has quit [Ping timeout: 260 seconds]
sdoda has quit [Ping timeout: 250 seconds]
th0m__ has quit [Ping timeout: 260 seconds]
Snowy has quit []
Puffball has joined #ruby
Snowy has joined #ruby
duncannz has quit [Ping timeout: 260 seconds]
MyMind has joined #ruby
lxsameer has quit [Remote host closed the connection]
kerunaru has joined #ruby
kerunaru has quit [Read error: Connection reset by peer]
shanemcd has quit [Ping timeout: 245 seconds]
sigurding has quit [Quit: sigurding]
Anderson69s has joined #ruby
qiukun has quit [Quit: qiukun]
kedare has joined #ruby
<Bish> is there a method that does [1,2,3] => {0=>1,1=>2,2=>3} ?
bkxd has joined #ruby
Anderson69s has quit [Remote host closed the connection]
<apeiros> Bish: not a single method, but map + with_index + to_h together can do it.
Anderson69s has joined #ruby
Sembei has quit [Ping timeout: 260 seconds]
<adaedra> >> [1, 2, 3].each_with_index { |it, in| [in, it] }.to_h
jschmid has quit [Quit: Leaving]
<ruboto> adaedra # => /tmp/execpad-59ab810b6208/source-59ab810b6208:2: syntax error, unexpected keyword_in, expecting '|' ...check link for more (https://eval.in/478376)
<adaedra> >> [1, 2, 3].each_with_index { |it, id| [id, it] }.to_h
<ruboto> adaedra # => wrong element type Fixnum at 0 (expected array) (TypeError) ...check link for more (https://eval.in/478377)
<al2o3-cr> >> [1,2,3].map.with_index { |n, i| [i, n] }.to_h
<ruboto> al2o3-cr # => {0=>1, 1=>2, 2=>3} (https://eval.in/478378)
<apeiros> adaedra: each… no good. map.
<adaedra> This explains it.
robbyoconnor has quit [Ping timeout: 250 seconds]
Anderson69s has quit [Remote host closed the connection]
th0m__ has joined #ruby
Anderson69s has joined #ruby
Spleeze has joined #ruby
kerunaru has joined #ruby
jayne has joined #ruby
<Bish> how do i throw an exception correcty? without creating a fancy class for it?
<Bish> StandardError.new "whopidu"?
kerunaru has quit [Read error: Connection reset by peer]
peterhil_ has quit [Ping timeout: 260 seconds]
<apeiros> you usually don't throw exceptions, you raise them ;-p
<apeiros> (throw exists too in ruby, and means something different)
<Bish> stupid cs course in university
<j416> Bish: in Java, you would 'throw' an exception.
<apeiros> two ways: a) raise Klass, "message"
<j416> Bish: different languages, different terminology
<apeiros> b) raise Klass.new(args, to, new)
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kerunaru has joined #ruby
<Bish> so what does throw actually do?
<adaedra> Magic.
kerunaru has quit [Read error: Connection reset by peer]
bkxd has quit [Ping timeout: 250 seconds]
<Bish> well, i read the docs, but i remain clueless
sdoda has joined #ruby
<ddv> come on you can look this up
<Bish> ddv, as you can read, i already did
<apeiros> Bish: flow control
<apeiros> Bish: jumping multiple levels of the stack
gaussblurinc1 has joined #ruby
kerunaru has joined #ruby
<Bish> so it's a additional exception handling :o
xaotuk has joined #ruby
<adaedra> It's exception handling.
akem has quit [Quit: Bye]
vasilakisfil has quit [Ping timeout: 240 seconds]
sandstrom has joined #ruby
<Bish> and what is raise and rescue?
marr has quit [Ping timeout: 250 seconds]
<adaedra> It's exception handling.
<canton7> raise/rescue are exception handling. throw/catch are like a setjmp/longjmp
kerunaru has quit [Read error: Connection reset by peer]
Anderson69s has quit [Remote host closed the connection]
Anderson69s has joined #ruby
<Bish> can't see the difference except for terminology
<Bish> you can do control flow with exception handling, the same way, am i wrong?
<Bish> i mean you shouldn't but still
kerunaru has joined #ruby
jas02 has quit [Quit: jas02]
<adaedra> &ri Kernel#raise, Kernel#throw
kerunaru has quit [Read error: Connection reset by peer]
<apeiros> Bish: throw and raise work precisely the same
<apeiros> Bish: the difference is in the intention, in the semantics
gaussblurinc1 has joined #ruby
<apeiros> with raise you inform the reader that you're dealing with exceptional state
jord has quit [Ping timeout: 240 seconds]
bttf has quit [Ping timeout: 240 seconds]
<apeiros> with throw you inform the reader that you're using flow control
<adaedra> And fail? :p
<apeiros> also raise can only raise instances of Exception
gaussblurinc1 has quit [Client Quit]
<apeiros> while throw can (iirc) throw everything
<apeiros> but with throw you set up a specific catch
<Bish> i see, thanks
<adaedra> >> class Potato; end; begin; throw Potato.new; catch Potato => po; p po; end
<ruboto> adaedra # => uncaught throw #<Potato:0x407a3f4c> (UncaughtThrowError) ...check link for more (https://eval.in/478392)
<adaedra> mh.
<Bish> .oO whenever you need that, you're screwed either way.
Kartikay has joined #ruby
<apeiros> adaedra: fail is raise. some people try to make a semantic distinction.
jayne has quit [Read error: Connection reset by peer]
simplyianm has quit [Remote host closed the connection]
simplyianm has joined #ruby
<Bish> what kind of exception would a malformed query be?
<Bish> since im trying to make my first PR worthy.
<adaedra> Why didn't it catch the potato?
<apeiros> >> class Potato; end; potato = Potato.new; catch potato do; throw potato; end # <-- that's how adaedra
<ruboto> apeiros # => nil (https://eval.in/478393)
<Bish> maybe it was a hot potato
RegulationD has joined #ruby
th0m__ has quit [Ping timeout: 250 seconds]
<apeiros> adaedra: because you did it wrong :)
gaussblurinc1 has joined #ruby
<adaedra> ah.
<apeiros> Bish: subclass of ArgumentError probably?
Anderson69s_ has joined #ruby
<apeiros> Bish: maybe an SqlSyntaxError < ArgumentError?
<Bish> im talking about a http query string
gaussblurinc1 has quit [Client Quit]
kerunaru has joined #ruby
<apeiros> Bish: same principle
<Bish> can i define and raise that in one statement?
<apeiros> define?
<Bish> i don't want to write class SqlSyntaxError < Argumenterror end
<adaedra> SqlSyntaxError = Class.new(ArgumentError)
Anderson69s has quit [Quit: Textual IRC Client: www.textualapp.com]
Anderson69s_ is now known as Anderson69s
kerunaru has quit [Read error: Connection reset by peer]
Anderson69s has quit [Client Quit]
<Bish> same thing :D
<adaedra> But yeah, you have to define the constant somewhere if you want to use it
simplyianm has quit [Remote host closed the connection]
<Bish> so i will stick with argumenterror :D
Anderson69s has joined #ruby
<adaedra> It's good to have specialized error classes, it allows to filter errors
RegulationD has quit [Ping timeout: 250 seconds]
<Bish> yeah i know, but i am lazy, and i have to get this done ;D
th0m__ has joined #ruby
<Bish> instead i am monkey patching.
brunto has joined #ruby
sigurding has joined #ruby
kerunaru has joined #ruby
<Bish> >> exception handling to the rescue
<ruboto> Bish # => /tmp/execpad-40d92a83d453/source-40d92a83d453:3: syntax error, unexpected keyword_rescue ...check link for more (https://eval.in/478394)
<Bish> >> exception handling to the rescue nil
<ruboto> Bish # => nil (https://eval.in/478395)
<Bish> eh.eh.
jord has joined #ruby
Kartikay has left #ruby [#ruby]
jayne has joined #ruby
lxsameer has joined #ruby
bttf has joined #ruby
<adaedra> > wrote the code line on IRC
<adaedra> > won't add it to the code because lazy
<Bish> well this was for giggles
nfk|laptop has joined #ruby
kerunaru has quit [Read error: Connection reset by peer]
<Bish> giggles are always worth it
Macaveli has joined #ruby
<adaedra> This is not you average lazyness. This is... advanced lazyness.
krz has quit [Quit: WeeChat 1.2]
sepp2k has joined #ruby
<adaedra> laziness, even.
Rickmasta has joined #ruby
vakor has joined #ruby
<Bish> you'd be surprised
<Bish> this is not even my final form.
<TomyWork> xybre i figured it out. Net::HTTP supports no_proxy, but not the suffix syntax wget etc. support
<TomyWork> no wildcards either
<TomyWork> since i just need a single host, i added that explicitly
kerunaru has joined #ruby
Coldblackice has quit [Ping timeout: 276 seconds]
kerunaru has quit [Read error: Connection reset by peer]
yardenbar has quit [Ping timeout: 250 seconds]
gaussblurinc1 has joined #ruby
gaussblurinc1 has quit [Client Quit]
dionysus69 has quit [Ping timeout: 250 seconds]
vasilakisfil has joined #ruby
sankaber has joined #ruby
decoponio has joined #ruby
kerunaru has joined #ruby
InvGhost has quit [Ping timeout: 264 seconds]
vasilakisfil has quit [Read error: Connection reset by peer]
vasilakisfil has joined #ruby
arup_r has quit [Remote host closed the connection]
ibouvousaime has joined #ruby
gaussblurinc1 has joined #ruby
kerunaru has quit [Read error: Connection reset by peer]
vasilakisfil_ has joined #ruby
allcentury has joined #ruby
vasilakisfil__ has joined #ruby
vasilakisfil has quit [Ping timeout: 240 seconds]
b0yzn01z3 has quit [Remote host closed the connection]
symm- has joined #ruby
kerunaru has joined #ruby
jdawgaz has joined #ruby
gaussblurinc1 has joined #ruby
gaussblurinc1 has quit [Client Quit]
karapetyan has joined #ruby
vasilakisfil_ has quit [Client Quit]
vasilakisfil has joined #ruby
b0yzn01z3 has joined #ruby
dhjondoh has quit [Remote host closed the connection]
gaussblurinc1 has joined #ruby
gaussblurinc1 has quit [Client Quit]
karapetyan has quit [Remote host closed the connection]
kerunaru has quit [Read error: Connection reset by peer]
dhjondoh has joined #ruby
shredding has quit [Ping timeout: 260 seconds]
Vitor_ has joined #ruby
TheBloke has joined #ruby
tk_ has joined #ruby
<shevy> hmmm
<shevy> rescue nil is quite cool
vasilakisfil__ has quit [Ping timeout: 240 seconds]
<shevy> I wonder if we could do it shorter
kerunaru has joined #ruby
kerunaru has quit [Read error: Connection reset by peer]
arup_r has joined #ruby
<Bish> x=['exception handling to']['the']
<Bish> :3
<Bish> or was it irony because everything undefined is nil?
benlovell has joined #ruby
joonty has quit [Quit: joonty]
yardenbar has joined #ruby
arup_r has quit [Ping timeout: 250 seconds]
kerunaru has joined #ruby
yoongkang has quit [Remote host closed the connection]
arup_r has joined #ruby
kerunaru has quit [Read error: Connection reset by peer]
stannard has joined #ruby
toretore has joined #ruby
CloCkWeRX has joined #ruby
postmodern has quit [Quit: Leaving]
nertzy has joined #ruby
xfbs has joined #ruby
kerunaru has joined #ruby
Mon_Ouie has quit [Ping timeout: 260 seconds]
stannard has quit [Ping timeout: 260 seconds]
JDiPierro has joined #ruby
<xybre> TomyWork: interesting, good to know
<shevy> Bish well you made bare words work above there via rescue nil
Robert___ has joined #ruby
<shevy> the only other way I know of how to do this is by using method_missing
shanemcd has joined #ruby
<shevy> Imagine if it would be some special token or something
<shevy> hmm... can't think of something shorter than "rescue nil" though
kerunaru has quit [Read error: Connection reset by peer]
CloCkWeRX has quit [Read error: Connection reset by peer]
<adaedra> shevy: like Ox0dea's rugen does?
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
CloCkWeRX has joined #ruby
SOLDIERz has joined #ruby
bronson has joined #ruby
Elysia has joined #ruby
<Bish> next challenge, how do i save that stuff in a database :/ why did i take sql
<Bish> gee.
<adaedra> Sequel!
<shevy> adaedra what is rugen? if it is by Ox then it is most likely really scary
<Bish> yeah i already use sequel, its great, but doesn't help me much with unspecified amount of columns
Ropeney has joined #ruby
InvGhost has joined #ruby
<adaedra> shevy: github -> Ox0dea/rugen
<adaedra> s/Ox/0x/
casadei has joined #ruby
kerunaru has joined #ruby
kerunaru has quit [Read error: Connection reset by peer]
SalviaNobile has joined #ruby
xfbs has quit []
Ropeney has quit [Client Quit]
shanemcd has quit [Ping timeout: 260 seconds]
bkxd has joined #ruby
mooru has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Bish> storing json in mysql feels so dirty :/ 5.7 has a datatype for that but still
cycorld has quit [Remote host closed the connection]
bronson has quit [Ping timeout: 260 seconds]
kerunaru has joined #ruby
<arup_r> I am trying to refactor this ugly code, https://gist.github.com/aruprakshit/156ea9040da0213aebc5 .. I tried twice to make it beautiful, but failed. I only see 3 classes can be extracted from there.. but not able to see what behaviours are common.. Not able to apply Inhritance there..
<arup_r> any hints.. from where to start ?
<Bish> use case and when?
User458764 has joined #ruby
sdothum has joined #ruby
connor_goodwolf has joined #ruby
<arup_r> asking me ?
kerunaru has quit [Read error: Connection reset by peer]
kerunaru has joined #ruby
InvGhost has quit [Ping timeout: 260 seconds]
yardenbar has quit [Ping timeout: 260 seconds]
<NET||abuse> hi guys. i'm trying to debug yaml files,,, puppet stuff.... i use ruby -e "require 'yaml'; YAML.load_file '/etc/puppet/hiera/locations/aws/prod/jenkins.yaml';" and i get /usr/share/ruby/psych.rb:205:in `parse': (/etc/puppet/hiera/locations/awseuwest1/dotcom/prod/jenkins.yaml): did not find expected key while parsing a block mapping at line 2 column 1 (Psych::SyntaxError)
<Bish> asking you if you know that would be a good idea, since it's exactly the case for what case is for
<Bish> for the rest: you cannot make it pretty, since having the version decided in the protocol isn't pretty to begin with
kerunaru has quit [Read error: Connection reset by peer]
<gregf_> arup_r: i'd just create 3 private methods? assuming those variables are globals
d0nn1e has quit [Ping timeout: 260 seconds]
sdoda has quit [Ping timeout: 260 seconds]
`derpy has quit [Remote host closed the connection]
adaedra has quit [Remote host closed the connection]
<arup_r> you mean each inner if-else is one method ?
devbug_ has quit [Ping timeout: 245 seconds]
baweaver has joined #ruby
rghose1 has quit [Quit: Leaving.]
<arup_r> those if-else code has repetition ,, but not much common in between though, so it is hard to refactor
<apeiros> NET||abuse: so your yaml files has invalid syntax starting latest at line 2, column 1
d0nn1e has joined #ruby
<apeiros> NET||abuse: can't say more without seeing the yaml
kerunaru has joined #ruby
kerunaru has quit [Read error: Connection reset by peer]
<NET||abuse> apeiros: i've copied and pasted the first few lines from the alternate jenkins.yaml in stage directory, and it's not working.
adaedra has joined #ruby
rghose has joined #ruby
psantos has joined #ruby
<arup_r> but I was trying it to do.. when I ended up with 3 classes, but really couldn't throw out those if-else .. there are sticked like a tatto
<apeiros> NET||abuse: given that it says *line 2*, that's quite expected.
<NET||abuse> line 2 of the yaml file yes? I've take the first 10 or so lines from a working file and copied and pasted them in and it's not working.
JDiPierro has quit [Remote host closed the connection]
<gregf_> arup_r: right, also i dont get that return. it will 'always' return?
<apeiros> NET||abuse: I can't help with "not working" either.
<gregf_> oh, theres more code that follows :|
troulouliou_div2 has joined #ruby
<apeiros> as said: gist yaml and exception
<arup_r> gregf_: it is a Rails code, but Ruby thing.. So in benteen when I am rendering, need to HARD return
`derpy has joined #ruby
<apeiros> arup_r: no you don't.
<apeiros> arup_r: you need to control your flow so that nothing else happens
baweaver has quit [Ping timeout: 260 seconds]
<arup_r> apeiros: after the if-else also some code they also render, so before them if I want to render and I need to return to avoid double render exception
<apeiros> "I need return" translates to "I do stuff after those lines unconditionally, but shouldn't under certain conditions, therefore I do (not need) return"
<apeiros> arup_r: see? nailed it.
<apeiros> don't justify bad code with the presence of other bad code.
<NET||abuse> apeiros: I mean, i have stage/jenkins.yaml and /prod/jenkins.yaml The former file works, prod/jenkins.yaml has the error "line 2 column 1" error,,, then i copied and pasted the first 10 or so lines from stage/jenkins.yaml into prod/jeknins.yaml overwritting those lines.. and it still returns the same error
kerunaru has joined #ruby
<apeiros> NET||abuse: then something isn't working the way you assume it to work. anyway, with the given information, I can't help.
<pontiki> NET||abuse: gist the bloodly file, it'd help oh so much
kerunaru has quit [Read error: Connection reset by peer]
hanmac1 has quit [Ping timeout: 250 seconds]
<arup_r> this is the codebase I got and I need to add feature,, it is not me .. it is someone else, but I am trying to give it a shape.. but I am failed now. :)
<arup_r> it is a result of not reviewed codebase.. it became a shit now
yfeldblum has quit [Ping timeout: 250 seconds]
<apeiros> arup_r: no wonder if you stop half-way.
<apeiros> arup_r: either give it a shape or leave it be. half-arsed stuff won't help anybody.
User458764 has quit [Ping timeout: 260 seconds]
<apeiros> in the opposite - it'll only make things worse
<arup_r> you are correct
<arup_r> it is hard
<arup_r> I will add featured in between those if-else..
ibouvousaime has quit [Ping timeout: 260 seconds]
<NET||abuse> apeiros: i'll setup a gist or something, give me a few mins.
<arup_r> what a job I got.. :/
<NET||abuse> pontiki: no need for abbrasiveness.. we're all friends here..
<pontiki> are we?
<pontiki> then why don't you do what's been asked several times?
kerunaru has joined #ruby
<NET||abuse> pontiki: sometimes it's hard to paste things due to content, passwords, company privacy,, so it's not always obvious
* apeiros wouldn't have categorized that as abrasive
<arup_r> apeiros: thanks for the suggestion though.
User458764 has joined #ruby
<pontiki> that is in the first two lines of you yaml file??
<apeiros> NET||abuse: that just means you have to work a bit harder.
aryaching has joined #ruby
sdoda has joined #ruby
<apeiros> as in: replace sensitive information by non-sensitive information.
<NET||abuse> apeiros: yup, i'm donig that, just taking a minute to prepare the files
<apeiros> but as pontiki suggested - yaml reports an error in the 2nd line. you can just cut everything after.
* apeiros brb
kerunaru has quit [Read error: Connection reset by peer]
<NET||abuse> pontiki: the mystery is that the first 2 lines of the file are identical to the first 2 lines of a file that works fine.
TomPeed has joined #ruby
allcentury has quit [Ping timeout: 260 seconds]
Robert___ has quit [Ping timeout: 250 seconds]
ibouvousaime has joined #ruby
kerunaru has joined #ruby
kerunaru has quit [Read error: Connection reset by peer]
jas02 has joined #ruby
Anderson69s has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
howdoicomputer has joined #ruby
gusTester has joined #ruby
shredding has joined #ruby
nateberkopec has joined #ruby
dhjondoh has quit [Remote host closed the connection]
dhjondoh has joined #ruby
hanmac has joined #ruby
kerunaru has joined #ruby
sdoda has quit [Quit: Leaving]
howdoicomputer has quit [Ping timeout: 245 seconds]
kerunaru has quit [Read error: Connection reset by peer]
Anderson69s has joined #ruby
tvw has quit [Ping timeout: 240 seconds]
sgambino has joined #ruby
bluOxigen has joined #ruby
kerunaru has joined #ruby
xfbs has joined #ruby
ta_ has quit [Remote host closed the connection]
gaussblurinc1 has joined #ruby
<apeiros> NET||abuse: that sounds more and more like it's not loading the file you think it's loading
TheBloke has quit [Read error: Connection reset by peer]
kerunaru has quit [Read error: Connection reset by peer]
aryaching has quit [Ping timeout: 250 seconds]
TheBloke has joined #ruby
xfbs has quit [Client Quit]
stamina has joined #ruby
dhjondoh has quit [Remote host closed the connection]
dhjondoh has joined #ruby
aryaching has joined #ruby
wprice has joined #ruby
kerunaru has joined #ruby
kerunaru has quit [Read error: Connection reset by peer]
joonty has joined #ruby
psantos has quit [Read error: Connection reset by peer]
psantos has joined #ruby
sepp2k has quit [Ping timeout: 245 seconds]
bMalum has joined #ruby
cycorld has joined #ruby
sphex has joined #ruby
voodo has joined #ruby
kerunaru has joined #ruby
TomPeed is now known as pdev_memories
yoongkang has joined #ruby
kerunaru has quit [Read error: Connection reset by peer]
mooru has joined #ruby
TheHodge has joined #ruby
xfbs has joined #ruby
joonty has quit [Quit: joonty]
bMalum has quit [Ping timeout: 250 seconds]
kerunaru has joined #ruby
kerunaru has quit [Read error: Connection reset by peer]
Osw has joined #ruby
TheBloke has quit [Quit: Textual IRC Client: www.textualapp.com]
yoongkang has quit [Ping timeout: 260 seconds]
s00pcan has quit [Ping timeout: 260 seconds]
TheBloke has joined #ruby
kerunaru has joined #ruby
casadei has quit [Remote host closed the connection]
s00pcan has joined #ruby
shanemcd has joined #ruby
bMalum has joined #ruby
cwong_on_irc has joined #ruby
kerunaru has quit [Read error: Connection reset by peer]
resure has joined #ruby
<resure> Why few OpenSSL::BN.generate_prime calls generate the same number?
vasilakisfil_ has joined #ruby
TheBloke has quit [Quit: Textual IRC Client: www.textualapp.com]
joonty has joined #ruby
kerunaru has joined #ruby
kerunaru has quit [Read error: Connection reset by peer]
shanemcd has quit [Ping timeout: 260 seconds]
malconis has joined #ruby
TheBloke has joined #ruby
vasilakisfil has quit [Ping timeout: 240 seconds]
malconis has quit [Remote host closed the connection]
davedev24 has joined #ruby
moeabdol has joined #ruby
malconis has joined #ruby
<apeiros> resure: doesn't for me? you use a too low number of bits?
cdg has joined #ruby
bMalum has quit [Ping timeout: 260 seconds]
DurstBurger has quit [Ping timeout: 276 seconds]
pdev_memories has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
gaussblurinc1 has joined #ruby
gaussblurinc1 has quit [Client Quit]
<resure> apeiros: ah, looks like this, I tried 32 bits. Thanks
kerunaru has joined #ruby
JDiPierro has joined #ruby
<apeiros> depending on your domain, that can be fine. see birthday paradoxon (probability of collision)
gusTester has quit [Quit: Leaving.]
d0nn1e has quit [Ping timeout: 260 seconds]
psantos has quit [Read error: Connection reset by peer]
<resure> apeiros: sure, thanks again
resure has left #ruby [#ruby]
gaussblurinc1 has joined #ruby
gaussblurinc1 has quit [Client Quit]
psantos has joined #ruby
d0nn1e has joined #ruby
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kerunaru has quit [Read error: Connection reset by peer]
darkxploit has quit [Ping timeout: 260 seconds]
goodcodeguy has joined #ruby
aryaching has quit []
joonty has quit [Quit: joonty]
<shevy> I also want to have a paradoxon for my next birthday
shanemcd has joined #ruby
<apeiros> oh, they left. I had let it run for a while, generated 500k numbers with 32bits and hat zero collisions.
<yorickpeterse> you hat zero collisions? that sounds serious
kerunaru has joined #ruby
<apeiros> yes. it's a nice hat.
<apeiros> for serious days.
kerunaru has quit [Read error: Connection reset by peer]
joonty has joined #ruby
<apeiros> hm, had collisions.
<apeiros> I stored the OpenSSL::BN instance, which apparently doesn't have a proper #hash and #eql? implementation
gaussblurinc1 has joined #ruby
<apeiros> and it seems I had 157.348 collisions. that is indeed *huge*.
<apeiros> intuitively I'd expect a single-digit number of collisions.
kerunaru has joined #ruby
<apeiros> ok, 25 collisions with mersenne twister. 38 with whatever securerandom uses.
<apeiros> so two digit number of collisions. or a couple of magnitudes less. OpenSSL::BN reeks.
jdawgaz has joined #ruby
<apeiros> aaah, silly me. it's not just a random number. it's a random number *prime*
<apeiros> and there are *of course* far less than 500k numbers prime in 0..500k
jdawgaz has quit [Client Quit]
Wsewolod has joined #ruby
kerunaru has quit [Read error: Connection reset by peer]
jdawgaz has joined #ruby
mickey_mouse has quit [Ping timeout: 260 seconds]
gusTester has joined #ruby
codecop has quit [Remote host closed the connection]
kerunaru has joined #ruby
kerunaru has quit [Read error: Connection reset by peer]
jdawgaz has quit [Client Quit]
joonty has quit [Quit: joonty]
kerunaru has joined #ruby
tagrudev has quit [Remote host closed the connection]
gaussblurinc1 has joined #ruby
gaussblurinc1 has quit [Client Quit]
voodo has quit [Quit: Linkinus - http://linkinus.com]
yardenbar has joined #ruby
kerunaru has quit [Read error: Connection reset by peer]
gaussblurinc1 has joined #ruby
gaussblurinc1 has quit [Client Quit]
<yorickpeterse> are you hacking things?
<yorickpeterse> only hackers use primes
psantos has quit [Read error: Connection reset by peer]
howdoicomputer has joined #ruby
psantos has joined #ruby
<Xzanron> so all mathematicians are hackers?
<yorickpeterse> yes
ELCALOR is now known as \
<Xzanron> explains much :)
kerunaru has joined #ruby
\ is now known as ELCALOR
krobzaur has joined #ruby
<yorickpeterse> all of them are evil Soviet computer hackers
xfbs has quit []
jdawgaz has joined #ruby
tk_ has quit [Quit: ばいばい]
mary5030 has joined #ruby
kerunaru has quit [Read error: Connection reset by peer]
The_Phoenix has joined #ruby
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
howdoicomputer has quit [Ping timeout: 260 seconds]
cwong_on_irc has quit [Quit: Leaving.]
<apeiros> yorickpeterse: see question above ;-)
gaussblurinc1 has joined #ruby
gaussblurinc1 has quit [Client Quit]
jschmid has joined #ruby
kerunaru has joined #ruby
kerunaru has quit [Read error: Connection reset by peer]
krz has joined #ruby
psantos has quit [Read error: Connection reset by peer]
peterhil_ has joined #ruby
dhjondoh has quit [Remote host closed the connection]
tagrudev has joined #ruby
psantos has joined #ruby
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
psantos has quit [Read error: Connection reset by peer]
kerunaru has joined #ruby
TheBloke has quit [Quit: Textual IRC Client: www.textualapp.com]
psantos has joined #ruby
last_staff has joined #ruby
vikas027 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kerunaru has quit [Read error: Connection reset by peer]
darkxploit has joined #ruby
vikas027 has joined #ruby
akem has joined #ruby
andikr has quit [Remote host closed the connection]
TheBloke has joined #ruby
psantos has quit [Read error: Connection reset by peer]
_stu_ has joined #ruby
aganov has quit [Remote host closed the connection]
psantos has joined #ruby
kerunaru has joined #ruby
kerunaru has quit [Read error: Connection reset by peer]
GinoManWorks has joined #ruby
rodfersou is now known as rodfersou|lunch
psantos has quit [Read error: Connection reset by peer]
JDiPierro has quit [Remote host closed the connection]
psantos has joined #ruby
<GinoManWorks> Hey, I'm on windows and I noticed that there are two *.a files in the "lib" directory of my ruby installation. one is libx64-msvcrt-ruby210.dll.a and the other is libx64-msvcrt-ruby210-static.a... shouldn't those have a .dll, and .lib extension respectively?
psantos has quit [Read error: Connection reset by peer]
pdoherty has joined #ruby
kerunaru has joined #ruby
psantos has joined #ruby
kerunaru has quit [Read error: Connection reset by peer]
<symm-> dll files can be any extension if you load them explicitly with LoadLibrary
InvGhost has joined #ruby
<symm-> I have libx64-msvcrt-ruby210.dll.a too on windows... and it's not even a PE/DLL file
gaussblurinc1 has joined #ruby
joonty has joined #ruby
casadei has joined #ruby
mooe has quit [Quit: Connection closed for inactivity]
allcentury has joined #ruby
vikas027 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kerunaru has joined #ruby
Guest16359 has quit [Ping timeout: 260 seconds]
diegoviola has joined #ruby
kerunaru has quit [Read error: Connection reset by peer]
freerobby has joined #ruby
nateberkopec has quit [Quit: Leaving...]
unshadow has quit [Quit: leaving]
kerunaru has joined #ruby
svoop has joined #ruby
DurstBurger has joined #ruby
minimalism has quit [Quit: leaving]
kerunaru has quit [Read error: Connection reset by peer]
mary5030 has quit [Remote host closed the connection]
mary5030 has joined #ruby
rghose has quit [Quit: Leaving.]
maloik has quit [Ping timeout: 250 seconds]
kerunaru has joined #ruby
frem has joined #ruby
kerunaru has quit [Read error: Connection reset by peer]
DurstBurger has quit [Ping timeout: 260 seconds]
stannard has joined #ruby
maloik has joined #ruby
vasilakisfil_ has quit [Read error: Connection reset by peer]
InvGhost has quit [Ping timeout: 260 seconds]
nateberkopec has joined #ruby
tagrudev has quit [Remote host closed the connection]
benlovell has quit [Quit: Lost terminal]
arup_r has quit [Remote host closed the connection]
griffindy has joined #ruby
maloik has quit [Ping timeout: 245 seconds]
pwnd_nsfw has quit [Ping timeout: 260 seconds]
maloik has joined #ruby
DexterLB has quit [Ping timeout: 260 seconds]
pestle has quit [Ping timeout: 260 seconds]
Nilium has quit [Ping timeout: 260 seconds]
simplyianm has joined #ruby
last_staff has quit [Quit: last_staff]
gf3 has joined #ruby
mooru has quit [Ping timeout: 250 seconds]
amoeba_ has joined #ruby
sankaber has quit [Remote host closed the connection]
DexterLB has joined #ruby
pestle has joined #ruby
last_staff has joined #ruby
sankaber has joined #ruby
psantos has quit [Read error: Connection reset by peer]
amoeba has quit [Killed (leguin.freenode.net (Nickname regained by services))]
amoeba_ is now known as amoeba
psantos has joined #ruby
rghose has joined #ruby
amoeba` has joined #ruby
RegulationD has joined #ruby
simplyianm has quit [Ping timeout: 250 seconds]
roxtrongo has quit [Read error: Connection reset by peer]
Nilium has joined #ruby
dmonster has quit [Quit: Leaving]
anisha has quit [Quit: Leaving]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
jackcom has joined #ruby
jackcom has left #ruby [#ruby]
roxtrongo has joined #ruby
infernix has quit [Ping timeout: 250 seconds]
psantos has quit [Read error: Connection reset by peer]
yardenbar has quit [Ping timeout: 245 seconds]
grill has joined #ruby
psantos has joined #ruby
mjuszczak has joined #ruby
zotherstupidguy has quit [Quit: WeeChat 1.3]
pwnd_nsfw has joined #ruby
last_staff has quit [Quit: last_staff]
pandaant has joined #ruby
suchness has quit [Ping timeout: 246 seconds]
moeabdol1 has joined #ruby
momomomomo has joined #ruby
gaussblurinc1 has joined #ruby
Guest16359 has joined #ruby
moeabdol has quit [Ping timeout: 260 seconds]
saneax_AFK is now known as saneax
howdoicomputer has joined #ruby
<ljarvis> can anyone recommend a gem for handling cc validation? (luhn alg but with more functionality for ex)
<ljarvis> number validation, I should point out
<ljarvis> maybe this will do https://github.com/joeljunstrom/ruby_luhn
<apeiros> ljarvis: if all you want is luhn, then that's trivial to implement. recognizing the cc type is a bit of more work. but mostly just a lookup. I have some code lying around already (not yet used in prod, though)
<ljarvis> yeah, maybe I shouldnt care about that
<ljarvis> right now we ask for the type anyway, and I don't care much about validating against the type. Maybe in the future
<apeiros> oh, though, my code is based on a library I haven't released yet :-/
<ljarvis> I guess I'm over complicating it and I probably just want luhn
<yorickpeterse> ljarvis: regex
* yorickpeterse runs
<apeiros> yeah, well, luhn really is trivial. and given how trivial it is, I'd assume the link you showed will work just fine.
<ljarvis> aye
<ljarvis> yorickpeterse: *bumps fist*
<apeiros> ljarvis: oh, btw., do you have any idea why here yard doesn't pick up the documentation for all methods & constants except preload! https://github.com/apeiros/zeroload/blob/master/lib/Zeroload.rb ?
howdoicomputer has quit [Ping timeout: 245 seconds]
<apeiros> s/all/any/
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<ljarvis> apeiros: as someone who dislikes YARD, I'm prob not the best person to ask (yorick would be better)
<apeiros> oh, damit, why do I always mix you and lsegal up?
<ljarvis> heh :)
<apeiros> sorry :)
<adaedra> apeiros: #yard
<ljarvis> np :)
gaussblurinc1 has quit [Quit: Leaving.]
<apeiros> adaedra: good idea
<adaedra> I still have to ask about File.exists?
diegoaguilar has joined #ruby
<adaedra> &ri File.exist
<yorickpeterse> apeiros: dunno, not that familiar with YARD internals
<adaedra> Mh.
Azure has joined #ruby
<apeiros> File.exist?, not exists?
neanderslob has quit [Read error: Connection reset by peer]
<apeiros> matz thinks of methods as 2nd person: "File, do you exist?"
<apeiros> yorickpeterse: I took it over to #yard
AlexRussia has joined #ruby
<adaedra> >> File.exists?
<ruboto> adaedra # => wrong number of arguments (0 for 1) (ArgumentError) ...check link for more (https://eval.in/478492)
<adaedra> Both exists
binaryplease has joined #ruby
freerobby has quit [Quit: Leaving.]
<adaedra> But iirc, neither are picked up by yard
infernix has joined #ruby
Azure|dc has quit [Ping timeout: 250 seconds]
<apeiros> adaedra: nope
<apeiros> rails defines .exists?
<apeiros> but vanilla ruby does not
<apeiros> ooh, wait, what?
skade has quit [Quit: Computer has gone to sleep.]
<adaedra> apeiros: so ruboto loads rails?
joonty has quit [Quit: joonty]
<apeiros> nope
<apeiros> when the heck did that happen?
<apeiros> huh, a long time ago it seems?
<adaedra> "Deprecated"
wprice has quit [Quit: wprice]
<apeiros> what on earth. it exists since way back in 1.8.6
<apeiros> memory fails me :(
* adaedra downloads more RAM for apeiros
<apeiros> NVRAM please.
<apeiros> or better yet, some flash.
Xzanron has quit [Quit: Leaving]
<adaedra> Sorry, no flash, only HTML5.
arup_r has joined #ruby
railswebdev has joined #ruby
Guest16359 has quit [Quit: Leaving]
slawrence00 has joined #ruby
* apeiros smacks adaedra with terminology
I has joined #ruby
I has quit [Client Quit]
dopie has joined #ruby
blackmesa has joined #ruby
JDiPierro has joined #ruby
freerobby has joined #ruby
<adaedra> Dat violence. I'm reporting you.
allcentury has quit [Ping timeout: 245 seconds]
weemsledeux has joined #ruby
<apeiros> you snitch!
joonty has joined #ruby
<adaedra> Flattery will get you nowhere.
desmondhume has quit [Remote host closed the connection]
cpup has quit [Ping timeout: 245 seconds]
desmondhume has joined #ruby
Log1x has quit [Ping timeout: 245 seconds]
gaussblurinc1 has joined #ruby
<yorickpeterse> snitches get stitches
humd1ng3r has quit [Ping timeout: 245 seconds]
psantos has quit [Read error: Connection reset by peer]
e7d has quit [Read error: Connection reset by peer]
cpup has joined #ruby
Log1x has joined #ruby
psantos has joined #ruby
deadpoet_ has quit [Quit: Connection closed for inactivity]
humd1ng3r has joined #ruby
jas02 has quit [Quit: jas02]
blackmesa has quit [Quit: WeeChat 1.3]
lubekpl has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
yoongkang has joined #ruby
monthy has joined #ruby
binaryplease has quit [Quit: WeeChat 1.3]
casadei has quit [Remote host closed the connection]
psantos has quit [Read error: Connection reset by peer]
yoongkang has quit [Ping timeout: 250 seconds]
psantos has joined #ruby
nettoweb has joined #ruby
User458764 has joined #ruby
User458764 has quit [Max SendQ exceeded]
User458764 has joined #ruby
Dood has quit [Ping timeout: 245 seconds]
nkwsy___2 has quit [Ping timeout: 260 seconds]
Rodya_ has joined #ruby
wprice has joined #ruby
psantos has quit [Read error: Connection reset by peer]
hd1 has joined #ruby
centrx has joined #ruby
psantos has joined #ruby
peterhil_ has quit [Ping timeout: 245 seconds]
momomomomo has quit [Quit: momomomomo]
Xiti has joined #ruby
roxtrongo has quit [Remote host closed the connection]
shinenelson has quit [Quit: Connection closed for inactivity]
kimegede has quit [Quit: Leaving...]
B1n4r10 has joined #ruby
<GinoManWorks> symm: what about "#pragma comment (lib, "libx64-msvcrt-ruby210.dll.a")"?
azgil has joined #ruby
kerunaru has joined #ruby
akem has quit [Quit: Bye]
psantos has quit []
rodfersou|lunch is now known as rodfersou
lxsameer has quit [Remote host closed the connection]
dhollinger has joined #ruby
pdoherty has quit [Remote host closed the connection]
gaussblurinc1 has joined #ruby
gaussblurinc1 has quit [Client Quit]
Tempesta has quit [Ping timeout: 245 seconds]
dmonster has joined #ruby
pdoherty has joined #ruby
roshanavand has quit [Remote host closed the connection]
Osw has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
gaussblurinc1 has joined #ruby
Tempesta has joined #ruby
maddmaxx has joined #ruby
mwksl has joined #ruby
dmonster has quit [Client Quit]
snockerton has joined #ruby
solars has quit [Ping timeout: 250 seconds]
neanderslob has joined #ruby
<mwksl> \q
sepp2k has joined #ruby
argoneus has joined #ruby
<mwksl> oops. Wrong term
klingeldraht has joined #ruby
mwksl has quit [Client Quit]
blueOxigen has joined #ruby
pdoherty has quit [Remote host closed the connection]
desmondhume has quit [Read error: Connection reset by peer]
desmondhume has joined #ruby
bluOxigen has quit [Ping timeout: 245 seconds]
rghose has quit [Quit: Leaving.]
joonty has quit [Quit: joonty]
gaussblurinc1 has joined #ruby
neanderslob has quit [Ping timeout: 260 seconds]
dmonster has joined #ruby
gaussblurinc1 has quit [Client Quit]
Pupp3tm4st3r has quit [Remote host closed the connection]
neanderslob has joined #ruby
SOLDIERz has quit [Ping timeout: 245 seconds]
ebertx has quit [Ping timeout: 245 seconds]
voodo has joined #ruby
gaussblurinc1 has joined #ruby
Karunamon has quit [Ping timeout: 260 seconds]
gaussblurinc1 has quit [Client Quit]
Gnut has joined #ruby
jds has joined #ruby
ebertx has joined #ruby
gaussblurinc1 has joined #ruby
howdoicomputer has joined #ruby
SalviaNobile has quit [Ping timeout: 250 seconds]
gaussblurinc1 has quit [Client Quit]
arturmartins has joined #ruby
hahuang65 has quit [Ping timeout: 260 seconds]
allcentury has joined #ruby
DurstBurger has joined #ruby
hd1 has left #ruby [#ruby]
Karunamon has joined #ruby
chouhoul_ has joined #ruby
howdoicomputer has quit [Ping timeout: 250 seconds]
freerobby has quit [Read error: Connection reset by peer]
techietrash has quit [Ping timeout: 260 seconds]
freerobby has joined #ruby
colegatron has joined #ruby
arturmartins has quit [Client Quit]
gaussblurinc1 has joined #ruby
momomomomo has joined #ruby
gaussblurinc1 has quit [Client Quit]
techietrash has joined #ruby
techietrash has quit [Changing host]
techietrash has joined #ruby
momomomomo has quit [Client Quit]
shredding has quit [Ping timeout: 260 seconds]
Jackneill has joined #ruby
joonty has joined #ruby
Anderson69s has quit [Quit: Textual IRC Client: www.textualapp.com]
chouhoulis has quit [Ping timeout: 260 seconds]
Anderson69s has joined #ruby
aufi has quit [Quit: Konversation terminated!]
chouhoul_ has quit [Client Quit]
cwong_on_irc has joined #ruby
YP-QMUL-W has joined #ruby
SCHAAP137 has quit [Remote host closed the connection]
freerobby has quit [Read error: Connection reset by peer]
freerobby1 has joined #ruby
bronson has joined #ruby
momomomomo has joined #ruby
casadei has joined #ruby
trautwein has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dreamscape has joined #ruby
millerti has joined #ruby
<dreamscape> hello all, can someone help me get this running? wayback_machine_downloader
darkxploit has quit [Quit: Leaving]
<jhass> dreamscape: that's hard to estimate, given you didn't describe your problem at all
<millerti> I'm encountering something weird. I'm calling a method using the splat operator. The array being splatted may have 2 or 3 elements. So I have 2 and 3-argument versions of the method being called. However, when I call using splat, I get an error that I'm passing 2 instead of 3 arguments. Have I encounted a weird Ruby corner case?
pandaant has quit [Remote host closed the connection]
<havenwood> dreamscape: Have it installed yet? What's not working?
<mozzarella> millerti: show code and error
<jhass> millerti: probably not, can't judge without seeing code and real error message
bronson has quit [Ping timeout: 260 seconds]
nfk|laptop has quit [Quit: yawn]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<millerti> So the caller is like this x = do_carry(*j)
<millerti> OH. That explains it. Thanks, centrx
gsingh93 has quit [Ping timeout: 245 seconds]
maloik has quit [Ping timeout: 260 seconds]
Spleeze has quit [Ping timeout: 245 seconds]
<dreamscape> well i've cloned it via the git, not sure what to do next.. sorry new to ruby etc
<havenwood> dreamscape: Do you have Ruby installed?
<havenwood> dreamscape: ruby -v
<jhass> dreamscape: why? https://github.com/hartator/wayback-machine-downloader#installation doesn't mention to do so
TomPeed has joined #ruby
<argoneus> I'm starting out with ruby and all the time I see code like Configurer do |config| config.bla end, is there a name for this?
<havenwood> argoneus: A block?
<havenwood> argoneus: The `|config|` is a block argument.
<jhass> argoneus: not really, it's just calling a block and yielding an object with accessors to it
Jardayn has joined #ruby
<dreamscape> yes i have Ruby
hxegon has joined #ruby
<havenwood> dreamscape: And it's version 1.9+ as well?
Ox0dea has joined #ruby
gsingh93 has joined #ruby
<dreamscape> not to worry I've got it working now :) thank you for your help
<Ox0dea> argoneus: I've seen it referred to as a "configurator", but that's not particularly great.
<argoneus> hm
<havenwood> dreamscape: Yell if you get stuck. Happy coding!
<dreamscape> thank you
Spleeze has joined #ruby
<Ox0dea> centrx: For what it's worth, Ruby is sufficiently malleable that you can essentially bolt on "method overloading": https://eval.in/434678
<argoneus> I guess I need to read up on a bit more
<Ox0dea> It's not something you should actually do, of course, but I think it's a really neat trick.
<argoneus> this "object do |bla|" syntax is new to me still
<centrx> neato
<Ox0dea> argoneus: s/object/method/
TomPeed has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kies has joined #ruby
robbyoconnor has joined #ruby
InvGhost has joined #ruby
anti-freeze has joined #ruby
codecop has joined #ruby
howdoi has quit [Quit: Connection closed for inactivity]
sigurding has quit [Quit: sigurding]
InvGhostt has joined #ruby
momomomomo has quit [Quit: momomomomo]
gaussblurinc1 has joined #ruby
roxtrongo has joined #ruby
InvGhosttt has joined #ruby
maloik has joined #ruby
sigurding has joined #ruby
TheBloke- has joined #ruby
TheBloke has quit [Read error: Connection reset by peer]
<argoneus> ah
<argoneus> so basically the method do |stuff| stuff
<argoneus> basically the method yields values and I process them, right?
InvGhost has quit [Ping timeout: 264 seconds]
gaussblurinc1 has joined #ruby
InvGhostt has quit [Ping timeout: 264 seconds]
kies has quit [Ping timeout: 260 seconds]
hectortrope has quit [Remote host closed the connection]
<jhass> argoneus: usually you just yield an object with accessors, class Config; attr_accessor :foo; end; def configure; config = Config.new; yield config; config; end; result = configure |config| config.foo = "bar"; end; result.foo #=> "bar"
gaussblurinc1 has quit [Client Quit]
roxtrongo has quit [Ping timeout: 260 seconds]
<jhass> er plus the missing do
maloik has quit [Ping timeout: 245 seconds]
<jhass> I returned the Config instance here, but usually you would save it to an instance variable or something
<argoneus> why yield config; config;?
Vitor_ has quit [Remote host closed the connection]
towski_ has joined #ruby
<argoneus> so it returns config?
momomomomo has joined #ruby
<jhass> yield config calls the block and passes config as the first argument
<jhass> the second config just returns it from the method call
<jhass> replace ; with newlines
Couch has quit [Ping timeout: 260 seconds]
<argoneus> so that way I can both use it with a block
<argoneus> or just do something like config = configurer
momomomomo has quit [Client Quit]
gaussblurinc1 has joined #ruby
based_pdev_ has joined #ruby
tildes has joined #ruby
gaussblurinc1 has quit [Client Quit]
Osw has joined #ruby
`based_pdev` has quit [Ping timeout: 245 seconds]
Pumukel has quit [Ping timeout: 250 seconds]
krobzaur has quit [Quit: WeeChat 1.2]
<argoneus> ruby is hard
<jhass> argoneus: well, not in this case, the yield is unconditional, so when there's no block ruby will raise
<argoneus> oh
brunto has quit [Ping timeout: 260 seconds]
devbug has joined #ruby
<adaedra> ruby's not so hard.
<jhass> I just returned it for demonstration purposes here really
<argoneus> I like some of the syntax
<argoneus> like array.collect!, the !
<adaedra> aah, the !.
<argoneus> its like collect it you dork or ill have your head!
<adaedra> It usually denotes a mutating operation.
<adaedra> like collect! is like collect, except it does it in place.
joonty has quit [Quit: joonty]
BSaboia has joined #ruby
gaussblurinc1 has joined #ruby
gizmore has joined #ruby
<Ox0dea> >> a = [1,2,3]; a.uniq!
<ruboto> Ox0dea # => nil (https://eval.in/478517)
gaussblurinc1 has quit [Client Quit]
nkwsy__ has joined #ruby
voodo is now known as voodo|away
allcentury has quit [Quit: WeeChat 1.2]
<Ox0dea> The builtin "bang" methods have more semantics than just that they're destructive.
edwinvdgraaf has quit [Ping timeout: 260 seconds]
User458764 has joined #ruby
voodo|away is now known as voodo
<jhass> it always feels odd when people actually exploit them though
<Ox0dea> That's a social problem.
SCHAAP137 has joined #ruby
<Ox0dea> As indicated by your using "exploit" rather than "utilize". :<
aspiers has quit [Ping timeout: 250 seconds]
zast has quit [Ping timeout: 250 seconds]
edwinvdgraaf has joined #ruby
mclee has quit [Ping timeout: 245 seconds]
maloik has joined #ruby
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
devbug has quit [Read error: Connection reset by peer]
nkwsy__ has quit [Ping timeout: 250 seconds]
psy_ has joined #ruby
psy_ has quit [Max SendQ exceeded]
JiYu has joined #ruby
devbug has joined #ruby
gaussblurinc1 has joined #ruby
SCHAAP137 has quit [Ping timeout: 250 seconds]
gaussblurinc1 has joined #ruby
<JiYu> does anyone got a three liner how to replace a line with itself (plus adding some characters before it)?
Vitor_ has joined #ruby
gaussblurinc1 has quit [Client Quit]
B1n4r10 has quit [Ping timeout: 245 seconds]
mclee has joined #ruby
<Ox0dea> "I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question."
B1n4r10 has joined #ruby
<Ox0dea> JiYu: Use sed.
gaussblurinc1 has joined #ruby
maloik has quit [Ping timeout: 250 seconds]
TheBrayn has quit [Ping timeout: 260 seconds]
gaussblurinc1 has quit [Client Quit]
howdoicomputer has joined #ruby
psy_ has joined #ruby
gaussblurinc1 has joined #ruby
gaussblurinc1 has quit [Client Quit]
krobzaur has joined #ruby
alakra has joined #ruby
senayar has quit []
TheBrayn has joined #ruby
psy_ has quit [Max SendQ exceeded]
Dood__ has joined #ruby
nkwsy___1 has joined #ruby
[Butch] has joined #ruby
howdoicomputer has quit [Ping timeout: 260 seconds]
grotewold has joined #ruby
[Butch]_ has joined #ruby
User458764 has quit [Ping timeout: 245 seconds]
dreamscape has left #ruby ["Leaving"]
TomyWork has quit [Ping timeout: 246 seconds]
rghose has joined #ruby
krobzaur has quit [Quit: WeeChat 1.2]
rghose has quit [Max SendQ exceeded]
krobzaur has joined #ruby
xmad has joined #ruby
[Butch] has quit [Ping timeout: 245 seconds]
[Butch]_ is now known as [Butch]
RegulationD has quit [Remote host closed the connection]
SCHAAP137 has joined #ruby
psy_ has joined #ruby
pdoherty has joined #ruby
User458764 has joined #ruby
rghose has joined #ruby
rghose has quit [Max SendQ exceeded]
TomPeed has joined #ruby
rghose has joined #ruby
edwinvdgraaf has quit [Remote host closed the connection]
psy_ has quit [Max SendQ exceeded]
fantazo has joined #ruby
The_Phoenix has quit [Read error: Connection reset by peer]
maloik has joined #ruby
amclain has joined #ruby
dlitvak has quit [Remote host closed the connection]
bronson has joined #ruby
jud has joined #ruby
momomomomo has joined #ruby
dhollinger has quit [Quit: WeeChat 1.3]
bronson has quit [Remote host closed the connection]
Rodya_ has quit [Remote host closed the connection]
bronson has joined #ruby
Pumukel has joined #ruby
Mon_Ouie has joined #ruby
moeabdol1 has quit [Quit: WeeChat 1.3]
TheBloke- is now known as TheBloke
maloik has quit [Ping timeout: 250 seconds]
neanderslob has quit [Ping timeout: 250 seconds]
dhollinger has joined #ruby
jdawgaz has joined #ruby
googly has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
yoongkang has joined #ruby
anti-freeze has quit [Ping timeout: 245 seconds]
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jbrhbr has joined #ruby
cycorld has quit []
hahuang65 has joined #ruby
simplyianm has joined #ruby
<NET||abuse> having trouble with rake file.. https://gist.github.com/lukeab/d5f374b7be644caaf4a0
<NET||abuse> not sure why it doesn't work.
<NET||abuse> what else do i need to debug this?
millerti has joined #ruby
fantazo has quit [Ping timeout: 260 seconds]
sigurding has quit [Quit: sigurding]
yoongkang has quit [Ping timeout: 260 seconds]
cycorld has joined #ruby
roKin14 has joined #ruby
<jhass> NET||abuse: bundle exec rake
<jhass> and/or require "bundler/setup" at the top of your Rakefile
cornerma1 has joined #ruby
<NET||abuse> jhass: thanks for that.
ddubs has quit [Ping timeout: 250 seconds]
Snowy has quit []
howdoicomputer has joined #ruby
gaussblurinc1 has joined #ruby
stamina has quit [Quit: WeeChat 1.3]
Rodya_ has joined #ruby
DurstBurger has quit [Ping timeout: 260 seconds]
bap1313 has joined #ruby
Macaveli has joined #ruby
cornerman has quit [Ping timeout: 260 seconds]
cornerma1 is now known as cornerman
Rodya_ has quit [Remote host closed the connection]
rghose has quit [Quit: Leaving.]
pietr0 has joined #ruby
maloik has joined #ruby
shinenelson has joined #ruby
neanderslob has joined #ruby
voodo has quit [Quit: Leaving...]
rghose has joined #ruby
rghose has quit [Max SendQ exceeded]
DurstBurger has joined #ruby
krobzaur has quit [Quit: WeeChat 1.2]
krobzaur has joined #ruby
rghose has joined #ruby
rakm has joined #ruby
rghose has quit [Max SendQ exceeded]
fantazo has joined #ruby
rghose has joined #ruby
rghose has quit [Max SendQ exceeded]
maloik has quit [Ping timeout: 250 seconds]
rghose has joined #ruby
rghose has quit [Max SendQ exceeded]
rghose has joined #ruby
rghose has quit [Max SendQ exceeded]
rghose has joined #ruby
rghose has quit [Max SendQ exceeded]
rghose has joined #ruby
rghose has quit [Max SendQ exceeded]
moeabdol has joined #ruby
rghose has joined #ruby
rghose has quit [Max SendQ exceeded]
rghose has joined #ruby
rghose has quit [Max SendQ exceeded]
DurstBurger has quit [Ping timeout: 245 seconds]
rghose has joined #ruby
rghose has quit [Max SendQ exceeded]
griffindy has quit [Ping timeout: 245 seconds]
gaussblurinc1 has joined #ruby
gaussblurinc1 has quit [Client Quit]
rghose has joined #ruby
rghose has quit [Max SendQ exceeded]
rghose has joined #ruby
rghose has quit [Max SendQ exceeded]
rghose has joined #ruby
neanderslob_ has joined #ruby
`based_pdev` has joined #ruby
neanderslob has quit [Ping timeout: 250 seconds]
neanderslob_ has quit [Client Quit]
based_pdev_ has quit [Ping timeout: 245 seconds]
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
lubekpl has joined #ruby
pietr0 has quit [Ping timeout: 245 seconds]
b0yzn01z3 has quit [Remote host closed the connection]
pietr0 has joined #ruby
galeido has quit [Ping timeout: 276 seconds]
momomomomo has quit [Quit: momomomomo]
b0yzn01z3 has joined #ruby
<NET||abuse> jhass: thanks for that tip earlier, still having issues with the Rakefile but it got past that first issue :(
AndyBotwin has joined #ruby
<NET||abuse> I'm just trying to spin up a vagrant setup to test the rake file with centos ruby rather than archlinux ruby
linc01n has quit [Ping timeout: 260 seconds]
<jhass> hah, good luck and sorry for your pains in advance
maloik has joined #ruby
howdoicomputer has quit [Ping timeout: 250 seconds]
linc01n has joined #ruby
grotewold is now known as grotewold[afk]
baweaver has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
grotewold[afk] is now known as grotewold
roxtrongo has joined #ruby
jackjackdripper has joined #ruby
maloik has quit [Ping timeout: 260 seconds]
agit0 has joined #ruby
<NET||abuse> jhass: not normally a ruby guy, but i need to get used to it, too prevelant in devops'y type tooling.. pretty much need to be a python AND ruby pro, i'm only the former. Couldn't hurt to be up on golang too these days. going nuts now... polyglot ops engineers.
xfbs has joined #ruby
<jhass> NET||abuse: aha. If you have any real question, just ask
xfbs has quit [Client Quit]
bratchley has joined #ruby
bratchley has left #ruby [#ruby]
karapetyan has joined #ruby
mjuszczak has quit []
blaxter has quit [Quit: foo]
grill has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
WeiJunLi has joined #ruby
bb010g has quit [Quit: Connection closed for inactivity]
<Sou|cutter> if it makes you feel any better, I use ruby a lot and find rake to be a sort of awkward dsl
grotewold is now known as grotewold[afk]
hakunin has quit []
<NET||abuse> Sou|cutter: cheers, yeh, i find ruby's plasticity hard, being able to override any symbol you like, is good for generating dsl's, but makes the language unpredictable.
ldnunes has quit [Ping timeout: 260 seconds]
<Ox0dea> Isn't Rake the "original" DSL?
RegulationD has joined #ruby
<Ox0dea> NET||abuse: "Any symbol"?
ldnunes has joined #ruby
<NET||abuse> Ox0dea: well maybe i'm still not informed enough to comment on it, but i thought just about anyting can be overridden in ruby,
renderfu_ has quit [Read error: Connection reset by peer]
<Sou|cutter> I think he means that classes are open for modification?
renderfu_ has joined #ruby
<Sou|cutter> *they (ugh)
<Ox0dea> Methods and the like, sure, but you've gotta go way outta your way to modify actual Symbols.
grotewold[afk] is now known as grotewold
devbug has quit [Read error: Connection reset by peer]
RegulationD has quit [Remote host closed the connection]
[Butch] has quit [Quit: I'm out . . .]
<Ox0dea> Sou|cutter: In your defense, it's a decidedly masculine nick.
desmondhume has quit [Remote host closed the connection]
troulouliou_div2 has quit [Quit: Leaving]
<NET||abuse> hah, yes,s male here
RegulationD has joined #ruby
baweaver has quit [Remote host closed the connection]
devbug has joined #ruby
<Ox0dea> Attack helicopter here.
platzhirsch has left #ruby [#ruby]
grill has joined #ruby
Hounddog has quit [Read error: Connection reset by peer]
baweaver has joined #ruby
uri has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
jackjackdripper has joined #ruby
Pupp3tm4st3r has joined #ruby
arup_r has quit []
maloik has joined #ruby
gaussblurinc1 has joined #ruby
gaussblurinc1 has quit [Client Quit]
bkxd_ has joined #ruby
cycorld has left #ruby ["WeeChat 0.4.2"]
bkxd has quit [Ping timeout: 260 seconds]
cycorld has joined #ruby
maloik has quit [Ping timeout: 260 seconds]
baweaver has quit [Remote host closed the connection]
casadei has quit [Remote host closed the connection]
iateadonut has quit [Ping timeout: 260 seconds]
ddubs has joined #ruby
Guest38 has joined #ruby
elektronaut has quit [Ping timeout: 240 seconds]
InvGhosttt has quit [Ping timeout: 250 seconds]
b0yzn01z3 has quit [Remote host closed the connection]
humd1ng3r has quit [Ping timeout: 260 seconds]
s00pcan has quit [Remote host closed the connection]
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
BSaboia has quit [Ping timeout: 250 seconds]
skade has joined #ruby
mjuszczak has joined #ruby
dlitvak has joined #ruby
threh has joined #ruby
simplyianm has quit [Remote host closed the connection]
s00pcan has joined #ruby
[Butch] has joined #ruby
humd1ng3r has joined #ruby
b0yzn01z3 has joined #ruby
<shevy> take cover!!!
gregf has quit [Quit: WeeChat 1.3]
<shevy> or shoot back
freedrull has quit [Ping timeout: 240 seconds]
[spoiler] has quit [Ping timeout: 240 seconds]
simplyianm has joined #ruby
adamholt has quit [Quit: ZNC - http://znc.sourceforge.net]
elektronaut has joined #ruby
[spoiler] has joined #ruby
threh has quit [Client Quit]
casadei has joined #ruby
adamholt has joined #ruby
freedrull has joined #ruby
User458764 has joined #ruby
dmonster has left #ruby [#ruby]
mudtose has joined #ruby
<Ox0dea> Check your privilege, cislord.
jbrhbr has quit [Quit: Leaving.]
<Ox0dea> > From now on I want you guys to call me “Apache” and respect my right to kill from above and kill needlessly.
xfbs has joined #ruby
<shevy> that's a webserver
diegoaguilar has quit [Ping timeout: 250 seconds]
sepp2k has quit [Quit: Leaving.]
devbug has quit [Remote host closed the connection]
leat has quit [Remote host closed the connection]
devbug has joined #ruby
leat has joined #ruby
peterhil_ has joined #ruby
SalviaNobile has joined #ruby
ibouvousaime has quit [Ping timeout: 260 seconds]
Luming has quit [Ping timeout: 245 seconds]
gaussblurinc1 has joined #ruby
gaussblurinc1 has quit [Client Quit]
based_pdev_ has joined #ruby
grotewold has quit [Quit: Textual IRC Client: www.textualapp.com]
hahuang65 has quit [Ping timeout: 250 seconds]
Luming has joined #ruby
simplyianm has quit [Remote host closed the connection]
mudtose is now known as threh
last_staff has joined #ruby
b0yzn01z3 has quit [Read error: Connection reset by peer]
Jackneill has quit [Quit: Leaving]
xfbs has quit [Ping timeout: 246 seconds]
darkf has quit [Quit: Leaving]
Rodya_ has joined #ruby
b0yzn01z3 has joined #ruby
TomPeed is now known as TomPeedOnMe
lubekpl has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
xfbs has joined #ruby
`based_pdev` has quit [Ping timeout: 260 seconds]
shadoi has joined #ruby
maloik has joined #ruby
momomomomo has joined #ruby
monthy has quit [Read error: Connection reset by peer]
Dood__ has quit [Ping timeout: 260 seconds]
nkwsy___1 has quit [Ping timeout: 260 seconds]
momomomomo has quit [Client Quit]
peterhil_ has quit [Ping timeout: 260 seconds]
skade has quit [Quit: Computer has gone to sleep.]
B1n4r10 has quit [Ping timeout: 260 seconds]
BTRE has quit [Quit: Leaving]
Rodya_ has quit [Ping timeout: 250 seconds]
peterhil_ has joined #ruby
prasselpikachu is now known as Fridtjof
jbrhbr has joined #ruby
BTRE has joined #ruby
maloik has quit [Ping timeout: 250 seconds]
grotewold has joined #ruby
rghose has quit [Quit: Leaving.]
<snockerton> so I have a ` require 'active_support/all'` in my ruby script, and it has no issues loading the gem, but when I use pry and do a manual require, it says "cannot load such file"
<snockerton> what gives?
dlitvak has quit [Ping timeout: 250 seconds]
<apeiros> snockerton: different gemfile?
<apeiros> different ruby?
<apeiros> different gemset?
<snockerton> not that i know of
<snockerton> running ruby script.rb and pry in the same context, same shell
bkxd_ has quit [Ping timeout: 260 seconds]
<jhass> snockerton: ruby -v & pry -v ?
ibouvousaime has joined #ruby
<apeiros> and after that, check the gem envs
B1n4r10 has joined #ruby
krz has quit [Ping timeout: 260 seconds]
brunto has joined #ruby
hobodave has joined #ruby
spider-mario has joined #ruby
dlitvak has joined #ruby
babblebre has joined #ruby
DurstBurger has joined #ruby
bkxd has joined #ruby
simplyianm has joined #ruby
gaussblurinc1 has joined #ruby
grotewold is now known as grotewold[afk]
jpfuentes2 has joined #ruby
gaussblurinc1 has quit [Client Quit]
Osw has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
DataKid has joined #ruby
juddey has joined #ruby
peterhil_ has quit [Ping timeout: 260 seconds]
gaussblurinc1 has joined #ruby
threh has quit [Quit: Leaving]
threh has joined #ruby
bubbys has quit [Ping timeout: 250 seconds]
bluOxigen has joined #ruby
maloik has joined #ruby
dEPy has joined #ruby
<dEPy> Yo
marr has joined #ruby
<blubjr> hi depy
`based_pdev` has joined #ruby
<dEPy> Is it ok to say here that we need a Ruby programmer?
hahuang65 has joined #ruby
blueOxigen has quit [Ping timeout: 245 seconds]
<dEPy> Or do you have any recommendation to where to find Ruby programmers to hire?
hobodave has quit [Quit: Computer has gone to sleep.]
<apeiros> dEPy: until it becomes a problem, recruiting is fine here.
momomomomo has joined #ruby
based_pdev_ has quit [Ping timeout: 260 seconds]
xfbs has quit []
<DataKid> what do you need dEPy?
unsymbol has quit [Ping timeout: 260 seconds]
<dEPy> Well I said it already I guess. More info privately or at matjaz@codeable.io - basically we need a Ruby/Rails programmer to help with development/refactoring and improving our backend/API.
maloik has quit [Ping timeout: 245 seconds]
baweaver has joined #ruby
<dEPy> We would prefer someone that is mainly Ruby over someone that mains Rails.
<centrx> Is it fun?
ebertx has quit [Ping timeout: 245 seconds]
isjaylee has joined #ruby
<dEPy> We would like to drive our app development into the direction of DDD and hexagonal approach slowly as it is getting harder to maintain and develop trying to do it the rails way.
<dEPy> centrx: well. I am the 1st employee in the company and after more than 3 years I'm still here. My previous record was 2 years. :)
grotewold[afk] is now known as grotewold
unsymbol has joined #ruby
hobodave has joined #ruby
isjaylee has left #ruby [#ruby]
<centrx> I only do octagonal XXX development
karapetyan has quit [Remote host closed the connection]
<Ox0dea> Kinky.
ebertx has joined #ruby
<dEPy> octagonal sounds awesome :P
karapetyan has joined #ruby
janno has quit [Remote host closed the connection]
<dEPy> No but in all seriousness no matter what you call it, getting core domain logic out of rails is a good idea imo.
Karunamon has quit [Ping timeout: 260 seconds]
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<apeiros> dEPy: not sure whether I should be impressed. 8y where I'm now :)
cdg has quit [Remote host closed the connection]
colleenmcguckin has joined #ruby
myztic has quit [Ping timeout: 245 seconds]
<dEPy> apeiros: not sure what you mean. :)
lacuna has joined #ruby
ldnunes has quit [Ping timeout: 260 seconds]
<apeiros> relating to 3y as "long"
<dEPy> well the company is 3 years so that's the upper limit :)
<dEPy> and my whole career is less than 10y. Cut me some slack. :)
<apeiros> hehe, ok
kirun has joined #ruby
brunto has quit [Ping timeout: 260 seconds]
<blubjr> is there a root printing function that always gets used
<jhass> blubjr: what's your issue?
failshell has joined #ruby
<apeiros> you mean whether puts/printf/print etc. use a common method?
bubbys has joined #ruby
Karunamon has joined #ruby
DataKid has quit [Ping timeout: 252 seconds]
<blubjr> i want something like lisp's fresh-line, that prints a newline unless you're already at the start of a line. the only way i can see to do that would be if theres a base printing function, to advise that to watch the last thing printed
RobertBirnie has joined #ruby
desmondhume has joined #ruby
bigmacher has joined #ruby
<Ox0dea> You could query the terminal.
<blubjr> and hopefully stdout isnt a special case
maloik has joined #ruby
<jhass> I'd suggest a wrapper around $stdout that tracks it and use that everywhere (maybe even reassign $stdout to it)
Pumukel has quit [Ping timeout: 250 seconds]
arup_r has joined #ruby
diegoaguilar has joined #ruby
<blubjr> i mean i would want it to work regardless of where youre writing to
<Ox0dea> blubjr: Sounds like you want to redefine IO#write.
<Ox0dea> Rather, that's the immediately obvious "solution".
<toretore> sounds like a bad idea overall to me
<Ox0dea> But the man wants fresh lines, and he shall have them!
desmondhume has quit [Ping timeout: 245 seconds]
roxtrongo has quit [Remote host closed the connection]
<blubjr> woman
<shevy> you just can't solve blubjr's problem!
<blubjr> thank you, ill look into it
karapetyan has quit [Remote host closed the connection]
SalviaNobile has quit [Remote host closed the connection]
maloik has quit [Ping timeout: 245 seconds]
karapetyan has joined #ruby
<Ox0dea> blubjr: I'm trying to think of the cleanest way to have IO#write still do what it's supposed to do.
<Ox0dea> It's the "base printing function", after all.
karapetyan has quit [Read error: Connection reset by peer]
karapetyan has joined #ruby
<Ox0dea> Why didn't you "correct" me when I called you pg's son?
karapetyan has quit [Read error: Connection reset by peer]
<blubjr> i did
karapetyan has joined #ruby
InvGhosttt has joined #ruby
<Ox0dea> Shit, you did.
<Ox0dea> My apologies.
isjaylee1 has joined #ruby
asteros has joined #ruby
isjaylee1 has left #ruby [#ruby]
yoongkang has joined #ruby
juddey has quit [Ping timeout: 250 seconds]
elaptics is now known as elaptics`away
sepp2k has joined #ruby
gsingh93 has quit [Ping timeout: 260 seconds]
<Ox0dea> I don't see how to do it in pure Ruby. :<
bigmacher has quit [Quit: leaving]
Synthead has joined #ruby
<blubjr> yuck
<Synthead> is there a more concise way to do this? http://pastie.org/private/ggshjccbnzhxg31tz9veg
<Ox0dea> Yes.
b0yzn01z3 has quit [Remote host closed the connection]
<Ox0dea> Synthead: params.each { |k, v| instance_variable_set "@#{k}", v }
gsingh93 has joined #ruby
pangareh has joined #ruby
<centrx> Synthead, another option: @host, @login, @password = params.slice(:host, :login, :password)
<centrx> Synthead, sorry, values_at, not slice
yqt has joined #ruby
<apeiros> you can save a bit by :"@#{k}"
ldnunes has joined #ruby
<apeiros> (no intermediate string)
<Ox0dea> ...
<Synthead> wow, nice
Pupp3tm4st3r has quit [Remote host closed the connection]
<Synthead> this helps a lot, thanks guys!
<apeiros> Synthead: IMO the thing to do there is not use **params but host: nil, login: nil etc.
<apeiros> ?guys Synthead
<ruboto> Synthead, Though inclusion was probably intended, not everyone relates to being "one of the guys". Maybe consider using "folks", "all", "y'all", or "everyone" instead?
<Synthead> apeiros: agreed, will do
<apeiros> thanks :)
baweaver has quit [Remote host closed the connection]
nettoweb has joined #ruby
yoongkang has quit [Ping timeout: 250 seconds]
<Ox0dea> Synthead: It's unclear to which of apeiros' advisements you were agreeing; could you clarify?
<shevy> I am folk
<apeiros> the shevy folk
<Ox0dea> #ruby is a gang-free environment.
<Synthead> Ox0dea: the params suggestion
<apeiros> oh :(
<Ox0dea> The {m,s}adness will never end.
<apeiros> and there I hoped they'd say "both"
karapetyan has quit [Remote host closed the connection]
<centrx> 'Maybe consider using "hey gang" or a gang sign like "\/_\/"'
<apeiros> preferably from dr. horrible's sing-along
<apeiros> oh, sign, not song. quite a misread…
diegoaguilar has quit [Ping timeout: 260 seconds]
karapetyan has joined #ruby
<slash_part> Ox0dea: what about the dollars? they're not like the typical color gangs
karapetyan has quit [Read error: Connection reset by peer]
ur5us has joined #ruby
<Ox0dea> slash_part: Are you expressing anarchist sentiments?
sandstrom has quit [Quit: My computer has gone to sleep.]
karapetyan has joined #ruby
karapetyan has quit [Read error: Connection reset by peer]
tildes has quit [Ping timeout: 260 seconds]
<slash_part> Ox0dea: gosh i hope not
karapetyan has joined #ruby
<shevy> why is "\/_\/" a gang sign
cpup has quit [Ping timeout: 260 seconds]
<Ox0dea> Everything is a gang sign.
DurstBurger has quit [Ping timeout: 260 seconds]
cpup has joined #ruby
yfeldblum has joined #ruby
<Ox0dea> Is that an Emacs user?
<centrx> lawl
Rodya_ has joined #ruby
<Ox0dea> Genuine lels over here.
<Ox0dea> (It's still hilarious.)
svoop has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rodfersou is now known as rodfersou|afk
momomomomo has quit [Quit: momomomomo]
dopie has quit [Quit: Leaving]
agit0 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rakm has joined #ruby
Azulinho has joined #ruby
prestorium has quit [Quit: Leaving]
dopie has joined #ruby
<Ox0dea> There *must* be some way to write from within a redefinition of IO#write without dropping to C.
bronson has quit [Remote host closed the connection]
<jhass> take a backup of the old definition?
<apeiros> Ox0dea: classical a) alias or b) instance_method(:write) + define_method
hackeron has quit [Ping timeout: 260 seconds]
<Ox0dea> Maximum derpage. :<
Rodya_ has quit [Ping timeout: 250 seconds]
hahuang65 has quit [Ping timeout: 250 seconds]
Anderson69s has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tubulife_ has joined #ruby
slash_part is now known as slash_nick
karapety_ has joined #ruby
rakm has quit [Client Quit]
nkwsy_ has joined #ruby
Dood has joined #ruby
<Ox0dea> I'm trying to figure out why that didn't even occur; what made IO#write seem so special?
hackeron has joined #ruby
<apeiros> you had a moment of stupid?
<Ox0dea> I did do that, didn't I?
tubulife_ has quit [Client Quit]
<apeiros> happens to the best. I heard. never experienced myself, so I can't relate…
<apeiros> ;-)
tubulife_ has joined #ruby
sigurding has joined #ruby
<Ox0dea> Still, it is kinda "special"; you can't just invoke any ol' printing method from within the new definition.
<apeiros> for real? what happens?
* apeiros never tried
tubulife_ has quit [Client Quit]
Elysia has quit [Remote host closed the connection]
<Ox0dea> Well, you can't call Kernel#p from within IO#write, since Kernel#p will call IO#write.
tubulife_ has joined #ruby
<Ox0dea> Same for every other printer.
yoongkang has joined #ruby
Elysia has joined #ruby
tubulife_ has quit [Client Quit]
<apeiros> "can't" - what happens? infinite loop and then stack level too deep?
<Ox0dea> Of course.
karapetyan has quit [Ping timeout: 250 seconds]
gusTester has quit [Quit: Leaving.]
bap1313 has quit [Quit: Leaving]
yardenbar has joined #ruby
based_pdev_ has joined #ruby
ixti has quit [Ping timeout: 250 seconds]
gusTester has joined #ruby
tomchapin has joined #ruby
centrx has quit [Remote host closed the connection]
`based_pdev` has quit [Ping timeout: 260 seconds]
grotewold is now known as grotewold[afk]
simplyianm has quit [Remote host closed the connection]
sandstrom has joined #ruby
e7d has joined #ruby
dlitvak_ has joined #ruby
fantazo has quit [Quit: Verlassend]
dionysus69 has joined #ruby
ldnunes has quit [Quit: Leaving]
skade has joined #ruby
grotewold[afk] is now known as grotewold
devbug has quit [Read error: Connection reset by peer]
twilling has joined #ruby
centrx has joined #ruby
dt__ has joined #ruby
<dt__> #ruby
ur5us has quit [Read error: No route to host]
ur5us has joined #ruby
<jhass> #ruby
<apeiros> #ruby
<apeiros> and now we get sued
lacuna has quit [Remote host closed the connection]
dlitvak has quit [Ping timeout: 260 seconds]
devbug has joined #ruby
Jardayn has quit [Read error: Connection reset by peer]
ur5us_ has joined #ruby
karapety_ has quit [Remote host closed the connection]
NeverDie has quit [Quit: http://radiux.io/]
momomomomo has joined #ruby
<dt__> Hi....when i try to start sidekiq using sidekiq.service in /lib/systemd/system....it gives me the following error
<dt__> Failed to get D-Bus connection: Operation not permitted
amoeba has quit [Quit: Leaving]
tomchapin has quit [Read error: No route to host]
<jhass> dt__: you ran systemctl as root?
<dt__> yes...used sudo
simplyianm has joined #ruby
<jhass> dt__: that's weird? that's all output? anything in the journal?
karapetyan has joined #ruby
<dt__> @jhass- i used this file..
karapetyan has quit [Remote host closed the connection]
ur5us has quit [Ping timeout: 250 seconds]
<dt__> placed it in /lib/systemd/system
<jhass> dt__: you should place it into /etc/systemd/system btw, /usr/lib/systemd/system is for stuff provided by packages
<jhass> but that shouldn't cause that error
grotewold is now known as grotewold[afk]
Nilium has quit [Ping timeout: 260 seconds]
<dt__> oops....but in that file ..the author has mentioned like that
grotewold[afk] is now known as grotewold
<jhass> yeah, it's kinda wrong
<dt__> ohh... i ll try in /etc
karapetyan has joined #ruby
<jhass> dt__: as said it's just semantics, it shouldn't make a technical difference
Unicorn| has joined #ruby
<dt__> ohkk
iceden has joined #ruby
ixti has joined #ruby
<Unicorn|> Hi.
Vitor_ has quit [Remote host closed the connection]
failshell has quit []
<dt__> @jhass- but y is it giving this error
<jhass> dt__: I've only seen it when systemctl was run with insufficient permissions
casadei has quit [Remote host closed the connection]
<dt__> even i tried to use upstart....for sidekiq...with worker files
<jhass> dt__: ?
<jhass> you run upstart and systemd on the same system?!
<bougyman> we always run sidekiq workers under runit.
<bougyman> and sideqik itself.
<jhass> there's nothing wrong with running them under systemd though
<Unicorn|> Do you guys have any idea why this code is giving me a variable can't compare to a string error?
B1n4r10 has quit [Ping timeout: 245 seconds]
karapetyan has quit [Remote host closed the connection]
<jhass> bougyman: what do you mean? there's no "sidekiq master" process or so, only workers
<ruboto> Unicorn|, we in #ruby do not like irccloud.com, I reposted your paste to gist for you: https://gist.github.com/b2b792e2d458acd2d1a5
<ruboto> irccloud.com has no syntax highlighting, distracting formatting and loads slowly for most.
<dt__> no....i installed upstart using this documentation...https://wiki.ubuntu.com/SystemdForUpstartUsers#Permanent_switch_back_to_upstart
weijun has joined #ruby
karapetyan has joined #ruby
Nilium has joined #ruby
<jhass> dt__: so what do you run now, upstart or systemd?
<Unicorn|> ok, sorry about that
<dt__> i tried both...
<jhass> Unicorn|: show your real error message so we can read it together
<Unicorn|> I think that my problem has to do with line 8, if guess == ans
<dt__> now it is sytemd
<dt__> i installed systemd package again
hahuang65 has joined #ruby
<Unicorn|> ./home/unicorn/RubymineProjects/untitled/Rubyidea:17:in `>': comparison of String with 0 failed (ArgumentError)
<hxegon> Any suggestions for this bit of code? https://gist.github.com/anonymous/f196885819813d83749f
<jhass> dt__: gist the output of systemctl status sidekiq
<jhass> Unicorn|: line 17 in the code you pasted is an "end"
juddey has joined #ruby
WeiJunLi has quit [Ping timeout: 250 seconds]
<Ox0dea> Unicorn|: #ask returns a String; you'll need to convert the result to a number before comparing it with `ans`.
<Unicorn|> ah, thanks
<Ox0dea> Happy to help.
<jhass> hxegon: why is your input not always a single string or array?
<jhass> and why do you have to retain whatever you got in the output?
gregf has joined #ruby
<jhass> type wise
<Ox0dea> hxegon: [*headers].map { |h| %'"#{h}"' }
<hxegon> jhass: it's a spec helper method. So just for convenience
<Ox0dea> Er, that won't give you back a String if you got a String, but close enough. :P
baweaver has joined #ruby
<hxegon> Ox0dea: great suggestion though
<Ox0dea> I like it. :)
<jhass> if we can get rid of the same output type requirement I was going to suggest something similar
<jhass> without the odd way to write the percent literal though :P
<hxegon> Ox0dea: is %'' just "" without having to escape internal "s?
<Ox0dea> hxegon: Aye.
baweaver has quit [Remote host closed the connection]
<Ox0dea> %() == %'' == %[] == ...
<jhass> hxegon: it's an odd way to write %()
<Ox0dea> I don't agree with the %() convention.
<Ox0dea> %[] for arrays, %'' for strings, because duh.
<jhass> %'' is just confusing though
<hxegon> jhass: but I got it immediatley without seeing it anywhere first...
<jhass> it'll trip enough people up that have '' == no interpolation wired into their brains
<Ox0dea> jhass: Catering to the lowest common denominator is how we would've stayed in the caves.
<jhass> using %() is just far more common
Vitor has joined #ruby
<jhass> it's not inferior in any way
<Ox0dea> It carries less semantic weight.
davedev24 has quit []
<jhass> that's just your opinion
<hxegon> actually jhass, Ox0dea I just realized it needs to be an Array on output anyway, haha
<Ox0dea> We use [] for Array literals, why not %[] for... Array literals?
<jhass> I'm saying you're deluding the semantics of '' with prefering %''
roxtrongo has joined #ruby
<hxegon> q
<hxegon> yqnethack
<hxegon> damn keyboard macros, sry
<Ox0dea> jhass: In a word, what does '' make you think of, Ruby-wise?
<jhass> interpolation isn't interpreted
<Ox0dea> I wonder why you've refrained from answering a remarkably simple question.
<jhass> it's a word in the sense that "String without interpolations run" is a single concept in my head
<Ox0dea> Bollocks.
<Ox0dea> Seeing '' makes you think "string" and you know it. :P
dorei has joined #ruby
nkwsy_ has quit [Ping timeout: 245 seconds]
Dood has quit [Ping timeout: 245 seconds]
<jhass> no, I don't exactly think "string" the same way for "" and ''. That '' is character in other languages only strengthens that
roxtrongo has quit [Ping timeout: 260 seconds]
dionysus69 has quit [Remote host closed the connection]
dt__ has left #ruby [#ruby]
iceden has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
dionysus69 has joined #ruby
<Ox0dea> I'll grant you that, but I maintain that symmetry is a Good Thing, and that "it'll confuse somebody" is a poor reason not to do something.
baweaver has joined #ruby
Dood__ has joined #ruby
nkwsy___ has joined #ruby
<Ox0dea> For certain definitions of "confuse" and "somebody", of course. In short, %'' is not obfuscation.
desmondhume has joined #ruby
<yardenbar> Hi all, what can cause ruby process to exit with code '-6'?
<hxegon> but it does trigger rubocop warnings, which is kind of annoying
<yardenbar> The process is running an eventmachine
<jhass> it does, ' is no longer a visual indicator for the "interpolation" property that I have strongly associated with it in Ruby, having to check for % is actually removing semantic for me
<jhass> yardenbar: what reports -6 to you?
<Ox0dea> jhass: Is there some justification for %() besides its being "the done thing"?
devbug has quit [Ping timeout: 250 seconds]
Xeago has joined #ruby
blubjr has quit [Quit: bye]
threh has quit [Quit: Leaving]
<yardenbar> jhass, The process is managed by CircusD, and there's a plugin that emits the process lifecycle events
<jhass> Ox0dea: no, I just consider it the least conflict free. And actually "what most people use" is not a too bad reason too
<yardenbar> This is where I see the -6 code
maloik has joined #ruby
jetpackjoe has joined #ruby
jetpackjoe has quit [Max SendQ exceeded]
cyberfawkes has joined #ruby
<Ox0dea> hxegon: Take your pick, but RuboCop will probably complain about almost all of them. :P
s1kx has joined #ruby
desmondhume has quit [Ping timeout: 260 seconds]
threh has joined #ruby
threh has quit [Client Quit]
jetpackjoe has joined #ruby
<Ox0dea> jhass: I just wish whoever decided %w() > %w[] had realized Ruby isn't actually Lisp.
Dood__ has quit [Ping timeout: 245 seconds]
jetpackjoe has quit [Max SendQ exceeded]
grotewold is now known as grotewold[afk]
nkwsy___ has quit [Ping timeout: 260 seconds]
asteros has quit [Quit: asteros]
Wsewolod has quit [Ping timeout: 250 seconds]
Giordano has joined #ruby
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<jhass> yardenbar: I can't find a special meaning to it adhoc, are you sure your application isn't exiting with it explicitly? Note "exit 250" might produce the same
kerunaru has quit [Ping timeout: 245 seconds]
grotewold[afk] is now known as grotewold
decoponio has quit [Quit: Leaving...]
maloik has quit [Ping timeout: 245 seconds]
<yardenbar> Found "smallbin double linked list corrupted" in logs
<yardenbar> jhas
<jhass> doesn't ring any bell to me
<jhass> who logged it?
lxsameer has joined #ruby
<Ox0dea> yardenbar: -6 -> 250 -> 122 -> EDQUOT (Quota exceeded)
<Ox0dea> No idea how to interpret that further, though.
symm- has quit [Quit: Leaving...]
<yardenbar> I'll pass to my colleges, thanks guys
<jhass> the smallbin corruption error indicates a write to a borked pointer or memory corruption
twilling has quit [Quit: twilling]
<Giordano> Hey guys, what does it mean when you pass an argument preceded with an * to a method? Like method(*argument)
Xeago has quit [Remote host closed the connection]
<Ox0dea> Giordano: It means treat the Array `argument` as individual arguments.
<jhass> called splat
<Ox0dea> >> def add3 a, b, c; a + b + c; end; ary = [1,2,3]; foo *ary # Giordano
<ruboto> Ox0dea # => undefined method `foo' for main:Object (NoMethodError) ...check link for more (https://eval.in/478606)
<Ox0dea> Derp.
<Ox0dea> >> def add3 a, b, c; a + b + c; end; ary = [1,2,3]; add3 *ary # Giordano
<ruboto> Ox0dea # => 6 (https://eval.in/478607)
<Giordano> Ox0dea: thank you
<Ox0dea> Giordano: Sure thing.
skade has quit [Quit: Computer has gone to sleep.]
tomchapin has joined #ruby
asteros has joined #ruby
mojobiri_ has joined #ruby
agit0 has joined #ruby
skade has joined #ruby
devbug has joined #ruby
roKin14 has quit [Remote host closed the connection]
<hxegon> According to rubocop's readme, you can disable individual rules with a comment, but it's not working for me. Oh well, not that big of a deal.
<adaedra> that's not a good thing imo.
bronson has joined #ruby
<Ox0dea> hxegon: Do as you are told, citizen.
<hxegon> YES BIG BROTHER
tomchapin has quit [Read error: Connection reset by peer]
<shevy> would it not be nice if rubocop has --disable
<hxegon> rubocop is love rubocop is life
<Ox0dea> All hail.
<adaedra> shevy: what
threh has joined #ruby
<baweaver> Double plus good citizen
<shevy> adaedra it can be used to disable cops
<adaedra> shevy: there's the config file for that?
<Ox0dea> There are many ways to disable cops.
<shevy> I don't have a config file
Coldblackice has joined #ruby
<Ox0dea> hxegon: Disabling via comment does work; it's likely you're not properly specifying the cop.
momomomomo has quit [Quit: momomomomo]
lacuna has joined #ruby
<hxegon> Ox0dea: I tried # rubocop:disable Style/BarePercentLiterals, Style/PercentLiterals, PercentLiterals, BarePercentLiterals
<Ox0dea> Well, shit. :<
yoongkang has quit [Remote host closed the connection]
bronson has quit [Remote host closed the connection]
dionysus69 has quit [Ping timeout: 260 seconds]
<adaedra> Ouch.
bronson has joined #ruby
<adaedra> I'd say too that you may rather want to configure the cop through the configuration.
<hxegon> I would go through the trouble of using a config, but that was a lie I'm would go through the trouble
momomomomo has joined #ruby
mooe has joined #ruby
<adaedra> shevy: having a config file is better than configuration options; who want to pass 50 configuration options to the CLI at each rubocop run?
<shevy> adaedra it could generate a config element too; actually I will make an issue request for it
twilling has joined #ruby
momomomomo has quit [Client Quit]
dc has joined #ruby
dc has quit [Remote host closed the connection]
codecop has quit [Remote host closed the connection]
<hxegon> wait... I just rechecked my rubocop log. "1: Unecessary disabling of Style/BarePercentLiterals. 2: '%'-literals should be delimited by...
maloik has joined #ruby
<shevy> unnecessary!
imperator has joined #ruby
<hxegon> DON'T YOU SPELL SHAME ME SHEVY
<Ox0dea> hxegon: Stop resisting!
<hxegon> Ox0dea: am I being detained?
<Ox0dea> You will be assimilated.
<adaedra> Stop shooting, some people are trying to sleep here.
<adaedra> er.
<adaedra> shouting.
<Ox0dea> Ouch.
<imperator> dang, what did i just walk into here?
<Ox0dea> Ultraviolence.
<Ox0dea> Viddy well, imperator?
DurstBurger has joined #ruby
sigurding has quit [Quit: sigurding]
momomomomo has joined #ruby
<imperator> Ox0dea, doing alright, you?
<Ox0dea> Much and more of the same.
svoop has joined #ruby
<Ox0dea> By which I refer to the doing of all rightness, to clarify.
<mfqr> Feh.
<Ox0dea> sxiv.
<imperator> was just wondering if this is a pattern
<centrx> it's all AI
<imperator> def foo (x=1); p x; end
<imperator> vs def foo(x); x ||=1; p x; end
<Ox0dea> Which to prefer is contextual, honestly.
<adaedra> use first.
lacuna has quit [Write error: Connection reset by peer]
<imperator> basically, i want to shorten that to: def foo (x ||=1); p x; end
<adaedra> why?
maloik has quit [Ping timeout: 250 seconds]
yfeldblum has quit [Ping timeout: 250 seconds]
grotewold is now known as grotewold[afk]
<imperator> in other words, handle explicit false/nil as arguments
<baweaver> One won't catch nil
lacuna has joined #ruby
<imperator> baweaver, right, don't want it to
<adaedra> ah
lacuna has quit [Changing host]
lacuna has joined #ruby
jetpackjoe has joined #ruby
tomchapin has joined #ruby
<baweaver> If you want nil/false to get through, default args
<baweaver> otherwise ||=
asteros has quit [Quit: asteros]
karapetyan has quit [Remote host closed the connection]
<imperator> well, i'm wondering if i accomplish both in one fell swoop ;)
grotewold[afk] is now known as grotewold
<imperator> sorta
<Ox0dea> imperator: Assignments can refer to previous parameters in method signatures, but I don't think that helps any.
<imperator> (btw, def foo (x ||= 1); end does not parse, in case anyone was wondering)
tomchapin has quit [Read error: Connection reset by peer]
<imperator> wonder if the parser could be bent to make that work
<Ox0dea> imperator: def foo(_ = nil, x = _ ? _ : 1) p x end
karapetyan has joined #ruby
<Ox0dea> But that's really crazy.
baweaver has quit [Remote host closed the connection]
<Ox0dea> And also doesn't do what you're after. :<
elaptics`away is now known as elaptics
mojobiri_ has quit [Quit: Page closed]
colegatron has quit [Ping timeout: 260 seconds]
davedev24 has joined #ruby
lacuna has quit [Read error: Connection reset by peer]
benlieb has joined #ruby
maloik has joined #ruby
lacuna has joined #ruby
hahuang65 has quit [Ping timeout: 260 seconds]
<adaedra> >> def foo(x = nil, _x: x || :default); _x; end; [foo, foo(:override), foo(nil)]
<ruboto> adaedra # => [:default, :override, :default] (https://eval.in/478608)
troyreadyy has quit [Ping timeout: 260 seconds]
InvGhosttt has quit [Ping timeout: 264 seconds]
brunto has joined #ruby
dimik has joined #ruby
asteros has joined #ruby
arup_r has quit []
bb010g has joined #ruby
<imperator> adaedra, yes but that's ugly ;)
casadei has joined #ruby
asteros has quit [Client Quit]
<imperator> i dunno, i guess i just thought it would be nice to have a more elegant solution
<imperator> not a huge deal
tomchapin has joined #ruby
vikas027 has joined #ruby
cdg has joined #ruby
<imperator> but thank you all for your tips :)
<Derailed> Hi all. I'm a newbie reading through a whole lot of rails code. I'd just like to confirm something about Ruby: What happens if you define the same class twice?
<adaedra> That's a solution, but no, there's nothing built-in, imperator
Azulinho has quit [Quit: Azulinho]
<Ox0dea> Derailed: You "re-open" it.
asteros has joined #ruby
<adaedra> Derailed: You don't, you re-open it.
<adaedra> Dammit.
<Ox0dea> <3
duncannz has joined #ruby
<imperator> adaedra, do you think it's worth a RFC?
Azulinho has joined #ruby
<Derailed> :-) So "re-open" is a term I'm not familiar with, but I assume you mean I can add more methods to it, and those all end up in the original class?
<Ox0dea> Derailed: Ruby classes are subject to modification at all times.
<imperator> or are we getting into "may as well add type checking" territory?
<adaedra> >> class Potato; def cook; end; end; po = Potato.new; class Potato; def shout; %(I'm a potato!) end; end; po.shout # Derailed
<ruboto> adaedra # => "I'm a potato!" (https://eval.in/478609)
<Derailed> Ox0dea, What happens if you redefine an already-defined *method* in this case?
<imperator> How are you doing? Because I'm a potato.
<Ox0dea> Derailed: It gets overwritten.
<adaedra> imperator: i'm not familiar with Ruby politics.
<Derailed> Ox0dea, Over-written, not necessarily the same as 'over-ridden'? I guess it works out the same.
<Ox0dea> Derailed: Aye, same thing.
<Ox0dea> As per what I imagine is your definition of those terms, anyway.
<adaedra> Derailed: try all of that and see
casadei has quit [Ping timeout: 260 seconds]
<Derailed> Ox0dea, Thanks. Let me give you context: I was trying to work out how adding this gem was adding routes to the rails project I'm reading: https://github.com/AbleTech/easy_admin
peterhil_ has joined #ruby
TomPeedOnMe has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
GinoManWorks has quit [Read error: Connection reset by peer]
<Derailed> the part that really confused me is that it seems like installing the gem is all you need to do, you don't even need to 'require' it!
sepp2k1 has joined #ruby
<Ox0dea> Derailed: It's being autoloaded.
AndyBotwin has quit [Ping timeout: 245 seconds]
<Ox0dea> Rails magic best magic.
sepp2k has quit [Ping timeout: 260 seconds]
<Derailed> Ox0dea, ...and the autoloading is a 'Rails' thing, NOT a ruby thing, right?
<Ox0dea> No, it's a Ruby thing, but Rails "augments" it.
<adaedra> It's a Bundler things, technically
<Ox0dea> You have to explicitly declare that you want some constant to trigger a load in straight Ruby, but Rails hooks #const_missing to do it automagically.
<adaedra> Ah, this
<jhass> adaedra: that'd be a broad definition of autoloading
<mfqr> 1/3
<Derailed> Is rails auto-loading stuff based on the Gemfile?
<jhass> no
<Ox0dea> No, missing constants.
<adaedra> The Gemfile part is Bundler, the missing constants part is Rails.
<adaedra> (I thought they were referring to the "add the gem to Gemfile and it's done" part)
Spleeze has quit [Ping timeout: 260 seconds]
<Ox0dea> >> def Object.const_missing c; 42; end; Foo # Derailed: Ruby is crazy. <3
<ruboto> Ox0dea # => 42 (https://eval.in/478610)
<Derailed> Ox0dea, thanks for your help. Do you know where in docs I might get a concise explanation of that?
<nchambers> ruboto is closed source right?
snj has joined #ruby
<Ox0dea> Derailed: Of #const_missing, or?
<Ox0dea> nchambers: Yes, as is eval.in.
snj has left #ruby [#ruby]
<adaedra> nchambers: yes.
<adaedra> Ox...
<Derailed> based on what you've told me, I understand how easy_admin is defining some classes to use, and then you 're-open' them in the rails app. But I'm still unclear on how 'easy_admin' is getting loaded into my rails project
<nchambers> shame :L
<Ox0dea> adaedra: I need to break a finger or something.
colegatron has joined #ruby
<nchambers> I wish I still had that email from the author... oh well
<Ox0dea> Hm?
<nchambers> didn't charlie some write it?
<Ox0dea> Yes.
<nchambers> yeah I emailed him a bit about it before
<Ox0dea> Derailed: You're referring to `EasyAdmin` by name at some point, yeah?
peterhil_ has quit [Ping timeout: 250 seconds]
Spleeze has joined #ruby
chinmay_dd has quit [Ping timeout: 260 seconds]
<adaedra> Derailed: well, you added it to your Gemfile, right?
Coldblackice has quit [Read error: Connection reset by peer]
<Derailed> Ox0dea, no, but the classes with the same name are being defined in: class Admin::JobsController < Admin::BaseController
<Ox0dea> Ah, then it's Bundler doing the loading.
tomchapin has quit [Read error: Connection reset by peer]
AndyBotwin has joined #ruby
<Derailed> adaedra, "easy_admin" is in the Gemfile, yes.
<adaedra> So yes, bundler "Magic".
<adaedra> In fact, the Bundler.require that lies in config/application.rb
twilling has quit [Quit: twilling]
chinmay_dd has joined #ruby
<adaedra> (For rails at least.)
casadei has joined #ruby
InvGhosttt has joined #ruby
<adaedra> (Night time, see y'all)
babblebre has quit [Quit: Connection closed for inactivity]
<jhass> nchambers: what do you want to know about it?
<Ox0dea> Au revoir, adaedra.
<nchambers> jhass, just looking at how it does eval
<Derailed> adaedra, thanks!
AndyBotwin has quit [Max SendQ exceeded]
<Derailed> Ox0dea, does this look like a useful thing for me to read? http://urbanautomaton.com/blog/2013/08/27/rails-autoloading-hell/
yardenbar has quit [Ping timeout: 250 seconds]
<Derailed> or is it bad info?
<Ox0dea> nchambers: Sandboxing-wise, you mean?
<nchambers> yeah
<jhass> nchambers: just interested in the particular solution or how it could be done in general?
AndyBotwin has joined #ruby
<nchambers> the former. writing my own and taking a look at ones like geordi and rudybot
<jhass> well, I did one using playpen :)
<Ox0dea> Derailed: There's a less abrasive article that covers the same topics.
<nchambers> sweet thanks
<Derailed> Ox0dea, got a pointer? I'd definitely appreciate and experienced dev's opinions on which info is the most useful :-)
<nchambers> jhass, link?
Azulinho has quit [Remote host closed the connection]
<Ox0dea> Derailed: My having forgotten the author is making it difficult to find it again. :< Gimme a sec.
<jhass> nchambers: http://carc.in / github.com/jhass/carcin
<Derailed> Ox0dea, cheers :-D
<nchambers> ah nice. thanks
AndyBotwin has quit [Max SendQ exceeded]
Azulinho has joined #ruby
AndyBotwin has joined #ruby
<jhass> nchambers: and the hard work is in github.com/thestinger/playpen of course
<Ox0dea> Derailed: Ah, sorry, I was thinking of this rkh article on reloading: http://blog.rkh.im/code-reloading
twilling has joined #ruby
<Ox0dea> It's still pretty topical, mind.
xfbs has joined #ruby
<jhass> ^ that article is a good read in any case
devbug has quit [Read error: Connection reset by peer]
AndyBotwin has quit [Max SendQ exceeded]
AndyBotwin has joined #ruby
simplyianm has quit [Remote host closed the connection]
skade has quit [Quit: Textual IRC Client: www.textualapp.com]
devbug has joined #ruby
Azulinho has quit [Client Quit]
<nchambers> jhass, nice. I was thinking of doing a thing with lxc
Azulinho has joined #ruby
vdamewood has joined #ruby
User458764 has quit [Ping timeout: 245 seconds]
AndyBotwin has quit [Max SendQ exceeded]
casadei has quit [Remote host closed the connection]
AndyBotwin has joined #ruby
User458764 has joined #ruby
<jhass> I think charliesome is running just a seccomp filter with a quite elaborated whitelist (looking at arguments too)
<jhass> + some resource limits
<Ox0dea> nchambers: See also OpenBSD's tame(2) and FreeBSD's capsicum(4).
<Ox0dea> Both pretty "get your hands dirty", as best I can tell.
<Ox0dea> (I do realize that's probably not what you want.)
nkwsy___1 has joined #ruby
`based_pdev` has joined #ruby
blubjr has joined #ruby
Dood__ has joined #ruby
yardenbar has joined #ruby
DurstBurger has quit [Ping timeout: 260 seconds]
kadoppe has quit [Ping timeout: 260 seconds]
karapetyan has quit [Read error: Connection reset by peer]
based_pdev_ has quit [Ping timeout: 245 seconds]
karapetyan has joined #ruby
AndyBotwin has quit [Max SendQ exceeded]
DEVELOPERS has joined #ruby
zeroDivisible has quit [Quit: WeeChat 1.3]
kadoppe has joined #ruby
simplyianm has joined #ruby
DEVELOPERS has quit [Client Quit]
senayar has joined #ruby
snockerton1 has joined #ruby
snockerton has quit [Ping timeout: 265 seconds]
roshanavand has joined #ruby
zeroDivisible has joined #ruby
Rodya_ has joined #ruby
grotewold is now known as grotewold[afk]
edwinvdgraaf has joined #ruby
lacuna has quit [Read error: Connection reset by peer]
lawd has joined #ruby
tvon has joined #ruby
snockerton1 has quit [Read error: Connection reset by peer]
lacuna has joined #ruby
snockerton has joined #ruby
<lawd> hi i can usually do: 'apt-get install ruby-dev' on linux. What do you do for MAC
<nchambers> <jhass> I think charliesome is running just a seccomp filter with a quite elaborated whitelist (looking at arguments too) ← ah ok
grotewold[afk] has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<nchambers> <Ox0dea> nchambers: See also OpenBSD's tame(2) and FreeBSD's capsicum(4). ← thanks thats actually quite helpful
<jhass> lawd: OS X comes with Ruby
momomomomo has quit [Quit: momomomomo]
<lawd> hmm do you know how i can set the PATH
<apeiros> or you use rvm. or brew. or one of the other ruby version managers.
shadoi has quit [Quit: Leaving.]
roxtrongo has joined #ruby
<lawd> ruby-dev includes ruby doesn't it?
spcmastertim has joined #ruby
momomomomo has joined #ruby
Rodya_ has quit [Ping timeout: 250 seconds]
dimik has quit [Ping timeout: 250 seconds]
DexterLB has quit [Ping timeout: 260 seconds]
EvilDMP has joined #ruby
xfbs has quit []
asteros has quit [Quit: asteros]
goodcodeguy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
JDiPierro has quit [Remote host closed the connection]
<nchambers> lawd, PATH=$PATH:/new/path
DexterLB has joined #ruby
<havenwood> lawd: I don't think so.
Wsewolod has joined #ruby
<lawd> thanks!
<EvilDMP> Help! I have managed to get my ruby into a muddle ("zsh: /usr/local/bin/jekyll: bad interpreter: /usr/local/opt/ruby/bin/ruby: no such file or directory"). I am on OS X, but I am not an experienced Rubyist and would greatly appreciate some advice on getting it reinstalled correctly
Dood____ has joined #ruby
<EvilDMP> I use Homebrew
yoongkang has joined #ruby
nkwsy__14 has joined #ruby
<havenwood> lawd: On OS X there is a default system Ruby (or two, depending on your version) or it's popular to grab a package manager like Homebrew, pkgsrc, MacPorts or Fink - each of which have Ruby packages.
<EvilDMP> which ruby says: /usr/bin/ruby
devbug has quit [Remote host closed the connection]
<havenwood> lawd: Or you can always build Ruby yourself on OS X or use a tool like ruby-install or RVM to do it for you.
devbug has joined #ruby
baweaver has joined #ruby
<lawd> ah i think i'll try rvm thanks!
<apeiros> EvilDMP: sounds like you messed up your brew installed ruby. uninstall and install again?
baweaver has quit [Remote host closed the connection]
Dood__ has quit [Ping timeout: 245 seconds]
nkwsy___1 has quit [Ping timeout: 260 seconds]
<EvilDMP> apeiros: the ruby in /usr/bin/ruby is not a brewed version, I think it is the OS X default version
<EvilDMP> how can I check that it works?
<apeiros> EvilDMP: and that part sounds like you messed up your brew too
<apeiros> EvilDMP: well, actually no
baweaver has joined #ruby
<apeiros> first one says your brew ruby does not exist
svoop has quit [Quit: Textual IRC Client: www.textualapp.com]
DurstBurger has joined #ruby
<apeiros> so of course system ruby will be the one
Meeh has joined #ruby
<havenwood> EvilDMP: What Ruby do you want to be using?
<EvilDMP> havenwood: I don't mind
<apeiros> EvilDMP: anyway: reinstall the brewed ruby. then try again.
<EvilDMP> happy to revert to the system one if that helps
<havenwood> EvilDMP: If you go with Homebrew Ruby just: export PATH="$(brew --prefix ruby)/bin:$PATH"
<apeiros> havenwood: see above. his brew ruby isn't installed.
yoongkang has quit [Ping timeout: 245 seconds]
<apeiros> "bad interpreter: /usr/local/opt/ruby/bin/ruby: no such file or directory"
<apeiros> hence proper PATH won't help
<apeiros> and hence system ruby comes first.
<havenwood> apeiros: I meant after reinstalling brew ruby.
<havenwood> I thought that had been settled!
roshanavand has quit [Ping timeout: 250 seconds]
snockerton has quit [Quit: Leaving.]
<havenwood> ;)
<apeiros> well, before doing anything else, I'd just reinstall. and then see. path seems set properly, otherwise jekyll wouldn't work either.
bluOxigen has quit [Ping timeout: 250 seconds]
<EvilDMP> ok, that's kinda sorta progress
<EvilDMP> as in, jekyll sort of works
<havenwood> EvilDMP: Error?
<EvilDMP> it has this issue where it will fail to regenerate files - it starts then never completes
nwhirschfeld has quit [Read error: Connection reset by peer]
bluOxigen has joined #ruby
<EvilDMP> havenwood: http://dpaste.com/36H1SQH
<EvilDMP> never gets past "Regenerating"
gigetoo has quit [Ping timeout: 260 seconds]
nwhirschfeld has joined #ruby
<EvilDMP> whether this is Jekyll's fault or Ruby's, I don't know
lawd has quit [Quit: Page closed]
<EvilDMP> I wonder if I could try with only the system ruby, and without the brew ruby
B1n4r10 has joined #ruby
shadoi has joined #ruby
<havenwood> EvilDMP: brew unlink ruby
<havenwood> EvilDMP: brew link ruby
Guest30355 has joined #ruby
<apeiros> EvilDMP: it is your fault
rodfersou|afk has quit [Quit: leaving]
<apeiros> you installed jekyll with brew ruby
<apeiros> you no longer have brew ruby
<EvilDMP> apeiros: I'm sure it's my fault
<apeiros> jekyll no longer runs
<EvilDMP> havenwood: well, same issue with jekyll after that
<apeiros> and it's probably also whoevers fault for not using /usr/bin/env ruby
vakor has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
dorei has quit []
babblebre has joined #ruby
rakm has joined #ruby
<jhass> rubygems
<jhass> it has the option but it's still not a default
B1n4r10 has quit [Ping timeout: 260 seconds]
snockerton has joined #ruby
pleiosaur has quit [Ping timeout: 245 seconds]
senayar_ has joined #ruby
jbrhbr has quit [Quit: Leaving.]
spcmastertim has quit [Quit: Cheers!]
akem has joined #ruby
gigetoo has joined #ruby
senayar has quit [Ping timeout: 250 seconds]
baweaver has quit [Remote host closed the connection]
diegoaguilar has joined #ruby
krobzaur has quit [Ping timeout: 245 seconds]
kobain has joined #ruby
bluOxigen has quit [Ping timeout: 260 seconds]
gguggi has joined #ruby
zeroDivisible has quit [Quit: WeeChat 1.3]
<EvilDMP> should I expect gem install jekyll to try to install it into /usr/bin?
colleenmcguckin has quit [Changing host]
colleenmcguckin has joined #ruby
<EvilDMP> (it does)
bluOxigen has joined #ruby
rubie has joined #ruby
<Radar> Depends on how you installed your Ruby.
zeroDivisible has joined #ruby
bubbys has quit [Ping timeout: 250 seconds]
malconis has quit [Ping timeout: 250 seconds]
<Radar> Homebrew, supposedly?
postmodern has joined #ruby
<havenwood> jhass: aye, I look forward to a RubyGem --env-shebang default!
<Derailed> Hi! So Ox0dea was explaining 're-opening' classes to me. I have a related question: What if you 're-open' a class but specify a different '< SuperClass'? what happens then?
<Ox0dea> ?try Derailed
<ruboto> Derailed, Why don't you try it and see for yourself?
<Derailed> Fair point :-)
karapetyan has quit [Remote host closed the connection]
<Derailed> I'm reading a large chunk of code and trying to work out why it's doing what it's doing. Trying to get through it quickly but a little experimentation seems necessary
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<EvilDMP> Radar: botched! it was brewed, now I have removed that and am trying to get things working with the system ruby
<Radar> EvilDMP: You're going to have a bad time.
<EvilDMP> Radar: I am
pleiosaur has joined #ruby
<EvilDMP> not as bad as that time I borrowed a friend's motorbike though
<havenwood> chruby \o/
DurstBurger has quit [Ping timeout: 260 seconds]
howdoicomputer has joined #ruby
shadoi has quit [Quit: Leaving.]
sondr3 has joined #ruby
malconis has joined #ruby
weijun has quit []
jbrhbr has joined #ruby
dEPy has quit [Quit: (null)]
twilling has quit [Quit: twilling]
ibouvousaime has quit [Read error: Connection reset by peer]
waka has quit [Remote host closed the connection]
Jackneill has joined #ruby
NeverDie has joined #ruby
<apeiros> Derailed: since this is a special case: also try defining a class with a superclass, then reopen it without any superclass at all.
Guest30355 has quit [Ping timeout: 252 seconds]
shadoi has joined #ruby
asteros has joined #ruby
maloik has quit [Ping timeout: 260 seconds]
sondr3 has quit [Quit: Quit]
s00pcan has quit [Ping timeout: 260 seconds]
<Derailed> apeiros, thanks for the tip. So now I see that you get a 'superclass mismatch'
<Derailed> apeiros, and now I have to work out why the code that I'm reading DOESN'T generate one of those :-)
<jhass> maybe you confuse two classes with the same name in different namespaces as the same class?
uri has quit [Ping timeout: 260 seconds]
<Derailed> jhass, I think I must be doing something like that.
<Derailed> What I need is 12-16 hours to just sit down and cram the pickaxe book into my head :-) but that'll have to wait till the weekend
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
shanemcd has quit [Remote host closed the connection]
* Derailed is a Python developer who is learning Ruby by total immersion :-)
benlieb has quit [Read error: Connection reset by peer]
howdoicomputer has quit [Ping timeout: 250 seconds]
benlieb has joined #ruby
yfeldblum has joined #ruby
imperator has left #ruby ["Leaving"]
s00pcan has joined #ruby
<apeiros> Derailed: the point is that with `class X < A; end; class X; end` you don't get a mismatch (despite not having specified the same superclass)
xelfer has left #ruby [#ruby]
Unicorn| has quit [Quit: Connection closed for inactivity]
<Derailed> apeiros, I assume that's just to make adding methods/augmentic classes easier? Like, the second definition does *not* change the superclass, right?
<apeiros> correct
YP-QMUL-W has quit [Read error: Connection reset by peer]
<apeiros> but if you reverse the order, it'll fail
twilling has joined #ruby
jscheel has joined #ruby
<jscheel> Hi all, I’m having trouble with Resolv. On my local machine `Resolv::DNS.open { |dns| dns.getresources 'gmail.com.', Resolv::DNS::Resource::IN::MX }` returns a mailserver record. However, in my vagrant instance, the same line returns nothing.
dopie has quit [Quit: This computer has gone to sleep]
freerobby1 has quit [Ping timeout: 250 seconds]
<jscheel> running `nslookup -q=mx gmail.com` in the instance returns records
desmondhume has joined #ruby
Vitor has quit [Ping timeout: 245 seconds]
last_staff has quit [Ping timeout: 250 seconds]
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
B1n4r10 has joined #ruby
<jscheel> oh, wait, it returns bad info in the instance
<jscheel> this is a vagrant issue I think
brunto has quit [Ping timeout: 260 seconds]
gusTester has quit [Quit: Leaving.]
desmondhume has quit [Ping timeout: 245 seconds]
Ebok has joined #ruby
ledestin has joined #ruby
Vitor has joined #ruby
hahuang65 has joined #ruby
casadei has joined #ruby
baweaver has joined #ruby
grill has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
baweaver has quit [Remote host closed the connection]
SCHAAP137 has quit [Quit: Leaving]
snockerton has quit [Quit: Leaving.]
Vitor has quit [Ping timeout: 260 seconds]
Vitor has joined #ruby
colegatron has quit [Ping timeout: 260 seconds]
casadei has quit [Ping timeout: 260 seconds]
gaussblurinc1 has quit [Quit: Leaving.]
Guest38 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jhn has joined #ruby
Authenticator has joined #ruby
lacuna has quit [Read error: Connection reset by peer]
gaussblurinc1 has joined #ruby
cdg has quit [Remote host closed the connection]
lacuna has joined #ruby
vdamewood has quit [Ping timeout: 260 seconds]
yfeldblum has quit [Remote host closed the connection]
Authenticator has quit [Client Quit]
yfeldblum has joined #ruby
Authenticator has joined #ruby
`based_pdev` has quit [Ping timeout: 245 seconds]
Authenticator has quit [Client Quit]
Vitor has quit [Ping timeout: 260 seconds]
nettoweb has quit [Ping timeout: 250 seconds]
Authenticator has joined #ruby
Ilyes512 has joined #ruby
Guest38 has joined #ruby
iateadonut has joined #ruby
vdamewood has joined #ruby
devbug has quit [Read error: Connection reset by peer]
<Synthead> is there a way I can declare these methods in a loop? http://pastie.org/private/bigfk0vdbvanc3xwewpq
gaussblurinc1 has quit [Ping timeout: 260 seconds]
Cy-24 has joined #ruby
<apeiros> &ri define_method @Synthead
<`derpy> No results found
Vitor has joined #ruby
<apeiros> tsk tsk tsk, `derpy…
<apeiros> &ri Module#define_method @Synthead
<`derpy> method `Module#define_method`: Defines an instance method in the receiver. The _method_ parameter can be a +Pro… • http://rubydoc.info/stdlib/core/Module#define_method-instance_method
devbug has joined #ruby
<apeiros> adaedra: is that a regression? I thought derpy searches core/stdlib for plain methods?
twilling has quit [Quit: twilling]
<Authenticator> I'm building a gem, using bundler. Is there any way I can get it to install, from a .gem on my internal server, but using the dependencies in vendor/cache? I can get *bundler* to do this, but that's another step for the user...
baweaver has joined #ruby
<Synthead> apeiros: hm, that example looks really hacky
lacuna has quit [Read error: Connection reset by peer]
<jhass> rubygems doesn't read vendor/cache and if it exists you have bundler already anway, no?
lxsameer has quit [Quit: Leaving]
<jhass> *anyway
lacuna has joined #ruby
lacuna has quit [Changing host]
lacuna has joined #ruby
napcae has joined #ruby
Cy-24 has quit [Remote host closed the connection]
<Authenticator> jhass: I'm including the deps in the gem, so no the user may not have Bundler at that point.
BBird has joined #ruby
DurstBurger has joined #ruby
linc01n has quit [Ping timeout: 260 seconds]
<jhass> so you imagine rubygems to unpack your gem to some temporary location to check whether some dependencies are hidden into it and then unpacking it again to install it or something?
<jhass> No, it doesn't do anything like that
<drbrain> maybe if you `gem install -g`
simplyianm has quit [Remote host closed the connection]
Ruby_Rocks_007 has joined #ruby
linc01n has joined #ruby
<Authenticator> jhass: I imagine it does not - but yeah that's what I want. Otherwise, what good are vendored dependencies?
<jhass> rubygems has no concept of vendored dependencies
<jhass> that's a bundler concept
<Synthead> apeiros: can I define a method with params?
<apeiros> yes
djbkd has joined #ruby
InvGhosttt has quit [Ping timeout: 264 seconds]
<Synthead> apeiros: oooh, I see, you pass the variables in the block
gguggi has quit [Ping timeout: 260 seconds]
<Synthead> apeiros: there we go, I got it figured out. all nice and dry. thanks a lot!
colegatron has joined #ruby
hakunin has joined #ruby
<apeiros> all I did was point you at the right page in the manual ;-) but yw
<Authenticator> jhass: Yeah, I mean that's what I'm discovering... I can see that it's that way because gems came first. Is it not a good idea though? A pass-through to bundler in modern versions of gem, or something...?
<jhass> It probably isn't
NightMonkey has joined #ruby
<jhass> I don't see the issue anyways
napcae has quit [Quit: leaving]
<drbrain> Authenticator: RubyGems can install from a Gemfile with `gem install -g`, so it might work that way
bubbys has joined #ruby
hahuang65 has quit [Ping timeout: 260 seconds]
<jhass> they gotta fetch you gem from somewhere, why not let them fetch the dependencies there or whereever too
<drbrain> there may be bugs, though
Ruby_Rocks_007 has quit [Ping timeout: 245 seconds]
<Authenticator> I think I could fake what I want if I separated the Gemfile. Tell gem that the gem relied only on bundler, then run bundler install --local...
<Authenticator> drbrain: Looking.
<jhass> honestly, I feel like you're about to create a huge mess
CloCkWeRX has quit [Ping timeout: 250 seconds]
Jackneill has quit [Ping timeout: 260 seconds]
hobodave has quit [Quit: Computer has gone to sleep.]
Ruby_Rocks_007 has joined #ruby
<jhass> and that while I'm not even convinced there's really an issue you need to solve
<Ruby_Rocks_007> hi
<Ruby_Rocks_007> ruby newbie asking for help on operator precedency:
<Authenticator> jhass: I imagine you'd be tough to convince.
CloCkWeRX has joined #ruby
[Butch] has quit [Quit: I'm out . . .]
<drbrain> if you have a directory full of gems you want to install, you can always `gem install --force --local *.gem`
<drbrain> which may be equivalent?
<drbrain> I haven't read much scrollback
platzhirsch has joined #ruby
<Ruby_Rocks_007> does the ‘&&’ operation does have higher priority than ‘if’ the statement modifers?
<jhass> drbrain: from what I've gathered they want to package a bunch of .gem files into a .gem file and have the outer .gem depend on the gems packaged in the inner .gem's
devbug has quit [Read error: Connection reset by peer]
<Ruby_Rocks_007> then some one can help elaborate why this doesn’t print...
<drbrain> oh, yeah, RubyGems doesn't support that
<Ruby_Rocks_007> a=123;
<Ruby_Rocks_007> sorryl
<Ruby_Rocks_007> sorry;
<Ruby_Rocks_007> a=nil;
<jhass> ?gist Ruby_Rocks_007
<ruboto> Ruby_Rocks_007, https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
<jhass> throw up some code explaining what you mean there please
<Ruby_Rocks_007> (a=123) && print(‘hello ruby’) if a
devbug has joined #ruby
<Authenticator> drbrain: jhass: Mostly. Yeah. I know it doesn't. I'm trying to figure out if I should just make it work via some simple work-around or if there's a better way to achieve a simple local install.
<Ruby_Rocks_007> that is it.
<jhass> Authenticator: there's most certainly a better way
<Ruby_Rocks_007> if ‘&&’ does have high pri, then it should print
RegulationD has quit [Remote host closed the connection]
<jhass> Authenticator: specifics depend on how you distribute your .gem and where the dependencies come from initially
<Ruby_Rocks_007> but it didn’t — and so ‘if’ statement modifier have the highest pri?
<Authenticator> jhass: Do you have any idea what it would be for a seamless (non-ruby users trying to install script) UX, with a no-net-connection install
<jhass> Ruby_Rocks_007: you can see it that way, yes
<drbrain> Ruby_Rocks_007: modifier `if` has higher priority than `&&`
workmad3 has quit [Ping timeout: 245 seconds]
simplyianm has joined #ruby
<Ruby_Rocks_007> O’Reilly book said that ‘if’ statment modifers have lowest priority.
<Ruby_Rocks_007> so I got completely lost here — from C/C++/Java background
<Authenticator> jhass: Thanks. Looking.
<drbrain> Ruby_Rocks_007: `if condition then … end` and `… if condition` are parsed differently
Rickmasta has joined #ruby
workmad3 has joined #ruby
<drbrain> so they can have different priorities
<Ruby_Rocks_007> @drbrian, so how the statement parsed and carried out?
<Ruby_Rocks_007> (a=123) && print(‘hello ruby’) if a
<Ruby_Rocks_007> when variable ‘a’ is value nil.
<drbrain> Ruby sees it as ((a=123) && print(‘hello ruby’)) if a
<jhass> Ruby_Rocks_007: you observed it correctly already
<Ruby_Rocks_007> yes, it didn’t print
<drbrain> but when it parses, it encounters the `a=` first, so `a` becomes a local variable instead of a method call
<drbrain> and local variables default to `nil`i
<Ruby_Rocks_007> the left side of ‘if’ should run first — as it is have higher priority,
<drbrain> this is the tricky part of modifier if
<Ruby_Rocks_007> and then becomes statement (nil) if a
<drbrain> `a=` is parsed first, but executed last
<drbrain> (if at all)
<Ruby_Rocks_007> the left side:
<Ruby_Rocks_007> ((a=123) && print(‘hello ruby’))
_djbkd has joined #ruby
<Ruby_Rocks_007> ‘should’ be executed first
dhollinger has quit [Quit: WeeChat 1.3]
<Ruby_Rocks_007> before turns into statement:
<Ruby_Rocks_007> nil if a
djbkd has quit [Ping timeout: 260 seconds]
<Ruby_Rocks_007> as ‘if’ has lowest priority
<drbrain> but modifier-if doesn't work that way
<Ruby_Rocks_007> just like: 1 + 2*3
<Ruby_Rocks_007> 2*3 carried out first, and turns into: 1+6
SecretAgent has joined #ruby
<drbrain> you can't run the body of an if when the condition is false
CustosLimen has quit [Quit: CustosLimen]
<drbrain> comparing `if` to operators isn't comparing like things
<Ruby_Rocks_007> @drbrain, then the book is at some-what-level inaccurate (for newbies),
<jhass> Ruby_Rocks_007: either you misinterpreted something in your book or it's misleading or simply wrong. I don't have it so I can't double check, but you need to get over that interpretation, it's wrong
<Ruby_Rocks_007> the modifiers have —highest— priority.
graydot has joined #ruby
mary5030 has quit [Remote host closed the connection]
_stu_ has quit [Quit: _stu_]
<drbrain> and modifier-if is extra tricky because ruby allows reciever-less methods and local variables to share the same namespace
g3funk is now known as braidn
<drbrain> I would say lowest
<Ruby_Rocks_007> The book ‘The Ruby Programming Language’ by O’Reilly. Page #103
<drbrain> because && binds the assignment and print expressions together
<drbrain> precedence is like stickiness
CustosLimen has joined #ruby
<drbrain> high precedence means more sticky, so && sticks (a=123) and print('hello ruby') together
mooe has quit [Quit: Connection closed for inactivity]
<Ruby_Rocks_007> @drbrain, so ‘&&’ operator binds first,
<drbrain> and more tightly than it can stick print('hello ruby') and if together
<Ruby_Rocks_007> but runs second (to the modifer-if)
<drbrain> yes
sepp2k1 has quit [Read error: Connection reset by peer]
<Ruby_Rocks_007> so, what is the difference between binding vs. running, as far as sequence is concerned?
<Ruby_Rocks_007> for me, it looks like quite the same?
casadei has joined #ruby
<drbrain> binding and running should be the same
<drbrain> but parsing and running can have strange results
Nilium has quit [Ping timeout: 245 seconds]
<drbrain> or, unintuitive if you're new to ruby's syntax quirks
devbug has quit [Read error: Connection reset by peer]
<Ruby_Rocks_007> that’s why a newbie is here. :)
<Ruby_Rocks_007> parsing/binding says that ‘&&’ operator have the assignment and print,
<Ruby_Rocks_007> but running says that modifier-if will run first, is that right?
kirun has quit [Quit: Client exiting]
<drbrain> yes
shadoi has quit [Quit: Leaving.]
momomomomo has quit [Quit: momomomomo]
<drbrain> because low-precedence means `if` can grab less on the left and right
<drbrain> but here `if` grabs all of `((a=123) && print('hello ruby'))`
<drbrain> because the `&&` makes the expression left of the `if` all one group
<Ruby_Rocks_007> so, the precedence means the capability to ‘grab’ nearby oprands,
devbug has joined #ruby
<drbrain> roughly, yes
_stu_ has joined #ruby
calderonroberto has joined #ruby
<Ruby_Rocks_007> is there a table shows the running capability for ruby, just like the table for precedence?
<drbrain> the precedence table determines how things run as expressions
<Ruby_Rocks_007> say, modifier-if is of higher priority than operator ‘&&’ when running sequence is concerned
howdoicomputer has joined #ruby
vikas027 has quit [Ping timeout: 260 seconds]
Sam0163141155 has joined #ruby
<drbrain> it becomes confusing (in general, for humans) if the parse-time precedence table and runtime precedence tables are different
<drbrain> I haven't heard of a language designer specifying these separately
Sam0163141155 has quit [Read error: Connection reset by peer]
<Ruby_Rocks_007> @drbrain, your mentioned the right point
Sam0163141155 has joined #ruby
<Sam0163141155> If I was to declare a local variable within a class, outside of all methods, would it behave exactly the same as an instance variable?
<Ruby_Rocks_007> exactly I got confused here
Nilium has joined #ruby
maddmaxx has quit [Quit: Going offline, see ya! (www.adiirc.com)]
duncannz has quit [Ping timeout: 250 seconds]
<jhass> Sam0163141155: no
<drbrain> Sam0163141155: it would only be local to that one time you opened the class
Guest38 has quit [Ping timeout: 250 seconds]
<Sam0163141155> Ah, of course! Brilliant, thanks!
<Ruby_Rocks_007> case #1, 1+3*2
<drbrain> >> class A; v = 1; end; class A; p v; end
<ruboto> drbrain # => undefined local variable or method `v' for A:Class (NameError) ...check link for more (https://eval.in/478654)
<Ruby_Rocks_007> the 3*2 is parsed first and runs first, and then turns into: 1+6
DurstBurger has quit [Ping timeout: 260 seconds]
millerti has joined #ruby
<jhass> Ruby_Rocks_007: do you have a rough idea of what an AST is?
<drbrain> Ruby_Rocks_007: I would say "1 is parsed, then + is parsed, then 3 is parsed, then * is parsed, then 2 is parsed, then an expression is assembled that has the right order-of-operation based on the precedence table"
<Ruby_Rocks_007> case #2 above is counter-intutive, the ‘&&’ operator is parsed and binded first, but runs second.
<drbrain> but this is entering the territory of how parsing algorithms work
user083 has joined #ruby
B1n4r10 has quit [Ping timeout: 250 seconds]
Sam0163141155 has quit [Client Quit]
howdoicomputer has quit [Ping timeout: 260 seconds]
<Ruby_Rocks_007> @jhass, I think I returned AST to CS teacher,
<drbrain> if you want to know how parsers do their parsing
<Ruby_Rocks_007> I am a nice student. :)
<jhass> to me it helps to try to roughly come up with an AST for stuff, visually that is
<jhass> but we can also ask Ruby for it actually
<drbrain> for "3*2+1" I would say "3 then * then 2 are parsed, then a sub-expression is assembled, then + and 1 are parsed and the full expression is assembled
<Ruby_Rocks_007> got it, @drbrain. I’ll check it out shortly.
casadei has quit [Remote host closed the connection]
maloik has joined #ruby
<jhass> >> require "pp"; require "ripper"; pp Ripper.sexp("(a = 123) && print('hi') if a")
<ruboto> jhass # => [:program, ...check link for more (https://eval.in/478657)
<Ruby_Rocks_007> great.
<Ruby_Rocks_007> 2nd question:
<jhass> that's basically the representation that is then "run"
<Ruby_Rocks_007> How do I debug a ruby program step by step? on ruby 1.8.7 on centos 6?
<jhass> don't
<jhass> update
<jhass> 1.8.7 is beyond dead
<Ruby_Rocks_007> I learn ruby syntax with ‘irb’,
<eam> it's pretty far from dead
<jhass> it's nothing you should learn Ruby with in 2015
<eam> it's the distro ruby in a lot of commonly run systems
Ilyes512 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ruby_Rocks_007> ruby -rdebug abc.rb doesn’t work as expected
maloik has quit [Ping timeout: 250 seconds]
<Ruby_Rocks_007> @jhass, what’s the new head-version ruby you would recommend for a newbie?
<jhass> 2.2.r
<jhass> *.3
<jhass> in short, latest
<Ruby_Rocks_007> I see, does 2.* differs greatly from distro 1.8.7?
queequeg1 has joined #ruby
<jhass> quite a bit
<jhass> most differences happened between 1.8 and 1.9 though
<jhass> (which both are out of official support)
<Ruby_Rocks_007> I see, our systems comes with 1.8, let me check out centos 7 and see ruby version inside,
<baweaver> short version: don't use old versions unless you absolutely have to
<baweaver> and even then, question the sanity of who said that
krobzaur has joined #ruby
davedev2_ has joined #ruby
<darix> distro maintained ruby version >>> one shot custom installed ruby nobody maintains
<Ruby_Rocks_007> the ruby books are still of old version 1.8/1.9
<pragmatism_> I'm having trouble getting Ruby 2.3 installed, here's the output from ruby-build: https://gist.github.com/dankozlowski/dac955a3eb4299d199b0
<pragmatism_> Anyone had the same issue?
B1n4r10 has joined #ruby
<Ruby_Rocks_007> can you recommend some resources for ruby 2.* for newbies?
<drbrain> pragmatism_: you're going to need to post the whole log
<drbrain> per line 8
yeticry has quit [Ping timeout: 260 seconds]
<pragmatism_> drbrain Updated Gist
akem has quit [Remote host closed the connection]
davedev24 has quit [Ping timeout: 260 seconds]
yeticry has joined #ruby
maloik has joined #ruby
akem has joined #ruby
Wsewolod has quit [Quit: Leaving]