<zenspider>
that is almost a complete rework of the regexp portion of the ruby quickref
CloCkWeRX has joined #ruby
gnufied has quit [Ping timeout: 258 seconds]
milardovich has quit [Ping timeout: 256 seconds]
hotpancakes has joined #ruby
benlieb has joined #ruby
ramfjord has quit [Ping timeout: 258 seconds]
malconis has quit [Read error: Connection reset by peer]
<eelster>
zenspider: It's pretty good. I'd personally classify (?:) as non-matching group, but on the whole this is pretty great. I also would name the flag section
malconis has joined #ruby
<eelster>
zenspider: But on the whole, great job
<zenspider>
non matching or noncapturing?
<zenspider>
I'd rather have the latter... backreferences is confusing, agreed
<eelster>
I meant to say non-capturing
a7d7p has quit [Quit: a7d7p]
<zenspider>
adding "captured" to regular ()
<eelster>
Thanks for picking that up. This is fantastic on the whole though. I really like it. What are you planning to do wiht all of this?
hotpancakes has quit [Remote host closed the connection]
Derperperd has joined #ruby
jakewilkins has quit [Client Quit]
tolerablyjake has joined #ruby
duderonomy has joined #ruby
JoshS has joined #ruby
Derperperd has quit [Max SendQ exceeded]
Derperperd has joined #ruby
brent__ has joined #ruby
Guest52154 has quit [Ping timeout: 248 seconds]
cdg has quit [Remote host closed the connection]
cdg has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
JeanCarloMachado has quit [Ping timeout: 245 seconds]
JeanCarloMachado has joined #ruby
Channel6 has joined #ruby
xrlk has quit [Ping timeout: 248 seconds]
s1kx has quit [Ping timeout: 245 seconds]
brent__ has quit [Ping timeout: 272 seconds]
ur5us has quit [Remote host closed the connection]
exchgr has quit [Ping timeout: 245 seconds]
cdg_ has joined #ruby
tvw has quit [Remote host closed the connection]
aremaref has joined #ruby
ReK2 has quit [Remote host closed the connection]
cdg has quit [Ping timeout: 256 seconds]
exchgr has joined #ruby
chouhoulis has joined #ruby
mattwashere has quit [Remote host closed the connection]
mattwashere has joined #ruby
SteenJobs has joined #ruby
ReK2 has joined #ruby
ReK2 has quit [Changing host]
ReK2 has joined #ruby
jackjackdripper has joined #ruby
nankyokusei has joined #ruby
eelster has quit [Ping timeout: 246 seconds]
dc2 has quit [Ping timeout: 258 seconds]
gusrub has joined #ruby
nankyoku_ has joined #ruby
mattwashere has quit [Ping timeout: 256 seconds]
Kug3lis has joined #ruby
djbkd has quit [Quit: My people need me...]
JeanCarloMachado has quit [Ping timeout: 248 seconds]
hotpancakes has joined #ruby
djbkd has joined #ruby
nankyokusei has quit [Ping timeout: 248 seconds]
nankyoku_ has quit [Ping timeout: 246 seconds]
gnufied has joined #ruby
Azure has quit [Quit: Oops.]
milardovich has joined #ruby
skweek has quit [Ping timeout: 256 seconds]
StoneCypher has quit [Ping timeout: 258 seconds]
cyphase has quit [Ping timeout: 272 seconds]
astrobunny has joined #ruby
dc2 has joined #ruby
xall has joined #ruby
milardovich has quit [Ping timeout: 272 seconds]
ReK2 has quit [Remote host closed the connection]
ReK2 has joined #ruby
ReK2 has joined #ruby
ReK2 has quit [Changing host]
a7d7p has joined #ruby
cyphase has joined #ruby
d^sh_ has joined #ruby
cdg_ has quit [Remote host closed the connection]
astrobunny has quit [Ping timeout: 272 seconds]
az7arul has joined #ruby
d^sh has quit [Ping timeout: 248 seconds]
harai_ has joined #ruby
harai has quit [Ping timeout: 245 seconds]
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
chouhoulis has quit [Remote host closed the connection]
chouhoulis has joined #ruby
astrobun_ has joined #ruby
hanmac has quit [Ping timeout: 245 seconds]
StoneCypher has joined #ruby
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ur5us has joined #ruby
Coldblackice has quit [Ping timeout: 265 seconds]
chouhoulis has quit [Ping timeout: 248 seconds]
harai_ has quit [Ping timeout: 255 seconds]
polysics has joined #ruby
Devalo has joined #ruby
Roa has quit [Ping timeout: 258 seconds]
jackjackdripper has quit [Quit: Leaving.]
Devalo has quit [Ping timeout: 255 seconds]
patteh has quit [Ping timeout: 268 seconds]
harai_ has joined #ruby
mahlon has quit [*.net *.split]
kith has quit [*.net *.split]
svkurowski has quit [*.net *.split]
crayfishx has quit [*.net *.split]
jokke has quit [*.net *.split]
Caius has quit [*.net *.split]
kaspergrubbe has quit [*.net *.split]
Log1x has quit [*.net *.split]
chridal has quit [*.net *.split]
sjums has quit [*.net *.split]
Rich_Morin has quit [*.net *.split]
chg has quit [*.net *.split]
infernix has quit [*.net *.split]
rgs has quit [*.net *.split]
leah2 has quit [*.net *.split]
voker57 has quit [*.net *.split]
Ariadeno has quit [*.net *.split]
fatbob has quit [*.net *.split]
JStoker has quit [*.net *.split]
jokester has quit [*.net *.split]
awk has quit [*.net *.split]
Cyrus has quit [*.net *.split]
GooseYArd has quit [*.net *.split]
lucas_ has quit [*.net *.split]
surrounder has quit [*.net *.split]
Phage has quit [*.net *.split]
twe4ked has quit [*.net *.split]
phantummm has quit [*.net *.split]
RushPL has quit [*.net *.split]
Rush has quit [*.net *.split]
contradictioned has quit [*.net *.split]
tjikkun has quit [*.net *.split]
artmann_ has quit [*.net *.split]
elomatreb has quit [*.net *.split]
thejoecarroll_ has quit [*.net *.split]
ljarvis has quit [*.net *.split]
r4z3r has quit [*.net *.split]
MadWasp has quit [*.net *.split]
pocketprotector has quit [*.net *.split]
nirix has quit [*.net *.split]
squarebracket has quit [*.net *.split]
EvilJStoker has quit [*.net *.split]
unsymbol has quit [*.net *.split]
Ariadeno_ has joined #ruby
lucas_ has joined #ruby
chg has joined #ruby
svkurowski_ has joined #ruby
Ca1us has joined #ruby
ljarvis has joined #ruby
elomatreb has joined #ruby
Ca1us has joined #ruby
Ca1us has quit [Changing host]
sjums has joined #ruby
voker57 has joined #ruby
MadWasp_ has joined #ruby
fatbob has joined #ruby
kkirsche has joined #ruby
unsymbol has joined #ruby
SteenJobs has quit [Quit: peaceee]
kaspergrubbe has joined #ruby
awk has joined #ruby
Rush has joined #ruby
Cyrus has joined #ruby
GooseYArd has joined #ruby
pocketprotector has joined #ruby
Rich_Morin has joined #ruby
phantummm has joined #ruby
twe4ked has joined #ruby
voker57 has quit [Changing host]
voker57 has joined #ruby
surrounder has joined #ruby
unsymbol has quit [Changing host]
unsymbol has joined #ruby
pocketprotector has quit [Changing host]
pocketprotector has joined #ruby
thejoecarroll has joined #ruby
chridal has joined #ruby
MadWasp_ is now known as MadWasp
svkurowski_ is now known as svkurowski
jokester has joined #ruby
Phage has joined #ruby
EvilJStoker has joined #ruby
squarebracket has joined #ruby
kkirsche is now known as r4z3r
tjikkun has joined #ruby
tjikkun has joined #ruby
tjikkun has quit [Signing in (tjikkun)]
jokke has joined #ruby
jokester has quit [Signing in (jokester)]
jokester has joined #ruby
EvilJStoker has quit [Changing host]
EvilJStoker has joined #ruby
JStoker has joined #ruby
JStoker has joined #ruby
JStoker has quit [Changing host]
awk is now known as Guest13758
nirix has joined #ruby
Cyrus is now known as Guest18334
mahlon has joined #ruby
contradictioned has joined #ruby
artmann_ has joined #ruby
leah2 has joined #ruby
milardovich has joined #ruby
Azure has joined #ruby
machty has quit [Ping timeout: 240 seconds]
Log1x has joined #ruby
Log1x has joined #ruby
Log1x has quit [Changing host]
Roa has joined #ruby
hanmac has joined #ruby
machty has joined #ruby
ghostlight has quit [Ping timeout: 272 seconds]
herbmillerjr has quit [Quit: Konversation terminated!]
milardovich has quit [Ping timeout: 258 seconds]
kith has joined #ruby
herbmillerjr has joined #ruby
naprimer_3 has quit [Quit: Leaving]
gusrub has quit []
infernix has joined #ruby
rgs has joined #ruby
naprimer has joined #ruby
astrobun_ has quit [Read error: Connection reset by peer]
crayfishx has joined #ruby
astrobunny has joined #ruby
howdoi has joined #ruby
aremaref has quit [Ping timeout: 248 seconds]
nankyokusei has joined #ruby
osboxes_ has joined #ruby
drizzle has joined #ruby
benlieb has quit [Quit: benlieb]
benlieb has joined #ruby
osboxes has quit [Ping timeout: 258 seconds]
bmurt has joined #ruby
ghostlight has joined #ruby
dnicole has quit []
_sfiguser has quit [Ping timeout: 264 seconds]
a7d7p has quit [Quit: a7d7p]
_sfiguser has joined #ruby
benlieb has quit [Client Quit]
nankyokusei has quit [Ping timeout: 246 seconds]
astrobunny has quit [Read error: Connection reset by peer]
astrobunny has joined #ruby
cibs has quit [Ping timeout: 268 seconds]
brendan- has joined #ruby
cibs has joined #ruby
Channel6 has quit [Quit: Leaving]
polysics has quit [Remote host closed the connection]
jdawgaz has joined #ruby
enyo has joined #ruby
splud has quit [Quit: splud]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bmurt has joined #ruby
enyo has quit [Ping timeout: 256 seconds]
xall_ has joined #ruby
astrobunny has quit [Read error: Connection reset by peer]
astrobunny has joined #ruby
xall has quit [Ping timeout: 255 seconds]
duderonomy has joined #ruby
eelster has joined #ruby
astrobunny has quit [Read error: Connection reset by peer]
astrobunny has joined #ruby
xrlk has joined #ruby
benlieb has joined #ruby
astrobun_ has joined #ruby
astrobunny has quit [Read error: Connection reset by peer]
djbkd has quit [Quit: Leaving...]
astrobun_ has quit [Read error: Connection reset by peer]
eelster has quit [Client Quit]
astrobunny has joined #ruby
benlieb has quit [Client Quit]
milardovich has joined #ruby
Kug3lis has quit [Read error: Connection reset by peer]
Kug3lis has joined #ruby
chouhoulis has joined #ruby
milardovich has quit [Ping timeout: 245 seconds]
hotpancakes has quit [Remote host closed the connection]
shakes has quit [Quit: Leaving]
iogf has quit [Remote host closed the connection]
aremaref has joined #ruby
astrobunny has quit [Read error: Connection reset by peer]
hotpancakes has joined #ruby
braincrash has quit [Ping timeout: 245 seconds]
chouhoulis has quit [Remote host closed the connection]
pilne has quit [Quit: Quitting!]
chouhoulis has joined #ruby
micha_ has joined #ruby
sinkyboat has quit [Ping timeout: 272 seconds]
harfangk has joined #ruby
Derperpe1 has joined #ruby
Derperperd has quit [Ping timeout: 248 seconds]
StoneCypher has quit [Ping timeout: 255 seconds]
nankyokusei has joined #ruby
chouhoulis has quit [Ping timeout: 248 seconds]
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
igniting has quit [Ping timeout: 246 seconds]
alan_w has joined #ruby
nankyokusei has quit [Ping timeout: 245 seconds]
arescorpio has quit [Quit: Leaving.]
boombox_ has joined #ruby
xall_ has quit [Ping timeout: 245 seconds]
harai_ has quit [Ping timeout: 272 seconds]
milardovich has joined #ruby
brendan- has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
braincrash has joined #ruby
boombox_ has quit [Remote host closed the connection]
milardovich has quit [Ping timeout: 246 seconds]
hutch34 has quit [Ping timeout: 245 seconds]
qpqp has quit [Read error: Connection reset by peer]
duderonomy has joined #ruby
Derperpe1 has quit [Ping timeout: 256 seconds]
Derperpe1 has joined #ruby
gix has quit [Ping timeout: 256 seconds]
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Kug3lis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gix has joined #ruby
braincrash has quit [Ping timeout: 246 seconds]
aremaref has quit [Ping timeout: 256 seconds]
braincrash has joined #ruby
jackjackdripper has joined #ruby
brent__ has joined #ruby
xall_ has joined #ruby
troys is now known as troys_
LoneHerm_ has joined #ruby
troys_ is now known as troys
hasee has joined #ruby
<hasee>
anyone here ?
<hasee>
i want to know how to use litecoin wallet
<hasee>
and where can i get the wallet
toretore has quit [Ping timeout: 258 seconds]
LoneHerm_ has quit [Ping timeout: 248 seconds]
symm- has quit [Quit: Leaving...]
brendan- has joined #ruby
xall_ has quit [Ping timeout: 256 seconds]
milardovich has joined #ruby
JoshS has quit [Ping timeout: 248 seconds]
milardovich has quit [Ping timeout: 246 seconds]
JoshS has joined #ruby
nankyokusei has joined #ruby
Devalo has joined #ruby
kies has quit [Ping timeout: 268 seconds]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nankyokusei has quit [Ping timeout: 245 seconds]
Devalo has quit [Ping timeout: 240 seconds]
GriffinHeart has joined #ruby
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
nadir|mobile has quit [Quit: Connection closed for inactivity]
gloscombe has quit [Quit: gloscombe]
<GriffinHeart>
Hi everyone anyone got recommendations to write pipeline style code? like `[1, 2].map { |i| i + 1 }.map { |i| i + 2 }` so that I could get a value passing through everything 1 at a time
patteh has joined #ruby
<GriffinHeart>
would lazy be the correct way to got about it?
ur5us has quit [Ping timeout: 256 seconds]
benlieb has joined #ruby
aupadhye has joined #ruby
kies has joined #ruby
hahuang65 has quit [Ping timeout: 240 seconds]
kies has quit [Ping timeout: 255 seconds]
a7d7p has joined #ruby
enyo has joined #ruby
a7d7p has quit [Client Quit]
testuser1 has joined #ruby
hahuang65 has joined #ruby
enilsen16 has joined #ruby
enyo has quit [Ping timeout: 246 seconds]
astrobunny has joined #ruby
pawnbox has joined #ruby
kies has joined #ruby
GriffinHeart has quit [Quit: Leaving.]
raul782 has joined #ruby
benlieb has quit [Quit: benlieb]
milardovich has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nowhereman has quit [Read error: Connection reset by peer]
nowhereman has joined #ruby
DoubleMalt has quit [Ping timeout: 240 seconds]
neuraload has joined #ruby
Dimik has quit [Client Quit]
SpiffTR has joined #ruby
the_drow_ has joined #ruby
frozengeek__ has joined #ruby
frozengeek__ has quit [Remote host closed the connection]
Kug3lis has joined #ruby
zotherstupidguy has joined #ruby
milardovich has joined #ruby
<zotherstupidguy>
#emacs
terens has joined #ruby
saneax-_-|AFK is now known as saneax
<apeiros>
#ed
saneax is now known as saneax-_-|AFK
<zotherstupidguy>
sorry i was typing while weechat loading :)
<zotherstupidguy>
ed is nice hahaha
<zotherstupidguy>
apeiros whats your fav theory of computation book?
nankyokusei has joined #ruby
porfa_ has joined #ruby
braincrash has quit [Ping timeout: 248 seconds]
CloCkWeRX has quit [Ping timeout: 248 seconds]
zapata has quit [Ping timeout: 260 seconds]
kassav has joined #ruby
saneax-_-|AFK is now known as saneax
maattdd__ has joined #ruby
<apeiros>
zotherstupidguy: there's not that many books I've read. while I own TAOCP, I still haven't fully read it, so can't name that :)
milardovich has quit [Ping timeout: 240 seconds]
porfa has quit [Ping timeout: 272 seconds]
porfa_ is now known as porfa
<apeiros>
I did like "Algorithmen und Datenstrukturen" by Widmayer
agit0 has quit [Quit: zzzZZZ….]
<apeiros>
was a good introduction to the basic algorithms and data structures
Kug3lis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<zotherstupidguy>
i was checkin TAOCP at the library yesterday, its third edition! which one you own?
<apeiros>
I own a version where the last book wasn't fully released…
teclator has quit [Ping timeout: 245 seconds]
<apeiros>
I'd have to check my shelf, but I'm not at home.
<zotherstupidguy>
dude, the last books aren't even written yet!
teclator has joined #ruby
<zotherstupidguy>
i think knuth wants it to be 12 volumes
<apeiros>
interesting. so the earlier books are already in newer editions while not all books are even out yet.
<zotherstupidguy>
each volume about 2 chapters
nankyokusei has quit [Ping timeout: 255 seconds]
hahuang61 has joined #ruby
<zotherstupidguy>
yeah!!!!
<zotherstupidguy>
he started writing in the 1930s or somthing :D
<apeiros>
o0
Yxhuvud has quit [Ping timeout: 272 seconds]
<apeiros>
first edition: 1968
<zotherstupidguy>
i am bad with dates :D okay
<apeiros>
ahaha, book 5 - planned release date: 2025
hotpancakes has joined #ruby
<zotherstupidguy>
i was reading sipser book must got dates mixed in my mind :D
<zotherstupidguy>
i really hope he makes it
<apeiros>
same
<zotherstupidguy>
those books make the perfect gift :)
<zotherstupidguy>
timeless
araujo has joined #ruby
araujo has quit [Changing host]
araujo has joined #ruby
frozengeek__ has joined #ruby
dionysus69 has quit [Ping timeout: 245 seconds]
<zotherstupidguy>
apeiros: which book you recommend for learning regex?
<dminuoso>
A book?
hahuang61 has quit [Ping timeout: 240 seconds]
<al2o3-cr>
zotherstupidguy: the docs are pretty concrete
<dminuoso>
zotherstupidguy: Regular expressions are not that complex, and if your use case is so complex that you think you require a book, you really need a parser instead.
<zotherstupidguy>
i meant somthing to understand regex not just ruby regex
<dminuoso>
zotherstupidguy: Any Ruby book covers regular expressions.
SpiffTR has quit [Quit: Leaving.]
Mortomes|Work has joined #ruby
<zotherstupidguy>
dminuoso i agree in principle 100%
milardovich has joined #ruby
<herwin>
there is an o'reilly book "mastering regular expressions"
<dminuoso>
Oh boy
jsrn has joined #ruby
<herwin>
the only book I know of that is really focused on regex
<dminuoso>
herwin: I mean Im all for books, but somethinig about that title really disturbs me.
<apeiros>
zotherstupidguy: not sure it's the right one for learning them, but I liked mastering regular expressions
zapata has joined #ruby
<apeiros>
oh I see herwin already mentioned that one
braincrash has joined #ruby
hotpancakes has quit [Ping timeout: 255 seconds]
pawnbox_ has quit [Remote host closed the connection]
enilsen16 has quit [Quit: enilsen16]
aremaref has quit [Ping timeout: 272 seconds]
pawnbox has joined #ruby
milardovich has quit [Ping timeout: 246 seconds]
enilsen16 has joined #ruby
mikecmpbll has joined #ruby
aupadhye has quit [Ping timeout: 246 seconds]
mekeor has joined #ruby
agit0 has joined #ruby
kassav has quit [Ping timeout: 248 seconds]
jshjsh has quit [Ping timeout: 272 seconds]
neuraload has quit [Quit: This computer has gone to sleep]
rodfersou has joined #ruby
SpiffTR has joined #ruby
JoshS has joined #ruby
rodfersou is now known as rodfersou|coffee
kassav has joined #ruby
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
neuraload has joined #ruby
nonyobu has joined #ruby
teclator has quit [Ping timeout: 258 seconds]
flying has joined #ruby
pawnbox has quit [Read error: Connection reset by peer]
pawnbox has joined #ruby
nankyokusei has joined #ruby
ishe_ua has joined #ruby
Alina-malina has quit [Ping timeout: 272 seconds]
aupadhye has joined #ruby
jshjsh has joined #ruby
JoshS has quit [Disconnected by services]
jshjsh is now known as JoshS
kareelee has joined #ruby
maattdd__ has quit [Ping timeout: 255 seconds]
milardovich has joined #ruby
nankyokusei has quit [Ping timeout: 248 seconds]
Beams has joined #ruby
Lycantrop_ has joined #ruby
maattdd__ has joined #ruby
raul782 has quit [Remote host closed the connection]
Alina-malina has joined #ruby
juanda has joined #ruby
milardovich has quit [Ping timeout: 258 seconds]
dc4 has joined #ruby
dc2 has quit [Read error: Connection reset by peer]
juanda has quit [Ping timeout: 248 seconds]
GriffinHeart has quit [Quit: Leaving.]
saneax is now known as saneax-_-|AFK
<blackbombay>
apeiros: what do you think of redis
teclator has joined #ruby
<apeiros>
blackbombay: didn't I answer that question yesterday? o0
saneax-_-|AFK is now known as saneax
xall_ has quit [Ping timeout: 245 seconds]
SpiffTR has quit [Read error: Connection reset by peer]
<blackbombay>
i was curious if you used it with something other than sidekiq
manjaro-kde5__ has joined #ruby
<apeiros>
what's yours?
Silthias2 has joined #ruby
pawnbox has quit [Read error: Connection reset by peer]
Silthias1 has quit [Ping timeout: 258 seconds]
<apeiros>
I tried to use it for autocmpletion. turned out the example I found online was horribly slow and I wasn't willing to invest time to make it fast.
pawnbox has joined #ruby
<blackbombay>
if you can not use it then it's better but sounds interesting to use directly in a webapp (outside sidekiq)
<blackbombay>
seems in ruby though it's more like infrastructure than a tool.
StoneCypher has joined #ruby
Silthias has quit [Ping timeout: 256 seconds]
<apeiros>
do you use it outside of redis?
<apeiros>
I think for most of my needs, there's just no real justification. pg is fast enough and having one less dependency is worth more the me than 0.1ms instead of 1ms queries (and I'm not even sure redis would actually give me that)
<apeiros>
uh, lol
<apeiros>
do you use it outside of *sidekiq*?
arnovr has joined #ruby
<arnovr>
hello
<blackbombay>
yeah i've used it directly with the redis gem
<dminuoso>
blackbombay: redis can be used in various caching scenarios
<blackbombay>
as well as sidekiq
<blackbombay>
but with sidekiq you dont think about it much
<dminuoso>
blackbombay: The thing is, redis and pg are not comparable, so the question of whether redis is useful depends on whether you need a key-value store or not.
<apeiros>
dminuoso: you can (ab)use pg as kvstore
<dminuoso>
;)
aeontech has joined #ruby
<blackbombay>
id say use
<dminuoso>
apeiros: well yeah, I suppose with hstore you can
<apeiros>
and I do that because I don't need any of the specialization redis offers
<apeiros>
even without hstore. but hstore and jsonb help
<blackbombay>
hstore and JSON columns too.
<dminuoso>
apeiros: in the end the main reason many use redis is the massive speed for it.
StoneCypher has quit [Ping timeout: 258 seconds]
<dminuoso>
apeiros: Because once you get into the area of needing tens of thousands of updates per second PG will collapse.
<apeiros>
I haven't done extensive testing, but I have my doubts redis will be that much faster than pg in a ruby env. I'd expect overheads kill most benefits.
<apeiros>
ok. and that's where we're "out of my needs" :D
<dminuoso>
apeiros: Look at it differently. Imagine you have a cluster of 20 web servers behind a load balancer that all connect to the same database and redis.
<dminuoso>
That is something that might happen in a Ruby world
<dminuoso>
But good point
<dminuoso>
It depends on the needs
<zotherstupidguy>
dminuoso same db server is somthing that most try to move a way from with microservices style on the rise
<dminuoso>
Though mm, with asynchronous WAL PG can get pretty darn close.
<dminuoso>
zotherstupidguy: Are you sure? multi-master replication is a real PITA for any serious RDBMS.
<dminuoso>
;-)
mim1k|wo1k is now known as mim1k|work
<blackbombay>
microservices require a good architect.
<blackbombay>
easy to fuck up.
Lycantrop_ has quit [Remote host closed the connection]
<zotherstupidguy>
true
djbkd has joined #ruby
<dminuoso>
zotherstupidguy: The reason this is often not a problem, is because things such as DynamoDB are easy to use.
ur5us has joined #ruby
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
<zotherstupidguy>
dminuoso: I am afraid i dont know about DynamoDB
maattdd has quit [Read error: Connection reset by peer]
<dminuoso>
Unlike redis that has some serious limitations (such as requiring all data to be held in memory)
<zotherstupidguy>
i think i see your point
xall_ has quit [Ping timeout: 272 seconds]
Beams has quit [Quit: .]
enilsen16 has quit [Quit: enilsen16]
drizzle has quit [Quit: WeeChat 1.6]
SeepingN has quit [Quit: The system is going down for reboot NOW!]
ayonkhan has joined #ruby
<apeiros>
I wish pg had unlogged in-memory tables
LoneHermit has joined #ruby
<apeiros>
but unlogged tables are already pretty fast
<apeiros>
and comparing a logged table to redis… well… :)
<dminuoso>
apeiros: Well if pg has enough effective cache size, you can mimic this.
nankyokusei has joined #ruby
<dminuoso>
or rather shared buffers and effective cache size
milardovich has joined #ruby
LoneHermit has quit [Ping timeout: 255 seconds]
djbkd_ has joined #ruby
nankyokusei has quit [Ping timeout: 248 seconds]
milardovich has quit [Ping timeout: 272 seconds]
dc4 has quit [Ping timeout: 255 seconds]
Silox| has joined #ruby
tvw has quit [Ping timeout: 240 seconds]
pawnbox has quit [Read error: Connection reset by peer]
pawnbox has joined #ruby
nadir|mobile has joined #ruby
Sammichmaker has quit [Quit: Leaving]
maattdd__ has quit [Ping timeout: 255 seconds]
Alina-malina has quit [Ping timeout: 272 seconds]
aupadhye has quit [Ping timeout: 272 seconds]
mim1k|work has quit [Ping timeout: 248 seconds]
rodfersou|coffee is now known as rodfersou
paradisaeidae has quit [Quit: ChatZilla 0.9.93 [Firefox 50.1.0/20161208153507]]
paradisaeidae_ has quit [Quit: ChatZilla 0.9.93 [Firefox 50.1.0/20161208153507]]
mim1k|work has joined #ruby
Alina-malina has joined #ruby
Beams has joined #ruby
workmad3 has joined #ruby
TvL2386 has joined #ruby
dionysus69 has joined #ruby
JeanCarloMachado has joined #ruby
JeanCarloMachado has quit [Remote host closed the connection]
djbkd_ has quit [Remote host closed the connection]
c355e3b has quit [Quit: Connection closed for inactivity]
blaxter has quit [Quit: foo]
raul782 has joined #ruby
jaruga___ has joined #ruby
jaruga___ is now known as jaruga
JeanCarloMachado has joined #ruby
zipkid_ is now known as zipkid
raul782 has quit [Ping timeout: 248 seconds]
nettoweb has joined #ruby
maattdd__ has joined #ruby
Azure has quit [Read error: Connection reset by peer]
biberu has joined #ruby
postmodern has quit [Remote host closed the connection]
Alina-malina has quit [Changing host]
Alina-malina has joined #ruby
nankyokusei has joined #ruby
Azure has joined #ruby
CloCkWeRX has joined #ruby
silverdust has joined #ruby
<silverdust>
I have name = 'john' and meth = 'upcase' . How can I call the method as a string on the name
<silverdust>
I tried send(meth, name) but I get undefined method upcase for object
maattdd__ has quit [Ping timeout: 255 seconds]
<apeiros>
name.send(meth)
pandaant has joined #ruby
nankyokusei has quit [Ping timeout: 256 seconds]
hahuang61 has joined #ruby
<blackbombay>
good habit to use __send__.
<sonOfRa>
silverdust: what apeiros is saying is: when you just call send, it is called on "the global object". Try, for example, send('to_s'). You'll likely get "main"
<sonOfRa>
And since that global object is not a string, you cannot call upcase on it
<silverdust>
Yes that works. I don't get the __send__ part
<silverdust>
It works too but what's the difference?
milardovich has joined #ruby
aufi has quit [Read error: Connection reset by peer]
<silverdust>
blackbombay: ^
<sonOfRa>
silverdust: it still works when you have a class Email, which has a method send
dc4 has joined #ruby
aidalgol has quit [Quit: zZzZzZzzz]
aufi has joined #ruby
hotpancakes has joined #ruby
hahuang61 has quit [Ping timeout: 255 seconds]
<silverdust>
oh that's cleer. Thanks y'all
<silverdust>
*clever
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
maattdd__ has joined #ruby
milardovich has quit [Ping timeout: 246 seconds]
Cork has quit [Quit: .]
futilegames has joined #ruby
ur5us has quit [Ping timeout: 245 seconds]
Cork has joined #ruby
futilegames has quit [Client Quit]
Kug3lis has joined #ruby
hotpancakes has quit [Ping timeout: 255 seconds]
GriffinHeart has joined #ruby
pawnbox has quit [Read error: No route to host]
futilegames has joined #ruby
pawnbox has joined #ruby
SpiffTR has quit [Quit: Leaving.]
mim1k|work has quit [Ping timeout: 245 seconds]
neuraload has quit [Quit: This computer has gone to sleep]
Kug3lis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
futilegames has quit [Ping timeout: 272 seconds]
nikivi has joined #ruby
maattdd__ has quit [Ping timeout: 255 seconds]
aupadhye has joined #ruby
mim1k|work has joined #ruby
nikivi has quit [Quit: irc]
polysics has joined #ruby
aupadhye has quit [Ping timeout: 272 seconds]
milardovich has joined #ruby
jshjsh has joined #ruby
SesMan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
the_drow__ has joined #ruby
nankyokusei has joined #ruby
the_drow_ has quit [Ping timeout: 272 seconds]
sylario has joined #ruby
JoshS has quit [Ping timeout: 272 seconds]
frozengeek__ has quit [Quit: frozengeek__]
frozengeek__ has joined #ruby
<apeiros>
blackbombay: good point. but IMO better habit to use public_send /cc silverdust
milardovich has quit [Ping timeout: 246 seconds]
nikivi has joined #ruby
anisha_ has quit [Quit: This computer has gone to sleep]
enyo has quit [Ping timeout: 272 seconds]
<blackbombay>
yeah, public_send is a good habit
nankyokusei has quit [Ping timeout: 240 seconds]
jaruga has quit [Quit: jaruga]
mim1k|work has quit [Ping timeout: 258 seconds]
mim1k|work has joined #ruby
charliesome has joined #ruby
aupadhye has joined #ruby
neuraload has joined #ruby
faces has quit [Read error: Connection reset by peer]
csk157 has joined #ruby
mim1k|wo1k has joined #ruby
mim1k|work has quit [Ping timeout: 255 seconds]
milardovich has joined #ruby
SpiffTR has joined #ruby
mim1k|wo1k has quit [Ping timeout: 256 seconds]
milardovich has quit [Ping timeout: 256 seconds]
mim1k|work has joined #ruby
StoneCypher has joined #ruby
TomyWork has quit [*.net *.split]
tsunamie has quit [*.net *.split]
adaedra has quit [*.net *.split]
vcoinminer has quit [*.net *.split]
kireevco has quit [*.net *.split]
Synthead has quit [*.net *.split]
hogetaro has quit [*.net *.split]
Emmanuel_Chanel has quit [*.net *.split]
Guest57693 has quit [*.net *.split]
jolamb has quit [*.net *.split]
Madper has quit [*.net *.split]
CrazyEddy has quit [*.net *.split]
Talltree has quit [*.net *.split]
mradmacher has quit [*.net *.split]
seggy has quit [*.net *.split]
sonne has quit [*.net *.split]
helpa has quit [*.net *.split]
sunya7a has quit [*.net *.split]
funnel has quit [*.net *.split]
raatiniemi has quit [*.net *.split]
vdl has quit [*.net *.split]
chihhsin has quit [*.net *.split]
_br___ has quit [*.net *.split]
lianj has quit [*.net *.split]
kaffepanna has quit [*.net *.split]
jrmhurst92 has quit [*.net *.split]
brixen has quit [*.net *.split]
davic has quit [*.net *.split]
emerson has quit [*.net *.split]
chazu has quit [*.net *.split]
duper has quit [*.net *.split]
marens has quit [*.net *.split]
bodie_ has quit [*.net *.split]
esc4rg0t has quit [*.net *.split]
shiver has quit [*.net *.split]
DefV has quit [*.net *.split]
dyjakan has quit [*.net *.split]
priodev has quit [*.net *.split]
bogdanteleaga has quit [*.net *.split]
sinduck has quit [*.net *.split]
tjvc has quit [*.net *.split]
justinmcp has quit [*.net *.split]
valeri_ufo has quit [*.net *.split]
ccooke has quit [*.net *.split]
vifino has quit [*.net *.split]
havenwood has quit [*.net *.split]
kenichi has quit [*.net *.split]
`derpy has quit [*.net *.split]
ReinH_ has quit [*.net *.split]
shtirlic has quit [*.net *.split]
yasu has quit [*.net *.split]
zmo has quit [*.net *.split]
m1dnight1 has quit [*.net *.split]
majjoha has quit [*.net *.split]
sentriz has quit [*.net *.split]
oz has quit [*.net *.split]
jasondotstar has quit [*.net *.split]
kke has quit [*.net *.split]
ccooke_ has joined #ruby
kke has joined #ruby
_br__ has joined #ruby
shiver has joined #ruby
marens has joined #ruby
lianj has joined #ruby
valeri_uF0 has joined #ruby
jasondotstar has joined #ruby
oz has joined #ruby
zmo has joined #ruby
priodev has joined #ruby
DefV has joined #ruby
tjvc has joined #ruby
kenichi has joined #ruby
kaffepanna has joined #ruby
sunya7a has joined #ruby
helpa has joined #ruby
duper has joined #ruby
mradmacher has joined #ruby
`derpy has joined #ruby
dyjakan has joined #ruby
ReinH_ has joined #ruby
chihhsin has joined #ruby
sunya7a has quit [Changing host]
sunya7a has joined #ruby
yasu has joined #ruby
LoneHerm_ has joined #ruby
esc4rg0t has joined #ruby
shiver has quit [Changing host]
shiver has joined #ruby
Emmanuel_Chanel has joined #ruby
marens has quit [Changing host]
marens has joined #ruby
lianj has quit [Changing host]
lianj has joined #ruby
hogetaro has joined #ruby
helpa has joined #ruby
helpa has quit [Changing host]
TomyWork has joined #ruby
valeri_uF0 is now known as valeri_ufo
funnel has joined #ruby
zmo has quit [Changing host]
zmo has joined #ruby
chazu has joined #ruby
vdl has joined #ruby
tjvc has joined #ruby
tjvc has quit [Changing host]
m1dnight1 has joined #ruby
adaedra has joined #ruby
justinmcp has joined #ruby
havenwood has joined #ruby
havenwood has joined #ruby
havenwood has quit [Changing host]
shtirlic has joined #ruby
davic has joined #ruby
jolamb has joined #ruby
bodie_ has joined #ruby
Talltree has joined #ruby
raatiniemi has joined #ruby
sinduck has joined #ruby
majjoha has joined #ruby
giraffe has joined #ruby
bogdanteleaga has joined #ruby
vcoinminer has joined #ruby
giraffe is now known as Guest73411
vifino has joined #ruby
kireevco has joined #ruby
iMadper has joined #ruby
iMadper has joined #ruby
iMadper has quit [Changing host]
sonne has joined #ruby
StoneCypher has quit [Ping timeout: 255 seconds]
seggy has joined #ruby
brixen has joined #ruby
ELLIOTTCABLE has quit [Ping timeout: 240 seconds]
manjaro-kde5__ has quit [Ping timeout: 246 seconds]
ghostlight has quit [Ping timeout: 245 seconds]
ELLIOTTCABLE has joined #ruby
LoneHerm_ has quit [Ping timeout: 256 seconds]
uu has quit [Ping timeout: 248 seconds]
ELLIOTTCABLE has quit [Excess Flood]
jrmhurst92 has joined #ruby
jcao219 has quit [Ping timeout: 258 seconds]
nankyokusei has joined #ruby
ELLIOTTCABLE has joined #ruby
uu has joined #ruby
csk157 has quit [Ping timeout: 255 seconds]
csk157_ has joined #ruby
enyo has joined #ruby
nadir|mobile is now known as nadir
nikivi has quit [Quit: irc]
nikivi has joined #ruby
nankyokusei has quit [Ping timeout: 272 seconds]
tyang has joined #ruby
pawnbox has quit [Remote host closed the connection]
SpiffTR has quit [Quit: Leaving.]
pawnbox has joined #ruby
porfa has quit [Quit: porfa]
csk157_ has quit [Ping timeout: 258 seconds]
ruby-lang199 has joined #ruby
saneax is now known as saneax-_-|AFK
pawnbox has quit [Read error: Connection reset by peer]
pawnbox has joined #ruby
ccooke_ is now known as ccooke
newbie1 has joined #ruby
<ruby-lang199>
hi i am stuck at this problem
<ruby-lang199>
i can't add my @area to @length key
<silverdust>
in an area of boolean values I'd like to use this short method check (don't know what it's called) myArry.(&:is_true?) but is there a method like that ?
<apeiros>
noregret: what did you try?
markhkim has joined #ruby
shinnya has joined #ruby
<noregret>
apeiros: i'm actually a ruby noob, i just tried to split on \r\n, not sure how to go next
<silverdust>
Else I'd have to make it longer as myArry.select{ |a| a }
cibs has quit [Ping timeout: 268 seconds]
<markhkim>
The json 1.8.3 gem hasn't been compiling on ruby 2.4.0 because of the rb_cBignum issue. any idea as to when it'll be fixed?
doubleemms has joined #ruby
porfa has quit [Quit: porfa]
cibs has joined #ruby
<manveru>
silverdust: arr.any?
<apeiros>
noregret: str.scan(/([^=])+=(.*)/.to_h might work
<apeiros>
manveru: that's different from .select { |a| a }, though
<apeiros>
silverdust: that question makes little sense to me. sounds like you have an array of true/false's and you want to remove all false's?
<manveru>
If they are all boolean?
jrafanie has joined #ruby
nankyokusei has joined #ruby
<manveru>
Oh
<apeiros>
so your result after that is just an array full of true values?
<apeiros>
`ary - [false]`, but honestly seems weird…
tk__ has quit [Quit: ばいばい]
the_drow__ has joined #ruby
the_drow__ has quit [Client Quit]
<manveru>
Also split('=', 2) would be nicer for the hash?
<apeiros>
the fuck did awesome_print or whatever pry uses do with String#inspect?
<apeiros>
manveru: sure. I'd now say it's just slow, but the last time I said that I was wrong :o)
<apeiros>
so I'll say: but mine's less code!
<blackbombay>
apeiros: pry uses pretty_print.
nankyokusei has quit [Ping timeout: 255 seconds]
<manveru>
I'd go for readable over that
DLSteve_ has joined #ruby
<manveru>
But yeah, if he knows regex well :)
SesMan has joined #ruby
<silverdust>
apeiros: yes
* apeiros
wonders why . matches \r
<apeiros>
str.scan(/([^=]+)=([^\r\n]*)/).to_h
<apeiros>
there, slightly more readable
<apeiros>
oh
<apeiros>
str.scan(/([^\r\n=]+)=([^\r\n]*)/).to_h
<noregret>
apeiros: perfect
warrshrike has quit [Ping timeout: 260 seconds]
<noregret>
thanks :)
<apeiros>
\r\n, tsssk, who uses \r\n…
warrshrik has joined #ruby
<noregret>
apeiros: some web service
igniting has quit [Ping timeout: 248 seconds]
milardovich has joined #ruby
<silverdust>
apeiros: it's a method that calculates percentages. It takes an array of all the values after they've been processed to booleans and determines the percentage by true values over total
<apeiros>
silverdust: .count(true)
<apeiros>
?xy silverdust
<ruby[bot]>
silverdust: 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
<silverdust>
oh that's better. Thanks
pawnbox has quit [Remote host closed the connection]
<silverdust>
You're right. I should've just asked but I thought I should try
<apeiros>
it is a good idea to tell about your approach, to show that you're thinking about it
<apeiros>
but you should start with the actual problem
ifctj has quit [Ping timeout: 245 seconds]
<silverdust>
okay thanks
aeontech has quit [Quit: aeontech]
pawnbox has joined #ruby
polishdub has joined #ruby
ifctj has joined #ruby
Beams has quit [Remote host closed the connection]
milardovich has quit [Ping timeout: 258 seconds]
insanedreamer has quit [Ping timeout: 256 seconds]
Beams has joined #ruby
CloCkWeRX has quit [Quit: Leaving.]
hotpancakes has quit [Remote host closed the connection]
hahuang61 has joined #ruby
pawnbox has quit [Ping timeout: 246 seconds]
Odyssey has quit [Quit: Leaving]
_sfiguser has quit [Ping timeout: 255 seconds]
chouhoulis has joined #ruby
pawnbox has joined #ruby
nofxx has quit [Ping timeout: 248 seconds]
ifctj has quit [Ping timeout: 248 seconds]
_sfiguser has joined #ruby
hahuang61 has quit [Ping timeout: 240 seconds]
Kaze_FX_ has joined #ruby
Kaze_FX_ has quit [Client Quit]
flashbang has quit [Ping timeout: 240 seconds]
synthroi_ has quit [Remote host closed the connection]
az7arul has quit []
iogf has joined #ruby
teclator has joined #ruby
ta has quit [Remote host closed the connection]
kassav has quit [Quit: kassav]
kassav has joined #ruby
kassav has quit [Client Quit]
nankyokusei has joined #ruby
Derperpe1 has joined #ruby
kassav_ has joined #ruby
nettoweb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kassav_ is now known as kassav
Devalo has joined #ruby
Snickers has quit [Quit: Snickers]
insanedreamer has joined #ruby
Mortomes|Train has quit [Ping timeout: 261 seconds]
nankyokusei has quit [Ping timeout: 246 seconds]
sebastiansier has joined #ruby
Derperpe1 has quit [Ping timeout: 245 seconds]
Kaze_FX has quit [Quit: leaving]
Kaze_FX has joined #ruby
shinnya has quit [Ping timeout: 265 seconds]
ishe_ua has quit [Write error: Broken pipe]
ishe_ua` has joined #ruby
Devalo has quit [Ping timeout: 352 seconds]
aupadhye has quit [Ping timeout: 252 seconds]
OTORelic has joined #ruby
terens has quit [Remote host closed the connection]
insanedreamer has quit [Ping timeout: 256 seconds]
kareelee has quit [Remote host closed the connection]
jge has joined #ruby
kareelee has joined #ruby
<jge>
hey all good morning, I'm troubleshooting a ruby app (redmine) which runs behind apache (using passenger), the problem we are seeing is it takes forever to load from time to time, production log doesn't show much.. any idea where I can look for issues?
synthroid has joined #ruby
kareelee has quit [Ping timeout: 241 seconds]
StoneCypher has joined #ruby
skweek has joined #ruby
milardovich has joined #ruby
StoneCypher has quit [Ping timeout: 245 seconds]
h1fuelcell has quit [Remote host closed the connection]
h1fuelcell has joined #ruby
kristofferR has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
eneas has joined #ruby
h1fuelcell has quit [Remote host closed the connection]
h1fuelcell has joined #ruby
milardovich has quit [Ping timeout: 255 seconds]
Snickers has joined #ruby
nankyokusei has joined #ruby
insanedreamer has joined #ruby
insanedreamer has quit [Client Quit]
eneas has left #ruby ["Adiós"]
<apeiros>
jge: redmine is a rails app, hence I'd ask in the rails channel, or even look out for a redmine specific channel
mark_66 has quit [Remote host closed the connection]
<ljarvis>
just updated the gist to be more clear
a7d7p has joined #ruby
raul782 has joined #ruby
petrichorx_ has joined #ruby
<canton7>
that's a tricky problem. if A matches B, and A matches C, is B guaranteed to match C?
<ljarvis>
yep
bmurt has joined #ruby
kareelee has joined #ruby
<apeiros>
since you can't access name, you only "bin"/"bucket" them, yes? i.e. an array of arrays? because without a name you lack the key for a hash?
<apeiros>
I think you won't get around O(n^2) in that case.
siddart has quit [Ping timeout: 256 seconds]
<ljarvis>
yeah exactly
<apeiros>
i.e. rinse and repeat: shift first item, remove matching from rest and put those into same bi
<apeiros>
*bin
porfa has joined #ruby
<ljarvis>
heh yeah i have a loop and shift, i thought i probably wouldn't get much more elegant than this but thought i'd throw the idea around
<canton7>
I was thinking something like... h = {}, things.each{ |thing| key = h.keys.find{ |key| key.matches?(thing) }; if key h[key] << thing; else h[thing] = [] }
<canton7>
uh, h[thing] = [thing]
<canton7>
so one member of each bucket gets chosen as the key for that bucket. When processing a new thing, you test it against each of the keys, and if it matches the key, it goes in the bucket
kareelee has quit [Remote host closed the connection]
<canton7>
saves testing a thing against all of the members of each bucket
Silox| has quit [Quit: Connection closed for inactivity]
<canton7>
so it becomes O(number of buckets)
testuser1 has joined #ruby
<canton7>
uh, no it won't be. But it'll be less than O(n^2) surely?
<apeiros>
because you test your n items against n keys
<apeiros>
and yes, it is smaller than n^2, but not in a way which makes it a smaller term :)
kareelee has quit [Ping timeout: 240 seconds]
vondruch has quit [Ping timeout: 256 seconds]
maattdd__ has joined #ruby
<apeiros>
your approach might be faster though since you don't delete items from an array
aganov has quit [Remote host closed the connection]
milardovich has joined #ruby
pawnbox has quit [Ping timeout: 248 seconds]
<apeiros>
so: buckets = []; items.each do |item| bucket = buckets.find { |b| b.first.matches?(item) }; if bucket then bucket << item else buckets << [item] end end
<apeiros>
IMO more elegant than my shift+partition solution
<ljarvis>
yeah I like that
<ljarvis>
thanks both
<apeiros>
yw
Derperpe1 has joined #ruby
StoneCypher has joined #ruby
blackbombay has joined #ruby
<apeiros>
I'm somewhat curious how it's possible to have access to #match? but not #name
pawnbox has joined #ruby
<canton7>
yeah, and they have different numbers of comparisons based on how many keys there are, and what order the elements appear in the initial array
<canton7>
my gut feeling is that yours might come out cheaper in general /shrug
<apeiros>
no, the number of comparisons is the same
<ljarvis>
apeiros: matches? is more complex, i was intentionally reducing the complexity for the example
maattdd__ has quit [Ping timeout: 272 seconds]
<apeiros>
ljarvis: I assumed that. translate: I'm curious how you have access to a method which has access to all data used to match items, but not to the data used itself
milardovich has quit [Ping timeout: 248 seconds]
<apeiros>
because the data used to match could probably be used to create a hash key
csk157_ has joined #ruby
<apeiros>
and then you can go O(n)
<apeiros>
and use the wildly elegant code: items.group_by(&:itself)
<apeiros>
or items.group_by(&:match_key)
Derperpe1 has quit [Ping timeout: 248 seconds]
troulouliou_div2 has joined #ruby
warrshrik has quit [Ping timeout: 260 seconds]
<ljarvis>
yeah I thought about a match key too, the method is complex in that it calls methods on children of children classes, so a decent key would be non-trivial. Might be worth the effort, but I'm not really sure
csk157 has quit [Ping timeout: 245 seconds]
<ljarvis>
something something law of demeter
<canton7>
hmm ok, they do have the same number of comparisons
mwlang has joined #ruby
brent__ has joined #ruby
csk157_ has quit [Ping timeout: 256 seconds]
hotpancakes has joined #ruby
hotpanca_ has joined #ruby
hotpancakes has quit [Remote host closed the connection]
enyo has quit [Ping timeout: 258 seconds]
brent__ has quit [Remote host closed the connection]
xall_ has joined #ruby
JoshS has joined #ruby
kareelee has joined #ruby
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nankyokusei has joined #ruby
brent__ has joined #ruby
StoneCypher has quit [Ping timeout: 245 seconds]
porfa has quit [Quit: porfa]
kareelee has quit [Ping timeout: 256 seconds]
synthroid has quit [Remote host closed the connection]
StoneCypher has joined #ruby
manjaro-kde5__ has quit [Ping timeout: 248 seconds]
nankyokusei has quit [Ping timeout: 248 seconds]
dunpeal has joined #ruby
<dunpeal>
Hey. I have the following 3 lines in a spec: s = "foo"; expect(s).to receive(:upcase); expect(s.upcase).to eq "FOO"
SpiffTR has quit [Quit: Leaving.]
<dunpeal>
this spec fails, because apparently s.upcase returns nil?
Yzguy has joined #ruby
<dunpeal>
Seems like that's caused by the second expect.
<dunpeal>
Any idea why and how to prevent that?
kareelee has joined #ruby
jenrzzz has quit [Ping timeout: 245 seconds]
nhhc has joined #ruby
<toretore>
dunpeal: i'm assuming you're not actually testing a string, what does your actual code look like?
raul782 has quit [Read error: Connection reset by peer]
siddart has joined #ruby
raul782_ has joined #ruby
sebastiansier has quit [Read error: Connection reset by peer]
igniting has joined #ruby
<ljarvis>
doesn't your except/receive mock the original method?
<ljarvis>
I don't understand why you'd call expect to receive and then actually call it within the spec, that sort-of defeats the point
Yzguy has quit [Quit: Bye]
flashbang has joined #ruby
Snowy has joined #ruby
troys has joined #ruby
_maxxe has joined #ruby
_maxxe has left #ruby [#ruby]
last_staff has quit [Quit: last_staff]
ruurd has quit [Remote host closed the connection]
maattdd__ has joined #ruby
nankyokusei has joined #ruby
Kug3lis has joined #ruby
xall_ has quit [Ping timeout: 245 seconds]
username_ has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
AgentVenom has joined #ruby
JoshS has quit [Ping timeout: 272 seconds]
eelster has joined #ruby
raul782_ has quit []
unshadow has joined #ruby
<eelster>
Does anyone have any advice for what to prep for for a whiteboarding interview in Ruby?
[Butch] has joined #ruby
nankyokusei has quit [Ping timeout: 245 seconds]
<eelster>
As in, what has tripped any of y'all up beforehand?
<ljarvis>
ugh
saneax-_-|AFK is now known as saneax
<eelster>
ljarvis: (Sorry if this isn't welcomed here. I'm just freaking out because I got a white board for my dream job)
synthroid has joined #ruby
<ljarvis>
it's fine here, I just really hate whiteboard interviews. I basically think they're ridiculous and I'm sorry you're having to do that for your dream job
<eelster>
ljarvis: It's alright. I mean I understand their purpose, I just haven't had one before so I'm slightly concerned.
<ljarvis>
unfortunately it's basically impossible to prepare for one
<eelster>
So I've heard. I've been practicing algorithms and data structures to see if that might be useful
<ljarvis>
I don't understand their purpose apart from to see how a candidate does against immense pressure with no preparation
<ljarvis>
which is basically no programming job ever
nettoweb has quit [Read error: Connection reset by peer]
<ljarvis>
I imagine it'll be algos and data structures yeah, but it's impossible to know and obviously depends on what you'll be doing day-to-day
milardovich has joined #ruby
<ljarvis>
or, like most whiteboard interviews you'll be tested on stuff you won't actually be doing day-to-day anyway
<ljarvis>
:(
<eelster>
That's my guess.
<ljarvis>
so my advice is tell them to go to hell, but obviously you don't want that for your dream job :)
<eelster>
Considering the job is mostly RoR, I'm guessing there's not going to be too much in terms of time complexity analysis in my day-to-day but who knows
<eelster>
It seems like the person who is running my whiteboard doesn't want to do it.
<ljarvis>
you have an interesting dream job ;)
<eelster>
(The recruiter told me it might just be a formality?)
<ljarvis>
possibly yeah
<eelster>
ljarvis: Maybe not dream job per se, but it's a huge step for me.
<ljarvis>
eelster: where are you based?
<eelster>
ljarvis: Outside of Philadelphia.
<eelster>
ljarvis: How about you?
<ljarvis>
in and around London, I work remotely though so it can be from anywhere
SpiffTR has joined #ruby
TheWhip has quit [Remote host closed the connection]
<eelster>
ljarvis: That's pretty cool. I mean the nice thing is I"ll be able to move into my own flat if I get this job and it has benefits, so it definitely is a step in the right direction.
nettoweb has joined #ruby
<eelster>
I'm currently living with 2 roommates from Uni.
<ljarvis>
absolutely, sounds like it's important to you. Have you applied for many jobs?
<eelster>
ljarvis: I have! Oddly, this job came to me
jhack has joined #ruby
hahuang61 has joined #ruby
jlach has joined #ruby
<ljarvis>
ah great
ruurd has joined #ruby
<eelster>
I am normally quite wary of recruiters but I looked into this recruiting agency and the company and it's all legit.
ruurd is now known as Guest88653
chouhoulis has quit [Remote host closed the connection]
<eelster>
Also, in my interview, I ran through the Joel test and they had an 11 it seemed, so that's not too bad.
milardovich has quit [Ping timeout: 258 seconds]
bmurt has joined #ruby
chouhoulis has joined #ruby
<eelster>
They allow a ton of dev independence and use a lot of top of the line technology.
contradictioned has quit [Ping timeout: 255 seconds]
<ljarvis>
Sounds great. I wonder how they got such a terrible interview process :D
<eelster>
ljarvis: I haven't a clue.
conta has quit [Ping timeout: 248 seconds]
<eelster>
The actual interview with the devs was incredibly fun.
<eelster>
It involved a lot of the devs shitting on each other for using emacs vs. vim and then all of them shitting on the one dev that uses RubyMine.
<eelster>
Also they all wear hoodies, so comfy work env.
kith has quit [Quit: kith]
<ljarvis>
Did you happen to ask them if they had any advice for the whiteboard interview?
jsrn has quit [Read error: Connection reset by peer]
enyo has joined #ruby
hahuang61 has quit [Ping timeout: 255 seconds]
contradictioned has joined #ruby
benlieb has joined #ruby
<eelster>
ljarvis: They pretty much just said go in and do your best. They said that they focus on algorithms specifically more than language specific implementation, so don't get too caught up in the minutia of that
<ljarvis>
Seems like sound advice, whiteboard interviews are often quite general for obvious reasons, so it's mostly figuring out the experience level of the developer
<ljarvis>
hopefully it'll be quite relaxed
<eelster>
ljarvis: I'm hoping so.
<ljarvis>
Good luck anyway, I'm sure if anyone else here has advice they'll speak up
<eelster>
I'm sure. Thanks for you help though!
<eelster>
What kinda work do you do mostly?
<ljarvis>
I'm mostly a rails dev, though I currently find myself spending lots of time on non-coding tasks like recruitment and PCI compliance. It's a busy start to the year :)
nankyokusei has joined #ruby
troulouliou_div2 has quit [Quit: Leaving]
frozengeek__ has quit [Quit: frozengeek__]
amclain has joined #ruby
<eelster>
PCI compliance, how fu
<jlach>
Hey folks; I'm trying to figure out why ruby is occasionally segfaulting when requiring some innocent-looking modules. Is this the right channel to ask some c-implementation level ruby questions?
<eelster>
s/fu/fun
<ljarvis>
:D
<eelster>
jlach: Sure
juanda has quit [Read error: Connection reset by peer]
h1fuelcell has quit [Remote host closed the connection]
Devalo has joined #ruby
gusrub has joined #ruby
tjikkun has left #ruby ["WeeChat 1.5"]
gusrub has quit [Remote host closed the connection]
SesMan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
juanda has joined #ruby
<eelster>
jlach: What do you expect the value of klass to be
gusrub has joined #ruby
gusrub has quit [Remote host closed the connection]
gusrub has joined #ruby
gusrub has quit [Remote host closed the connection]
SpiffTR has quit [Quit: Leaving.]
gusrub has joined #ruby
gusrub has quit [Remote host closed the connection]
<jlach>
I don't rightly know; but from browsing the sources it looks like it should be a pointer to a class object, rather than nil?
gusrub has joined #ruby
jhack has quit [Ping timeout: 272 seconds]
<eelster>
jlach: I'm not sure. Can you do p &klass?
neuraload has joined #ruby
troys has quit [Quit: Bye]
Derperpe1 has quit [Ping timeout: 245 seconds]
Evesy has joined #ruby
Azure has quit [Ping timeout: 248 seconds]
Devalo has quit [Ping timeout: 258 seconds]
<jlach>
$15 = (const VALUE *) 0xd74978
<eelster>
So it does have an address in memory. That's good.
<Evesy>
Hey, I want to install the zookeeper ruby gem (https://rubygems.org/gems/zookeeper) on a bunch of production servers, however it requires a bunch of dev build tools (gcc, patch) to install -- Is there anyway to precompile this gem and than pull it from somewhere?
Azure|dc has joined #ruby
<jlach>
right, so it's coming from the `th->errinfo` struct
nonyobu has quit [Quit: Leaving]
<eelster>
What's the datatype of th->errinfo? p_error?
<eelster>
I mean error_t?
enyo has quit [Ping timeout: 258 seconds]
<jlach>
it's VALUE; this is coming from the `rb_thread_t` struct
<jlach>
I think it's meant to be a ruby-level exception?
dmin7b5 has joined #ruby
<jlach>
│572 /* temporary place of errinfo */ │
<jlach>
│573 VALUE errinfo;
<jlach>
guess i need to read up on EXEC_TAG/POP_TAG to find out how this path can be reached
<eelster>
jlach: That makes sense. Is it every passed to a ruby error function?
swills_ has quit [Read error: Connection reset by peer]
Beams has quit [Quit: .]
<jlach>
eelster: have you looked at the gist? the source snippets are there :P but yeah it's passed to rb_exc_raise, and crashes under it when it tries to find responds_to on a nil pointer
kareelee has quit [Read error: Connection reset by peer]
kareelee has joined #ruby
<eelster>
jlach: I looked at the gist, but I might have missed that. Sorry :/
<dionysus69>
i ll take a look at it after i solve my other problem i just hit on :D
gusrub has joined #ruby
Devalo has joined #ruby
croberts has quit [Remote host closed the connection]
conta has joined #ruby
<dunpeal>
ljarvis, toretore: I'm testing a method foo is supposed to call another method bar N times. I'm using the mock to verify that bar was indeed called N times.
aeontech has quit [Remote host closed the connection]
aremaref has joined #ruby
Ishido has quit [Read error: Connection reset by peer]
aeontech has joined #ruby
Toledo has joined #ruby
mattwashere has joined #ruby
<ljarvis>
dunpeal: so can you show us your real code and the error you get? the example you showed us doesn't align with what you've said
<jlach>
eelster: actually looking at the th->errinfo, the flags of 14620 look crazy too; it's suggesting that it's a NODE_LIT, if i'm doing the transformations right, which is difficult to reconcile. So I guess I should be looking for other ways this struct could be interpreted
<dunpeal>
ljarvis: my "real code" doesn't matter if the minimal example I provided already doesn't work the way I expect it to.
conta has quit [Client Quit]
hotpanca_ has quit [Remote host closed the connection]
nankyokusei has joined #ruby
aeontech has quit [Remote host closed the connection]
skweek has quit [Ping timeout: 245 seconds]
aeontech has joined #ruby
aremaref has quit [Ping timeout: 248 seconds]
<ljarvis>
uh, ok
<toretore>
dunpeal: the reason i want to actually see your code (which in itself should not need explaining!) is that what you're doing seems strange
k13nox_ has joined #ruby
<ljarvis>
^
<eelster>
toretore: Agreed
pilne has joined #ruby
jackjackdripper has joined #ruby
nankyokusei has quit [Ping timeout: 246 seconds]
Kug3lis has quit [Ping timeout: 245 seconds]
k13nox has quit [Ping timeout: 240 seconds]
eggshke has joined #ruby
LiberalSquash has joined #ruby
LiberalSquash has left #ruby [#ruby]
SpiffTR has quit [Quit: Leaving.]
agit0 has joined #ruby
hotpancakes has joined #ruby
<dunpeal>
toretore: I don't see how it is strange.
kareelee has quit [Remote host closed the connection]
Azure has joined #ruby
<dunpeal>
Like I said, part of the logic of method foo is to call method bar N times. I'd like to test that logic.
s2013 has joined #ruby
ocbtec has joined #ruby
aremaref has joined #ruby
Azure|dc has quit [Ping timeout: 248 seconds]
<dunpeal>
Hence I'm calling foo with known parameters and checking that bar was called by it an expected number of times.
<dunpeal>
Nothing here seems extraordinary...
kareelee has joined #ruby
<toretore>
dunpeal: i can't really give any advice without seeing your actual code
rikai has quit [Quit: No Ping reply in 180 seconds.]
<ljarvis>
dunpeal: can you gist a minimal example we can run with the same error you're seeing?
Lord_of_Life has quit [Excess Flood]
mattwashere has quit [Remote host closed the connection]
<dunpeal>
yeah, just a second.
dunpeal has quit [Quit: leaving]
rikai has joined #ruby
GodFather has quit [Ping timeout: 256 seconds]
mattwashere has joined #ruby
sebastiansier has joined #ruby
saneax is now known as saneax-_-|AFK
maattdd__ has quit [Ping timeout: 258 seconds]
Lord_of_Life has joined #ruby
Kug3lis has joined #ruby
mattwashere has quit [Ping timeout: 248 seconds]
hotpancakes has quit [Remote host closed the connection]
nankyokusei has joined #ruby
dunpeal has joined #ruby
milardovich has joined #ruby
hotpancakes has joined #ruby
AnxiousGarlic has joined #ruby
AnxiousGarlic has left #ruby [#ruby]
gusrub has quit [Read error: Connection reset by peer]
jaruga has quit [Quit: jaruga]
nankyokusei has quit [Ping timeout: 246 seconds]
mhib has joined #ruby
mhib has quit [Client Quit]
milardovich has quit [Ping timeout: 248 seconds]
mantis__ has joined #ruby
m_antis has quit [Ping timeout: 255 seconds]
flying has quit []
flashbang has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
k13nox_ has quit [Remote host closed the connection]
petrichorx_ has quit [Quit: Connection closed for inactivity]
manjaro-kde5__ has quit [Ping timeout: 258 seconds]
_djbkd has joined #ruby
nankyokusei has joined #ruby
juanda has quit [Read error: Connection reset by peer]
milardovich has quit [Ping timeout: 240 seconds]
whathapp_ has joined #ruby
nankyokusei has quit [Ping timeout: 248 seconds]
nettoweb has joined #ruby
aeontech has joined #ruby
juanda has joined #ruby
<havenwood>
a1fa: Have you already tried on Ruby 2.4 with the new Hash implementation? Are you avoiding printing the return value, in the REPL or otherwise? How are you testing it?
jgpawletko has quit [Quit: jgpawletko]
<al2o3-cr>
cages in the zoo man
whathappens has quit [Ping timeout: 272 seconds]
<al2o3-cr>
i want to sail away to a distant shore
gusrub has quit [Read error: Connection reset by peer]
<al2o3-cr>
to make like an apeman
Kug3lis has quit [Read error: Connection reset by peer]
dunpeal has quit [Quit: leaving]
nankyokusei has joined #ruby
<a1fa>
havenwood: i am just doing benchmarks now.. dont understand why the loading takes so long.. at first i thought it was Logger.debug ; even if debug log level was off
<al2o3-cr>
kinks, awesome!
<havenwood>
?offtopic al2o3-cr
<ruby[bot]>
al2o3-cr: this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
aeontech has quit [Quit: aeontech]
<al2o3-cr>
havenwood: sorry
enilsen16 has joined #ruby
nhhc has quit [Quit: Leaving]
nankyokusei has quit [Ping timeout: 248 seconds]
gusrub has joined #ruby
gix has quit [Ping timeout: 245 seconds]
enyo has joined #ruby
kassav has quit [Quit: kassav]
aeontech has joined #ruby
jcao219 has joined #ruby
seme has joined #ruby
TomyLobo has joined #ruby
<seme>
hi guys... I'm very confused. I have a statement in my Vagrantfile that says response = gets.chomp. For some reason everything works if I take that out but if I leave it in I get the error Message: Errno::ENOENT: No such file or directory @ rb_sysopen - status... any reason why?
<seme>
does Vagrant do something like remove stdout?
byte512 has quit [Ping timeout: 272 seconds]
benlieb has joined #ruby
<seme>
b/c the code works if I execute it in irb
gix has joined #ruby
nankyokusei has joined #ruby
enyo has quit [Ping timeout: 245 seconds]
aeontech has quit [Client Quit]
warrshrke has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
TheWhip has joined #ruby
nankyokusei has quit [Ping timeout: 246 seconds]
pawnbox has quit [Remote host closed the connection]
ivanskie has joined #ruby
pawnbox has joined #ruby
Kug3lis has joined #ruby
nettoweb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<jaegerca>
I was under the impression that "line 87"[/line (\d{1,})/] would return "87" but it returns "line 87", anyone know how to get it to return the number?
<a1fa>
thats an awful benchmark, but its almost 1:1 to the times i am seeing
<a1fa>
i threw SecureRandom.hex in there but i guess i could've i += 1
gusrub has joined #ruby
<a1fa>
you can strip SecureRandom in favor of test += 1
<a1fa>
it takes about 120s on my cpu to compute
<a1fa>
what really matters is trying it on a 1.9.3 and 2.4.0
<a1fa>
i'll see if i can rvm 2.4.0
Mr_Pancake has quit [Ping timeout: 246 seconds]
emerson has joined #ruby
aidalgol has joined #ruby
torQue_ has joined #ruby
<al2o3-cr>
i'm in favour for String#unpack1
braincrash has joined #ruby
aidalgol is now known as Guest59974
porfa has joined #ruby
Guest59974 is now known as aidalgol
<dyjakan>
is there a convention for putting requires/includes in a specific place? e.g. I have a module and some class inside of it, then I can put require within a module block or within certain class block is there a preference in such scenario?
<dyjakan>
(I'm requiring builtins, in this case 'csv')
f3_ has joined #ruby
CrazyEddy has joined #ruby
Mr_Pancake has joined #ruby
Torrone_1 has joined #ruby
gnufied has joined #ruby
mantis__ has quit [Remote host closed the connection]
milardovich has joined #ruby
sepp2k has quit [Quit: Leaving.]
ifctj has joined #ruby
<SegFaultAX>
dyjakan: Usually at the very top of the file.
<a1fa>
havenwood: muuuch faster in 2.4.0
nikivi has quit [Quit: zzz]
<a1fa>
in fact, 1.9.3 is 47% slower
Torrone has quit [Ping timeout: 255 seconds]
TheWhip has quit []
<havenwood>
dyjakan: Typically requires are at the top of the file unless they're being conditionally required.
sepp2k has joined #ruby
gusrub has quit [Read error: Connection reset by peer]
<havenwood>
a1fa: That's a nice improvement! We might be able to help find more if you can share more code.
juanda has quit [Ping timeout: 255 seconds]
<havenwood>
a1fa: ah, I missed your paste - looking
nikivi has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<a1fa>
i found a few places that need to be fixed in the code
milardovich has quit [Ping timeout: 272 seconds]
<a1fa>
they had 1.7 mil each and check against an array of 16
<dyjakan>
thanks guys, that's what I thought but I wasn't sure if same follows for modules
torQue_ has quit [Quit: ChatZilla 0.9.93 [Firefox 50.1.0/20161208153507]]
SpiffTR has joined #ruby
SpiffTR has quit [Client Quit]
gusrub has joined #ruby
SpiffTR has joined #ruby
<Torrone_1>
how do I prevent ruby from escaping double quotes in a string?
eelster has quit [Read error: Connection reset by peer]
eelster has joined #ruby
marxarelli is now known as marxarelli|afk
<a1fa>
\/\/
sebastiansier has quit []
vircung has quit [Ping timeout: 272 seconds]
duderonomy has joined #ruby
SeepingN has quit [Quit: The system is going down for reboot NOW!]
m_antis has joined #ruby
ur5us has joined #ruby
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
SeepingN has joined #ruby
neoncortex has quit [Quit: WeeChat 1.0.1]
rodfersou has quit [Quit: leaving]
<a1fa>
havenwood: im hoping 1.9.3 code will work on 2.4.0 w/o much fuss
<a1fa>
no special gems used, except nokogiri
<havenwood>
a1fa: Then I'd expect it to "just work." Good luck!
* a1fa
makes a backup
AndBobsYourUncle has joined #ruby
m_antis has quit [Ping timeout: 272 seconds]
ferz_ has joined #ruby
iogf has joined #ruby
Seich has quit [Quit: Gone fishing.]
gusrub has quit []
ferz_ has left #ruby [#ruby]
Seich has joined #ruby
yourname2 has joined #ruby
yourname2 has quit [Client Quit]
TvL2386 has quit [Ping timeout: 245 seconds]
h1fuelcell has joined #ruby
gloscombe has joined #ruby
Torrone_1 has quit [Quit: This computer has gone to sleep]
JeanCarloMachado has quit [Ping timeout: 248 seconds]
h1fuelcell has quit [Ping timeout: 240 seconds]
SpiffTR has quit [Quit: Leaving.]
guacamole has quit [Quit: leaving]
guacamole has joined #ruby
SpiffTR has joined #ruby
enterprisey has quit [Remote host closed the connection]
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
SpiffTR has quit [Client Quit]
k13nox has joined #ruby
hahuang65 has quit [Remote host closed the connection]
prestorium has quit [Quit: Leaving]
jenrzzz has quit [Ping timeout: 256 seconds]
frozengeek__ has joined #ruby
mrconfused has quit [Ping timeout: 255 seconds]
AndrewIsHere has joined #ruby
f3_ has quit [Ping timeout: 240 seconds]
frozengeek__ has quit [Quit: frozengeek__]
mrconfused has joined #ruby
warrshrke has quit [Ping timeout: 260 seconds]
k13nox has quit [Remote host closed the connection]
k13nox has joined #ruby
k13nox has quit [Remote host closed the connection]
k13nox has joined #ruby
k13nox has quit [Remote host closed the connection]
juanda has joined #ruby
biberu has joined #ruby
vuoto has joined #ruby
enterprisey has joined #ruby
vuoto has quit [Read error: Connection reset by peer]
vuoto has joined #ruby
dunpeal has joined #ruby
levifig has joined #ruby
<dunpeal>
I have a list of integers. Is there a way to embed them as some sort of a literal? Something like %I[1 2 3 4 42]?
enyo has joined #ruby
TvL2386 has joined #ruby
vuoto has quit [Remote host closed the connection]
<eam>
dunpeal: nums = 1,2,3,4,42
<dunpeal>
eam: since I have them as a LF-separated sequence, I'd rather use that somehow.
<eam>
I don't think so, not as literals, but if you don't mind some minor runtime work you can do %w{1 2 3}.map &:to_i
vuoto has joined #ruby
igniting has quit [Ping timeout: 246 seconds]
_djbkd has quit [Remote host closed the connection]
<eam>
if you want to make sure you catch bad input data: %w{1 2 3}.map { |i| Integer(i) }
_djbkd has joined #ruby
enilsen16 has quit [Quit: enilsen16]
<eam>
to_i will give you 0 by default, Integer will raise
enyo has quit [Ping timeout: 240 seconds]
<eam>
I think there are a few other differences, iirc Integer invokes the same parsing rules as ruby syntax proper
enilsen16 has joined #ruby
_djbkd has quit [Ping timeout: 256 seconds]
ivanskie_work has joined #ruby
ivanskie has quit [Read error: Connection reset by peer]
art-solopov has quit [Quit: Konversation terminated!]
SpiffTR has joined #ruby
mwlang has quit [Quit: mwlang]
xen0fon has quit [Ping timeout: 258 seconds]
<zenspider>
exciting...
milardovich has quit [Ping timeout: 256 seconds]
sepp2k1 has joined #ruby
sepp2k has quit [Disconnected by services]
k13nox has quit [Ping timeout: 256 seconds]
sepp2k has joined #ruby
gnufied has quit [Ping timeout: 255 seconds]
art-solopov has joined #ruby
shinnya has quit [Ping timeout: 248 seconds]
sepp2k1 has quit [Ping timeout: 255 seconds]
Derperpe1 has quit [Ping timeout: 255 seconds]
Yzguy has quit [Quit: Bye]
synthroid has quit []
tpabla has joined #ruby
benlieb has joined #ruby
VladGh has quit [Remote host closed the connection]
VladGh has joined #ruby
<miah>
very exciting!
JeanCarloMachado has quit [Ping timeout: 256 seconds]
foption has quit [Remote host closed the connection]
JeanCarloMachado has joined #ruby
<dunpeal>
eam: yeah, I just went with %w[1 2 3].map(&:to_i)
<al2o3-cr>
dunpeal: that is backward
<zenspider>
I believe map runs left to right
biberu has quit []
nickjj has quit [Read error: Connection reset by peer]
jhack has joined #ruby
Coldblackice_ has joined #ruby
Coldblackice has quit [Ping timeout: 246 seconds]
cdg has quit [Remote host closed the connection]
benlieb has quit [Ping timeout: 248 seconds]
<Yxhuvud>
It does. It is undefined behaviour to abuse the behaviour and modify the array while iterating though.
<Yxhuvud>
iirc
Kug3lis has joined #ruby
s2013 has joined #ruby
ramortegui has quit [Quit: Ex-Chat]
<Yxhuvud>
>> x = [1]; x.map {|i| (x << i+1) if i < 10; i }
Kug3lis has quit [Client Quit]
<Yxhuvud>
makes for some really silly code.
fantasticsid has quit [Ping timeout: 255 seconds]
Derperpe1 has joined #ruby
<Yxhuvud>
hmm. it eats up assignments?
<Yxhuvud>
>> [1]; x.map {|i| (x << i+1) if i < 10; i }
<Yxhuvud>
or maybe it is only dead.
mwlang has joined #ruby
mwlang has quit [Client Quit]
dc4 has joined #ruby
mwlang has joined #ruby
Gasher has joined #ruby
muelleme has joined #ruby
saneax-_-|AFK is now known as saneax
ddffg has joined #ruby
h1fuelcell has joined #ruby
knite has joined #ruby
malconis has quit [Read error: Connection reset by peer]
dc4 has quit [Ping timeout: 240 seconds]
ivanskie has quit [Quit: Going offline, see ya! (www.adiirc.com)]
<knite>
should vendor/cache be checked into git? I’ve been researching best practices, and I see posts/Stack Overflow answers on both sides, but everything is at least a few years old. what’s the current Right Way?
h1fuelcell has quit [Ping timeout: 248 seconds]
testuser1 has joined #ruby
fantasticsid has joined #ruby
gheegh has joined #ruby
<miah>
depends on your workflow
ayehia has joined #ruby
fantasticsid has quit [Read error: Connection reset by peer]
<miah>
we tend to pin gem versions, but not check in vendor. though our vendor directory does get distributed with our app package
ghormoon has quit [Ping timeout: 258 seconds]
<miah>
and we keep an archive of app packages related to builds
<zenspider>
there is no Right Way
<zenspider>
there is only works or doesn't work for you
<blackbombay>
vendor/cache? no, unlikely you want to check that in.
<Yxhuvud>
there are ways that really doesn't work for anyone though.
<knite>
alright, then what’s most common? context: I’m in devops and not primarily a ruby dev, so my priority is following community standards.
yan has joined #ruby
whathappens has joined #ruby
<blackbombay>
Gemfile.lock provides reproducible dependencies, so unless you are packaging JS, i dont think it makes sense to check in vendor/, and i think yarn is recommended to manage those packages (has a lockfile too)
<knite>
blackbombay: backend only, no npm/yarn in the mix.
<blackbombay>
what is in vendor/ for you?
porfa has quit [Read error: Connection reset by peer]
<knite>
bundle and cache
<yan>
is there a way to check the type of struct? I am calling an api that returns <struct Aws::SQS::Types::ListQueuesResult queue_urls=[]> and am looking for a way to extract "Aws::SQS::Types::ListQueuesResult" from that response. I was hoping for something like resp.class so i can check against it
<blackbombay>
yeah don't check those in, there's no point, you have a Gemfile/Gemfile.lock for that
porfa has joined #ruby
skweek has quit [Ping timeout: 248 seconds]
saneax is now known as saneax-_-|AFK
<knite>
bundle definitely shouldn’t be checked in AFAIK, but vendor/cache looks more questionable. the whole point is to remove the dependency on rubygems.org, right? but if you don’t check in the cached gems, it seems like the only benefit is only for the edge case where a dev wants a clean re-install and blows away vendor/bundle
fantasticsid has joined #ruby
s2013 has quit [Read error: Connection reset by peer]
<blackbombay>
the other benefit is you don't track binary files and edit them whenever you install a new gem. if you want offline installs, i guess it makes sense but the normal way is just to run 'bundle' and keep vendor/ in gitignore
fantasticsid has quit [Client Quit]
dc4 has joined #ruby
muelleme has quit [Ping timeout: 248 seconds]
<knite>
yeah, that seems like the downside, much larger git repo when you track binaries.
symm- has quit [Ping timeout: 272 seconds]
lmc has quit [Quit: Leaving...]
enyo has joined #ruby
s2013 has joined #ruby
yfeldblum has joined #ruby
saneax-_-|AFK is now known as saneax
charliesome has joined #ruby
cdg has joined #ruby
polishdub has quit [Quit: Leaving]
enyo has quit [Ping timeout: 258 seconds]
ghormoon has joined #ruby
s2013 has quit [Client Quit]
k13nox has joined #ruby
yfeldblum has quit [Ping timeout: 272 seconds]
AndBobsYourUncle has quit [Remote host closed the connection]
chouhoul_ has joined #ruby
workmad3 has joined #ruby
SpiffTR has quit [Quit: Leaving.]
rwb has joined #ruby
k13nox has quit [Ping timeout: 245 seconds]
chouhoulis has quit [Ping timeout: 256 seconds]
mrconfused has quit [Ping timeout: 255 seconds]
milardovich has joined #ruby
workmad3 has quit [Ping timeout: 272 seconds]
JeanCarloMachado has quit [Ping timeout: 256 seconds]
yfeldblum has joined #ruby
brent__ has quit [Remote host closed the connection]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
JeanCarloMachado has joined #ruby
brent__ has joined #ruby
siddart has quit [Ping timeout: 240 seconds]
milardovich has quit [Ping timeout: 255 seconds]
enilsen16 has joined #ruby
Guest52154 has joined #ruby
saneax is now known as saneax-_-|AFK
mrconfused has joined #ruby
al2o3-cr has quit [Ping timeout: 245 seconds]
FastJack has quit [Ping timeout: 264 seconds]
s2013 has joined #ruby
s2013 has quit [Client Quit]
art-solopov has quit [Quit: Konversation terminated!]
mwlang has quit [Quit: mwlang]
whathappens has quit [Remote host closed the connection]
whathappens has joined #ruby
yfeldblu_ has joined #ruby
TomyLobo has quit [Ping timeout: 240 seconds]
Derperpe1 has quit [Ping timeout: 240 seconds]
matp has quit [Remote host closed the connection]
yfeldblum has quit [Ping timeout: 255 seconds]
saneax-_-|AFK is now known as saneax
matp has joined #ruby
enterprisey has quit [Quit: brb]
symm- has joined #ruby
Ishido has quit [Read error: Connection reset by peer]
Ishido has joined #ruby
juanda has quit [Read error: Connection reset by peer]