Rodya_ has quit [Remote host closed the connection]
enyo has quit [Ping timeout: 245 seconds]
Rodya_ has joined #ruby
renchan has joined #ruby
jenrzzz has quit [Ping timeout: 248 seconds]
username has quit [Ping timeout: 240 seconds]
gh0zt has joined #ruby
hutch34 has quit [Ping timeout: 252 seconds]
<gh0zt>
I want to use webrick to behave like a normal HTTPS server if requesting a simple .txt file but if webrick recieves a specific URI such as "/FORWARD", I want it to forward the request upstream to another server. Is that even possible or is it strictly a 'one or the other' type of usage.
<gh0zt>
Either I use webrick as a proxy server or i use it as a normal web server? I can't use it for both on the same server?
boombox_ has joined #ruby
tonini has joined #ruby
chouhoulis has joined #ruby
tonini is now known as zastav
zastav is now known as tonini
chouhoulis has quit [Ping timeout: 258 seconds]
nankyokusei has joined #ruby
anisha has joined #ruby
oaklndr1 has joined #ruby
ifctj has joined #ruby
nankyokusei has quit [Ping timeout: 260 seconds]
whiteline has quit [Ping timeout: 240 seconds]
JoshS has quit [Ping timeout: 255 seconds]
astrobunny has quit [Remote host closed the connection]
pboling has quit [Remote host closed the connection]
lxsameer has quit [Ping timeout: 240 seconds]
tonini has quit [Quit: Connection closed for inactivity]
saneax-_-|AFK is now known as saneax
JoshS has quit [Read error: Connection reset by peer]
muelleme has joined #ruby
chussenot has quit [Quit: chussenot]
nankyokusei has quit [Ping timeout: 252 seconds]
blaxter has joined #ruby
JoshS has joined #ruby
armyriad has quit [Read error: Connection reset by peer]
armyriad has joined #ruby
ta has quit [Remote host closed the connection]
Silthias1 has joined #ruby
Silthias has quit [Ping timeout: 258 seconds]
frozengeek__ has joined #ruby
TomyWork has joined #ruby
lxsameer has joined #ruby
bocaneri has joined #ruby
pmv has quit [Quit: leaving]
blaxter has quit [Quit: foo]
govg has quit [Quit: leaving]
zamuro has joined #ruby
djbkd_ has joined #ruby
FahmeF has quit [Remote host closed the connection]
tomphp has joined #ruby
muelleme has quit [Ping timeout: 240 seconds]
djbkd_ has quit [Remote host closed the connection]
DaveTaboola has joined #ruby
DaveTaboola has quit [Client Quit]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
enterprisey has quit [Remote host closed the connection]
DaveTaboola has joined #ruby
DaveTaboola has quit [Client Quit]
jenrzzz has quit [Ping timeout: 258 seconds]
neuraload has quit [Read error: Connection reset by peer]
neuraload has joined #ruby
binaryplease has joined #ruby
jzigmund has quit [Ping timeout: 240 seconds]
vondruch_ has quit [Ping timeout: 248 seconds]
aufi has quit [Ping timeout: 240 seconds]
charliesome has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
vdl has quit [Ping timeout: 256 seconds]
charliesome has quit [Client Quit]
rileyy has joined #ruby
troulouliou_div2 has joined #ruby
charliesome has joined #ruby
gloscombe has quit [Quit: gloscombe]
ta has joined #ruby
Guest53985 is now known as ged
yeticry_ has joined #ruby
muelleme has joined #ruby
vondruch_ has joined #ruby
ged is now known as Guest39488
jzigmund has joined #ruby
vondruch_ is now known as vondruch
manjaro-kde5-- has joined #ruby
Silthias1 has quit [Read error: Connection reset by peer]
yeticry has quit [Ping timeout: 248 seconds]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Silthias has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
milardovich has joined #ruby
aufi has joined #ruby
alvss has quit [Ping timeout: 260 seconds]
neuraload has quit [Quit: This computer has gone to sleep]
Silthias has quit [Read error: Connection reset by peer]
czerasz has joined #ruby
Silthias has joined #ruby
blackbom1 has joined #ruby
aryaching has quit [Ping timeout: 258 seconds]
harai has joined #ruby
skweek has quit [Ping timeout: 240 seconds]
saneax is now known as saneax-_-|AFK
neuraload has joined #ruby
blackbom2 has joined #ruby
ledestin has joined #ruby
blackbombay has quit [Ping timeout: 245 seconds]
skweek has joined #ruby
blackbom1 has quit [Ping timeout: 240 seconds]
parus has quit [Ping timeout: 268 seconds]
binaryplease has quit [Quit: binaryplease]
muelleme has quit [Ping timeout: 240 seconds]
nofxx has quit [Ping timeout: 240 seconds]
Kug3lis has joined #ruby
quiqua has joined #ruby
nadir has quit [Quit: Connection closed for inactivity]
brent__ has joined #ruby
zamuro has quit [Quit: [IRSSI]]
tomphp has joined #ruby
FahmeF has joined #ruby
hotpancakes has quit [Remote host closed the connection]
hotpancakes has joined #ruby
jeyraof has quit [Quit: Leaving]
ishe_ua has joined #ruby
luckyruby has quit [Quit: Leaving...]
ferr1 has joined #ruby
brent__ has quit [Ping timeout: 240 seconds]
jcao219_ has joined #ruby
hotpancakes has quit [Ping timeout: 258 seconds]
mlkkk has joined #ruby
the_drow has joined #ruby
jenrzzz has quit [Ping timeout: 258 seconds]
saneax-_-|AFK is now known as saneax
vondruch_ has joined #ruby
zack6849 has quit [*.net *.split]
Bilge has quit [*.net *.split]
sirecote has quit [*.net *.split]
jzigmund has quit [Ping timeout: 245 seconds]
Bilge has joined #ruby
brainslug has quit [*.net *.split]
bodie_ has quit [*.net *.split]
jpterry has quit [*.net *.split]
Davey has quit [*.net *.split]
wlanboy has quit [*.net *.split]
olblak has quit [*.net *.split]
freeze has quit [*.net *.split]
sirecote has joined #ruby
olblak has joined #ruby
jzigmund has joined #ruby
freeze has joined #ruby
wlanboy has joined #ruby
vondruch has quit [Ping timeout: 252 seconds]
brainslug has joined #ruby
zack6849 has joined #ruby
zack6849 has quit [Changing host]
zack6849 has joined #ruby
aufi has quit [Ping timeout: 256 seconds]
Davey has joined #ruby
Davey has joined #ruby
Davey has quit [Changing host]
milardovich has quit []
bodie_ has joined #ruby
bastelfreak has quit [Quit: WeeChat 1.0.1]
sheepman has quit [*.net *.split]
tabakhase has quit [*.net *.split]
QualityAddict has quit [*.net *.split]
shortdudey123 has quit [*.net *.split]
TheSpect1e has quit [*.net *.split]
armando has quit [*.net *.split]
sethetter has quit [*.net *.split]
Kuukunen- has quit [*.net *.split]
rprimus_ has quit [*.net *.split]
AnoHito has quit [*.net *.split]
ahuman has quit [*.net *.split]
diego_k has quit [*.net *.split]
ammar_ has quit [*.net *.split]
jesk has quit [*.net *.split]
elliot007 has quit [*.net *.split]
mg^ has quit [*.net *.split]
moufl has quit [*.net *.split]
oblique has quit [*.net *.split]
ule has quit [*.net *.split]
quiller has quit [*.net *.split]
eregon has quit [*.net *.split]
gf3 has quit [*.net *.split]
zeroDivisible has quit [*.net *.split]
duracrisis has quit [*.net *.split]
jtperreault has quit [*.net *.split]
jonadab has quit [*.net *.split]
Muz has quit [*.net *.split]
KrzaQ has quit [*.net *.split]
ericP has quit [*.net *.split]
bathtub_shark has quit [*.net *.split]
icedp has quit [*.net *.split]
anekos has quit [*.net *.split]
timmow has quit [*.net *.split]
bob_f has quit [*.net *.split]
Jello_Raptor has quit [*.net *.split]
brucebag has quit [*.net *.split]
cyberRodent has quit [*.net *.split]
tekacs has quit [*.net *.split]
xpt has quit [*.net *.split]
coffeejunk has quit [*.net *.split]
clamstar has quit [*.net *.split]
jonadab has joined #ruby
sethette1 has joined #ruby
Kuukunen has joined #ruby
icedp has joined #ruby
KrzaQ has joined #ruby
icedp has quit [Changing host]
icedp has joined #ruby
brucebag has joined #ruby
brucebag has quit [Changing host]
brucebag has joined #ruby
alanquillin has joined #ruby
bob_f has joined #ruby
ule has joined #ruby
tekacs has joined #ruby
ahuman has joined #ruby
Muz has joined #ruby
rprimus has joined #ruby
ammar has joined #ruby
sheepman_ has joined #ruby
ericP has joined #ruby
xpt has joined #ruby
TheSpectre has joined #ruby
shortdudey123 has joined #ruby
tabakhase has joined #ruby
timmow has joined #ruby
jtperreault has joined #ruby
mg^ has joined #ruby
AnoHito has joined #ruby
coffeejunk has joined #ruby
anekos has joined #ruby
oblique has joined #ruby
armando has joined #ruby
bathtub_shark has joined #ruby
Jello_Raptor_ has joined #ruby
cyberRodent has joined #ruby
zeroDivisible has joined #ruby
rprimus is now known as Guest4903
jesk has joined #ruby
Jello_Raptor_ is now known as Jello_Raptor
clamstar has joined #ruby
sheepman_ is now known as sheepman
bastelfreak has joined #ruby
diegok has joined #ruby
eregon has joined #ruby
Canucktux has joined #ruby
duracrisis has joined #ruby
sheepman has quit [*.net *.split]
darix has quit [*.net *.split]
tomaw has quit [*.net *.split]
Cork has quit [*.net *.split]
FastJack has quit [*.net *.split]
roger_rabbit has quit [*.net *.split]
makufiru has quit [*.net *.split]
x0f has quit [*.net *.split]
`derpy has quit [*.net *.split]
twistedpixels_ has quit [*.net *.split]
sonOfRa has quit [*.net *.split]
klaas has quit [*.net *.split]
D9- has quit [*.net *.split]
ishigoya has quit [*.net *.split]
Biohazard has quit [*.net *.split]
ujjain has quit [*.net *.split]
forgot has quit [*.net *.split]
KillerFox has quit [*.net *.split]
uranellus has quit [*.net *.split]
jaredrhine has quit [*.net *.split]
trajing has quit [*.net *.split]
Lildirt has quit [*.net *.split]
\13k has quit [*.net *.split]
yeltzooo has quit [*.net *.split]
nchambers has quit [*.net *.split]
maxmanders has quit [*.net *.split]
Silex has quit [*.net *.split]
Guest50980 has quit [*.net *.split]
ujjain has joined #ruby
ujjain has quit [Changing host]
ujjain has joined #ruby
ishigoya has joined #ruby
jaredrhine has joined #ruby
darix has joined #ruby
\13k has joined #ruby
nchambers has joined #ruby
maxmanders has joined #ruby
`derpy has joined #ruby
x0f has joined #ruby
leonthedrunkfit has quit [*.net *.split]
humd1ng3r has quit [*.net *.split]
Rabbit_ has quit [*.net *.split]
boshhead has quit [*.net *.split]
drale2k_ has quit [*.net *.split]
rideh has quit [*.net *.split]
Raboo has quit [*.net *.split]
fumk has quit [*.net *.split]
volix has quit [*.net *.split]
blingrang has quit [*.net *.split]
zenguy_pc has quit [*.net *.split]
pskosinski has quit [*.net *.split]
gnarf has quit [*.net *.split]
[reed] has quit [*.net *.split]
quarcu has quit [*.net *.split]
yonatankoren has quit [*.net *.split]
TheMoonMaster has quit [*.net *.split]
PaulePanter has quit [*.net *.split]
Takumo has quit [*.net *.split]
pleiosaur has quit [*.net *.split]
llua has quit [*.net *.split]
Prira has quit [*.net *.split]
nitrix has quit [*.net *.split]
[dmp] has quit [*.net *.split]
tekk has quit [*.net *.split]
Spaulding has quit [*.net *.split]
kmhn has quit [*.net *.split]
baweaver has quit [*.net *.split]
stokachu has quit [*.net *.split]
FastJack has joined #ruby
yeltzooo has joined #ruby
PaulePanter has joined #ruby
pskosinski has joined #ruby
Takumo has joined #ruby
zenguy_pc has joined #ruby
leonthemisfit has joined #ruby
Takumo has joined #ruby
leonthemisfit has quit [Changing host]
leonthemisfit has joined #ruby
nitrix has joined #ruby
Prira has joined #ruby
biberu has joined #ruby
boshhead has joined #ruby
Lildirt has joined #ruby
Silex has joined #ruby
humd1ng3r has joined #ruby
twistedpixels_ has joined #ruby
Spaulding has joined #ruby
Biohazard has joined #ruby
roger_rabbit has joined #ruby
pskosinski is now known as Guest91522
fumk has joined #ruby
quarcu has joined #ruby
stokachu has joined #ruby
[dmp] has joined #ruby
rideh has joined #ruby
makufiru has joined #ruby
baweaver has joined #ruby
blingrang has joined #ruby
hahuang65 has joined #ruby
TheMoonMaster has joined #ruby
[diecast] has quit [Ping timeout: 240 seconds]
caw has quit [Ping timeout: 240 seconds]
gnarf has joined #ruby
kmhn has joined #ruby
yonatankoren has joined #ruby
volix has joined #ruby
Beams has joined #ruby
sonOfRa has joined #ruby
D9 has joined #ruby
Guest78675 has joined #ruby
sheepman has joined #ruby
jhill_ has quit [Ping timeout: 240 seconds]
tekk has joined #ruby
davidmichaelkarr has quit [Ping timeout: 245 seconds]
ggherdov has quit [Ping timeout: 255 seconds]
drale2k has joined #ruby
uranellus has joined #ruby
uranellus has joined #ruby
uranellus has quit [Changing host]
vondruch_ is now known as vondruch
marr has joined #ruby
flying has joined #ruby
howdoi has quit [Ping timeout: 252 seconds]
Cork has joined #ruby
[diecast] has joined #ruby
deimos has quit [Ping timeout: 240 seconds]
jhill_ has joined #ruby
ggherdov has joined #ruby
moufl has joined #ruby
llua has joined #ruby
pleiosaur has joined #ruby
Raboo has joined #ruby
Rabbit_ has joined #ruby
gajus has quit [Ping timeout: 256 seconds]
caw has joined #ruby
howdoi has joined #ruby
elh9 has joined #ruby
Devalo has joined #ruby
hahuang65 has quit [Ping timeout: 258 seconds]
terens has joined #ruby
deimos has joined #ruby
davidmichaelkarr has joined #ruby
<terens>
hello
<terens>
I have a custom gem. The problem is that when I am installing it with bundle install its bin files are installed in /usr/local/lib/ruby/gems/2.3/bin/(executable)
gajus has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
ggherdov has quit [Excess Flood]
<terens>
however others are installed /usr/local/bin/*
elh9 has quit [Remote host closed the connection]
elh9 has joined #ruby
astrobunny has quit [Read error: Connection reset by peer]
ggherdov has joined #ruby
astrobunny has joined #ruby
aufi has joined #ruby
Devalo has quit [Ping timeout: 245 seconds]
FahmeF has quit [Remote host closed the connection]
braincrash has quit [Ping timeout: 260 seconds]
neuraload has quit [Quit: This computer has gone to sleep]
charliesome has joined #ruby
rodfersou has joined #ruby
neuraload has joined #ruby
vdl has joined #ruby
astrobunny has quit [Remote host closed the connection]
chussenot has joined #ruby
AnxiousGarlic_ has quit [Read error: Connection reset by peer]
aodai has joined #ruby
elliot007 has joined #ruby
Fernando-Basso has joined #ruby
aodai has left #ruby [#ruby]
workmad3 has joined #ruby
ddffg has joined #ruby
AnxiousGarlic has joined #ruby
mark_66 has joined #ruby
Guest39488 is now known as ged
ged is now known as Guest98849
harai has quit [Ping timeout: 240 seconds]
FahmeF has joined #ruby
zapata has quit [Ping timeout: 245 seconds]
FahmeF has quit [Client Quit]
nankyokusei has joined #ruby
Guest29284 has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nankyokusei has quit [Ping timeout: 240 seconds]
haxrbyte has joined #ruby
haxrbyte has quit [Client Quit]
Mortomes|Work has joined #ruby
ur5us has quit [Remote host closed the connection]
pandaant has joined #ruby
bastelfreak has quit [Quit: WeeChat 1.0.1]
jenrzzz has quit [Ping timeout: 258 seconds]
bastelfreak has joined #ruby
ledestin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ldnunes has joined #ruby
zapata has joined #ruby
charliesome has joined #ruby
chussenot has quit [Quit: chussenot]
nettoweb has joined #ruby
charliesome has quit [Client Quit]
charliesome has joined #ruby
tonini has joined #ruby
tonini is now known as zastav
zastav is now known as tonini
braincrash has joined #ruby
rodfersou is now known as rodfersou|coffee
JeanCarloMachado has joined #ruby
manjaro-kde5-- has quit [Ping timeout: 260 seconds]
<terens>
- EXECUTABLE DIRECTORY: /usr/local/bin
<terens>
How is this determined
<terens>
?
<dminuoso>
?crosspost
<ruby[bot]>
Please do not crosspost without at least telling so and mentioning provided suggestions and their outcome in all channels. Experience shows that people don't do either, and not doing so is considered rude.
hotpancakes has joined #ruby
lxsameer has quit [Read error: Connection reset by peer]
Macaveli has quit [Remote host closed the connection]
gagrio has joined #ruby
SesMan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
manjaro-kde5-- has joined #ruby
hotpancakes has quit [Ping timeout: 256 seconds]
nettoweb has quit [Ping timeout: 245 seconds]
Derperperd has quit [Ping timeout: 240 seconds]
nettoweb has joined #ruby
sarbazx has joined #ruby
Macaveli has joined #ruby
Kug3lis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
aidalgol has quit [Quit: zZzZZzzzz]
postmodern has quit [Quit: Leaving]
Guest98849 is now known as ged
ged is now known as Guest54240
brent__ has joined #ruby
sepp2k has joined #ruby
jameser has joined #ruby
Kug3lis has joined #ruby
rodfersou|coffee is now known as rodfersou
jameser_ has joined #ruby
brent__ has quit [Ping timeout: 240 seconds]
milardovich has joined #ruby
gajus has quit [Quit: Connection closed for inactivity]
sarbazx has quit [Ping timeout: 260 seconds]
jameser has quit [Ping timeout: 248 seconds]
AnxiousGarlic has quit [Read error: Connection reset by peer]
enyo has quit [Ping timeout: 260 seconds]
mlkkk has quit [Remote host closed the connection]
jaruga___ has joined #ruby
hahuang65 has joined #ruby
neuraload has quit [Quit: This computer has gone to sleep]
tvw has joined #ruby
mikecmpbll has joined #ruby
blackmesa has joined #ruby
milardovich has quit []
jameser_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Devalo has joined #ruby
hahuang65 has quit [Ping timeout: 252 seconds]
Spaulding has quit [Changing host]
Spaulding has joined #ruby
neuraload has joined #ruby
csk157 has quit [Ping timeout: 240 seconds]
dionysus69 has quit [Ping timeout: 256 seconds]
chussenot has joined #ruby
Devalo has quit [Ping timeout: 245 seconds]
chussenot has quit [Ping timeout: 248 seconds]
tpendragon has quit [Ping timeout: 240 seconds]
blackjid has quit [Ping timeout: 240 seconds]
unshadow_ has quit [Ping timeout: 240 seconds]
milardovich has joined #ruby
doritostains has joined #ruby
enyo has joined #ruby
jdawgaz has joined #ruby
unshadow has joined #ruby
jdawgaz has quit [Client Quit]
nowhere_man has quit [Ping timeout: 248 seconds]
neuraload has quit [Quit: This computer has gone to sleep]
jameser has joined #ruby
enyo has quit [Ping timeout: 240 seconds]
csk157 has joined #ruby
jaruga___ has quit [Ping timeout: 240 seconds]
doublemalt_ has joined #ruby
jameser has quit [Ping timeout: 256 seconds]
guilherme has joined #ruby
enyo has joined #ruby
milardovich has quit []
Derperperd has joined #ruby
nettoweb1 has joined #ruby
mlkkk has joined #ruby
hotpancakes has joined #ruby
AnxiousGarlic has joined #ruby
Mortomes|Work has quit [Ping timeout: 260 seconds]
<apeiros>
MMZF: and one of your expressions is nil
<apeiros>
you can infer from the exception which one it must be
neuraload has quit [Quit: This computer has gone to sleep]
<apeiros>
and if not, you can easily test each individual expression
<MMZF>
apeiros i should remove which one?
<apeiros>
MMZF: which of those expressions could be nil?
<MMZF>
umm maybe the +server?
Derperperd has joined #ruby
<apeiros>
ok, maybe we go a step back. which expressions do you see in that line of code?
enyo has quit [Ping timeout: 240 seconds]
<MMZF>
im not good in ruby :(
<apeiros>
I figured. I still try to help you. but I'm not doing your work.
nadir has joined #ruby
<apeiros>
one way to get better is to work through problems.
<MMZF>
:/
Fuzai has joined #ruby
manjaro-kde5-- has quit [Ping timeout: 240 seconds]
neuraload has joined #ruby
Derperperd has quit [Ping timeout: 240 seconds]
futilegames has quit [Ping timeout: 252 seconds]
nowz has quit [Remote host closed the connection]
czerasz has quit [Quit: Ex-Chat]
skweek has quit [Ping timeout: 260 seconds]
kch has joined #ruby
sdothum has joined #ruby
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
creat has quit [Ping timeout: 245 seconds]
kch has quit [Ping timeout: 252 seconds]
creat has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
list has joined #ruby
<list>
list
ishe_ua has quit [Remote host closed the connection]
list has left #ruby [#ruby]
nowz has joined #ruby
Kug3lis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mlkkk has quit [Remote host closed the connection]
mlkkk has joined #ruby
ishe_ua has joined #ruby
milardovich has joined #ruby
kch has joined #ruby
mlkkk has quit [Remote host closed the connection]
mlkkk has joined #ruby
bmurt has joined #ruby
neuraload has quit [Ping timeout: 248 seconds]
neuraload has joined #ruby
doritostains has quit [Quit: doritostains]
brent__ has joined #ruby
<maloik>
apeiros Bath Ruby was great but there won't be a 2017 edition :(
<apeiros>
:(
tyang has joined #ruby
doritostains has joined #ruby
<maloik>
before that I'd have mentioned ArrrrCamp (but I'm biased :D) but we haven't done that last year and most likely won't next year either... unsure if it'll come back at this point
mikecmpbll has joined #ruby
doublemalt_ has joined #ruby
Guest23278 is now known as ged
<apeiros>
you're one of the organizers of arrrcamp?
nowz has quit [Quit: Leaving]
ged is now known as Guest93010
brent__ has quit [Ping timeout: 240 seconds]
saneax is now known as saneax-_-|AFK
<maloik>
yea
<maloik>
am/was
hahuang65 has joined #ruby
enyo has joined #ruby
duckpuppy has joined #ruby
tvl has joined #ruby
<blackbom2>
apeiros: #ruby doesn't feel the same without shevy.
<apeiros>
blackbom2: indeed
blackmesa has joined #ruby
jaruga___ has joined #ruby
tvl has quit [Client Quit]
Devalo has joined #ruby
hahuang65 has quit [Ping timeout: 256 seconds]
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
blackmesa has quit [Ping timeout: 240 seconds]
Devalo has quit [Ping timeout: 240 seconds]
Zamyatin has joined #ruby
Zamyatin has quit [Client Quit]
Kug3lis has joined #ruby
nettoweb1 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Macaveli has joined #ruby
synaps3 has joined #ruby
cardboard64 has quit [Remote host closed the connection]
neuraload has quit [Quit: This computer has gone to sleep]
blackmesa has joined #ruby
Kug3lis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
shayan_ has joined #ruby
Derperperd has joined #ruby
BTRE has quit [Quit: Leaving]
brent__ has joined #ruby
Derperperd has quit [Ping timeout: 252 seconds]
Kug3lis has joined #ruby
neuraload has joined #ruby
JeanCarloMachado has quit [Ping timeout: 240 seconds]
toretore has joined #ruby
jhack has joined #ruby
brent__ has quit [Ping timeout: 256 seconds]
ramortegui has joined #ruby
pandaant has quit [Remote host closed the connection]
henriknj has quit [Quit: Konversation terminated!]
rodfersou is now known as rodfersou|lunch
chussenot has joined #ruby
nankyokusei has joined #ruby
harfangk has joined #ruby
naprimer_2 has quit [Ping timeout: 248 seconds]
troulouliou_div2 has quit [Remote host closed the connection]
cdg has joined #ruby
cdg has quit [Read error: Connection reset by peer]
cdg has joined #ruby
Toledo is now known as croberts
nankyokusei has quit [Ping timeout: 252 seconds]
<MMZF>
apeiros back.. so please help me?
naprimer_2 has joined #ruby
<apeiros>
MMZF: sure. my question still stands - what expressions do you have/see in that line of code?
<MMZF>
+?
<apeiros>
+ is the name of a method and on its own not an expression. there are multiple expressions in that line.
<apeiros>
an expression is something which evaluates to a value / returns a value
<MMZF>
server and password and username
hotpancakes has joined #ruby
<apeiros>
an expression is something you can put on the right side of an assignment `variable = (expression)`, and it forms a complete statement
<apeiros>
`username` and `password` are not present in that line. `"username"` and `"password"` are expressions too, yes
<apeiros>
what else?
<tobiasvl>
blackbom2: where is shevy?
<apeiros>
which parts of that line could you put on the right side of `foo = …` and it'd be syntactically correct?
ajk142 has joined #ruby
Alayde has joined #ruby
<MMZF>
apeiros you need source code of the bot?
<apeiros>
no
ta has quit [Remote host closed the connection]
<apeiros>
I'm trying to get you to a level of understanding where you can figure out what the error means
<apeiros>
and that single line is sufficient for that
tonini has quit [Quit: Connection closed for inactivity]
<apeiros>
what I need is you to answer my question ;-)
<MMZF>
oh
jhack has quit [Quit: jhack]
<MMZF>
foo= server["username"]
<apeiros>
ok, yes, server["username"] is an expression too
aupadhye has quit [Ping timeout: 240 seconds]
<apeiros>
ok, so we have: `server["username"]` on which you call + (with ":" as argument), then we have the expression `server["username"] + ":"` on which you call + (with server["password"]) as the argument
<apeiros>
>> nil + "foo"
<ruby[bot]>
apeiros: # => undefined method `+' for nil:NilClass (NoMethodError) ...check link for more (https://eval.in/713391)
<apeiros>
>> "foo" + nil
<ruby[bot]>
apeiros: # => no implicit conversion of nil into String (TypeError) ...check link for more (https://eval.in/713392)
<apeiros>
MMZF: as you can see from the above 2 examples, the exception you get happens when you do string + nil
jhack has joined #ruby
malconis has joined #ruby
<apeiros>
so in `server["username"] + ":" + server["password"]` you have `server["username"]`, `":"` and `server["password"]` - which out of those three is the only one which would cause your exception if it evaluates to nil?
<MMZF>
oh so one of the expression value is nil
saslam has joined #ruby
saneax-_-|AFK is now known as saneax
<apeiros>
yes, the exception tells you that. it tells you that you call +, and that it can't convert the argument (right side of +) to string. from that follows that you do `<some string string> + nil`
<MMZF>
from ./bot.rb:67:in `block (3 levels) in <main>'
<apeiros>
`a + b` is syntax sugar for `a.+(b)`, i.e. call the method + on a, with b as sole argument.
<MMZF>
i got this " from ./bot.rb:67:in `block (3 levels) in <main>'"
jrafanie has joined #ruby
<MMZF>
apeiros so means password is nil?
<apeiros>
you might have got it. what you say is wrong. but you might mean the right thing.
<apeiros>
`server["password"]` is most likely nil
<apeiros>
now how do you verify whether it is?
newbie1 has joined #ruby
<MMZF>
by looking the server password file.. where i configured the file to connect to server.
hotpancakes has quit [Ping timeout: 245 seconds]
roflmyeggo has joined #ruby
iogf has joined #ruby
saneax is now known as saneax-_-|AFK
<apeiros>
that's one variant. but there's still a lot happening between that and the value ending up in server["password"]
<apeiros>
I'd either add a "breakpoint" (using the pry gem, add `binding.pry`), or by adding a debug output, like `p server_password: server["password"]`
Derperperd has joined #ruby
chussenot has quit [Quit: chussenot]
despai has joined #ruby
ziarkaen has joined #ruby
jcao219_ has quit [Ping timeout: 245 seconds]
saneax-_-|AFK is now known as saneax
sebastiansier has joined #ruby
sebastia_ has quit [Read error: Connection reset by peer]
Derperperd has quit [Ping timeout: 240 seconds]
Ishido has joined #ruby
tvw has quit []
tvw has joined #ruby
rykou has quit [Quit: WeeChat 1.6]
ianmethyst has joined #ruby
<MMZF>
thanks for help (apeiros)
<MMZF>
:)
<MMZF>
bye
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ScottGA has quit [Remote host closed the connection]
<ruby-lang657>
@apeiros yup
ziarkaen_ has joined #ruby
<apeiros>
MMZF: the faulty part is not in that gist. wherever you invoke ReportDB.load, you pass nil. and that's wrong.
<apeiros>
but you don't call load anywhere in that piece of code
<ruby-lang657>
@apeiros it's my first time building ruby project
iogf has quit [Remote host closed the connection]
ziarkaen has quit [Ping timeout: 245 seconds]
rapha has joined #ruby
<rapha>
hi!
shayan_ has joined #ruby
shayan_ has quit [Client Quit]
<ruby-lang657>
@machinewar how about random hash with key/value pair?
saslam has quit [Ping timeout: 248 seconds]
<ruby-lang657>
zombie.sample(1)
<rapha>
if i have a Pathname that is always like "/one/two/something/blahblah/blah.blah", is there a way i can 'pop' off the first three elements and 'push' something else there so that i get 'replacement/blahblah/blah.blah'?
Guest81542 is now known as ged
ged is now known as Guest4326
oaklndr1 has joined #ruby
<rapha>
ah sorry the term for what i mean is not 'pop', it's 'shift'
aufi has quit [Ping timeout: 258 seconds]
Derperperd has joined #ruby
<apeiros>
rapha: pop means remove from end, shift means remove from start. you want random, so it's neither. also, do you want to remove the k/v pair you get?
doritostains has quit [Quit: doritostains]
shinnya has joined #ruby
Kug3lis has joined #ruby
futilegames has joined #ruby
<ruby-lang657>
@aperos how to get random key/value pair?
<apeiros>
?tabnick ruby-lang657
<ruby[bot]>
ruby-lang657: pro-tip - use tab completion for nicks. avoids typos in nicks.
<apeiros>
also, this isn't twitter. no @ required.
<ruby-lang657>
lol kk
<ruby-lang657>
you following the rules too much
doritostains has joined #ruby
<apeiros>
ruby-lang657: seriously?
<ruby-lang657>
yup
<ruby-lang657>
ignore the fules
gnufied has quit [Ping timeout: 256 seconds]
<ruby-lang657>
rules
<ruby-lang657>
and enjoy it
<apeiros>
you misspell the nick of somebody and think it's ok to tell them how they're somehow wrong?
<apeiros>
find somebody else to help you then. have a nice day.
<ruby-lang657>
aperios people make mistakes
<ruby-lang657>
why do you even bother about typo in name? :)
<ruby-lang657>
relax dude :)
dionysus69 has joined #ruby
zenguy_pc has quit [Ping timeout: 258 seconds]
<apeiros>
ruby-lang657: fix your manners dude
koldbrutality has quit [Ping timeout: 248 seconds]
<ruby-lang657>
@apeiros calm down
<MMZF>
apeiros how to get "csv"?
<apeiros>
ruby-lang657: I'm calm, but utterly uninterested in talking to people who lack manners like you. so as said, have a nice day.
csk157 has quit [Ping timeout: 240 seconds]
aganov has quit [Remote host closed the connection]
zenguy_pc has joined #ruby
<apeiros>
MMZF: what do you mean "get csv"? read a csv file in ruby?
<rapha>
apeiros: i want to remove from start 3 times, no matter what, and then i want to add to start once, no matter what. i figured out something that works now: p=Pathname(mypath).each_filename.to_a; 3.times {p.shift} ... afterwards, i build a new Pathname. is there a more elegant method or is it okay like that?
<apeiros>
rapha: oooh, sorry, I mixed up your question with somebody else's. sorry.
brent__ has quit [Ping timeout: 248 seconds]
aesthetikx has joined #ruby
<apeiros>
rapha: yeah, sure, shift is your term :)
nankyokusei has quit [Ping timeout: 245 seconds]
gnufied has joined #ruby
juseq has joined #ruby
<baweaver>
ruby-lang657: what have you tried?
neuraload has quit [Ping timeout: 240 seconds]
brent__ has joined #ruby
neuraload has joined #ruby
TomyWork has quit [Ping timeout: 240 seconds]
rodfersou|lunch is now known as rodfersou
<MMZF>
(apeiros) well that gist is a opensource bot, not continued, no support. so i don't know what to do :/
skweek has joined #ruby
ruby-lang657 has quit [Ping timeout: 260 seconds]
aeontech has quit [Quit: aeontech]
Rodya_ has joined #ruby
flashbang has joined #ruby
neuraload has quit [Ping timeout: 260 seconds]
enyo has quit [Ping timeout: 258 seconds]
skweek has quit [Ping timeout: 260 seconds]
dionysus69 has quit [Quit: dionysus69]
<rapha>
apeiros: okay thanks :)
BTRE has joined #ruby
dionysus69 has joined #ruby
chouhoulis has joined #ruby
<rapha>
oh, and my alotted time is over for working on this for today
<rapha>
bye, see you next time!
rapha has quit [Quit: WeeChat 1.6]
Kug3lis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hotpancakes has joined #ruby
skweek has joined #ruby
sepp2k has quit [Quit: Leaving.]
last_staff has quit [Quit: last_staff]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
Kug3lis has joined #ruby
Lucky_ABA has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ramfjord has joined #ruby
gnufied has quit [Ping timeout: 240 seconds]
rileyy has quit [Ping timeout: 258 seconds]
koldbrutality has joined #ruby
jhack has joined #ruby
iogf has joined #ruby
gnufied has joined #ruby
preyalone has joined #ruby
nowhere_man has joined #ruby
malconis has quit [Read error: Connection reset by peer]
jaruga___ has quit [Quit: jaruga___]
jaruga___ has joined #ruby
juseq has quit []
tvw has quit [Remote host closed the connection]
Lucky_ABA has joined #ruby
conta has quit [Ping timeout: 260 seconds]
Lucky_ABA has quit [Client Quit]
Lucky_ABA has joined #ruby
jackjackdripper has joined #ruby
hotpancakes has quit [Ping timeout: 256 seconds]
Macaveli has quit [Remote host closed the connection]
saneax is now known as saneax-_-|AFK
amclain has joined #ruby
Devalo has joined #ruby
jhack has quit [Quit: jhack]
username has joined #ruby
ishe_ua has quit [Remote host closed the connection]
jhack has joined #ruby
enyo has joined #ruby
aremaref has joined #ruby
mlkkk has quit [Remote host closed the connection]
masondesu has quit [Ping timeout: 248 seconds]
the_drow has quit [Quit: This computer has gone to sleep]
ramfjord has quit [Ping timeout: 240 seconds]
skweek has quit [Ping timeout: 252 seconds]
SesMan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
enyo has quit [Ping timeout: 252 seconds]
<shadeslayer>
Hi
<shadeslayer>
I'm trying to figure out how to get the amount of physical memory on a systme
<shadeslayer>
*system
<shadeslayer>
I'm trying to use ohai for this, but fail at finding docs
<shadeslayer>
is there a better way to get the amount of physical memory on a system?
Silthias has quit [Ping timeout: 248 seconds]
ramfjord has joined #ruby
milardovich has quit [Remote host closed the connection]
milardovich has joined #ruby
herbmillerjr has joined #ruby
hahuang65 has joined #ruby
Guest4326 is now known as ged
unshadow has quit [Ping timeout: 252 seconds]
ged is now known as Guest95461
<eelster>
shadeslayer: try the ruby vmstat gem
unshadow has joined #ruby
enyo has joined #ruby
<dminuoso>
shadeslayer: What for?
milardovich has quit [Ping timeout: 252 seconds]
<shadeslayer>
dminuoso: I want to set the memory allocated to docker via the API
<shadeslayer>
and it needs to be no more than 80% of the physical memory
<eelster>
shadeslayer: Do you want this to be portable or is it just personal?
<shadeslayer>
well, it needs to work on linux
<shadeslayer>
that's all
<eelster>
shadeslayer: Oh, just use `free`
<elomatreb>
Parse the output of `free`?
<shadeslayer>
ugh, I wanted something nicer
<eelster>
shadeslayer: Then use the vmstat gem
<shadeslayer>
ack
Rodya_ has quit [Remote host closed the connection]
mark_66 has quit [Remote host closed the connection]
milardovich has quit [Ping timeout: 240 seconds]
Muz has joined #ruby
AndBobsYourUncle has joined #ruby
C0deMaver1ck has joined #ruby
jhack has quit [Client Quit]
C0deMaver1ck is now known as Guest20915
ajk142 has quit [Remote host closed the connection]
bodie_ has joined #ruby
enyo has quit [Ping timeout: 248 seconds]
tercenya has quit [Remote host closed the connection]
AndBobsYourUncle has quit [Remote host closed the connection]
jhack has joined #ruby
tercenya has joined #ruby
AndBobsYourUncle has joined #ruby
hotpancakes has joined #ruby
cschneid has joined #ruby
aeontech has joined #ruby
Kug3lis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<cschneid>
`myarray << value` is a destructive edit of the array - is there a non destructive ( copying) method of adding a value to the end of an array?
Devalo has joined #ruby
<cschneid>
I can do `myarray + [singular_item]` but that seems noisy
<cschneid>
making the singleton array just to throw it away
Kug3lis has joined #ruby
antgel has quit [Ping timeout: 248 seconds]
rodfersou has quit [Ping timeout: 260 seconds]
unshadow has quit [Quit: leaving]
aeontech has quit [Client Quit]
rodfersou has joined #ruby
<rob_>
cschneid: myarray.dup << value?
chussenot has quit [Quit: chussenot]
<cschneid>
seems odd that most array functions have a `reject` and `reject!` version, but not the shovel operator
<cschneid>
`.append` or something
<apeiros>
[*my_array, item]
<markholmes>
or myarray + [value]
<apeiros>
(not sure, might perform badly)
<cschneid>
eh, the array I'm working with is single-digit length. Just want it to be pretty code :)
chussenot has joined #ruby
aeontech has joined #ruby
<rob_>
is using .dup a bad idea?
<toretore>
`ary + [v]` is the way to go
<apeiros>
rob_: I think it's fine
<rob_>
apeiros: thanks
renchan has quit [Quit: Leaving...]
hotpanca_ has joined #ruby
ziarkaen_ has quit [Ping timeout: 256 seconds]
chussenot has quit [Quit: chussenot]
Devalo has quit [Remote host closed the connection]
hotpancakes has quit [Ping timeout: 245 seconds]
pilne has joined #ruby
BTRE has joined #ruby
nankyokusei has joined #ruby
<jokke>
hey
SeepingN has quit [Quit: The system is going down for reboot NOW!]
<jokke>
would you recommend using Rack::Deflater or nginx builtin gzipping?
ur5us has joined #ruby
gnarld_ is now known as nug
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
SeepingN has joined #ruby
<jokke>
i have gzip on in nginx but the responses aren't gzipped. Do i need gzip_proxied any?
<jokke>
sorry this is a nginx question
<jokke>
i'll go to #nginx
Guest38364 has quit [Remote host closed the connection]
Guest95461 is now known as ged
ged is now known as Guest92315
nankyokusei has quit [Ping timeout: 258 seconds]
milardovich has joined #ruby
<toretore>
nginx is probably better at it than rack
chussenot has joined #ruby
ruby has joined #ruby
ruby is now known as Guest14044
eelster has quit [Ping timeout: 240 seconds]
milardovich has quit [Ping timeout: 245 seconds]
Gasher has joined #ruby
ur5us has quit [Remote host closed the connection]
flashbang has quit [Ping timeout: 240 seconds]
muelleme has joined #ruby
<blackbom2>
second that
<blackbom2>
i would use nginx/.htaccess
Rodya_ has quit [Ping timeout: 256 seconds]
csk has quit [Ping timeout: 260 seconds]
Silthias has joined #ruby
Kug3lis has quit [Ping timeout: 240 seconds]
duderonomy has joined #ruby
whathappens has joined #ruby
tolerablyjake has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
BitWhisperer has quit [Remote host closed the connection]
Fuzai has quit [Ping timeout: 256 seconds]
blackbom2 has quit [Ping timeout: 258 seconds]
malconis has joined #ruby
Derperpe1 has joined #ruby
chussenot has quit [Quit: chussenot]
ponzii has joined #ruby
r3cycle has joined #ruby
Derperperd has quit [Ping timeout: 240 seconds]
csk has joined #ruby
aeontech has quit [Quit: aeontech]
BTRE has quit [Quit: Leaving]
<ponzii>
Current Pry 0.10.4 with Ruby 2.4 and latest Rubygems produces this error: <$HOME>/.rbenv/versions/2.4.0/lib/ruby/2.4.0/rubygems/dependency.rb:310:in `to_specs': Could not find 'json' (~> 1.8) - did find: [json-2.0.2] (Gem::MissingSpecVersionError)
Derperperd has joined #ruby
<ponzii>
... but Json 1.8 isn't compatible with Ruby 2.4??
[Butch] has joined #ruby
<baweaver>
Not looking like a pry dependency
<baweaver>
are you in a project?
<havenwood>
ponzii: Are you using the pry-theme gem?
<ponzii>
baweaver: Not in a project
<baweaver>
No open issues on pry on json that are recent
AndBobsYourUncle has quit [Remote host closed the connection]
blackbom2 has joined #ruby
<ponzii>
havenwood Yes, Pry-theme
<havenwood>
ponzii: It's fixed on pry-theme master and I have a PR in for fixing Fixnum/Integer warnings as well.
AndBobsYourUncle has joined #ruby
Derperpe1 has quit [Ping timeout: 256 seconds]
<baweaver>
kyrylo be praised
<ponzii>
haverwood: Great, that must be it.
aesthetikx has joined #ruby
<ponzii>
haverwood: Removed and pry is now working with Ruby 2.4
<ponzii>
haverwood: Would be nice if Ruby could isolate the source of the problem a bit better, though. Not your fault, I guess. I've been hunting this own down for weeks.
<havenwood>
ponzii: if you want you could `gem open pry-theme` and remove the json dep from pry-theme.gemspec until a new version is released
ajk142 has joined #ruby
<ponzii>
haverwood: Ah, ok. Thanks.
AndBobsYourUncle has quit [Ping timeout: 248 seconds]
aufi has quit [Ping timeout: 258 seconds]
siddart has joined #ruby
<blackbom2>
gem-open ;]
aeontech has joined #ruby
BTRE has joined #ruby
csk has quit [Ping timeout: 240 seconds]
matp has quit [Remote host closed the connection]
milardovich has joined #ruby
matp has joined #ruby
csk has joined #ruby
ponzii has quit [Quit: 10 million strong and growing!]
AndBobsY_ has joined #ruby
despai has quit [Quit: This computer has gone to sleep]
milardovich has quit [Ping timeout: 258 seconds]
eelster has joined #ruby
TomyLobo has joined #ruby
s2013 has joined #ruby
preyalone has quit [Quit: Connection closed for inactivity]
AndBobsY_ has quit [Remote host closed the connection]
AndBobsYourUncle has joined #ruby
AndBobsYourUncle has quit [Remote host closed the connection]
hotpanca_ has quit [Remote host closed the connection]
AndBobsYourUncle has joined #ruby
tolerablyjake has joined #ruby
doritostains has quit [Quit: doritostains]
tomaw has joined #ruby
workmad3 has quit [Ping timeout: 240 seconds]
Gasher has quit [Quit: ja też umię]
Gasher has joined #ruby
ScottGA has joined #ruby
AndBobsYourUncle has quit [Remote host closed the connection]
AndBobsYourUncle has joined #ruby
AndBobsYourUncle has quit [Remote host closed the connection]
AndBobsYourUncle has joined #ruby
agit0 has quit [Quit: zzzZZZ….]
<Rich_Morin>
I'm using Path.find from the ruby-path gem (https://rubygems.org/gems/ruby-path). It returns path lists such as [:foo, :bar], along with corresponding parts of the target data structure. I'm wondering what tools exist that can use these lists (e.g., for get_in or set_in).
hotpancakes has joined #ruby
<eelster>
Rich_Morin: What do you mean? I don't folow.
<eelster>
s/folow/follow
matp has quit [Remote host closed the connection]
blackmesa has quit [Ping timeout: 240 seconds]
<eelster>
Like, say you have the array `a = %i(foo bar)`, what would you want to do with that?
matp has joined #ruby
<Rich_Morin>
Reach into a target data structure such as { foo: { bar: 42 } } and extract 42?
eam_ has quit [Quit: leaving]
ScottGA has quit [Remote host closed the connection]
dionysus69 has quit [Remote host closed the connection]
<Rich_Morin>
FWIW, the lists can also contain integers, which are array indexes rather than hash keys.
Rodya_ has joined #ruby
<eelster>
Rich_Morin: You can access arrays and hashes the same way in ruby luckily. Say we have the hash `h = {:foo => {:bar => 42}}`, we can get `42` using `h[:foo][:bar]`.
<apeiros>
or h.dig(:foo, :bar)
chouhoulis has quit [Remote host closed the connection]
<eelster>
apeiros's solution is better
<baweaver>
or....
<eelster>
Also, if `a = %i(foo bar)` in your example, you can do `h.dig(*a)`
<eelster>
apeiros: I don't like matz' original idea with it, but I do thing there should be some way to do cases for truthiness or falsiness.
A124 has joined #ruby
<apeiros>
eelster: as others in the thread noted, the list for falsy values in ruby is short, so being explicit is usually easy
<apeiros>
case obj; when nil,false; "falsy"; else "truthy"; end
Rodya_ has quit [Remote host closed the connection]
<eelster>
apeiros: That is true, I think that moreso it would be useful if you wanted to do when A; when B; when Truthy; else, but I guess you could do when A; when B; when false,nil; else
<apeiros>
precisely
<eelster>
apeiros: I think if it was from someone other than matz I'd probably dismiss it out of hand, but being Matz, I think it is fair to maybe give a bit more thought, to it, but there really is no strong usecase.
<apeiros>
same. it's the only reason I said "I wonder about the actual use case".
<apeiros>
well, no, I usually wonder about actual use cases, even if my instinct is to dismiss it :)
lenwood has quit [Ping timeout: 240 seconds]
<eelster>
apeiros: I do too, but I'll think harder about it under these circumstances.
gloscombe has joined #ruby
<eelster>
I do love reading feature requests though.
<eelster>
Ruby-Newbie: Here's some hints. The methods each_with_index, chars, join, and capitalize might be useful
doritostains has quit [Quit: doritostains]
<apeiros>
String#* might be useful too
<Ruby-Newbie>
thought process was: break initial string into array. use each_with_index to multiply the element times the index + 1, then join the array into a string seperated by "-"
<elomatreb>
Uh, ? literals. I thought they were removed?
<apeiros>
elomatreb: sadly no. they're now string literals instead of integer
<eelster>
elomatreb: Nope.
<apeiros>
pointless beyond golf
<eelster>
apeiros: Nevermind not a splat!
<Ruby-Newbie>
but from what I have written in repl.it it's already a string
<Ruby-Newbie>
so the join method won't work on the string
<apeiros>
eelster: yeah, splat ain't no method ;-)
<Ruby-Newbie>
i get a method error
matp has quit [Remote host closed the connection]
<elomatreb>
Ruby-Newbie: Yeah, a string is already a joined sequence of characters
ScottGA has quit [Remote host closed the connection]
<Ruby-Newbie>
right
<apeiros>
Ruby-Newbie: chop removes the last char of a string. so does string[0..-2]
jetpack_joe has joined #ruby
<apeiros>
though map + join is IMO nicer
<Ruby-Newbie>
oh that's perfect then
<elomatreb>
You can add elements to an array just like how you append to your string (<<), and that array can later be joined using, .join, which accepts a separation character
matp has joined #ruby
<eelster>
apeiros: You're at 51? My golf even with your optimizations is only at 52.
<Ruby-Newbie>
chop worked great
<elomatreb>
Test passes :shrug: :)
<Ruby-Newbie>
@apeiros how would you solve this with map + join?
<Ruby-Newbie>
man.. my problem solving skills are horrible. These are simple katas and I can't even solve them.
<Ruby-Newbie>
Thanks for the help guys
<eelster>
apeiros: I prefer to be somewhat dot-free :P
skweek has quit [Ping timeout: 248 seconds]
harai has joined #ruby
<eelster>
Ruby-Newbie: Your skills aren't horrible.
<apeiros>
weeeell, golfing is about being char-free ;-p
<apeiros>
Ruby-Newbie: that's what katas are about! hone, hone and hone again until you got the skills :D
<eelster>
I've been coding in ruby for years. You aren't expected to be able to have that base of knowledge yet. Coding more helps you learn.
<Ruby-Newbie>
True true. I might pester you guys in a bit
* apeiros
started ruby 4h ago
<Ruby-Newbie>
Do you guys think Codewars actually helps?
nankyokusei has joined #ruby
<elomatreb>
Especially since solving problems with iterators like this is rarely done in other languages
<eelster>
Ruby-Newbie: Yeah. I like codewars.
<Ruby-Newbie>
I feel like they help for technical interviews and stuff like that
jshjsh has quit [Quit: Leaving]
<eelster>
There's some pretty hard stuff on there.
<Ruby-Newbie>
Fair, i'm gonna keep doing them
<eelster>
Ruby-Newbie: one thing i'll say is the 'sleekiest' solution in ruby isn't always the most efficient.
ifctj has joined #ruby
<elomatreb>
(Nor the most readable)
<Ruby-Newbie>
That's what I've heard too
<Ruby-Newbie>
just cause it uses less characters doesn't mean it's more efficient
<apeiros>
yeah, don't code clever. code readable and maintainable.
<eelster>
I optimized a piece of code by using 3 more lines. It turned an O(n^2) algorithm into an O(n) algorithm.
<Ruby-Newbie>
unfortunately the "most clever" answers in Codewars are the ones with the shortest lines
<eelster>
One liners are nice, but not always efficient.
<apeiros>
ruby is nice because you can be concise. i.e. dense code which is still very readable.
<Ruby-Newbie>
Gotcha
<eelster>
Ruby-Newbie: Also, chain maps over nesting maps if you can. There is a huge performance difference.
<Ruby-Newbie>
I noticed also for Codewars it's super useful to have a good grasp of a lot of methods and how they work
aesthetikxx has joined #ruby
<Ruby-Newbie>
hmm haven't thought of that eelster
<markholmes>
Ruby-Newbie: that's important outside of codewars, too.
<eelster>
Ruby-Newbie: Every time you nest a loop your algorithm gets more inefficient.
jhack has quit [Ping timeout: 248 seconds]
flashbang has joined #ruby
harai has quit [Ping timeout: 256 seconds]
<eelster>
Ruby-Newbie: Also, don't worry about who votes 'most-clever' on codewars. That doesn't mean too much.
jshjsh has joined #ruby
nettoweb1 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nankyokusei has quit [Ping timeout: 248 seconds]
<Ruby-Newbie>
cool cool, thanks for the tips
<eelster>
No worrie
<eelster>
s/worrie/worries
eelster has left #ruby ["g2g"]
gheegh has joined #ruby
govg has joined #ruby
spacheco has joined #ruby
Derperpe1 has quit [Max SendQ exceeded]
<aesthetikxx>
Does anyone know if there is currently a version of the json gem that will compile for ruby 2.4.0
Derperpe1 has joined #ruby
ta has joined #ruby
<apeiros>
aesthetikxx: the one which comes with stdlib.
markholmes has quit [Ping timeout: 252 seconds]
<aesthetikxx>
version my app is using fails to compile since fixnum was removed
lenwood has joined #ruby
Mon_Ouie has quit [Quit: WeeChat 1.6]
iogf has quit [Remote host closed the connection]
<aesthetikxx>
i think for some reason active_model_serializers requires json_api (ugh) which is ~> json 1.8
AndBobsYourUncle has quit [Remote host closed the connection]
AndBobsYourUncle has joined #ruby
milardovich has joined #ruby
AndBobsYourUncle has quit [Remote host closed the connection]
Derperpe1 has quit [Max SendQ exceeded]
AndBobsYourUncle has joined #ruby
Derperpe1 has joined #ruby
haylon has joined #ruby
AndBobsYourUncle has quit [Remote host closed the connection]
AndBobsYourUncle has joined #ruby
z4j5 has joined #ruby
milardovich has quit [Ping timeout: 252 seconds]
z4j5 has quit [Read error: No route to host]
<haylon>
Hey everyone! Has anyone ever worked with the BMC BSA REST API?
zx4j5 has joined #ruby
synaps3 has quit [Quit: Leaving]
<dminuoso>
haylon: TOO MNY ABBV FOR MY TST
sid_fules has quit [Quit: Leaving...]
<haylon>
Sorry, BMC(?) Bladelogic Server Automation REST Application Programing Interface
AndBobsY_ has joined #ruby
AndBobsYourUncle has quit [Ping timeout: 258 seconds]
last_staff has joined #ruby
ldnunes has quit [Quit: Leaving]
Guest73462 is now known as ged
milardovich has joined #ruby
ged is now known as Guest72947
BTRE has quit [Quit: Leaving]
shayan_ has joined #ruby
Ruby-Newbie has quit [Ping timeout: 260 seconds]
zx4j5 has quit [Quit: WeeChat 1.2]
shayan_ has quit [Client Quit]
BTRE has joined #ruby
<haylon>
@dminuoso, I'm guess you have not worked that product then?
shayan_ has joined #ruby
jdawgaz has joined #ruby
<SeepingN>
that's an enterprise level question
<SeepingN>
that's $150/hour
<SeepingN>
(sale ends today)
<haylon>
eesh. Not sure I can foot that
aesthetikx has quit [Quit: WeeChat 1.4]
Aleroniponi has joined #ruby
FastJack has quit [Quit: leaving]
maloik has quit [Remote host closed the connection]
zapata has quit [Quit: WeeChat 1.6]
x00r__ has quit [Ping timeout: 240 seconds]
maloik has joined #ruby
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
hahuang65 has joined #ruby
Jackneill_ has joined #ruby
flashbang has quit [Ping timeout: 240 seconds]
zapata has joined #ruby
matthewd has quit [Ping timeout: 248 seconds]
JeanCarloMachado has quit [Remote host closed the connection]
flashbang has joined #ruby
dcunit3d has joined #ruby
flashbang is now known as Guest15264
JeanCarloMachado has joined #ruby
siddart_ has joined #ruby
<gheegh>
Hey all.. I'm trying to get a regex going.. i have a list of keys, i'm trying to insert.. but I only want to insert them if the text trailing them is a space, comma, or ). Right now, if there's not an exact match, it matches when it shouldn't and is erroring.. Here's a regex that tries to show what it should not match: https://gist.github.com/wflanagan/a1e98edc7e893545325db0063cd5333f
dcunit3d has quit [Read error: Connection timed out]
<eam>
haylon: nope, have always used ipmi over lan
cdg has joined #ruby
dcunit3d has joined #ruby
Derperpe1 has quit [Quit: WeeChat 1.5]
<gheegh>
I also addeed how i'm using it for real.. so you can see that.
polishdub has quit [Quit: leaving]
<haylon>
eam, darn. I didn't know if I was using Rest-Client properly, or if I just don't have all the options for their API. The documentation is a bit inconsistent, and I wanted to see if anyone had used it before. I'll open a ticket wiht them.
<SeepingN>
gheegh: date_is_today?(quit_date) sound s like it would return a boolean. then you're trying to match a boolean
siddart has quit [Ping timeout: 240 seconds]
<eam>
in my experience any software in this area is a buggy trainwreck
AlexRussia has joined #ruby
<gheegh>
date_is_today?(quit_date) is evaluated with an eval statement..
<gheegh>
its basically a simple rules engine
NeverTired has joined #ruby
tekk has joined #ruby
<haylon>
eam, yeah, I know what you mean, and unfortunately, I'm forced to work with it. I'm trying to introduce the Chef idea
<gheegh>
but, the problem is that if the customer puts an attribute in of "quit", and then has a rule that matches for example "quit_date", the regex i'm doing will insert the quit and leave the "_date", and that causes problems.
<haylon>
but its slow going.
<gheegh>
because it's invalid code..
<gheegh>
i already doucble check that i've matched something in my array.. if not, I don't eval at all, and return false..
malconis has quit [Read error: Connection reset by peer]
Rodya_ has quit [Remote host closed the connection]
<gheegh>
so, this is dealing with a corner case..
malconis has joined #ruby
FastJack has joined #ruby
malconis has quit [Read error: Connection reset by peer]
enilsen16 has joined #ruby
lenwood has quit [Ping timeout: 240 seconds]
malconis has joined #ruby
Rodya_ has joined #ruby
<gheegh>
SeepingN: that was all directed at you.. :-)
malconis has quit [Read error: Connection reset by peer]
malconis has joined #ruby
malconis has quit [Read error: Connection reset by peer]
Komarr has joined #ruby
Komarr has quit [Client Quit]
Gasher has quit [Ping timeout: 245 seconds]
malconis has joined #ruby
matthewd has joined #ruby
whathappens has quit [Remote host closed the connection]
ifctj has quit [Ping timeout: 245 seconds]
doritostains has quit [Quit: doritostains]
whathappens has joined #ruby
lenwood has joined #ruby
valeri_uF0 has joined #ruby
jhack has joined #ruby
svkurowski_ has joined #ruby
Guest37479 has quit [Ping timeout: 248 seconds]
valeri_ufo has quit [Ping timeout: 248 seconds]
mikeiniowa has quit [Ping timeout: 248 seconds]
justinmrkva has quit [Ping timeout: 248 seconds]
Zarthus has quit [Ping timeout: 248 seconds]
svkurowski has quit [Ping timeout: 248 seconds]
CalimeroTeknik has quit [Ping timeout: 248 seconds]
thejoecarroll has quit [Ping timeout: 248 seconds]
valeri_uF0 is now known as valeri_ufo
marahin has quit [Excess Flood]
svkurowski_ is now known as svkurowski
Zarthus_ has joined #ruby
thejoecarroll has joined #ruby
marahin has joined #ruby
m1dnight1 has quit [Ping timeout: 248 seconds]
Zarthus_ is now known as Zarthus
kspencer has quit [Ping timeout: 248 seconds]
Ken has joined #ruby
perryh has joined #ruby
perryh has joined #ruby
perryh has quit [Changing host]
m1dnight1 has joined #ruby
Ken is now known as Guest85773
justinmrkva has joined #ruby
shayan_ has quit [Quit: shayan_]
nicoulaj has quit [Ping timeout: 248 seconds]
whathappens has quit [Ping timeout: 255 seconds]
bodgix has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
last_staff has quit [Quit: last_staff]
xen0fon has joined #ruby
CalimeroTeknik has joined #ruby
pawnbox has quit [Remote host closed the connection]
jaruga___ has quit [Quit: jaruga___]
Rodya_ has quit [Remote host closed the connection]
Rodya_ has joined #ruby
marxarelli is now known as marxarelli|afk
spacheco has quit [Remote host closed the connection]
spacheco has joined #ruby
maddmaxx has quit [Quit: Going offline, see ya! (www.adiirc.com)]
edwinvdg_ has joined #ruby
edwinvdgraaf has quit [Read error: Connection reset by peer]
mostlybadfly has quit [Quit: Connection closed for inactivity]
Rodya_ has quit [Remote host closed the connection]
spacheco has quit [Ping timeout: 240 seconds]
vasilakisfil has joined #ruby
Guest15264 has quit [Ping timeout: 245 seconds]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jhack has quit [Quit: jhack]
yazdmich is now known as BytesAndCoffee
Ruby-Newbie has joined #ruby
<Ruby-Newbie>
Hey again fellas
<elomatreb>
welcome back
<vasilakisfil>
when I do `str << "hallo?"` is `<<` a method or something else ? for instance can I write another method named `foo` in String class and then do `str foo "hallo?"` ?
<havenwood>
Ruby-Newbie: All sorts here, gals too!
<Ruby-Newbie>
btw, i'm on freenode is there any way to format my text so it comes out like code here?
enyo has joined #ruby
<elomatreb>
Ruby-Newbie: Normally IRC clients already show the text in monospace?
jcao219_ has quit [Ping timeout: 245 seconds]
<havenwood>
Ruby-Newbie: The preferred option is to link to a Gist of the code, with syntax highlighting and multiple files and such niceties.
Rodya_ has joined #ruby
<Ruby-Newbie>
Noted
Rodya_ has quit [Read error: Connection reset by peer]
elementaru has quit [Remote host closed the connection]
<havenwood>
vasilakisfil: It's syntactic sugar that you're able to call it like that. You can' t do your own quite like that.
<Ruby-Newbie>
So I have another basic Codewar challenge, i'm having a bit of trouble on the last part. Also the code is not super clean
xen0fon has quit [Quit: xen0fon]
<havenwood>
Ruby-Newbie: Shoot us a link and we'll give feedback!
nemish has joined #ruby
<elomatreb>
But you *can* redefine the operators (most of them) to do what you want on your own classes
<nemish>
is there a way to specify different gem versions based on the ruby version?
nettoweb has joined #ruby
<vasilakisfil>
ok I see! thanks!
<Ruby-Newbie>
ok so the function I have to make is this: remove_smallest([2,2,1,2,1]) = [2,2,2,1] #basically remove the smallest integer and if there are multiple elements of the same number then remove the one with a lower index
<Ruby-Newbie>
if array is empty then just return an empty array
Aleroniponi has quit [Quit: Page closed]
enyo has quit [Ping timeout: 240 seconds]
emptyflask has joined #ruby
<Ruby-Newbie>
I used delete.min to remove the smallest integer, but having trouble figuring out how to handle the mutliple element issue
<havenwood>
nemish: Do you mean in a Gemfile or gemspec or just generally?
<gheegh>
you're above my pay grade.
Lucky_ABA has joined #ruby
AndBobsY_ has quit [Remote host closed the connection]
<Ruby-Newbie_>
Hey guys
AndBobsYourUncle has joined #ruby
<Ruby-Newbie_>
Absolute beginner here and just started messing with Codewars
<Ruby-Newbie>
Woops
Ruby-Newbie has quit [Quit: Page closed]
<havenwood>
Ruby-Newbie_: See Array#delete_at
swills has quit [Read error: Connection reset by peer]
swills has joined #ruby
ddffg has quit [Ping timeout: 252 seconds]
<havenwood>
Ruby-Newbie_: Since you're trying to delete something at a particular index try to find that index then you can delete that one index only.
<havenwood>
Ruby-Newbie_: That make any sense?
despai has joined #ruby
<havenwood>
>> a = ['ant', 'bat', 'bat', 'dog']; a.delete_at 1; a # Ruby-Newbie_
<havenwood>
Ruby-Newbie_: See if between those two methods ^ you can find a solution for your code?
Guest15264 has joined #ruby
ScottGA has joined #ruby
ponga has quit [Quit: Connection closed for inactivity]
ramfjord has joined #ruby
tomphp has joined #ruby
AndBobsYourUncle has joined #ruby
enilsen16 has quit [Ping timeout: 252 seconds]
lenwood has quit [Ping timeout: 260 seconds]
ScottGA has quit [Ping timeout: 248 seconds]
Guest72947 is now known as ged
<nemish>
havenwood: in a Gemfile ... think i need to use ENV variables to specify different gem versions based on the Ruby version
ged is now known as Guest78342
enilsen16 has joined #ruby
boombox_ has quit [Remote host closed the connection]
Zamyatin has quit [Ping timeout: 240 seconds]
markholmes has joined #ruby
<havenwood>
nemish: You could use `RUBY_VERSION` maybe along with `Gem::Version` or do your own version comparison.
<havenwood>
nemish: You could use case or if statements. How many gems vary by version of Ruby? Keep in mind that it kinda defies the purpose of the Gemfile.lock for an app - being on the exact same version of the exact same gems.
<havenwood>
nemish: We might be able to better advise if you say more about the app/gem and why you're supporting multiple Ruby versions.
ScottGA has joined #ruby
ddffg has joined #ruby
workmad3 has joined #ruby
sepp2k has quit [Read error: Connection reset by peer]
duckpuppy has quit [Ping timeout: 240 seconds]
doritostains has joined #ruby
whathappens has joined #ruby
Guest14044 has quit [Quit: Page closed]
polishdub has joined #ruby
ScottGA has quit [Remote host closed the connection]
shayan_ has joined #ruby
enilsen16 has quit [Quit: enilsen16]
BitWhisperer has joined #ruby
ScottGA has joined #ruby
ScottGA has quit [Remote host closed the connection]
anuxivm has joined #ruby
doritostains has quit [Quit: doritostains]
ScottGA has joined #ruby
anuxivm has left #ruby [#ruby]
ScottGA has quit [Remote host closed the connection]
malconis has quit [Read error: Connection reset by peer]
jhack has quit [Quit: jhack]
AndrewIsHere has joined #ruby
doritostains has joined #ruby
nankyokusei has joined #ruby
kch has joined #ruby
<kch>
ello
kobain has joined #ruby
nankyokusei has quit [Ping timeout: 240 seconds]
siddart_ has quit [Ping timeout: 256 seconds]
jobewan has joined #ruby
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
machinewar has joined #ruby
<havenwood>
kch: hi
jetpack_joe has quit [Quit: Connection closed for inactivity]
futilegames has quit [Ping timeout: 240 seconds]
ramortegui has quit [Quit: Ex-Chat]
Andrew_TA has quit [Remote host closed the connection]
Guest15264 has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
<kch>
havenwood, nice to see you again
Andrew_TA has joined #ruby
Andrew_TA has quit [Remote host closed the connection]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<anjen>
machinewar: thoughtbot clearnace added it in a link_to . Orignally, I'd have used link_to("some text", route), but it uses link_to(t(".some_text"),route)
emptyflask has quit []
tomphp has joined #ruby
<machinewar>
ohh interesting so it definitely sounds like il8n in that case
<anjen>
;) looks like I have quite a bit of recoding to do...
AnxiousGarlic has quit [Read error: Connection reset by peer]
<dminuoso>
anjen: ?rails
minimalism has joined #ruby
<dminuoso>
?rails anjen
<ruby[bot]>
anjen: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
<anjen>
much appreciated Have as good afternoon/etc (as applicable).
<dminuoso>
anjen: "morning" is the universal programmer time.
<dminuoso>
It's always morning somewhere.
<anjen>
dminuoso: sorry, I thought this would be the right channel. I'm on RubyOnRails as well. again thanks for the reply and answer. Have a good morning!
tyang has quit [Read error: Connection reset by peer]
matp has quit [Remote host closed the connection]
matp has joined #ruby
AndBobsYourUncle has quit [Remote host closed the connection]
AndBobsYourUncle has joined #ruby
AndBobsY_ has joined #ruby
CloCkWeRX has quit [Ping timeout: 260 seconds]
AndBobsYourUncle has quit [Ping timeout: 240 seconds]
saneax-_-|AFK is now known as saneax
gheegh has quit [Ping timeout: 240 seconds]
havenwood has joined #ruby
havenwood has joined #ruby
havenwood has quit [Changing host]
__main__ has quit [Read error: Connection reset by peer]
triangles has joined #ruby
enyo_ has joined #ruby
TomyLobo has quit [Ping timeout: 252 seconds]
__main__ has joined #ruby
amitchellbullard has quit [Ping timeout: 240 seconds]
aarongodin has quit [Ping timeout: 240 seconds]
johnkpaul has quit [Ping timeout: 240 seconds]
a_le_x has quit [Ping timeout: 240 seconds]
Yonk_ has quit [Ping timeout: 240 seconds]
ckrailo has quit [Ping timeout: 240 seconds]
aremaref_ has joined #ruby
machty has quit [Ping timeout: 255 seconds]
a_le_x has joined #ruby
Majost has quit [Ping timeout: 240 seconds]
bastilian has quit [Ping timeout: 255 seconds]
dcunit3d has quit [Ping timeout: 240 seconds]
deepak_ has quit [Ping timeout: 240 seconds]
rjungemann has quit [Ping timeout: 255 seconds]
quoboo has quit [Ping timeout: 255 seconds]
hayden___ has quit [Ping timeout: 255 seconds]
codepete has quit [Ping timeout: 255 seconds]
ELLIOTTCABLE has quit [Ping timeout: 240 seconds]
enyo_ has quit [Ping timeout: 240 seconds]
deimos has quit [Ping timeout: 245 seconds]
eelster has joined #ruby
nadir has quit [Ping timeout: 240 seconds]
tfitts has quit [Ping timeout: 240 seconds]
moogumbo has quit [Ping timeout: 255 seconds]
vayan has quit [Ping timeout: 255 seconds]
the-eat-scout has quit [Ping timeout: 256 seconds]
troter__________ has quit [Ping timeout: 258 seconds]
ewilliam__ has quit [Ping timeout: 258 seconds]
aremaref has quit [Ping timeout: 240 seconds]
havenwood has quit [Read error: Connection reset by peer]
havenwood has joined #ruby
havenwood has joined #ruby
johnkpaul has joined #ruby
Majost has joined #ruby
deepak_ has joined #ruby
aarongodin has joined #ruby
moogumbo has joined #ruby
quoboo has joined #ruby
machty has joined #ruby
Yonk_ has joined #ruby
hayden___ has joined #ruby
bastilian has joined #ruby
deimos has joined #ruby
tfitts has joined #ruby
nadir has joined #ruby
rjungemann has joined #ruby
iogf is now known as tau
ewilliam__ has joined #ruby
codepete has joined #ruby
tercenya_ has joined #ruby
chouhoulis has quit [Remote host closed the connection]
JeanCarloMachado has quit [Remote host closed the connection]
s2013 has quit [Read error: Connection reset by peer]
tercenya has quit [Ping timeout: 260 seconds]
JeanCarloMachado has joined #ruby
enilsen16 has quit [Ping timeout: 245 seconds]
nettoweb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
enterprisey has quit [Remote host closed the connection]
enilsen16 has joined #ruby
dcunit3d has joined #ruby
CloCkWeRX has joined #ruby
ELLIOTTCABLE has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ckrailo has joined #ruby
amitchellbullard has joined #ruby
johnhaugeland has joined #ruby
johnhaugeland has left #ruby [#ruby]
StoneCypher has joined #ruby
<StoneCypher>
What do Ruby APIs generally use for null in an sql driver? nil?
dcunit3d has quit [Ping timeout: 240 seconds]
pawnbox has joined #ruby
<eelster>
StoneCypher: Are you using an ORM?
<eelster>
But on the whole, nil is the most logical for NULL.
<StoneCypher>
i'm using the aws kinesis firehose api, which sends json encoded as a string
Ropeney has joined #ruby
<StoneCypher>
i'm just trying to support the principle of least surprise downstream
<StoneCypher>
and i'm not a ruby programmer, so that's ... hard :D
<eelster>
StoneCypher: Are you trying to parse the json in ruby?
<StoneCypher>
no. other direction. push only.
<StoneCypher>
i am sending json to them to be stored
<eelster>
And you're reading from a database?
<StoneCypher>
no. the database is where it's being stored. think logger.
<StoneCypher>
this is outbound from ruby, not inbound.
<eelster>
Where are you using SQL then?
<eelster>
If you are sending a json
<eelster>
And not reading from a database, how are you using SQL?
<StoneCypher>
aws uses json as a weird interface to redshift, which is sql.
<StoneCypher>
column names are json keys.
<StoneCypher>
it's super gross.
govg has joined #ruby
sebastiansier has quit [Remote host closed the connection]
<eelster>
But you're not directly interacting with SQL?
<SeepingN>
totally safe and secure!
<StoneCypher>
nope.
<StoneCypher>
SeepingN: they're bound parameters. it's good enough
last_staff has quit [Quit: last_staff]
sebastiansier has joined #ruby
_sfiguser has quit [Ping timeout: 260 seconds]
<eelster>
Ruby's so called "none style" type is nil
<bougyman>
there is no nil/null in json, right?
<bougyman>
you just don't supply that key.
pawnbox has quit [Ping timeout: 240 seconds]
<StoneCypher>
there is null. what there isn't is undefined.
<StoneCypher>
that is, the js keyword `undefined` is not expressable.
<StoneCypher>
null and undefined are distinct in js.
<eelster>
StoneCypher: You can use JSON which is in the stdlib in ruby and just use #to_json on a hash and it automatically turns it into a JSON string