havenwood changed the topic of #ruby to: Rules & more: https://ruby-community.com || Ruby 2.4.0, 2.3.3 & 2.2.6: https://www.ruby-lang.org || Paste >3 lines of text to: https://gist.github.com || Rails questions? Ask in: #RubyOnRails || Logs: https://irclog.whitequark.org/ruby
chouhoulis has joined #ruby
knutmithut has joined #ruby
montanonic has joined #ruby
JoshS has joined #ruby
connor_goodwolf has joined #ruby
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
cschneid_ has quit [Remote host closed the connection]
<knutmithut> hello, how can I tell gem install to skip a lib build and installed with make? there is a problem with unf_ext on armv7h which is fixed in the git, but not in upstream. so I have built it myself
CloCkWeRX has quit [Ping timeout: 240 seconds]
karapety_ has joined #ruby
<zenspider> knutmithut: skip a pre-built binary gem?
karapetyan has quit [Ping timeout: 276 seconds]
<knutmithut> I'm not sure.. neither I'm much into ruby nor gem. But I've just seen that I've built against ruby 2.4, while 2.3 is required.. What I'm actually trying is installing diaspora-mysql from AUR on ArchLinux ARM
<zenspider> I think you want gem install --platform ruby
xen0fon has joined #ruby
<knutmithut> And it fails during 'gem install unf_ext' which again is listed in the bundle
<knutmithut> Or is there a way to manually install gems from git?
chouhoulis has quit [Remote host closed the connection]
<zenspider> ...first time you mentioned bundler...
chouhoulis has joined #ruby
DLSteve has quit [Quit: All rise, the honorable DLSteve has left the channel.]
sepp2k has quit [Quit: Leaving.]
<knutmithut> well I'm sorry, I have no access to the bundle file itself, as I try installing directly with yaourt from AUR
connor_goodwolf has quit [Ping timeout: 258 seconds]
tvw has quit [Read error: Connection reset by peer]
<knutmithut> So I thought there must be a way to install the gem beforehand, so when bundle runs it is already present
alveric2 has joined #ruby
jhack has quit [Quit: jhack]
alveric1 has quit [Ping timeout: 264 seconds]
ramortegui has quit [Quit: Ex-Chat]
xen0fon has quit [Quit: xen0fon]
CloCkWeRX has joined #ruby
Azure|dc has quit [Quit: Oops.]
Azure has joined #ruby
blaxter has joined #ruby
saneax-_-|AFK is now known as saneax
tolerablyjake has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tolerablyjake has joined #ruby
karapety_ has quit [Remote host closed the connection]
tolerablyjake has quit [Client Quit]
cschneid_ has joined #ruby
connor_goodwolf has joined #ruby
matp has quit [Remote host closed the connection]
matp has joined #ruby
cschneid_ has quit [Ping timeout: 255 seconds]
<zenspider> I have no idea what the words you are using are... so I probably can't help. I'd suggest filing a bug with the projects involved
pandbearit has joined #ruby
pandabearit_ has joined #ruby
Bob8989 has joined #ruby
Derperperd has quit [Ping timeout: 255 seconds]
jhack has joined #ruby
minimalism has quit [Quit: minimalism]
Derperperd has joined #ruby
harai has quit [Ping timeout: 264 seconds]
al2o3-cr has quit [Ping timeout: 240 seconds]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
JeanCarloMachado has quit [Ping timeout: 240 seconds]
mybigsweatyballs has joined #ruby
JeanCarloMachado has joined #ruby
A124 has quit [Ping timeout: 240 seconds]
benlieb has quit [Quit: benlieb]
A124 has joined #ruby
hahuang65 has quit [Ping timeout: 264 seconds]
<knutmithut> I hope I finally got it. In the git gem folder I could run "gem-2.3 build unf_ext.gemspec", "gem-2.3 install unf_ext-0.0.7.2.gem".
AndrewIsHere has quit []
jgnagy has joined #ruby
ur5us has quit [Remote host closed the connection]
marr has quit [Ping timeout: 264 seconds]
blaxter has quit [Quit: foo]
jgnagy has quit [Ping timeout: 240 seconds]
teclator has quit [Remote host closed the connection]
markholmes has quit [Remote host closed the connection]
mhenrixon has quit [Ping timeout: 276 seconds]
GodFather has quit [Read error: Connection reset by peer]
bpmedley has quit [Ping timeout: 240 seconds]
mikeiniowa has quit [Ping timeout: 240 seconds]
ejnahc_ has quit [Ping timeout: 240 seconds]
hahuang65 has joined #ruby
toretore has quit [Ping timeout: 255 seconds]
pandabearit_ has quit [Ping timeout: 258 seconds]
tdump has joined #ruby
ejnahc has joined #ruby
pandbearit has quit [Ping timeout: 255 seconds]
pandbearit has joined #ruby
pandabearit_ has joined #ruby
howdoi has quit [Quit: Connection closed for inactivity]
gloscombe_ has quit [Quit: gloscombe_]
bigtawm has quit []
Channel6 has joined #ruby
tdump_ has joined #ruby
marxarelli is now known as marxarelli|afk
pandabearit_ has quit [Ping timeout: 256 seconds]
pandabearit_ has joined #ruby
<knutmithut> Nope, it still tries to install unf_ext even though 'gem-2.3 which unf_ext' returns the correct path
ur5us has joined #ruby
cagomez has quit []
t-recx has quit [Quit: t-recx]
snguyen has quit [Quit: Textual IRC Client: www.textualapp.com]
zeroDi has quit [Quit: WeeChat 1.7]
skweek has joined #ruby
nettoweb has joined #ruby
jhack has quit [Quit: jhack]
JeanCarloMachado has quit [Ping timeout: 255 seconds]
JeanCarloMachado has joined #ruby
tdump_ has quit [Quit: Textual IRC Client: www.textualapp.com]
pandabearit_ has quit [Quit: Leaving]
pandbearit has quit [Quit: Leaving]
tdump has quit [Quit: Leaving...]
minimalism has joined #ruby
montanonic has quit [Ping timeout: 255 seconds]
username1 has quit [Ping timeout: 252 seconds]
JeanCarloMachado has quit [Ping timeout: 255 seconds]
username_ has quit [Ping timeout: 264 seconds]
djbkd has quit [Quit: My people need me...]
marxarelli|afk is now known as marxarelli
JeanCarloMachado has joined #ruby
Guest69 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
railswebdev has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
andrax has joined #ruby
gevans has joined #ruby
marxarelli is now known as marxarelli|afk
msmith has joined #ruby
jameser has joined #ruby
gevans has quit [Ping timeout: 255 seconds]
Guest69 has joined #ruby
hutch34 has quit [Ping timeout: 255 seconds]
railswebdev has joined #ruby
RickHull has joined #ruby
yqt has quit [Ping timeout: 256 seconds]
andrax has quit [Changing host]
andrax has joined #ruby
antoniobeyah has quit [Quit: Connection closed for inactivity]
enterprisey has joined #ruby
Guest23954 has quit [Ping timeout: 240 seconds]
brent__ has quit [Remote host closed the connection]
nettoweb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Rodya_ has quit [Quit: Leaving...]
Bob8989 has quit [Quit: KVIrc 4.0.4 Insomnia http://www.kvirc.net/]
negatifze has joined #ruby
bmurt has joined #ruby
harai has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
harai has quit [Read error: Connection reset by peer]
harai has joined #ruby
harai has quit [Client Quit]
nettoweb has joined #ruby
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
al2o3-cr has joined #ruby
QoQOoO has joined #ruby
hutch34 has joined #ruby
nettoweb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
TheIliad has quit []
cyphase has joined #ruby
Chagel has joined #ruby
jameser has joined #ruby
msmith has quit [Remote host closed the connection]
postmodern has joined #ruby
karapetyan has joined #ruby
montanonic has joined #ruby
cschneid_ has joined #ruby
bpmedley has joined #ruby
devon21 has quit [Quit: devon21]
danst has quit [Ping timeout: 258 seconds]
cschneid_ has quit [Ping timeout: 255 seconds]
montanonic has quit [Ping timeout: 255 seconds]
danst has joined #ruby
Dimik has quit [Ping timeout: 276 seconds]
karapetyan has quit [Remote host closed the connection]
duderono_ has joined #ruby
duderonomy has quit [Ping timeout: 255 seconds]
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
duderono_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mybigsweatyballs has quit [K-Lined]
cdg_ has quit [Remote host closed the connection]
duderonomy has joined #ruby
cdg has joined #ruby
rrios has joined #ruby
rrios has joined #ruby
rrios has quit [Changing host]
d^sh has quit [Ping timeout: 258 seconds]
d^sh has joined #ruby
devon21 has joined #ruby
r_rios has quit [Ping timeout: 255 seconds]
devon21 has quit [Ping timeout: 264 seconds]
JeanCarloMachado has quit [Ping timeout: 245 seconds]
UnknownSoldier has quit [Remote host closed the connection]
JeanCarloMachado has joined #ruby
montanonic has joined #ruby
devon21 has joined #ruby
govg has quit [Ping timeout: 260 seconds]
JoshS has quit [Ping timeout: 256 seconds]
JeanCarloMachado has quit [Ping timeout: 240 seconds]
JeanCarloMachado has joined #ruby
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Tempesta has quit [Quit: AdiIRC is updating to v2.7 Beta Build (2017/02/08-2) 64 Bit]
Tempesta has joined #ruby
ledestin has joined #ruby
jameser has joined #ruby
enterprisey has quit [Ping timeout: 260 seconds]
chouhoulis has quit [Remote host closed the connection]
Guest23954 has joined #ruby
enterprisey has joined #ruby
gevans has joined #ruby
msmith has joined #ruby
cdg has quit [Remote host closed the connection]
gevans has quit [Ping timeout: 255 seconds]
aryaching has quit [Ping timeout: 240 seconds]
JeanCarloMachado has quit [Ping timeout: 240 seconds]
aryaching has joined #ruby
JeanCarloMachado has joined #ruby
msmith has quit [Remote host closed the connection]
msmith has joined #ruby
msmith has quit [Remote host closed the connection]
sdrew has quit [Quit: *poof*]
charliesome has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
fclausen has quit [Ping timeout: 252 seconds]
charliesome has quit [Client Quit]
jgnagy has joined #ruby
Guest73986 has quit [Remote host closed the connection]
mwlang has quit [Quit: mwlang]
nofxxx has joined #ruby
amclain has quit [Quit: Leaving]
nofxx has quit [Ping timeout: 255 seconds]
JeanCarloMachado has quit [Ping timeout: 240 seconds]
JeanCarloMachado has joined #ruby
enterprisey has quit [Remote host closed the connection]
QoQOoO has quit [Remote host closed the connection]
jameser has quit [Read error: Connection reset by peer]
govg has joined #ruby
ruurd has joined #ruby
ruurd is now known as Guest72384
Guest23954 has quit [Ping timeout: 260 seconds]
Guest69 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
railswebdev has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Guest69 has joined #ruby
railswebdev has joined #ruby
enterprisey has joined #ruby
gix has quit [Ping timeout: 245 seconds]
braincrash has quit [Quit: bye bye]
aryaching has quit [Ping timeout: 258 seconds]
saneax is now known as saneax-_-|AFK
guacamole has quit [Quit: leaving]
guacamole has joined #ruby
fclausen has joined #ruby
gix has joined #ruby
c355e3b has quit [Quit: Connection closed for inactivity]
matp has quit [Remote host closed the connection]
matp has joined #ruby
howdoi has joined #ruby
jcao219 has joined #ruby
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
slash_nick has quit [Ping timeout: 255 seconds]
aryaching has joined #ruby
RickHull has quit [Quit: Leaving.]
Chagel has quit [Ping timeout: 276 seconds]
braincrash has joined #ruby
Guest43 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
montanonic has quit [Ping timeout: 255 seconds]
Chagel has joined #ruby
jenrzzz has quit [Ping timeout: 276 seconds]
devon21 has quit [Quit: devon21]
andrax has quit [Quit: Textual IRC Client: www.textualapp.com]
Chagel has quit [Ping timeout: 240 seconds]
dc4 has joined #ruby
braincrash has quit [Ping timeout: 258 seconds]
Chagel has joined #ruby
negatifze has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
msmith has joined #ruby
Chagel has quit [Ping timeout: 255 seconds]
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
Chagel has joined #ruby
ur5us has quit [Ping timeout: 256 seconds]
cagmz has joined #ruby
last_staff has quit [Quit: last_staff]
patarr has joined #ruby
patarr has quit [Ping timeout: 258 seconds]
jgnagy has quit [Remote host closed the connection]
aryaching has quit [Ping timeout: 256 seconds]
jeyraof has joined #ruby
tlahtoani has quit [Quit: Connection closed for inactivity]
xall has joined #ruby
ivanskie has joined #ruby
awk has left #ruby [#ruby]
Rich_Morin1 has left #ruby [#ruby]
braincrash has joined #ruby
skweek has quit [Ping timeout: 240 seconds]
simmib has joined #ruby
dc4 has quit [Ping timeout: 258 seconds]
username_ has joined #ruby
username1 has joined #ruby
cschneid_ has joined #ruby
msmith has quit [Ping timeout: 256 seconds]
pskosinski has quit [Read error: Connection reset by peer]
pskosinski has joined #ruby
pskosinski is now known as Guest98046
j416 has quit [Ping timeout: 240 seconds]
Dry_Lips has quit [Ping timeout: 255 seconds]
DrCode has quit [Ping timeout: 258 seconds]
Dry_Lips has joined #ruby
Dry_Lips has joined #ruby
Dry_Lips has quit [Changing host]
johnzorn has quit [Read error: Connection reset by peer]
j416 has joined #ruby
nanoguin has quit [Ping timeout: 252 seconds]
cschneid_ has quit [Ping timeout: 255 seconds]
jameser has joined #ruby
johnzorn has joined #ruby
nanoguin has joined #ruby
gevans has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
duderonomy has joined #ruby
pilne has quit [Quit: Quitting!]
gevans has quit [Ping timeout: 260 seconds]
JeanCarloMachado has quit [Ping timeout: 240 seconds]
JeanCarloMachado has joined #ruby
tomzx_mac has joined #ruby
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tomzx_mac has quit [Client Quit]
RickHull has joined #ruby
RickHull has left #ruby [#ruby]
DrCode has joined #ruby
jameser has joined #ruby
hahuang65 has quit [Remote host closed the connection]
tyxk8160 has joined #ruby
JeanCarloMachado has quit [Ping timeout: 245 seconds]
Channel6 has quit [Quit: Leaving]
fclausen has quit [Read error: Connection reset by peer]
tyxk8160 has quit [Remote host closed the connection]
harfangk has joined #ruby
JeanCarloMachado has joined #ruby
rgs_ is now known as rgs
harfangk has quit [Client Quit]
djbkd has joined #ruby
harfangk has joined #ruby
squ has joined #ruby
amagawdd has joined #ruby
amagawdd has quit [Remote host closed the connection]
amagawdd has joined #ruby
renchan has joined #ruby
xall_ has joined #ruby
amagawdd has quit [Ping timeout: 252 seconds]
xall has quit [Ping timeout: 245 seconds]
cibs has quit [Ping timeout: 255 seconds]
Guest69 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
railswebdev has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
cibs has joined #ruby
bigtawm has joined #ruby
<bigtawm> When sorting am unsorted linked list it is best to use merge sort correct?
<bigtawm> an
l4v2 has quit [Quit: l4v2]
dc4 has joined #ruby
marchelzo has quit [Quit: marchelzo]
msmith has joined #ruby
johnzorn has quit [Read error: Connection reset by peer]
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
username1 has quit [Ping timeout: 276 seconds]
username_ has quit [Ping timeout: 276 seconds]
johnzorn has joined #ruby
JeanCarloMachado has quit [Ping timeout: 255 seconds]
JeanCarloMachado has joined #ruby
bocaneri has joined #ruby
jeyraof has quit [Quit: This computer has gone to sleep]
fclausen has joined #ruby
jameser has joined #ruby
DTZUZO has quit [Read error: Connection reset by peer]
marxarelli|afk has quit [Ping timeout: 252 seconds]
jameser has quit [Client Quit]
amagawdd has joined #ruby
montanonic has joined #ruby
xall_ has quit [Quit: WeeChat 1.7]
newrubycoder has joined #ruby
msmith has quit [Ping timeout: 258 seconds]
JeanCarloMachado has quit [Ping timeout: 240 seconds]
username_ has joined #ruby
ivanskie has quit [Quit: Going offline, see ya! (www.adiirc.com)]
JeanCarloMachado has joined #ruby
username1 has joined #ruby
fclausen has quit [Read error: Connection reset by peer]
patarr has joined #ruby
blackwind_123 has quit [Ping timeout: 260 seconds]
username1 has quit [Ping timeout: 255 seconds]
username_ has quit [Ping timeout: 255 seconds]
<baweaver> bigtawm: Array sort in Ruby uses QuickSort.
<baweaver> i.e. no need to write your own
dionysus69 has joined #ruby
patarr has quit [Ping timeout: 258 seconds]
brent__ has joined #ruby
jgnagy has joined #ruby
<apeiros> ruby's array isn't a linked list, though
<baweaver> Ah, didn't see that one.
last_staff has joined #ruby
JoshS has joined #ruby
* apeiros not awake enough to consider how linked list instead of array affects sorting algorithms
brent__ has quit [Ping timeout: 240 seconds]
Anonymoose2 has joined #ruby
jgnagy has quit [Ping timeout: 264 seconds]
reverberations has quit [Ping timeout: 240 seconds]
amagawdd has quit [Remote host closed the connection]
amagawdd has joined #ruby
gevans has joined #ruby
<newrubycoder> anyone knows how i can delete a chunk of an array?
amagawdd has quit [Ping timeout: 240 seconds]
Guest43 has joined #ruby
gevans has quit [Ping timeout: 255 seconds]
<newrubycoder> also i kinda need to rotate the content of the chunks not the order of the chunks hmm
<baweaver> &ri Enumerable
<baweaver> All of it's in there.
<baweaver> either that or here:
<newrubycoder> ty
<baweaver> &ri Array
<baweaver> If you get those modules down you'll figure out much of any problem
<newrubycoder> im attempting a 6 kyu, i will rank up if i make it
tildes has joined #ruby
vadviktor_ has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
vadviktor has joined #ruby
djbkd has quit [Quit: My people need me...]
<baweaver> I think I have 4th Kyu but haven't really bothered with that site in forever.
<baweaver> could probably get to 1st if I wanted to, but too much time. I like solving practical problems more.
DTZUZO has joined #ruby
jdm_ has quit [Remote host closed the connection]
jdm_ has joined #ruby
chouhoulis has joined #ruby
Chagel has quit [Ping timeout: 240 seconds]
cagmz has quit [Read error: Connection reset by peer]
chouhoulis has quit [Ping timeout: 260 seconds]
D100 has left #ruby ["Leaving"]
aufi has joined #ruby
jeyraof has joined #ruby
JeanCarloMachado has quit [Ping timeout: 258 seconds]
dc4 has quit [Ping timeout: 264 seconds]
JeanCarloMachado has joined #ruby
Chagel has joined #ruby
tildes has quit [Ping timeout: 240 seconds]
martencassel has joined #ruby
fclausen has joined #ruby
Chagel has quit [Ping timeout: 258 seconds]
Chagel has joined #ruby
davezd has joined #ruby
dc4 has joined #ruby
Definity has joined #ruby
sniffer has quit [Ping timeout: 256 seconds]
martencassel has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
andikr has joined #ruby
vondruch has joined #ruby
sniffer has joined #ruby
JeanCarloMachado has quit [Ping timeout: 240 seconds]
martencassel has joined #ruby
<kke> hmm where do i put something like "Starting server version #{Server::VERSION}" in my rack app with config.ru so it just comes up once instead of for every worker
<kke> it's running on puma
conta has joined #ruby
ramfjord has quit [Ping timeout: 255 seconds]
fclausen has quit [Quit: Lost terminal]
JeanCarloMachado has joined #ruby
martencassel has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
jeyraof has quit [Quit: This computer has gone to sleep]
montanonic has quit [Ping timeout: 255 seconds]
martencassel has joined #ruby
jeyraof has joined #ruby
<nofxxx> This error: "Errno::ENOENT: No such file or directory @ fptr_finalize - /sys/devices/platform/bone_capemgr/slots" is happening on #close, and not on #open... it's 'w' operationa actually. Maybe some watcher is reloading this file after ruby writes to it?
<nofxxx> is there a 'write and forget' write?
blaxter has joined #ruby
<nofxxx> File.open("#{get_capemgr_dir}/slots", 'w') { |f| f.write(name) }
Derperperd has quit [Ping timeout: 240 seconds]
JeanCarloMachado has quit [Ping timeout: 255 seconds]
JeanCarloMachado has joined #ruby
teclator has joined #ruby
Chagel has quit [Ping timeout: 264 seconds]
simmib has quit [Ping timeout: 276 seconds]
simmib has joined #ruby
<nofxxx> hm, forget about it, error is somewhere else but failing on that write, strange
futilegames has joined #ruby
csk157 has joined #ruby
CloCkWeRX has quit [Quit: Leaving.]
Chagel has joined #ruby
nadir has quit [Quit: Connection closed for inactivity]
LoneHerm_ has joined #ruby
Dimik has joined #ruby
aganov has joined #ruby
mlkkk has joined #ruby
SesMan has joined #ruby
tildes has joined #ruby
TomyWork has joined #ruby
saneax-_-|AFK is now known as saneax
DaveTaboola has quit [Ping timeout: 255 seconds]
jcao219 has quit [Ping timeout: 276 seconds]
JeanCarloMachado has quit [Ping timeout: 256 seconds]
jaruga______ has joined #ruby
jaruga______ is now known as jaruga_______
futilegames_ has joined #ruby
xen0fon has joined #ruby
lxsameer has joined #ruby
mlkkk has quit [Remote host closed the connection]
futilegames has quit [Ping timeout: 260 seconds]
futilegames_ is now known as futilegames
Chagel has quit [Ping timeout: 245 seconds]
troulouliou_div2 has joined #ruby
TomyWork has quit [Remote host closed the connection]
mark_66 has joined #ruby
tildes has quit [Ping timeout: 240 seconds]
Silthias has joined #ruby
enterprisey has quit [Read error: Connection reset by peer]
Chagel has joined #ruby
teclator has quit [Read error: Connection reset by peer]
Silthias1 has joined #ruby
Silthias2 has quit [Ping timeout: 255 seconds]
Silthias has quit [Ping timeout: 240 seconds]
grh has joined #ruby
tildes has joined #ruby
msmith has joined #ruby
jeyraof has quit [Quit: This computer has gone to sleep]
futilegames has quit [Quit: futilegames]
paradisaeidae has joined #ruby
paradisaeidae_ has joined #ruby
aupadhye has joined #ruby
postmodern has quit [Quit: Leaving]
patarr has joined #ruby
anisha has joined #ruby
teclator has joined #ruby
gevans has joined #ruby
patarr has quit [Ping timeout: 240 seconds]
cgfbee has joined #ruby
jeyraof has joined #ruby
gevans has quit [Ping timeout: 255 seconds]
Derperperd has joined #ruby
jcao219 has joined #ruby
alveric2 has quit [Quit: WeeChat 1.7]
mlkkk has joined #ruby
Derperperd has quit [Ping timeout: 245 seconds]
TheHodge has joined #ruby
JoshS has quit [Ping timeout: 256 seconds]
marr has joined #ruby
mikecmpbll has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
brent__ has joined #ruby
davezd has quit [Quit: Leaving]
msmith has quit [Ping timeout: 252 seconds]
Shashikant86 has joined #ruby
toretore has joined #ruby
shortCircuit__ has joined #ruby
<shortCircuit__> hi
brent__ has quit [Ping timeout: 240 seconds]
kshitij has quit [Quit: Connection closed for inactivity]
JeanCarloMachado has joined #ruby
maloik has quit [Remote host closed the connection]
maloik has joined #ruby
<shortCircuit__> how do I make the logic for a weighted scheduler.. like if I have a hash say { provider1: 2, provider2: 5, provider3: 3 } then suppose I call a method.. b = LoadBalancer.new(providers) 20.times { b.get_provider }. it would return provide1 provider1, provider3 3 times and the provider5 5times and back to provider1
<shortCircuit__> the thing is the number of providers can be like any number
tildes has quit [Ping timeout: 240 seconds]
<shortCircuit__> this is what I have .. but its not quite working
conta has quit [Ping timeout: 252 seconds]
TomyWork has joined #ruby
LoneHerm_ has quit [Remote host closed the connection]
LoneHerm_ has joined #ruby
LoneHerm_ has quit [Remote host closed the connection]
<toretore> don't use @@class vars
LoneHermit has joined #ruby
Shashikant86 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
conta has joined #ruby
<shortCircuit__> I can get rid of that with instance variable.. but that's beside the point
martencassel has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
scootaloo has joined #ruby
<scootaloo> Hello
<scootaloo> I'm looking for tools/process to analyse ruby memory usage, do you have any leads?
martencassel has joined #ruby
LoneHermit has quit [Ping timeout: 240 seconds]
<toretore> shortCircuit__: if you're not going to be handling lots of providers, you can just flatten them like `@providers = providers.reduce([]){|a,(p,c)| a + ([p] * c) }`
<toretore> then you just need to keep count of the current index
martencassel has left #ruby [#ruby]
paradisaeidae has quit [Ping timeout: 240 seconds]
<toretore> but shouldn't a load balancer ideally, you know, balance the load and not return the same provider until it's "empty"?
paradisaeidae_ has quit [Ping timeout: 260 seconds]
jcao219 has quit [Ping timeout: 252 seconds]
<shortCircuit__> I didn't get the last bit
<shortCircuit__> oh
<toretore> in your example you get [p1, p1, p1, p2, p2, p2], shouldn't it be [p1, p2, p1, p2, p1, p2]?
<shortCircuit__> I am doing a weighted one .. a simple load balancer would have been easier
JoshS has joined #ruby
<toretore> a weighted lb still balances the load
<shortCircuit__> I mean I have like 2 to 4 services, and the I want to assign some weight and let the load balancer decide which service to use .. so that u know if one service performs bad then I decrease the weight.
<shortCircuit__> my only experience with load balancer has been like (count + 1) % total .. so yeah I can be wrong about the way I am doing it :P
<toretore> a load balancer of {p1: 2, p2: 4} should ideally give you [p2, p2, p1, p2, p2, p1]
Dimik has quit [Ping timeout: 252 seconds]
<toretore> or [p1, p2, p2, p1, p2, p2]
<shortCircuit__> ok.. but what is the algorithm like..
<toretore> no idea, i've just had my morning coffee and my brain isn't ready to think yet
<shortCircuit__> :D
<shortCircuit__> ok
jeyraof has quit [Quit: This computer has gone to sleep]
<toretore> an easy but inefficient implementation would be `loop{ ps=providers.inject([]){|a,(p,w)| a + [[p]*w] }; until ps.empty?; ps.each{|a| yield a.pop }; end }`
knutmithut has quit [Ping timeout: 245 seconds]
biberu has joined #ruby
<toretore> `loop{ ps=providers.inject([]){|a,(p,w)| a + [[p]*w] }; until ps.empty?; ps.each{|a| yield a.pop }; ps.reject!(&:empty?); end }`
paradisaeidae has joined #ruby
paradisaeidae_ has joined #ruby
nettoweb has joined #ruby
LoneHerm_ has joined #ruby
kristofferR has quit [Quit: Textual IRC Client: www.textualapp.com]
matp has quit [Quit: ZZzzzZz...]
karapetyan has joined #ruby
dhollinger has quit [Ping timeout: 240 seconds]
tomphp has joined #ruby
dhollinger has joined #ruby
blackmesa has joined #ruby
jeyraof has joined #ruby
gregf_ has joined #ruby
vasilakisfil has quit [Quit: Konversation terminated!]
ocbtec has joined #ruby
CloCkWeRX has joined #ruby
anisha_ has joined #ruby
anisha has quit [Ping timeout: 240 seconds]
troulouliou_div2 has quit [Remote host closed the connection]
karapetyan has quit [Remote host closed the connection]
Beams has joined #ruby
palash has joined #ruby
frmendes has joined #ruby
frmendes has quit [Client Quit]
simmib__ has joined #ruby
dionysus69 has quit [Ping timeout: 240 seconds]
<newrubycoder> guys anyone know how i add else lines to one line return lines?
<newrubycoder> i mean lines like this: return "" if sz > str.length or sz == 0
<canton7> "else lines"?
karapetyan has joined #ruby
<newrubycoder> else do x you know?
<canton7> maybe you're after a ternary? return sz > str.length || sz == 0 ? "" : something_else
<newrubycoder> thanks i will try it :)
<canton7> or you can write it out as an if/else, with two return statements
simmib has quit [Ping timeout: 276 seconds]
<scootaloo> yeah, you can write it as separate lines, no need to one-line everything
<newrubycoder> i find one line return lines better as i dont have to worry about writing end
jameser has joined #ruby
<scootaloo> remember that clear code > short code
simmib__ has quit [Read error: Connection reset by peer]
blackwind_123 has joined #ruby
jeyraof has quit [Quit: This computer has gone to sleep]
ferr1 has joined #ruby
blackmesa has quit [Ping timeout: 255 seconds]
nOwz has joined #ruby
palash has quit []
nOwz has quit [Client Quit]
nOwz has joined #ruby
mlkkk has quit [Remote host closed the connection]
simmib_ has joined #ruby
<apeiros> return is usually a spaghetti indicator
<apeiros> early returns being an acceptable exception
flying has joined #ruby
ldnunes has joined #ruby
Shashikant86 has joined #ruby
JeanCarloMachado has quit [Ping timeout: 245 seconds]
Chagel has quit [Ping timeout: 245 seconds]
nofxxx has quit [Ping timeout: 240 seconds]
jenrzzz has quit [Ping timeout: 258 seconds]
gevans has joined #ruby
JeanCarloMachado has joined #ruby
<lyda> is tenderlove around?
<lyda> kind of hoping to see one of the two (three?) PRs for mmap accepted.
thejoecarroll_ has joined #ruby
thejoecarroll has quit [Read error: Connection reset by peer]
mhenrixon has joined #ruby
mlkkk has joined #ruby
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
karapetyan has quit [Remote host closed the connection]
jameser has joined #ruby
gevans has quit [Ping timeout: 255 seconds]
patarr has joined #ruby
<newrubycoder> the .drop command won't work with negative values?
<newrubycoder> how do i drop the last part of an array then?
kristofferR has joined #ruby
Shashikant86 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ramfjord has joined #ruby
<newrubycoder> i mean i guess i could reverse the array then drop the first part then reverse it back but that seems inefficient lol
<scootaloo> .delete_at
<newrubycoder> ty
tvw has joined #ruby
<ljarvis> .pop
<al2o3-cr> ^ this
<scootaloo> ah yes better
patarr has quit [Ping timeout: 276 seconds]
<ljarvis> also, you don't want drop for removing elements from the front either, you want shift
<ljarvis> drop doesn't remove anything
jgnagy has joined #ruby
<al2o3-cr> and Array#unshift to add to the beginning of an array
Derperperd has joined #ruby
jgnagy has quit [Ping timeout: 264 seconds]
tvw has quit [Read error: Connection reset by peer]
tvw has joined #ruby
<newrubycoder> i guess delete_at is a mutator?
pandaant has joined #ruby
LoneHerm_ has quit [Remote host closed the connection]
ledestin has quit [Quit: Textual IRC Client: www.textualapp.com]
Derperperd has quit [Ping timeout: 255 seconds]
LoneHerm_ has joined #ruby
msmith has joined #ruby
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Shashikant86 has joined #ruby
LoneHerm_ has quit [Ping timeout: 240 seconds]
cschneid_ has joined #ruby
brent__ has joined #ruby
<ljarvis> it is
kith has joined #ruby
cschneid_ has quit [Ping timeout: 255 seconds]
brent__ has quit [Ping timeout: 260 seconds]
dviola has joined #ruby
CloCkWeRX has quit [Quit: Leaving.]
pragmaticus has joined #ruby
dionysus69 has joined #ruby
xen0fon has quit [Remote host closed the connection]
<atmosx> Hello, I'm trying to work with a SOAP server using savon: http://savonrb.com/version2/client.html .. I have a local wsdl file (with namespace definitions) and endpoint is at 127.0.0.1:8080 ... I can't seem to understand how to pass these options together.
xen0fon has joined #ruby
jameser has joined #ruby
<atmosx> nevermind I got it :-P
scootaloo has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
anisha_ has quit [Quit: Leaving]
Guest98046 has quit [Changing host]
Guest98046 has joined #ruby
Guest98046 has joined #ruby
Guest98046 is now known as pskosinski
mlkkk has quit [Remote host closed the connection]
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
msmith has quit [Ping timeout: 240 seconds]
jameser has joined #ruby
<marahin> Is there any Ruby library that allows making a screenshot of a webpage that does __NOT__ use phantom.js?
lxsameer has quit [Read error: Connection reset by peer]
lxsameer has joined #ruby
patarr has joined #ruby
saneax is now known as saneax-_-|AFK
biberu has quit []
biberu has joined #ruby
<apeiros> marahin: selenium, capybara with non-phantomjs based drivers
<marahin> apeiros thank you!
<apeiros> (e.g. headless webkit)
patarr has quit [Ping timeout: 245 seconds]
matp has joined #ruby
paradisaeidae has quit [Quit: ChatZilla 0.9.93 [Firefox 51.0.1/20170125094131]]
paradisaeidae_ has quit [Quit: ChatZilla 0.9.93 [Firefox 51.0.1/20170125094131]]
xen0fon1 has joined #ruby
xen0fon has quit [Ping timeout: 258 seconds]
xen0fon1 is now known as xen0fon
saneax-_-|AFK is now known as saneax
sepp2k has joined #ruby
scootaloo has joined #ruby
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
c355e3b has joined #ruby
johnzorn has quit [Read error: Connection reset by peer]
johnzorn has joined #ruby
govg has quit [Ping timeout: 255 seconds]
johnzorn has quit [Read error: Connection reset by peer]
saneax is now known as saneax-_-|AFK
johnzorn has joined #ruby
radic has quit [Ping timeout: 240 seconds]
jaruga_______ has quit [Remote host closed the connection]
gevans has joined #ruby
saneax-_-|AFK is now known as saneax
jameser has joined #ruby
radic has joined #ruby
shadeslayer has quit [Ping timeout: 264 seconds]
gevans has quit [Ping timeout: 255 seconds]
shadeslayer has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
csk157 has quit [Ping timeout: 258 seconds]
jenrzzz has quit [Ping timeout: 260 seconds]
nettoweb1 has joined #ruby
nettoweb has quit [Ping timeout: 240 seconds]
blaxter has quit [Quit: foo]
jgnagy has joined #ruby
Shashikant86 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Abhijit has joined #ruby
<Abhijit> hi
k13nox has joined #ruby
<Abhijit> is there any standalone / inbuilt dictionary gem I can use ?
astrobunny has joined #ruby
lxsameer has quit [Quit: WeeChat 1.6]
astrobunny has quit [Remote host closed the connection]
Shashikant86 has joined #ruby
astrobunny has joined #ruby
kobain has joined #ruby
Shashikant86 has quit [Client Quit]
c355e3b has quit []
Derperperd has joined #ruby
nadir has joined #ruby
xen0fon has quit [Quit: xen0fon]
tyang has joined #ruby
UnknownSoldier has joined #ruby
Derperperd has quit [Ping timeout: 252 seconds]
millerti has joined #ruby
tyang_ has joined #ruby
chouhoulis has joined #ruby
synthroid has joined #ruby
tyang has quit [Ping timeout: 255 seconds]
simmib_ has quit [Remote host closed the connection]
simmib has joined #ruby
mlkkk has joined #ruby
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
synthroi_ has joined #ruby
jameser has joined #ruby
simmib has quit [Ping timeout: 260 seconds]
nowhereman has joined #ruby
synthroid has quit [Ping timeout: 240 seconds]
jameser has quit [Client Quit]
jameser has joined #ruby
danguita has joined #ruby
chouhoulis has quit [Remote host closed the connection]
chouhoulis has joined #ruby
<newrubycoder> is it possible to use functions within .map?
nettoweb1 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<newrubycoder> like can i arr.map { .reverse } ?
brent__ has joined #ruby
<al2o3-cr> newrubycoder: yep
<al2o3-cr> >> ["one", "two"].map { |str| str.reverse }
<ruby[bot]> al2o3-cr: # => ["eno", "owt"] (https://eval.in/734734)
<newrubycoder> wow thanks :D thought you had to use maths
plantfood has joined #ruby
<herwin> or shorter: ["one", "two"].map(&:reverse)
t-recx has joined #ruby
brent__ has quit [Ping timeout: 256 seconds]
synthroid has joined #ruby
malconis has joined #ruby
malconis_ has joined #ruby
synthroi_ has quit [Ping timeout: 256 seconds]
kobain has quit [Ping timeout: 252 seconds]
malconis has quit [Ping timeout: 255 seconds]
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
<dminuoso> >> %w{bar quux}.inject(<<-FOO) { |m, o| m += o } foo FOO
<ruby[bot]> dminuoso: # => /tmp/execpad-8eab57ba690c/source-8eab57ba690c:7: can't find string "FOO" anywhere before EOF ...check link for more (https://eval.in/734738)
<dminuoso> y u no work.
squ has quit [Remote host closed the connection]
<dminuoso> Im trying to do a naughty, but Ruby wont let me.
<dminuoso> :(
blackmesa has joined #ruby
<herwin> the heredoc needs to be on its own line
jenrzzz has quit [Ping timeout: 264 seconds]
synthroi_ has joined #ruby
<dminuoso> herwin: Ah.
<dminuoso> That's a shame.
charliesome has joined #ruby
synthroid has quit [Ping timeout: 255 seconds]
charliesome has quit [Ping timeout: 245 seconds]
despai has joined #ruby
thelacce has joined #ruby
thelacce has quit [Client Quit]
troulouliou_div2 has joined #ruby
brent__ has joined #ruby
kobain has joined #ruby
kobain has quit [Excess Flood]
flying has quit []
kobain has joined #ruby
tlahtoani has joined #ruby
astrobunny has quit [Ping timeout: 255 seconds]
<newrubycoder> wow i had a problem with .map, it tried to reverse single digits rather than the order of these single digits within the array
brent__ has quit [Ping timeout: 255 seconds]
astrobunny has joined #ruby
<tlahtoani> It didn't try to do anything, it did what you told it to :P
nowhereman has quit [Ping timeout: 240 seconds]
<tlahtoani> What was the code you were using
msmith_ has joined #ruby
jhack has joined #ruby
Shashikant86 has joined #ruby
vondruch_ has joined #ruby
<newrubycoder> wait i may have done something wrong
jhack has quit [Client Quit]
<al2o3-cr> newrubycoder: if you want to reverse the order of an array simply arr.reverse
<newrubycoder> well it's a bunch of arrays inside an array
<newrubycoder> but i may have gotten it now
bybb_ has joined #ruby
vondruch has quit [Ping timeout: 256 seconds]
<al2o3-cr> a 2d array
<tlahtoani> You can do arr.each {|a| a.reverse }
<toretore> `narr = arr.map{|a| a.reverse }` or `arr.each{|a| a.reverse! }`
despai has quit [Ping timeout: 240 seconds]
jhack has joined #ruby
despai has joined #ruby
<dminuoso> arr.map(&:reverse)
<dminuoso> arr.map(&:reverse!)
ocbtec has quit [Quit: leaving]
<tlahtoani> So concise
Shashikant86 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dyjakan_ is now known as dyjakan
ramortegui has joined #ruby
shortCircuit__ has quit [Quit: Page closed]
gevans has joined #ruby
aaa has joined #ruby
_mak has joined #ruby
<_mak> hi there
<_mak> is there a way to convert a hash object (Google::Cloud::Datastore::Entity:0x00000002658a68 hash) into json?
<_mak> when I do obj.to_json I get: => "\"#<Google::Cloud::Datastore::Entity:0x00000002658a68>\""
<rob__> _mak: require 'json'; hash.to_json
<rob__> _mak: can you display full code
<dminuoso> _mak: That means you have a string.
<dminuoso> _mak: whatever obj is, it's a string already.
<dminuoso> _mak: Or it has a serializer that produces said string.
despai has quit [Ping timeout: 260 seconds]
bmurt has joined #ruby
nettoweb has joined #ruby
gevans has quit [Ping timeout: 255 seconds]
<_mak> I'm trying to get the @hash part into json
<_mak> also, I don't get why I don't get what's going on with this object :D
__Yiota has joined #ruby
<toretore> it's not a hash
<toretore> it's a Google::Cloud::Datastore::Entity
<_mak> yeah
<_mak> which is not a 'normal' ruby object I guess
<_mak> that's why the to_json is not working I guess
fabio has joined #ruby
<havenwood> _mak: Check the docs for a solution.
fabio is now known as Guest84501
nettoweb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<havenwood> _mak: How do you turn an instance of a #<Google::Cloud::Datastore::Entity:...> into a Hash?
<toretore> also, define what "turn into a hash" actually means
<_mak> there's a hash in there
<_mak> I just don't know how to get there
<havenwood> "The properties can be converted to a hash: prop_hash = task.properties.to_h"
<_mak> oh, with 'dot'!
skweek has joined #ruby
vondruch_ is now known as vondruch
Abhijit has quit [Ping timeout: 240 seconds]
DLSteve has joined #ruby
<_mak> havenwood: thanks mate, in my stupidity I've tried to bruteforce it with stuff like obj[:properties], obj['properties']
jtperreault has quit [Quit: WeeChat 0.4.2]
OTORelic has joined #ruby
<newrubycoder> is it possible to get several true or false outputs?
<toretore> elaborate
<Guest84501> you can return an hash {output1: true, output2: false, .. } and use result[:output1]
saneax is now known as saneax-_-|AFK
<newrubycoder> toretore: well i got several arrays within an array, and i need to check each of them true or false to decide if they should be .rotated or .reversed
<herwin> "each of them true or false" ??
<al2o3-cr> newrubycoder: need more context then that
<toretore> ?code newrubycoder
<ruby[bot]> newrubycoder: We can't help you without your code, please post it to https://gist.github.com
BTRE has quit [Ping timeout: 245 seconds]
<toretore> newrubycoder: from now on, each time you ask a question, you should also provide code in the form of a gist. it's a lot easier to understand what you're asking by looking at the code
astrobunny has quit [Remote host closed the connection]
<newrubycoder> toretore: my code is a joke, you probably want to execute me for it but here it is https://gist.github.com/anonymous/cf609a023d43993ff4240d887e35cbde
<herwin> `chmod +x newrubycoder`
<herwin> makes it easier to execute you
<scootaloo> /kick herwin bad joke
<toretore> newrubycoder: try to use meaningful names, not short ones
BTRE has joined #ruby
gnufied has quit [Ping timeout: 255 seconds]
grh has quit [Remote host closed the connection]
terens has quit [Remote host closed the connection]
<newrubycoder> basically i need to test bye.even? for every chunk, and rotate or reverse each chunk based on the individual output
braincrash has quit [Ping timeout: 240 seconds]
<toretore> first, describe what `devrot` is supposed to do
bybb_ has left #ruby [#ruby]
<newrubycoder> The input is a string str of digits. Cut the string into chunks of size sz (ignore the last chunk if its size is less than sz). If a chunk represents an integer such as the sum of the cubes of its digits is divisible by 2, reverse it; otherwise rotate it to the left by one position. Put together these modified chunks and return the result as a stri
<newrubycoder> ng.
<toretore> you have to get past the "fewer lines is better" mentality, it's part of what makes your code difficult to understand
plantfood has quit [Ping timeout: 245 seconds]
<toretore> clarity > brevity
<newrubycoder> examples: revrot("123456987654", 6) --> "234561876549"
polishdub has joined #ruby
dionysus69 has quit [Ping timeout: 258 seconds]
Derperperd has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
tvw has quit [Read error: Connection reset by peer]
cpruitt has joined #ruby
ocbtec has joined #ruby
flying has joined #ruby
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Fernando-Basso has joined #ruby
gnufied has joined #ruby
Guest69 has joined #ruby
railswebdev has joined #ruby
jameser has joined #ruby
teclator has quit [Ping timeout: 256 seconds]
Derperperd has quit [Ping timeout: 240 seconds]
blackmesa has joined #ruby
<toretore> newrubycoder: here's an update to make it more readable, with no changes in funcionality: https://gist.github.com/toretore/d2788393d03969e50740ec5219093c22
shinnya has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<newrubycoder> thanks it looks way better lol
l4v2 has joined #ruby
<Zarthus> that depends on what you mean with more readable :P
<Zarthus> i'd hate to see the first version
<newrubycoder> wait i think hey disappeared
<Zarthus> i'd get rid of the if-else and just make the if explicitly return
Rodya_ has joined #ruby
<Zarthus> the variable names are also confusing
<newrubycoder> oh hey is character groups
<toretore> here's a second change to work with numbers instead of strings: https://gist.github.com/toretore/d2788393d03969e50740ec5219093c22/90c8b125e11bd9e8be1a0fd18bb930ee88c84ce5
<toretore> do you understand the changes?
<dminuoso> Early returns please.
<toretore> that's a code smell, and it's harder to read
<dminuoso> That is harder to read, than long crazy nested blocks?
<toretore> and in this case counter-productive because the emphasis is on beginner friendly
<dminuoso> Easy to read code is beginner friendly.
<dminuoso> If you can look at it, and immediately understand what it does -> its beginner/maintenance friendly.
<elomatreb> Why have the return inside a block and not use the modifier if?
<dminuoso> elomatreb: Personal style, I avoid modifier_if/modifier_unless like the best
<toretore> stop the bike shedding please
<newrubycoder> yeah i understand i think, you made it integers i think
<dminuoso> because the order of code does not follow execution flow
<dminuoso> *like the pest
<dminuoso> :P
<toretore> newrubycoder: not that i forgot to change the last two `hey`s to `digit_groups`
<toretore> *note
<toretore> newrubycoder: `digit_groups` when you have str="123456" and size=2 is [[1,2], [3,4], [5,6]]
vondruch_ has joined #ruby
<toretore> before, it would be ["12", "34", "56"]
<elomatreb> dminuoso: I agree on the execution flow problem, but having the actual return keyword come first in a line makes it clear (for me) that I'm dealing with some early-return condition
* elomatreb likes his bikes in a blue shed please
Derperperd has joined #ruby
<toretore> "early return" is not a thing, it's just a different way of writing if-else
<toretore> and, like goto, an abomination
<elomatreb> I don't agree, it gets handling the simple cases out of the way first (usually), makes it clearer the rest of your method does something more complex
<newrubycoder> yeah now i get numbers without quotes
<newrubycoder> is that better?
dionysus69 has joined #ruby
<toretore> no, you misread
Guest43 has quit [Ping timeout: 240 seconds]
<toretore> read what i wrote again
<toretore> do you understand the difference between "12" and [1,2]?
ChiefAlexander has joined #ruby
vondruch has quit [Ping timeout: 256 seconds]
<newrubycoder> yes but 2 sec
mikeXsh has joined #ruby
<toretore> newrubycoder: it's important that you know the exact shape of your data as it goes through and is transformed by your code
<toretore> newrubycoder: you should open up an irb session and play around with stuff to get a feel for it
<toretore> >> "123456".chars.map{|c| c.to_i }.each_slice(2).to_a
<ruby[bot]> toretore: # => [[1, 2], [3, 4], [5, 6]] (https://eval.in/734804)
<toretore> >> "123456".chars.each_slice(2).to_a
blackmesa has quit [Ping timeout: 258 seconds]
<ruby[bot]> toretore: # => [["1", "2"], ["3", "4"], ["5", "6"]] (https://eval.in/734805)
<toretore> >> 1 + 2
<ruby[bot]> toretore: # => 3 (https://eval.in/734807)
<newrubycoder> but didnt my original code do this: [["7", "3", "3", "0", "4"]
<toretore> >> "1" + "2"
<toretore> no, it would have been [["7", "3"], ["3", "0"], ["4"]]
<newrubycoder> yeah if sz was 2 and i would discard last array
bmurt has joined #ruby
<newrubycoder> is it better to get [7, 3] than ["7", "3"]
<toretore> in this case, yes, because you are using them as numbers, not strings
chouhoul_ has joined #ruby
<toretore> ok, so on line #10, you have a `digit groups` of [[7,3], [3,0]] after removing the [4]
<toretore> what is your next step?
chouhoulis has quit [Ping timeout: 255 seconds]
nettoweb has joined #ruby
vondruch_ has quit [Quit: vondruch_]
jz has joined #ruby
jz is now known as Guest23394
<newrubycoder> i take the sum of the squares of the arrays and check if they're divisible by 2, so 7 squared would be 2 and 3 would be 1, the sum would be 3, which is not divisible by 2 so it will .rotate, the same for the other array, but let's say it is divisible by 2, so i get 2 values right but i dont know how to fetch 2 values and react to them
mlkkk has quit []
<newrubycoder> first one would be false, second one true, i need some way to connect the first output to the first array and second to the second array
johnzorn has quit [Ping timeout: 264 seconds]
vondruch_ has joined #ruby
Exuma has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
<toretore> you write "7 squared", but that's 49. do you mean floor(sqrt(n)) ?
patarr has joined #ruby
<newrubycoder> oh i mean square rooted
<newrubycoder> or cubed
jcao219 has joined #ruby
<newrubycoder> wow maybe i misunderstood the maths
<newrubycoder> but i can change the maths logic easily
charliesome has joined #ruby
<newrubycoder> i still need a way to connect several outputs with several arrays
jenrzzz has quit [Ping timeout: 255 seconds]
antoniobeyah has joined #ruby
<toretore> ok, so you perform some operation on each digit group, doesn't matter which
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
simmib has joined #ruby
<toretore> you have 2 cases: case 1 and case 2; what happens in each?
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<newrubycoder> case 1 false, i rotate, case 2 true, i reverse
patarr has quit [Ping timeout: 264 seconds]
patarr has joined #ruby
charliesome has quit [Ping timeout: 245 seconds]
<toretore> if result % 2 == 0; case1; else; case2; end
newrubycoder has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
<toretore> these are the cases, right?
<toretore> it must be one of those two
newrubycoder has joined #ruby
vondruch_ has quit [Quit: vondruch_]
devon21 has joined #ruby
TheHodge has quit [Quit: Connection closed for inactivity]
blackwind_123 has quit [Ping timeout: 255 seconds]
torQue_ has joined #ruby
blackwind_123 has joined #ruby
Abhijit has joined #ruby
Abhijit has quit [Client Quit]
vondruch_ has joined #ruby
flyingX has joined #ruby
<newrubycoder> sorry i got disconnected had to check log
aganov has quit [Remote host closed the connection]
<newrubycoder> yeah it's 2 cases
flying has quit [Ping timeout: 260 seconds]
<toretore> if result % 2 == 0; case1; else; case2; end
<toretore> these 2 cases, and always one of the two?
mark_66 has quit [Remote host closed the connection]
<newrubycoder> yeah can only be true or false since empty numbers are already taken care of
nowhereman has joined #ruby
<toretore> ok, more specific now:
<toretore> if result % 2 == 0; reverse; else; rotate; end
<toretore> now you must define precisely what reverse and rotate means
last_staff has quit [Quit: last_staff]
radic has quit [Ping timeout: 260 seconds]
montanonic has joined #ruby
jcao219 has quit [Ping timeout: 252 seconds]
patarr has quit [Ping timeout: 240 seconds]
<newrubycoder> .map(&:rotate) .map(&:reverse) i think is right for arrays
cschneid_ has joined #ruby
patarr has joined #ruby
<toretore> what do you think those do?
gevans has joined #ruby
Shashikant86 has joined #ruby
teclator has joined #ruby
<newrubycoder> takes each part of the array respectively and does the code on it
<newrubycoder> rotate rotates 1 space to left and reverse reverses it
<soahccc> Module#prepend is included(haha get it) since 2.0 right?
<toretore> >> [1,2,3].rotate # newrubycoder
<ruby[bot]> toretore: # => [2, 3, 1] (https://eval.in/734847)
negatifze has joined #ruby
<toretore> >> a=[1,2,3]; a.rotate; a # newrubycoder
<ruby[bot]> toretore: # => [1, 2, 3] (https://eval.in/734848)
gevans has quit [Ping timeout: 255 seconds]
<toretore> did you understand these two?
<toretore> one results in [2,3,1] and the other [1,2,3]. why?
Rodya_ has quit [Remote host closed the connection]
<newrubycoder> not sure to be honest, the first one isn't a real array?
Rodya_ has joined #ruby
<toretore> ` a=[1,2,3]; a.rotate; a` is a series of 3 expressions. the value of the last expression is returned, and that's what you're seeing ruby[bot] print out
<toretore> that is, the value of `a`
<toretore> `a` is the same as when it was defined in expression 1, despite expression 2 being `a.rotate`. why?
<toretore> and the result of the expression `a.rotate` is `[2,3,1]`
conta has quit [Ping timeout: 245 seconds]
<newrubycoder> thinking hard but i dont know
<phreakocious> you might say he's banging away at the problem ;)
Rodya_ has quit [Remote host closed the connection]
cdg has joined #ruby
negatifze has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<toretore> newrubycoder: the expression `a.rotate` *returns* [2,3,1] but it doesn't *change* `a`
Xentil has joined #ruby
<newrubycoder> so it's like a non mutagen?
<toretore> a is still the same after you call rotate on it
<toretore> yes
<toretore> >> a=[1,2,3]; a.rotate!; a
<ruby[bot]> toretore: # => [2, 3, 1] (https://eval.in/734849)
<toretore> what's the difference?
<newrubycoder> the ! mutated it i think
<toretore> yes, exactly
<newrubycoder> yeah that's pretty useful actually
<toretore> this may be important, depending on how you choose to implement your solution
synthroi_ has quit [Remote host closed the connection]
jtperreault has joined #ruby
<toretore> anyway, let's get on it. your definition of "rotates the array" is still ambiguous, which array are you talking about?
eblip has quit [Quit: WeeChat 1.4]
A124 has quit [Ping timeout: 252 seconds]
Rodya_ has joined #ruby
<newrubycoder> rotates the content of the arrays within the array
negatifze has joined #ruby
<newrubycoder> and i guess all of them right now or the ones i choose, but i want it to act selectively
<toretore> yes, but you still haven't explained exactly when and where you will be calling rotate/reverse
A124 has joined #ruby
gevans has joined #ruby
gevans has quit [Remote host closed the connection]
Exuma has quit [Quit: Textual IRC Client: www.textualapp.com]
<newrubycoder> if the array in question returns false based on the mathematical comparisons, i want to call rotate, else reverse
<toretore> what is "the array" here?
ChiefAlexander has quit [Quit: Leaving...]
<toretore> you have `[[7,3], [3,0]]` - 3 arrays in all
roger_rabbit has quit [Changing host]
roger_rabbit has joined #ruby
devon21 has quit [Quit: devon21]
<newrubycoder> never the superarray, but the metaarrays kinda, i want both of them to be compared, maybe not at the same time, but in one operation sort of
hobodave has joined #ruby
<toretore> what does that mean, not at the same time, but in one operation?
<toretore> are you talking about taking each of them in turn, then running the as-of-yet-undefined mathematical operation on it and then reversing or mutating?
flyingX has quit []
synthroid has joined #ruby
<newrubycoder> like first it compares true or false on the first meta array, then puts the output into a buffer, then does the same on the second meta array, then releases the buffer
tuelz has joined #ruby
dc4 has quit [Ping timeout: 258 seconds]
<tuelz> is there a 'shortcut' to using keywords args in a class init to set ivars?
<toretore> no
<tuelz> what's the cleanest way to setup ivars on init? just @ivar = ivar_from_arg
<tuelz> ?
<toretore> args.each{|k,v| instance_variable_set("@#{k}", v) }
<toretore> or args.each{|k,v| send("#{k}=", v) }
<toretore> if you have setters
<tuelz> gotcha, I don't think I have enough init vars to justify something clever yet
<tuelz> thanks though
<toretore> another option is to store the args as @args and have getters and/or setters operate directly on it
<toretore> def foo; @options[:foo]; end
simmib has quit [Remote host closed the connection]
simmib_ has joined #ruby
jcao219 has joined #ruby
ldnunes has quit [Read error: Connection reset by peer]
amagawdd has joined #ruby
brent__ has joined #ruby
ldnunes has joined #ruby
<toretore> newrubycoder: so say you have `[[1,2], [3,5]]` and the operation is simply "if n1 + n2 is even then rotate else reverse"; how would you go about it?
<toretore> what should the result be?
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
<toretore> actually that was a stupid example as rotate and reverse are the same :P
aufi has quit [Remote host closed the connection]
<toretore> let's use `[[1,2,3], [4,5,6]]`
simmib_ has quit [Ping timeout: 240 seconds]
hilaire has joined #ruby
duderonomy has quit [Ping timeout: 256 seconds]
brent__ has quit [Ping timeout: 240 seconds]
destructure has quit [Changing host]
destructure has joined #ruby
<newrubycoder> result should be [[2,3,1][6,5,4]], but as of now im only able to do one operation on both arrays based on the comparison of one array
despai has joined #ruby
hotpancakes has joined #ruby
hotpancakes has quit [Client Quit]
jenrzzz has quit [Ping timeout: 264 seconds]
hilaire has left #ruby [#ruby]
<newrubycoder> so my results would be to rotate both because the first array is even
dionysus69 has quit [Remote host closed the connection]
JoshS has quit [Ping timeout: 256 seconds]
al2o3-cr_ has joined #ruby
<toretore> so you need to operate on each array independently
Rodya_ has quit [Remote host closed the connection]
aaa has quit [Ping timeout: 255 seconds]
Rodya_ has joined #ruby
<toretore> you need to loop through the outer array, then for each inner array, perform the operation
username_ has joined #ruby
username1 has joined #ruby
<toretore> >> [[1,2,3], [4,5,6]].map{|a| a.sum }
<ruby[bot]> toretore: # => undefined method `sum' for [1, 2, 3]:Array (NoMethodError) ...check link for more (https://eval.in/734859)
<toretore> huh
al2o3-cr has quit [Ping timeout: 258 seconds]
mtkd has quit [Ping timeout: 258 seconds]
mtkd has joined #ruby
<jgnagy> what are you trying to do with those arrays?
<newrubycoder> me or? :p
renchan has quit [Quit: Leaving...]
<toretore> here, `group` would be [1,2,3] and [4,5,6] in each iteration
Rodya_ has quit [Remote host closed the connection]
<toretore> >> [1,2,3].reduce(:+).even?
<ruby[bot]> toretore: # => true (https://eval.in/734860)
Rodya_ has joined #ruby
<toretore> >> [4,5,6].reduce(:+).even?
<ruby[bot]> toretore: # => false (https://eval.in/734861)
blackmesa has joined #ruby
brent__ has joined #ruby
tlahtoani has quit [Quit: Connection closed for inactivity]
xen0fon has joined #ruby
negatifze has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<newrubycoder> ok trying to add maths (y)
benlieb has joined #ruby
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Guest84501 has quit [Ping timeout: 260 seconds]
<toretore> newrubycoder: don't get ahead of yourself, fill in the blanks i left so that you understand what's going on
JoshS has joined #ruby
<toretore> in this example, the mathematical operation has already been run, yielding a `result`, which determines whether you rotate or reverse
k13nox has quit [Quit: Leaving...]
jshjsh has joined #ruby
amclain has joined #ruby
Shashikant86 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
montanonic has quit [Ping timeout: 256 seconds]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mikecmpbll has quit [Ping timeout: 240 seconds]
SteenJobs_ has joined #ruby
JoshS has quit [Ping timeout: 256 seconds]
UserJosh has joined #ruby
<baweaver> mutation, not mutagen
montanonic has joined #ruby
<baweaver> dangit scrollback, foiled again
devon21 has joined #ruby
jshjsh has quit [Ping timeout: 256 seconds]
JoshS has joined #ruby
SteenJobs_ is now known as SteenJobs
UserJosh has quit [Ping timeout: 256 seconds]
montanonic has quit [Ping timeout: 245 seconds]
ferr1 has quit [Quit: WeeChat 1.6]
jcao219 has quit [Ping timeout: 252 seconds]
centrx has joined #ruby
bmurt has joined #ruby
JoshS has quit [Ping timeout: 256 seconds]
jcao219 has joined #ruby
<newrubycoder> toretore: i tested it now, it totally seems like it does multiple things in one line
<newrubycoder> if i tell it to put "hey" else "bye" it puts them several times
<newrubycoder> now i need to make some logic 🤔
Xentil has quit [Quit: No Ping reply in 180 seconds.]
m4rCsi has quit [Quit: No Ping reply in 180 seconds.]
jtperreault has quit [Quit: WeeChat 1.4]
Xentil has joined #ruby
jtperreault has joined #ruby
m4rCsi has joined #ruby
<al2o3-cr_> newrubycoder: is this a codewars kata?
<al2o3-cr_> not been on codewars for yonks
<newrubycoder> yeah it's a 6 kyu, i wanted to challenge myself got more than i bargained for
<al2o3-cr_> 6 kyu pretty high for a beginner ;)
Silthias has joined #ruby
agent_white has joined #ruby
<newrubycoder> yeah i will go back to 7 i think, or better yet maybe i will try reading fundementals
<al2o3-cr_> oh, have i got that the wrong way round. is higher easier?
despai has quit [Quit: Leaving]
<newrubycoder> yeah
Guest75730 has joined #ruby
<al2o3-cr_> silly me
al2o3-cr_ is now known as al2o3-cr
<baweaver> which one is it?
<baweaver> 8 kyu is newbie
<baweaver> 1 kyu is esoteric fun land'
<newrubycoder> Reverse or rotate?
Guest75730 has left #ruby [#ruby]
<baweaver> got a link?
<newrubycoder> i think there's no 1 kyu in ruby?
Silthias1 has quit [Ping timeout: 276 seconds]
CloCkWeRX has joined #ruby
SteenJobs has quit [Quit: SteenJobs]
chouhoul_ has quit [Remote host closed the connection]
troulouliou_div2 has quit [Read error: Connection reset by peer]
troulouliou_div2 has joined #ruby
troulouliou_div2 has quit [Remote host closed the connection]
Xiti has quit [Ping timeout: 245 seconds]
matp has quit [Quit: Bye!]
Beams has quit [Quit: .]
plantfood has joined #ruby
jls42 has joined #ruby
shinnya has quit [Ping timeout: 240 seconds]
andikr has quit [Remote host closed the connection]
rippa has joined #ruby
mikecmpbll has joined #ruby
<agent_white> Mornin' folks
negatifze has joined #ruby
cibs has quit [Ping timeout: 255 seconds]
sysvalve has joined #ruby
jls42 has quit []
jenrzzz has joined #ruby
cibs has joined #ruby
aupadhye has quit [Ping timeout: 260 seconds]
<sysvalve> hi! does anyone know if argument style :REQUIRED from http://ruby-doc.org/stdlib-2.4.0/libdoc/optparse/rdoc/OptParse.html#method-i-make_switch works?
<sysvalve> or does that refer only to the argument of an option?
<sysvalve> looks like there is no way to require an option
<baweaver> newrubycoder / al2o3-cr - not too bad
<sysvalve> I find it quite weird :/
<baweaver> kinda esoteric though
SesMan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jenrzzz has quit [Ping timeout: 255 seconds]
<al2o3-cr> baweaver: gonna give it a shot in a mo
Rodya_ has quit [Remote host closed the connection]
Rodya_ has joined #ruby
oncall-pokemon has joined #ruby
Rodya_ has quit [Remote host closed the connection]
BackEndCoder has quit [Excess Flood]
TheSass has joined #ruby
TheSass has quit [Remote host closed the connection]
<baweaver> al2o3-cr: str[0..-(str.size % size) - 1]
negatifze has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
BackEndCoder has joined #ruby
<baweaver> Eliminate a reject/select loop :D
TheSass has joined #ruby
msmith_ has quit [Read error: Connection reset by peer]
msmith has joined #ruby
<al2o3-cr> nice ;)
plantfood has quit [Quit: Leaving]
<baweaver> other than that I didn't read the blasted rotation thing and was wondering why it failed
* baweaver needs coffee
negatifze has joined #ruby
nowhereman has quit [Ping timeout: 240 seconds]
pandaant has quit [Remote host closed the connection]
<newrubycoder> damn you are fast lol
<baweaver> took ~5 minutes
<baweaver> I also conduct interviews in Ruby so very rarely will a question stump me on that
djbkd has joined #ruby
<baweaver> and if it does chances are high it's just absurdly esoteric or mathematical beyond my knowledge.
<baweaver> https://www.codewars.com/kata/52ec24228a515e620b0005ef/train/ruby - that one would be a nightmare though
jhack has quit [Quit: jhack]
* apeiros ponders giving baweaver his interview question from hell…
<baweaver> oh?
<apeiros> though I think I don't even have it on my private computers :-|
<baweaver> realize I may not answer as I have a meeting soon
millerti has joined #ruby
<baweaver> well, technically now, but someone borked a cluster that I'm unborking
<apeiros> heh, right, different TZ
* apeiros is in the WEEEEKEEEEEND, WEEEEE!
* apeiros friday-hugs the channel
babblebre has joined #ruby
* baweaver grumbles at apeiros
<apeiros> keep grumbling when I'm up at ~0600 on monday and you're still merrily sleeping in bed…
<baweaver> Ah Karma
lenwood has joined #ruby
TheSass has left #ruby ["Later, gents and electronbabies."]
JoshS has joined #ruby
TomyWork has quit [Remote host closed the connection]
* baweaver kinda wants apeiros's special question now
<apeiros> I'll see whether I have it on my private laptop. it's basically a "this is bad code. tell me all the things which are bad about it and how to do better"
<apeiros> I never used it because I think it's not a productive question in a live interview
<apeiros> it was fun coming up with it, though :)
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
cpruitt has quit [Ping timeout: 240 seconds]
newrubycoder has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
<baweaver> Ah
<baweaver> My normal opening question is basically a wordcount given a text file
<baweaver> it's purposely easy just to get a gauge on an unknown candidate
<baweaver> of all the ones I've hired, they solved that one with no problems whatsoever in 5-10m
<baweaver> One just stared at me and quoted out the code without even writing it
<apeiros> wordcount? easy?
<baweaver> asked if I needed to see it written, I said no, it was fine.
<apeiros> define "word"! :-p
danguita has quit [Quit: danguita]
jcao219 has quit [Ping timeout: 240 seconds]
<baweaver> space delimited wordlist
<baweaver> but people have called me on that before
gevans has joined #ruby
<baweaver> and I do use that to expand the question in some cases, but I find it's not necessary
<apeiros> cases? :)
<baweaver> heh
scootaloo has quit [Quit: Textual IRC Client: www.textualapp.com]
<baweaver> I make puns without even thinking about it now.
<apeiros> funny, I wrote that before reading your sentence
lenwood has quit [Ping timeout: 255 seconds]
<apeiros> I meant casing of words ;-)
Fernando-Basso has quit [Ping timeout: 276 seconds]
zeroDi has joined #ruby
<baweaver> that too, though I say lowercase most times
msmith has quit [Remote host closed the connection]
<baweaver> Radar was among the select few to laugh and say `wc -w`
<baweaver> we were talking interviews a while back and I mentioned that one to him
newrubycoder has joined #ruby
[Butch] has joined #ruby
duderonomy has joined #ruby
<apeiros> heh, yeah, bonus points for lateral thinking
<baweaver> indeed
<apeiros> minus points for omitting to_i/Integer ;-p
<baweaver> Na, normally I write that down in the clever column and ask them to do it in Ruby
<baweaver> cheekiest guy started with wc -w, do it in Ruby, `wc -w`
gevans has quit [Ping timeout: 240 seconds]
Derperperd has quit [Ping timeout: 264 seconds]
<apeiros> hm, ok, I checked. it's not on my private laptop. ping me on monday if you want ;-)
<baweaver> Ah well, another day perhaps
tuelz has quit [Quit: WeeChat 1.7]
<apeiros> and did you grade differently on whether the solution was scalable?
lenwood has joined #ruby
<baweaver> Most of the time for that one I just want to see if they can code on a board / out loud / on a computer without breaking down
<baweaver> then I ask the more fun questions
<baweaver> apeiros: want to know about the more fun questions? :)
<apeiros> baweaver: pm ;-)
<baweaver> No need, I can tell you right here
<baweaver> Apply and you can see firsthand XD
<apeiros> apply at sony?
<baweaver> yep
jcao219 has joined #ruby
<baweaver> I think we're required to pay a minimum of 130k now for visa holders
<apeiros> I would actually consider that, but the USA is kinda no-go-land for me atm :(
<baweaver> fair
negatifze has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
last_staff has joined #ruby
last_staff has quit [Client Quit]
nofxx has joined #ruby
chouhoulis has joined #ruby
<tobiasvl> are you hit by the EO, apeiros
<apeiros> no
<apeiros> I'm hit by it indirectly. it violates my principles to visit a country instituting such laws :-/
lenwood has quit [Quit: Konversation terminated!]
CloCkWeRX has quit [Quit: Leaving.]
lenwood has joined #ruby
sysvalve has quit [Ping timeout: 255 seconds]
<apeiros> also I have no intention of handing anybody my passwords
millerti has joined #ruby
<tobiasvl> yeah that thing is f-ed up
<apeiros> yupp. and I fear it's only the beginning.
<baweaver> #ruby-offtopic, but I agree
Fernando-Basso has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
<tobiasvl> oh I thought this was #ruby-offtopic :P sorry
<apeiros> :'D
SteenJobs has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
msmith has joined #ruby
gnufied has quit [Ping timeout: 255 seconds]
romulus10 has joined #ruby
romulus10 has quit [Quit: Leaving]
Ishido has joined #ruby
hutch34 has quit [Ping timeout: 240 seconds]
reverberations has joined #ruby
pilne has joined #ruby
Xiti has joined #ruby
Fernando-Basso has quit [Quit: WeeChat 1.5]
Fernando-Basso has joined #ruby
Anonymoose2 has quit [Ping timeout: 240 seconds]
gnufied has joined #ruby
montanonic has joined #ruby
l4v2 has quit [Quit: l4v2]
jhack has joined #ruby
chouhoulis has quit [Remote host closed the connection]
ych has joined #ruby
Guest43 has joined #ruby
cdg has quit [Remote host closed the connection]
hobodave_ has joined #ruby
hobodave has quit [Ping timeout: 240 seconds]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
renchan has joined #ruby
TomyLobo has joined #ruby
hutch34 has joined #ruby
kristofferR has quit [Quit: Textual IRC Client: www.textualapp.com]
nettoweb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bocaneri has quit [Remote host closed the connection]
<newrubycoder> can't get the code to work, it does some weird stuff i think
<baweaver> oh?
jcao219 has quit [Ping timeout: 240 seconds]
<newrubycoder> it will only rotate, not reverse
vuoto has joined #ruby
<newrubycoder> i need to check the numbers
gevans has joined #ruby
lenwood has quit [Ping timeout: 240 seconds]
Dimik has joined #ruby
maddmaxx has joined #ruby
t-recx has quit [Read error: No route to host]
chouhoulis has joined #ruby
lmc has joined #ruby
t-recx has joined #ruby
negatifze has joined #ruby
Macaveli has joined #ruby
Macaveli has quit [Max SendQ exceeded]
negatifze has quit [Client Quit]
workmad3 has quit [Ping timeout: 255 seconds]
OTORelic has quit [Ping timeout: 240 seconds]
Macaveli has joined #ruby
Macaveli has quit [Max SendQ exceeded]
ibrahim has joined #ruby
Macaveli has joined #ruby
aryaching has joined #ruby
Macaveli has quit [Client Quit]
<newrubycoder> when i tell the code to puts "rotate" else puts "reverse", the logic is correct, but when i tell it to .map(&:rotate) and .map(&:reverse) then .join, it will only do the first operation for all the arrays
Macaveli has joined #ruby
Macaveli has quit [Client Quit]
enterprisey has joined #ruby
guacamole has quit [Quit: leaving]
cpruitt has joined #ruby
<toretore> newrubycoder: remember what i said about gisting your code?
tolerablyjake has joined #ruby
AndrewIsHere has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
marchelzo has joined #ruby
hubcaps has joined #ruby
<marchelzo> hi newrubycoder
<newrubycoder> hey
jcao219 has joined #ruby
<marchelzo> wow github changed the look of the gist page o.o
Elderfain has joined #ruby
<elomatreb> marchelzo: D: All of github it seems
<marchelzo> oh wow
<newrubycoder> i've tried many variations of that code with ! and doing the return etc. on a new line, just think it's weird that the logic works with puts
<marchelzo> newrubycoder: if str.length.to_f / size % 1 != 0
<marchelzo> if digit_groups.last.length != size
<Papierkorb> elomatreb: Looks like enterprise github. Wondering if it's a mistake on their end :)
Fernando-Basso has quit [Quit: WeeChat 1.7]
<elomatreb> Really? That would be funny
<Papierkorb> elomatreb: iirc enterprise github had a black navbar, yes
ramortegui has quit [Quit: Ex-Chat]
ych has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<marchelzo> >> "1234567".chars.map(&:to_i).each_slice(3).keep { |g| g.length == 3 }.to_a
<ruby[bot]> marchelzo: # => undefined method `keep' for #<Enumerator: [1, 2, 3, 4, 5, 6, 7]:each_slice(3)> (NoMethodError) ...check link for more (https://eval.in/734945)
<marchelzo> >> "1234567".chars.map(&:to_i).each_slice(3).to_a.keep { |g| g.length == 3 }
<ruby[bot]> marchelzo: # => undefined method `keep' for [[1, 2, 3], [4, 5, 6], [7]]:Array ...check link for more (https://eval.in/734946)
<Papierkorb> marchelzo: #select
<marchelzo> geez i suck
<marchelzo> oh right
<marchelzo> >> "1234567".chars.map(&:to_i).each_slice(3).select{ |g| g.length == 3 }.to_a
<ruby[bot]> marchelzo: # => [[1, 2, 3], [4, 5, 6]] (https://eval.in/734947)
<marchelzo> ^_^
<marchelzo> thanks Papierkorb
jhack has quit [Quit: jhack]
<newrubycoder> maybe i need to use each
jhack has joined #ruby
SeepingN has joined #ruby
jenrzzz_ has joined #ruby
<toretore> newrubycoder: do you understand what each does?
<centrx> >> 1 + 1
<ruby[bot]> centrx: # => 2 (https://eval.in/734948)
<centrx> story checks out
jenrzzz has quit [Ping timeout: 240 seconds]
<newrubycoder> not really tbh, i guess it does x for each thing in the array
<toretore> yes
renchan_ has joined #ruby
renchan has quit [Ping timeout: 240 seconds]
Synthead has joined #ruby
<newrubycoder> hmm each doesn't seem to differ from .map in this case, i still get the bug
dviola has quit [Quit: WeeChat 1.7]
renchan_ has quit [Remote host closed the connection]
msmith has quit [Remote host closed the connection]
<toretore> newrubycoder: stop using `return` in your code
<toretore> it only serves to confuse you at this point
<Elderfain> each and map do differ in how they work
vuoto has quit [Remote host closed the connection]
<Elderfain> each returns the same array it started with, map returns the array created by the return of each iteration
<DarkBushido> newrubycoder: how are you combining reverse and rotate?
<toretore> newrubycoder: you have an array `digit_groups`, you have a transformation that you want to run on each item in the group, and then you want to collect each result of that transformation
<toretore> newrubycoder: how would you go about this?
<toretore> the transformation is what happens inside the block; it transforms e.g. [1,2,3] to [3,2,1]
jenrzzz_ has quit [Ping timeout: 264 seconds]
renchan has joined #ruby
<patarr> Is there a way to run a activerecord query like Thing.sub_things when you have a Thing ID? But I don't want to do Thing.find(1).sub_things. That will needlessly fire off two queries
<toretore> show some real code patarr
<toretore> and explain in more detail and why
<toretore> oh you're actually talking about ar, that should go in #rubyonrails
<newrubycoder> toretore: i guess you can collect it if it mutates, but i kinda tried it
<toretore> (the answer is `SubThing.where(id: thing_id)`)
ldnunes has quit [Quit: Leaving]
<toretore> newrubycoder: how would that work?
amagawdd has quit [Quit: Leaving...]
JeanCarloMachado has quit [Ping timeout: 276 seconds]
babblebre has quit [Quit: Connection closed for inactivity]
swills_ has joined #ruby
<newrubycoder> like if it mutates it's changed permamently right? so you can collect it
<newrubycoder> or maybe i can collect it in a variable
swills has quit [Read error: Connection reset by peer]
<toretore> what's changed permanently?
<al2o3-cr> newrubycoder: fill in the gaps kyu 8; https://gist.github.com/gr33n7007h/646ce2c20a7258ecb6f73e60aeffc390
JeanCarloMachado has joined #ruby
Derperperd has joined #ruby
dc4 has joined #ruby
username_ has quit [Ping timeout: 240 seconds]
CausaMortis has joined #ruby
username1 has quit [Ping timeout: 240 seconds]
marchelzo has quit [Quit: marchelzo]
jshjsh has joined #ruby
JoshS has quit [Ping timeout: 256 seconds]
ocbtec has quit [Quit: leaving]
zahadoom has joined #ruby
gevans has quit [Quit: Leaving...]
lmc has quit [Remote host closed the connection]
benlieb has quit [Quit: benlieb]
<newrubycoder> my brain is fried
<Zarthus> do you want some sauce with that
<newrubycoder> just need some sleep
<newrubycoder> i will go to bed but thanks for the help guys especially toretore :D
<al2o3-cr> all will become clear in the morning ;P
JeanCarloMachado has quit [Ping timeout: 240 seconds]
newrubycoder has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
mrVandermare has joined #ruby
chouhoulis has quit [Remote host closed the connection]
ibrahim has quit [Quit: Leaving]
chouhoulis has joined #ruby
teoric has joined #ruby
karapetyan has joined #ruby
Cohedrin has joined #ruby
teoric has quit [Remote host closed the connection]
karapetyan has quit [Remote host closed the connection]
Rodya_ has joined #ruby
Xentil has quit [Ping timeout: 240 seconds]
karapetyan has joined #ruby
Macaveli has joined #ruby
Rodya_ has quit [Remote host closed the connection]
teoric has joined #ruby
yqt has joined #ruby
Flaghacker has joined #ruby
teoric has quit [Client Quit]
<Flaghacker> Hey guys, I know next to nothing about ruby but I need gem to install a problem I want to use. Do I need to install ruby before installing gem? The download page (https://rubygems.org/pages/download) s not that helpful. I'm running Windows 10.
<Flaghacker> *I need it to install a program I want to use
Macaveli has quit [Client Quit]
bmurt has joined #ruby
teoric has joined #ruby
simmib_ has joined #ruby
lmc has joined #ruby
teoric has quit [Remote host closed the connection]
<centrx> Flaghacker: Yes, install Ruby first
<Flaghacker> centrx, Okay, thanks!
username_ has joined #ruby
username1 has joined #ruby
benlieb has joined #ruby
jenrzzz has joined #ruby
zahadoom has quit []
cdg has joined #ruby
simmib_ has quit [Ping timeout: 240 seconds]
pgib has joined #ruby
lmc has quit [Client Quit]
karapetyan has quit [Remote host closed the connection]
mfb2 has joined #ruby
cdg_ has joined #ruby
dionysus69 has joined #ruby
tildes has joined #ruby
railswebdev has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Guest69 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
JeanCarloMachado has joined #ruby
cdg has quit [Ping timeout: 255 seconds]
cdg__ has joined #ruby
torQue_ has quit [Quit: ChatZilla 0.9.93 [Firefox 51.0.1/20170125094131]]
cdg_ has quit [Ping timeout: 255 seconds]
marchelzo has joined #ruby
cdg has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
cdg__ has quit [Ping timeout: 256 seconds]
<jgnagy> anybody familiar with Munson (or have a suggestion for a better {json:api} r+w client for ruby)?
jenrzzz has quit [Ping timeout: 245 seconds]
mfb2 has quit []
karapetyan has joined #ruby
Flaghacker has quit [Quit: Leaving]
ALVAN has joined #ruby
tildes has quit [Ping timeout: 240 seconds]
devon21 has quit [Quit: devon21]
kht has joined #ruby
<jgnagy> I don't see any way to add to a relationship collection (like you'd do in AR via Auther.posts << Post.new())
kristofferR has joined #ruby
Guest69 has joined #ruby
dionysus69 has quit [Ping timeout: 276 seconds]
railswebdev has joined #ruby
Definity has quit [Ping timeout: 240 seconds]
hobodave_ has quit [Quit: Computer has gone to sleep.]
ben_vulpes has joined #ruby
Ishido has quit [Quit: Roads? Where We're Going We Don't Need Roads.]
tvw has joined #ruby
<ben_vulpes> dear rubyists, how would i compare maps with bigdecimals for equality using rspec? a naive expect(map_thingy).to eq [{:map => "literal"}] is sad because i can only assume the bigdecimals are not actually the same
devon21 has joined #ruby
hobodave has joined #ruby
<baweaver> ben_vulpes: what're the actual values?
<baweaver> You have an array of hashes with string values there
<baweaver> I don't see how BigDecimal factors in there.
<ben_vulpes> i did neglect to say that i am comparing a list of hashes, the example is incomplete!
<ben_vulpes> the actual data structure is more along the lines of [{:thing => BigDecimal.new(2.0, 10)}]
<apeiros> ben_vulpes: compare apples to apples, and not to oranges?
enterprisey has quit [Remote host closed the connection]
<apeiros> constructing bigdecimals from floats is not a good idea.
<ben_vulpes> ooh
<ben_vulpes> k
<apeiros> floats are inherently lossy.
<apeiros> (in a decimal system that is)
teclator has quit [Ping timeout: 255 seconds]
teclator has joined #ruby
Silthias1 has joined #ruby
<ben_vulpes> aye aye
dc4 has quit [Ping timeout: 260 seconds]
<ben_vulpes> using ints doesn't seem to help, unfortunately
<toretore> something that would help is to give examples of real values
<toretore> </snark>
<apeiros> </shark>
<apeiros> whaaaaat? no shark emos? :<
<ben_vulpes> toretore: http://pastebin.com/pFMQGJp6
<ruby[bot]> ben_vulpes: we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/d28687887a488448f7f14d18292085bd
<ruby[bot]> ben_vulpes: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
Silthias has quit [Ping timeout: 256 seconds]
<toretore> you're down 2 points now :P
tyang_ has quit [Read error: Connection reset by peer]
<ben_vulpes> toretore: do those real values help you help me?
<apeiros> d'oh. /me did $ BigDecimal#inspect, just to be reminded that it's now natively implemented
<ben_vulpes> oh top lols, none of the things the differ was complaining about were the cause of the test failing
<apeiros> BigDecimal:7fb074789228 vs. BigDecimal:7fb074768370
synthroid has quit []
triangles has joined #ruby
<apeiros> now I wonder whether that's object_id or the precise value
[Butch] has quit [Quit: I'm out . . .]
<apeiros> oh, and 2.4 obviously changed inspect for BD
<toretore> :regular=>0.0, :regular=>2.0
guacamole has joined #ruby
Guest23394 has quit [Read error: Connection reset by peer]
<apeiros> though it seems to me that the values are equal (different precision, but same value)
<apeiros> - :actual=>2.0 (#<BigDecimal:7fb074789228,'0.2E1',9(36)>),
<apeiros> + :actual=>2.0 (#<BigDecimal:7fb074768370,'0.2E1',9(27)>),
<apeiros> I think '0.2E1' is the relevant part. the (36) vs (27) is the precision I think.
<apeiros> and I'm almost certain the hex is the object_id
<apeiros> (usually <<1)
Silthias1 has quit [Read error: Connection reset by peer]
<apeiros> so I think rspec fails to properly compare those value
<apeiros> in the diff
<apeiros> and of course what toretore says
<apeiros> but you're also comparing BD with float in a couple of places
<ben_vulpes> apeiros: to quote myself above, "none of the things the differ was complaining about were the cause of the test failing"
<apeiros> make sure your API isn't confused (and neither you yourself)
Silthias has joined #ruby
<apeiros> yeah, read that. but the diff still is bad.
<ben_vulpes> aye, no two ways about that.
<apeiros> it implies that those values are different when they very likely aren't
tomphp has joined #ruby
<apeiros> which makes it harder to spot the real culprit
<ben_vulpes> however once i fixed the actual broken part of the hash in question, rspec stopped showing diff output
<ben_vulpes> i guess it's "not different enough for the test to fail"
<ben_vulpes> which is kinda funny
<apeiros> they compare as ==
<ben_vulpes> who am i to fight the local idioms though
<apeiros> but whatever the diff uses to compute is wrong
<apeiros> == coerces
msmith has joined #ruby
jhack has quit [Quit: jhack]
jshjsh has quit [Ping timeout: 256 seconds]
sniffer has quit [Ping timeout: 245 seconds]
jenrzzz has joined #ruby
jenrzzz has joined #ruby
ferr1 has joined #ruby
ben_vulpes has left #ruby ["WeeChat 1.4"]
speelycaptor has joined #ruby
jhack has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
pragmaticus has quit [Ping timeout: 240 seconds]
speelycaptor has quit [Client Quit]
speelycaptor has joined #ruby
speelycaptor has quit [Client Quit]
dionysus69 has joined #ruby
speelycaptor has joined #ruby
Derperperd has quit [Ping timeout: 255 seconds]
benlieb has quit [Quit: benlieb]
benlieb has joined #ruby
benlieb has quit [Client Quit]
benlieb has joined #ruby
Derperperd has joined #ruby
cdg_ has joined #ruby
loinclot_ has quit []
cdg has quit [Ping timeout: 240 seconds]
radic has joined #ruby
cdg has joined #ruby
malconis_ has quit [Read error: Connection reset by peer]
xen0fon has quit [Quit: xen0fon]
centrx has quit [Remote host closed the connection]
tomphp has joined #ruby
cdg_ has quit [Ping timeout: 240 seconds]
Xentil has joined #ruby
SteenJobs has quit [Quit: SteenJobs]
r__rios has joined #ruby
harfangk has quit [Quit: Textual IRC Client: www.textualapp.com]
SteenJobs has joined #ruby
SteenJobs has quit [Client Quit]
rrios has quit [Ping timeout: 240 seconds]
CausaMortis has quit [Read error: Connection reset by peer]
renchan has quit [Remote host closed the connection]
cdg_ has joined #ruby
ALVAN has left #ruby [#ruby]
xen0fon has joined #ruby
cdg has quit [Ping timeout: 240 seconds]
speelycaptor is now known as tjazh
tjazh has quit [Quit: tjazh]
tjazh has joined #ruby
tristanp has quit [Remote host closed the connection]
tjazh has quit [Client Quit]
tjazh has joined #ruby
Rodya_ has joined #ruby
dc4 has joined #ruby
mula has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tjazh has quit [Quit: tjazh]
sepp2k has quit [Quit: Leaving.]
tjazh has joined #ruby
pgib has quit [Quit: 00 PC LOAD LETTER]
cdg has joined #ruby
hobodave has quit [Quit: Computer has gone to sleep.]
cpruitt has quit [Quit: cpruitt]
kht has quit [Ping timeout: 240 seconds]
triangles has quit [Quit: Leaving]
cdg_ has quit [Ping timeout: 255 seconds]
polishdub has quit [Quit: Leaving]
amagawdd has joined #ruby
mrVandermare has quit [Quit: Konversation terminated!]
lanc has joined #ruby
oncall-pokemon has quit [Quit: Connection closed for inactivity]
tjazh has quit [Quit: tjazh]
hobodave has joined #ruby
mula has quit []
gloscombe_ has joined #ruby
karapetyan has quit [Remote host closed the connection]
biberu has quit [Read error: Connection reset by peer]
karapety_ has joined #ruby
hobodave has quit [Ping timeout: 276 seconds]
cpruitt has joined #ruby
cpruitt has quit [Client Quit]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ionte has quit [Ping timeout: 245 seconds]
workmad3 has joined #ruby
_sfiguser has quit [Ping timeout: 258 seconds]
Derperperd has quit [Ping timeout: 264 seconds]
despai has joined #ruby
handicraftsman has joined #ruby
centrx has joined #ruby
<handicraftsman> Will File.expand_path("~/") work on Windows?
workmad3 has quit [Ping timeout: 252 seconds]
maddmaxx has quit [Remote host closed the connection]
centrx has quit [Ping timeout: 264 seconds]
gnufied has quit [Remote host closed the connection]
<manveru> handicraftsman: in 99% of cases, yes
<handicraftsman> Nice. So now i just need native way to unpack .zip files. I think it's in stdlib
<lupine> it is, but it's a bit awkward to use
<lupine> oh, wait. wrong channel :D
<handicraftsman> Well, i just need to unzip some jars
<SeepingN> `unzip #{filepath}` ? :)
<lupine> no no no no no no no no no
<handicraftsman> I need crossplatform way
<SeepingN> `\`which unzip\` #{filepath}`
<lupine> no no no no no no no no no
cibs has quit [Ping timeout: 240 seconds]
<lupine> you need a cross-platform, non-cve way of doing it
<SeepingN> f windows
<apeiros> SeepingN: bashing of platforms is for #ruby-offtopic please. not in here.
cibs has joined #ruby
despai has quit [Ping timeout: 240 seconds]
chouhoulis has quit [Ping timeout: 256 seconds]
despai has joined #ruby
<marchelzo> hi apeiros
_sfiguser has joined #ruby
<apeiros> hi marchelzo
<marchelzo> how are you
<apeiros> fine, thanks
<marchelzo> that's fantastic ^_^
radic has quit [Quit: ZNC - http://znc.in]
<marchelzo> it's a great day for writing some ruby code
<apeiros> it is. it's also a great day to join #ruby-offtopic ;-p
fowlduck has joined #ruby
<marchelzo> small channels make me anxious -- no can do
handicraftsman has quit [Quit: Leaving]
DLSteve has quit [Quit: All rise, the honorable DLSteve has left the channel.]
felltir has joined #ruby
radic has joined #ruby
astrobunny has joined #ruby
racewar88 has joined #ruby
racewar88 has left #ruby [#ruby]
teclator has quit [Quit: No Ping reply in 180 seconds.]
djbkd has quit [Remote host closed the connection]
djbkd has joined #ruby
teclator has joined #ruby
lanc has quit [Quit: zzZZZZzzZZZZzzZZzzZZZZzzzzzzzzz]
racewar88 has joined #ruby
racewar88 has left #ruby [#ruby]
djbkd has quit [Ping timeout: 255 seconds]
dc4 has quit [Ping timeout: 245 seconds]
teclator has quit [Quit: No Ping reply in 180 seconds.]
teclator has joined #ruby
teclator has quit [Client Quit]
minimalism has quit [Quit: minimalism]
lanc has joined #ruby
AndrewIsHere has quit []
nmmnzo has joined #ruby
teclator has joined #ruby
hahuang65 has joined #ruby
ixti has joined #ruby
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
teclator has quit [Client Quit]
despai has quit [Read error: Connection reset by peer]
cschneid_ has quit [Remote host closed the connection]
despai has joined #ruby
teclator has joined #ruby
cibs has quit [Ping timeout: 245 seconds]
Derperperd has joined #ruby