baweaver changed the topic of #ruby to: Rules & more: https://ruby-community.com || Ruby 2.3.1; 2.2.5; 2.1.10: https://ruby-lang.org || Paste >3 lines of text on https://gist.github.com || logs @ https://irclog.whitequark.org/ruby/
Eiam_ has quit [Quit: ╯°□°)╯︵ǝpouǝǝɹɟ]
wrkrcoop has quit [Quit: wrkrcoop]
kab has quit [Read error: Connection reset by peer]
aibot_ has quit [Remote host closed the connection]
jaequery has joined #ruby
Pumukel has quit [Ping timeout: 264 seconds]
jazzonmym1nd has joined #ruby
nitric has joined #ruby
jazzonmym111nd has quit [Disconnected by services]
Pumukel has joined #ruby
Rodya_ has quit [Remote host closed the connection]
wrkrcoop has joined #ruby
haraigoshi has quit [Ping timeout: 276 seconds]
wrkrcoop has quit [Client Quit]
JeanCarloMachado has quit [Ping timeout: 244 seconds]
JeanCarl1Machado has quit [Ping timeout: 260 seconds]
Velizar has joined #ruby
MyMind has quit [Ping timeout: 264 seconds]
marr has quit [Ping timeout: 265 seconds]
l4v2 has quit [Quit: l4v2]
Rodya_ has joined #ruby
l4v2 has joined #ruby
<shellie_> Velizar: for starters, the use of single letter variables are discouraged
<Radar> Yes.
twe4ked has quit [Ping timeout: 250 seconds]
<Velizar> ok fine I'll change that file
<shellie_> could you not just do a map operation over it?
<Velizar> done
<shellie_> Radar: you beat me to it :)
<shellie_> and that looks nice!
<Velizar> Radar: yes that works, sorry I forgot to mention there were other things in the hash as well
<Radar> shellie_: not by much
Pumukel has quit [Ping timeout: 264 seconds]
<Radar> Velizar: And what would you like to do with those other things in the hash?
<Velizar> Radar: Keep them as is. Just like in the code.
<Velizar> (I updated the gist again to add other_stuff)
<Radar> Velizar: And how does the code I show you do not do that?
Pumukel has joined #ruby
<Velizar> ah, my bad
<Velizar> wasn't there a nicer method? I recall .dig was similar
twe4ked has joined #ruby
<Velizar> :outer and :inner are really long names in my case
Guest77375 is now known as minsky
<matthewd> block = -> value { case value; when Hash; value.transform_values(&block); when Array; value.map(&block); else; value.to_s; end }; hash = block.(hash)
<matthewd> (don't actually do that)
<Velizar> guess not then. :D
beilabs has joined #ruby
Pumukel has quit [Ping timeout: 260 seconds]
meth has quit [Quit: Bye!]
ta_ has joined #ruby
wrkrcoop has joined #ruby
beilabs has quit [Ping timeout: 264 seconds]
TPug has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
hipertracker has joined #ruby
zeroDivisible has quit [Ping timeout: 240 seconds]
ta_ has quit [Ping timeout: 260 seconds]
dagelf has quit [Read error: Connection reset by peer]
sleepee has quit [Quit: Leaving]
crystal77 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dagelf has joined #ruby
zeroDivisible has joined #ruby
replay has quit []
astrobun_ has joined #ruby
wrkrcoop has quit [Quit: wrkrcoop]
dandaman has joined #ruby
Pumukel has joined #ruby
haraigoshi has joined #ruby
astrobun_ has quit [Remote host closed the connection]
harai has joined #ruby
aibot has joined #ruby
wrkrcoop has joined #ruby
cwali has joined #ruby
jazzonmym11nd has joined #ruby
MyMind has joined #ruby
flashpoint9 has quit [Remote host closed the connection]
davedev24 has joined #ruby
JeanCarloMachado has joined #ruby
griffindy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
galeido has quit [Ping timeout: 276 seconds]
tectonic has joined #ruby
haraigoshi has quit [Ping timeout: 240 seconds]
jazzonmym1nd has quit [Ping timeout: 264 seconds]
Pumukel has quit [Ping timeout: 264 seconds]
blackmesa has joined #ruby
flashpoint9 has joined #ruby
moeabdol1 has joined #ruby
JeanCarl1Machado has joined #ruby
tvw has quit [Ping timeout: 264 seconds]
Elvin_ has joined #ruby
ruby-lang330 has joined #ruby
blackmesa has quit [Ping timeout: 265 seconds]
ta_ has joined #ruby
RedNifre has joined #ruby
beilabs has joined #ruby
RedNifre_ has quit [Ping timeout: 250 seconds]
SeepingN has quit [Disconnected by services]
SeepingN_ has joined #ruby
Spami has joined #ruby
aries_liuxueyang has quit [Ping timeout: 240 seconds]
statelesscode has quit [Quit: statelesscode]
aries_liuxueyang has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
ta_ has quit [Ping timeout: 265 seconds]
SeepingN_ has quit [Client Quit]
beilabs has quit [Ping timeout: 240 seconds]
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jazzonmym111nd has joined #ruby
jbomo has joined #ruby
jazzonmym11nd has quit [Ping timeout: 276 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
tdy has quit [Read error: Connection reset by peer]
wrkrcoop has quit [Quit: wrkrcoop]
RegulationD has joined #ruby
leea has joined #ruby
arescorpio has joined #ruby
wuyin has quit [Ping timeout: 244 seconds]
wuyin has joined #ruby
youch has joined #ruby
statelesscode has joined #ruby
Robtop__ has quit [Read error: Connection reset by peer]
youch has quit [Client Quit]
ramfjord has quit [Ping timeout: 244 seconds]
RegulationD has quit [Ping timeout: 240 seconds]
jazzonmym1nd has joined #ruby
Robtop__ has joined #ruby
LoneHermit has joined #ruby
saneax is now known as saneax-_-|AFK
statelesscode has quit [Client Quit]
jazzonmym111nd has quit [Ping timeout: 258 seconds]
MyMind has quit [Read error: Connection reset by peer]
flashpoint9 has quit [Remote host closed the connection]
wuyin has quit [Ping timeout: 265 seconds]
daffy_duck_2 is now known as polkovnik_na_bel
dandaman has quit [Read error: Connection reset by peer]
polkovnik_na_bel is now known as polkovnik
wuyin has joined #ruby
MyMind has joined #ruby
moeabdol1 has quit [Ping timeout: 250 seconds]
statelesscode has joined #ruby
flashpoint9 has joined #ruby
Pumukel has joined #ruby
crystal77 has joined #ruby
tdy has joined #ruby
jazzonmym11nd has joined #ruby
jazzonmym1nd has quit [Ping timeout: 265 seconds]
MrBusiness2 has quit [Ping timeout: 250 seconds]
wuyin has quit [Ping timeout: 240 seconds]
Pumukel has quit [Ping timeout: 260 seconds]
flashpoint9 has quit [Remote host closed the connection]
polysics has joined #ruby
wuyin has joined #ruby
rsampaio_ has quit [Ping timeout: 265 seconds]
beilabs has joined #ruby
JeanCarloMachado has quit [Ping timeout: 244 seconds]
JeanCarl1Machado has quit [Ping timeout: 240 seconds]
nitric has quit [Ping timeout: 240 seconds]
segmond has joined #ruby
Ropeney has joined #ruby
jackjackdripper has quit [Ping timeout: 244 seconds]
shinnya has quit [Ping timeout: 244 seconds]
Elvin_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
amclain has quit [Quit: Leaving]
polysics has quit [Ping timeout: 276 seconds]
Pumukel has joined #ruby
pwnd_nsfw has joined #ruby
tdy has quit [Quit: tdy]
jackjackdripper has joined #ruby
etehtsea has joined #ruby
beilabs has quit [Ping timeout: 258 seconds]
Robtop__ has quit [Ping timeout: 250 seconds]
ruby-lang330 has quit [Quit: Page closed]
Pumukel has quit [Ping timeout: 265 seconds]
Pumukel has joined #ruby
karmatr0n has quit [Ping timeout: 276 seconds]
Coldblackice has quit [Read error: Connection timed out]
tsia has joined #ruby
Coldblackice has joined #ruby
Pumukel has quit [Ping timeout: 260 seconds]
yokel has quit [Ping timeout: 265 seconds]
genpaku has quit [Ping timeout: 250 seconds]
Pumukel has joined #ruby
yokel has joined #ruby
genpaku has joined #ruby
tsia has quit [Ping timeout: 276 seconds]
craysiii has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Pumukel has quit [Ping timeout: 260 seconds]
LoneHermit has quit [Ping timeout: 244 seconds]
dandaman has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
diprotic has joined #ruby
ahuman has quit [Ping timeout: 258 seconds]
monoprotic has quit [Ping timeout: 244 seconds]
ahuman has joined #ruby
diprotic is now known as monoprotic
beilabs has joined #ruby
blackmesa has joined #ruby
arashb has joined #ruby
mikecmpbll has joined #ruby
mikecmpbll has quit [Client Quit]
flashpoint9 has joined #ruby
_Rev has joined #ruby
nando293921 has joined #ruby
beilabs has quit [Ping timeout: 276 seconds]
TPug has joined #ruby
blackmesa has quit [Ping timeout: 260 seconds]
karmatr0n has joined #ruby
ahuman has quit [Ping timeout: 244 seconds]
hipertracker has quit [Quit: hipertracker]
arashb has quit [Ping timeout: 252 seconds]
jackjackdripper has quit [Quit: Leaving.]
tdy has joined #ruby
Pumukel has joined #ruby
TPug has quit [Read error: Connection reset by peer]
griffindy has joined #ruby
saneax-_-|AFK is now known as saneax
ahuman has joined #ruby
heelpmeplz has quit [Ping timeout: 258 seconds]
hahuang61 has joined #ruby
MrBusiness2 has joined #ruby
heelpmeplz has joined #ruby
Pumukel has quit [Ping timeout: 244 seconds]
jackjackdripper has joined #ruby
Pumukel has joined #ruby
hahuang61 has quit [Ping timeout: 250 seconds]
MrBusiness3 has joined #ruby
jazzonmym111nd has joined #ruby
jazzonmym11nd has quit [Ping timeout: 250 seconds]
TheHodge has quit [Quit: Connection closed for inactivity]
tmtwd has joined #ruby
astrobun_ has joined #ruby
Azure has quit [Ping timeout: 240 seconds]
MrBusiness2 has quit [Ping timeout: 250 seconds]
ahuman has quit [Ping timeout: 265 seconds]
Pumukel has quit [Ping timeout: 260 seconds]
raatiniemi has joined #ruby
crystal77 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jenrzzz has quit [Ping timeout: 244 seconds]
Coldblackice has quit [Ping timeout: 276 seconds]
_Rev has quit []
ahuman has joined #ruby
c355e3b has quit [Quit: Connection closed for inactivity]
BTRE has quit [Ping timeout: 244 seconds]
flashpoint9 has quit [Remote host closed the connection]
Torrieri has joined #ruby
Torrieri has quit [Changing host]
Torrieri has joined #ruby
beilabs has joined #ruby
Pumukel has joined #ruby
pwnd_nsfw` has joined #ruby
crystal77 has joined #ruby
wuyin has quit [Remote host closed the connection]
ta_ has joined #ruby
beilabs has quit [Ping timeout: 252 seconds]
pwnd_nsfw has quit [Ping timeout: 250 seconds]
Pumukel has quit [Ping timeout: 260 seconds]
polysics has joined #ruby
mostlybadfly has joined #ruby
coolboy has joined #ruby
wuyin has joined #ruby
ta_ has quit [Ping timeout: 240 seconds]
akerl has joined #ruby
Rodya_ has quit [Remote host closed the connection]
polysics has quit [Ping timeout: 244 seconds]
Pumukel has joined #ruby
<akerl> Trying to sort out why `spawn({'PATH' => 'what'}, 'ssh -V')` doesn't do what I'd expect (error with "command not found"). Based on strace, looks like Ruby looks in standard paths, ignoring my env var. Confirmed that `spawn({'PATH' => 'what'}, 'env')` shows that I've modified PATH as expected. Also confirmed `spawn('PATH=what ssh -V')` does what I'd expect, though obviously that doesn't work as well for weird
<akerl> inputs
wuyin has quit [Ping timeout: 260 seconds]
jackjackdripper has quit [Quit: Leaving.]
nando293921 has quit [Ping timeout: 250 seconds]
Pumukel has quit [Ping timeout: 250 seconds]
Vingador has joined #ruby
<adam12> akerl: sounds like ssh -V is using a shell, which might be clobering your PATH
<adam12> akerl: What about `spawn({'PATH' => 'what', 'ssh', '-V')`
Robtop__ has joined #ruby
AndyBotwin has quit [Ping timeout: 276 seconds]
<akerl> works
<akerl> ssh is also just a dummy command I picked; any command behaves similarly. Strace makes it look like Ruby is doing its own searching of PATH in the original PID before execve-ing to the new thing
wuyin has joined #ruby
<akerl> this is the execve call from the spawn that should fail, but doesn't, where I set {'PATH' => 'what'}: [pid 18138] execve("/usr/sbin/ssh", ["ssh", "-V"], [/* 10 vars */] <unfinished ...>
<adam12> Ah, I see.
<akerl> above that, the original pid scans /usr/bin and friends, then execs into it with the path that it found
<akerl> the one that fails as expected looks like this: [pid 18143] execve("/bin/sh", ["sh", "-c", "PATH=what ssh -V"], [/* 10 vars */]) = 0
pwnd_nsfw` has quit [Ping timeout: 250 seconds]
<akerl> Ah, this is interesting
pulgolino has quit [Remote host closed the connection]
<akerl> I can trick it into properly failing by prefixing my command with "A=1"
<akerl> which appears to trick the ruby PATH-searching into falling through to the case where it invokes /bin/sh, which properly uses my PATH var
etehtsea has quit [Ping timeout: 240 seconds]
saneax is now known as saneax-_-|AFK
<akerl> Unfortunately, that appears to only work with commands provided as a string ('A=1 ssh -V'), and fails with array-based (['A=1', 'ssh', '-V'])
sandroqz has joined #ruby
<matthewd> Yeah, that sounds like expected behaviour
sandroqz has quit [Remote host closed the connection]
<akerl> The A=1 in array part, yes
<akerl> Not so much the "ignoring my PATH" bit :P
<matthewd> Not necessarily very helpful-to-you-right-now behaviour, but expected nonetheless :)
jaequery has joined #ruby
jaequery has quit [Read error: Connection reset by peer]
jaequery has joined #ruby
jaequery has quit [Read error: Connection reset by peer]
Dimik has quit [Ping timeout: 260 seconds]
Torrieri has quit [Quit: Lingo: www.lingoirc.com]
<matthewd> Ruby runs the command itself unless it decides the string looks too hard, in which case it will run it through a shell
nankyokusei has joined #ruby
<akerl> Is there a way to have it not? It's not even that it's scanning my PATH and falling back to the system path; it never scans my PATH
jaequery has joined #ruby
jaequery has quit [Read error: Connection reset by peer]
<matthewd> So the shell will get your new path and do what you want; with no shell involved, ruby has no special treatment of the environment variables being passed to the child process
BTRE has joined #ruby
jaequery has joined #ruby
jaequery has quit [Read error: Connection reset by peer]
Xiti has quit [Quit: Xiti]
jaequery has joined #ruby
jaequery has quit [Read error: Connection reset by peer]
jaequery has joined #ruby
jaequery has quit [Read error: Connection reset by peer]
<akerl> I'd originally assumed this was some helpful thing ruby was doing, which I'd be able to opt out of with some option flag. but the docs I'm reading make it look like there's no way in ruby core for me to sanely run a command with a non-standard PATH
<matthewd> Simplest thing that comes to mind is to run ['A=1', '/usr/bin/env', 'ssh', '-V']
jaequery has joined #ruby
speakingcode has joined #ruby
jaequery has quit [Read error: Connection reset by peer]
<akerl> that fails, though, since in array form the first element has to be a valid command (since it's not shelling it out)
<matthewd> Yeah, I just looked for an option to spawn, but apparently not
<akerl> So I'd basically have to form whatever I need to run into a string param myself, and then prefix with A=1
AndyBotwin has joined #ruby
<matthewd> Oh, right, sorry... ({ 'A' => '1' }, '/usr/bin/env', 'ssh', '-V')
cpruitt has quit [Quit: cpruitt]
<akerl> Ah. So prefixing with /usr/bin/env so as to have that thing do the path lookup
nankyokusei has quit [Ping timeout: 264 seconds]
<matthewd> If you want to go the single-string route, there's shellwords to help you put it together.. but yeah, I'd just use env
<akerl> Downside of my current flexibility: I'll have to mod my code to support either (prefix with A=1 if the arg I receive is a string, push /usr/bin/env onto array if it's array)
<matthewd> Via its use in #! lines, the idea of relying on env to do a path lookup is pretty well precedented, IMO
<matthewd> Appending ';' is probably neater than inserting a confusing env var... I'm 99% sure that's enough to push it into "needs a shell" mode
<matthewd> Or, do the fork+exec for yourself, and change ENV['PATH'] in between... that should Just Work
<akerl> Honest question: this feels like if not a bug, certainly a suboptimal gap in the current spawn/popen/system family of things-that-create-subprocesses, where it would be preferrable to have some way to tell them "hey please don't parse path on my behalf". Does that seem sane?
<matthewd> It has to parse the path to find something to run
<matthewd> I could see overriding the path, as you can with chdir, though
coolboy has quit [Ping timeout: 250 seconds]
blackmesa has joined #ruby
davedev24 has quit []
<akerl> True
Xiti has joined #ruby
<matthewd> (in the extreme, it still has to search the path to find a shell to hand off to)
<matthewd> I guess the closest you get to "leave the path to me" is just handing it an absolute path to begin with
<matthewd> So, you could pre-search the path yourself, but that doesn't help much with your string-vs-array flexibility problem
ta_ has joined #ruby
<akerl> Yea. I'm currently pondering whether my use case is simple enough that I could just accept "this isn't gonna be thread-safe, but also has no threads and is unlikely to" and modify / reset ENV before/after the spawn
<akerl> The end result being that if one day I changed my mind, I'd have to revert to the fork/exec you described
Xiti has quit [Client Quit]
blackmesa has quit [Ping timeout: 265 seconds]
dandaman has quit [Quit: Leaving.]
jackjackdripper has joined #ruby
ta_ has quit [Ping timeout: 265 seconds]
aryaching has joined #ruby
Es0teric has quit [Quit: Computer has gone to sleep.]
etehtsea has joined #ruby
AvyTech has joined #ruby
Xiti has joined #ruby
karmatr0n has quit [Ping timeout: 260 seconds]
RegulationD has joined #ruby
dviola has quit [Quit: WeeChat 1.5]
BTRE has quit [Ping timeout: 264 seconds]
TheWhip has joined #ruby
Madplatypus has quit [Quit: Connection closed for inactivity]
BTRE has joined #ruby
rkazak has joined #ruby
coolboy has joined #ruby
qguv has quit [Quit: bye]
pokalyis has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
RegulationD has quit [Ping timeout: 244 seconds]
pokalyis has joined #ruby
pwnd_nsfw` has joined #ruby
coolboy has quit [Ping timeout: 240 seconds]
bronson_ has joined #ruby
braincrash has quit [Quit: bye bye]
tectonic has quit []
flashpoint9 has joined #ruby
Robtop__ has quit [Ping timeout: 250 seconds]
bronson has quit [Ping timeout: 250 seconds]
qguv has joined #ruby
jbomo has quit []
dreamyspell has joined #ruby
flashpoint9 has quit [Ping timeout: 250 seconds]
nando293921 has joined #ruby
pokalyis has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
beilabs has joined #ruby
pokalyis has joined #ruby
brent__ has joined #ruby
beilabs has quit [Remote host closed the connection]
beilabs has joined #ruby
tmtwd has quit [Ping timeout: 240 seconds]
CloCkWeRX has joined #ruby
jazzonmym1nd has joined #ruby
tectonic has joined #ruby
Pumukel has joined #ruby
rsampaio_ has joined #ruby
braincras has joined #ruby
rsampaio_ has quit [Client Quit]
hahuang61 has joined #ruby
rsampaio_ has joined #ruby
jazzonmym111nd has quit [Ping timeout: 265 seconds]
jhack has joined #ruby
Nahra has quit [Read error: Connection reset by peer]
Nahra has joined #ruby
beilabs has quit [Remote host closed the connection]
Pumukel has quit [Ping timeout: 264 seconds]
pokalyis has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
AvyTech has left #ruby [#ruby]
pokalyis has joined #ruby
gix has quit [Ping timeout: 250 seconds]
moei has quit [Quit: Leaving...]
nando293921 has quit [Ping timeout: 244 seconds]
hahuang61 has quit [Ping timeout: 250 seconds]
arashb has joined #ruby
Parko has joined #ruby
Coldblackice has joined #ruby
beilabs has joined #ruby
gix has joined #ruby
moeabdol1 has joined #ruby
nando293921 has joined #ruby
arashb has quit [Ping timeout: 265 seconds]
beilabs has quit [Remote host closed the connection]
kinduff has joined #ruby
beilabs has joined #ruby
craysiii has joined #ruby
craysiii has quit [Client Quit]
pokalyis has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Velizar has quit [Quit: Velizar]
moeabdol1 has quit [Ping timeout: 276 seconds]
conta has joined #ruby
pokalyis has joined #ruby
the_rhizo3 has joined #ruby
beilabs has quit [Ping timeout: 276 seconds]
jazzonmym11nd has joined #ruby
speakingcode has quit [Ping timeout: 276 seconds]
conta has quit [Ping timeout: 244 seconds]
jackjackdripper has quit [Quit: Leaving.]
wuyin has quit [Remote host closed the connection]
wuyin has joined #ruby
jazzonmym1nd has quit [Ping timeout: 250 seconds]
giz|work has quit [Ping timeout: 244 seconds]
async_prince has quit [Ping timeout: 260 seconds]
kinduff has quit [Ping timeout: 244 seconds]
djbkd has joined #ruby
programmerq has quit [Ping timeout: 252 seconds]
jhack has quit []
blackmesa has joined #ruby
pokalyis has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ta_ has joined #ruby
pokalyis has joined #ruby
wuyin has quit [Ping timeout: 240 seconds]
maloik has quit [Remote host closed the connection]
maloik has joined #ruby
blackmesa has quit [Ping timeout: 252 seconds]
ta_ has quit [Ping timeout: 265 seconds]
cyphase has quit [Ping timeout: 244 seconds]
cyphase has joined #ruby
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ta_ has joined #ruby
pokalyis has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
alfiemax has quit [Ping timeout: 276 seconds]
pokalyis has joined #ruby
M-mistake has quit [Remote host closed the connection]
M-shine has quit [Remote host closed the connection]
M-manveru has quit [Remote host closed the connection]
Vingador has quit [Remote host closed the connection]
s2013 has joined #ruby
Vingador has joined #ruby
s2013 has quit [Read error: Connection reset by peer]
qguv has quit [Ping timeout: 240 seconds]
ta_ has quit [Ping timeout: 264 seconds]
M-shine has joined #ruby
crystal77 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
flashpoint9 has joined #ruby
wuyin has joined #ruby
pwnd_nsfw has joined #ruby
pokalyis has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
hahuang61 has joined #ruby
beilabs has joined #ruby
pwnd_nsfw` has quit [Ping timeout: 250 seconds]
pokalyis has joined #ruby
woodruffw has quit [Ping timeout: 258 seconds]
pawnbox has joined #ruby
flashpoint9 has quit [Ping timeout: 250 seconds]
wuyin has quit [Ping timeout: 244 seconds]
wuyin has joined #ruby
polysics has joined #ruby
yeticry has quit [Ping timeout: 244 seconds]
jhooker has quit [Ping timeout: 276 seconds]
Cohedrin has joined #ruby
jhooker has joined #ruby
woodruffw has joined #ruby
woodruffw has quit [Excess Flood]
woodruffw has joined #ruby
woodruffw has quit [Excess Flood]
woodruffw has joined #ruby
woodruffw has quit [Excess Flood]
yeticry has joined #ruby
LoneHerm_ has joined #ruby
GodFather has quit [Ping timeout: 258 seconds]
woodruffw has joined #ruby
polysics has quit [Ping timeout: 250 seconds]
flashpoint9 has joined #ruby
Pumukel has joined #ruby
beilabs has quit [Remote host closed the connection]
pokalyis has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
leea has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
shoto has joined #ruby
beilabs has joined #ruby
karmatr0n has joined #ruby
pokalyis has joined #ruby
LoneHerm_ has quit [Ping timeout: 244 seconds]
wuyin has quit [Ping timeout: 240 seconds]
Pumukel has quit [Ping timeout: 264 seconds]
kobain has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
flashpoint9 has quit [Remote host closed the connection]
jobewan has joined #ruby
cibs has quit [Ping timeout: 240 seconds]
beilabs has quit [Ping timeout: 265 seconds]
karmatr0n has quit [Ping timeout: 250 seconds]
cibs has joined #ruby
jackjackdripper has joined #ruby
TheWhip has quit [Remote host closed the connection]
pokalyis has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jobewan has quit [Ping timeout: 240 seconds]
pokalyis has joined #ruby
nankyokusei has joined #ruby
gxdsgrlfrnd has quit [Ping timeout: 240 seconds]
wuyin has joined #ruby
cibs has quit [Ping timeout: 240 seconds]
ponga has joined #ruby
nankyokusei has quit [Ping timeout: 265 seconds]
cibs has joined #ruby
davedev24 has joined #ruby
sdothum has quit [Remote host closed the connection]
wuyin has quit [Ping timeout: 250 seconds]
hk238 has joined #ruby
ta_ has joined #ruby
TheWhip has joined #ruby
pokalyis has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
davedev24 has quit []
pokalyis has joined #ruby
tectonic has quit []
beilabs has joined #ruby
SteenJobs has joined #ruby
TheWhip has quit [Ping timeout: 276 seconds]
beilabs has quit [Remote host closed the connection]
Vingador has quit [Remote host closed the connection]
M-mistake has joined #ruby
M-manveru has joined #ruby
SteenJobs has quit [Client Quit]
blackmesa has joined #ruby
Authenticator has quit [Quit: leaving]
SteenJobs has joined #ruby
blackmesa has quit [Ping timeout: 258 seconds]
pokalyis has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pokalyis has joined #ruby
elifoster has quit [Quit: night yall]
alfiemax has joined #ruby
boadie has joined #ruby
the_rhizo3 has quit [Ping timeout: 252 seconds]
akira616` has joined #ruby
akira616` has left #ruby [#ruby]
rsampaio_ has quit [Ping timeout: 264 seconds]
TheWhip has joined #ruby
pokalyis has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
TheWhip has quit [Remote host closed the connection]
TheWhip has joined #ruby
pokalyis has joined #ruby
s2013 has joined #ruby
Immune has joined #ruby
boadie has quit []
polysics has joined #ruby
k3rn31 has joined #ruby
SteenJobs has quit [Quit: SteenJobs]
leea has joined #ruby
leea has quit [Client Quit]
moeabdol1 has joined #ruby
pokalyis has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pokalyis has joined #ruby
craigp has joined #ruby
polysics has quit [Ping timeout: 258 seconds]
wuyin has joined #ruby
blingrang has quit [Changing host]
blingrang has joined #ruby
ych has joined #ruby
moeabdol1 has quit [Ping timeout: 250 seconds]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
k3rn31 has quit [Quit: Leaving...]
programmerq has joined #ruby
wuyin has quit [Ping timeout: 265 seconds]
flashpoint9 has joined #ruby
raeoks has joined #ruby
pokalyis has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
craigp has quit [Ping timeout: 258 seconds]
s2013 has joined #ruby
flashpoint9 has quit [Ping timeout: 250 seconds]
pokalyis has joined #ruby
leea has joined #ruby
teclator has joined #ruby
djbkd has quit [Quit: My people need me...]
craigp has joined #ruby
craigp has quit [Client Quit]
craigp has joined #ruby
aryaching has quit []
pawnbox has quit [Remote host closed the connection]
pokalyis has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ta_ has quit [Remote host closed the connection]
wuyin has joined #ruby
arescorpio has quit [Remote host closed the connection]
pokalyis has joined #ruby
pawnbox has joined #ruby
arnonhongklay has joined #ruby
bocaneri has joined #ruby
ta_ has joined #ruby
Haui has quit [Ping timeout: 250 seconds]
Non has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
aupadhye has joined #ruby
ta_ has quit [Ping timeout: 265 seconds]
blackmesa has joined #ruby
AnarchyAo has joined #ruby
pokalyis has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
arnonhongklay has quit []
pokalyis has joined #ruby
AnarchyAo has quit [Client Quit]
s2013 has joined #ruby
djbkd has joined #ruby
wuyin has quit [Ping timeout: 250 seconds]
programmerq has quit [Ping timeout: 265 seconds]
blackmesa has quit [Ping timeout: 265 seconds]
dminuoso has joined #ruby
s2013 has quit [Client Quit]
davedev24 has joined #ruby
lightheaded has quit [Remote host closed the connection]
f4cl3y has joined #ruby
programmerq has joined #ruby
lightheaded has joined #ruby
tvon has quit [Read error: Connection reset by peer]
pokalyis has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tvon has joined #ruby
leea has quit [Read error: Connection reset by peer]
hahuang61 has quit [Ping timeout: 250 seconds]
pokalyis has joined #ruby
last_staff has joined #ruby
polysics has joined #ruby
lightheaded has quit [Ping timeout: 258 seconds]
xsdg has quit [Ping timeout: 244 seconds]
TheHodge has joined #ruby
hinbody has quit [Ping timeout: 240 seconds]
blaxter has joined #ruby
xsdg has joined #ruby
jazzonmym111nd has joined #ruby
AnoHito_ has joined #ruby
mooe has joined #ruby
conta has joined #ruby
pokalyis has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ycon_ has joined #ruby
jazzonmym11nd has quit [Ping timeout: 265 seconds]
<ycon_> Hi all, I've got to use a ruby package to do an instagram scrape. What is the basic command to set up this repo? I'm on osx https://github.com/weteachme/instagram-hashtag
pokalyis has joined #ruby
<dminuoso> ycon_: Hello. gem install GemName
<dminuoso> (Assuming its on RubyGems)
AnoHito has quit [Ping timeout: 265 seconds]
<ycon_> Theres files called "Gemfile", "instagram_crawler-0.1.1.gem" too -which do I isntall?
beilabs has joined #ruby
<dminuoso> ycon_: Mmm, seems like no rubygem up.
<dminuoso> ycon_: You can simply use bundler and specify a git repository.
<mooe> I'm trying to port a little php script over to ruby, but not sure where I'm messing up. ruby: https://gist.github.com/anonymous/269e34a551d977bda247e2dbaf3fb40a php: https://gist.github.com/anonymous/fb3976461906ecc05098aacce98116e4
<dminuoso> There is also that gem.
<dminuoso> mooe: Can you be more specific than "Im messing up" ?
<ycon_> dminuoso: what do I 'do' with that .gem file?
wuyin has joined #ruby
Pumukel has joined #ruby
<mooe> dminuoso session[:cart] is empty after trying to add a product, but I can't see any bugs myself.
agit0 has quit [Quit: zzzZZZ….]
lightheaded has joined #ruby
dminuoso has quit [Ping timeout: 265 seconds]
pwnd_nsfw` has joined #ruby
davedev24 has quit []
dminuoso has joined #ruby
solocshaw has quit [Ping timeout: 250 seconds]
pokalyis has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Pumukel has quit [Ping timeout: 260 seconds]
pokalyis has joined #ruby
pwnd_nsfw has quit [Ping timeout: 250 seconds]
wuyin has quit [Ping timeout: 244 seconds]
RegulationD has joined #ruby
firstdayonthejob has joined #ruby
wuyin has joined #ruby
hinbody has joined #ruby
Non has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<mooe> do you have a Gemfile ycon_?
<ycon_> mooe: yep. it's just called .gemfile only
<ycon_> Sorry, not "." before (or after)
lightheaded has quit [Read error: Connection reset by peer]
pwnd_nsfw has joined #ruby
Non has joined #ruby
Non has quit [Client Quit]
RegulationD has quit [Ping timeout: 240 seconds]
<mooe> ycon_: have you tried this? http://bundler.io/git.html
lightheaded has joined #ruby
nankyokusei has joined #ruby
raeoks has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<mooe> ycon_: gem 'instagram-hashtag', :git => 'https://github.com/weteachme/instagram-hashtag'
pwnd_nsfw` has quit [Ping timeout: 250 seconds]
<ycon_> ok thanks
raeoks has joined #ruby
Pumukel has joined #ruby
pokalyis has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
giz|work has joined #ruby
nankyokusei has quit [Ping timeout: 244 seconds]
pokalyis has joined #ruby
hipertracker has joined #ruby
mark_66 has joined #ruby
wuyin has quit [Ping timeout: 276 seconds]
Pumukel has quit [Ping timeout: 264 seconds]
bugo has joined #ruby
griffindy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
firstdayonthejob has quit [Ping timeout: 260 seconds]
harai54 has joined #ruby
saneax-_-|AFK is now known as saneax
wuyin has joined #ruby
harai has quit [Ping timeout: 276 seconds]
dminuoso has quit [Remote host closed the connection]
craigp has quit [Ping timeout: 244 seconds]
craigp has joined #ruby
pokalyis has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
etehtsea has quit [Quit: Computer has gone to sleep.]
pokalyis has joined #ruby
Macaveli has joined #ruby
ukk has joined #ruby
giz|work has quit [Ping timeout: 244 seconds]
Macaveli has quit [Client Quit]
craysiii has joined #ruby
biberu has joined #ruby
craysiii has quit [Client Quit]
blackmesa has joined #ruby
qguv has joined #ruby
Macaveli has joined #ruby
heelpmeplz has quit [Read error: Connection reset by peer]
heelpmeplz has joined #ruby
dminuoso has joined #ruby
andikr has joined #ruby
giz|work has joined #ruby
pokalyis has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
blackmesa has quit [Ping timeout: 260 seconds]
pokalyis has joined #ruby
ta_ has joined #ruby
ninjaaron has joined #ruby
Bish_ has joined #ruby
<ninjaaron> I've been thinking about "best tool for the job" a bit when it comes to scripting languages. We all know that Ruby, Python and Perl can all do the same jobs (though sometimes with more pain in Perl...), but I
<ninjaaron> I'm trying to think of domains where each excell.
Parko has quit [Read error: Connection reset by peer]
ta__ has joined #ruby
async_prince has joined #ruby
etehtsea has joined #ruby
rkazak has quit [Quit: Sleep.....ing....]
Bish has quit [Ping timeout: 276 seconds]
<ninjaaron> Python is great in numeric/scientific computing, Perl is great for text parsing and linguistics.
<ninjaaron> oh, and system administration
<ninjaaron> In which domains does Ruby really shine?
ta_ has quit [Ping timeout: 244 seconds]
watersoul has joined #ruby
submitnine has joined #ruby
agit0 has joined #ruby
<ninjaaron> I sometimes here "web", but I'm not sure if that means "rails" or just in general.
wuyin has quit [Ping timeout: 276 seconds]
err_ok has quit [Ping timeout: 244 seconds]
djbkd has quit []
watersoul_ has quit [Ping timeout: 240 seconds]
<dminuoso> ninjaaron: One thing where Ruby excels is elegant domain specific languages.
err_ok has joined #ruby
KINGSABRI_ has quit [Remote host closed the connection]
<ninjaaron> dminuoso: for example?
<dminuoso> ninjaaron: internal libraries such as rspec
<dminuoso> Or even other tools such as Puppet.
wugy has joined #ruby
TomyWork has joined #ruby
exchgr has quit [Ping timeout: 250 seconds]
pokalyis has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<dminuoso> ninjaaron: In a nutshell stuff like this: expect { expr }.to raise_error(NameError)
pokalyis has joined #ruby
<ninjaaron> I think I understand.
conah has quit [Ping timeout: 250 seconds]
<ninjaaron> At first I thought you might mean Ruby was good for implementing domain specific languages.
<dminuoso> ninjaaron: That too. ;)
<dminuoso> You don't require a parser, since you can use the ruby language itself.
<dminuoso> And it's fairly easy to do so too.
<ninjaaron> Well, that isn't quite what I have in mind when I say "language implementation", but I think I get your point.
<ninjaaron> more like a langauge for implementing frameworks.
hipertracker has quit [Quit: hipertracker]
wuyin has joined #ruby
qguv has quit [Quit: bye]
aganov has joined #ruby
k3rn31 has joined #ruby
edwinvdgraaf has joined #ruby
ukk has quit [Quit: WeeChat 1.5]
pokalyis has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
blackgoat has quit [Ping timeout: 260 seconds]
l4v2 has quit [Quit: l4v2]
pokalyis has joined #ruby
ukk has joined #ruby
l4v2 has joined #ruby
postmodern has quit [Quit: Leaving]
ec0 has quit [Ping timeout: 250 seconds]
SuperLag has quit [Ping timeout: 276 seconds]
l4v2 has quit [Ping timeout: 244 seconds]
SuperLag has joined #ruby
claudiuinberlin has joined #ruby
anisha has joined #ruby
pokalyis has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ta_ has joined #ruby
brent__ has quit [Quit: Connection closed for inactivity]
pokalyis has joined #ruby
antgel has joined #ruby
ta_ has quit [Ping timeout: 240 seconds]
atmosx has joined #ruby
ninjaaron has quit [Ping timeout: 265 seconds]
mooe has quit []
edwinvdgraaf has quit [Ping timeout: 276 seconds]
elementaru has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
pokalyis has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
zenspider has quit [Read error: Connection reset by peer]
zenspider has joined #ruby
craigp has quit [Ping timeout: 244 seconds]
pokalyis has joined #ruby
giz|work has quit [Ping timeout: 265 seconds]
tsia has joined #ruby
<Bish_> latest jruby requires openjdk 7?
Bish_ is now known as Bish
ycon_ has quit [Remote host closed the connection]
dminuoso has quit [Read error: Connection reset by peer]
dminuoso has joined #ruby
TheWhip has quit [Remote host closed the connection]
ReK2 has quit [Remote host closed the connection]
blackmesa has joined #ruby
wuyin has quit [Ping timeout: 276 seconds]
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pawnbox has quit [Remote host closed the connection]
jgt3 has joined #ruby
TheWhip has joined #ruby
LoneHerm_ has joined #ruby
ninjaaron has joined #ruby
craigp has joined #ruby
beilabs has quit [Remote host closed the connection]
flashpoint9 has joined #ruby
beilabs has joined #ruby
ReK2 has joined #ruby
marr has joined #ruby
pokalyis has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pokalyis has joined #ruby
pawnbox_ has joined #ruby
lxsameer has joined #ruby
LoneHerm_ has quit [Ping timeout: 252 seconds]
qguv has joined #ruby
Snowy has joined #ruby
beilabs has quit [Ping timeout: 265 seconds]
flashpoint9 has quit [Ping timeout: 250 seconds]
pawnbox_ has quit [Ping timeout: 240 seconds]
hahuang61 has joined #ruby
mikecmpbll has joined #ruby
qguv has quit [Quit: bye]
cwali has quit [Ping timeout: 276 seconds]
jackjackdripper has quit [Quit: Leaving.]
jackjackdripper has joined #ruby
hahuang61 has quit [Ping timeout: 250 seconds]
edwinvdgraaf has joined #ruby
pokalyis has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ych has quit [Quit: Textual IRC Client: www.textualapp.com]
blackmesa has quit [Ping timeout: 250 seconds]
pokalyis has joined #ruby
polysics has quit []
<dminuoso> ast>> a.()
<ruby[bot]> dminuoso: I have parsed your code, the result is at https://eval.in/627348
jackjackdripper has quit [Ping timeout: 258 seconds]
blaxter has quit [Quit: foo]
<dminuoso> >> class A; define_method(:".") {} end; a = A.new; a.()
<ruby[bot]> dminuoso: # => undefined method `call' for #<A:0x41ab593c> (NoMethodError) ...check link for more (https://eval.in/627349)
pwnd_nsfw has quit [Read error: Connection reset by peer]
<dminuoso> What the heck is happening?
pwnd_nsfw has joined #ruby
<dminuoso> asm>> a.()
<ruby[bot]> dminuoso: I have disassembled your code, the result is at https://eval.in/627350
<dminuoso> ast>> a.b()
<ruby[bot]> dminuoso: I have parsed your code, the result is at https://eval.in/627352
<dminuoso> Ohh nevermind. I get it.
<mikecmpbll> dminuoso : why does it call `call`? :)
<dminuoso> mikecmpbll: Because that's what .() does.
<mikecmpbll> why tho
<dminuoso> Functors
Coldblackice has quit [Ping timeout: 265 seconds]
<mikecmpbll> >> class A; def call; "foo"; end; end; A.new.();
<ruby[bot]> mikecmpbll: # => "foo" (https://eval.in/627353)
<dminuoso> Exactly.
<dminuoso> Poor mans blocks.
<dminuoso> (or procs if you want)
<dminuoso> I can see this being useful in metaprogramming since you have an actual class to mess around with.
<mikecmpbll> oh right, if an object responds to call, you don't have to specify that method name
<mikecmpbll> when calling
<dminuoso> Yeah.
<mikecmpbll> TIL!
phredus has quit [Remote host closed the connection]
<dminuoso> mikecmpbll: Another usage is this:
<dminuoso> >> a = proc{}; a.()
<ruby[bot]> dminuoso: # => nil (https://eval.in/627354)
axsuul has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pokalyis has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
phredus has joined #ruby
DoubleMalt has joined #ruby
<mikecmpbll> >> func = ->(e){ "you're a crazy guy, #{e}" }; func.("dminuoso");
<ruby[bot]> mikecmpbll: # => "you're a crazy guy, dminuoso" (https://eval.in/627356)
<mikecmpbll> well i'll be damned.
blaxter has joined #ruby
blaxter has quit [Client Quit]
<mikecmpbll> gunna grep replace `call()` out of my ruby projects folder. all that unnecessary typing!
<apeiros> I'm still not sure whether I like that syntax :-/
<mikecmpbll> apeiros : i'm forming a religion around it.
<apeiros> it's less typing, but also increases the hurdle for newcomers
<apeiros> mikecmpbll: callology?
Macaveli has joined #ruby
<mikecmpbll> yesss :D
<apeiros> what's the names for the officials?
<apeiros> Great Functor of the first order? :)
Burgestrand has joined #ruby
astrobun_ has quit [Remote host closed the connection]
<mikecmpbll> those who write the holy texts are the calligraphers
<mikecmpbll> oh damn that's a thing.
Madplatypus has joined #ruby
astrobun_ has joined #ruby
<apeiros> heh
pawnbox has joined #ruby
jaequery has joined #ruby
hipertracker has joined #ruby
Ishido has joined #ruby
etehtsea has quit [Quit: Computer has gone to sleep.]
wuyin has joined #ruby
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
arashb has joined #ruby
nankyokusei has joined #ruby
antiREMOTEneural has joined #ruby
<antiREMOTEneural> Hello users!!!!
k3rn31 has quit [Quit: Computer has gone to sleep.]
ferr has joined #ruby
arashb has quit [Ping timeout: 264 seconds]
Pumukel has joined #ruby
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
phredus has quit [Remote host closed the connection]
nankyokusei has quit [Ping timeout: 250 seconds]
nhhc has joined #ruby
wuyin has quit [Ping timeout: 244 seconds]
Macaveli has joined #ruby
phredus has joined #ruby
TheWhip has quit [Remote host closed the connection]
pawnbox has quit [Remote host closed the connection]
Pumukel has quit [Ping timeout: 264 seconds]
pawnbox has joined #ruby
pawnbox has quit [Remote host closed the connection]
Burgestrand has quit [Ping timeout: 244 seconds]
pawnbox has joined #ruby
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
phredus has quit [Remote host closed the connection]
Silthias has joined #ruby
phredus has joined #ruby
jkhl has joined #ruby
antiREMOTEneural has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
beilabs has joined #ruby
astrobun_ has quit [Remote host closed the connection]
pawnbox has quit [Remote host closed the connection]
astrobun_ has joined #ruby
pawnbox has joined #ruby
antiREMOTEneural has joined #ruby
wuyin has joined #ruby
antiREMOTEneural has quit [Client Quit]
elementaru has quit [Read error: Connection reset by peer]
jsrn_ has joined #ruby
Burgestrand has joined #ruby
pawnbox has quit [Ping timeout: 240 seconds]
hipertracker has quit [Quit: hipertracker]
astrobun_ has quit [Ping timeout: 260 seconds]
moeabdol1 has joined #ruby
beilabs has quit [Remote host closed the connection]
wuyin has quit [Ping timeout: 240 seconds]
flashpoint9 has joined #ruby
pawnbox has joined #ruby
moeabdol1 has quit [Ping timeout: 244 seconds]
moei has joined #ruby
tsia has quit [Quit: tsia]
TheWhip has joined #ruby
AnarchyAo has joined #ruby
tsia has joined #ruby
zenguy_pc has quit [Ping timeout: 258 seconds]
flashpoint9 has quit [Ping timeout: 250 seconds]
Hyuk has joined #ruby
zenguy_pc has joined #ruby
pawnbox has quit [Ping timeout: 276 seconds]
bweston92 has quit [Read error: Connection reset by peer]
ICantCook has quit [Ping timeout: 258 seconds]
tsia has quit [Client Quit]
pawnbox has joined #ruby
blackmesa has joined #ruby
griff has joined #ruby
wuyin has joined #ruby
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Immune has quit [Ping timeout: 244 seconds]
koooge has quit [Quit: Leaving...]
stop-psychiatry has joined #ruby
Pumukel has joined #ruby
stop-psychiatry has quit [Client Quit]
Macaveli has joined #ruby
TheWhip has quit [Remote host closed the connection]
TheWhip has joined #ruby
Pumukel has quit [Ping timeout: 260 seconds]
AnarchyAo has quit []
moei has quit [Quit: Leaving...]
allyjweir has joined #ruby
allyjweir has left #ruby [#ruby]
edwinvdg_ has joined #ruby
agit0 has quit [Quit: zzzZZZ….]
edwinvdgraaf has quit [Ping timeout: 276 seconds]
blaxter has joined #ruby
ta_ has joined #ruby
AnarchyAo has joined #ruby
AnarchyAo has quit [Excess Flood]
AnarchyAo has joined #ruby
AnarchyAo has quit [Excess Flood]
AnarchyAo has joined #ruby
AnarchyAo has quit [Excess Flood]
edwinvdgraaf has joined #ruby
AnarchyAo has joined #ruby
AnarchyAo has quit [Excess Flood]
AnarchyAo has joined #ruby
AnarchyAo has quit [Excess Flood]
leitz has joined #ruby
LoneHerm_ has joined #ruby
phrozen77_ has joined #ruby
edwinvdg_ has quit [Ping timeout: 240 seconds]
iooner has quit [Excess Flood]
phrozen77 has quit [Read error: Connection reset by peer]
<mikecmpbll> >> p = proc{ |a, b, c| a + b + c }.curry(2).(10,11); p.(12)
<ruby[bot]> mikecmpbll: # => nil can't be coerced into Fixnum (TypeError) ...check link for more (https://eval.in/627381)
iooner has joined #ruby
f4cl3y has quit [Ping timeout: 265 seconds]
ixti has quit [Ping timeout: 276 seconds]
zenguy_pc has quit [Ping timeout: 260 seconds]
ta_ has quit [Ping timeout: 258 seconds]
<mikecmpbll> >> p = proc{ |a, b, c| a + b + c }.curry.(10,11); p.(12)
<ruby[bot]> mikecmpbll: # => 33 (https://eval.in/627382)
Guest84730 has quit [Ping timeout: 250 seconds]
zapata has quit [Ping timeout: 250 seconds]
jgt3 has quit [Ping timeout: 260 seconds]
dkam has joined #ruby
zenguy_pc has joined #ruby
jaruga___ has joined #ruby
aalmenar_ has quit [Read error: Connection reset by peer]
aalmenar has joined #ruby
aalmenar has quit [Changing host]
aalmenar has joined #ruby
Burgestrand has quit [Read error: Connection reset by peer]
skweek has quit [Ping timeout: 260 seconds]
pandaant has joined #ruby
Pupp3tm4st3r has joined #ruby
moei has joined #ruby
shoto has quit [Ping timeout: 250 seconds]
shoto has joined #ruby
<leitz> If a method requires certain options, and those aren't provided, what's the normal way to deal with it? I've been having the methods just return but that doesn't communicate anything.
<mikecmpbll> leitz : raise an exception (ArgumentError)
Guest84730 has joined #ruby
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
danielius has joined #ruby
pwnd_nsfw` has joined #ruby
mtkd has quit [Ping timeout: 276 seconds]
mtkd has joined #ruby
pwnd_nsfw has quit [Ping timeout: 250 seconds]
hipertracker has joined #ruby
Burgestrand has joined #ruby
ElFerna has joined #ruby
ElFerna has quit [Client Quit]
jenrzzz has joined #ruby
wugy has quit []
<ukk> leitz: I would question whether nil is an acceptable zero value for the method.
wugy has joined #ruby
<leitz> ukk, understood. In this case a method changes a 6 character string. If there's no string, that's a problem.
tdy has quit [Ping timeout: 244 seconds]
zapata has joined #ruby
cibs has quit [Ping timeout: 240 seconds]
cibs has joined #ruby
<ukk> leitz: duck typing
Pumukel has joined #ruby
blackgoat has joined #ruby
<leitz> ukk, I'm not fond of that yet. My thought is that if is should be a 6 digit hexidecimal string in uppercase, then there's a problem if it doesn't match that.
<leitz> I'd rather deal with the issue up front and push back instead of trying to code around it.
hahuang61 has joined #ruby
Pumukel has quit [Ping timeout: 260 seconds]
Pumukel has joined #ruby
harai54 has quit [Ping timeout: 258 seconds]
hipertracker has quit [Quit: hipertracker]
MrBusiness3 has quit [Ping timeout: 250 seconds]
edwinvdgraaf has quit [Ping timeout: 240 seconds]
hahuang61 has quit [Ping timeout: 250 seconds]
Pumukel has quit [Ping timeout: 260 seconds]
Burgestrand has quit [Ping timeout: 258 seconds]
arashb has joined #ruby
TheWhip has quit [Remote host closed the connection]
edwinvdg_ has joined #ruby
Burgestrand has joined #ruby
Pumukel has joined #ruby
TheWhip has joined #ruby
arashb has quit [Ping timeout: 276 seconds]
<leitz> Okay, next question. Program P calls Module M, which now raises an exception for P to handle. However, M is intended for use outside P. Right now M prints an error and raises the exception. Tests pass, except that the error still gets printed.
Pumukel has quit [Ping timeout: 260 seconds]
<leitz> what's the choice? Print the error or assume any program written to use M will catch all it's exceptions?
blackmesa has quit [Ping timeout: 244 seconds]
Pumukel has joined #ruby
RegulationD has joined #ruby
Pumukel has quit [Ping timeout: 260 seconds]
nando293921 has quit [Ping timeout: 260 seconds]
jenrzzz has quit [Ping timeout: 250 seconds]
Pumukel has joined #ruby
allcentury has joined #ruby
hipertracker has joined #ruby
RegulationD has quit [Ping timeout: 258 seconds]
mindaslab has joined #ruby
nando293921 has joined #ruby
nankyokusei has joined #ruby
Azure has joined #ruby
elementaru has joined #ruby
mindaslab has quit [Remote host closed the connection]
elementaru has quit [Remote host closed the connection]
<leitz> Running it gives the expected TypeError and prints the error line. However, the test case says "<TypeError> exception expected but none was thrown.<TypeError> exception expected but none was thrown."
sdothum has joined #ruby
Pumukel has quit [Ping timeout: 264 seconds]
c355e3b has joined #ruby
spudowiar has joined #ruby
Pumukel has joined #ruby
<leitz> What am I missing? Besides "life", "brain", and "clue"? The ArgumentError test works.
nankyokusei has quit [Ping timeout: 264 seconds]
pokalyis has joined #ruby
moeabdol1 has joined #ruby
umdstu has joined #ruby
Tusskan has joined #ruby
<mikecmpbll> leitz : what line throws the typerror
Pumukel has quit [Ping timeout: 264 seconds]
ninjaaron has quit [Quit: WeeChat 1.5]
rodfersou has joined #ruby
Pumukel has joined #ruby
<leitz> mikecmpbll, 180
Burgestrand has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<leitz> test_modify_stat_failure_non_hex_upp(TestCharacterTools) [test/tc_CharacterTools.rb:180]:
moeabdol1 has quit [Ping timeout: 252 seconds]
<mikecmpbll> that's just the line of your assertion
<mikecmpbll> what line in modify_stat is meant to throw a type error
<mikecmpbll> i'm trying to understand what you're testing./
<leitz> Oh, sorry. line 101.
<mikecmpbll> that's rescue the TypeError
<mikecmpbll> which line between 91 and 100 is expected to cause a TypeError
etehtsea has joined #ruby
<leitz> Ah, sorry. COffee still kicking in. Let me verify my first thought here.
jonoyeong has joined #ruby
ConsoleFx has joined #ruby
<ConsoleFx> hey guys
<ConsoleFx> need a small help on unpack
<ConsoleFx> I want to know what this does exactly
<ConsoleFx> body = body.to_s.unpack("C*").pack("C*")
Mia has joined #ruby
<ConsoleFx> what type of values body object would store here?
<leitz> The input should be a String of 6 uppercase hex digits.
Pumukel has quit [Ping timeout: 260 seconds]
jgt3 has joined #ruby
hk238 has quit [Ping timeout: 244 seconds]
<apeiros> ConsoleFx: .unpack("C*").pack("C*") is mostly a non-op
Pumukel has joined #ruby
tdy has joined #ruby
<apeiros> .unpack with C* as pattern converts a string to an array of bytes, using integers to represent the bytes.
toretore has joined #ruby
<ConsoleFx> apeiros, any small example please? would be really helpful
<apeiros> but `body = body.to_s.unpack("C*").pack("C*")` could be shorter written as just `body = body.to_s.b`. that'd also be quite a bit faster.
<mikecmpbll> leitz : if i fill in the values from your test case into the line in question, it does not cause an exception: "1ZZZZZ"[3,1].to_i(16) + 2
<mikecmpbll> >> "1ZZZZZ"[3,1].to_i(16) + 2
<apeiros> ConsoleFx: you know pry/irb?
<ruby[bot]> mikecmpbll: # => 2 (https://eval.in/627457)
<ConsoleFx> apeiros, very less ...
<ConsoleFx> I am a py guy basically
<apeiros> ConsoleFx: time to learn about it then. irb comes along with ruby. pry is a gem which does the same but a bit better. up to you which one you chose.
<apeiros> fire it up, and test pack/unpack there.
<ConsoleFx> apeiros, awesome then.. this much of help would be enough then
<ConsoleFx> thanks a lot for the quick look up
<ConsoleFx> :)
<mikecmpbll> leitz : from the docs for .to_i(): "Returns the result of interpreting leading characters in str as an integer base base (between 2 and 36). Extraneous characters past the end of a valid number are ignored. If there is not a valid number at the start of str, 0 is returned. This method never raises an exception when base is valid."
tdy has quit [Ping timeout: 244 seconds]
Pumukel has quit [Ping timeout: 264 seconds]
<apeiros> ConsoleFx: the other help is ri. it's also a console tool. for your case, you'd type `ri String#unpack` and `ri Array#pack`
<apeiros> &ri String#unpack ConsoleFx
<mikecmpbll> leitz : you probably want:
<mikecmpbll> >> Integer("1ZZZZZ"[3,1], 16)
<ruby[bot]> mikecmpbll: # => invalid value for Integer(): "Z" (ArgumentError) ...check link for more (https://eval.in/627462)
<ConsoleFx> great! got it solved :)
<ConsoleFx> thanks a lot :)
<ConsoleFx> Much appreciate your help! apeiros
<leitz> mikecmpbll, I see the reason the test and the toy gave different results. In the toy (test_Character.rb) character.upp is never set. in the test case (tc_CharacterTools.rb), it's shnged to a bad string.
icey has joined #ruby
flashpoint9 has joined #ruby
<leitz> Hmmm...back to the drawing board. The real goal is to make sure the options are the right type and format. In this case character.upp should be a 6 digit uppercase Hex number as a String.
<apeiros> string =~ /\A\h{6}\z/
cwali has joined #ruby
ICantCook has joined #ruby
<apeiros> >> ["abcd12" =~ /\A\h{6}\z/, "abcd123" =~ /\A\h{6}\z/, "abzd12" =~ /\A\h{6}\z/]
<ruby[bot]> apeiros: # => [0, nil, nil] (https://eval.in/627465)
<apeiros> (remember: zero is true-ish in ruby)
<leitz> apeiros, would it make sense to raise an exception in that case?
flashpoint9 has quit [Ping timeout: 250 seconds]
ta__ has quit [Remote host closed the connection]
ta_ has joined #ruby
<apeiros> sure
<apeiros> raise ArgumentError
<apeiros> the hex part would automatically raise if you use mikecmpbll's suggestion (Kernel#Integer())
<apeiros> you can either additionally test for length, or for min/max value of the result, or test the whole thing beforehand.
cwali has quit [Ping timeout: 244 seconds]
rodfersou has quit [Ping timeout: 240 seconds]
ta__ has joined #ruby
hipertracker has quit [Quit: hipertracker]
GodFather has joined #ruby
ta_ has quit [Ping timeout: 240 seconds]
etehtsea has quit [Read error: Connection reset by peer]
ta_ has joined #ruby
the_rhizo3 has joined #ruby
rodfersou has joined #ruby
danielius has quit [Quit: Leaving]
ta_ has quit [Ping timeout: 244 seconds]
exchgr has joined #ruby
hanmac has quit [Ping timeout: 250 seconds]
bweston92 has joined #ruby
Macaveli has joined #ruby
<leitz> Hmm.. I get "ArgumentError: wrong number of arguments (2 for 1)" when I run this in irb: Integer("1ZZZZZ"[3,1], 16)
etehtsea has joined #ruby
<leitz> Could be the older version of Ruby, too.
<apeiros> what's RUBY_VERSION say?
<apeiros> must be <1.9
nando293921 has quit [Ping timeout: 276 seconds]
<leitz> Remember the guy on 1.8.7? :)
<apeiros> are you one of them?
Madplatypus has quit [Quit: Connection closed for inactivity]
danielius has joined #ruby
<apeiros> don't be the guy on 1.8
<leitz> Probably the last one.
hipertracker has joined #ruby
<leitz> DId you read the blog post I sent you the other day?
Pumukel has joined #ruby
blackmesa has joined #ruby
<apeiros> you sent me a blog post?
exchgr has quit [Ping timeout: 258 seconds]
<Bish> guess he meant the guy with the prehistoric ruby version
<dminuoso> Is there a way to calculate the arithmetic mean of an array in a single iteration?
<Bish> wut?
<apeiros> dminuoso: yes
<apeiros> at least I'm pretty sure
<dminuoso> Well let's say you have [a, b, c] - is there a way to calculate the arithmetic mean with a single reduce?
<dminuoso> apeiros: I've been fiddling around on this for a while now, can't figure out how.
<apeiros> now gotta look up I have the right translation remembered
<leitz> Also, the match works with string =~ /[0-9A-F]{6}/ since it should return 0 which is Ruby true.
<apeiros> ah, that one's actually easy
<apeiros> the difficult one was stddev :D
<apeiros> dminuoso: ary.inject(:+).quo(ary.size)
aamador has joined #ruby
<dminuoso> apeiros: I meant with just a single inject/reduce. ;-)
<apeiros> dminuoso: not reasonably
Pumukel has quit [Ping timeout: 264 seconds]
<apeiros> ary.inject { |mean,value| mean += value.quo(ary.length) }
<apeiros> single inject. but not sane.
<apeiros> errr, + not +=
<apeiros> stupid rookie mistake :D
blackmesa has quit [Ping timeout: 258 seconds]
<dminuoso> apeiros: In reality the issue is that I have some elements which should be ignored for the purpose of mean calculation. :P
<apeiros> dminuoso: .select.inject.quo
Hyuk has quit [Quit: Textual IRC Client: www.textualapp.com]
<apeiros> or reject instead of select
hk238 has joined #ruby
<dminuoso> apeiros: you need an additional tap after select
<apeiros> though, can't chain since you have to get the length
<apeiros> yupp
<apeiros> that's another option
hightower has joined #ruby
<dminuoso> Though honestly I learned when you start using tap to solve "one-liner quizes" - you are basically cheating.
ConsoleFx has quit [Quit: Leaving]
the_rhizo3 has quit [Read error: No route to host]
the_rhizo3 has joined #ruby
<apeiros> you're also not creating readable code ;-)
mindaslab has joined #ruby
<apeiros> clever coders manage to squeeze everything into a single statement
hanmac has joined #ruby
mindaslab has left #ruby [#ruby]
<apeiros> wise coders split it up into multiple
eljimbo has quit [Quit: This computer has gone to sleep]
mindaslab has joined #ruby
sepp2k has joined #ruby
KaliLinuxGR has quit [Ping timeout: 260 seconds]
stamina has joined #ruby
giz|work has joined #ruby
<dminuoso> apeiros: Oh my actual code is already done and well split.
<dminuoso> I just regularly have these moments of "the most creative way to do this in a single line"
agit0 has joined #ruby
dstack has joined #ruby
<apeiros> you can always cheat and use ";" ;-p
<dminuoso> Huh.
frozengeek has joined #ruby
<dminuoso> How did you type that character?
<dminuoso> I cant find it on my keyboard. :S
<dstack> Are there any statements that you can use to delay a function?
<apeiros> copy & paste it then dminuoso ;-D
<dminuoso> dstack: lambda/proc
tomchapi_ has joined #ruby
<apeiros> here, have some: ;;;;;;;;;;;;;;;
<dminuoso> apeiros: Those should do a while thanks.
<apeiros> dstack: s/function/method/, ruby doesn't really have functions ;-)
edwinvd__ has joined #ruby
tomchapin has quit [Ping timeout: 252 seconds]
<apeiros> dstack: and define "delay a method". you can sleep. you can start a thread and sleep in the thread. you can store a block and invoke it later (proc/lambda solution of dminuoso).
<apeiros> depends on what exactly you want to achieve.
hipertracker has quit [Quit: hipertracker]
leitz has quit [Quit: Nappy time]
<dminuoso> >> class Function; def initialize(&block); @block = block; def call(*args); @block.call(*args); end; end; end; Function.new { |a| puts a }.call("a")
<ruby[bot]> dminuoso: # => a ...check link for more (https://eval.in/627483)
<dminuoso> apeiros: ^?
<dminuoso> Now we have functions.
<apeiros> no. you just have something pretending to be :-p
pokalyis has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<dminuoso> >> class Function; def initialize(&block); @block = block; def call(*args); @block.call(*args); end; end; end; f = Function.new { |a| puts a }; puts "apeiros: f is a function" if f.is_a? Function
<ruby[bot]> dminuoso: # => apeiros: f is a function ...check link for more (https://eval.in/627484)
<dminuoso> It is_a? Function, not pretends_to_be_a? Function!
ldnunes has joined #ruby
<apeiros> pffft
<dminuoso> :P
pokalyis has joined #ruby
<dminuoso> I like the pattern. I should fill my codebase with it
<dminuoso> Just to give my successor really bad headaches.
edwinvdg_ has quit [Ping timeout: 276 seconds]
<apeiros> sure. what other pleasures are there in life :D
ruby-lang918 has joined #ruby
<ruby-lang918> Helo
<dminuoso> apeiros: I dont know. Last week I had high fever, and when lying in bed I bad a strange dream - in that dream I was a compinler..
JeanCarloMachado has joined #ruby
JeanCarl1Machado has joined #ruby
<apeiros> dminuoso: how did UBs feel like?
<apeiros> hi ruby-lang918
<dminuoso> apeiros: I dont know. I was stuck in an optimization loop.
<apeiros> that sounds unoptimal
<dstack> Does ruby have support for Gotos?
<apeiros> dstack: only with a special compiler setting
<dminuoso> dstack: Yes.
<dminuoso> dstack: The next best thing is catch/throw.
<apeiros> JOKE=true or something like that
galeido has joined #ruby
sameerynho has joined #ruby
Burgestrand has joined #ruby
<ruby-lang918> I used middleman to create a static page, but this now needs to be portable. Is there a way to create a windows executable that basically runs middleman build in the specified directory without there being the need of having ruby etc. installed on the machine? I'm not sure OCRA can do that.
<apeiros> ocra?
<apeiros> I think there was some "ruby2exe" or somesuch. not a windows user, so no idea how good that thing is/was nor whether it's still maintained.
<apeiros> but it's a static website - what do you need an executable for?
KaliLinuxGR has joined #ruby
<dstack> ironruby
<apeiros> ironruby is dead.
<dminuoso> Sad panda.
<dminuoso> No more .NETry
Pumukel has joined #ruby
<ruby-lang918> it generates this page from simple markdown files you put in a directory
<apeiros> yes. do you want to generate the page on windows too?
lxsameer has quit [Ping timeout: 276 seconds]
<apeiros> or only view the result on windows?
<ruby-lang918> It would need to be generated there as well
<apeiros> ok. then you need the executable. well, what I said above.
interki has joined #ruby
<dminuoso> apeiros: So how it is Switcherland.. just got a Job offer in Zurich. :|
<dminuoso> Is this a place where one might want to live?
LoneHerm_ has quit [Remote host closed the connection]
<apeiros> I've never been in switcherland :-p
<apeiros> but I love my country
Pumukel has quit [Ping timeout: 264 seconds]
marr has quit [Ping timeout: 240 seconds]
<apeiros> Can recommend, would live there again ;-)
<dminuoso> Heh.
<dstack> exerb
<dstack> windows supports running bash scripts
tdy has joined #ruby
Nimonas has joined #ruby
d0nn1e has quit [Ping timeout: 264 seconds]
Bounga has joined #ruby
d0nn1e has joined #ruby
JeanCarl1Machado has quit [Quit: Lost terminal]
JeanCarloMachado has quit [Quit: Lost terminal]
Bounga has quit [Client Quit]
cyphase has quit [Ping timeout: 258 seconds]
<dstack> When ever im on the wine website it says wine is not an emulator
dstack has left #ruby [#ruby]
tdy has quit [Ping timeout: 240 seconds]
k3rn31 has joined #ruby
jgt3 has quit [Ping timeout: 240 seconds]
Burgestrand has quit [Ping timeout: 252 seconds]
pokalyis has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
BrianJ has quit [Ping timeout: 240 seconds]
flashpoint9 has joined #ruby
cyphase has joined #ruby
LoneHermit has joined #ruby
Bounga has joined #ruby
Burgestrand has joined #ruby
s2013 has joined #ruby
moeabdol1 has joined #ruby
johnmilton has quit [Remote host closed the connection]
s2013 has quit [Client Quit]
flashpoint9 has quit [Ping timeout: 250 seconds]
hutch34 has joined #ruby
hahuang61 has joined #ruby
tulak has joined #ruby
IanMalcolm has joined #ruby
MrBusiness3 has joined #ruby
IanMalcolm has quit [Max SendQ exceeded]
LoneHermit has quit [Ping timeout: 240 seconds]
gnufied has joined #ruby
IanMalcolm has joined #ruby
moeabdol1 has quit [Client Quit]
IanMalcolm has quit [Client Quit]
eljimbo has joined #ruby
Ishido has quit [Remote host closed the connection]
hahuang61 has quit [Ping timeout: 250 seconds]
kies has quit [Ping timeout: 240 seconds]
SuperLag_ has joined #ruby
tyang has joined #ruby
akerl has left #ruby ["valete"]
SuperLag has quit [Ping timeout: 265 seconds]
exchgr has joined #ruby
jonoyeong has quit [Remote host closed the connection]
SuperLag has joined #ruby
SuperLag_ has quit [Ping timeout: 250 seconds]
beilabs has joined #ruby
Ishido has joined #ruby
exchgr has quit [Ping timeout: 258 seconds]
zenguy_pc has quit [Ping timeout: 264 seconds]
Silthias has quit [Ping timeout: 265 seconds]
blackmesa has joined #ruby
zenguy_pc has joined #ruby
synthroid has joined #ruby
yardenbar has joined #ruby
flashpoint9 has joined #ruby
MrBusiness3 has quit [Ping timeout: 250 seconds]
kies has joined #ruby
johnmilton has joined #ruby
ukk has quit [Quit: WeeChat 1.5]
pokalyis has joined #ruby
johnmilton has quit [Read error: Connection reset by peer]
sharkman has quit [Ping timeout: 250 seconds]
blackmesa has quit [Ping timeout: 265 seconds]
Burgestrand has quit [Ping timeout: 244 seconds]
ruby-lang918 has quit [Quit: Page closed]
johnmilton has joined #ruby
pulgolino has joined #ruby
mtkd has quit [Ping timeout: 250 seconds]
Bounga has quit [Read error: Connection reset by peer]
LoneHerm_ has joined #ruby
RegulationD has joined #ruby
lrojas has joined #ruby
<lrojas> hi all
mtkd has joined #ruby
<lrojas> does anybody knows if there pragprog is coming up with an updated version of the programming ruby book ? 4th editon covers 1.9 and 2.0 but seems a bit outdated ( since ruby is at 2.3 and getting ready to release 2.4 )
hipertracker has joined #ruby
<lrojas> or ask another way.. is there a book on ruby that is current and favored by the comunity?
LoneHerm_ has quit [Remote host closed the connection]
<dminuoso> lrojas: There are a few. Which level are you looking for?
<dminuoso> Beginner? Intermediate? Expert? Masochist?
<lrojas> somewhere between beginner and intermediate
RegulationD has quit [Ping timeout: 240 seconds]
<dminuoso> lrojas: If you have some decent prerequisites Eloquent Ruby is an excellent read.
<lrojas> i have the current pragpub book ( Programming Ruby 4th edition ), i got it a few years ago when i was starting a project that used ruby, but the project got cancelled and i shelved it...
<dminuoso> (It's one of the more widely recommended books in this channel)
nankyokusei has joined #ruby
<dminuoso> We also have a books list on our webpage, but I think apeiros hinted that its somewhat outdated.
<lrojas> i am coming back to ruby and since i really liked the format of that book i thougth there was an update version.. but it seems dead
<dminuoso> ?books
<ruby[bot]> You can find a list of recommended books at http://ruby-community.com/pages/links
<lrojas> thanks
<apeiros> always happy to take pull requests :)
Tusskan has quit [Quit: Leaving]
arashb has joined #ruby
<lrojas> out of curiosity... what's your take on the book i am mentioning, just so i get a base line :p
<dminuoso> Never read it.
beilabs has quit [Ping timeout: 276 seconds]
Burgestrand has joined #ruby
tulak has quit [Remote host closed the connection]
<dminuoso> lrojas: Eloquent Ruby is more about patterns, while Well Grounded Rubyist rather discusses the language itself. Other books have other focuses.
<dminuoso> It's really difficult to compare books in that way.
Non has joined #ruby
Bounga has joined #ruby
<lrojas> dminuoso: fair enough
harai54 has joined #ruby
nankyokusei has quit [Ping timeout: 244 seconds]
griff has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<lrojas> well grounded rubyst seems to be a tad outdated... :p ahh the pace of technology and why tech books should be a subscription.
mindaslab has quit [Ping timeout: 244 seconds]
arashb has quit [Ping timeout: 250 seconds]
colegatron has left #ruby ["Leaving"]
interki has quit [Quit: Going offline, see ya! (www.adiirc.com)]
ruby-lang140 has joined #ruby
tulak has joined #ruby
<dminuoso> lrojas: The language has not really changed much.
<dminuoso> Anything that's in that book still applies.
interki has joined #ruby
<lrojas> ohh i thought 2.3 was going to be vastly different than 1.9 or even 2.0
<apeiros> no. biggest change was 1.8 to 1.9
Pumukel has joined #ruby
arnonhongklay has joined #ruby
<lrojas> sorry if i am a bit clueless, like i said.. a few years back, ruby was 1.9 and 2.0 was about to come out, that's when the book i had got written
<ruby-lang140> how do i run a command like `bourbon install` (bourbon gem) from inside a ruby script without running the de facto shell command? more precisely how do i access this functionality from inside ruby?
the_rhizo3 has quit [Ping timeout: 250 seconds]
<dminuoso> ruby-lang140: Look at what the binstub does.
Xiti has quit [Ping timeout: 244 seconds]
<dminuoso> ruby-lang140: type "which bourbon", open the file and look at it.
interki has quit [Client Quit]
the_rhizo3 has joined #ruby
hipertracker has quit [Quit: hipertracker]
<dminuoso> lrojas: The bulk of changes over the years are small changes that have no general impact on how Ruby facilities work or how to write code with them.
Non has quit [Quit: Textual IRC Client: www.textualapp.com]
<lrojas> dminuoso: thanks, that explains a lot why i keep seeing books that have not been updated :p i thought that ruby popularity was starting to fade, it seems the language just matured to a point where updates for the books are not needed as frequently.
Pumukel has quit [Ping timeout: 260 seconds]
anisha has quit [Quit: This computer has gone to sleep]
alfiemax has quit [Ping timeout: 265 seconds]
tlaxkit has joined #ruby
last_staff has quit [Quit: last_staff]
myntcake has joined #ruby
edwinvd__ has quit [Ping timeout: 264 seconds]
blackgoat has quit [Quit: WeeChat 1.5]
beilabs has joined #ruby
ta_ has joined #ruby
jgt3 has joined #ruby
etehtsea has quit [Ping timeout: 240 seconds]
flashpoint9 has quit [Remote host closed the connection]
flashpoint9 has joined #ruby
ta_ has quit [Ping timeout: 244 seconds]
exchgr has joined #ruby
<lrojas> sorry for all the stupid questions.. but rbenv or rvm ? i remember there where some conflicting opinions on the approach of each, has that been resolved? is it just a matter of taste now or are there significant differences still?
<dminuoso> lrojas: Neither.
<lrojas> huh?
<dminuoso> lrojas: The FOTY is chruby with possibly ruby-install
<lrojas> FOTY?
<dminuoso> They are super lightweight, non-intrusive and just work.
<dminuoso> Flavor of the year.
<lrojas> ahh
<lrojas> jesus
<lrojas> hehe
<dminuoso> You can use rbenv/rvm though if you want.
<linduxed> i still use rbenv and really like it
beilabs has quit [Remote host closed the connection]
<linduxed> i get why people apperciate chruby, but rbenv makes things simple enough
beilabs has joined #ruby
edwinvdg_ has joined #ruby
<dminuoso> linduxed: If you care about simplicity, then rbenv cant be your first choice.
<linduxed> hmm, fair, i should have used "easy" instead of "simple"
<linduxed> those are two different things
<dminuoso> linduxed: 104 lines of code. That's all chruby is.
<dminuoso> It cant get more simplistic or minimal than chruby.
<linduxed> dminuoso: read my correctio
Bounga has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
<linduxed> *correction
<dminuoso> linduxed: That just makes it sound like chruby is more complicated to use.
Pumukel has joined #ruby
Bounga has joined #ruby
<linduxed> for some, in practice, it becomes that
<linduxed> if they value having a one-stop-shop-everything-included solution
<toretore> it is more complicated to use, but that doesn't mean more difficult
Burgestrand has quit [Ping timeout: 264 seconds]
<linduxed> it completely depends on whether you wish to limit the scope of the discussion to "what chruby does" or to "managing the need of bouncing between ruby version with all that that entails"
<linduxed> if the discussion is about the latter, then chruby is just one piece of the puzzle
beilabs has quit [Ping timeout: 265 seconds]
<linduxed> and that's what i'm referring to
<linduxed> "easy enough"
Silthias has joined #ruby
beilabs has joined #ruby
<linduxed> if you only have chruby, you might eventually feel that you need other tools to make certain workflows easier
<linduxed> rbenv provides some tools for that
<linduxed> chruby doesn't
<linduxed> neither is better or worse, they're different
cdg has joined #ruby
Rickmasta has quit [Quit: Textual IRC Client: www.textualapp.com]
<linduxed> but when choosing between the different tools available, i'd just recommend to consider whether one thinks that additional features that go beyond "pick ruby version" would be helpful
igniting has joined #ruby
Pumukel has quit [Ping timeout: 260 seconds]
Pumukel has joined #ruby
k3rn31 has quit [Quit: Computer has gone to sleep.]
ziyadb has joined #ruby
MrBusiness3 has joined #ruby
tlaxkit has quit [Quit: tlaxkit]
fmcgeough has joined #ruby
allcentury has quit [Ping timeout: 244 seconds]
Pumukel has quit [Ping timeout: 264 seconds]
Pumukel has joined #ruby
rkazak has joined #ruby
MrBusiness3 has quit [Ping timeout: 250 seconds]
Bish has quit [Ping timeout: 265 seconds]
ppat has joined #ruby
hutch34 has quit [Read error: Connection reset by peer]
Bish has joined #ruby
ChiefAlexander has joined #ruby
blackmesa has joined #ruby
Pumukel has quit [Ping timeout: 260 seconds]
jsaak_ has quit [Quit: leaving]
jsaak has joined #ruby
Pumukel has joined #ruby
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ppat has quit [Quit: Page closed]
Burgestrand has joined #ruby
ruby[bot] has joined #ruby
cwali has joined #ruby
Pumukel has quit [Ping timeout: 260 seconds]
blackmesa has quit [Ping timeout: 258 seconds]
dkam has quit [Quit: Be back later ...]
Pumukel has joined #ruby
anisha has joined #ruby
ukk has joined #ruby
ukk has quit [Client Quit]
sameerynho has quit [Quit: WeeChat 1.5]
anisha has quit [Client Quit]
tvw has joined #ruby
Rodya_ has joined #ruby
Rodya_ has quit [Remote host closed the connection]
k3rn31 has joined #ruby
Bounga has quit [Read error: Connection reset by peer]
Pumukel has quit [Ping timeout: 264 seconds]
Pumukel has joined #ruby
allcentury has joined #ruby
da3mon has joined #ruby
mostlybadfly has quit [Quit: Connection closed for inactivity]
diprotic has joined #ruby
flying has joined #ruby
Burgestrand has quit [Read error: Connection reset by peer]
Pumukel has quit [Ping timeout: 260 seconds]
crystal77 has joined #ruby
Pumukel has joined #ruby
monoprotic has quit [Ping timeout: 244 seconds]
agit0 has quit [Ping timeout: 252 seconds]
dinoangelov has joined #ruby
stamina has quit [Ping timeout: 252 seconds]
the_drow has joined #ruby
nando293921 has joined #ruby
hutch34 has joined #ruby
<the_drow> When the benchmark module reports real time it's in seconds right?
flashpoint9 has quit [Remote host closed the connection]
flashpoint9 has joined #ruby
Pumukel has quit [Ping timeout: 260 seconds]
<apeiros> the_drow: yes
<the_drow> apeiros, great. thanks
<apeiros> from the docs: „The unit of time is seconds.“
Pumukel has joined #ruby
<the_drow> I searched for that multiple times. Must have missed it...
<apeiros> it's in the module's toplevel docs.
Burgestrand has joined #ruby
flashpoint9 has quit [Remote host closed the connection]
antgel has quit [Ping timeout: 258 seconds]
flashpoint9 has joined #ruby
youch has joined #ruby
nando293921 has quit [Ping timeout: 276 seconds]
GinoManWorks has joined #ruby
exchgr has quit [Ping timeout: 260 seconds]
ruby-lang140 has quit [Quit: Page closed]
Pumukel has quit [Ping timeout: 260 seconds]
tvon has quit [Quit: System is sleeping...]
coolboy has joined #ruby
Pumukel has joined #ruby
raeoks has quit [Quit: Textual IRC Client: www.textualapp.com]
coolboy has quit [Remote host closed the connection]
pandaant has quit [Remote host closed the connection]
giz|work has quit [Ping timeout: 250 seconds]
coolboy has joined #ruby
plantfood has joined #ruby
<nebg> hello everyone how can i search for gems by command line ? i know that by doing gem install moduleName i can install a module but what about searching ?
interki has joined #ruby
<plantfood> test
jhooker has quit [Ping timeout: 276 seconds]
jhack has joined #ruby
<apeiros> plantfood: test failed. please reboot.
<apeiros> nebg: `gem help commands` and `gem help search`
jhooker has joined #ruby
Burgestrand has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
plantfood has quit [Remote host closed the connection]
<nebg> ok it seems gem search nameTOSearch right ?
plantfood has joined #ruby
Pumukel has quit [Ping timeout: 260 seconds]
<apeiros> yes. note that search does a partial match, but it accepts a regex too.
<apeiros> e.g. `gem search rails` will find 1001 gems
<apeiros> `gem search '^rails$'` will only find one
Pumukel has joined #ruby
* apeiros wishes the defaults were different
ta__ has quit [Remote host closed the connection]
<nebg> ok thanks
s2013 has joined #ruby
lightheaded has quit [Remote host closed the connection]
lightheaded has joined #ruby
Pumukel has quit [Ping timeout: 260 seconds]
Pumukel has joined #ruby
s2013 has quit [Client Quit]
skweek has joined #ruby
meth has joined #ruby
hahuang61 has joined #ruby
flashpoint9 has quit [Remote host closed the connection]
lightheaded has quit [Ping timeout: 240 seconds]
ixti has joined #ruby
yardenbar has quit [Ping timeout: 244 seconds]
Pumukel has quit [Ping timeout: 264 seconds]
Pumukel has joined #ruby
shinnya has joined #ruby
cpruitt has joined #ruby
flashpoint9 has joined #ruby
<Mon_Ouie> gem search rails | wc -l #=> 4655. I feel lied to.
hahuang61 has quit [Ping timeout: 258 seconds]
axl_ has joined #ruby
exchgr has joined #ruby
craigp has quit [Ping timeout: 258 seconds]
Pumukel has quit [Ping timeout: 260 seconds]
hhhhh has joined #ruby
Pumukel has joined #ruby
<linduxed> Mon_Ouie: what were you told?
<dminuoso> 15:58 < apeiros> e.g. `gem search rails` will find 1001 gems
<linduxed> ah
<dminuoso> As do I, Mon_Ouie.
<linduxed> i'm not surprised that what looks like an attempt at hyperbole resulted in the hyperbole being insufficient, when it comes to something related to rails
hey2 has joined #ruby
axl_ has quit [Ping timeout: 244 seconds]
<hhhhh> What is the fastest ruby compiler you can use for number processing
axl_ has joined #ruby
SteenJobs has joined #ruby
axl_ has quit [Read error: Connection reset by peer]
Vingador has joined #ruby
Pumukel has quit [Ping timeout: 264 seconds]
tulak has quit [Remote host closed the connection]
arashb has joined #ruby
tulak has joined #ruby
craysiii has joined #ruby
axl_ has joined #ruby
s2013 has joined #ruby
tulak has quit [Read error: Connection reset by peer]
<linduxed> hhhhh: you most likely wouldn't do number processing in ruby if you expect performance. on the other hand, you could make use of C-extensions to speed up the performance critical parts and do the rest in pure ruby
tulak has joined #ruby
<linduxed> hhhhh: googling "ruby number processing" probably could give you some results as well
<apeiros> hhhhh: probably jruby
kappy_ has quit [Remote host closed the connection]
<linduxed> hhhhh: in general though, my guess would be that ruby isn't the right tool for the job, if you intend to do pure ruby
kappy has joined #ruby
<apeiros> IMO ruby is the right tool until proven otherwise ;-p
<linduxed> hhhhh: apeiros makes a good point that jruby might be faster than the others, but i would still be sceptical as to whether that's enough for hard number crunching
<linduxed> apeiros: fair attitude to have
<apeiros> jhass: is it reasonably simple to write crystal extensions for ruby?
arashb has quit [Ping timeout: 244 seconds]
<linduxed> when you hit a wall one truly can't circumvent in ruby, there's always FFI
<apeiros> that'd be another way to speed up performance…
* apeiros still hasn't tried FFI… :-S
<linduxed> apeiros: i've tried it, it does its job
<apeiros> I mean I've written native extensions, but never with ffi
<linduxed> apeiros: i've only tried it with Rust
<linduxed> worked fine
<apeiros> nice
Bish has quit [Read error: Connection reset by peer]
axl_ has left #ruby [#ruby]
Bish has joined #ruby
<apeiros> I really need some time off. Rust, Go, Swift and Crystal are all languages I'd like to take a dive in…
blackmesa has joined #ruby
<linduxed> to be fair though, i only did a trivial application that modified some string over in Rust, so nothing non-trivial
<hhhhh> Is fortran the fastest language for number processing?
<apeiros> I think the annoyance starts when you have to account for either GC or Threading
<apeiros> hhhhh: COBOL!
<linduxed> hhhhh: i don't know if it's the fastest, but it's still in the top IIRC
<apeiros> no idea. but might well be fortran.
<linduxed> hhhhh: are you going to be building a stock exchange or something?
<apeiros> no cobol in the language shootout :-S
hipertracker has joined #ruby
dopamean_ has joined #ruby
exchgr has quit [Ping timeout: 264 seconds]
<hhhhh> prototyping different ciphers
dkam has joined #ruby
Pumukel has joined #ruby
RegulationD has joined #ruby
cwali has quit [Ping timeout: 240 seconds]
<linduxed> i would guess that you'd find something like Julia fast enough
tdy has joined #ruby
dminuoso has quit [Ping timeout: 260 seconds]
<linduxed> and quite expressive
<linduxed> and to be honest, try writing it in Ruby, as apeiros said
mikecmpb_ has joined #ruby
tyang has quit [Ping timeout: 264 seconds]
<linduxed> getting the general logic out of the way quickly with Ruby might be beneficial, and when you hit a performance wall look into https://github.com/ffi/ffi
lightheaded has joined #ruby
mtkd has quit [Ping timeout: 240 seconds]
TheWhip has quit [Remote host closed the connection]
OTORelic3 has joined #ruby
Pumukel has quit [Ping timeout: 250 seconds]
mikecmpbll has quit [Ping timeout: 244 seconds]
RegulationD has quit [Ping timeout: 264 seconds]
mtkd has joined #ruby
Pumukel has joined #ruby
harai54 has quit [Ping timeout: 258 seconds]
Sammichmaker has quit [Ping timeout: 276 seconds]
tdy has quit [Ping timeout: 265 seconds]
plantfood has quit [Remote host closed the connection]
axsuul has joined #ruby
heelpmeplz has quit [Quit: Leaving]
jazzonmym1nd has joined #ruby
nankyokusei has joined #ruby
myntcake has quit [Ping timeout: 240 seconds]
Ropeney has joined #ruby
Ropeney has quit [Remote host closed the connection]
Gasher has joined #ruby
mitt3ns has joined #ruby
hhhhh has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
jazzonmym111nd has quit [Ping timeout: 240 seconds]
aupadhye has quit [Remote host closed the connection]
tvon has joined #ruby
<mitt3ns> Mornin' folks
agent_white has quit [Disconnected by services]
mitt3ns is now known as agent_white
Pumukel has quit [Ping timeout: 260 seconds]
Pumukel has joined #ruby
nankyokusei has quit [Ping timeout: 276 seconds]
dkam has quit [Ping timeout: 276 seconds]
spudowiar has quit [Quit: gtg]
alfiemax has joined #ruby
banisterfiend has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Spami has joined #ruby
exchgr has joined #ruby
Silthias has quit [Ping timeout: 244 seconds]
skweek has quit [Ping timeout: 265 seconds]
ta_ has joined #ruby
Pumukel has quit [Ping timeout: 264 seconds]
Haui has joined #ruby
Pumukel has joined #ruby
etehtsea has joined #ruby
andikr has quit [Ping timeout: 244 seconds]
Davedev28 has joined #ruby
tulak has quit [Remote host closed the connection]
craysiii has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tulak has joined #ruby
<atom_> Hi, is there any way to know if an IP is inside a subnet? if possible, using ruby core?
<apeiros> IPAddr can do that afair
<apeiros> stdlib
<atom_> (not sure if "core" is the right word, just not external gems)
<atom_> hm thanks apeiros , going to check
ta_ has quit [Ping timeout: 265 seconds]
<apeiros> core = loaded with the executable, stdlib = ships with ruby, 3rd party = everything else
dminuoso has joined #ruby
<apeiros> and ipaddr is stdlib
<Papierkorb> >> require 'ipaddr'; IPAddr.new("192.168.0.0/16").include?("192.168.178.1")
andikr has joined #ruby
<ruby[bot]> Papierkorb: # => true (https://eval.in/627684)
igniting has quit [Quit: Ex-Chat]
tulak has quit [Read error: Connection reset by peer]
tulak has joined #ruby
shadeslayer has quit [Remote host closed the connection]
Pumukel has quit [Ping timeout: 260 seconds]
<atom_> thanks for both the explanation and the snippet :)
Pumukel has joined #ruby
Danielss89 has quit [Ping timeout: 244 seconds]
shadeslayer has joined #ruby
kobain has joined #ruby
aryaching has joined #ruby
exchgr has quit [Ping timeout: 264 seconds]
rkazak has quit [Ping timeout: 252 seconds]
jhack has quit [Quit: jhack]
jhack has joined #ruby
spudowiar has joined #ruby
Danielss89 has joined #ruby
Pumukel has quit [Ping timeout: 260 seconds]
Pumukel has joined #ruby
hipertracker has quit [Quit: hipertracker]
Velizar has joined #ruby
Haui has quit [Ping timeout: 244 seconds]
harfangk has joined #ruby
tulak has quit [Remote host closed the connection]
umdstu has quit [Ping timeout: 265 seconds]
Pumukel has quit [Ping timeout: 260 seconds]
tulak has joined #ruby
umdstu has joined #ruby
hdNCvxxTOC has joined #ruby
dminuoso has quit [Remote host closed the connection]
submitnine has quit []
polishdub has joined #ruby
flashpoint9 has quit [Remote host closed the connection]
plantfood has joined #ruby
rodfersou is now known as rodfersou|lunch
hdNCvxxTOC has quit [Remote host closed the connection]
griffindy has joined #ruby
dkam has joined #ruby
hipertracker has joined #ruby
nclbr has joined #ruby
Pumukel has joined #ruby
rippa has joined #ruby
wugy has quit [Read error: Connection reset by peer]
l4v2 has joined #ruby
ruby-lang201 has joined #ruby
edwinvdg_ has quit [Ping timeout: 250 seconds]
yonatankoren has joined #ruby
Pumukel has quit [Ping timeout: 260 seconds]
Silthias has joined #ruby
Haui has joined #ruby
dkam has quit [Ping timeout: 244 seconds]
Haui has quit [Read error: Connection reset by peer]
aganov has quit [Remote host closed the connection]
Haui has joined #ruby
hahuang61 has joined #ruby
johnernaut has joined #ruby
senayar has joined #ruby
senayar has quit [Changing host]
senayar has joined #ruby
naftilos76 has joined #ruby
dopamean_ has quit [Ping timeout: 244 seconds]
Lucky_ABA has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
hahuang61 has quit [Ping timeout: 250 seconds]
ruby-lang201 has quit [Quit: Page closed]
xrlabs has joined #ruby
jhack has quit [Quit: jhack]
CloCkWeRX has quit [Ping timeout: 265 seconds]
fra has joined #ruby
<fra> Does anyone else remember the good old days of programming?
danielius has quit [Ping timeout: 240 seconds]
synthroid has quit [Remote host closed the connection]
da3mon has quit [Quit: Zzzz...]
flashpoint9 has joined #ruby
myntcake has joined #ruby
dopamean_ has joined #ruby
da3mon has joined #ruby
hutch34 has quit [Ping timeout: 260 seconds]
<xpt> I do
<linduxed> Ruby 1.8.7?
plantfood has quit [Quit: Leaving]
* chris2 started with 1.6.3
* linduxed was lucky to start from 1.9.x
<xpt> fra: moving bits to registry was nice programming experience
<chris2> 1.8 was a nice update
<chris2> after that, well. ;)
<havenwood> fra: Those days are right now! Have any Ruby questions or interesting code to share?
<linduxed> havenwood: they're good, but not old
<linduxed> ;-)
Baffoon has joined #ruby
synthroid has joined #ruby
Baffoon has quit [Read error: Connection reset by peer]
Lucky_ABA has joined #ruby
AndrewIsHere has joined #ruby
tyang has joined #ruby
crank1988_ has quit [Ping timeout: 240 seconds]
hipertracker has quit [Ping timeout: 260 seconds]
ukk has joined #ruby
machinewar has joined #ruby
machinewar has quit [Client Quit]
hipertracker has joined #ruby
conah has joined #ruby
toretore has quit [Ping timeout: 276 seconds]
dminuoso has joined #ruby
TheWhip has joined #ruby
mikecmpb_ is now known as mikecmpbll
dkam has joined #ruby
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kang00 has joined #ruby
hipertracker has quit [Quit: hipertracker]
jackjackdripper has joined #ruby
Guest38 has joined #ruby
<myntcake> a
<kang00> Hi MyMind
<kang00> myntcake
<dminuoso> NameError: undefined local variable or method `a' for main:Object
volcanix has joined #ruby
saneax is now known as saneax-_-|AFK
<myntcake> hi kang00
<myntcake> lol dminuoso
<myntcake> rescue
<volcanix> simple question.. but my brain is not working.. how do I simplify/flatten an array of hashes that have the same key.
<dminuoso> SyntaxError: unexpected keyword_rescue
<myntcake> kang00: why pm?
pokalyis has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
banisterfiend has joined #ruby
<volcanix> [{"a"=>["foo"]}, {"a"=>["bar"]}]
ferr has quit [Quit: WeeChat 1.5]
Skelz0r has joined #ruby
<kang00> myntcake as I m troll
<volcanix> [{"a"=>["foo"]}, {"a"=>["bar"]}] into [{"a"} => ["foo", "bar"]]
dinoangelov has quit [Quit: (null)]
<dminuoso> volcanix: I could spoonfeed, but there would be no learning involved. Lets do this together.
<dminuoso> &ri Enumerable#reduce
TomyWork has quit [Ping timeout: 276 seconds]
<Mon_Ouie> &ri Hash#merge
<myntcake> &ri a
Macaveli has joined #ruby
[Butch] has joined #ruby
<dminuoso> Well, there you have the two methods needed to complete the task.
amclain has joined #ruby
<havenwood> A nice merge reduction with a side of marmalade.
da3mon has quit [Quit: Zzzz...]
mark_66 has quit [Remote host closed the connection]
dkam has quit [Ping timeout: 244 seconds]
<havenwood> volcanix: If you can get merge working by calling it on one Hash and providing the other as an argument with the appropriate block then it's a small bit more to add in reduce so it works on the Array of Hashes.
<havenwood> volcanix: I'd suggest looking at the merge docs first!
etehtsea has quit [Quit: Textual IRC Client: www.textualapp.com]
da3mon has joined #ruby
diprotic is now known as monoprotic
<volcanix> working on this.. but brain not supporting my efforts
<apeiros> you haven't reached balmer's peak yet then. you must rectify that.
jsrn_ has quit [Quit: Leaving]
<volcanix> why is merge not working for me?
<Mon_Ouie> Show us how you're using it
<apeiros> with the given information, all I can say: because you're using it wrong
<dminuoso> 2 Ruby Dollars that our supportee did not read the docs about the block form of Hash#merge
Es0teric has joined #ruby
<dminuoso> Anyone taking the bet?
<dminuoso> Quickly, before you read the pastie!
<dminuoso> 17:59 < havenwood> volcanix: I'd suggest looking at the merge docs first!
<dminuoso> I suggest you follow his suggestion.
frozengeek has quit [Quit: frozengeek]
the_drow has quit [Quit: This computer has gone to sleep]
<volcanix> wait.. why do I want merge? if merge is tossing the original value/
<dminuoso> volcanix: You clearly still did not read the documentation on merge.
<dminuoso> I suggest you follow my previous suggestion.
claudiuinberlin has quit []
nitric has joined #ruby
<Mon_Ouie> The block form allows you to combine both values
ruby-lang944 has joined #ruby
ych has joined #ruby
pokalyis has joined #ruby
pmalyanne has joined #ruby
<volcanix> d.merge(e){|k,o,n| n+o}
TheWhip has quit [Remote host closed the connection]
<apeiros> style points for _k instead of k
WhiteMamba has joined #ruby
TheWhip has joined #ruby
Guest38 has quit [Read error: Connection reset by peer]
<kang00> Anyone played with images?
<aeruder> apeiros: why is that?
<aeruder> some idiomatic way of indicating unused?
<headius> Bish_: yes, JRuby 9.x+ requires Java 7 minimum
<dminuoso> aeruder: Yes.
<aeruder> ah, ok, hadn't seen that, but still evolving my ruby-style
<apeiros> aeruder: some tools will warn about unused variables, and they'll ignore variables which start with _ (or are just a _)
<aeruder> some tools like what?
<Mon_Ouie> ruby implementations, for starters
<volcanix> @havenwood is there a better reduce example..
<apeiros> ruby, rubocop, rubymine f.ex.
frozengeek has joined #ruby
tulak_ has joined #ruby
TheWhip has quit [Ping timeout: 244 seconds]
WhiteMamba has quit [Ping timeout: 264 seconds]
flashpoint9 has quit [Remote host closed the connection]
Beams has joined #ruby
jobewan has joined #ruby
<jhass> apeiros: not yet, some people are working on it. For now you need some magic to produce a shared library at all and initialize the GC. After that it's a matter of writing a binding to the C API. One major issue is the slowdown from converting between Ruby and Crystal types, in particular strings requiring a copy.
danielius has joined #ruby
<apeiros> ok
<apeiros> thanks for the info :)
<volcanix> Im having trouble figuring out how best to iterate the external array.
hipertracker has joined #ruby
banisterfiend has quit [Ping timeout: 265 seconds]
tulak has quit [Ping timeout: 276 seconds]
RegulationD has joined #ruby
pmalyanne has quit [Ping timeout: 264 seconds]
blaxter has quit [Quit: foo]
senayar has quit []
jazzonmym11nd has joined #ruby
pmalyanne has joined #ruby
hipertracker has quit [Client Quit]
<apeiros> I actually read that one :D
Davedev28 has quit [Read error: Network is unreachable]
Derperperd has joined #ruby
<volcanix> Is there any good examples of reduce ? I've actually never used it this way..
tyang has quit [Ping timeout: 260 seconds]
jazzonmym1nd has quit [Ping timeout: 240 seconds]
Lord_of_Life has quit [Ping timeout: 250 seconds]
<apeiros> there are some in the docs
Davedev28 has joined #ruby
<Mon_Ouie> >> [1, 2, 3, 4].reduce(0) { |sum, element| puts "Sum: #{sum} | Element: #{element}"; sum + element }
<ruby[bot]> Mon_Ouie: # => Sum: 0 | Element: 1 ...check link for more (https://eval.in/627765)
<Mon_Ouie> ^ See the link to see what values are passed to the block
<volcanix> I eventually got it.. ff.inject{|sum, e| sum.merge(e){|k,o,n| n+o} }
<Mon_Ouie> Notice though that if the array is empty you'll get nil as a result
<volcanix> Thanks everybody ;-:
<volcanix> ;-)
pokalyis has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Mon_Ouie> You may want to pass an initial value as an argument to inject instead
<dminuoso> volcanix: reject/inject basically reduces an Enumerable to a single value (SQL calls this aggregation) - the block just lets you control *how*
allcentury has quit [Ping timeout: 252 seconds]
jazzonmym111nd has joined #ruby
pmalyanne has quit [Ping timeout: 244 seconds]
pokalyis has joined #ruby
xpt has left #ruby ["WeeChat 1.4"]
xpt has joined #ruby
<volcanix> In my case initializing inject's sum with a Hash .. is that needed? Seems anti rubish
<dminuoso> volcanix: No it's perfectly fine.
<volcanix> k, thanks all.
volcanix has quit [Quit: Page closed]
jazzonmym11nd has quit [Ping timeout: 260 seconds]
Lord_of_Life has joined #ruby
nando293921 has joined #ruby
nitric_ has joined #ruby
mjuszczak has joined #ruby
mjuszczak has quit [Max SendQ exceeded]
mjuszczak has joined #ruby
mjuszczak has quit [Max SendQ exceeded]
hutch34 has joined #ruby
fra has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
fra has joined #ruby
mjuszczak has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
memorasus has joined #ruby
coolboy has quit [Ping timeout: 258 seconds]
nitric has quit [Ping timeout: 276 seconds]
tulak_ has quit [Remote host closed the connection]
danielius has quit [Ping timeout: 244 seconds]
brendan- has quit [Ping timeout: 250 seconds]
ta_ has joined #ruby
zacts_pi has joined #ruby
zacts_pi has quit [Client Quit]
jhack has joined #ruby
Silthias has quit [Read error: Connection reset by peer]
ruby-lang944 has quit [Ping timeout: 264 seconds]
zacts_pi has joined #ruby
mjuszczak has quit []
andikr has quit [Remote host closed the connection]
rsampaio_ has joined #ruby
fra has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
Rodya_ has joined #ruby
nankyokusei has joined #ruby
flashpoint9 has joined #ruby
ta_ has quit [Ping timeout: 240 seconds]
Pupp3tm4st3r has quit [Read error: Connection reset by peer]
conta has quit [Ping timeout: 244 seconds]
gigetoo has quit [Ping timeout: 244 seconds]
Pupp3tm4st3r has joined #ruby
jhack has quit [Client Quit]
rkazak has joined #ruby
gigetoo has joined #ruby
arch___ has joined #ruby
arch___ has quit [Excess Flood]
karmatr0n has joined #ruby
arch___ has joined #ruby
arch___ has quit [Excess Flood]
arch___ has joined #ruby
arch___ has quit [Excess Flood]
flashpoint9 has quit [Ping timeout: 250 seconds]
nankyokusei has quit [Ping timeout: 252 seconds]
arch___ has joined #ruby
arch___ has quit [Excess Flood]
Rodya_ has quit [Ping timeout: 250 seconds]
Pumukel has joined #ruby
arch___ has joined #ruby
arch___ has quit [Excess Flood]
skweek has joined #ruby
arch___ has joined #ruby
zacts_pi has quit [Quit: WeeChat 1.4]
arch___ has quit [Excess Flood]
jaequery has joined #ruby
interki has quit [Ping timeout: 250 seconds]
TheWhip has joined #ruby
Eiam has quit [Quit: ╯°□°)╯︵ǝpouǝǝɹɟ]
zacts has joined #ruby
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
gregf_ has quit [Quit: Lost terminal]
SeepingN has joined #ruby
flashpoint9 has joined #ruby
pawnbox has quit [Remote host closed the connection]
ponga has quit [Quit: Connection closed for inactivity]
gix has quit [Quit: Client exiting]
Pupp3tm4st3r has quit [Remote host closed the connection]
jarred has joined #ruby
dkam has joined #ruby
elifoster has joined #ruby
Coldblackice has joined #ruby
davedev24 has joined #ruby
kang00 has quit [Read error: Connection reset by peer]
kang00 has joined #ruby
hahuang61 has joined #ruby
coolboy has joined #ruby
exchgr has joined #ruby
karmatr0n has quit [Ping timeout: 244 seconds]
blackmes1 has joined #ruby
gregf_ has joined #ruby
frozengeek has quit [Quit: frozengeek]
pokalyis has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
blackmesa has quit [Ping timeout: 244 seconds]
Immune has joined #ruby
dkam has quit [Ping timeout: 258 seconds]
beilabs has quit [Remote host closed the connection]
beilabs has joined #ruby
claudiuinberlin has joined #ruby
exchgr has quit [Ping timeout: 260 seconds]
mtkd has quit [Ping timeout: 240 seconds]
coolboy has quit [Ping timeout: 252 seconds]
creat has quit [Ping timeout: 260 seconds]
brendan- has joined #ruby
pawnbox has joined #ruby
rkazak has quit [Ping timeout: 265 seconds]
TPug has joined #ruby
mtkd has joined #ruby
Fernando-Basso has joined #ruby
SteenJobs has quit [Quit: SteenJobs]
beilabs has quit [Ping timeout: 265 seconds]
jaruga___ has quit [Quit: jaruga___]
pawnbox has quit [Ping timeout: 276 seconds]
ddffg has joined #ruby
tulak has joined #ruby
zacts has quit [Quit: WeeChat 1.4]
aryaching has quit []
aryaching has joined #ruby
firstdayonthejob has joined #ruby
jbomo has joined #ruby
bob_f has quit [Ping timeout: 240 seconds]
dviola has joined #ruby
coolboy has joined #ruby
Beams has quit [Quit: Textual IRC Client: www.textualapp.com]
karmatr0n has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
kang00 has left #ruby ["AndroIRC"]
johnernaut has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
naftilos76 has quit [Read error: Connection reset by peer]
hutch34 has quit [Ping timeout: 250 seconds]
SeepingN has quit [Quit: The system is going down for reboot NOW!]
naftilos76 has joined #ruby
rodfersou|lunch is now known as rodfersou
crystal77 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
flying has quit []
meth has quit [Quit: Bye!]
karmatr0n has quit [Ping timeout: 265 seconds]
Synthead has quit [Quit: Synthead]
postmodern has joined #ruby
TPug has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
arnonhongklay has quit [Remote host closed the connection]
Synthead has joined #ruby
OMGilluminated has joined #ruby
OMGilluminated has left #ruby [#ruby]
tulak has quit [Remote host closed the connection]
symm- has joined #ruby
tulak has joined #ruby
hutch34 has joined #ruby
mrgrieve1 has joined #ruby
meth has joined #ruby
arnonhongklay has joined #ruby
ec0 has joined #ruby
frozengeek has joined #ruby
SteenJobs has joined #ruby
elephants has joined #ruby
TPug has joined #ruby
harfangk has quit [Quit: Textual IRC Client: www.textualapp.com]
tulak has quit [Ping timeout: 258 seconds]
ych has quit [Read error: Connection reset by peer]
allcentury has joined #ruby
hipertracker has joined #ruby
tdy has joined #ruby
mrgrieve1 has quit [Ping timeout: 260 seconds]
dgncn has quit [Ping timeout: 276 seconds]
GodFather has quit [Ping timeout: 244 seconds]
marsjaninzmarsa has quit [Quit: ZNC 1.7.x-git-487-cbf5c38 - http://znc.in]
Rodya_ has joined #ruby
marsjaninzmarsa has joined #ruby
replay has joined #ruby
miqlas-H has joined #ruby
lxsameer has joined #ruby
Xiti has joined #ruby
Rodya_ has quit [Ping timeout: 250 seconds]
dminuoso has quit [Ping timeout: 244 seconds]
hipertracker has quit [Quit: hipertracker]
karmatr0n has joined #ruby
skweek has quit [Ping timeout: 250 seconds]
jenrzzz has quit [Ping timeout: 244 seconds]
redpants has joined #ruby
exchgr has joined #ruby
stamina has joined #ruby
arnonhongklay has quit [Remote host closed the connection]
da3mon has quit [Quit: Zzzz...]
jenrzzz has joined #ruby
Pumukel has quit [Remote host closed the connection]
jackjackdripper has quit [Quit: Leaving.]
Snowy has quit [Remote host closed the connection]
firstdayonthejob has quit [Quit: WeeChat 1.5]
titre1 has joined #ruby
exchgr has quit [Ping timeout: 258 seconds]
dkam has joined #ruby
jaequery has quit [Quit: Textual IRC Client: www.textualapp.com]
hk238 has quit [Quit: http://www.kvirc.net/ 4.9.1 Aria]
titre1 has quit [Quit: titre1]
dminuoso has joined #ruby
arnonhongklay has joined #ruby
nitric_ has quit [Read error: Connection reset by peer]
mikecmpbll has joined #ruby
dgncn has joined #ruby
myntcake has quit [Ping timeout: 265 seconds]
dkam has quit [Ping timeout: 276 seconds]
arashb has joined #ruby
okrasi has joined #ruby
arnonhongklay has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 265 seconds]
nitric has joined #ruby
okrasi_ has joined #ruby
okrasi has quit [Client Quit]
tyang has joined #ruby
giz|work has joined #ruby
eljimbo has quit [Quit: This computer has gone to sleep]
Spami has quit [Quit: This computer has gone to sleep]
arashb has quit [Ping timeout: 250 seconds]
SteenJobs has quit [Quit: SteenJobs]
stamina has quit [Ping timeout: 265 seconds]
nitric_ has joined #ruby
nitric has quit [Read error: Connection reset by peer]
synthroid has quit []
kossae has joined #ruby
coolboy has quit [Remote host closed the connection]
umdstu has quit [Quit: umdstu]
meth is now known as Abri
qguv has joined #ruby
jgt3 has quit [Ping timeout: 265 seconds]
coolboy has joined #ruby
claudiuinberlin has quit [Remote host closed the connection]
claudiuinberlin has joined #ruby
TheHodge has quit [Quit: Connection closed for inactivity]
crystal77 has joined #ruby
whathappens has joined #ruby
KaliLinuxGR has quit [Ping timeout: 244 seconds]
ta_ has joined #ruby
arnonhongklay has joined #ruby
conta has joined #ruby
blackmes1 has quit [Ping timeout: 240 seconds]
bocaneri has quit [Read error: Connection reset by peer]
ta_ has quit [Ping timeout: 244 seconds]
pulgolino has quit [Remote host closed the connection]
cdg has quit [Remote host closed the connection]
nhhc has quit [Quit: Leaving]
umdstu has joined #ruby
ramfjord has joined #ruby
ta_ has joined #ruby
nitric_ has quit [Read error: Connection reset by peer]
pokalyis has joined #ruby
KaliLinuxGR has joined #ruby
ukk has quit [Quit: WeeChat 1.5]
arnonhongklay has quit [Remote host closed the connection]
tulak has joined #ruby
wrkrcoop has joined #ruby
<wrkrcoop> anyone know how to replace these tripple \ with a single \?
<wrkrcoop> "{\"inputJson\":\"{\\n \\\"fName\\\": \\\"Harry\\\",\\n \\\"lName\\\": \\\"Potter\\\"\\n }\"}"
qguv has quit [Quit: bye]
<wrkrcoop> im dealing with a shitty endpoint and have to do some weird manipulation of this json string before i can send it
jhack has joined #ruby
exchgr has joined #ruby
da3mon has joined #ruby
da3mon has quit [Remote host closed the connection]
wrkrcoop has quit [Quit: wrkrcoop]
Rodya_ has joined #ruby
axl__ has joined #ruby
qguv has joined #ruby
binaryplease1 has joined #ruby
eljimbo has joined #ruby
arnonhongklay has joined #ruby
ghormoon has joined #ruby
naftilos76 has quit [Quit: Αποχώρησε]
binaryplease has quit [Ping timeout: 276 seconds]
Rodya_ has quit [Ping timeout: 250 seconds]
arnonhongklay has quit [Remote host closed the connection]
<ghormoon> hi, has anyone seen this? http://pastebin.com/Qjc2e4S2 I've tried to build ruby 2.3 (stretch package) on debian jessie and got this funny test failure. is there anything I could have done wrong during the build (like if the tests require some specific timezone or something to be run under)
<ruby[bot]> ghormoon: we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/ad4859171737eb8655b2f4d33bc6c45c
<ruby[bot]> ghormoon: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
blackmes1 has joined #ruby
hutch34 has quit [Ping timeout: 244 seconds]
nitric has joined #ruby
hakunin_ is now known as hakunin
blackmesa has joined #ruby
gix has joined #ruby
binaryplease1 is now known as binaryplease
blackmes1 has quit [Ping timeout: 258 seconds]
redpants has quit [Ping timeout: 265 seconds]
edwinvdgraaf has joined #ruby
ziyadb has quit [Quit: Connection closed for inactivity]
hutch34 has joined #ruby
ramfjord has quit [Ping timeout: 265 seconds]
symm- has quit [Quit: Leaving...]
tulak has quit [Remote host closed the connection]
BTRE has quit [Read error: Connection reset by peer]
BTRE has joined #ruby
tulak has joined #ruby
tulak has quit [Read error: Connection reset by peer]
tulak has joined #ruby
Es0teric has quit [Quit: Computer has gone to sleep.]
nando293921 has quit [Quit: Lost terminal]
dkam has joined #ruby
kossae has quit [Quit: WeeChat 1.5]
firstdayonthejob has joined #ruby
TPug has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
yardenbar has joined #ruby
robfrawley has joined #ruby
dkam has quit [Ping timeout: 240 seconds]
tulak has quit []
<matthewd> ghormoon: That does seem.. surprising
zacts has joined #ruby
edwinvdg_ has joined #ruby
edwinvdg_ has quit [Remote host closed the connection]
chee is now known as kbdkode
redpants has joined #ruby
spudowiar has quit [Quit: gtg]
Baffoon has joined #ruby
Baffoon has quit [Excess Flood]
kbdkode is now known as chee
rippa has quit [Read error: Connection reset by peer]
edwinvdgraaf has quit [Ping timeout: 244 seconds]
redpants has quit [Ping timeout: 244 seconds]
gnufied__ has joined #ruby
edwinvdgraaf has joined #ruby
gnufied__ has quit [Client Quit]
giz|work has quit [Ping timeout: 244 seconds]
edwinvdgraaf has quit [Remote host closed the connection]
hipertracker has joined #ruby
indistylo has joined #ruby
axl__ has quit [Ping timeout: 276 seconds]
jackjackdripper has joined #ruby
jackjackdripper has quit [Read error: Connection reset by peer]
jackjackdripper1 has joined #ruby
jackjackdripper1 has quit [Read error: Connection reset by peer]
jackjackdripper has joined #ruby
jgnagy has quit [Remote host closed the connection]
axl_ has joined #ruby
karmatr0n has quit [Ping timeout: 265 seconds]
robfrawley has quit [Quit: leaving]
rmf_ has joined #ruby
rmf_ is now known as robfrawley
hahuang61 has quit [Ping timeout: 240 seconds]
<drbrain> That test is probably a day off because of a timezone offset that's not being accounted for
<drbrain> If you set the release date field as a Time object RubyGems converts it to midnight UTC and uses that as the date
elastix has joined #ruby
<drbrain> so the difference may only be half an hour, but with the conversion it becomes a day
Madplatypus has joined #ruby
jgnagy has joined #ruby
hotpancakes has joined #ruby
Spami has joined #ruby
SteenJobs has joined #ruby
zacts has quit [Ping timeout: 252 seconds]
ramfjord has joined #ruby
anisha has joined #ruby
stamina has joined #ruby
axl_ has quit [Quit: axl_]
al2o3-cr has quit [Ping timeout: 260 seconds]
johnmilton has quit [Remote host closed the connection]
spudowiar has joined #ruby
last_staff has joined #ruby
frozengeek has quit [Quit: frozengeek]
dkphenom has joined #ruby
c14367 has joined #ruby
zacts has joined #ruby
c14367 has quit []
indistylo has quit [Remote host closed the connection]
<matthewd> Oh, oops.. I was looking at test_date_equals_string
C0deMaver1ck_ is now known as C0deMaver1ck
MrBusiness3 has joined #ruby
jackjackdripper1 has joined #ruby
jackjackdripper has quit [Read error: Connection reset by peer]
polishdub has quit [Quit: Leaving]
lrojas has quit []
MrBusiness3 has quit [Ping timeout: 260 seconds]
Rodya_ has joined #ruby
jgt3 has joined #ruby
johnmilton has joined #ruby
jaruga___ has joined #ruby
miqlas-H has quit [Ping timeout: 250 seconds]
jaruga___ has quit [Client Quit]
lupeke has joined #ruby
jaruga___ has joined #ruby
Rodya_ has quit [Ping timeout: 250 seconds]
jgt3 has quit [Ping timeout: 250 seconds]
zacts_pi has joined #ruby
arashb has joined #ruby
SeepingN has joined #ruby
blackgoat has joined #ruby
giz|work has joined #ruby
hahuang61 has joined #ruby
axl_ has joined #ruby
zacts has quit [Ping timeout: 276 seconds]
zacts_ has joined #ruby
arashb has quit [Ping timeout: 244 seconds]
tvon_ has joined #ruby
tvon_ has quit [Client Quit]
zacts_pi has quit [Ping timeout: 258 seconds]
kentnl has joined #ruby
kentnl has quit [Changing host]
kentnl has joined #ruby
zacts__ has joined #ruby
roflmyeggo has joined #ruby
elephants has quit [Quit: Leaving...]
hotpancakes has quit [Remote host closed the connection]
kent\n has quit [Ping timeout: 250 seconds]
zacts has joined #ruby
Lucky_ABA has quit [Ping timeout: 260 seconds]
zacts_ has quit [Ping timeout: 244 seconds]
jphase has joined #ruby
tvon has quit [Quit: System is sleeping...]
Lucky_ABA has joined #ruby
lupeke_ has joined #ruby
Vingador has quit [Ping timeout: 244 seconds]
zacts__ has quit [Ping timeout: 276 seconds]
tvon has joined #ruby
dkam has joined #ruby
conta has quit [Ping timeout: 264 seconds]
axl_ has quit [Quit: axl_]
ramfjord has quit [Ping timeout: 240 seconds]
lupeke_ has quit [Ping timeout: 264 seconds]
ramfjord has joined #ruby
spudowiar has quit [Quit: gtg]
tomchapin has joined #ruby
dkam has quit [Ping timeout: 240 seconds]
howard_ has joined #ruby
hotpancakes has joined #ruby
jbomo has quit [Ping timeout: 276 seconds]
anisha has quit [Quit: This computer has gone to sleep]
shoto has quit [Ping timeout: 240 seconds]
Dimik has joined #ruby
jackjackdripper has joined #ruby
jackjackdripper1 has quit [Ping timeout: 250 seconds]
hotpancakes has quit [Ping timeout: 250 seconds]
teclator_ has joined #ruby
teclator has quit [Ping timeout: 264 seconds]
allcentury has quit [Ping timeout: 244 seconds]
hotpancakes has joined #ruby
Fernando-Basso has quit [Quit: Leaving]
spudowiar has joined #ruby
Azure|dc has joined #ruby
exchgr has quit [Ping timeout: 250 seconds]
tvon has quit [Quit: System is sleeping...]
Azure has quit [Ping timeout: 258 seconds]
lightheaded has quit [Remote host closed the connection]
cdg has joined #ruby
nclbr has quit [Quit: Leaving...]
craigp has joined #ruby
zacts has quit [Quit: WeeChat 1.4]
zacts has joined #ruby
lupeke has quit [Remote host closed the connection]
exchgr has joined #ruby
JediMaster has joined #ruby
harai54 has joined #ruby
<JediMaster> Hi guys, complete Ruby newbee here, I'm a sysadmin/PHP developer, I need to alter a chef recipe, and just want to check the syntax
d5sx43 has joined #ruby
<JediMaster> Will this work? if (node.chef_environment=='production' || node.chef_environment=='staging') && (if !node.roles.include?('standalone') && node.roles.include?('master'))
<baweaver> Have you tried it?
lupeke has joined #ruby
<JediMaster> Not yet =)
<baweaver> That may be a good first step to see if its working
<baweaver> we tend to make rather horrid REPLs
<JediMaster> Just want a quick syntax check =)
<baweaver> that being said, no, it won't
d5sx43 has quit [Client Quit]
dopamean_ has quit [Ping timeout: 265 seconds]
<JediMaster> I want either production or staging environments, AND has master role and NOT standalone
wrkrcoop has joined #ruby
<baweaver> that if there will break it
<baweaver> but try running it and see
d5sx43 has joined #ruby
<JediMaster> Ugh yes, that's my bad
<JediMaster> apart from that?
<baweaver> give it a shot and see
Xiti has quit [Quit: Xiti]
doublemalt_ has joined #ruby
<JediMaster> will the !node work to negate it?
BrianJ has joined #ruby
<baweaver> this seems a tinge repetitive.
skweek has joined #ruby
lupeke has quit [Client Quit]
<JediMaster> It's not one I want to get wrong as it's a pain in the neck to fix manually
yardenbar has quit [Ping timeout: 250 seconds]
<baweaver> not trying to be rude, but the best way to test something is to try it
<baweaver> that doesn't necessarily mean executing the exact code either.
<baweaver> >> !false
<ruby[bot]> baweaver: # => true (https://eval.in/627809)
<baweaver> You have to have some degree of confidence in basic ruby
<baweaver> and if you're really paranoid, that's what things like test kitchen and server spec are for
claudiuinberlin has quit [Remote host closed the connection]
lxsameer has quit [Quit: WeeChat 1.5]
DoubleMalt has quit [Ping timeout: 276 seconds]
claudiuinberlin has joined #ruby
<brendan-> i'm trying to define a variable with a default value, but running into a syntax error:
<brendan-> region = ENV['AWS_DEFAULT_REGION'] ||= 'us-east-1'
<brendan-> bucket = "#{ENV['MH_ENV']}-terraform-state" ||= 'dev-terraform-state'
<brendan-> the error i'm getting is: syntax error, unexpected tOP_ASGN, expecting end-of-input
<wrkrcoop> can someone help me out, im trying to create this but i can’t get it to work https://gist.github.com/ellismarte/0147747b5f90b9d016a7d761a6b2147e#file-body-rb-L1
<brendan-> i'm unsure what i'm doing wrong though
zacts has quit [Ping timeout: 244 seconds]
<wrkrcoop> i kno i can’t interpolate in single quotes …
claudiuinberlin has quit [Remote host closed the connection]
coolboy has quit [Ping timeout: 250 seconds]
d5sx43 has quit [Quit: Leaving...]
Davedev28 has quit [Ping timeout: 250 seconds]
k3rn31 has quit [Quit: Computer has gone to sleep.]
<matthewd> wrkrcoop: You had a substantial discussion about the difference between a string's value and its representation yesterday.. this seems like retreading the same ground
<matthewd> brendan-: What do you believe ||= does?
Xiti has joined #ruby
<wrkrcoop> matthewd: yeah … looks like the problem is on their side. thanks
<brendan-> my thought was that if ENV['AWS_DEFAULT_REGION'] wasn't set, region would be set to 'us-east-1'
<brendan-> matthewd: ^
<brendan-> same logic applying to the bucket var
skweek has quit [Ping timeout: 250 seconds]
whathappens has quit [Read error: Connection reset by peer]
SteenJobs has quit [Quit: SteenJobs]
whathappens has joined #ruby
<matthewd> brendan-: `a ||= b` means `a || (a = b)`
haraigo has joined #ruby
<brendan-> right
<brendan-> hmm
<matthewd> So what is `a` in each of those two lines?
<brendan-> environment variables
<brendan-> well, the first one is
<matthewd> Yes, the first one is
<brendan-> 2nd line is a string that has an env var as part of it
<matthewd> Indeed. Hard to assign to that.
tomchapin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
harai54 has quit [Ping timeout: 244 seconds]
<havenwood> brendan-: consider something like: bucket = "#{ENV['MH_ENV'] or 'dev'}-terraform-state"
whathappens has quit [Read error: Connection reset by peer]
<brendan-> is it because ruby isn't aware of whether or not ENV['MH_ENV'] is set at the time of ||=
whathappens has joined #ruby
<havenwood> brendan-: You need a variable to the left of ||=, it's assignment.
<brendan-> not a dynamic string?
<matthewd> brendan-: This is an error: "foo" = "bar"
jhack has quit [Quit: jhack]
nankyokusei has joined #ruby
<brendan-> bucket is attempting to be set to a string of "blah-#{ENV['test']}-boom" or default to "blah-nonono-boom"
jhack has joined #ruby
<brendan-> nor could i set:
<brendan-> test = ENV['test'] ||= 'blah2'
<brendan-> then try bucket = "test1-#{test}-test" ||= "test1-test2-test"
Rodya_ has joined #ruby
<matthewd> brendan-: You are trying to assign a string to another string.
mikeliss has joined #ruby
<matthewd> That is not a thing you can do.
<brendan-> in place of
jgt3 has joined #ruby
<brendan-> i guess without comparing that string ruby has 0 idea what i'm trying to do
<brendan-> :D
<matthewd> brendan-: Can you agree that this won't work? a + 1 = 7
<brendan-> yes
nankyokusei has quit [Ping timeout: 264 seconds]
<matthewd> So nor will: a + "z" = "xyz"
<matthewd> Thus: "#{a}z" = "xyz"
<matthewd> And finally, nor: "#{a}z" || ("#{a}z" = "xyz")
Spami has quit [Quit: Leaving]
Rodya_ has quit [Ping timeout: 250 seconds]
claudiuinberlin has joined #ruby
moos3 has quit [Quit: leaving]
jgt3 has quit [Ping timeout: 252 seconds]
axsuul has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<brendan-> true enough. ty matthewd & havenwood
tvon has joined #ruby
<matthewd> So, in the first one, you probably just want ||, if you aren't deliberately setting the env var
exchgr has quit [Ping timeout: 250 seconds]
exchgr has joined #ruby
last_staff has quit [Quit: l8erz]
elastix has quit [Quit: elastix]
aryaching has quit [Ping timeout: 250 seconds]
pwnd_nsfw` has quit [Read error: Connection reset by peer]
mtkd has quit [Ping timeout: 250 seconds]
flashpoint9 has quit [Remote host closed the connection]
Rodya_ has joined #ruby
myntcake has joined #ruby
flashpoint9 has joined #ruby
mtkd has joined #ruby
Rodya__ has joined #ruby
<brendan-> i agree matthewd
<brendan-> what do you think about the 2nd one? needs to be handled differently or going with havenwood's suggestion?
whathappens has quit [Remote host closed the connection]
hipertracker has quit [Quit: hipertracker]
pwnd_nsfw has joined #ruby
whathappens has joined #ruby
<matthewd> Yeah, what havenwood said (I'd use `||` over `or`, but it's fine either way here)
okrasi_ has quit [Quit: Konversation terminated!]
dkphenom has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
skweek has joined #ruby
CloCkWeRX has joined #ruby
Rodya_ has quit [Ping timeout: 250 seconds]
hipertracker has joined #ruby
Rodya__ has quit [Remote host closed the connection]
SteenJobs has joined #ruby
flashpoint9 has quit [Ping timeout: 250 seconds]
<brendan-> ok
<brendan-> ty
Rodya_ has joined #ruby
whathappens has quit [Read error: Connection reset by peer]
Derperperd has quit [Quit: Derperperd]
sepp2k has quit [Quit: Leaving.]
whathappens has joined #ruby
eljimmy has quit [Read error: Connection reset by peer]
eljimmy has joined #ruby
tvon has quit [Quit: System is sleeping...]
d5sx43 has joined #ruby
skweek has quit [Ping timeout: 250 seconds]
elastix has joined #ruby
hey2 has quit [Remote host closed the connection]
Vingador has joined #ruby
rodfersou has quit [Quit: leaving]
flashpoint9 has joined #ruby
claudiuinberlin has quit []
hahuang61 has quit [Ping timeout: 240 seconds]
rails447 has joined #ruby
d5sx43 has quit [Quit: Leaving...]
dminuoso has quit [Ping timeout: 240 seconds]
aamador has quit [Quit: Ex-Chat]
myntcake has quit [Ping timeout: 265 seconds]
ldnunes has quit [Quit: Leaving]
jinie has quit [Quit: ZNC 1.6.1 - http://znc.in]
lightheaded has joined #ruby
jinie has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
skweek has joined #ruby
lightheaded has quit [Ping timeout: 258 seconds]
coolboy has joined #ruby
elastix has quit [Quit: elastix]
ajsharma has joined #ruby
nitric has quit [Read error: Connection reset by peer]
nitric_ has joined #ruby
tyang has quit [Quit: Leaving]
tyang has joined #ruby
CloCkWeRX has quit [Quit: Leaving.]
fmcgeough has quit [Quit: fmcgeough]
biberu has quit []
jonoyeong has joined #ruby
tyang has quit [Ping timeout: 265 seconds]
nitric_ has quit [Read error: Connection reset by peer]
jhack has quit [Quit: jhack]
jhack has joined #ruby
jhack has quit [Client Quit]
haraigoshi has joined #ruby
CloCkWeRX has joined #ruby
MrBusiness3 has joined #ruby
CloCkWeRX has quit [Client Quit]
haraigo has quit [Ping timeout: 250 seconds]
CloCkWeRX1 has joined #ruby
flashpoint9 has quit [Remote host closed the connection]
OTORelic3 has quit [Ping timeout: 244 seconds]
flashpoint9 has joined #ruby
wrkrcoop has quit [Quit: wrkrcoop]
moonythedwarf_ has joined #ruby
jgt3 has joined #ruby
vuoto has joined #ruby
CloCkWeRX1 has left #ruby [#ruby]
CloCkWeRX has joined #ruby
[Butch] has quit [Quit: I'm out . . .]
marr has joined #ruby
wrkrcoop has joined #ruby
tomchapin has joined #ruby
doublemalt_ has quit [Ping timeout: 250 seconds]
flashpoint9 has quit [Ping timeout: 250 seconds]
dkam has joined #ruby
CloCkWeRX1 has joined #ruby
jgt3 has quit [Ping timeout: 250 seconds]
skweek has quit [Ping timeout: 250 seconds]
CloCkWeRX has quit [Ping timeout: 264 seconds]
dkam has quit [Ping timeout: 240 seconds]
cpruitt has quit [Quit: cpruitt]
giz|work has quit [Ping timeout: 276 seconds]
nando293921 has joined #ruby
tlaxkit has joined #ruby
CloCkWeRX1 has quit [Quit: Leaving.]
ta_ has quit [Remote host closed the connection]
youch has quit [Quit: WeeChat 1.5]
<ineb> this URI behaviour caught me by suprise https://paste.xinu.at/etD/rb . any explanation for this? and is there a elegant way to get what i want here?
TPug has joined #ruby
zacts has joined #ruby
ChiefAlexander has quit [Remote host closed the connection]
roflmyeggo has quit [Ping timeout: 240 seconds]
blackwind_123 has quit [Ping timeout: 258 seconds]
Vingador has quit [Ping timeout: 240 seconds]
<drbrain> >> require 'uri'; URI("http://example") + "foo/" + "bar"
<ruby[bot]> drbrain: # => #<URI::HTTP http://example/foo/bar> (https://eval.in/627819)
<drbrain> ineb: you need trailing /, beware that uri + "/" resets the path to "/"
blackwind_123 has joined #ruby
jackjackdripper1 has joined #ruby
MrBusiness2 has joined #ruby
jackjackdripper has quit [Read error: Connection reset by peer]
<ineb> drbrain: looks like a weird implementation to me, but fair enough. thanks.
<drbrain> ineb: it makes sense for handling HTML href
<drbrain> for example, URI("http://example/foo/bar") + "baz" => http://example.com/foo/baz
arashb has joined #ruby
MrBusiness3 has quit [Ping timeout: 250 seconds]
dminuoso has joined #ruby
<ineb> i would argue, that this is a exotic use-case for a generic URI class
<ineb> but i get it
<ineb> i will take care of the trailing /
l4v2 has quit [Quit: l4v2]
<SeepingN> should be http://example/foo/barbaz
arashb has quit [Ping timeout: 244 seconds]
hahuang61 has joined #ruby
robfrawley has quit [Ping timeout: 276 seconds]
<wrkrcoop> i need a specific line of code in my app to run once every hour …
dminuoso has quit [Ping timeout: 250 seconds]
jonoyeong has quit [Remote host closed the connection]
<wrkrcoop> any idaes on how to do this?
<wrkrcoop> i was going to make it sleep but thought that might block
<drbrain> SeepingN: o_O
lightheaded has joined #ruby
jgt3 has joined #ruby
<drbrain> in browsers, <a href="other_page">click</a> stays on the same directory level
jbomo has joined #ruby
nando293921 has quit [Ping timeout: 240 seconds]
giz|work has joined #ruby
zacts has quit [Ping timeout: 265 seconds]
JediMaster has quit [Quit: fnarble]
<SeepingN> I suppose it's as easy to add a / to the end as it is anywhere
finisherr has joined #ruby
<baweaver> wrkrcoop: Cron
firstdayonthejob has quit [Ping timeout: 265 seconds]
lightheaded has quit [Ping timeout: 258 seconds]
<wrkrcoop> baweaver: hmmm might have a lambda hit the endpoint once an hour
<baweaver> ....or put a cron job on the endpoint
AnarchyAo has joined #ruby
<wrkrcoop> baweaver: a cron job on the endpoint?
vuoto has quit [Remote host closed the connection]
<wrkrcoop> like a cron job that hits the endpoint once an hour?
jgt3 has quit [Ping timeout: 276 seconds]
<baweaver> why not put it on the endpoint itself
<wrkrcoop> how do you put it on the endpoint?
<baweaver> do you own the endpoint?
<wrkrcoop> ive never heard of that
<wrkrcoop> yes
<baweaver> then you use ssh, and then you use cron
myntcake has joined #ruby
huyderman has quit [Ping timeout: 244 seconds]
<wrkrcoop> hmm
<wrkrcoop> ok
rails447 has quit [Ping timeout: 264 seconds]
dkam has joined #ruby
<baweaver> If you need something more powerful, then you look into things like Lambda or Rundeck
<baweaver> but until then, keep it simple
stamina has quit [Ping timeout: 264 seconds]
<wrkrcoop> idk how i can hit the endpoint though using cronjob
<baweaver> especially if you don't have a CI/CD system in place with over 20 instances.
postmodern has quit [Ping timeout: 250 seconds]
<baweaver> how do you call an endpoint?
<wrkrcoop> baweaver: get request
jonoyeong has joined #ruby
<baweaver> and how can you do that using a unix command?
<wrkrcoop> curl :}
<wrkrcoop> but they need auth …
hakunin has quit []
<baweaver> and what do cron jobs take?
<wrkrcoop> oi
<wrkrcoop> commands
<baweaver> yes, unix commands, like curl, which happenstantially takes parameters
<baweaver> like authentication
TheHodge has joined #ruby
SteenJobs has quit [Quit: SteenJobs]
<wrkrcoop> hmmm ok ill propose it to the boss
TPug has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
TPug has joined #ruby
dreinull has quit [Remote host closed the connection]
wrkrcoop has quit [Quit: wrkrcoop]
dreinull has joined #ruby
Meeh has quit [Quit: No Ping reply in 180 seconds.]
jphase is now known as jphase-2
jphase-2 is now known as jphase
huyderman has joined #ruby
jaruga___ has quit [Quit: jaruga___]
Meeh has joined #ruby
Davedev28 has joined #ruby
giz|work has quit [Ping timeout: 264 seconds]
wrkrcoop has joined #ruby
firstdayonthejob has joined #ruby
hipertracker has quit [Quit: hipertracker]
Abri has quit [Quit: Bye!]
postmodern has joined #ruby
tvw has quit [Read error: Connection reset by peer]
haraigoshi has quit [Ping timeout: 260 seconds]
jphase has quit [Ping timeout: 244 seconds]
jenrzzz has joined #ruby
huyderman has quit [Ping timeout: 260 seconds]
huyderman has joined #ruby
Parko has joined #ruby
Es0teric has joined #ruby
huyderman has quit [Ping timeout: 250 seconds]
huyderman has joined #ruby
Es0teric has quit [Quit: Computer has gone to sleep.]
Meeh has quit [Ping timeout: 244 seconds]
ngscheurich has joined #ruby
Meeh has joined #ruby
aryaching has joined #ruby
Rodya_ has quit [Remote host closed the connection]
davedev24 has quit [Remote host closed the connection]
flashpoint9 has joined #ruby
Sammichmaker has joined #ruby
Sammichmaker has quit [Client Quit]
zapata has quit [Ping timeout: 250 seconds]
Sammichmaker has joined #ruby
davedev24 has joined #ruby
Rodya_ has joined #ruby
rkazak has joined #ruby
<ghormoon> sorry, I was afk, so my guess it's timezone problem was really true? if I build it in UTC, it will help, or some specific one?
ngscheurich has quit [Ping timeout: 265 seconds]
bronson has joined #ruby
Tusskan has joined #ruby
Ishido has quit [Quit: Roads? Where We're Going We Don't Need Roads.]
TheWhip has quit [Remote host closed the connection]
bronson_ has quit [Ping timeout: 240 seconds]
Gasher has quit [Ping timeout: 250 seconds]
mjuszczak has joined #ruby
mjuszczak has quit [Max SendQ exceeded]
dminuoso has joined #ruby
Parko has quit [Quit: In a while, crocodile]
mjuszczak has joined #ruby
hipertracker has joined #ruby
Parko has joined #ruby
nando293921 has joined #ruby
Nimonas has quit [Remote host closed the connection]
mikeliss has quit [Quit: mikeliss]
<drbrain> ghormoon: it's supposed to work in any timezone, but I guess the test could be wrong, is there some reason you need all the tests to pass?
dminuoso has quit [Ping timeout: 276 seconds]
lightheaded has joined #ruby
monoprotic has quit [Ping timeout: 265 seconds]
jobewan has quit [Ping timeout: 276 seconds]
<ghormoon> drbrain: well, during lazy package rebuild in debbuild, it will abort if there is test failure and not package anything :)
TheWhip has joined #ruby
saneax-_-|AFK is now known as saneax
<drbrain> you could try building in UTC
koooge has joined #ruby
<drbrain> what time zone are you in?
robfrawley has joined #ruby
lightheaded has quit [Ping timeout: 258 seconds]
jphase has joined #ruby
zapata has joined #ruby
robfrawley is now known as Guest88527
ta_ has joined #ruby
Gasher has joined #ruby
djbkd_ has quit [Quit: Leaving...]
Dreamer3 has quit [Quit: Computer has gone to sleep.]
nando293921 has quit [Ping timeout: 244 seconds]
TheWhip has quit [Ping timeout: 276 seconds]
hipertracker has quit [Quit: hipertracker]
whathappens has quit [Remote host closed the connection]
ta_ has quit [Ping timeout: 250 seconds]
whathappens has joined #ruby
mikecmpbll has quit [Quit: inabit.]
jbomo has left #ruby [#ruby]
tomchapin has quit [Quit: Textual IRC Client: www.textualapp.com]
Es0teric has joined #ruby
whathappens has quit [Ping timeout: 264 seconds]
davedev24 has quit [Remote host closed the connection]
davedev24 has joined #ruby
blackmesa has quit [Quit: WeeChat 1.5]
ngscheurich has joined #ruby
SteenJobs has joined #ruby
SteenJobs has quit [Client Quit]
Lucky_ABA has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
djbkd has joined #ruby
jtdoncas has joined #ruby
zapata has quit [Ping timeout: 260 seconds]
solocshaw has joined #ruby
tvon has joined #ruby
coolboy has quit [Remote host closed the connection]
rsampaio_ has quit [Ping timeout: 265 seconds]
moonythedwarf_ has quit [Ping timeout: 244 seconds]
moonythedwarf_ has joined #ruby
TheWhip has joined #ruby
ajsharma has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
arashb has joined #ruby
fclausen has joined #ruby
<ghormoon> +2 (well, +1 +DST)
gnufied has quit [Quit: Leaving]
ajsharma has joined #ruby
TheWhip has quit [Ping timeout: 264 seconds]
ngscheurich has quit [Ping timeout: 276 seconds]
memorasus1 has joined #ruby
memorasus has quit [Ping timeout: 265 seconds]
memorasus1 is now known as memorasus
tvon has quit [Ping timeout: 244 seconds]
arashb has quit [Ping timeout: 265 seconds]
zapata has joined #ruby
AnarchyAo has quit [Ping timeout: 240 seconds]
matp has quit [Remote host closed the connection]