jhass changed the topic of #ruby to: Rules & more: http://ruby-community.com || Ruby 2.3.0; 2.2.4; 2.1.8: https://ruby-lang.org || Paste >3 lines of text on https://gist.github.com || log @ http://irclog.whitequark.org/ruby/
nogic has joined #ruby
cpup has joined #ruby
Xeago has joined #ruby
yfeldblum has quit [Remote host closed the connection]
<havenwood> martin290: One of the popular Rack (http://rack.github.io) adapters: http://www.sinatrarb.com
<Ox0dea> This guy links.
<havenwood> martin290: Here're Hello Worlds in 16 Rack adapters as well as pure Rack: https://github.com/luislavena/bench-micro/tree/master/apps
<havenwood> martin290: I have a soft spot for Roda but Sinatra tutorials are easier to come by: http://roda.jeremyevans.net
jeanlinux has joined #ruby
solars has quit [Ping timeout: 244 seconds]
baweaver has quit [Remote host closed the connection]
<martin290> cool thanks!
laith has quit [Quit: Leaving.]
mostlybadfly has joined #ruby
intrigueD has quit [Remote host closed the connection]
hahuang65 has joined #ruby
charliesome has joined #ruby
axisys has quit [Remote host closed the connection]
Xeago has quit [Ping timeout: 250 seconds]
jottr has joined #ruby
askhat has quit [Ping timeout: 255 seconds]
skade has quit [Quit: Computer has gone to sleep.]
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
askhat has joined #ruby
mattwashere has joined #ruby
haylon has left #ruby ["WeeChat 1.4"]
tejasmanohar has quit [Ping timeout: 240 seconds]
rl1 has joined #ruby
DLSteve has joined #ruby
axisys has joined #ruby
axisys has quit [Changing host]
axisys has joined #ruby
askhat has quit [Max SendQ exceeded]
deimos has quit [Ping timeout: 240 seconds]
<rl1> Hey guys I'm trying to replicate Elixir pipeoperator inside ruby. Passing the first argument of a previously evaluated function to the next one.
dfockler has quit [Ping timeout: 250 seconds]
hahuang65 has quit [Ping timeout: 240 seconds]
askhat has joined #ruby
<rl1> But I run a lot of trouble when working with external modules like Math.
floatingpoint has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rbennacer has joined #ruby
azure32 has quit [Ping timeout: 248 seconds]
<rl1> If I delegate Math.sin to a local method it works like a charm but If I call it external it handle that with the same arity. Any clue?
vF3hNGxc47h8 has joined #ruby
duncannz has quit [Ping timeout: 248 seconds]
askhat has quit [Max SendQ exceeded]
deimos has joined #ruby
jenrzzz has quit [Quit: Lost terminal]
askhat has joined #ruby
darkf has joined #ruby
jottr_ has joined #ruby
askhat has quit [Max SendQ exceeded]
tejasmanohar has joined #ruby
askhat has joined #ruby
askhat has quit [Max SendQ exceeded]
baweaver has joined #ruby
jottr has quit [Ping timeout: 248 seconds]
askhat has joined #ruby
symm- has quit [Ping timeout: 240 seconds]
askhat has quit [Max SendQ exceeded]
askhat has joined #ruby
spuk has joined #ruby
askhat has quit [Max SendQ exceeded]
askhat has joined #ruby
<zenspider> too much to look at
<zenspider> !ban askhat !T 1h please fix your connection
askhat was kicked from #ruby by ruby[bot] [please fix your connection]
<zenspider> I don't get too much of that code to be able to help
HalcyonicStorm has quit [Quit: Leaving.]
puerile has joined #ruby
mfb2 has joined #ruby
griffindy has joined #ruby
Dreamer3 has joined #ruby
nofacade has joined #ruby
griffindy has quit [Client Quit]
jeanlinux has quit [Remote host closed the connection]
hxegon is now known as hxegon_AFK
darkf has quit [Ping timeout: 240 seconds]
SCHAAP137 has quit [Read error: Connection reset by peer]
darkf has joined #ruby
martin290 has left #ruby [#ruby]
zeroDivisible has quit [Quit: WeeChat 1.3]
cjbottaro has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Fezzler has joined #ruby
rcvalle has quit [Quit: rcvalle]
aupadhye has joined #ruby
jottr_ has quit [Ping timeout: 252 seconds]
cdg has quit [Remote host closed the connection]
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
darkf_ has joined #ruby
darkf has quit [Ping timeout: 250 seconds]
jottr_ has joined #ruby
saneax is now known as saneax_AFK
mattwildig has joined #ruby
puerile has quit []
uglybandersnatc1 has left #ruby [#ruby]
uglybandersnatc1 has joined #ruby
uglybandersnatc1 has left #ruby [#ruby]
uglybandersnatc1 has joined #ruby
steffkes has quit [Ping timeout: 244 seconds]
weemsledeux has joined #ruby
darkf_ has quit [Ping timeout: 240 seconds]
cyclonis has joined #ruby
Strawberrie has joined #ruby
griffindy has joined #ruby
kirillzh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Strawberrie> Hello there, anyone can help me pls ?
kirillzh has joined #ruby
darkf has joined #ruby
Fezzler has quit [Quit: Leaving]
yqt has quit [Ping timeout: 252 seconds]
kirillzh has quit [Max SendQ exceeded]
Flakes has joined #ruby
kirillzh has joined #ruby
eregi_ has quit [Ping timeout: 255 seconds]
<havenwood> Strawberrie: Pray tell your problem!
hxegon_AFK is now known as hxegon
Gnut has quit [Ping timeout: 240 seconds]
jmignault has quit [Ping timeout: 244 seconds]
<Strawberrie> I really don't know how to use this, but I found this https://gist.github.com/jamiew/1080846
kies^ has joined #ruby
LoneHermit has quit [Remote host closed the connection]
aryaching has quit [Read error: Connection reset by peer]
nanoz has joined #ruby
bricker has quit [Ping timeout: 252 seconds]
puerile has joined #ruby
<havenwood> Strawberrie: ^ once you've downloaded or otherwise created the tumblr-photo-ripper.rb file
<havenwood> Strawberrie: then set your `site` as desired: https://gist.github.com/jamiew/1080846#file-tumblr-photo-ripper-rb-L9
puerile has quit [Client Quit]
Dreamer3 has quit [Quit: Leaving...]
dcunit3d has joined #ruby
alexblom has quit [Ping timeout: 244 seconds]
<Strawberrie> And then ?
snockerton has quit [Quit: Leaving.]
tvw has joined #ruby
joonty has joined #ruby
darkf has quit [Ping timeout: 250 seconds]
alexblom has joined #ruby
LoneHerm_ has joined #ruby
darkf has joined #ruby
darkf has quit [Changing host]
darkf has joined #ruby
BTRE has quit [Ping timeout: 250 seconds]
Dreamer3 has joined #ruby
babblebre has quit [Quit: Connection closed for inactivity]
joonty has quit [Ping timeout: 252 seconds]
mfb2 has quit [Remote host closed the connection]
darkf has left #ruby [#ruby]
kirillzh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<havenwood> Strawberrie: profit!
LuckyABA has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Strawberrie has quit [Ping timeout: 252 seconds]
trinaldi has quit [Quit: zzz]
tulak_ has quit [Remote host closed the connection]
rkazak has joined #ruby
elifoster has joined #ruby
jenrzzz has joined #ruby
rkazak has quit [Ping timeout: 240 seconds]
bricker has joined #ruby
shadoi has quit [Quit: Leaving.]
puerile has joined #ruby
puerile has quit [Client Quit]
Jeremy1023 has joined #ruby
BTRE has joined #ruby
cschnei__ has quit [Remote host closed the connection]
griffind_ has joined #ruby
cjbottaro has joined #ruby
ebertx has left #ruby [#ruby]
nolsen- has joined #ruby
nolsen- has quit [Excess Flood]
griffind_ has quit [Client Quit]
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
frem has quit [Quit: Connection closed for inactivity]
nolsen- has joined #ruby
nolsen- has quit [Excess Flood]
rl1 has quit [Ping timeout: 252 seconds]
jenrzzz has quit [Ping timeout: 252 seconds]
Coldblackice has quit [Ping timeout: 250 seconds]
nolsen- has joined #ruby
nolsen- has quit [Excess Flood]
choke has joined #ruby
Coldblackice has joined #ruby
shazaum_ has joined #ruby
puerile has joined #ruby
puerile has quit [Client Quit]
nolsen- has joined #ruby
nolsen- has quit [Excess Flood]
marr has quit [Ping timeout: 255 seconds]
vdamewood has joined #ruby
puerile has joined #ruby
puerile has quit [Client Quit]
puerile has joined #ruby
Cohedrin has quit [Ping timeout: 252 seconds]
robbyoconnor has joined #ruby
robbyoconnor has quit [Client Quit]
robbyoconnor has joined #ruby
skade has joined #ruby
Cohedrin has joined #ruby
teejayen has joined #ruby
Gnut has joined #ruby
eregi has joined #ruby
cjbottaro has quit [Ping timeout: 244 seconds]
johnmilton has joined #ruby
puerile has quit []
hahuang65 has joined #ruby
nolsen has joined #ruby
teej has quit [Ping timeout: 252 seconds]
skade has quit [Quit: Computer has gone to sleep.]
Noxilex has joined #ruby
<Noxilex> Hello ruby programmers !
griffind_ has joined #ruby
griffindy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
hahuang65 has quit [Ping timeout: 250 seconds]
choke has quit [Quit: Gone]
nofacade has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Jardayn has quit [Quit: Leaving]
duckpuppy has joined #ruby
x77686d has quit [Quit: x77686d]
recycle has joined #ruby
recycle has quit [Max SendQ exceeded]
recycle has joined #ruby
krobzaur_ has joined #ruby
Rodya_ has joined #ruby
blackmes1 has quit [Ping timeout: 276 seconds]
PaulCapestany has quit [Quit: .]
htmldrum has quit [Ping timeout: 255 seconds]
Snowy has quit [Quit: ragequit]
KensoDev has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
PaulCapestany has joined #ruby
hxegon has quit [Ping timeout: 255 seconds]
charliesome has quit [Read error: Connection reset by peer]
charliesome has joined #ruby
tlaxkit has quit [Quit: ¡Adiós!]
htmldrum has joined #ruby
robbyoconnor has quit [Read error: Connection reset by peer]
KensoDev has joined #ruby
robbyoconnor has joined #ruby
rkazak has joined #ruby
stevemackinnon has quit [Remote host closed the connection]
KensoDev has quit [Client Quit]
kirillzh has joined #ruby
Coldblackice has quit [Read error: Connection reset by peer]
yfeldblum has joined #ruby
Sucks has joined #ruby
elifoster has quit [Ping timeout: 250 seconds]
zenlot1 is now known as zenlot
stannard has joined #ruby
tvw has quit [Ping timeout: 250 seconds]
Coldblackice has joined #ruby
dcunit3d has quit [Ping timeout: 240 seconds]
KensoDev has joined #ruby
B1n4r10 has joined #ruby
graydot has quit [Quit: graydot]
stannard has quit [Ping timeout: 240 seconds]
Coldblackice has quit [Read error: Connection reset by peer]
pdoherty has joined #ruby
sneakerhax has quit [Quit: back later]
Coldblackice has joined #ruby
FooMunki has quit [Quit: FooMunki]
B1n4r10 has quit [Ping timeout: 252 seconds]
uglybandersnatc1 has quit [Quit: Leaving.]
maikowblue has quit [Quit: .]
ElFerna has joined #ruby
jottr_ has quit [Ping timeout: 276 seconds]
bronson has quit [Read error: Connection reset by peer]
intrigueD has joined #ruby
lpvb has quit [Ping timeout: 248 seconds]
bronson has joined #ruby
joe_s has joined #ruby
ledestin has joined #ruby
eregi has quit [Ping timeout: 276 seconds]
Coldblackice has quit []
LoneHerm_ has quit [Remote host closed the connection]
gevans has quit [Remote host closed the connection]
ElFerna has quit [Ping timeout: 252 seconds]
Dimik has joined #ruby
Coldblackice has joined #ruby
krobzaur_ has quit [Ping timeout: 244 seconds]
Kryptonical has quit [Ping timeout: 250 seconds]
Kryptonical has joined #ruby
lpvb has joined #ruby
intrigueD has quit [Remote host closed the connection]
eregi has joined #ruby
hahuang65 has joined #ruby
Kryptonical has quit [Ping timeout: 250 seconds]
terminalrecluse has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nando293921 has quit [Quit: Lost terminal]
terminalrecluse has joined #ruby
Dimik has quit []
eregi has quit [Ping timeout: 255 seconds]
x77686d has joined #ruby
Kryptonical has joined #ruby
hahuang65 has quit [Ping timeout: 244 seconds]
stevemackinnon has joined #ruby
eregi has joined #ruby
Dimik has joined #ruby
johnmilton has quit [Quit: Namaste]
johnmilton has joined #ruby
makenoise has joined #ruby
johnmilton has quit [Client Quit]
krobzaur_ has joined #ruby
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dcunit3d has joined #ruby
tneilen has joined #ruby
Channel6 has joined #ruby
bronson has quit [Remote host closed the connection]
teejayen has quit [Ping timeout: 252 seconds]
blackmes1 has joined #ruby
hahuang61 has joined #ruby
moei has quit [Quit: Leaving...]
ledestin has quit [Ping timeout: 276 seconds]
Kang0 has quit [Read error: Connection reset by peer]
sankaber has quit [Ping timeout: 255 seconds]
moei has joined #ruby
blackmes1 has quit [Ping timeout: 252 seconds]
Jeremy1023 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
krobzaur_ has quit [Ping timeout: 240 seconds]
Kensei has joined #ruby
Kensei has joined #ruby
kam270 has joined #ruby
kam270 has quit [Client Quit]
bronson has joined #ruby
babblebre has joined #ruby
terminalrecluse has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
duncannz has joined #ruby
terminalrecluse has joined #ruby
joonty has joined #ruby
<havenwood> Noxilex: halloooo
<Noxilex> Yes ?
<havenwood> Noxilex: I mean, welcome!
Guest34101 has quit [Ping timeout: 255 seconds]
<Noxilex> Oh thx :)
<Noxilex> I'm kinda new to IRC, I was looking for a good ruby channel
sneakerhax has joined #ruby
<toretore> it's not good, but it's the only one
<havenwood> it's good, but it's not the only one
terminalrecluse has quit [Ping timeout: 250 seconds]
cabargas has joined #ruby
Radar is now known as Skeptical
Skeptical is now known as Radar
nando293921 has joined #ruby
joonty has quit [Ping timeout: 244 seconds]
nando293921 has quit [Client Quit]
Sucks has quit [Quit: No Ping reply in 180 seconds.]
rodolfowtf has joined #ruby
tulak has joined #ruby
phatso727 has joined #ruby
tulak has quit [Read error: Connection reset by peer]
nando293921 has joined #ruby
unreal has joined #ruby
uglybandersnatc1 has joined #ruby
<Arcaire> >deprecation warnings when using Kernel methods
<Arcaire> thanks trump
nogic has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
araujo has quit [Ping timeout: 244 seconds]
krobzaur_ has joined #ruby
KensoDev has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
DmitryBochkarev has joined #ruby
arlek has joined #ruby
<havenwood> timeout just deprecated itself, sua sponte
unreal_ has quit [Ping timeout: 276 seconds]
<havenwood> musta timed out
arlek has quit [Max SendQ exceeded]
<Arcaire> Yeah timeout is the one.
<Arcaire> >warning: constant Kernel::TimeoutError is deprecated
<Arcaire> wew
xxneolithicxx has quit [Quit: Leaving.]
joe_s has quit [Quit: homos]
brijesh has joined #ruby
ensyde_ has joined #ruby
brijesh has quit [Client Quit]
brijesh has joined #ruby
devbug has quit [Ping timeout: 250 seconds]
weemsledeux has joined #ruby
brijesh has quit [Client Quit]
nando293921 has quit [Quit: Lost terminal]
eregi has quit [Ping timeout: 248 seconds]
uglybandersnatc1 has quit [Quit: Leaving.]
moeabdol2 has joined #ruby
fedexo has joined #ruby
KensoDev has joined #ruby
moeabdol2 has quit [Ping timeout: 255 seconds]
PaulCapestany has quit [Quit: .]
TomPeed has joined #ruby
brijesh has joined #ruby
KensoDev has quit [Client Quit]
Coldblackice_ has joined #ruby
tneilen has quit [Ping timeout: 244 seconds]
Coldblackice has quit [Ping timeout: 240 seconds]
Musashi007 has joined #ruby
nando293921 has joined #ruby
kknight has joined #ruby
nando293921 has quit [Client Quit]
duckpuppy has quit [Ping timeout: 240 seconds]
UtkarshRay has joined #ruby
rbennacer has quit [Remote host closed the connection]
<Noxilex> You know other ruby channels ?
baweaver has quit [Remote host closed the connection]
skade has joined #ruby
mikecmpbll has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<havenwood> Noxilex: ##new2ruby is a "smaller, quieter place for aspiring Rubyists"
cdg has joined #ruby
<havenwood> Noxilex: #ruby-community is the perfect channel to discuss ways to improve this community
<havenwood> Noxilex: #ruby-offtopic is for playing hangman
cdg has quit [Remote host closed the connection]
cdg has joined #ruby
<havenwood> Noxilex: #ruby-pro, #rubyonrails, #rubygems, channels for various human langs, etc
makenoise has quit [Remote host closed the connection]
DmitryBochkarev has quit [Quit: This computer has gone to sleep]
skade has quit [Ping timeout: 240 seconds]
sneakerhax has quit [Ping timeout: 244 seconds]
vF3hNGxc47h8 has quit [Quit: AndroIRC - Android IRC Client ( http://www.androirc.com )]
blackmes1 has joined #ruby
dstarh has joined #ruby
<havenwood> farewell Ruby 2.0!
<havenwood> Ruby 2.0 is dead, long live Ruby 2.3!
graydot has joined #ruby
<havenwood> And hello semantic versioning for all supported Rubies.
<havenwood> Refinements.
makenoise has joined #ruby
Jeremy1023 has joined #ruby
Jeremy1023 has quit [Client Quit]
william3 has joined #ruby
shazaum_ has quit [Ping timeout: 255 seconds]
postmodern has quit [Quit: Leaving]
makenoise has quit [Remote host closed the connection]
eregi has joined #ruby
<havenwood> At least Refinements in the less primordial form.
blackmes1 has quit [Ping timeout: 276 seconds]
brijesh has quit [Quit: WeeChat 1.1.1]
Jeremy1023 has joined #ruby
<Noxilex> Thx
william3 has quit [Ping timeout: 276 seconds]
kknight has quit [Remote host closed the connection]
<havenwood> "We recommend that you start planning to upgrade to Ruby 2.3 or 2.2."
<Noxilex> Why did you choose to learn ruby ?
mattwildig has quit [Ping timeout: 240 seconds]
brijesh has joined #ruby
<havenwood> Noxilex: I started liking it and kept liking it.
gigetoo has quit [Ping timeout: 252 seconds]
<Noxilex> ^^ Same
<Noxilex> Also beginners tutorial are really great in this language
graydot has quit [Quit: graydot]
devbug has joined #ruby
devbug_ has joined #ruby
<Noxilex> Do you know about codingame ?
devbug_ has quit [Read error: Connection reset by peer]
<havenwood> Noxilex: nope
<Noxilex> How do you speak to me that way ?
<Noxilex> It is a /msg ?
DmitryBochkarev has joined #ruby
Guest34101 has joined #ruby
mattwildig has joined #ruby
<havenwood> Noxilex: Nope, I type "Nox" then hit <tab>
ensyde_ has quit [Quit: Leaving]
sondr3 has joined #ruby
<Noxilex> I've started ruby on codingame, it's a website where you can improve your skills in any language by solving puzzle or playing at clash of code: a gamemode where you have limited time to solve a problem before other participants
<Noxilex> havenwood: Oh ok
<Noxilex> good to know
Mr0rris0 has quit [Read error: Connection reset by peer]
<havenwood> Noxilex: Enjoying it so far?
cyclonis has quit [Read error: Connection reset by peer]
Mr0riss0 has joined #ruby
<Noxilex> IRC ?
cyclonis has joined #ruby
phatso727 has quit [Ping timeout: 250 seconds]
<havenwood> Noxilex: codinggame.com
<Noxilex> havenwood: Anybody can see when we talk like that right ?
<havenwood> Noxilex: Reminds me of: https://www.bloc.io/ruby-warrior
<Noxilex> havenwood: Yes I do
Mr0riss0 is now known as Mr0rris0
<havenwood> Noxilex: Yes, it's just a way to highlight me but everyone can see.
<Noxilex> havenwood: It is nice because it sends me a notification
<havenwood> Noxilex: Ditto.
<Noxilex> havenwood: when you do so
avenj has quit [Ping timeout: 240 seconds]
* havenwood dings
bahar has quit [Excess Flood]
Guest34101 has quit [Ping timeout: 250 seconds]
gigetoo has joined #ruby
vdamewood has quit [Quit: Life beckons.]
hanmac has quit [Ping timeout: 240 seconds]
bahar has joined #ruby
cajone has joined #ruby
mattwild_ has joined #ruby
braincrash has quit [Quit: bye bye]
mattwildig has quit [Ping timeout: 244 seconds]
tulak has joined #ruby
cajone has quit [Remote host closed the connection]
nanoz has quit [Ping timeout: 255 seconds]
crazydiamond has quit [Remote host closed the connection]
cajone has joined #ruby
<Noxilex> havenwood: bloc.io looks great
<Noxilex> Trying it
krzkrz has joined #ruby
UtkarshRay has quit [Remote host closed the connection]
<Noxilex> havenwood: It's cool that it saves your progress through the game
Xeago has joined #ruby
cajone has quit [Remote host closed the connection]
diegoviola has quit [Quit: WeeChat 1.4]
Musashi007 has quit [Quit: Musashi007]
kam270 has joined #ruby
Xeago has quit [Ping timeout: 244 seconds]
Jeremy1023 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Jeremy1023 has joined #ruby
goodcodeguy has joined #ruby
gix has quit [Ping timeout: 244 seconds]
braincrash has joined #ruby
cajone has joined #ruby
hanmac has joined #ruby
ss_much has quit [Quit: Connection closed for inactivity]
UtkarshRay has joined #ruby
pleiosaur has quit [Ping timeout: 240 seconds]
SirCmpwn has quit [Ping timeout: 240 seconds]
sesquipedalian has quit [Ping timeout: 244 seconds]
zast has joined #ruby
pawnbox has joined #ruby
gix has joined #ruby
sesquipedalian has joined #ruby
pleiosaur has joined #ruby
SirCmpwn has joined #ruby
skweek has joined #ruby
krobzaur has joined #ruby
Maxed has joined #ruby
tulak_ has joined #ruby
krobzaur_ has quit [Ping timeout: 248 seconds]
bricker has quit [Ping timeout: 250 seconds]
tulak_ has quit [Remote host closed the connection]
tulak has quit [Ping timeout: 240 seconds]
hahuang61 has quit [Ping timeout: 240 seconds]
hahuang65 has joined #ruby
mattwild_ has quit [Ping timeout: 252 seconds]
pawnbox has quit [Remote host closed the connection]
pdoherty has quit [Ping timeout: 252 seconds]
pawnbox has joined #ruby
pawnbox has quit [Ping timeout: 250 seconds]
TomPeed has quit [Ping timeout: 240 seconds]
cpup has quit [Ping timeout: 240 seconds]
rakm has joined #ruby
bricker has joined #ruby
cajone has quit [Ping timeout: 276 seconds]
cpup has joined #ruby
s00pcan has quit [Ping timeout: 248 seconds]
hahuang65 has quit [Ping timeout: 250 seconds]
speaking1ode has quit [Quit: sup fgt]
rbennacer has joined #ruby
sneakerhax has joined #ruby
cajone has joined #ruby
cpup has quit [Ping timeout: 255 seconds]
nando293921 has joined #ruby
dcunit3d has quit [Ping timeout: 244 seconds]
rbennacer has quit [Ping timeout: 276 seconds]
s00pcan has joined #ruby
chouhoul_ has joined #ruby
jeanlinux has joined #ruby
Musashi007 has joined #ruby
chouhoulis has quit [Ping timeout: 248 seconds]
zapata has quit [Quit: WeeChat 1.4]
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
chouhoul_ has quit [Remote host closed the connection]
chouhoulis has joined #ruby
DmitryBochkarev has quit [Quit: This computer has gone to sleep]
DmitryBochkarev has joined #ruby
sondr3 has quit [Quit: Sleep]
blackmes1 has joined #ruby
bricker has quit [Ping timeout: 250 seconds]
pawnbox has joined #ruby
RTG` has quit [Remote host closed the connection]
DmitryBochkarev has quit [Quit: This computer has gone to sleep]
mwlang has quit [Quit: mwlang]
blackmes1 has quit [Ping timeout: 255 seconds]
RTG` has joined #ruby
brijesh has quit [Ping timeout: 244 seconds]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
dcunit3d has joined #ruby
DLSteve has quit [Quit: All rise, the honorable DLSteve has left the channel.]
Don_John has quit [Read error: Connection reset by peer]
goodcodeguy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
skweek has quit [Ping timeout: 244 seconds]
Musashi007 has quit [Quit: Musashi007]
techietrash has quit [Ping timeout: 250 seconds]
joonty has joined #ruby
Noxilex has quit [Ping timeout: 240 seconds]
toretore has quit [Ping timeout: 240 seconds]
pawnbox has quit [Remote host closed the connection]
techietrash has joined #ruby
baweaver has joined #ruby
brendan- has joined #ruby
joonty has quit [Ping timeout: 255 seconds]
znz_jp has quit [Quit: kill -QUIT $$]
blackgoat has quit [Quit: WeeChat 1.4]
cajone has quit [Ping timeout: 276 seconds]
cabargas has quit [Quit: Textual IRC Client: www.textualapp.com]
krobzaur has quit [Quit: WeeChat 0.4.2]
uglybandersnatch has joined #ruby
moeabdol2 has joined #ruby
pawnbox has joined #ruby
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jeanlinux has quit [Read error: Connection reset by peer]
zast has quit [Remote host closed the connection]
babblebre has quit [Quit: Connection closed for inactivity]
skade has joined #ruby
znz_jp has joined #ruby
moeabdol2 has quit [Ping timeout: 240 seconds]
saneax_AFK is now known as saneax
TomyLobo has quit [Ping timeout: 252 seconds]
uglybandersnatch has quit [Quit: ZNC 1.6.2 - http://znc.in]
uglybandersnatch has joined #ruby
cdg has quit [Remote host closed the connection]
djbkd has quit [Remote host closed the connection]
p1k has joined #ruby
krzkrz has quit [Ping timeout: 276 seconds]
krzkrzkrz has joined #ruby
terminalrecluse has joined #ruby
nando293921 has quit [Quit: Lost terminal]
skade has quit [Quit: Computer has gone to sleep.]
uglybandersnatch has quit [Quit: ZNC 1.6.2 - http://znc.in]
yfeldblum has quit [Remote host closed the connection]
nando293921 has joined #ruby
p1k_ has joined #ruby
floatingpoint has joined #ruby
p1k has quit [Ping timeout: 276 seconds]
counterapparatus has joined #ruby
uglybandersnatch has joined #ruby
chouhoulis has quit [Remote host closed the connection]
rbennacer has joined #ruby
johndoetest494 has joined #ruby
duncannz has quit [Quit: Leaving]
unscrimped has joined #ruby
rbennacer has quit [Ping timeout: 250 seconds]
solocshaw has quit [Ping timeout: 248 seconds]
duncannz has joined #ruby
counterapparatus has left #ruby [#ruby]
djbkd has joined #ruby
nando293921 has quit [Quit: Lost terminal]
counterapparatus has joined #ruby
wilbert has joined #ruby
griffind_ has quit [Ping timeout: 240 seconds]
Maxed has quit []
blackmes1 has joined #ruby
nando293921 has joined #ruby
Channel6 has quit [Quit: Leaving]
nando293921 has quit [Client Quit]
spuk has quit [Ping timeout: 248 seconds]
jeanlinux has joined #ruby
blackmes1 has quit [Ping timeout: 248 seconds]
jeanlinux has quit [Remote host closed the connection]
Azulinho has quit [Ping timeout: 244 seconds]
Guest34101 has joined #ruby
minimalism has quit [Quit: minimalism]
avenj has joined #ruby
nando293921 has joined #ruby
cajone has joined #ruby
bricker has joined #ruby
Jeremy1023 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nando293921 has quit [Client Quit]
tjohnson has quit [Quit: Connection closed for inactivity]
Guest34101 has quit [Ping timeout: 252 seconds]
kam270 has quit [Quit: Leaving]
wilbert has quit [Quit: quit]
jud^ is now known as jud
jud has quit [Changing host]
jud has joined #ruby
cabargas has joined #ruby
nando293921 has joined #ruby
x77686d has quit [Quit: x77686d]
sauvin has joined #ruby
minimalism has joined #ruby
avenj has quit [Changing host]
avenj has joined #ruby
xfbs has joined #ruby
ur5us has quit [Remote host closed the connection]
s00pcan has quit [Remote host closed the connection]
s00pcan has joined #ruby
dubek has joined #ruby
mattwashere has quit [Ping timeout: 240 seconds]
mattwashere has joined #ruby
mattwashere has quit [Remote host closed the connection]
RTG` has quit [Ping timeout: 252 seconds]
mattwashere has joined #ruby
unscrimped has quit [Ping timeout: 240 seconds]
nachoman has joined #ruby
RTG` has joined #ruby
tulak has joined #ruby
sandstrom has joined #ruby
tulak has quit [Ping timeout: 240 seconds]
ItSANgo__ has joined #ruby
ur5us has joined #ruby
ur5us has quit [Remote host closed the connection]
ItSANgo has quit [Ping timeout: 250 seconds]
<nachoman> hi everyone
<nachoman> any recommended book to learn ruby internals?
<baweaver> Ruby under a microscope
<baweaver> or just start digging into the C source
<nachoman> hmm maybe a combination?
ledestin has joined #ruby
chouhoulis has joined #ruby
ledestin has joined #ruby
rbennacer has joined #ruby
terminalrecluse has quit [Remote host closed the connection]
vigilate has joined #ruby
mattwildig has joined #ruby
statelesscode has joined #ruby
chouhoulis has quit [Ping timeout: 240 seconds]
rbennacer has quit [Ping timeout: 240 seconds]
<eam> nachoman: just start digging in and asking questions right here
dcunit3d has quit [Ping timeout: 250 seconds]
mattwildig has quit [Ping timeout: 240 seconds]
kp666 has quit [Read error: Connection reset by peer]
<nachoman> ok thanks eam, baweaver :)
cabargas has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kp666 has joined #ruby
<flughafen> morning
rodolfowtf has quit [Read error: Connection reset by peer]
yardenbar has joined #ruby
neanderslob has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
sandstrom has quit [Quit: My computer has gone to sleep.]
RTG` has quit [Ping timeout: 276 seconds]
elaptics`away is now known as elaptics
minimalism has quit [Quit: minimalism]
RTG` has joined #ruby
hanmac has quit [Quit: Leaving.]
neanderslob has joined #ruby
htmldrum has quit [Ping timeout: 252 seconds]
minimalism has joined #ruby
blackmes1 has joined #ruby
rahult_ has quit [Ping timeout: 255 seconds]
solars has joined #ruby
ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
counterapparatus has left #ruby ["all"]
uglybandersnatc- has joined #ruby
blackmes1 has quit [Ping timeout: 255 seconds]
Guest34101 has joined #ruby
norc has joined #ruby
uglybandersnatch has quit [Ping timeout: 244 seconds]
floatingpoint has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nachoman has quit []
yardenbar has quit [Ping timeout: 244 seconds]
Guest34101 has quit [Ping timeout: 255 seconds]
Flakes has quit [Ping timeout: 250 seconds]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
solars has quit [Quit: WeeChat 0.4.2]
minimalism has quit [Quit: minimalism]
charliesome has joined #ruby
solars has joined #ruby
Dimik has quit [Ping timeout: 240 seconds]
TomyLobo has joined #ruby
gizless has joined #ruby
yfeldblum has joined #ruby
yfeldblum has quit [Remote host closed the connection]
yfeldblum has joined #ruby
gizmore has quit [Ping timeout: 255 seconds]
charliesome has quit [Ping timeout: 250 seconds]
charliesome has joined #ruby
ur5us has joined #ruby
codecop has joined #ruby
xfbs has quit []
y2mq37 has joined #ruby
uglybandersnatch has joined #ruby
minimalism has joined #ruby
Mon_Ouie has joined #ruby
uglybandersnatc- has quit [Ping timeout: 240 seconds]
hahuang65 has joined #ruby
charlemagne has joined #ruby
yardenbar has joined #ruby
AlexRussia has quit [Ping timeout: 248 seconds]
amclain has quit [Quit: Leaving]
tjbiddle has joined #ruby
moeabdol2 has joined #ruby
eregi has quit [Ping timeout: 248 seconds]
vigilate has quit [Ping timeout: 252 seconds]
uglybandersnatch has quit [Ping timeout: 240 seconds]
skade has joined #ruby
TomyLobo has quit [Ping timeout: 240 seconds]
amincd has joined #ruby
mark1 has joined #ruby
<amincd> hi, how would I write efficient code to sum the values in a range of array elements, e.g. sum(array[4] .. array[25])
fedexo has quit [Ping timeout: 250 seconds]
<amincd> so I want to add up the value of each element between array[4] and array[25]
trosborn has joined #ruby
<amincd> I'm a Ruby beginner, so don't know all the ways to manipulate arrays
chouhoulis has joined #ruby
andikr has joined #ruby
<amincd> in python it's sum(array[4:26])
aganov has joined #ruby
<amincd> anything similar in Ruby?
skade has quit [Quit: Computer has gone to sleep.]
firstdayonthejob has joined #ruby
soLucien has joined #ruby
chouhoulis has quit [Ping timeout: 250 seconds]
charlemagne has quit [Remote host closed the connection]
<Garo_> amincd: how about [1,2,3,4,5,6,7][1..3].inject(0) {|sum,x| sum + x}
DoubleMalt has joined #ruby
<Garo_> so the [1..3] takes a sub array returning [2,3,4]
charlemagne has joined #ruby
<Garo_> amincd: then the inject() is used to evaluate an accumulator
nando293921 has quit [Ping timeout: 244 seconds]
<amincd> Garo_: thanks I'll check it out
<soLucien> what does @app.call(something)
<soLucien> actually
<soLucien> what does the @ mean
<soLucien> i forgot
<soLucien> i understand the rest of the synthax
william3 has joined #ruby
vigilate has joined #ruby
skade has joined #ruby
skade has quit [Client Quit]
<soLucien> @something - what is it ?
<soLucien> array ?
<soLucien> ok it's the class instance variable
<soLucien> right ?
kspencer has joined #ruby
charlemagne has quit [Ping timeout: 244 seconds]
Rodya_ has quit [Quit: Leaving...]
soLucien has quit [Read error: Connection reset by peer]
johnny56 has quit [Ping timeout: 264 seconds]
skade has joined #ruby
despai has joined #ruby
konsolebox has joined #ruby
johnny56 has joined #ruby
skade has quit [Client Quit]
KensoDev has joined #ruby
despai has quit [Client Quit]
blackmes1 has joined #ruby
vdamewood has joined #ruby
toretore has joined #ruby
devbug has quit [Read error: Connection reset by peer]
ferr has joined #ruby
baweaver has quit [Remote host closed the connection]
pawnbox has quit [Remote host closed the connection]
lubekpl has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pawnbox has joined #ruby
petrichorx has quit [Quit: Connection closed for inactivity]
rdark has joined #ruby
blackmes1 has quit [Ping timeout: 244 seconds]
mondok has joined #ruby
devbug has joined #ruby
SCHAAP137 has joined #ruby
william3 has quit [Remote host closed the connection]
jas02 has joined #ruby
PlasmaStar has quit [Ping timeout: 240 seconds]
thevaliantx has joined #ruby
smolny has joined #ruby
rohit_ has joined #ruby
duncannz has quit [Remote host closed the connection]
gregf has quit [Ping timeout: 244 seconds]
ta__ has quit [Remote host closed the connection]
<flughafen> can i print the current node htmlin capybara? i want to just print out what it sees's the within("#foo")
sandstrom has joined #ruby
aufi has joined #ruby
TDJACR has quit [Ping timeout: 250 seconds]
charliesome has quit [Ping timeout: 240 seconds]
trosborn has quit [Quit: trosborn]
verde has joined #ruby
Guest34101 has joined #ruby
pawnbox has quit [Remote host closed the connection]
charlemagne has joined #ruby
pawnbox has joined #ruby
quazimodo has quit [Ping timeout: 276 seconds]
blackms has quit [Remote host closed the connection]
pawnbox has quit [Remote host closed the connection]
vigilate has quit [Ping timeout: 240 seconds]
TDJACR has joined #ruby
ropeney has joined #ruby
pawnbox has joined #ruby
TomyWork has joined #ruby
Anderson69s has joined #ruby
rohit_ has quit [Quit: Leaving]
rohit_ has joined #ruby
Xeago has joined #ruby
PlasmaStar has joined #ruby
Guest34101 has quit [Ping timeout: 255 seconds]
eregi has joined #ruby
vigilate has joined #ruby
pawnbox has quit [Remote host closed the connection]
krzkrzkrz has quit [Ping timeout: 250 seconds]
tulak has joined #ruby
pawnbox has joined #ruby
charliesome has joined #ruby
Pumukel has joined #ruby
steffkes has joined #ruby
steffkes has joined #ruby
eregi has quit [Ping timeout: 248 seconds]
tulak has quit [Ping timeout: 276 seconds]
rohit_ has quit [Quit: Leaving]
skade has joined #ruby
rohit_ has joined #ruby
anisha has joined #ruby
elaptics is now known as elaptics`away
sepp2k has joined #ruby
ur5us has quit [Remote host closed the connection]
firstdayonthejob has quit [Ping timeout: 244 seconds]
krzkrzkrz has joined #ruby
verde has quit [Remote host closed the connection]
rbennacer has joined #ruby
charlemagne has quit [Remote host closed the connection]
stannard has joined #ruby
lubekpl has joined #ruby
charlemagne has joined #ruby
mattwildig has joined #ruby
mikecmpbll has joined #ruby
jenrzzz has joined #ruby
mikecmpbll has quit [Client Quit]
rbennacer has quit [Ping timeout: 240 seconds]
Hounddog has joined #ruby
uglybandersnatch has joined #ruby
charlemagne has quit [Ping timeout: 252 seconds]
stannard has quit [Ping timeout: 252 seconds]
thevaliantx has quit [Quit: Leaving]
mattwildig has quit [Ping timeout: 240 seconds]
bweston92 has joined #ruby
jimcroft has joined #ruby
xfbs has joined #ruby
xfbs has quit [Client Quit]
vigilate has quit [Ping timeout: 276 seconds]
TDJACR has quit [Ping timeout: 250 seconds]
elaptics`away is now known as elaptics
blackmes1 has joined #ruby
TDJACR has joined #ruby
djbkd has quit [Quit: My people need me...]
baweaver has joined #ruby
uglybandersnatch has quit [Ping timeout: 244 seconds]
contrastingly has joined #ruby
mikecmpbll has joined #ruby
Anderson69s has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jenrzzz has quit [Ping timeout: 244 seconds]
UtkarshRay has quit [Ping timeout: 240 seconds]
blackmes1 has quit [Ping timeout: 250 seconds]
amincd has quit [Quit: Page closed]
baweaver has quit [Ping timeout: 250 seconds]
Xeago has quit [Read error: Connection reset by peer]
steffkes has quit [Ping timeout: 276 seconds]
rohit_ has quit [Ping timeout: 244 seconds]
ta_ has joined #ruby
Kang0 has joined #ruby
Jex has joined #ruby
Jex is now known as Guest16913
xfbs has joined #ruby
blackmes1 has joined #ruby
Xeago has joined #ruby
shredding has joined #ruby
Kang0 has quit [Client Quit]
blackgoat has joined #ruby
laith has joined #ruby
tmsbrg has joined #ruby
<tmsbrg> where is gem's log file?
Guest16913 has quit [Ping timeout: 240 seconds]
william3 has joined #ruby
<tmsbrg> gem tells me "Check the mkmf.log file for more details."
<tmsbrg> and doesn't tell me where it is...
<adaedra> Gist the entire output.
<tmsbrg> wait, I found it
ben_ has joined #ruby
lipoqil has joined #ruby
<tmsbrg> that was stupid, it failed to build native extensions because I have clang instead of GCC, and apparently libffi is hard-programmed to use GCC
william3 has quit [Remote host closed the connection]
Macaveli has joined #ruby
last_staff has joined #ruby
william3 has joined #ruby
<apeiros> sombody got general experiences to share with regards to ruby + mssql? (asking over in #rubyonrails too)
noodle has quit [Ping timeout: 240 seconds]
<adaedra> ?somebody
<ruby[bot]> adaedra: I don't know anything about somebody
<adaedra> damn.
<adaedra> :p
eregi has joined #ruby
<apeiros> context: there's a push from our parent company to move to mssql and we're trying to come up with pros&contras
f4cl3y has joined #ruby
charlemagne has joined #ruby
djellemah_ has joined #ruby
mlehrer has joined #ruby
william3_ has joined #ruby
eregi has quit [Ping timeout: 240 seconds]
william3 has quit [Read error: Connection reset by peer]
aupadhye has quit [Quit: Leaving]
anisha_ has joined #ruby
charlemagne has quit [Remote host closed the connection]
charlemagne has joined #ruby
pietr0 has quit [Ping timeout: 240 seconds]
william3_ has quit [Remote host closed the connection]
p1k_ has quit [Ping timeout: 244 seconds]
anisha has quit [Ping timeout: 252 seconds]
william3 has joined #ruby
FooMunki has joined #ruby
bruce_lee has quit [Remote host closed the connection]
charlemagne has quit [Ping timeout: 255 seconds]
Mon_Ouie has quit [Ping timeout: 250 seconds]
dlitvak has joined #ruby
FooMunki has quit [Quit: FooMunki]
FooMunki has joined #ruby
pawnbox has quit [Remote host closed the connection]
gregf has joined #ruby
pawnbox has joined #ruby
steffkes has joined #ruby
steffkes has joined #ruby
contrastingly has quit [Ping timeout: 276 seconds]
bruce_lee has joined #ruby
moeabdol2 has quit [Quit: WeeChat 1.4]
Gnut has quit [Ping timeout: 276 seconds]
skade has quit [Quit: Computer has gone to sleep.]
araujo has joined #ruby
araujo has joined #ruby
steffkes has quit [Ping timeout: 244 seconds]
skade has joined #ruby
moeabdol has joined #ruby
mostlybadfly has quit [Quit: Connection closed for inactivity]
bruce_lee has quit [Ping timeout: 248 seconds]
bruce_lee has joined #ruby
ropeney has quit [Quit: Leaving]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kLOs has joined #ruby
kLOs has left #ruby [#ruby]
xfbs has quit []
gizless has quit [Quit: KVIrc 4.9.1 Aria http://www.kvirc.net/]
<chridal> Good morning guys
nerium has joined #ruby
uglybandersnatch has joined #ruby
kp666 has quit [Remote host closed the connection]
skade has quit [Quit: Computer has gone to sleep.]
<nerium> How do I create a hash from the Hash class (without using the {}-syntax) ? I’ve tried using Hash.new { a: 2 }, but that only returns an empty hash.
<chridal> I need a really high speed async worker queue. Have an API written in Rails, and we're spinning of a worker to hit Pusher (an external API that broadcasts our chat messages over TCP sockets to the clients). The thing is though that the jobs seem to not only take a time to finish, but also to just be taken off the queue
<adaedra> nerium: why?
<nerium> adaedra: Inheritence
<chridal> And also; what could be a good way of benchmarking this?
<adaedra> nerium: why are you inheriting from Hash?
<nerium> adaedra: b/c I need to add some custom methods to it
<adaedra> You should wrap it rather than inherit from it
<nerium> Wrap?
<nerium> Care to elaborate?
<adaedra> Have a custom class which has the hash as instance variable
<nerium> Why would I do that?
william3 has quit [Ping timeout: 255 seconds]
xfbs has joined #ruby
<nerium> That sounds like a bad implementation as I would have to deligate every method from my custom class to the hash
BrunoSaboia has joined #ruby
<nerium> Which would yeild the exact same impl. as just using inheritance, except for all the code
william3 has joined #ruby
<ddv> nerium: Use inheritance only when there are clearly related reusable pieces of code that fit under a single common concept or if you have to because of something you're using.
<nerium> ddv: Its the exact same instance of Hash, just with a cuple of custom methods. That’s all. It’s should still act as a hash
BSaboia has quit [Ping timeout: 240 seconds]
<nerium> Anyhow, how do I create a hash from scratch with init data, like I would expect .new(..) would do
noodle has joined #ruby
jurisdiction has joined #ruby
johndoetest494 has quit [Quit: Leaving.]
<nerium> ddv: How would you solve this problem?
Contigi has quit [Ping timeout: 248 seconds]
platzhirsch has joined #ruby
<adaedra> Looks like a fit for refinements, no?
<ddv> nerium: first explain why you even want to do this
arian0n has joined #ruby
<nerium> ddv: That’s a bit out of the scope for this question. Just imagen that I’ve to add a method to an arbirtary class. (I’ve already solved the original problem, so I’m just curoius on how you would solve it)
<nerium> adaedra: That’s way to overkill
<adaedra> ?xy
<ruby[bot]> it seems like you are asking for a specific solution to a problem, instead of asking about your problem. This often leads to bad solutions and increases frustration for you and those trying to help you. More: http://meta.stackexchange.com/a/66378
platzhirsch has left #ruby [#ruby]
pietr0 has joined #ruby
<nerium> yeah, I know about xy, I’ve been in this comunity for over 10 years
<norc> Refine, inherit or use Delegate.
<norc> Those are your basic three options to do what you want.
<norc> Each with its own up and downsides.
<apeiros> inherit: only from classes you own.
<apeiros> simple rule :)
<nerium> apeiros: Okay, that’s an interesting argument
<chridal> Currently having this issue: on a Rails API but we're hitting external APIs, and it needs to happen really fast. Currently using Resque-workers but it's slow. How to benchmark this? Also do I look at solving this with EventMachine, or even Node?
<nerium> apeiros: or view
<apeiros> was just gonna say that I didn't yet make an argument for that view ;-D
<nerium> apeiros: So what would you do if you needed to add a custom method to say the String class?
<apeiros> nerium: with ruby? I'm experimenting with refinements atm
<ddv> chridal: #rubyonrails, also you asked the same question earlier this week right?
<apeiros> nerium: though one question before that would be whether String is actually the right place and why
<chridal> ddv: No. I was talking about it in #RubyOnRails indeed. Started on a rewrite in Node
<chridal> But the thing is that there is nothing like Rails in Node, and the code becomes messy nearly right away
<ddv> chridal: 'really fast' is kind of subjective
<chridal> So I am trying to look at it again
<ddv> chridal: come up with a baseline first
<chridal> ddv: How about this; spending 50-150 ms to take the worker off the queue is totally unacceptable
BtcBen has quit [Ping timeout: 244 seconds]
<chridal> ddv: I need messages that come into the API to have hit the external Pusher nearly instantly
<chridal> Talking less than 10 ms here preferably
<ddv> chridal: why are you backgrounding this?
<nerium> apeiros: That’s sound scarry for someone getting passed the object. Say you add a method to String, make the object public. I twould look really strange if it suddendlty contained a custom method even tho it’s still a string.
<chridal> ddv: Because we need to hit an external API, and I don't want to block the entire API while we do so.
<nerium> Inheritence seams like a much better fit
workmad3 has joined #ruby
<apeiros> nerium: talking about refinements?
<nerium> apeiros: Yes
<apeiros> nerium: that's not how they work
<apeiros> refinements are lexically scoped
<apeiros> i.e. the method exists at the place where you say you need it
<apeiros> so nothing scary about it. you know you're adding the methods for that piece of code only.
<nerium> apeiros: But if you create an object inside your ”space”, and make this object public, wont it still contain your method?
<apeiros> no
<apeiros> that's the point
<nerium> I trought this only applied to the class
<apeiros> extend would do that. refining doesn't
<nerium> not the instances of the object
<apeiros> it applies to everything you refine.
<nerium> In this case I’m making the object public
<apeiros> yes. and the method will only be available to code within the block where you have `using MyStringRefinement`
<apeiros> nowhere else
Guest34101 has joined #ruby
<chridal> ddv: The use case is this: We have iOS clients that are connected via a websocket to Pusher (a SaaS). We hit their REST API and it then gets broadcasted to all the listening devices. The user calls POST /message from the client, we spawn a worker which then hits their REST API. We can't block on the main thread, so we need to do it in a worker.
tvw has joined #ruby
<ddv> chridal: why not writing directly to redis?
<chridal> We also need for this to be nearly instant on the Rails side, because we might also have 50-200 ms on reaching Pusher and the messages actually being propagated to the listeners.
<chridal> ddv: Instead of spawning the worker ddv?
<ddv> yes
<nerium> apeiros: Okay
<nerium> Thanks for the clearification
<chridal> ddv: Hm. That's an idea. How much time do you think we can save? Is there a big overhead with .perform_later?
<chridal> Which also brings me to the next part; I need some good way of benchmarking this
<chridal> So that I can make an informed decision on what we can save on moving to something like Node.
<chridal> Sidekiq says on their GH that someone achieved 50,000 workers per second with that lib
<ddv> chridal: well are you using the paid version?
f4cl3y has quit [Remote host closed the connection]
<chridal> ddv: We could be, if it would save us that time.
<chridal> Rewriting in Node is really a last last last option
<apeiros> chridal: 50kw/s might not be relevant to you though, since your problem seems to be the latency
<ddv> anyways this is way offtopic in here
<apeiros> at least from the quick glance through your convo
jurisdiction has quit [Ping timeout: 250 seconds]
<chridal> ddv: why is it off-topic though? it's not about Rails
<chridal> It's about a Ruby gem.
<ddv> nope
dlitvak has quit [Ping timeout: 244 seconds]
<ddv> chridal: You are using this with Rails
Guest34101 has quit [Ping timeout: 252 seconds]
<chridal> It's sort of in the gray zone.
<chridal> But alright.
<chridal> apeiros: Any thoughts about how I should be looking at this to achieve the needed performance gain though?
tulak has joined #ruby
dlitvak has joined #ruby
<chridal> Just really struggling to get a conversation about it going in Rails.
<apeiros> ddv: IMO it's fine. but it's borderline.
<apeiros> chridal: don't use workers, use threads?
eregi has joined #ruby
<ddv> he asked the same questions in #rubyonrails and because he couldn't get satisyfing answers there and answers that align with his opinions he asks them here
<chridal> apeiros: So run it on the JVM?
<chridal> ddv: It's more like the people in Rails don't think it's enough about Rail
<chridal> s
<chridal> since it's really not about Rails
<chridal> It's about an async worker queue.
<apeiros> not necessary. IO based threading is fine in ruby. unless there's lots of CPU involved in getting the data to Pusher
<chridal> apeiros: So the GIL won't interfere with this?
<apeiros> but yes, jruby will help with threading and will quite likely get more performance
<apeiros> chridal: GIL will interfere, but I'd assume not as much, since your problem is probably mostly IO related
ropeney has joined #ruby
<chridal> apeiros: It is indeed an IO problem, because I won't do "any processing at all" before shipping it off.
<apeiros> but unless you have something which stops you from using jruby, I'd try with that. as it can parallelize more than just IO
<chridal> I just need to hit that API async
<chridal> apeiros: well, I really don't want to get into deploying the JVM if I can avoid it.
<apeiros> yeah, then spin off a thread, hit the API and let the thread die. threads in ruby are not that expensive.
<apeiros> just make sure you box them proberly with regards to exceptions (by default, threads die silently)
blaxter has joined #ruby
terlar has joined #ruby
<chridal> Very interesting. Any litterature I should dive into before going down this route?
tulak has quit [Ping timeout: 240 seconds]
Axy has joined #ruby
Axy has joined #ruby
romancpodolski has joined #ruby
<romancpodolski> Hey folks, anyone using ruby for machinelearing?
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
eregi has quit [Ping timeout: 276 seconds]
<apeiros> chridal: not aware of any. it'll be mostly the code you already have in your worker, but called within a new thread.
<chridal> Yea, just thinking about stuff to be weary about now that I'm doing this in a threaded manner.
Mia has quit [Ping timeout: 244 seconds]
<apeiros> Thread.new begin; existing_call; rescue => e; handle_exception(e); end # that's the basic setup
p1k_ has joined #ruby
<chridal> Alright. I'll do some benchmarking and see what kinds of speed improvements we get with this setup.
<chridal> Thanks a lot.
<apeiros> yw
<apeiros> lets hope it's useful ;-)
<chridal> Indeed. After spending the last 4 days in Node I was really grateful when I returned to Ruby + Rails.
<chridal> :-D
<apeiros> chridal: overhead to spawn a thread seems to be around 0.05ms in ruby 2.3 on my machine (2.3GHz i7 on OSX 10.11)
<apeiros> the rest is a question of whether those threads will slow your app down too much or not
charliesome has joined #ruby
<chridal> apeiros: Indeed. Which is the scary question because it'll be hard to measure.
uglybandersnatch has quit [Ping timeout: 244 seconds]
<apeiros> shouldn't be too difficult
<chridal> I also thought about writing a microservice with EventMachine and then hit the Rails API for persistence and just hit Pusher from there
<apeiros> that'd be an option, yes
<apeiros> that'd remove the latency
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<chridal> and it'd decouple it entirely from the app server
<chridal> or not entirely obviously
<chridal> because of the persistence
<chridal> but the spawning of threads etc.
<apeiros> spawning of threads has the advantage of being rather simple to implement
steffkes has joined #ruby
<apeiros> the one thing with regards to rails you have to be aware is connection pooling if you do any db work in the new thread
<chridal> Yea. If we go for the microservice that means another load balancer and servers behind there which need to support continuous deployment and their own staging area which means at least 3 servers + load balancer
mattwildig has joined #ruby
<apeiros> you have to check out a new connection and check it in again at the end (best in the ensure of your exception boxing of the thread)
<apeiros> I can gist you the code of our Thread.with_connection if you wish. it handles both boxing and checking out/in a connection. would have to do after lunch, though :)
djellemah_ has quit [Ping timeout: 250 seconds]
blaxter has quit [Ping timeout: 276 seconds]
kirillzh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<chridal> apeiros: That would be really awesome!
<apeiros> ah, the other thing you have to be aware: if any of those threads is running while you kill the server, the "job" is lost unless you manually build countermeasures. but that might be arbitrarily complex no matter which solution you choose.
quazimodo has joined #ruby
<apeiros> chridal: ok. bing me in ~1h if I haven't gisted until then. laters! :)
<chridal> apeiros: Cheers! Later :-)
p1k_ has quit [Ping timeout: 240 seconds]
rbennacer has joined #ruby
mattwildig has quit [Ping timeout: 240 seconds]
ziyadb has joined #ruby
romancpodolski has quit [Quit: leaving]
sandstrom has quit [Quit: My computer has gone to sleep.]
dlitvak_ has joined #ruby
Timberwo|f has quit [Ping timeout: 250 seconds]
davidsong has joined #ruby
dlitvak has quit [Ping timeout: 252 seconds]
<davidsong> hello ruby. I have a newb question. I have an array of arrays, [[1,2,3], [3,4,5]] and want to replace all the 3s with zeros
<davidsong> is there a "nice" way to do this? rather than in the bloated style of other languges where you explicitly iterate over creating a new list of lists
tmsbrg has quit [Remote host closed the connection]
laith has quit [Quit: Leaving.]
maikowblue has joined #ruby
pandaant has joined #ruby
<Ox0dea> davidsong: https://eval.in/525147
devbug has quit [Ping timeout: 240 seconds]
blaxter has joined #ruby
mhoungbo has joined #ruby
pawnbox has quit [Remote host closed the connection]
Snowy has joined #ruby
rodfersou has joined #ruby
tris has quit [Ping timeout: 250 seconds]
trinaldi has joined #ruby
blackmes1 has quit [Ping timeout: 244 seconds]
<davidsong> woa, thanks
Xeago has quit [Remote host closed the connection]
Outlastsheep has quit [Ping timeout: 255 seconds]
pawnbox has joined #ruby
<Ox0dea> Sure thing.
<Ox0dea> That pattern extends well to most other Enumerable methods as well.
<Ox0dea> s/map/select/g and you've got #deep_select. :)
f4cl3y has joined #ruby
tjbiddle has quit [Quit: tjbiddle]
tris has joined #ruby
<adaedra> Ox0dea: why use `Array ===` and not `Enumerable ===`, or maybe even `e.respond_to? :map`?
<Ox0dea> adaedra: Yeah, that last one's pretty good.
<adaedra> And put deep_map in Enumerable, maybe
krzkrzkrz has quit [Ping timeout: 240 seconds]
Guest34101 has joined #ruby
<Ox0dea> adaedra: That didn't go so well: https://eval.in/525152
<adaedra> fun
ocbtec has joined #ruby
<adaedra> Ox0dea why does it do that?
<Ox0dea> adaedra: I don't know. :/
<adaedra> Interesting
<Ox0dea> I would expect a flat Array of size two.
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Ox0dea> Hash#each yields a pair, and if you're mapping that to some value...
<adaedra> aha
BSaboia has joined #ruby
dlitvak_ has quit [Ping timeout: 250 seconds]
rbennace_ has joined #ruby
rbennacer has quit [Ping timeout: 248 seconds]
<apeiros> chridal: https://gist.github.com/apeiros/6f139cf06ad36e023f46 - it's a contraction of two things in our codebase, but I think I merged the two correctly ;-)
<apeiros> you need to implement ExceptionHandler.handle yourself. f.ex. we send the exception to errbit there and log it via Rails.logger.error
BrunoSaboia has quit [Ping timeout: 244 seconds]
BSab has joined #ruby
dlitvak has joined #ruby
joonty has joined #ruby
BSaboia has quit [Ping timeout: 244 seconds]
xfbs has quit []
<adaedra> Ox0dea: thinking about it, is it not expected result, after all?
<Ox0dea> adaedra: https://eval.in/525160
Couch has joined #ruby
<Ox0dea> That "feels" wrong, but I can't put my finger on it.
<adaedra> Feels so, but is it really?
steffkes has quit [Ping timeout: 240 seconds]
<adaedra> Otherwise, you have to provide a special deep_map for hash
nachoman has joined #ruby
Coldblackice_ has quit [Ping timeout: 240 seconds]
puerile has joined #ruby
<adaedra> mh, last example is indeed weird
<adaedra> didn't we find a special thing about Hash in here recently? Something about two method reacting differently about parameters
jimcroft_ has joined #ruby
<Ox0dea> Yeah, #select and #reject return Hashes. :/
eregi has joined #ruby
jimcroft_ has quit [Client Quit]
<Ox0dea> Hash doesn't play well with being Enumerable sometimes.
jimcroft has quit [Quit: Textual IRC Client: www.textualapp.com]
toretore has quit [Ping timeout: 240 seconds]
jimcroft_ has joined #ruby
<Ox0dea> Pseudo-multiple return values also came into it.
jimcroft_ has quit [Client Quit]
rbennace_ has quit [Ping timeout: 252 seconds]
jimcroft has joined #ruby
<adaedra> Ox0dea: anyway, here's your chance: https://rubygems.org/search?utf8=%E2%9C%93&query=deep_map
<Ox0dea> Ew, that's so clinical.
<adaedra> :p
rbennacer has joined #ruby
puerile has quit [Client Quit]
steffkes has joined #ruby
blackmes1 has joined #ruby
cyclonis has quit [Ping timeout: 240 seconds]
Gasher has joined #ruby
<Gasher> hi everyone, do you know where I can find a channel for Crystal language? I'm asking here because it's a Ruby-like language
eregi has quit [Ping timeout: 240 seconds]
<adaedra> ?crystal
<ruby[bot]> adaedra: I don't know anything about crystal
<adaedra> You don't?
<adaedra> Gasher try #crystal or #crystal-lang, I don't remember
segy has quit [Ping timeout: 252 seconds]
<Gasher> it was #crystal-lang , I just checked #crystal , thanks
<adaedra> !fact mk crystal Please join #crystal-lang for help with it.
<ruby[bot]> adaedra: I will remember that crystal is Please join #crystal-lang for help with it.
<Ox0dea> Join #crystal-lang for help with #crystal-lang?
<adaedra> UUUUH
* adaedra wakes up.
<Gasher> ?crystal
<ruby[bot]> Please join #crystal-lang for help with it.
<Gasher> works :)
<shevy> haha
<shevy> jhass changed #ruby-lang into #ruby but the crystal folks still don't have #crystal
<adaedra> !fact ed crystal Please join #crystal-lang for help with the Crystal programming language.
<ruby[bot]> adaedra: I stand corrected that crystal is Please join #crystal-lang for help with the Crystal programming language.
nachoman has quit []
<shevy> ?ruboto
<adaedra> Thanks for the notice, Ox0dea.
<adaedra> shevy: register.
<Ox0dea> adaedra: Thanks for loving clarity. :)
<shevy> adaedra I want ruboto back :(
<adaedra> Why?
<shevy> cuz rubot was kind and not as snobbish
<shevy> erm ruboto
<Ox0dea> It does feel like something's missing, oddly enough.
tulak has joined #ruby
<Ox0dea> ruboto just had more "character".
<shevy> hehe
<shevy> we are legend-building now :) like the day when ruboto helped an old lady over a street
marr has joined #ruby
<Ox0dea> "This book is dedicated, in respect and admiration, to the spirit that lives in the computer."
<manveru> Gasher: next time: `/msg alis list *crystal*`
<manveru> :)
<Gasher> manveru; who/what is alis?
<manveru> another bot
<manveru> it has a list of all channels
jottr_ has joined #ruby
laith has joined #ruby
<manveru> it's an official freenode bot like chanserv, because they had to disable /list
<Gasher> I see, thanks
<_mak> hi all
<_mak> how can I do this: puts t.tds(:id => 'descr')[0].text if t.tds(:id => 'descr').exist? else "doesn't exist"
shredding has quit [Ping timeout: 250 seconds]
evidex has joined #ruby
ldnunes has joined #ruby
laith has quit [Client Quit]
<apeiros> _mak: `desc = t.tds(:id => 'descr'); puts desc ? desc[0].text : "doesn't exist"`
laith has joined #ruby
<apeiros> or `desc.exist?` instead of bare `desc` if that was meant literally.
mdw has joined #ruby
<Ox0dea> Or `desc[0]&.text || "doesn't exist"`.
<manveru> that fails if desc is nil
<apeiros> right. assuming they use ruby 2.3
Gasher has left #ruby ["Leaving"]
<Ox0dea> manveru: `desc&.[](0)&.text`, then. :P
<Ox0dea> (Gross.)
<_mak> I use 2.2
<apeiros> actually, `desc&.[](0).text || …` following their code
<_mak> haha
* _mak is trying to not get lost
<apeiros> _mak: you should specify your ruby version if you don't use the newest.
<_mak> sorry
<manveru> come on, say 1.6.4
DaniG2k has joined #ruby
<_mak> so it would be: descr = t.tds(:id => 'descr'); desc.exist? desc[0].text : "doesn't exist" and then I can simply puts descr
dlitvak has quit [Ping timeout: 250 seconds]
<manveru> no
zcreative has joined #ruby
<apeiros> a) misses a ?, b) no, because ?: doesn't change anything, it has a return value
<manveru> where does that exist? method come from anyway
<apeiros> the construct I used was `puts condition ? when_true : when_false`
<_mak> watir-webdriver
<_mak> it will check if the element exists on the page
<manveru> so tds never returns nil?
<adaedra> watir love
<adaedra> (sorry)
dlitvak has joined #ruby
yfeldblum has quit [Remote host closed the connection]
<_mak> manveru: it will return falst
<_mak> false
<_mak> if not found
<manveru> i mean the tds method
<manveru> not the exist? method
<_mak> it will never be nil
<manveru> ok
<manveru> desc = t.tds(:id => 'descr'); desc = desc.exist? ? desc[0].text : "doesn't exist"
<manveru> so you want that
<_mak> nice
<_mak> descr = t.tds(:id => 'descr').exist? ? desc[0].text : ""
<manveru> nope
<_mak> :(
<adaedra> shorter is not always better.
<manveru> desc isn't defined, so you can call [0] on it
mondok has quit [Quit: Leaving]
<manveru> *can't
steffkes has quit [Ping timeout: 276 seconds]
<_mak> hmm
<manveru> if you want to make it really short, you could do: `(desc = t.tds(:id => 'descr')).exist? ? desc[0].text : "doesn't exist"`
<manveru> but then apeiros will have to kill a kitten
<_mak> haha
<adaedra> ?cat
<ruby[bot]> adaedra: I don't know anything about cat
<_mak> I won't then
<adaedra> ?cats
<apeiros> whaaaat?!?
<ruby[bot]> Cats!
<_mak> ok, I'll use the long way
<_mak> thanks guys
<adaedra> you're slow, ruby[bot]
mhoungbo has quit [Ping timeout: 244 seconds]
charliesome has joined #ruby
<chridal> apeiros: Thanks! Will have a look.
<manveru> /rename ruby[bot] roboto
blackmes1 has quit [Ping timeout: 244 seconds]
<chridal> Out of curiousity: what are you using threads for in your application?
<apeiros> roboto? yet another nick?
platzhirsch has joined #ruby
<manveru> ruboto exists already, no?
<apeiros> ruboto is owned by me
<apeiros> the name
<apeiros> or the nick
<apeiros> chridal: exchange webservice (ews)
terlar has quit [Ping timeout: 252 seconds]
<manveru> so i suggest roboto :)
<chridal> apeiros: But what does the code in the thread do?
<apeiros> add calendar entries f.ex.
<apeiros> ews is sometimes horribly slow for us (~2s for a response)
steffkes has joined #ruby
steffkes has quit [Changing host]
steffkes has joined #ruby
<apeiros> i.e. we add the entry to our db, spin up a thread to push it over to exchange/outlook and then update the db entry with the exchange id for synchronization
<apeiros> rails can return & render without having to wait for snaily exchange
krzkrzkrz has joined #ruby
ElFerna has joined #ruby
psyq is now known as psyq_work
steffkes has quit [Ping timeout: 248 seconds]
DaniG2k has quit [Quit: leaving]
JohnBat26 has joined #ruby
millerti has joined #ruby
Xeago has joined #ruby
Xeago has quit [Remote host closed the connection]
<chridal> Aha! Sounds much like our use case
<chridal> What kind of penalty are you taking for spinning up that thread?
<chridal> Is this an often performed action?
resin has quit [Quit: leaving]
xfbs has joined #ruby
dlitvak has quit [Remote host closed the connection]
jeanlinux has joined #ruby
dlitvak has joined #ruby
UtkarshRay has joined #ruby
DaniG2k has joined #ruby
<apeiros> chridal: as per my measurement above - it's about 0.05ms on my machine. don't know how long the connection clearing takes.
mhoungbo has joined #ruby
p1k_ has joined #ruby
kobain has joined #ruby
platzhirsch has quit [Quit: Leaving.]
Xeago has joined #ruby
sluukkonen has joined #ruby
xfbs has quit []
platzhirsch has joined #ruby
dstarh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Xeago has quit [Remote host closed the connection]
quazimodo has quit [Ping timeout: 250 seconds]
stevemackinnon has quit [Remote host closed the connection]
Xeago has joined #ruby
dlitvak has quit [Ping timeout: 252 seconds]
ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dlitvak has joined #ruby
Guest34101 has quit [Read error: Connection reset by peer]
skade has joined #ruby
johnmilton has joined #ruby
duckpuppy has joined #ruby
eregi has joined #ruby
kp666 has joined #ruby
kp666 has quit [Max SendQ exceeded]
sgambino has joined #ruby
xfbs has joined #ruby
kp666 has joined #ruby
kp666 has quit [Remote host closed the connection]
openstruct has joined #ruby
Xeago has quit [Remote host closed the connection]
dlitvak_ has joined #ruby
askhat has joined #ruby
askhat has left #ruby [#ruby]
dlitvak has quit [Ping timeout: 276 seconds]
eregi has quit [Ping timeout: 240 seconds]
_mak has left #ruby [".."]
nolsen has quit [Excess Flood]
bahar has quit [Changing host]
bahar has joined #ruby
joonty has quit [Ping timeout: 240 seconds]
sandstrom has joined #ruby
Xeago has joined #ruby
lessless has joined #ruby
armyriad has quit [Ping timeout: 255 seconds]
<lessless> guys, do you know any better way to copy a part of the hash than @params.select { |k| %w(a b c d e f g h j k l m n o).include?(k) }
<shevy> he used guys!!!
armyriad has joined #ruby
<apeiros> lessless: check the code of activesupport's Hash#slice
<lessless> apeiros, thank you!
mattwildig has joined #ruby
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<silverdust> How may I check if a method exists in a struct?
OSIRIS_ has joined #ruby
<havenwood> silverdust: members.include? :meth
<silverdust> I have [['id',5],['name','Joe']].to_h.to_struct for example which gives #<struct id=5, name="Joe"> . Can I do the_struct.include? :name
<silverdust> okay
mattwildig has quit [Ping timeout: 252 seconds]
bronson_ has joined #ruby
<silverdust> havenwood: I get false when I check for name and name exists in it
dlitvak_ has quit [Remote host closed the connection]
sgambino has joined #ruby
sdothum has joined #ruby
<silverdust> i = [['id',5],['name','Joe']].to_h.to_struct; i.include? :name #=> false
dlitvak has joined #ruby
bronson has quit [Ping timeout: 240 seconds]
<ljarvis> silverdust: where does to_struct come from?
<ljarvis> also, as havenwood mentioned, it's .members.include?
<silverdust> I use hashtostruct gem
<ljarvis> heh ok
<silverdust> It works with .members.include? I didn't know he meant members as a method of my struct
<ljarvis> >> Struct.new(:name).new("foo").members
<ruby[bot]> ljarvis: # => [:name] (https://eval.in/525352)
<silverdust> Thanks
<ljarvis> aye
armyriad has quit [Ping timeout: 240 seconds]
<ljarvis> also, presumably that gem just does Struct.new(*keys).new(*values), is it really worth it?
armyriad has joined #ruby
platzhirsch has quit [Quit: Leaving.]
steffkes has joined #ruby
steffkes has joined #ruby
<ljarvis> oh dear, nope.. it's much worse than that
<apeiros> Hash#to_struct… I don't even…
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
william3 has quit [Remote host closed the connection]
<apeiros> ljarvis: WHY DO YOU DO THIS TO ME?!?
<ljarvis> i had to go through it :(
<apeiros> I'm with data on this one - how the F is shared suffering half the suffering?!? it's double the suffering!
<ljarvis> :D
<ljarvis> silverdust: please dont use that gem
<ljarvis> I mean, unless you *really* know you need it
* ljarvis stares at to_obj
<apeiros> wrong anchors for a start
<ljarvis> also, lul at inject instead of map
<apeiros> (tru|fals)e # optimize!
<apeiros> old me would probably have committed the same crime.
<ljarvis> [+-]?\d+ :|
<silverdust> ljarvis: I wouldn't if I knew a better way to convert my hash to struct
atmosx has joined #ruby
charlemagne has joined #ruby
UtkarshRay has quit [Remote host closed the connection]
mxn has joined #ruby
<silverdust> I have very little expertise and it was my first solution to what I wanted
<ljarvis> silverdust: like this: Struct.new(*hash.keys.map(&:to_sym)).new(hash.values) -- now you can customise it to how you really want
johnnyt has quit [Ping timeout: 240 seconds]
<ljarvis> *hash.values *
<ljarvis> ****
<ljarvis> then add some error checking so it doesn't blow up
<mxn> hi! i'm trying to install the librarian-puppet gem on a debian stable system, which fails cause the ruby version is too old for one of the dependencies. i'd like to figure out where exactly the issue is, so i would love to print a gem dependency tree
unl0ckd has quit [Ping timeout: 240 seconds]
<mxn> 'gem dependency librarian-puppet' gives me something useful, but if i attempt the same for each of the dependencies, it fails for some, e.g. rspec
<mxn> oh, 'of an installed gem', got it. so, how do i do this for non-installed gems?
joonty has joined #ruby
fourq is now known as fourq|away
fourq|away is now known as fourq
<apeiros> ljarvis: you can drop the to_sym if you add a nil as first arg
<ljarvis> ah yeah i guess it expects a symbol for the constant?
<mxn> or in other ways: is there many a way i can make gem install an older version of a dependency (which still is new enough to fit the dependency), which will not require a ruby that's not available for debian stable?
<apeiros> Struct.new(nil, *hash.keys).new(*hash.values)
<havenwood> >> h = {aim: true}; Struct.new(nil, *h.keys).new(*h.values)
<ruby[bot]> havenwood: # => #<struct aim=true> (https://eval.in/525354)
<apeiros> ljarvis: na, if the first value is a string, it'll use that as a constant. with a symbol it won't use it for the constant. sad case of argument overloading
<apeiros> or whatever the proper term is
<ljarvis> derp
sandstrom has quit [Quit: My computer has gone to sleep.]
<flughafen> hurr durr
<silverdust> ljarvis: can you please help me understand what the role of * there is. I tried omitting it and name was nil, id had both values in it as an array
bronson_ has quit [Remote host closed the connection]
<havenwood> >> h = {aim: true}; Struct.new('StructStructStruct', *h.keys).new(*h.values)
<ruby[bot]> havenwood: # => #<struct Struct::StructStructStruct aim=true> (https://eval.in/525357)
william3 has joined #ruby
<adaedra> re
blackgoat has quit [Quit: WeeChat 1.4]
synthroid has joined #ruby
platzhirsch has joined #ruby
dlitvak_ has joined #ruby
p7r_ has left #ruby [#ruby]
<Ox0dea> >> require 'ostruct'; h = {aim: true}; OpenStruct.new h
<ruby[bot]> Ox0dea: # => #<OpenStruct aim=true> (https://eval.in/525359)
<Ox0dea> (Just kidding.)
codecop has quit [Remote host closed the connection]
last_staff has quit [Quit: last_staff]
bruce_lee has quit [Ping timeout: 244 seconds]
bruce_lee has joined #ruby
bruce_lee has quit [Changing host]
bruce_lee has joined #ruby
Rickmasta has joined #ruby
dlitvak has quit [Ping timeout: 240 seconds]
sudoubuntu has joined #ruby
sandstrom has joined #ruby
william3 has quit [Ping timeout: 248 seconds]
<havenwood> >> h = {aim: true}; Object.const_set(:Person, Struct.new(*h.keys)).new(*h.values)
<ruby[bot]> havenwood: # => #<struct Person aim=true> (https://eval.in/525360)
platzhirsch has left #ruby [#ruby]
Kang0 has joined #ruby
UtkarshRay has joined #ruby
OSIRIS_ has quit [Ping timeout: 250 seconds]
Jardayn has joined #ruby
<Ox0dea> >> c = Class.new; [c.name, C = c, c.name]
<ruby[bot]> Ox0dea: # => [nil, C, "C"] (https://eval.in/525363)
moos3 has joined #ruby
Guest34101 has joined #ruby
johnnyt has joined #ruby
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
unl0ckd has joined #ruby
unl0ckd has quit [Read error: Connection reset by peer]
xfbs has quit []
xfbs has joined #ruby
william3 has joined #ruby
HalcyonicStorm has joined #ruby
jottr_ is now known as jottr
BSab has quit [Quit: Leaving]
vdamewood has quit [Quit: Life beckons.]
aryaching has joined #ruby
dstarh has joined #ruby
DaniG2k has quit [Ping timeout: 244 seconds]
terlar has joined #ruby
laith has quit [Quit: Leaving.]
Snowy has quit [Remote host closed the connection]
eregi has joined #ruby
mostlybadfly has joined #ruby
DaniG2k has joined #ruby
fostertheweb has joined #ruby
mattwashere has quit [Remote host closed the connection]
laith has joined #ruby
dlitvak has joined #ruby
blackmes1 has joined #ruby
ben_ has quit [Ping timeout: 248 seconds]
Xeago has quit [Remote host closed the connection]
ben_ has joined #ruby
binaryplease has joined #ruby
verde has joined #ruby
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
dlitvak_ has quit [Ping timeout: 248 seconds]
eregi has quit [Ping timeout: 276 seconds]
BSaboia has joined #ruby
ropeney has joined #ruby
Jeremy1023 has joined #ruby
pawnbox has quit [Remote host closed the connection]
nerium has quit [Quit: nerium]
steffes has joined #ruby
Xeago has joined #ruby
ropeney has quit [Client Quit]
malconis has joined #ruby
malconis has quit [Remote host closed the connection]
alexishuard has joined #ruby
htmldrum has joined #ruby
ben_ has quit [Ping timeout: 244 seconds]
malconis has joined #ruby
ben_ has joined #ruby
linduxed has quit [Ping timeout: 276 seconds]
djellemah_ has joined #ruby
djellemah has quit [Ping timeout: 255 seconds]
Snowy has joined #ruby
pocketpr_ has joined #ruby
pocketpr_ has quit [Client Quit]
skade has quit [Quit: Computer has gone to sleep.]
goodcodeguy has joined #ruby
htmldrum has quit [Ping timeout: 255 seconds]
DaniG2k has quit [Ping timeout: 276 seconds]
skade has joined #ruby
Outlastsheep has joined #ruby
pawnbox has joined #ruby
zcreative has quit [Quit: (null)]
ben_ has quit [Ping timeout: 240 seconds]
y2mq37 has quit [Ping timeout: 250 seconds]
millerti has joined #ruby
Xeago has quit [Remote host closed the connection]
ben_ has joined #ruby
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
fostertheweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
fostertheweb has joined #ruby
ropeney has joined #ruby
atmosx has quit [Quit: This is aparting message!]
Xeago has joined #ruby
ramortegui has joined #ruby
ben_ has quit [Ping timeout: 248 seconds]
JohnBat26 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
quaristice has joined #ruby
zotherstupidguy has joined #ruby
griffindy has joined #ruby
<zotherstupidguy> running a rake test, will load and use bundle Gemfile?
DaniG2k has joined #ruby
davidsong has quit [Quit: Page closed]
konsolebox has quit [Quit: Leaving]
ben_ has joined #ruby
<havenwood> zotherstupidguy: bundle exec rake
quaristice has quit [Read error: Connection reset by peer]
anisha_ has quit [Quit: Leaving]
jgpawletko has joined #ruby
xfbs has quit []
mattwildig has joined #ruby
bronson has joined #ruby
godzillaenlacasa has joined #ruby
dlitvak_ has joined #ruby
stannard has joined #ruby
Sminthurus has joined #ruby
charlemagne has quit [Remote host closed the connection]
dlitvak has quit [Ping timeout: 255 seconds]
bronson has quit [Ping timeout: 240 seconds]
sgambino has joined #ruby
goodcodeguy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
chouhoulis has joined #ruby
stevemackinnon has joined #ruby
xapak has joined #ruby
stevemackinnon has quit [Read error: Connection reset by peer]
AlexRussia has joined #ruby
goodcodeguy has joined #ruby
stevemackinnon has joined #ruby
stevemac_ has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nogic has joined #ruby
segy has joined #ruby
ElFerna has quit [Ping timeout: 240 seconds]
DaniG2k_ has joined #ruby
DaniG2k_ has quit [Client Quit]
stevemackinnon has quit [Ping timeout: 240 seconds]
MrDoctor has joined #ruby
<MrDoctor> Hi guys, I am in fedora 23 and trying to set up postgresql for a rails application. I can connect to my created database using psql fine, but I am encountering problems from both my rails application and from pgadminIII. It's gives me an ident authentication failed arror.
Timberwo|f has joined #ruby
stevemac_ has quit [Ping timeout: 250 seconds]
DaniG2k has quit [Ping timeout: 252 seconds]
hxegon has joined #ruby
dlitvak has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
<ghr> MrDoctor you;'re probably better off in #rubyonrails, but have a read of http://www.depesz.com/2007/10/04/ident/
<MrDoctor> Thank you very much ghr.
Kang0 has quit [Remote host closed the connection]
dlitvak_ has quit [Ping timeout: 244 seconds]
andikr has quit [Remote host closed the connection]
Kang0 has joined #ruby
mattwashere has joined #ruby
xfbs has joined #ruby
aegis3121 has joined #ruby
mxn has left #ruby [#ruby]
andyrs has joined #ruby
andyrs has quit [Remote host closed the connection]
sankaber has joined #ruby
Guest85 has joined #ruby
kies^ has quit [Ping timeout: 248 seconds]
Kensei has quit [Ping timeout: 255 seconds]
timwis has joined #ruby
<MrDoctor> It did the trick ghr, thanks a lot.
jeanlinu_ has joined #ruby
<ghr> great :)
eregi has joined #ruby
aryaching has quit [Read error: No route to host]
dopamean_ has quit [Ping timeout: 276 seconds]
Ishido has joined #ruby
kerunaru has joined #ruby
ElFerna has joined #ruby
Kang0 has quit [Remote host closed the connection]
Kang0 has joined #ruby
dlitvak_ has joined #ruby
jeanlinux has quit [Ping timeout: 276 seconds]
aryaching has joined #ruby
eregi has quit [Ping timeout: 240 seconds]
dlitvak has quit [Ping timeout: 250 seconds]
djellemah_ is now known as djellemah
AlexRussia has quit [Quit: WeeChat 1.4-dev]
uglybandersnatch has joined #ruby
rbennacer has quit [Remote host closed the connection]
jeanlinux has joined #ruby
jimcroft has quit []
jimcroft has joined #ruby
jimcroft_ has joined #ruby
uglybandersnatch has quit [Ping timeout: 276 seconds]
jeanlinu_ has quit [Ping timeout: 240 seconds]
A124 has quit [Ping timeout: 250 seconds]
Xeago has quit [Remote host closed the connection]
mary5030 has quit [Remote host closed the connection]
rahulprabhakar has joined #ruby
binaryplease has quit [Quit: WeeChat 1.4]
platzhirsch has joined #ruby
binaryplease has joined #ruby
steffes has quit [Remote host closed the connection]
terlar has quit [Ping timeout: 248 seconds]
<timwis> Hey guys, I've submitted a simple pull request to Jekyll but I'm a JS dev so I'm not as familiar with ruby best practices. What's the best way to write "select where there's a string match or, if it's an array, where the array contains the string" (at the moment tests are failing because `.include?` throws an error against a boolean value) https://github.com/jekyll/jekyll/pull/4555/files
millerti has quit [Quit: Textual IRC Client: www.textualapp.com]
rahulprabhakar has left #ruby [#ruby]
xfbs has quit []
sandstrom has joined #ruby
ta_ has quit [Remote host closed the connection]
rbennacer has joined #ruby
rahulprabhakar has joined #ruby
<adaedra> what part of this causes you trouble?
DmitryBochkarev has joined #ruby
MrDoctor has quit [Quit: Konversation terminated!]
<adaedra> To test an object type, you have is_a?, example: `foo.is_a?(Array)`
<timwis> oh, not .kind_of?(Array) ?
<adaedra> both works, but iirc kind_of? is deprecated
<adaedra> also, use ||, not or
<adaedra> &ri Object#kind_of?
rahulprabhakar has left #ruby [#ruby]
steffes has joined #ruby
<timwis> adaedra, a few things that are rather elementary, i'm afraid. if it were a language with which i'm comfortable, I'd do a few things: create a variable for the item_property(object, property) bit so as not to execute that function twice (and increase readability), and I'd wrap the second conditional in some kind of test that prevents it throwing an error if it's not being done on an array
<timwis> adaedra: yeah, i was reviewing github's ruby style guide and noticed they recommend ||
MrDoctor has joined #ruby
kerunaru has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<adaedra> or/and have different precedence than ||/&& and it is a bit confusing. You usually want ||/&&
binaryplease1 has joined #ruby
<timwis> The reason I thought to ask in here is because a few lines up they do that "input - input.values if input.is_a?(Hash)" stuff, and the "if xxx" suffix is something I've only seen in ruby (and I think python), so I wasn't sure if there were a clever or "more best practice" way to do the test i mentioned above
platzhirsch has left #ruby [#ruby]
mor789 has joined #ruby
platzhirsch has joined #ruby
<shevy> timwis .respond_to? is also a possibility
<adaedra> Don't be afraid to spread it on multiple lines if you need to, shorter is not always better, timwis
<mor789> How does the method_missing method gets a method name as an argument after overriding it?
<ljarvis> timwis: why not just have item_property return an array and remove the first condition?
rbennacer has quit [Ping timeout: 240 seconds]
<timwis> adaedra, and from what I've gathered, I remove the brackets and use "do" and "end" to do that, right? (forgive the elementary question)
nando293921 has joined #ruby
tulak has quit [Read error: Connection reset by peer]
<adaedra> not compulsory, but yeah, I think community guidelines do that
<timwis> ljarvis: I *assume* that item_property is a utility used throughout the codebase, and doing that would be a more significant pull request than they probably want on a project this big
<timwis> but worth verifying
tulak has joined #ruby
<ljarvis> timwis: yep fair enough, otherwise you could just do: Array(item_property(object, property).to_s).include?(value.to_s)
thevaliantx has joined #ruby
<timwis> okay i'll find out what respond_to? does shevy thanks for the tip
binaryplease1 has quit [Client Quit]
binaryplease has quit [Ping timeout: 240 seconds]
mattwashere has quit []
<ljarvis> you really don't need type checks here fwiw
TomPeed has joined #ruby
binaryplease has joined #ruby
<timwis> ljarvis, but .to_s ... wouldn't that be converting it to a string?
<ljarvis> imo: Array(foo).include?(bar) reads better than foo == bar || (foo.is_a?(Array) && foo.include?(bar))
<ljarvis> timwis: yes, before you create the array
Jeremy1023 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
konsolebox has joined #ruby
<ljarvis> but anyway, I'm confused. You don't control item_property() but your code assumes it *might* be an array, why is that?
<mor789> How does the method_missing method gets a method name as an argument after overriding it?
<timwis> i agree about readability, but ... well i suppose if I leave off .to_s, I could do what you've suggested. Wrapping it in Array() will still work if it's already an array?
dstarh has quit [Quit: Textual IRC Client: www.textualapp.com]
pdoherty has joined #ruby
Flakes has joined #ruby
<ljarvis> mor789: can you give an example? that's "just how it works"
<ljarvis> timwis: correct, Array(["..."]) #=> ["..."]
Kensei has joined #ruby
Kensei has joined #ruby
<timwis> ljarvis, the pull request is enhancing the "where" liquid filter. currently it only works on string comparisons (where: foo, "bar") when foo is a string. the pull request enables it to work when foo is an array, to test if it contains the string "bar"
jimcroft_ has quit []
jimcroft_ has joined #ruby
Damien___ has joined #ruby
<ljarvis> timwis: I don't think that's right. Your code assumes item_property() could return an array, not that value is an array
<ljarvis> so maybe it's backwards?
<ljarvis> in which case, Array(value).include?(item_property...) would definitely be the best way to write it
nando293921 has quit [Ping timeout: 240 seconds]
<timwis> Your logic confused me a bit just now, but your conclusion I agree with
<mor789> o=Object.new, def o.method_missing(m,*args) "xxxxxxx #{m}" end, o.some_method
<timwis> I'll try that. thanks ljarvis
PsionTheory has joined #ruby
<ljarvis> mor789: yes, that's some code. Do you have a question about it?
william3 has quit [Remote host closed the connection]
<silverdust> what's the name given to things like this exists?
<mor789> How does the method take the method name "some_method" as an argument when its overrided
whippythellama has joined #ruby
<ljarvis> mor789: by design, if a method does not exist when being called, it calls method_missing (which, by default, just raises an exception)
<silverdust> I mean with the question mark at the end
<ljarvis> silverdust: huh?
rahulprabhakar has joined #ruby
<silverdust> methods like that
Flakes has quit [Ping timeout: 244 seconds]
<ljarvis> silverdust: oh.. you can just assume that they're used to check the truthyness of something
<silverdust> methods that always return a boolean value
<ljarvis> no
<ljarvis> that's not quite right
idefine has joined #ruby
<ljarvis> the idea is that you shouldn't care about the return value, except in a condition. Because it should return truthy or falsy (that is, nil/false for falsy, and anything else for truthy)
<silverdust> I've heard someone call them by a name before but I can't remember what that is
<workmad3> silverdust: predicate methods
jeanlinux has quit [Remote host closed the connection]
<mor789> ljarvis: but the method was override
<ljarvis> wat
rahulprabhakar has left #ruby [#ruby]
aegis3121 has quit [Ping timeout: 248 seconds]
<ljarvis> I've never heard of it called a predicate method but yeah
<silverdust> okay so can I store a value directly in a something like a preidcate method? i.e exists? = true just to mock data
bronson has joined #ruby
jeanlinux has joined #ruby
<ljarvis> silverdust: methods dont store things, they do stuff and return values
<silverdust> *predicate method
nofacade has joined #ruby
<ljarvis> silverdust: so yes, you can write a method which just returns true
<ljarvis> def exists?() true end
<timwis> ljarvis: here's what I ended up with FYI, and tests are passing. https://gist.github.com/timwis/8d2078c62cd3a0b0d8ed Thanks again. I can't really tell if there's anything "non-rubyist" in there but hopefully it's simple enough that I've avoided any of those mistakes
rbennacer has joined #ruby
konsolebox has quit [Quit: Leaving]
<mor789> ljarvis: if you override the method_missing method how does it refers to its origin method?
quakephil has quit [Ping timeout: 252 seconds]
<silverdust> okay thanks
<ljarvis> timwis: your first expression is already covered by the second expression.
william3 has joined #ruby
aegis3121 has joined #ruby
<timwis> :O no way
<ljarvis> mor789: by calling super
<timwis> I think I can see what you mean
<ljarvis> timwis: well, not *exactly* but you should consense it imo
<timwis> but Array(input_property) doesn't cast input_property to a string
<ljarvis> but again, I'm confused. you mentioned that you don't control what item_property returns, but your code assumes it could return either an array or a string
<ljarvis> did it always return maybe an array?
<mor789> ljarvis: I didn't call super in my method, so how does it take a method name as an argument?
jottr has quit [Ping timeout: 248 seconds]
<ljarvis> mor789: because that's how method_missing works, when it's called, it sends the method name as the first argument
<ljarvis> I don't know what you want from me :(
ljames has quit [Ping timeout: 260 seconds]
<timwis> ljarvis: It could return a boolean or number as well (some of the tests use booleans)
<timwis> I think item_property is just getting a property from a hash
<ljarvis> timwis: right, so previously it just called .to_s on *everything*?
<timwis> yes
Xeago has joined #ruby
dhollinger has joined #ruby
<ljarvis> right ok thanks, then I would: Array(input_property).map(&:to_s).include?(value.to_s)
Deck` has joined #ruby
<ljarvis> but what you have is fine really
bronson has quit [Ping timeout: 276 seconds]
jottr has joined #ruby
x77686d has joined #ruby
quakephil has joined #ruby
<mor789> ljarvis: when you override the method_missing method you change its content and put your's
twintail has quit [Remote host closed the connection]
<ljarvis> mor789: correct.
<timwis> ah, clever ljarvis. since it was already casting everything to a string, this is no worse
krobzaur_ has joined #ruby
decoponio has joined #ruby
<timwis> and i can keep it a slim one-liner (which I know is not always the best)
<timwis> (but simpler for a pull request)
zast has joined #ruby
jeanlinu_ has joined #ruby
krobzaur has joined #ruby
saneax is now known as saneax_AFK
<Deck`> is there more elegant way to write this https://dpaste.de/EjPu ? it's about creating hash with optional params
<mor789> ljarvis: so how does it take a method name as an argument after rewriting the method?
idefine has quit [Remote host closed the connection]
<ljarvis> Deck`: I wouldn't use tap myself, but I think it's fine
Damien___ has quit [Ping timeout: 240 seconds]
<ljarvis> mor789: because when method_missing is trigged, it *always* sends the method name as an argument
bricker has quit [Ping timeout: 252 seconds]
<Deck`> ljarvis: so you would add new variable inside map and then set optional arguments?
<ljarvis> Deck`: I would yeah
thevaliantx has quit [Quit: Leaving]
<Deck`> thanks
rippa has joined #ruby
steffkes has quit [Ping timeout: 240 seconds]
jeanlinux has quit [Ping timeout: 250 seconds]
failshell has joined #ruby
<mor789> ljarvis: Thank you! is it unique feature to the "method_missing" method or all the methods act like this?
fostertheweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Deck`> ljarvis: I disliked this approach as I should explicitly say 'entity' in the end to return
steffes has quit [Remote host closed the connection]
dopamean_ has joined #ruby
<ljarvis> mor789: it's very much unique, method_missing is used in core Ruby C code. There are other types of unique methods similar to this
rbennacer has quit [Remote host closed the connection]
<ljarvis> Deck`: yep, I prefer that. It's down to taste, go with tap if you prefer it
Helheim has quit [Ping timeout: 250 seconds]
dopamean1 has joined #ruby
floatingpoint has joined #ruby
swills has joined #ruby
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<ljarvis> I only use tap when creating a new block helps code readability or maintenance in some way
sgambino has joined #ruby
<mor789> ljarvis: thanks a lot! :)
fostertheweb has joined #ruby
rodfersou is now known as rodfersou|lunch
steffkes has joined #ruby
griffindy has quit [Read error: Connection reset by peer]
htmldrum has joined #ruby
Helheim has joined #ruby
diegoviola has joined #ruby
fostertheweb has quit [Client Quit]
x77686d has quit [Remote host closed the connection]
dopamean_ has quit [Ping timeout: 240 seconds]
Hammy_Work has joined #ruby
sankaber has quit [Remote host closed the connection]
matled- has joined #ruby
justbleed has joined #ruby
x77686d has joined #ruby
sankaber has joined #ruby
Xeago has quit [Read error: Connection reset by peer]
Kensei has quit [Ping timeout: 252 seconds]
fostertheweb has joined #ruby
Helheim has quit [Max SendQ exceeded]
minimalism has quit [Ping timeout: 276 seconds]
Mojo_Nixon has joined #ruby
pawnbox_ has joined #ruby
Helheim has joined #ruby
aufi has quit [Remote host closed the connection]
rbennacer has joined #ruby
gix- has joined #ruby
gix has quit [Disconnected by services]
symm- has joined #ruby
ljames has joined #ruby
ElFerna_ has joined #ruby
babblebre has joined #ruby
PsionTheory has quit [Read error: Connection reset by peer]
Xeago has joined #ruby
Helheim has quit [Max SendQ exceeded]
aufi has joined #ruby
ElFerna has quit [Ping timeout: 240 seconds]
TomPeed has quit [Read error: Connection reset by peer]
\13k has joined #ruby
\13k has joined #ruby
\13k has quit [Ping timeout: 240 seconds]
ruurd has quit [Excess Flood]
matled has quit [Ping timeout: 240 seconds]
lianj has quit [Ping timeout: 240 seconds]
funnel has quit [Ping timeout: 240 seconds]
Platini has quit [Ping timeout: 240 seconds]
\13k has quit [Changing host]
pawnbox has quit [Ping timeout: 240 seconds]
infernix has quit [Ping timeout: 240 seconds]
matled- is now known as matled
justbleed is now known as tommy_p
lianj has joined #ruby
lianj has joined #ruby
lianj has quit [Changing host]
funnel has joined #ruby
FIGO_ has joined #ruby
Helheim_ has joined #ruby
ruurd has joined #ruby
anagha_ has joined #ruby
p1k_ has quit [Read error: Connection reset by peer]
Helheim_ has quit [Max SendQ exceeded]
goodcodeguy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tulak has quit [Remote host closed the connection]
goodcodeguy has joined #ruby
tulak has joined #ruby
<anagha_> gtgt
dlitvak has joined #ruby
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<anagha_> hello
FIGO_ is now known as Platini
<anagha_> is #RubyonRails the irc channel for rails?
<ljarvis> yes
<apeiros> yes
<apeiros> anagha_: why do you ask?
<anagha_> But I am not able to ping on the channel
<apeiros> you need to be registered
<ljarvis> you need to register your nick
Helheim has joined #ruby
cdg has joined #ruby
<apeiros> ?register
<ruby[bot]> you need to be identified with NickServ, see /msg NickServ HELP
<ddv> anyone know why this matches? '2016-02-25T15:20:12.0_' =~ /\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{1,3}/
<ddv> with rubular is doesn't match
<ddv> :/
<apeiros> ddv: why should it not match?
<ljarvis> add to reasons I don't use rubular
<apeiros> >> '2016-02-25T15:20:12.0_'[/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{1,3}/]
<ruby[bot]> apeiros: # => "2016-02-25T15:20:12.0" (https://eval.in/525466)
amargherio has joined #ruby
<apeiros> that's what it matches. the why is IMO obvious, if not, please specify what part you have trouble with.
dlitvak_ has quit [Ping timeout: 252 seconds]
<ddv> apeiros: well becaus of the underscore, I thought I specified \d{1,3} at the end
cabargas has joined #ruby
<apeiros> ddv: you have no anchors
jottr has quit [Ping timeout: 244 seconds]
goodcodeguy has quit [Client Quit]
<ljarvis> there is no endzz
<ddv> aaah
themsay has joined #ruby
<ddv> thanks :)
<apeiros> the \.\d{1,3} happily matches the ".0"
goodcodeguy has joined #ruby
<apeiros> common regex mistake no. 2
<ddv> probably
<ljarvis> apeiros: what's 1? using regex in the first place? :)
lessless has quit [Ping timeout: 255 seconds]
<apeiros> yupp
Helheim has quit [Max SendQ exceeded]
eregi has joined #ruby
<ljarvis> aye
<ljarvis> which reminds me
blandflakes has joined #ruby
<ljarvis> ddv: Time.parse
* apeiros smacks ljarvis with a large clock
<apeiros> Time.strptime
<ljarvis> a.. clock
<ljarvis> right right strptime
<ddv> I tried using Time.iso8601
<apeiros> or in this case, probably Time…
<apeiros> right. that's what I wanted to say :)
<ddv> but I don't want to use time zone designations
Helheim has joined #ruby
<ljarvis> ddv: always use strpftime, since you seem to know the format
<ddv> yeah seems way better
<apeiros> ddv: they're not required by iso8601
<ljarvis> time zones
<ljarvis> not even once
<ddv> apeiros: I know
<apeiros> no time zone == local time zone
rbennacer has quit [Remote host closed the connection]
<apeiros> ddv: then I don't understand your problem with iso8601
<apeiros> ljarvis: lucky guy if you so far managed to not having to deal with timezones
goodcodeguy has quit [Client Quit]
kies^ has joined #ruby
htmldrum has quit [Ping timeout: 252 seconds]
<apeiros> though, timezones are easy. dst and leapseconds are hard.
<ljarvis> apeiros: ... I work on chronic
Helheim has quit [Max SendQ exceeded]
<apeiros> ljarvis: hah!
<apeiros> ljarvis: I work on chronos.js again
<ljarvis> :)
<apeiros> almost completed. but parser still missing - in case you're interested :D
<ljarvis> I am not, thank you ;)
<apeiros> too sad. interested in sharing your experience, though?
<apeiros> in order for me to avoid the pitfalls you already identified…
<ddv> apeiros: I was using Time.iso8601 to check if a string conforms to iso8601
idefine has joined #ruby
<yorickpeterse> apeiros: 1) don't write a natural time parser
<yorickpeterse> ᕕ(ᐛ)ᕗ
Helheim has joined #ruby
<ljarvis> I could be, I've actually been working on a chronic replacement for.. 2/3 years now. I have a different branch with 3 different parsing methods, none of which I'm completely sold on
eregi has quit [Ping timeout: 240 seconds]
<apeiros> yorickpeterse: I want to go even further than that actually. I want to implement "data detectors"
<ljarvis> so yeah, yorickpeterse pretty much nails it
<apeiros> (find dates, locations, names in plain text)
mary5030 has joined #ruby
goodcodeguy has joined #ruby
Snowy is now known as EGGS_
mary5030 has quit [Remote host closed the connection]
terlar has joined #ruby
<apeiros> ljarvis: ok. well. I guess whenever I get to writing a natural language parser, I'll have a talk with you after having come up with something myself.
mary5030 has joined #ruby
htmldrum has joined #ruby
Helheim has quit [Max SendQ exceeded]
eregi has joined #ruby
<apeiros> though I'm a bit startled by the idea of doing this in js with its piss poor text manipulation support.
<apeiros> s/startled/scared/
<timwis> apeiros what do you mean by text manipulation support?
<timwis> have you tried template strings?
konsolebox has joined #ruby
<apeiros> timwis: I'd love to have an equivalent of StringScanner f.ex.
<apeiros> also js' regexen are a sad sad joke
<ljarvis> a custom lexer is probably just the thing you need anyway
Helheim has joined #ruby
codecop has joined #ruby
<yorickpeterse> apeiros: finding locations/names is super complex
sgambino has joined #ruby
<apeiros> yorickpeterse: fo'sure?
<yorickpeterse> really the only way you can do that is using either dictionaries (good luck with their sizes) or NLP (good luck producing good models)
<yorickpeterse> It's right up there with detecting address formats
Helheim has quit [Max SendQ exceeded]
<apeiros> timwis: I somewhat doubt that that can be even remotely efficient
dubek has quit [Ping timeout: 244 seconds]
<timwis> apeiros: forgive me, but I missed the beginning of the conversation where you said what you were trying to do, and couldn't establish it well enough by scrolling up
Helheim has joined #ruby
<apeiros> I have a vague idea how I'd port it (since I pondered), and I didn't because I doubted the possibility of doing it with sane efficiency. I never actually did the necessary checks, though.
<apeiros> timwis: no worries
eregi has quit [Ping timeout: 248 seconds]
ElFerna_ has quit [Ping timeout: 244 seconds]
chouhoulis has quit [Remote host closed the connection]
infernix has joined #ruby
MrDoctor has quit [Quit: Konversation terminated!]
chouhoulis has joined #ruby
<apeiros> yeah, as expected, StringScanner#scan in the js impl: `regexp.exec(this.getRemainder())) && matches.index === 0`
Toledo|gone has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
<apeiros> so the regex is ran against the full remainder, i.e. no chance of short-circuit when it doesn't match at start.
Helheim has quit [Max SendQ exceeded]
zotherstupidguy has quit [Quit: WeeChat 1.3]
jokester has quit [Quit: WeeChat 1.4]
<ljarvis> that across the entire source?
<ljarvis> lul
<apeiros> plus it needs to create the substring to get the remainder in the first place (this can be done reasonably efficient, though)
aufi has quit [Ping timeout: 240 seconds]
Helheim has joined #ruby
<apeiros> yeah. fine for short pieces of text. but if you want to run it against, say, a multi-page document? good luck not having an exploding running time.
adgtl has joined #ruby
<yorickpeterse> apeiros: Ragel 7 has a JS backend, you might want to just use that
rodolfowtf has joined #ruby
<apeiros> yorickpeterse: that is interesting. though ragel probably means I'd have to compile it for every language.
tjohnson has joined #ruby
<yorickpeterse> eh?
ben___ has joined #ruby
<apeiros> human language
<apeiros> like, one state machine for english, one for german etc.
<yorickpeterse> oh right
Kensei has joined #ruby
Kensei has joined #ruby
<yorickpeterse> Hm, probably
ben_ has quit [Ping timeout: 248 seconds]
<ljarvis> I hacked around with a funny (ridiculous) implementation for parsing date/times which basically normalised the string in some way, then matched the return value from a set and returned the method to parse. Now all I have to do is crowdsource formats
<apeiros> ah, right, language detection would also be part of the data detectors :) shouldn't be too hard with sampling of a short piece of the text and a bloom filter.
cjbottaro has joined #ruby
hayden_ has joined #ruby
<yorickpeterse> haha no
<yorickpeterse> it's not that easy
timwis has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<apeiros> we shall see! :D
<yorickpeterse> hi I worked on this stuff for about 3 years
<yorickpeterse> bloom filters are about as accurate as having a 4 year old do it
andikr has joined #ruby
johnny56_ has joined #ruby
idefine has quit [Remote host closed the connection]
<apeiros> yorickpeterse: did you opensource your solution?
Helheim has quit [Max SendQ exceeded]
dlitvak has quit [Remote host closed the connection]
jokester has joined #ruby
<yorickpeterse> Yes
<apeiros> the one problem I see is polyglot texts
<yorickpeterse> which is basically a wrapper around https://github.com/shuyo/language-detection made thread-safe
idefine has joined #ruby
<yorickpeterse> probably the only thing that has close to 100% accuracy
EGGS_ is now known as Snowy
rbennacer has joined #ruby
Helheim has joined #ruby
<apeiros> yorickpeterse: wait… that one works by *character frequency*?
timwis has joined #ruby
<yorickpeterse> It applies a bunch of techniques IIRC
timwis has left #ruby [#ruby]
<apeiros> hm, no, seems there's more than just single characters
<yorickpeterse> e.g. it also has a dictionary for every language for (I think) trigrams to scan for
johnny56 has quit [Ping timeout: 264 seconds]
B1n4r10 has joined #ruby
blaxter has quit [Ping timeout: 244 seconds]
<apeiros> is that library supposed to work with short texts (2, 3 words) too then? (I didn't aim that high with my approach)
Helheim has quit [Max SendQ exceeded]
<yorickpeterse> IIRC it should but the accuracy isn't always as good
ss_much has joined #ruby
<yorickpeterse> "chicken butts" gets detected as English correctly
Helheim has joined #ruby
BSaboia has quit [Ping timeout: 252 seconds]
htmldrum has quit [Ping timeout: 244 seconds]
<silverdust> shouldn't rbenv global x just switch to that version as far as I have it installed. I have 2.2.3 and trying to test 2.0.0-dev but it wouldn't leave 2.2.3
<silverdust> I never had to switch on rbenv until now
htmldrum has joined #ruby
aryaching has quit [Ping timeout: 244 seconds]
ropeney has quit [Quit: Leaving]
eregi has joined #ruby
Helheim has quit [Max SendQ exceeded]
<silverdust> oh I get it. I was in project that had it as its local had to run rbenv local
moos3 has quit [Ping timeout: 252 seconds]
<yorickpeterse> also while we're at it, there's so much BS in the NLP industry
Helheim has joined #ruby
<yorickpeterse> OMGMMGMG THIS LIBRARY HAS 99,9% ACCURACY....on the 5 sentences we tested it
jottr has joined #ruby
<apeiros> heh
<yorickpeterse> oh and it's not actually suitable for production usage because lol lets load 10GB of models into memory
<apeiros> that's actually one thing which I dislike - getting a reasonable body of text for test-cases.
rbennacer has quit [Ping timeout: 252 seconds]
<yorickpeterse> Oh you want to do constituent parsing in Dutch? Enjoy installing some random thing written in Prolog that uses an ancient version of TCL/TK
dlitvak has joined #ruby
<yorickpeterse> I can go on for a while :P
moos3 has joined #ruby
<yorickpeterse> Thankfully I don't have to deal with that any more
<yorickpeterse> now I just deal with caching issues
<apeiros> that's quite a new aspect of you yorickpeterse, never noticed before ;-p
yardenbar has quit [Ping timeout: 250 seconds]
<yorickpeterse> shush
terminalrecluse has joined #ruby
stevemackinnon has joined #ruby
rbennacer has joined #ruby
devbug has joined #ruby
konsolebox has quit [Quit: Leaving]
jeanlinu_ has quit [Remote host closed the connection]
bronson has joined #ruby
mor789 has quit [Ping timeout: 252 seconds]
stevemackinnon has quit [Read error: Connection reset by peer]
Helheim has quit [Max SendQ exceeded]
stevemackinnon has joined #ruby
idefine has quit [Remote host closed the connection]
slawrence00 has joined #ruby
mostlybadfly has quit [Quit: Connection closed for inactivity]
mark1 has quit [Remote host closed the connection]
Helheim has joined #ruby
stevemackinnon has quit [Read error: Connection reset by peer]
Gnut has joined #ruby
stevemackinnon has joined #ruby
Renich has joined #ruby
Helheim has quit [Max SendQ exceeded]
stevemackinnon has quit [Read error: Connection reset by peer]
stevemac_ has joined #ruby
dlitvak has quit [Ping timeout: 276 seconds]
polishdub has joined #ruby
rakm has joined #ruby
devbug has quit [Ping timeout: 250 seconds]
stevemac_ has quit [Read error: Connection reset by peer]
bricker has joined #ruby
<openstruct> I came across a coding challenge to update a value in a nested hash base on a bath. E.g. hash = { name: 'bob', hobbies : { baseball: {type: :activity}}} and path = 'hobbies.baseball.type'. The task was to update type to :sport.
bronson has quit [Ping timeout: 240 seconds]
idefine has joined #ruby
Helheim has joined #ruby
stevemackinnon has joined #ruby
<openstruct> I did it by splitting the path into an array of symbols and iterating over it.
blaxter has joined #ruby
<openstruct> Apparently it can be done in one line (albeit slower) but I can't seem how figure out the one liner way.
stevemackinnon has quit [Read error: Connection reset by peer]
stevemackinnon has joined #ruby
aegis3121 has quit [Ping timeout: 244 seconds]
<apeiros> openstruct: please gist your solution (just to show that you did solve it yourself)
<openstruct> Sure
Helheim has quit [Max SendQ exceeded]
htmldrum has quit [Ping timeout: 240 seconds]
Helheim has joined #ruby
mhoungbo has quit [Ping timeout: 244 seconds]
htmldrum has joined #ruby
<openstruct> Solution is a bit messy but it was my first stab at it on the fly.
<openstruct> I considered recursion but meh.
<apeiros> path.split(".")[0..-2].inject(hash) { |scope, key| scope[key.to_sym] }[path[/[^.]*\z/].to_sym] = :sport # untested, extracting the values twice is ugly but gives you a single line of code
<openstruct> Ah, yeah, I was thinking that inject would be the best route.
<apeiros> if two lines are allowed, I'd do: *base,last = path.split("."); base.inject …
<apeiros> additional note: this code fails horribly if the path doesn't actually exist :)
<apeiros> (which is why I wouldn't write code like that in anything production)
stevemackinnon has quit [Ping timeout: 252 seconds]
Helheim has quit [Max SendQ exceeded]
Guest34101 has quit [Ping timeout: 248 seconds]
<apeiros> works for your example code.
Helheim has joined #ruby
kobain has quit [Ping timeout: 260 seconds]
aegis3121 has joined #ruby
haylon has joined #ruby
<openstruct> apeiros: Cool - thanks for showing that!
<apeiros> yw
aegis3121 has quit [Client Quit]
melter has joined #ruby
treehug88 has joined #ruby
aegis3121 has joined #ruby
Helheim has quit [Max SendQ exceeded]
aganov has quit [Remote host closed the connection]
pandaant has quit [Remote host closed the connection]
Helheim has joined #ruby
marr has quit [Ping timeout: 248 seconds]
sandstrom has quit [Quit: My computer has gone to sleep.]
ElFerna_ has joined #ruby
synthroid has quit [Remote host closed the connection]
idefine has quit [Remote host closed the connection]
Helheim has quit [Max SendQ exceeded]
ljames has quit [Ping timeout: 260 seconds]
dlitvak has joined #ruby
voxxit has quit [Ping timeout: 240 seconds]
Helheim has joined #ruby
idefine has joined #ruby
Xeago has quit [Ping timeout: 244 seconds]
sneakerhax has quit [Quit: back later]
Helheim has quit [Max SendQ exceeded]
Xeago has joined #ruby
voxxit has joined #ruby
tristanp_ has quit [Read error: Connection reset by peer]
tristanp has joined #ruby
Helheim has joined #ruby
Helheim has quit [Max SendQ exceeded]
johnnyt has quit [Ping timeout: 240 seconds]
fostertheweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Helheim has joined #ruby
B1n4r10 has quit [Ping timeout: 244 seconds]
johnnyt has joined #ruby
jas02 has quit [Quit: jas02]
mlehrer has quit [Remote host closed the connection]
MrDoctor has joined #ruby
llua has quit [Changing host]
llua has joined #ruby
Helheim has quit [Max SendQ exceeded]
hanmac has joined #ruby
failshell has quit []
idefine has quit [Remote host closed the connection]
rkazak has quit [Ping timeout: 248 seconds]
Helheim has joined #ruby
tulak has quit [Remote host closed the connection]
idefine has joined #ruby
Guest85 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
The_Phoenix has joined #ruby
tulak has joined #ruby
adam_ is now known as adam12
idefine has quit [Remote host closed the connection]
htmldrum has quit [Ping timeout: 240 seconds]
htmldrum has joined #ruby
idefine has joined #ruby
ElFerna_ has quit [Ping timeout: 244 seconds]
idefine has quit [Remote host closed the connection]
tulak has quit [Ping timeout: 255 seconds]
ljames has joined #ruby
Don_John has joined #ruby
htmldrum has quit [Ping timeout: 240 seconds]
Guest85 has joined #ruby
htmldrum has joined #ruby
Sembei has joined #ruby
idefine has joined #ruby
SCHAAP137 has quit [Remote host closed the connection]
mattwild_ has joined #ruby
rattatmatt has joined #ruby
goodcodeguy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mattwildig has quit [Ping timeout: 248 seconds]
baweaver has joined #ruby
kobain has joined #ruby
kobain has quit [Max SendQ exceeded]
TomyWork has quit [Ping timeout: 244 seconds]
lubekpl has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kobain has joined #ruby
terlar has quit [Ping timeout: 255 seconds]
rbennacer has quit [Remote host closed the connection]
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<n1colas> o/
kobain has quit [Max SendQ exceeded]
unsymbol_ has quit [Quit: cheerio]
krobzaur_ has quit [Quit: WeeChat 1.2]
kobain has joined #ruby
unsymbol has joined #ruby
blackmes1 has quit [Ping timeout: 244 seconds]
sandstrom has joined #ruby
chouhoulis has quit [Remote host closed the connection]
laith has quit [Ping timeout: 250 seconds]
Guest85 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dgncn has joined #ruby
htmldrum has quit [Ping timeout: 248 seconds]
dlitvak has quit [Remote host closed the connection]
flughafen_ has joined #ruby
aegis3121 has quit [Ping timeout: 240 seconds]
djbkd has joined #ruby
idefine has quit [Remote host closed the connection]
Rickmasta has joined #ruby
chipotle has joined #ruby
goodcodeguy has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
idefine has joined #ruby
quakephil has quit [Ping timeout: 244 seconds]
Rickmasta has quit [Max SendQ exceeded]
htmldrum has joined #ruby
Rickmasta has joined #ruby
Rickmasta has quit [Max SendQ exceeded]
mattwild_ has quit [Ping timeout: 255 seconds]
Rickmasta has joined #ruby
mattwildig has joined #ruby
Rickmasta has quit [Max SendQ exceeded]
idefine has quit [Remote host closed the connection]
Kensei has quit [Ping timeout: 252 seconds]
Rickmasta has joined #ruby
blackmes1 has joined #ruby
Rickmasta has quit [Max SendQ exceeded]
Rickmasta has joined #ruby
Rickmasta has quit [Client Quit]
<manveru> (*h, t = path.split('.'); h).reduce(hash){|s,v| s[v.to_sym] }[t] = 'stuff'
psyq_work is now known as psyq
joonty has quit [Ping timeout: 276 seconds]
uri_ has joined #ruby
eregi has quit [Ping timeout: 248 seconds]
htmldrum has quit [Ping timeout: 276 seconds]
mfb2 has joined #ruby
baweaver has quit [Remote host closed the connection]
speakingcode has quit [Quit: leaving]
dubek has joined #ruby
synthroid has joined #ruby
synthroid has quit [Remote host closed the connection]
synthroid has joined #ruby
<manveru> now... one line is a bit harder
rbennacer has joined #ruby
eregi has joined #ruby
x77686d has quit [Quit: x77686d]
Guest85 has joined #ruby
goodcodeguy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
amclain has joined #ruby
wldcordeiro has quit [Ping timeout: 244 seconds]
linoge has joined #ruby
chipotle has quit [Quit: cheerio]
linoge has left #ruby [#ruby]
rbennace_ has joined #ruby
<manveru> eval "hash#{path.gsub(/([^.]+)\.?/, '[:\1]')} = :sport"
<manveru> don't do this at home kids
mostlybadfly has joined #ruby
rbennace_ has quit [Read error: Connection reset by peer]
dubek has quit [Ping timeout: 240 seconds]
rbennace_ has joined #ruby
rbennacer has quit [Ping timeout: 244 seconds]
TomyLobo has joined #ruby
cajone has left #ruby [#ruby]
nando293921 has joined #ruby
marr has joined #ruby
goodcodeguy has joined #ruby
dubek has joined #ruby
evidex has quit [Remote host closed the connection]
rakm has joined #ruby
<apeiros> manveru: lel, interesting solution :D
andikr has quit [Remote host closed the connection]
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
WizJin has joined #ruby
sgambino has joined #ruby
Mojo_Nixon has quit [Quit: Textual IRC Client: www.textualapp.com]
Ankhers has quit [Quit: Leaving]
<manveru> path.split('.').each_with_index.reduce(hash){|h,(p,i)| i == path.count('.') ? h[p.to_sym] = :sport : h[p.to_sym] }
<manveru> a bit longer, but also fun
_ht has joined #ruby
Pumukel has quit [Ping timeout: 276 seconds]
<manveru> alright, back to work ^^;
Deck` has quit [Ping timeout: 248 seconds]
eregi_ has joined #ruby
idefine has joined #ruby
Ankhers has joined #ruby
rodfersou|lunch is now known as rodfersou
[Butch] has joined #ruby
edwinvdgraaf has joined #ruby
chipotle has joined #ruby
mdw has quit [Quit: Sleeping Zzzzz]
moos3 has quit [Quit: leaving]
eregi has quit [Ping timeout: 250 seconds]
mattwild_ has joined #ruby
mikecmpbll has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
vondruch has quit [Ping timeout: 240 seconds]
RegulationD has quit [Remote host closed the connection]
sanguisdex has joined #ruby
ElFerna_ has joined #ruby
elifoster has joined #ruby
<sanguisdex> morning all, would someone be willing to help this self taught developer to understand and learn how to correct the rubocop offenses on https://gist.github.com/sanguis/8fea8779e61721baeb47
idefine has quit [Ping timeout: 252 seconds]
<sanguisdex> they are a little more pure computer sciency in their explanation than I am used to.
mattwildig has quit [Ping timeout: 248 seconds]
j0n3 has joined #ruby
cabargas has quit [Quit: Textual IRC Client: www.textualapp.com]
mattwild_ has quit [Ping timeout: 240 seconds]
<ljarvis> sanguisdex: the method has too many lines
ankr has joined #ruby
ankr has left #ruby ["My Mac has gone to sleep."]
iooner has quit [Ping timeout: 250 seconds]
sudoubuntu has quit [Ping timeout: 252 seconds]
<ljarvis> it seems pretty explicit about that
<ljarvis> the "branch condition" it refers to is saving your "when" branches are too long
<ljarvis> also, some of those branches do the same thing. You should extract them into different methods
_mak has joined #ruby
nisstyre_ has quit [Ping timeout: 248 seconds]
<_mak> hi there
<ljarvis> sanguisdex: not to mention case file =~ /.../ doesn't make much sense
<_mak> in a pry binding, is there a way to execute the script step by step?
rodolfowtf has quit [Quit: No Ping reply in 180 seconds.]
<apeiros> _mak: pry-byebug enables that
iooner has joined #ruby
SCHAAP137 has joined #ruby
blackmesa has joined #ruby
goodcodeguy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Snowy has quit [Quit: ragequit]
steffkes has quit [Ping timeout: 250 seconds]
<_mak> apeiros: thanks!
rdark has quit [Ping timeout: 244 seconds]
goodcodeguy has joined #ruby
rodolfowtf has joined #ruby
blackmes1 has quit [Ping timeout: 276 seconds]
Kang0 has quit [Remote host closed the connection]
frem has joined #ruby
Anderson69s has joined #ruby
<ljarvis> sanguisdex: something like https://gist.github.com/leejarvis/d3a8977f523f95eba8f6
maletor has joined #ruby
ferr has quit [Quit: WeeChat 1.4]
Kang0 has joined #ruby
mhoungbo has joined #ruby
<sanguisdex> ljarvis: reading and comprehending thanks
iooner has quit [Ping timeout: 240 seconds]
<sanguisdex> or at least trying
<Authenticator> What's a good single-file-executable Ruby packager for Linux? Currently I'm fetching Ruby 2.2+, building an RPM, including my gem, and RPMing that. It takes admin privs to install, and isn't very tidy once installed.
Anderson69s has quit [Client Quit]
yfeldblum has joined #ruby
azure32 has joined #ruby
<havenwood> Authenticator: ruby-install is one option to help you compile Ruby as preferrd and put it where you like: https://github.com/postmodern/ruby-install#readme
jimcroft has quit [Ping timeout: 255 seconds]
<havenwood> Authenticator: You can add an `-- --enable-shared` flag if you want to have the Ruby be movable.
adgtl has quit []
iooner has joined #ruby
<havenwood> Authenticator: You can install to `/usr/local` with the `--system` flag or put it wherever you like. A popular tool that will detect the default install locations and let you easily switch between Rubies is chruby: https://github.com/postmodern/chruby#auto-switching
<havenwood> (Didn't mean to link to #auto-switching.)
Xeago has quit [Remote host closed the connection]
binaryplease has quit [Ping timeout: 255 seconds]
dlitvak has joined #ruby
<havenwood> Authenticator: Or say more what you mean by "single-file-executable Ruby package"? Now that I'm rereading your question I think I misread.
Couch has quit [Ping timeout: 244 seconds]
funnel has quit [Quit: leaving]
nofacade has quit [Ping timeout: 244 seconds]
<havenwood> Authenticator: I have to relocate but my second stab at trying to answer is to take a look at Traveling Ruby: http://phusion.github.io/traveling-ruby/
f4cl3y has quit [Ping timeout: 240 seconds]
funnel has joined #ruby
rbennacer has joined #ruby
borodin has joined #ruby
LoneHerm_ has joined #ruby
rbennace_ has quit [Ping timeout: 240 seconds]
mor789 has joined #ruby
<mor789> I have an error: "test.rb:17:in `has_friend': undefined method `<<' for nil:NilClass (NoMethodError)"
nickjj has quit [Read error: Connection reset by peer]
<Zarthus> mor789: :(
rattatmatt has quit [Remote host closed the connection]
weaksauce has quit [Quit: Textual IRC Client: www.textualapp.com]
ocbtec has quit [Quit: leaving]
rbennacer has quit [Remote host closed the connection]
B1n4r10 has joined #ruby
pawnbox_ has quit [Ping timeout: 250 seconds]
Coldblackice_ has joined #ruby
<mor789> Zarthus: is there a problem with this piece of code? def has_hobby(hobby) @hobbies << hobby end def has_friend(friend) @friends << friend end
<Zarthus> mor789: there's better ways to paste code (like gist.github.com)
adgtl has joined #ruby
pawnbox has joined #ruby
rbennacer has joined #ruby
nickjj has joined #ruby
<Zarthus> the error in particular says that you are using `<<' on a value that is nil though
weaksauce has joined #ruby
<Zarthus> that's probably @friends in this case
jgpawletko has quit [Ping timeout: 240 seconds]
<Zarthus> The error also says on what line it is in the error message, so you have enough info to start finding out why it is happening
VeryBewitching has joined #ruby
wldcordeiro has joined #ruby
anagha_ has quit [Quit: Connection closed for inactivity]
<VeryBewitching> G'day folks.
dlitvak_ has joined #ruby
<mor789> Zarthus: https://gist.github.com/anonymous/0b572e856af242a9b1a5. just wanted to push an argument to array
dlitvak has quit [Ping timeout: 276 seconds]
<Zarthus> look at line 8
sepp2k has quit [Read error: Connection reset by peer]
<mor789> Zarthus: I want it to be an empty array
dlitvak_ has quit [Remote host closed the connection]
<Zarthus> mor789: I'm afraid i'm not going to spell it out for you.
<Zarthus> I've given you enough hints, take a look. What could be going wrong here?
stevemackinnon has joined #ruby
dlitvak has joined #ruby
dopamean1 has quit [Ping timeout: 244 seconds]
The_Phoenix has quit [Quit: Leaving.]
stevemackinnon has quit [Read error: Connection reset by peer]
Kensei has joined #ruby
Kensei has joined #ruby
stevemackinnon has joined #ruby
firstdayonthejob has joined #ruby
Xeago has joined #ruby
<ben___> Is there a way to achieve a similar behaviour to if/else in ERB, but with a custom function accepting a block? I want to be able to write <%= f(x) do %> blah html <% end %> and either produce the return value of f(x) or "blah html" if f(x) == nil.
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
adgtl has quit [Read error: No route to host]
sgambino has joined #ruby
blaxter has quit [Quit: foo]
HiddenSnake has joined #ruby
nisstyre_ has joined #ruby
stevemackinnon has quit [Ping timeout: 240 seconds]
adgtl has joined #ruby
goodcodeguy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
skade has joined #ruby
adgtl has quit [Client Quit]
mikecmpbll has joined #ruby
elifoster has quit [Ping timeout: 250 seconds]
bronson has joined #ruby
lsmola has quit [Ping timeout: 255 seconds]
lubekpl has joined #ruby
Gnut has quit [Ping timeout: 276 seconds]
chouhoulis has joined #ruby
chouhoulis has quit [Remote host closed the connection]
<mor789> Zarthus: im so funny...spelling error, thank you:)
chouhoulis has joined #ruby
maletor has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kerunaru has joined #ruby
william3 has quit [Remote host closed the connection]
_djbkd has joined #ruby
Gnut has joined #ruby
goodcodeguy has joined #ruby
yfeldblum has quit [Ping timeout: 276 seconds]
william3 has joined #ruby
bronson has quit [Ping timeout: 244 seconds]
ben___ has quit [Quit: Lost terminal]
adgtl has joined #ruby
adgtl has quit [Changing host]
adgtl has joined #ruby
graydot has joined #ruby
armyriad has quit [Ping timeout: 244 seconds]
dubek has quit [Ping timeout: 240 seconds]
armyriad has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
Guest85 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
william3 has quit [Ping timeout: 240 seconds]
chipotle has quit [Quit: cheerio]
ramfjord has joined #ruby
mondok has joined #ruby
<sanguisdex> I have to say 10 lines feels like a really tight squeeze for a method line limit
intrigueD has joined #ruby
* sanguisdex is used to the php freedom of vomiting up lines and lines of dirty code
Guest85 has joined #ruby
trosborn has joined #ruby
<ramfjord> What do you guys think is the cleanest way to transform a set of hash keys using another hash as the mapping?
EvilRoey has quit [Quit: Client exiting]
chipotle has joined #ruby
<ramfjord> for example: {theirs_1: 1, theirs_2: 2} <apply mapping> {theirs_1: mine_1, theirs_2: mine_2} => {mine_1: 1, mine_2: 2}
ElFerna_ has quit [Ping timeout: 240 seconds]
Xeago has quit [Read error: Connection reset by peer]
<ramfjord> I missed some colons there
<ramfjord> is map + reduce actaully the fastest way here?
devbug has joined #ruby
Xeago has joined #ruby
Zarthus_ has joined #ruby
chipotle has quit [Client Quit]
joonty has joined #ruby
psyq is now known as psyq_away
Kensei is now known as GenghisKen
Spami has joined #ruby
Weethus has joined #ruby
krzkrzkrz has quit [Ping timeout: 244 seconds]
Elysia has quit [Ping timeout: 240 seconds]
Zarthus has quit [Killed (wolfe.freenode.net (Nickname regained by services))]
Zarthus_ is now known as Zarthus
Deck` has joined #ruby
Xeago has quit [Read error: Connection reset by peer]
akem has quit [Ping timeout: 276 seconds]
Weethus is now known as Elysia
dopamean_ has joined #ruby
dlitvak_ has joined #ruby
x77686d has joined #ruby
<mondok> h2.map { |k,v| [v, h1[k]] }.to_h
dlitvak has quit [Ping timeout: 240 seconds]
eurialo has joined #ruby
mfb2 has quit [Remote host closed the connection]
RegulationD has joined #ruby
baweaver has joined #ruby
replay has joined #ruby
replay has quit [Max SendQ exceeded]
zenergi has quit [Ping timeout: 244 seconds]
bronson has joined #ruby
kerunaru has quit [Quit: Textual IRC Client: www.textualapp.com]
colegatron has quit [Ping timeout: 250 seconds]
replay has joined #ruby
DmitryBochkarev has quit [Quit: This computer has gone to sleep]
n00bdev has joined #ruby
baweaver has quit [Remote host closed the connection]
zenergi has joined #ruby
Underdogg has joined #ruby
maletor has joined #ruby
rcvalle has joined #ruby
RegulationD has quit [Ping timeout: 244 seconds]
stannard has quit [Read error: Connection reset by peer]
colegatron has joined #ruby
armyriad has quit [Ping timeout: 250 seconds]
stannard has joined #ruby
ramfjord has quit [Ping timeout: 276 seconds]
Asher has quit [Ping timeout: 276 seconds]
symm- has quit [Ping timeout: 244 seconds]
HiddenSnake has quit [Quit: HiddenSnake]
mfb2 has joined #ruby
spk has quit [Quit: ZNC - http://znc.in]
spk has joined #ruby
ixti has joined #ruby
rbennacer has quit [Remote host closed the connection]
jenrzzz has joined #ruby
spk has quit [Client Quit]
mattwildig has joined #ruby
ss_much has quit [Quit: Connection closed for inactivity]
HiddenSnake has joined #ruby
tomchapin has joined #ruby
GenghisKen has quit [Ping timeout: 244 seconds]
tomchapin has quit [Client Quit]
spk has joined #ruby
Hounddog has quit [Ping timeout: 250 seconds]
mhoungbo has quit [Ping timeout: 255 seconds]
shadoi has joined #ruby
akem has joined #ruby
sneakerhax has joined #ruby
ljames has quit [Ping timeout: 276 seconds]
uglybandersnatch has joined #ruby
sandstrom has joined #ruby
edwinvdgraaf has quit [Read error: Connection reset by peer]
edwinvdgraaf has joined #ruby
<sanguisdex> is there any way to re-factor this to make it better fit into rubocops 10 line method limit other then making what would seem to be more smaller methods that will only be used for the purpose of making things smaller. https://gist.github.com/sanguis/8fea8779e61721baeb47
Asher has joined #ruby
* adaedra don't care about these kind of rubocop offenses
psyq_away is now known as psyq
cajone has joined #ruby
<mor789> `method_missing': undefined method `public_method_defined' for Person:Class
uglybandersnatch has quit [Ping timeout: 240 seconds]
<Zarthus> mor789: you need to start asking questions, not pasting your error.
joonty has quit [Ping timeout: 276 seconds]
<Zarthus> mor789: What is going wrong, what are you expecting, why do you think it is going wrong, and where is the gist of your code?
<hanmac> adaedra: thumbs up from me! ;P
<workmad3> sanguisdex: not particularly... I'd probably ignore the offence in `get_files` as that's pretty clear IMO... I'd probably look to extract the `extract = ...` bit out into a separate method in `unpack_archive` because that feels lower-level than the other 2 parts of that method :)
<workmad3> sanguisdex: you could also consider using https://supermarket.chef.io/cookbooks/archive to give yourself a new resource type for that
<workmad3> not sure if that handles tar though
LoneHerm_ has quit [Remote host closed the connection]
Xeago has joined #ruby
<hanmac> also rubocop has a problem with "case when" so you might not get it much better :/
colegatron has quit [Read error: Connection reset by peer]
jenrzzz has quit [Ping timeout: 244 seconds]
zast has quit [Remote host closed the connection]
Dimik has joined #ruby
<mor789> The method "public_method_defined" exists in the Object class. Why do I get an error that its not? https://gist.github.com/anonymous/ea15982d040265dfc71b
platzhirsch has quit [Ping timeout: 250 seconds]
Asher has quit [Quit: Leaving.]
AlexRussia has joined #ruby
<workmad3> sanguisdex: you're likely to run into that rubocop offence a lot if you run it over chef resources, btw... the way chef resources are declared tends towards a lot of lines, but conceptually the resource and the block is '1 thing'... but rubocop doesn't understand that sort of concept-level thing, so just criticises the long list of simple resource attribute declarations :)
ta_ has joined #ruby
dlitvak_ has quit [Remote host closed the connection]
jenrzzz has joined #ruby
colegatron has joined #ruby
MatthewsFace has joined #ruby
<Authenticator> havenwood: Sorry I had to go AFK. I'm looking at your two links, thanks. (My question was vague, yes. Easy to the users is more the goal than specifically single-file.)
<hanmac> mor789: "Module#public_method_defined?" is the only one ... so i think you miss the "?"
Asher has joined #ruby
trosborn has quit [Quit: trosborn]
baweaver has joined #ruby
nettoweb has joined #ruby
kobain has quit [Ping timeout: 260 seconds]
<mor789> hanmac: thank you
kirillzh has joined #ruby
<sanguisdex> workmad3: thanks, I had looked at the archive cookbook but it seemed a lot of cruft to just unzip a file, because it does not handle a tar.
dlitvak has joined #ruby
<workmad3> sanguisdex: the other option would be to wrap that up into your own resource
<workmad3> resources are pretty easy to write in chef
iooner has quit [Ping timeout: 240 seconds]
ur5us has joined #ruby
<sanguisdex> I could make it my own resource, it felt more appropriate as a method in a helpers file. here is the context https://github.com/Harvard-ATG/chef-omeka
joonty has joined #ruby
<sanguisdex> workmad3: ^^
RegulationD has joined #ruby
iooner has joined #ruby
<workmad3> sanguisdex: heh :) to me, you're stringing together a bunch of other resources... that always felt more appropriate as a new resource when I was using chef
Deck` has quit [Ping timeout: 250 seconds]
<workmad3> sanguisdex: I rarely felt simple helper methods were much use in chef after a while using it
<workmad3> they tend to look odd and out of place when writing a recipe, while a custom resource fits into the rest of the recipe well :)
kirillzh has quit [Ping timeout: 250 seconds]
<sanguisdex> fair enough
<alexishuard> Yeah I'd go for custom_ressource over helper method any day with Chef
baweaver has quit [Remote host closed the connection]
<alexishuard> I've just wrote an entire one to include Vault Secret Management in production via Chef
<alexishuard> Feels good to spread those ressource in all my recipes.
Shaboum has joined #ruby
blandflakes has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
Asher has quit [Ping timeout: 276 seconds]
blandflakes has joined #ruby
BSaboia has joined #ruby
jhn has joined #ruby
GenghisKen has joined #ruby
GenghisKen has joined #ruby
cdg has quit [Ping timeout: 240 seconds]
Xeago has quit [Remote host closed the connection]
ramfjord has joined #ruby
yfeldblum has joined #ruby
techietrash has quit [Max SendQ exceeded]
techietrash has joined #ruby
nachoman has joined #ruby
ohaibbq has joined #ruby
uglybandersnatch has joined #ruby
baweaver has joined #ruby
lemur has joined #ruby
eurialo has quit [Disconnected by services]
platzhirsch has joined #ruby
rodfersou is now known as rodfersou|coffee
eurialo has joined #ruby
<haylon> bougyman, I was told you might be a chef expert.
MrDoctor has quit [Quit: Konversation terminated!]
MrDoctor has joined #ruby
Gnut_ has joined #ruby
<alexishuard> haylon: ask ahead, I do some stuff with Chef everyday.
MrDoctor has quit [Remote host closed the connection]
<adaedra> Or better, ask the chef channel.
<haylon> alexishuard, I seem to be having issues with Berkshelf connecting to my chef server.http://stackoverflow.com/q/33747520/2009612
lemur has quit [Ping timeout: 244 seconds]
GenghisKen has quit [Ping timeout: 244 seconds]
<haylon> adaedra, I did, and I still haven't got an answer
<haylon> for two days
HalcyonicStorm has left #ruby [#ruby]
Gnut has quit [Ping timeout: 250 seconds]
failshell has joined #ruby
kirillzh has joined #ruby
spider-mario has joined #ruby
MrDoctor has joined #ruby
Renich has quit [Quit: leaving]
ta_ has quit [Remote host closed the connection]
mattwildig has quit [Remote host closed the connection]
dfockler has joined #ruby
verde has quit [Read error: Connection reset by peer]
<haylon> alexishuard, I'm in the ruby-offtopic so we're not spamming this channel
<alexishuard> i'll look on SO
kirillzh has quit [Client Quit]
kirillzh has joined #ruby
Kang0 has quit [Quit: AndroIRC - Android IRC Client ( http://www.androirc.com )]
zeroDivisible has joined #ruby
mad_hatter has joined #ruby
<mad_hatter> ll
trinaldi has quit [Quit: gym]
<mad_hatter> hey guys...new to ruby looking for some documentation on how to get started with the language. I have experience with other languages (Perl & Java) so something that kinda skips the basics of computer programming and jubs into the nuts and bolts of Ruby specifically
<adaedra> ?links
fostertheweb has joined #ruby
cjbottaro has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<mad_hatter> Is there a ruby equivalent of perlbrew? something that will allow me to run multiple versions of ruby from my homedir? or am i stuck with system ruby?
<adaedra> chruby, rbenv, rvm
<adaedra> I would recommend chruby + ruby-install
nisstyre_ has quit [Ping timeout: 276 seconds]
<eam> mad_hatter: you might find http://rubykoans.com/ useful, set of tasks you can breeze through to pick up syntax and idioms
sauvin has quit [Remote host closed the connection]
xapak has quit []
blackmesa has quit [Ping timeout: 244 seconds]
<mad_hatter> thanks :)
joonty has quit [Ping timeout: 255 seconds]
dlitvak has quit [Ping timeout: 244 seconds]
mostlybadfly has quit [Quit: Connection closed for inactivity]
skade has quit [Quit: Computer has gone to sleep.]
Guest85 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
adgtl has quit [Read error: No route to host]
rodfersou|coffee is now known as rodfersou
Asher has joined #ruby
idefine has joined #ruby
elaptics is now known as elaptics`away
Snowy has joined #ruby
shellie__ has quit [Remote host closed the connection]
baweaver has quit [Remote host closed the connection]
Renich has joined #ruby
Guest85 has joined #ruby
Guest85 has quit [Client Quit]
Scriptonaut has left #ruby [#ruby]
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
segmond has quit [Ping timeout: 244 seconds]
HiddenSnake has quit [Quit: HiddenSnake]
skade has joined #ruby
skade has quit [Client Quit]
workmad3 has quit [Read error: Connection reset by peer]
krobzaur has quit [Ping timeout: 252 seconds]
mor789 has quit [Ping timeout: 252 seconds]
BtcBen has joined #ruby
sgambino has joined #ruby
hxegon is now known as hxegon_AFK
sanguisdex has quit [Ping timeout: 240 seconds]
mhoungbo has joined #ruby
uglybandersnatch has quit [Ping timeout: 250 seconds]
code_ has quit [Quit: BNC - Hosted by EpicKitty]
krobzaur has joined #ruby
despai has joined #ruby
code_ has joined #ruby
LoneHerm_ has joined #ruby
kies^ has quit [Ping timeout: 244 seconds]
intrigueD has quit [Remote host closed the connection]
dgncn has quit [Quit: Leaving]
dgncn has joined #ruby
rattatmatt has joined #ruby
lubekpl has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
failshell has quit [Read error: Connection reset by peer]
failshell has joined #ruby
code_ has quit [Client Quit]
kirun has joined #ruby
LoneHerm_ has quit [Ping timeout: 244 seconds]
mattwildig has joined #ruby
segmond has joined #ruby
blackmesa has joined #ruby
lubekpl has joined #ruby
godzillaenlacasa has quit [Quit: ZZZZZ....]
stevemackinnon has joined #ruby
dubek has joined #ruby
Azulinho has joined #ruby
nisstyre_ has joined #ruby
chipotle has joined #ruby
symm- has joined #ruby
mfb2 has quit [Remote host closed the connection]
LoneHermit has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
Deck` has joined #ruby
DoubleMalt has quit [Remote host closed the connection]
n1colas has quit [Quit: WeeChat 1.4]
stevemackinnon has quit [Ping timeout: 252 seconds]
godzillaenlacasa has joined #ruby
blackmesa has quit [Ping timeout: 244 seconds]
kies^ has joined #ruby
n00bdev has quit []
jgpawletko has joined #ruby
hxegon_AFK is now known as hxegon
JJM has joined #ruby
Jammy_Work has joined #ruby
failshell has quit []
lipoqil has quit [Quit: Connection closed for inactivity]
ht_ has joined #ruby
GenghisKen has joined #ruby
_ht has quit [Ping timeout: 240 seconds]
Hammy_Work has quit [Ping timeout: 244 seconds]
lapide_viridi has joined #ruby
slawrence00 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
LoneHermit has quit [Remote host closed the connection]
flughafen_ has quit [Ping timeout: 250 seconds]
dling has quit []
trosborn has joined #ruby
platzhirsch has left #ruby [#ruby]
Guest85_ has joined #ruby
dgncn has quit [Quit: Leaving]
ta_ has joined #ruby
dgncn has joined #ruby
terminalrecluse has quit [Read error: Connection reset by peer]
dlitvak has joined #ruby
terminalrecluse has joined #ruby
St1gma has joined #ruby
gizmore has joined #ruby
LoneHerm_ has joined #ruby
baweaver has joined #ruby
code_ has joined #ruby
mfb2 has joined #ruby
Xeago has joined #ruby
william3 has joined #ruby
idefine has quit [Remote host closed the connection]
fostertheweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sandstrom has joined #ruby
InternetFriend has joined #ruby
rattatmatt has quit [Remote host closed the connection]
wilbert has joined #ruby
Xeago has quit [Remote host closed the connection]
lapide_viridi has quit [Quit: Leaving]
cpup has joined #ruby
azure32 has quit [Ping timeout: 244 seconds]
quazimodo has joined #ruby
pawnbox has quit [Read error: Connection reset by peer]
pawnbox has joined #ruby
baweaver has quit [Ping timeout: 276 seconds]
william3 has quit [Ping timeout: 244 seconds]
yqt has joined #ruby
Asher has quit [Quit: Leaving.]
Xeago has joined #ruby
treehug88 has quit [Ping timeout: 244 seconds]
idefine has joined #ruby
idefine has quit [Remote host closed the connection]
Mon_Ouie has joined #ruby
rattatmatt has joined #ruby
Xeago has quit [Remote host closed the connection]
Asher has joined #ruby
DoubleMalt has joined #ruby
<InternetFriend> exit
fostertheweb has joined #ruby
InternetFriend has quit [Quit: leaving]
Asher has quit [Remote host closed the connection]
ta_ has quit [Remote host closed the connection]
Snowy has quit [Remote host closed the connection]
aegis3121 has joined #ruby
[Butch] has quit [Read error: Connection reset by peer]
Asher has joined #ruby
robbyoconnor has quit [Ping timeout: 276 seconds]
jimcroft has joined #ruby
mdw has joined #ruby
blackmesa has joined #ruby
hahuang65 has quit [Ping timeout: 250 seconds]
poguez_ has joined #ruby
william3 has joined #ruby
baweaver has joined #ruby
fostertheweb has quit [Client Quit]
dlitvak has quit [Ping timeout: 240 seconds]
FernandoBasso has joined #ruby
skade has joined #ruby
Deck` has quit [Ping timeout: 244 seconds]
fostertheweb has joined #ruby
Snowy has joined #ruby
idefine has joined #ruby
x77686d has quit [Quit: x77686d]
codecop has quit [Remote host closed the connection]
replay has quit [Ping timeout: 250 seconds]
dlitvak has joined #ruby
openstruct has quit []
aswen has joined #ruby
idefine has quit [Remote host closed the connection]
Asher has quit [Quit: Leaving.]
synthroid has quit [Remote host closed the connection]
idefine has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
pwnd_nsfw` has joined #ruby
dgncn has quit [Quit: Leaving]
nachoman has quit []
dgncn has joined #ruby
synthroid has joined #ruby
DoubleMalt has quit [Remote host closed the connection]
pwnd_nsfw has quit [Ping timeout: 268 seconds]
Affix has quit [Ping timeout: 255 seconds]
rattatmatt has quit [Remote host closed the connection]
kobain has joined #ruby
DefV has quit [Ping timeout: 255 seconds]
DefV has joined #ruby
kirillzh has quit [Remote host closed the connection]
fostertheweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy> rescue
moeabdol1 has joined #ruby
wilbert_ has joined #ruby
spuk has joined #ruby
Affix has joined #ruby
<pipework> ensure
Affix is now known as Guest46298
dlitvak_ has joined #ruby
<ljarvis> exit!
idefine has quit [Remote host closed the connection]
<baweaver> rescue
davedev24 has joined #ruby
wilbert has quit [Ping timeout: 240 seconds]
moeabdol has quit [Ping timeout: 244 seconds]
<ljarvis> too late we exited sorrynotsorry
MrDoctor has quit [Ping timeout: 250 seconds]
dlitvak has quit [Ping timeout: 244 seconds]
Hammy_Work has joined #ruby
idefine has joined #ruby
<xpt> we are back in shell?
MrDoctor has joined #ruby
<shevy> yeah xpt, we can not rescue the exit! :(
<xpt> while /bin/true; do irb ; done
x77686d has joined #ruby
Mon_Ouie has quit [Ping timeout: 252 seconds]
<xpt> now you need to sigkill parent process to quit!
<eam> Process.kill :STOP, $$
<eam> there, now your outer loop is bunk too
<ljarvis> rekt
ta_ has joined #ruby
Jammy_Work has quit [Ping timeout: 252 seconds]
<xpt> eam: :'(
<shevy> perl code!
Deck` has joined #ruby
<adaedra> %x(kill -9 -1)
[Butch] has joined #ruby
<ljarvis> shutdown -t now
<pipework> Signal.trap("EXIT") { puts :nope }
<ruurd> shevy are you sure it's not uuencoded /dev/urandom
sandstrom has joined #ruby
dgncn has quit [Quit: Leaving]
<pipework> ruurd: Most of what shevy says is uuencoded /dev/urandom.
<adaedra> :D
quakephil has joined #ruby
<ruurd> so why then is it shevy not named whitenoise
<adaedra> Given infinite numbers of threads reading /dev/urandom and infinite time, a computer can rewrite 1984.
<ljarvis> because that's discrimination
dlitvak_ has quit [Remote host closed the connection]
<ruurd> because
<adaedra> nativeeuropeannoise
<eam> the prng backing /dev/urandom is single-threaded, isn't it?
pawnbox has quit [Remote host closed the connection]
<ruurd> don't know. use the source luke
<adaedra> Implementation-dependent.
<adaedra> dependant?
<eam> gonna hit some scaling issues
<eam> just use RDRAND
<adaedra> Doesn't matter, had entropy.
<pipework> eam: non-blocking, so who cares?
<ljarvis> rewrite it in node
perfectritone has joined #ruby
<eam> pipework: well you'll just get empty reads
<pipework> Get it real close to the metal that way.
<pipework> eam: No, you'll just not bother until you get more.
<ljarvis> so close it becomes the metal
<pipework> Exactly how shevy works now.
<pipework> As intended.
workmad3 has joined #ruby
Canar has quit [Ping timeout: 248 seconds]
fostertheweb has joined #ruby
idefine has quit [Remote host closed the connection]
rodfersou has quit [Quit: leaving]
<perfectritone> I'm trying to run a method on an instance defined in an included Module. It's second in line in inheritence, so super isn't cutting it. Any ideas/.
<apeiros> what's "an instance defined in an included Module"?
idefine has joined #ruby
<shevy> pipework lol
<perfectritone> An instance of a Class. The Module is included in the Class
<perfectritone> and the method I want to get to (which is superseded already) is defined in the Module that has been included
<shevy> perfectritone and do you happen to have code for that problem description?
<apeiros> I think you should make an example
<apeiros> because super should work for that
<ljarvis> I think you should make a cake
<ljarvis> ?cake
<ruby[bot]> here's your cake:
blackmesa has quit [Ping timeout: 240 seconds]
<ljarvis> ok back to work
<adaedra> ljarvis: tis a lie.
<apeiros> >> module Fuu; def x; "Fuu#x"; end; end; class Foo; include Fuu; def x; super; end; end; Foo.new.x
<ljarvis> :O
<ruby[bot]> apeiros: # => "Fuu#x" (https://eval.in/525679)
<perfectritone> super defaults to the most recently included module. in this case its the second most recently included
<shevy> :D
<apeiros> perfectritone: IMO you've got a serious code smell then
<eam> >> Module.constants.each { |o| eval "#{o} = nil" }
<ruby[bot]> eam: # => (eval):1: warning: already initialized constant Object ...check link for more (https://eval.in/525685)
<pipework> perfectritone: super_method might help.
idefine has quit [Remote host closed the connection]
<apeiros> you can use YourModule.instance_method(:name).bind(self).call
<apeiros> but as said, serious smell.
<eam> >> $VERBOSE=nil; Module.constants.each { |o| eval "#{o} = nil" }
<ruby[bot]> eam: # => [:Object, :Module, :Class, :BasicObject, :Kernel, :NilClass, :NIL, :Data, :TrueClass, :TRUE, :FalseC ...check link for more (https://eval.in/525688)
LoneHerm_ has quit [Read error: Connection reset by peer]
<perfectritone> Yea, I just started with a new codebase, still trying to work with it.
<eam> hm it survived?
rattatmatt has joined #ruby
arthurl has joined #ruby
<Ox0dea> eam: No in-place modifications. :)
<Ox0dea> Fiddle can help(?) with that.
pawnbox has joined #ruby
shawnacscott has joined #ruby
<Ox0dea> Nostalgia thread?
blackmesa has joined #ruby
Asher has joined #ruby
JJM has quit [Quit: Textual IRC Client: www.textualapp.com]
<eam> Ox0dea: I mean, Class would still be nil. I'm guessing eval.in doesn't do enough after to provoke a failure
dubek has quit [Ping timeout: 240 seconds]
statelesscode has quit [Quit: statelesscode]
sp4rrow has joined #ruby
<Ox0dea> >> $VERBOSE = Class = nil; String.class # eam
<ruby[bot]> Ox0dea: # => /tmp/execpad-cd9608389305/source-cd9608389305:2: warning: already initialized constant Class ...check link for more (https://eval.in/525699)
<Ox0dea> Wat.
shawnacscott has left #ruby [#ruby]
LoneHermit has joined #ruby
<perfectritone> Thanks apeiros and pipework!
<Ox0dea> Why didn't that suppress the warning?
<eam> because it fires before assignment?
<Ox0dea> >> Class = $VERBOSE = nil; String.class
<ruby[bot]> Ox0dea: # => Class (https://eval.in/525706)
<Ox0dea> That, then.
kaleido has quit [Quit: leaving]
<perfectritone> Hopefully I'll find a better way around it. I'm dealing with RSpec and different gems overwriting #post :-/
<eam> Ox0dea: I think you mean
<eam> >> Class = $VERBOSE = nil; Class.class
<ruby[bot]> eam: # => NilClass (https://eval.in/525716)
pawnbox has quit [Ping timeout: 248 seconds]
<Ox0dea> >> Class = $VERBOSE = nil; String.class.nil? # eam
<ruby[bot]> Ox0dea: # => false (https://eval.in/525719)
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
Matthews_ has joined #ruby
<eam> right, it's just changing the constants
kaleido has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
MatthewsFace has quit [Ping timeout: 244 seconds]
<Ox0dea> So why were you surprised by the lack of explosions?
spintronic has joined #ruby
slawrence00 has joined #ruby
<eam> it's fairly difficult to avoid them when that occurs
DoubleMalt has joined #ruby
_djbkd has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 244 seconds]
quakephil_ has joined #ruby
Aviio has joined #ruby
<Aviio> Hi Rubyists
<havenwood> Aviio: Hi!
BSaboia has quit [Quit: Leaving]
Shaboum has quit [Quit: WeeChat 1.4]
<Aviio> Anybody know of a quick one-liner to get all .xml files from a directory and its sub directories?
<apeiros> Dir.glob("**/*.xml")
<apeiros> quick enough?
<Aviio> apeiros: ah I thought it was glob but I was passing in just *.xml, thanks!
quakephil has quit [Ping timeout: 255 seconds]
<Aviio> is that relative to the file that the code is contained in?
mdw has quit [Read error: Connection reset by peer]
<apeiros> Aviio: no. all file operations are relative to the working directory.
ldnunes has quit [Quit: Leaving]
mdw has joined #ruby
minimalism has joined #ruby
cdg_ has joined #ruby
<havenwood> Aviio: You can check: Dir.pwd
<apeiros> for some reason I prefer the .getwd alias :-/
<Aviio> apeiros: certainly more readable
<Aviio> havenwood: thanks
Canar has joined #ruby
<eam> wish ruby had #openat
ur5us has quit [Remote host closed the connection]
<havenwood> Aviio: If you chdir in a block it'll change back when the block closes, e.g.: Dir.chdir('..') { Dir.getwd }
<apeiros> beware of Dir.chdir - it won't play nice with threads.
intrigueD has joined #ruby
johnmilton has quit [Remote host closed the connection]
ht_ has quit [Read error: Connection reset by peer]
<havenwood> eam: ah, nice
hahuang65 has joined #ruby
ht_ has joined #ruby
nolsen has joined #ruby
<apeiros> "MacOS/X no" :<
idefine has joined #ruby
twitch_ has joined #ruby
Guest85_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
idefine has quit [Remote host closed the connection]
idefine has joined #ruby
<arthurl> hi guys- i have two different web servers, one apache/passenger/rails which is connected to database on local network and one nginx/passenger/rails which is connected to the same database but over a vpn with ~40ms latency- however i am seeing much slower app performance on the nginx box- taking a look at our apps production.log I'm seeing ActiveRecord: load time is much great on the nginx box- does this simply mean rails is taking longer to talk to the
<arthurl> database?
LoneHermit has quit [Remote host closed the connection]
weemsledeux has joined #ruby
<eam> apeiros: osx is missing a lot of super basic stuff, like gettimeofday()
jenrzzz has joined #ruby
<havenwood> require 'shell'; Shell.cd('..').pwd
<eam> sorry I mean clock_gettime() -- for ns
sanguisdex has joined #ruby
weemsledeux has quit [Max SendQ exceeded]
twitch_ has quit [Client Quit]
perfectritone has quit [Ping timeout: 252 seconds]
<apeiros> eam: yeah, I've noticed over the last couple of years :-S
jimcroft has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<eam> at least it's x86 now so I can run a fast linux vm on it
baweaver has quit [Remote host closed the connection]
centrx has joined #ruby
jimcroft has joined #ruby
afaris has joined #ruby
ht_ has quit [Ping timeout: 240 seconds]
Matthews_ has quit [Remote host closed the connection]
ht_ has joined #ruby
maletor_ has joined #ruby
Cohedrin has joined #ruby
pawnbox has joined #ruby
goodcodeguy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Snowy has quit [Read error: Connection reset by peer]
n1colas has joined #ruby
malnek has joined #ruby
Snowy has joined #ruby
<afaris> Is it possible to lock a rvm gemset and prevent any additions? I can't seem to break the habit of running 'gem install' while using the global gemset.
idefine has quit [Remote host closed the connection]
idefine has joined #ruby
stevemackinnon has joined #ruby
<havenwood> afaris: I suppose you could change the permissions of your global gemset dir. :O
<havenwood> afaris: To remove writing.
maletor has quit [Ping timeout: 252 seconds]
<afaris> heh, i hadn't thought of that
spintronic has quit [Read error: Connection reset by peer]
goodcodeguy has joined #ruby
spintronic has joined #ruby
chipotle has quit [Quit: cheerio]
rodolfowtf has quit [Read error: Connection reset by peer]
quazimodo has quit [Ping timeout: 240 seconds]
pawnbox has quit [Ping timeout: 276 seconds]
Xeago has joined #ruby
kirillzh has joined #ruby
<kirillzh> Is there better way to convert Set to Array inside hash? https://gist.github.com/anonymous/ba9cd2dab5f2394238ed
atmosx has joined #ruby
Ishido has quit [Remote host closed the connection]
chipotle has joined #ruby
idefine has quit [Remote host closed the connection]
jimcroft has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
william3 has quit [Remote host closed the connection]
ta_ has quit [Remote host closed the connection]
Dekade has joined #ruby
Rickmasta has joined #ruby
ht_ has quit [Quit: Konversation terminated!]
djbkd_ has joined #ruby
swills has quit [Ping timeout: 244 seconds]
fostertheweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
idefine has joined #ruby
<havenwood> kirillzh: You want an Array of that particular key's value or to return a Hash with all values as Arrays?
DonOtreply has joined #ruby
<kirillzh> havenwood the second one.
TomyLobo has quit [Ping timeout: 244 seconds]
goodcodeguy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<havenwood> kirillzh: h.map { |k, v| [k, v.to_a] }.to_h
ta_ has joined #ruby
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Dusk_ has joined #ruby
sp4rrow has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Dusk_> How do I install Ruby gems on Ubuntu?
<havenwood> dusk_: sudo gem install gem_name_here
<Dusk_> oh that's simple. Cool thanks.
<havenwood> dusk_: An aside, but Brightbox maintains up-to-date Ruby packages for Ubuntu: https://www.brightbox.com/docs/ruby/ubuntu/
<Dusk_> Interesting! I'll check it out (:
<kirillzh> havenwood I mean, I have hash let's say with keys "a", "b" and "c" (I know these keys), values of these keys are Sets. I want to convert these specific to arrays. So I was wondering if there is "better" way to do that: https://gist.github.com/anonymous/3071d6c6f3bfeab7ae9d
uglybandersnatch has joined #ruby
<havenwood> dusk_: Or if you want even more Rubies here's a nice guide to ruby-install/chruby for Ubuntu: http://ryanbigg.com/2014/10/ubuntu-ruby-ruby-install-chruby-and-you//
<Ox0dea> kirillzh: https://eval.in/525745
Underdogg has quit [Read error: Connection reset by peer]
pawnbox has joined #ruby
<kirillzh> Ox0dea I don't want to convert every value, only specific ones :)
<Ox0dea> kirillzh: Gotcha.
<Ox0dea> map { |k, v| [k, Set === v ? v.to_a : v] }.to_h
B1n4r10 has quit [Ping timeout: 248 seconds]
synthroid has quit []
gizmore has quit [Quit: KVIrc 4.9.1 Aria http://www.kvirc.net/]
uglybandersnatc- has joined #ruby
<kirillzh> Ox0dea I just thought maybe there is bang to_a! method and I could do h[:a].to_a!. Or something like that.
<Ox0dea> kirillzh: 'Fraid not.
<Ox0dea> Bang methods never change the object's class.
terminalrecluse has quit [Quit: Textual IRC Client: www.textualapp.com]
<kirillzh> Ox0dea oh, didn't know about that.
uglybandersnatch has quit [Ping timeout: 244 seconds]
headius has quit [Quit: ZNC - http://znc.in]
<Ox0dea> kirillzh: It's actually a difficult thing to do, in fact.
<Ox0dea> s/difficult/involved/, really.
quazimodo has joined #ruby
<kirillzh> Ox0dea havenwood thanks! I think I will go with h[:a] = h[:a].to_a for simplicity.
<Ox0dea> :/
<kirillzh> Ox0dea I literally have to convert 3 keys' values :)
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pawnbox has quit [Ping timeout: 240 seconds]
trinaldi has joined #ruby
Derailed has quit [Quit: ZNC - http://znc.in]
DonOtreply is now known as moosetans
MatthewsFace has joined #ruby
alexishuard has quit [Ping timeout: 244 seconds]
Derailed has joined #ruby
sp4rrow has joined #ruby
sp4rrow has quit [Client Quit]
rahult has joined #ruby
kappy has joined #ruby
platzhirsch has joined #ruby
moeabdol2 has joined #ruby
graydot has quit [Quit: graydot]
slawrence00 has quit [Quit: Textual IRC Client: www.textualapp.com]
Gnut_ has quit [Ping timeout: 244 seconds]
ramfjord_ has joined #ruby
moeabdol1 has quit [Ping timeout: 244 seconds]
nennes has joined #ruby
Dimik has quit [Ping timeout: 244 seconds]
dhollinger has quit [Quit: WeeChat 1.4]
spintronic has quit [Read error: Connection reset by peer]
ramfjord has quit [Ping timeout: 240 seconds]
Gnut has joined #ruby
graydot has joined #ruby
WizJin has quit [Excess Flood]
spintronic has joined #ruby
recycle has quit [Ping timeout: 240 seconds]
vdamewood has joined #ruby
Dimik has joined #ruby
rahult is now known as rahult_
rahult_ is now known as rahult
ElFerna_ has joined #ruby
rahult is now known as rahult_
rahult_ is now known as rahult
<shevy> long live ruby!
graydot has quit [Quit: graydot]
InternetFriend has joined #ruby
<kaleido> shevy: you know you prefer perl and php
htmldrum has joined #ruby
platzhirsch has quit [Ping timeout: 244 seconds]
Dimik has quit [Ping timeout: 276 seconds]
Xeago has quit [Remote host closed the connection]
mattwildig has quit [Remote host closed the connection]
mdw has quit [Quit: Sleeping Zzzzz]
spintronic has quit [Ping timeout: 244 seconds]
phatso727 has joined #ruby
maletor_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
maletor has joined #ruby
GenghisKen has quit [Ping timeout: 244 seconds]
fostertheweb has joined #ruby
x77686d has quit [Quit: x77686d]
[BNC]WizJin has joined #ruby
LoneHerm_ has joined #ruby
theunraveler has joined #ruby
nachoman has joined #ruby
aibot has quit [Ping timeout: 276 seconds]
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ramortegui has quit [Quit: Ex-Chat]
shiver has quit [Ping timeout: 252 seconds]
quazimodo has quit [Read error: No route to host]
Dimik has joined #ruby
sgambino has joined #ruby
alexishuard has joined #ruby
safe has joined #ruby
diego2 has joined #ruby
alexishuard has quit [Client Quit]
<VeryBewitching> kaleido: If Perl were declared the last language to exist and to be used, I would find a way to accept it. If PHP were delcared to be the same, I would take up carpentry full time.
<[BNC]WizJin> hmm
[BNC]WizJin has left #ruby ["Leaving"]
malcolmva has quit [Ping timeout: 276 seconds]
hahuang65 has quit [Ping timeout: 276 seconds]
diego2 has quit [Changing host]
diego2 has joined #ruby
ElFerna_ has quit [Ping timeout: 250 seconds]
malnek has quit [Quit: Lost terminal]
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
diegoviola has quit [Ping timeout: 255 seconds]
nickjj has quit [Read error: Connection reset by peer]
ESpiney has quit [Read error: Connection reset by peer]
nickjj has joined #ruby
Dreamer3_ has joined #ruby
jgpawletko has quit [Quit: jgpawletko]
sp4rrow has joined #ruby
uglybandersnatc- has quit [Ping timeout: 252 seconds]
mad_hatter has quit [Ping timeout: 244 seconds]
mary5030 has quit [Remote host closed the connection]
godzillaenlacasa has quit [Quit: ZZZZZ....]
moeabdol2 has quit [Ping timeout: 240 seconds]
fostertheweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
polishdub has quit [Quit: Leaving]
x77686d has joined #ruby
diego2 is now known as diegoviola
kobain has quit [Ping timeout: 260 seconds]
ElFerna_ has joined #ruby
<Radar> VeryBewitching: rofl
graydot has joined #ruby
tommy_p has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
malcolmva has joined #ruby
fostertheweb has joined #ruby
chipotle has quit [Quit: cheerio]
al2o3-cr has quit [Ping timeout: 244 seconds]
zenlot has quit [Ping timeout: 252 seconds]
chipotle has joined #ruby
Matthews_ has joined #ruby
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
wastrel has joined #ruby
zenlot has joined #ruby
Guest77500 is now known as montyboy
Deck` has quit [Ping timeout: 250 seconds]
dome22xl has joined #ruby
rakm has joined #ruby
al2o3-cr has joined #ruby
Matthews_ has quit [Remote host closed the connection]
jhn has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
MatthewsFace has quit [Ping timeout: 240 seconds]
mdw has joined #ruby
MatthewsFace has joined #ruby
SCHAAP137 has quit [Remote host closed the connection]
dfockler has quit [Ping timeout: 252 seconds]
wilbert_ has quit [Ping timeout: 248 seconds]
blackmesa has joined #ruby
toretore has joined #ruby
pawnbox has joined #ruby
nettoweb has joined #ruby
Ankhers has quit [Quit: Leaving]
sanguisdex has quit [Ping timeout: 240 seconds]
blandflakes has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
pawnbox has quit [Ping timeout: 244 seconds]
uglybandersnatch has joined #ruby
haylon has left #ruby ["WeeChat 1.4"]
jgpawletko has joined #ruby
<shevy> kaleido dunno, I had a nice perl book which was good, had a great part about regexes. perl was somewhat awkward, I actually was more productive in php strangely enough :\ ruby was best though, the other two are not in the same league
postmodern has joined #ruby
<bronson> both are really screwed up when it comes to objects and references... could be just personal taste which one appeals more.
Dusk_ has quit [Quit: Page closed]
<bronson> I've programmed enough perl to appreciate its internal consistency. but it's a pretty heavy mental burden until you have earned enough scars.
wastrel has left #ruby ["nvm"]
Snowy has quit [Quit: ragequit]
<eam> I thought perl was super straightforward
jenrzzz_ has joined #ruby
BTRE has quit [Ping timeout: 240 seconds]
ledestin has joined #ruby
kobain has joined #ruby
brijesh has joined #ruby
kobain has quit [Max SendQ exceeded]
kobain has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
<VeryBewitching> Going from programming Ruby to PHP in the last month or so, my hands hurt more. It's normal that they hurt for my medical situation, but I feel caged by syntactical nonsense throughout most of my work day.
solocshaw has joined #ruby
<VeryBewitching> Perl would be roughly the same effect I think.
skade has quit [Quit: Computer has gone to sleep.]
<VeryBewitching> Ruby is.. freeing.
<eam> php is nuts. perl is pretty straightforward
baweaver has joined #ruby
workmad3 has quit [Ping timeout: 244 seconds]
<VeryBewitching> eam: I want to do: foo = bar if bin == baz not if($bin === $baz) { $foo = $bar; }
<VeryBewitching> Too much typing.
<eam> in what language?
<VeryBewitching> PHP
<eam> gross
mattwildig has joined #ruby
<VeryBewitching> Now, I can use one-line conditionals... but still, think of the number of times you'd hit shift.
<pipework> I think that hoon is pretty cool, nock too.
fostertheweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<eam> sounds like you want shortcut eval boolean operators though
ta_ has quit [Remote host closed the connection]
<VeryBewitching> eam: No, it's just an example.
sandstrom has quit [Quit: My computer has gone to sleep.]
uri_ has quit [Ping timeout: 250 seconds]
<VeryBewitching> def foo; #...; end vs. function foo() { // ... }
<shevy> VeryBewitching yeah, ruby spoils one a lot
<bronson> can anyone tell me what they prefer: initialize the class variable inside the included block or outside?
edwinvdgraaf has quit [Remote host closed the connection]
<shevy> bronson problem is that I can not answer it because I don't like class variables
<bronson> I suspect it could be just aesthetics because it works OK either way.
brijesh has quit [Ping timeout: 244 seconds]
mostlybadfly has joined #ruby
<bronson> shevy: me neither.
<bronson> especially when ActiveSupport::Concerning.
<bronson> unfortunately I inherited this one.
<shevy> however had, if it would be a @foo variable, on the toplevel instance, like a class level instance variable, then always initialize it near the top somewhere
shiver_ has joined #ruby
<eam> one thing perl does that I wish ruby would do is merge def and proc/lambda
quazimodo has joined #ruby
<eam> why can't def with no name return a lambda?
uglybandersnatch has quit [Ping timeout: 250 seconds]
phatso727 has quit [Ping timeout: 250 seconds]
<shevy> it could return a proc!
<bronson> agree 100%. stabby procs are neat but just paper over the oddity.
<shevy> are defs without names possible?
<eam> no
aibot has joined #ruby
<eam> the syntax is ambiguous, I think
<eam> (or, would be)
<VeryBewitching> Can you declare a null symbol?
<VeryBewitching> :
nando293921 has quit [Ping timeout: 248 seconds]
dome22xl has quit [Ping timeout: 248 seconds]
<eam> >> define_method "", ->{"yes"}; send "" # if you mean empty string
<ruby[bot]> eam: # => "yes" (https://eval.in/525758)
stannard has quit [Remote host closed the connection]
graydot has quit [Quit: graydot]
<VeryBewitching> Empty is not the same as null.
_kfpratt has quit [Remote host closed the connection]
<eam> right, that's why I said if :)
<eam> not sure what null indicates in ruby
<VeryBewitching> >> define_method nil, ->{"yes"}; send ""
<ruby[bot]> VeryBewitching: # => nil is not a symbol nor a string (TypeError) ...check link for more (https://eval.in/525759)
Dimik has quit [Ping timeout: 252 seconds]
<VeryBewitching> :P
<eam> oh nil :)
<eam> nil != null
<kaleido> >> nil.type
<ruby[bot]> kaleido: # => undefined method `type' for nil:NilClass (NoMethodError) ...check link for more (https://eval.in/525760)
<kaleido> damn!
<VeryBewitching> >> define_method null, ->{"yes"}; send ""
<ruby[bot]> VeryBewitching: # => undefined local variable or method `null' for main:Object (NameError) ...check link for more (https://eval.in/525761)
<VeryBewitching> haha
<eam> >> define_method :null, ->{"yes"}; send :null
<ruby[bot]> eam: # => "yes" (https://eval.in/525762)
<VeryBewitching> I know nil is NilClass, but it should represent the absence of data.
<VeryBewitching> eam: In that case, :null is just a symbol.
pdoherty has quit [Ping timeout: 240 seconds]
jottr has quit [Ping timeout: 276 seconds]
<VeryBewitching> You can't send null to define_method.
shiver_ has quit [Client Quit]
uglybandersnatch has joined #ruby
shiver_ has joined #ruby
workmad3 has joined #ruby
* apeiros wonders whether that should make sense…
aswen has quit [Quit: WeeChat 1.4]
<eam> null isn't a thing in ruby
<eam> in C it'd be a pointer value
saneax_AFK is now known as saneax
duckpuppy has quit [Ping timeout: 240 seconds]
dubek has joined #ruby
solars has quit [Ping timeout: 244 seconds]
BTRE has joined #ruby
y2mq37 has joined #ruby
<eam> unless we're talking characters, because null is a character value as well
nennes has quit [Quit: Leaving]
<Ox0dea> That's NUL. :)
<eam> in which case
baweaver has quit [Remote host closed the connection]
ElFerna_ has quit [Ping timeout: 250 seconds]
shiver_ is now known as shiver
<eam> >> define_method 0.chr, ->{"yes"}; send 0.chr
Rickmasta has quit [Remote host closed the connection]
<ruby[bot]> eam: # => "yes" (https://eval.in/525763)
<VeryBewitching> When I use the term "null", I mean to say the absence of data.
shiver has quit [Changing host]
shiver has joined #ruby
<Ox0dea> Ruby's null value is spelled `nil`.
<VeryBewitching> Various languages have a way to represent nothing.
<eam> VeryBewitching: well that'd be an empty buffer then, right?
<apeiros> NUL is only the abbreviation for the null-byte
<VeryBewitching> eam: Yes, but an empty buffer with no type.
<Ox0dea> Isn't it the character's canonical name?
<VeryBewitching> No characteristics except that it is nothing.
<Ox0dea> VeryBewitching: `Undef = Object.new`
<eam> VeryBewitching: no such concept exists in computers, as far as I'm aware
<apeiros> I wonder whether with characters we've managed to actually have canonical names :-S - I guess unicode codepoint names come closest to that?
<Ox0dea> That's how I meant, anyway.
<eam> all the various values named like or sounding like null represent a value
<VeryBewitching> Mmmhmm.
<apeiros> says "null character", abbreviation "nul"
<shevy> SNOWMAN!
<eam> and in fact, null pointers aren't always zero
<VeryBewitching> So... the reason why I casually mentioned null (and it turned into a bit of a chat) is that you shouldn't define a method in the same way you define code to be executed within a very specific scope.
<apeiros> though, "null character" is listed under "description" - does that count as "name"?
theunraveler has quit []
<Ox0dea> UnicodeData.txt calls it NULL, so I guess NUL is an abbreviation.
<VeryBewitching> apeiros: A description is subjective, a name is unique.
justinweiss has quit [Quit: Connection closed for inactivity]
blackgoat has joined #ruby
<shevy> unique names hmm :)
<eam> VeryBewitching: you'll love php's create_function() then
<Ox0dea> Internally, MRI does have Qundef for representing "nonexistence", but it's not directly exposed.
<VeryBewitching> eam: I've used it.
<eam> "returns a named anonymous function"
lubekpl has quit [Quit: Textual IRC Client: www.textualapp.com]
blackmesa has quit [Ping timeout: 250 seconds]
gsilvapt has joined #ruby
<shevy> hmmm
<shevy> the schroedinger cat
<Ox0dea> `foo = -> {}` is arguably a "named anonymous function".
<eam> can you imagine if lambda{} returned :function01, :function02
<Ox0dea> But yeah, that'd be goofy.
<eam> Ox0dea: nah foo isn't the name of the function it's just a reference to it
graydot has joined #ruby
<apeiros> >> ->{}.instance_eval { def self.name; "it's a me, lambda!" end }.name
<ruby[bot]> apeiros: # => undefined method `name' for :name:Symbol (NoMethodError) ...check link for more (https://eval.in/525764)
<Ox0dea> Heh.
* apeiros grumbles
<apeiros> forgot that instance_eval doesn't tap
<apeiros> >> x = ->{}; x.instance_eval { def self.name; "it's a me, lambda!" end }; x.name
<ruby[bot]> apeiros: # => "it's a me, lambda!" (https://eval.in/525765)
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
blackmesa has joined #ruby
<apeiros> what's in a name?
intrigueD has quit [Remote host closed the connection]
Renich has quit [Quit: leaving]
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
spider-mario has quit [Remote host closed the connection]
decoponio has quit [Quit: Leaving...]
ta has joined #ruby
intrigueD has joined #ruby
kfpratt has joined #ruby
<shevy> "a" and "m"!
<VeryBewitching> OK, Eve time, til the morrow..
VeryBewitching has quit [Quit: Konversation terminated!]
sgambino has joined #ruby
<apeiros> I'm sure shakespeare would have loved that answer
bricker has quit [Ping timeout: 252 seconds]
Domaldel has joined #ruby
gsilvapt has quit [Remote host closed the connection]
jottr has joined #ruby
<eam> >> ?b * 2 || !(?b * 2)
<ruby[bot]> eam: # => "bb" (https://eval.in/525769)
ta has quit [Ping timeout: 240 seconds]
trosborn has quit [Quit: trosborn]
Dimik has joined #ruby
mondok has quit [Ping timeout: 248 seconds]
sp4rrow has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pawnbox has joined #ruby
aegis3121 has quit [Ping timeout: 255 seconds]
djbkd_ has quit [Remote host closed the connection]
ur5us has joined #ruby
<apeiros> poetic :D
Matthews_ has joined #ruby
trosborn has joined #ruby
idefine has quit [Remote host closed the connection]
sp4rrow has joined #ruby
n_blownapart has joined #ruby
mary5030 has joined #ruby
pawnbox has quit [Ping timeout: 252 seconds]
_djbkd has joined #ruby
<shevy> to be
sanguisdex has joined #ruby
<shevy> To do is to be
<shevy> Do be do be do
<Ox0dea> There should be a juxtaposition operator.
Ankhers has joined #ruby
MatthewsFace has quit [Ping timeout: 244 seconds]
<Ox0dea> `2b` would be a method call.
bronson has quit [Remote host closed the connection]
<Ox0dea> Don't ask me what to name the method. :P
kirun has quit [Quit: Client exiting]
mattwildig has quit [Remote host closed the connection]
pdoherty has joined #ruby
binaryplease has joined #ruby
chipotle has quit [Quit: cheerio]
gsilvapt has joined #ruby
mfb2 has quit [Remote host closed the connection]
bronson has joined #ruby
sami has quit [Ping timeout: 240 seconds]
moosetans has quit [Quit: moosetans]
kies^ has quit [Ping timeout: 240 seconds]
LoneHerm_ has quit [Read error: Connection reset by peer]
nogic has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sgambino has joined #ruby
intrigueD has quit [Remote host closed the connection]
floatingpoint has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
symm- has quit [Ping timeout: 240 seconds]
baweaver has joined #ruby
LoganG has joined #ruby
blackmes1 has joined #ruby
sgambino has quit [Client Quit]
ElFerna_ has joined #ruby
binaryplease has quit [Quit: WeeChat 1.4]
pdoherty has quit [Ping timeout: 255 seconds]
chipotle has joined #ruby
mfb2 has joined #ruby
mfb2 has quit [Remote host closed the connection]
LoneHerm_ has joined #ruby
dlitvak has joined #ruby
blackmesa has quit [Ping timeout: 244 seconds]
bricker has joined #ruby
gsilvapt has quit [Remote host closed the connection]
jgpawletko has quit [Quit: jgpawletko]
gsilvapt has joined #ruby
<Aviio> 99 little bugs in the code, take one down, patch it around, 127 little bugs in the code :(
kirillzh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
[Butch] has quit [Quit: I'm out . . .]
<shevy> you are proceeding in the wrong direction Aviio!
godzillaenlacasa has joined #ruby
<Aviio> shevy: im working on some code that someone with very little programming experience has written, such spaghetti code :(
recycle has joined #ruby
<Aviio> https://github.com/Aviio/SecGen/tree/master is the original code, https://github.com/Aviio/SecGen/tree/directory_change is where im currently at with moving things around
jenrzzz_ has quit [Ping timeout: 248 seconds]
sanguisdex has quit [Ping timeout: 240 seconds]
_djbkd has quit [Remote host closed the connection]
jenrzzz has joined #ruby
headius has joined #ruby