<ruby-lang968>
so, in this I seem to be having a syntax error; i took the code from "Well-Grounded Rubyist"...not sure if it has to do with my using a newer version of Ruby
<ruby-lang968>
the || = []
<ruby-lang968>
it's seen as an error, but it's the same syntax from the book
<daturkel>
get rid of the space between || and =
<ruby-lang968>
awesome...so simple
tylersmith has quit [Remote host closed the connection]
<daturkel>
i would've figured both would work, but yeah ||= is apparently the way to do it
<ruby-lang968>
interesting...well thanks so much for the help...now I have to go, but you were extremely helpful
<daturkel>
of course, good luck
ruby-lang968 has quit [Quit: Page closed]
tkuchiki has quit [Remote host closed the connection]
daturkel has quit [Ping timeout: 245 seconds]
vlad_starkov has joined #ruby-lang
jsutt_ has quit [Ping timeout: 240 seconds]
yubrew has joined #ruby-lang
nathanstitt has quit [Quit: I growing sleepy]
MartynKeigher has quit [Quit: Bye for now!]
vlad_starkov has quit [Ping timeout: 240 seconds]
yubrew has quit [Ping timeout: 240 seconds]
jsutt has joined #ruby-lang
MartynKeigher has joined #ruby-lang
dorei has quit []
mistym has quit [Remote host closed the connection]
mr-foobar has joined #ruby-lang
benanne has quit [Quit: kbai]
toastynerd has joined #ruby-lang
woollyams has quit [Read error: Connection reset by peer]
woollyams has joined #ruby-lang
toastynerd has quit [Remote host closed the connection]
mehlah has quit [Quit: Leaving...]
MartynKeigher has quit [Ping timeout: 246 seconds]
amsi has quit [Quit: Leaving]
khaase has quit [Remote host closed the connection]
dingus_khan has joined #ruby-lang
kitak has joined #ruby-lang
Coincidental has quit [Remote host closed the connection]
<ledestin>
I'm reading some erb code and there's no indentation, even after ifs. horrible
<centrx>
:(
lsegal has joined #ruby-lang
fezziwig has joined #ruby-lang
charliesome has joined #ruby-lang
dingus_khan has quit [Ping timeout: 240 seconds]
sdouglas has quit [Remote host closed the connection]
fezziwig has quit [Read error: Connection reset by peer]
sdouglas_ has joined #ruby-lang
|jemc| has joined #ruby-lang
insidious has joined #ruby-lang
amclain has joined #ruby-lang
<wallerdev>
if you indent after an if, then the html gets indented randomly :(
devgiant_ has quit [Quit: Leaving]
MartynKeigher has joined #ruby-lang
yubrew has joined #ruby-lang
Fushi has quit [Quit: Connection closed for inactivity]
mistym has joined #ruby-lang
yubrew has quit [Ping timeout: 265 seconds]
RobertBirnie has quit [Ping timeout: 240 seconds]
seanlinsley has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
postmodern has quit [Quit: Leaving]
knu has quit [Ping timeout: 264 seconds]
sdouglas has joined #ruby-lang
sdouglas_ has quit [Read error: Connection reset by peer]
saarinen has quit [Quit: saarinen]
Cakey has joined #ruby-lang
fezziwig has joined #ruby-lang
tylersmith has joined #ruby-lang
khaase has joined #ruby-lang
khaase has quit [Changing host]
khaase has joined #ruby-lang
toastynerd has joined #ruby-lang
Coincidental has joined #ruby-lang
khaase has quit [Ping timeout: 246 seconds]
matp has quit [Ping timeout: 255 seconds]
mistym_ has joined #ruby-lang
mistym has quit [Ping timeout: 265 seconds]
toastynerd has quit [Remote host closed the connection]
wallerdev has joined #ruby-lang
fezziwig has quit [Read error: Connection reset by peer]
yubrew has joined #ruby-lang
marcdel has joined #ruby-lang
yubrew has quit [Ping timeout: 240 seconds]
toastynerd has joined #ruby-lang
miqui has quit [Remote host closed the connection]
RobertBirnie has joined #ruby-lang
jgpawletko_ has joined #ruby-lang
jgpawletko has quit [Ping timeout: 240 seconds]
jgpawletko_ is now known as jgpawletko
postmodern has joined #ruby-lang
yfeldblu_ has quit [Ping timeout: 240 seconds]
fezziwig has joined #ruby-lang
yfeldblum has joined #ruby-lang
tectonic has joined #ruby-lang
Coincidental has quit [Remote host closed the connection]
jmeeuwen has quit [Quit: Disconnecting from stoned server.]
jmeeuwen has joined #ruby-lang
xcesariox has joined #ruby-lang
nathanstitt has joined #ruby-lang
saarinen has joined #ruby-lang
Who has joined #ruby-lang
Who has quit [Client Quit]
dgaffney has joined #ruby-lang
Johz has quit [Quit: Leaving]
sdouglas has quit [Remote host closed the connection]
sdouglas has joined #ruby-lang
mistym_ has quit [Remote host closed the connection]
khaase has joined #ruby-lang
matp has joined #ruby-lang
stardiviner has joined #ruby-lang
sdouglas has quit [Ping timeout: 265 seconds]
marcdel has quit []
alexju has joined #ruby-lang
khaase has quit [Ping timeout: 246 seconds]
kitak_ has joined #ruby-lang
sdouglas has joined #ruby-lang
kitak has quit [Ping timeout: 260 seconds]
Lewix has joined #ruby-lang
rbondev has joined #ruby-lang
dgaffney has quit [Remote host closed the connection]
yubrew has joined #ruby-lang
rbondev has quit [Client Quit]
dgaffney has joined #ruby-lang
lysw123 has joined #ruby-lang
alexju has quit [Remote host closed the connection]
kiwnix has quit [Ping timeout: 264 seconds]
fezziwig has quit [Remote host closed the connection]
dgaffney has quit [Ping timeout: 240 seconds]
yubrew has quit [Ping timeout: 265 seconds]
rbondev has joined #ruby-lang
woollyams has quit [Ping timeout: 252 seconds]
lysw123 has quit [Remote host closed the connection]
chouhoulis has quit [Remote host closed the connection]
tonni has quit [Remote host closed the connection]
GaelanAintAround has quit [Ping timeout: 264 seconds]
zz_dlu has quit [Ping timeout: 246 seconds]
yfeldblum has joined #ruby-lang
GaelanAintAround has joined #ruby-lang
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
zz_dlu has joined #ruby-lang
x0f has joined #ruby-lang
yfeldblu_ has quit [Ping timeout: 264 seconds]
charliesome has joined #ruby-lang
kiddorails has quit [Ping timeout: 265 seconds]
x0f_ has quit [Ping timeout: 255 seconds]
havenwood has quit [Remote host closed the connection]
havenwood has joined #ruby-lang
sdouglas has quit [Remote host closed the connection]
sdouglas has joined #ruby-lang
skade has joined #ruby-lang
havenwood has quit [Ping timeout: 240 seconds]
Joel_ has joined #ruby-lang
sdouglas has quit [Ping timeout: 265 seconds]
Joel_ is now known as karamazov
toastynerd has quit [Remote host closed the connection]
mr-foobar has quit [Read error: Connection timed out]
yfeldblum has quit [Remote host closed the connection]
toastynerd has joined #ruby-lang
toastynerd has quit [Read error: Connection reset by peer]
yfeldblum has joined #ruby-lang
khaase has joined #ruby-lang
khaase has joined #ruby-lang
khaase has quit [Changing host]
yubrew has joined #ruby-lang
diegoviola has joined #ruby-lang
tdy has joined #ruby-lang
mr-foobar has joined #ruby-lang
apeiros has quit []
karamazov has quit []
karamazov424 has joined #ruby-lang
karamazov424 has quit [Client Quit]
karamazov424 has joined #ruby-lang
karamazov424 is now known as karamazov
tonni has joined #ruby-lang
khaase has quit [Ping timeout: 246 seconds]
knu has joined #ruby-lang
kiddorails has joined #ruby-lang
yubrew has quit [Ping timeout: 240 seconds]
karamazov has quit [Client Quit]
karamazov has joined #ruby-lang
Cakey has quit [Ping timeout: 240 seconds]
toastynerd has joined #ruby-lang
pabs_ has quit [Ping timeout: 255 seconds]
pabs_ has joined #ruby-lang
karamazov has quit []
Mon_Ouie has quit [Ping timeout: 264 seconds]
mistym has quit [Remote host closed the connection]
|jemc| has quit [Ping timeout: 265 seconds]
lsegal has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
havenwood has joined #ruby-lang
toastynerd has quit [Remote host closed the connection]
toastynerd has joined #ruby-lang
sdouglas has joined #ruby-lang
ledestin has joined #ruby-lang
kiddorails has quit [Ping timeout: 240 seconds]
Lewix has quit [Remote host closed the connection]
rh1n0 has joined #ruby-lang
havenwood has quit [Ping timeout: 265 seconds]
solars has joined #ruby-lang
sdouglas has quit [Ping timeout: 265 seconds]
ruby-lang479 has joined #ruby-lang
havenwood has joined #ruby-lang
tylersmith has quit [Remote host closed the connection]
knu has quit [Ping timeout: 240 seconds]
tylersmith has joined #ruby-lang
arBmind has joined #ruby-lang
<badeball>
wallerdev: nobody reads the html of a webpage anyway, so why bother making it look pretty?
<badeball>
I'd much rather have clean views than clean output
<wallerdev>
lol
<yxhuvvd>
I'd prefer having both.
<wallerdev>
i said that like 12 hours ago
<yxhuvvd>
There should be no problem reformatting html output, at least in dev mode.
ruby-lang479 has quit [Ping timeout: 245 seconds]
<wallerdev>
anyway idk, i think its just something you get used to if you do it that way
jstemmer has quit [Quit: leaving]
<wallerdev>
not a big deal to me either way
<badeball>
yxhuvvd: of course not. by post-processing it, you can make it look perfect without doing anything to the views and that's a obviously much better than changing view-code to affect output.
tylersmith has quit [Ping timeout: 265 seconds]
diegoviola has quit [Remote host closed the connection]
havenwood has quit [Read error: Connection reset by peer]
dagobah has joined #ruby-lang
havenwood has joined #ruby-lang
kiddorails has joined #ruby-lang
<badeball>
wallerdev: is there like a statute of limitations to when someone can respond? :p
<wallerdev>
kinda :p
<wallerdev>
dont even have my chat logs from then
alexju has quit [Remote host closed the connection]
tbuehlmann has joined #ruby-lang
woollyams has quit [Ping timeout: 252 seconds]
diegoviola has joined #ruby-lang
yfeldblum has quit [Remote host closed the connection]
michd is now known as MichD
yfeldblum has joined #ruby-lang
karamazov has joined #ruby-lang
jstemmer has joined #ruby-lang
havenwood has quit [Remote host closed the connection]
havenwood has joined #ruby-lang
kitak has quit [Remote host closed the connection]
yubrew has joined #ruby-lang
havenwood has quit [Ping timeout: 264 seconds]
sepp2k has quit [Quit: Leaving.]
sepp2k has joined #ruby-lang
kitak has joined #ruby-lang
saarinen has quit [Quit: saarinen]
yubrew has quit [Ping timeout: 265 seconds]
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
khaase has joined #ruby-lang
Cakey has joined #ruby-lang
Jeticus has joined #ruby-lang
CaptainJet has quit [Ping timeout: 246 seconds]
khaase has quit [Ping timeout: 246 seconds]
Cakey has quit [Ping timeout: 240 seconds]
rh1n0 has quit [Quit: im out!]
apeiros has joined #ruby-lang
arBmind has quit [Quit: Leaving.]
apeiros has quit [Remote host closed the connection]
michaeldeol has quit [Ping timeout: 264 seconds]
karamazov has quit [Remote host closed the connection]
Cakey has joined #ruby-lang
apeiros has joined #ruby-lang
stef_204 has joined #ruby-lang
skade has quit [Quit: Computer has gone to sleep.]
marcdel has quit []
tonni has quit [Remote host closed the connection]
sepp2k has quit [Read error: Connection reset by peer]
robbyoconnor has joined #ruby-lang
mehlah has joined #ruby-lang
postmodern has quit [Quit: Leaving]
havenwood has joined #ruby-lang
<yorickpeterse>
morning
<threeifbywhiskey>
Is there a way to get ahold of self without typing "self"?
arBmind has joined #ruby-lang
khaase has joined #ruby-lang
relix has joined #ruby-lang
<yorickpeterse>
no
<threeifbywhiskey>
yorickpeterse: You're certain?
havenwood has quit [Remote host closed the connection]
phansch has joined #ruby-lang
<yorickpeterse>
Pretty certain, yes
<threeifbywhiskey>
Bummer.
<threeifbywhiskey>
There's a way to do everything else in Ruby without using any alphanumerics except acquire self.
<threeifbywhiskey>
I'm writing a Sinatra app that doesn't use any numbers or letters. ^_^
<threeifbywhiskey>
It takes your input message and spits back a non-alphanumeric program that prints your message.
<threeifbywhiskey>
Fun fun.
<yorickpeterse>
wat
<threeifbywhiskey>
Srsly.
<yorickpeterse>
look at almost-sinatra or w/e it was called
<threeifbywhiskey>
I've already done FizzBuzz and a brainfuck interpreter without alphanumerics; I figured I'd try to move onto an app with almost some use.
<yorickpeterse>
it does a similar crazy thing
<threeifbywhiskey>
Yes, it does.
<threeifbywhiskey>
We can even require without alphanumerics, though, so it's all good.
<threeifbywhiskey>
I don't think finding a way to use require is cheating, but maybe it is.
relix_ has joined #ruby-lang
atmosx has joined #ruby-lang
relix has quit [Ping timeout: 265 seconds]
havenwood has joined #ruby-lang
relix has joined #ruby-lang
yubrew has joined #ruby-lang
relix_ has quit [Read error: Connection reset by peer]
wallerdev has quit [Quit: wallerdev]
yubrew has quit [Ping timeout: 264 seconds]
Jeticus has quit []
karamazov has joined #ruby-lang
havenwood has quit [Remote host closed the connection]
<threeifbywhiskey>
I made it &fn instead of just fn so that I could do things like REDUCE[[1, 2, 3], &:+], but now it feels like a regrettable "design decision".
bin7me has joined #ruby-lang
<badeball>
threeifbywhiskey: that's because they are actually calling a method when using it.
<threeifbywhiskey>
Right, that makes sense.
<badeball>
threeifbywhiskey: your use of it IS a syntax error because it IS a syntax error.
<threeifbywhiskey>
Wow, such QED.
<threeifbywhiskey>
You're saying that it's fine to use &-> outside of... arrays?
<threeifbywhiskey>
Why would that be the case?
<badeball>
I would have guessed that the interpreter saying syntax error would have made that clear
<threeifbywhiskey>
The only thing an array can't hold in Ruby is a to_proc'd lambda?
<threeifbywhiskey>
Seems like a mistake somewhere deep in the caves of Ruby.
Thanatermesis has joined #ruby-lang
<badeball>
threeifbywhiskey: an array can hold everything. you just seem to not have grasped what & actually does.
<badeball>
scroll down to "&object is evaluated in the following way:"
<workmad3>
threeifbywhiskey: & (as to_proc) is only applicable in parameter lists (either calling or defining a method) for passing 'argument.to_proc' as the block parameter
<threeifbywhiskey>
I was under the assumption mine was doing #2.
diegoviola has quit [Quit: WeeChat 0.4.3]
elia has joined #ruby-lang
<threeifbywhiskey>
My otherwise non-alphanumeric web app is going to have "send" and "self" smeared everywhere. :(
<threeifbywhiskey>
That makes me very 0x5adface.
knu has joined #ruby-lang
<cout>
sounds like what you really want is perl
<threeifbywhiskey>
Perl can't do it.
<threeifbywhiskey>
You have to use /e to force the evaluation of a regex replacement, I think.
<cout>
use more sigils
<threeifbywhiskey>
perldoc perlvar is a nasty place.
mr-foobar has quit [Remote host closed the connection]
mr-foobar has joined #ruby-lang
yfeldblum has quit [Ping timeout: 265 seconds]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
yubrew has quit [Ping timeout: 264 seconds]
mr-foobar has quit [Ping timeout: 265 seconds]
charliesome has joined #ruby-lang
bin7me has quit [Ping timeout: 240 seconds]
crazysim has quit [Excess Flood]
bin7me has joined #ruby-lang
crazysim has joined #ruby-lang
jsrn has joined #ruby-lang
<maloik>
Asking the same here as in the gitlab channel, perhaps someone knows...
<maloik>
Does anyone know of a way to turn on eager loading on our test env for gitlab CI without doing so for test runs on our dev machines ?
<maloik>
additional environment is a bit of a pain so we prefer to do it another way
jxie has quit [Ping timeout: 240 seconds]
<maloik>
there might be a non-gitlab-specific solution here
kitak has quit [Remote host closed the connection]
schlubbi has joined #ruby-lang
jxie has joined #ruby-lang
<workmad3>
maloik: can you set environment variables for the runs on gitlab CI?
kitak has joined #ruby-lang
<maloik>
yea we can figure that out
<workmad3>
maloik: then use the presence of environment variable, eg 'GITLAB_CI' in your test.rb env file to do something like 'config.eager_load = ENV['GITLAB_CI'] ? true : false'
<maloik>
oooh, like that
<workmad3>
maloik: or you could use something more specific, e.g. EAGER_LOAD_IN_TEST
<maloik>
that's clever, thanks
woollyams has quit [Ping timeout: 252 seconds]
<workmad3>
maloik: then you have something explanatory so it makes sense if you want to run it locally with that on too :)
woollyams has quit [Read error: Connection reset by peer]
khaase_ has quit [Ping timeout: 264 seconds]
drx_ has quit [Read error: Connection reset by peer]
woollyams has joined #ruby-lang
drx_ has joined #ruby-lang
mr-foobar has joined #ruby-lang
drx_ has quit [Read error: Connection reset by peer]
drx_ has joined #ruby-lang
ecnalyr has joined #ruby-lang
mr-foobar has quit [Client Quit]
khaase has joined #ruby-lang
khaase has quit [Changing host]
khaase has joined #ruby-lang
drx___ has joined #ruby-lang
vmatiyko has joined #ruby-lang
drx_ has quit [Ping timeout: 264 seconds]
drx___ has quit [Read error: Connection reset by peer]
drx_ has joined #ruby-lang
Atw has quit [Ping timeout: 264 seconds]
drx_ has quit [Read error: Connection reset by peer]
drx_ has joined #ruby-lang
rofel has joined #ruby-lang
_elia has joined #ruby-lang
drx___ has joined #ruby-lang
elia has quit [Ping timeout: 264 seconds]
drx___ has quit [Read error: Connection reset by peer]
mr-foobar has joined #ruby-lang
drx_ has quit [Ping timeout: 265 seconds]
amerine has quit [Ping timeout: 246 seconds]
woollyams has quit [Ping timeout: 252 seconds]
hhatch has joined #ruby-lang
amerine has joined #ruby-lang
yfeldblum has joined #ruby-lang
drx_ has joined #ruby-lang
Speed has joined #ruby-lang
drx_ has quit [Read error: Connection reset by peer]
drx_ has joined #ruby-lang
yfeldblum has quit [Ping timeout: 240 seconds]
drx___ has joined #ruby-lang
drx_ has quit [Ping timeout: 264 seconds]
drx_ has joined #ruby-lang
drx___ has quit [Read error: Connection reset by peer]
enkristoffer has joined #ruby-lang
enkristoffer has quit [Client Quit]
vlad_starkov has quit [Remote host closed the connection]
lhz has joined #ruby-lang
drx_ has quit [Ping timeout: 264 seconds]
benlovell has quit [Ping timeout: 264 seconds]
vlad_starkov has joined #ruby-lang
<yorickpeterse>
always nice to have an MRI process peak at 2.3 GB of RAM
<yorickpeterse>
and with a heap of 1.10 GB
<yorickpeterse>
much memory
<yorickpeterse>
wow
<yorickpeterse>
very efficient
<yorickpeterse>
original joke
drx_ has joined #ruby-lang
drx_ has quit [Read error: Connection reset by peer]
drx_ has joined #ruby-lang
karamazov has quit []
drx_ has quit [Read error: Connection reset by peer]
seanlinsley has quit [Ping timeout: 240 seconds]
seanlinsley has joined #ruby-lang
yubrew has joined #ruby-lang
rue|w has quit [Ping timeout: 264 seconds]
joonty has quit [Quit: WeeChat 0.4.2]
joonty has joined #ruby-lang
canton7-mac has joined #ruby-lang
yubrew has quit [Ping timeout: 240 seconds]
caral has quit [Quit: caral]
drx_ has joined #ruby-lang
drx_ has quit [Read error: Connection reset by peer]
francisfish has quit [Remote host closed the connection]
drx_ has joined #ruby-lang
drx_ has quit [Read error: Connection reset by peer]
francisfish has joined #ruby-lang
drx_ has joined #ruby-lang
drx_ has quit [Read error: Connection reset by peer]
drx_ has joined #ruby-lang
drx_ has quit [Read error: Connection reset by peer]
benlovell has joined #ruby-lang
goatish_mound is now known as rsl
rue|w has joined #ruby-lang
khaase has quit [Remote host closed the connection]
khaase has joined #ruby-lang
rofel has quit [Remote host closed the connection]
khaase has quit [Ping timeout: 240 seconds]
Cakey has joined #ruby-lang
jxie has quit [Ping timeout: 265 seconds]
DEac- has joined #ruby-lang
yalue has joined #ruby-lang
jxie has joined #ruby-lang
DEac-_ has quit [Read error: Connection reset by peer]
yubrew has joined #ruby-lang
brettchalupa has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
skade has quit [Quit: Computer has gone to sleep.]
bin8me has joined #ruby-lang
diegoviola has joined #ruby-lang
yubrew has quit [Ping timeout: 240 seconds]
bin7me has quit [Ping timeout: 265 seconds]
robmiller has quit [Quit: Leaving.]
_elia has quit [Quit: Computer has gone to sleep.]
kiddorails has joined #ruby-lang
brettchalupa has left #ruby-lang ["Leaving"]
anannie has quit [Ping timeout: 264 seconds]
mehlah has joined #ruby-lang
vlad_starkov has joined #ruby-lang
cbreeze has joined #ruby-lang
kiwnix has joined #ruby-lang
Mon_Ouie has joined #ruby-lang
Mon_Ouie has joined #ruby-lang
robbyoconnor has quit [Ping timeout: 264 seconds]
benlovell has quit [Ping timeout: 265 seconds]
robmiller has joined #ruby-lang
require has joined #ruby-lang
diegoviola has quit [Quit: WeeChat 0.4.3]
gix has joined #ruby-lang
workmad3 is now known as wm3|lunch
Niflheimr has joined #ruby-lang
require has quit [Ping timeout: 245 seconds]
<Niflheimr>
Hi there
kiwnix has quit [Ping timeout: 240 seconds]
kiwnix has joined #ruby-lang
anannie has joined #ruby-lang
mehlah has quit [Quit: Leaving...]
<Niflheimr>
I wondered, what does this kind of code (http://pastie.org/8953296) raises an error ( undefined local variable ). Is that kind of a scope problem ?
francisfish has quit [Remote host closed the connection]
<Niflheimr>
And yes, I'm new to Ruby, just trying to understand some things :)
<canton7>
if eval-ing a bit of code could change your local variables, that would be a huge security hole
<canton7>
(PHP did this btw - register_globals. big mistake)
<canton7>
also if you're just starting, keep clear of eval. it's very rarely needed, and can get you into some very bad habits
<Mon_Ouie>
Well no more than eval'ing strings in general. It does that because variables are scoped statically, before the code is run.
<Mon_Ouie>
(And also, Kernel#eval run in its own subscope so you lose it every time)
Niflheimr has quit [Ping timeout: 245 seconds]
|stef_204| has joined #ruby-lang
<apeiros>
canton7: changing is actually possible, only creation is not possible
<apeiros>
creating a local variable dynamically is nonsensical anyway (except for templates, but it's not a nice thing there either IMO)
elia has joined #ruby-lang
stef_204 has quit [Ping timeout: 265 seconds]
yfeldblum has joined #ruby-lang
yfeldblum has quit [Ping timeout: 240 seconds]
khaase has joined #ruby-lang
khaase has quit [Changing host]
khaase has joined #ruby-lang
cbreeze has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
skade has joined #ruby-lang
yubrew has joined #ruby-lang
benlovell has joined #ruby-lang
yubrew has quit [Ping timeout: 240 seconds]
francisfish has joined #ruby-lang
cnivolle_ has joined #ruby-lang
kiwnix has quit [Ping timeout: 240 seconds]
kiwnix has joined #ruby-lang
schlubbi has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
cnivolle has quit [Ping timeout: 264 seconds]
dik_dak has joined #ruby-lang
kiwnix has quit [Quit: Leaving]
bradcliffe has joined #ruby-lang
[spoiler] has joined #ruby-lang
cnivolle_ has quit [Remote host closed the connection]
cnivolle has joined #ruby-lang
Cakey has quit [Ping timeout: 240 seconds]
AncientAmateur has joined #ruby-lang
diegoviola has joined #ruby-lang
alexju has joined #ruby-lang
francisfish has quit [Remote host closed the connection]
rondale_1c has quit [Remote host closed the connection]
francisfish has joined #ruby-lang
Cakey has joined #ruby-lang
skammer has joined #ruby-lang
enebo has joined #ruby-lang
jgpawletko has quit [Quit: jgpawletko]
jgpawletko has joined #ruby-lang
lupine has quit [Ping timeout: 255 seconds]
Thanatermesis has quit [Ping timeout: 240 seconds]
<threeifbywhiskey>
There's my 100% non-alphanumeric brainfuck interpreter, for what it's worth.
<threeifbywhiskey>
The Sinatra app is 99.27% non-alphanumeric.
<oddmunds>
hah
dwknoxy has joined #ruby-lang
<threeifbywhiskey>
Also, what the app does is take a message and generate a program that prints that message without using any alphanumerics: https://pwnbs.herokuapp.com/
<whitequark>
seems to parse moderately correctly
<threeifbywhiskey>
whitequark: Impressive.
<whitequark>
my parser parses it properly too
<threeifbywhiskey>
I mean, I figured as much.
<threeifbywhiskey>
I did run into a really weird issue where instance variables kept becoming nil, though.
yubrew has joined #ruby-lang
* whitequark
shrugs
<whitequark>
that code isn't particularly tricky
mykoweb has joined #ruby-lang
yfeldblum has joined #ruby-lang
<whitequark>
only bad part is posslble confusion with heredocs with all those <<s
<threeifbywhiskey>
Hm.
<threeifbywhiskey>
Could you point me to trickier code?
<whitequark>
uh. there was some insane gem which caused parser to choke a dozen of times
<threeifbywhiskey>
Which one was it?
<whitequark>
trying to find it.
<threeifbywhiskey>
Thank you.
Thanatermesis has joined #ruby-lang
yubrew has quit [Ping timeout: 240 seconds]
mykoweb has quit [Remote host closed the connection]
<threeifbywhiskey>
I don't know where I pulled that 115 from.
jtperreault has quit [Quit: WeeChat 0.3.7]
lele|w is now known as lele
lele is now known as lele|w
AncientAmateur has joined #ruby-lang
joonty has quit [Quit: WeeChat 0.3.8]
jtperreault has joined #ruby-lang
robbyoconnor has joined #ruby-lang
tonni has joined #ruby-lang
bradcliffe has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
apeiros has joined #ruby-lang
Pupeno has quit [Ping timeout: 240 seconds]
Cakey has quit [Ping timeout: 252 seconds]
vlad_starkov has joined #ruby-lang
loincloth has quit [Remote host closed the connection]
apeiros has quit [Ping timeout: 264 seconds]
melter has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 245 seconds]
mikecmpbll has quit [Ping timeout: 264 seconds]
benlovell has quit [Read error: Operation timed out]
yfeldblum has joined #ruby-lang
sdouglas has quit [Remote host closed the connection]
threeifbywhiskey has left #ruby-lang [#ruby-lang]
elia has quit [Quit: Computer has gone to sleep.]
vpretzel has quit [Remote host closed the connection]
vpretzel has joined #ruby-lang
sdouglas has joined #ruby-lang
__butch__ has quit [Quit: Leaving.]
Pupeno has joined #ruby-lang
bahar has quit [Ping timeout: 240 seconds]
centrx has joined #ruby-lang
|jemc| has quit [Ping timeout: 240 seconds]
khaase has quit [Remote host closed the connection]
khaase has joined #ruby-lang
Squarepy has joined #ruby-lang
francisfish has quit [Remote host closed the connection]
canton7-mac has quit [Remote host closed the connection]
toastynerd has quit [Remote host closed the connection]
cnivolle has quit [Remote host closed the connection]
Asher has quit [Quit: Leaving.]
Asher has joined #ruby-lang
cnivolle_ has joined #ruby-lang
|jemc| has joined #ruby-lang
khaase has quit [Read error: Operation timed out]
toastynerd has joined #ruby-lang
cnivolle_ has quit [Ping timeout: 246 seconds]
jhass|off is now known as jhass
francisfish has joined #ruby-lang
enebo has joined #ruby-lang
vmatiyko has quit [Ping timeout: 240 seconds]
yfeldblu_ has joined #ruby-lang
Pupeno has quit [Remote host closed the connection]
loincloth has joined #ruby-lang
yfeldblu_ has quit [Read error: Connection reset by peer]
yfeldblu_ has joined #ruby-lang
yfeldblum has quit [Ping timeout: 265 seconds]
vpretzel_ has joined #ruby-lang
mr-foobar has quit []
mikecmpbll has joined #ruby-lang
rofel has quit [Remote host closed the connection]
chouhoulis has quit [Ping timeout: 240 seconds]
vpretzel has quit [Ping timeout: 240 seconds]
vpretzel_ is now known as vpretzel
mr-foobar has joined #ruby-lang
apeiros has joined #ruby-lang
vmatiyko has joined #ruby-lang
bahar has joined #ruby-lang
chouhoulis has joined #ruby-lang
Pupeno has joined #ruby-lang
Coincidental has joined #ruby-lang
jsutt has quit [Ping timeout: 240 seconds]
johnpclaus has joined #ruby-lang
<ljarvis>
rails q, anyone know how can I have a get "foo/:xxx" => "foo#xxx" (that is, i dont want to specify the action, i just want it to use the value of xxx)
toastynerd has quit [Remote host closed the connection]
yubrew has quit [Remote host closed the connection]
vsorlov has joined #ruby-lang
robbyoconnor has quit [Ping timeout: 246 seconds]
<ljarvis>
dude.
<ljarvis>
also nvm figured it out
bin7me has joined #ruby-lang
apeiros has quit [Ping timeout: 240 seconds]
bcardarella__ is now known as bcardarella
jsullivandigs has quit [Remote host closed the connection]
havenn is now known as havenwood
skade has quit [Quit: Computer has gone to sleep.]
symm- has joined #ruby-lang
dorei has joined #ruby-lang
bzalasky has joined #ruby-lang
CaptainJet has joined #ruby-lang
rofel has joined #ruby-lang
sepp2k1 has joined #ruby-lang
mbj has quit [Ping timeout: 265 seconds]
toastynerd has joined #ruby-lang
sepp2k has quit [Ping timeout: 240 seconds]
dingus_khan has joined #ruby-lang
breakingthings has quit [Ping timeout: 252 seconds]
<yorickpeterse>
ljarvis: no, and mapping that directly would be a security risk as well
<yorickpeterse>
GET /foo/freeze
<yorickpeterse>
lawl your controller is now frozen
breakingthings has joined #ruby-lang
<yorickpeterse>
or perhaps
<yorickpeterse>
GET /foo/eval/User.delete_all or something like that
caral has joined #ruby-lang
jsilver-ipod has joined #ruby-lang
r0bby has joined #ruby-lang
r0bby has quit [Changing host]
r0bby has joined #ruby-lang
toastynerd has quit [Remote host closed the connection]
apeiros has joined #ruby-lang
bradcliffe has joined #ruby-lang
agrinb has joined #ruby-lang
[spoiler] has quit [Quit: Leaving]
[spoiler] has joined #ruby-lang
kitopastorino has joined #ruby-lang
<agrinb>
Looking to speed up my learning process. For me that means getting some timely feedback. So I'm looking for a mentor and willing to pay. Please message me if you're interested and we can discuss.
Speed has left #ruby-lang ["WeeChat 0.4.3"]
mehlah has quit [Quit: Leaving...]
d4rkr4i has joined #ruby-lang
<centrx>
Interesting
<wallerdev>
wtf
<wallerdev>
jim weirich died?
r0bby is now known as robbyoconnor
<yorickpeterse>
wallerdev: a while ago yeah
yfeldblu_ has quit [Read error: Connection reset by peer]
<wallerdev>
that sucks, i remember him giving a presentation at a ruby conf in ann arbor
Fushi has quit [Quit: Connection closed for inactivity]
Gabri has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
Coincidental has quit [Remote host closed the connection]
ecnalyr has joined #ruby-lang
robmiller has quit [Quit: Leaving.]
jtperreault has quit [Quit: WeeChat 0.3.7]
Coincidental has joined #ruby-lang
ecnalyr has quit [Ping timeout: 240 seconds]
wallerdev has joined #ruby-lang
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
havenwood has quit [Remote host closed the connection]
dingus_khan has quit [Read error: Connection reset by peer]
havenwood has joined #ruby-lang
dingus_khan has joined #ruby-lang
postmodern has joined #ruby-lang
vpretzel has quit [Remote host closed the connection]
havenwood has quit [Ping timeout: 240 seconds]
vpretzel has joined #ruby-lang
saarinen has joined #ruby-lang
havenwood has joined #ruby-lang
jtperreault has joined #ruby-lang
retro|cz has quit [Ping timeout: 246 seconds]
toastynerd has quit [Remote host closed the connection]
mehlah has joined #ruby-lang
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
yubrew has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
yubrew has quit [Ping timeout: 245 seconds]
michaeldeol has joined #ruby-lang
bradcliffe has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
toastynerd has joined #ruby-lang
andrewhl has joined #ruby-lang
toastynerd has quit [Read error: Connection reset by peer]
toastynerd has joined #ruby-lang
Gabri has quit [Quit: Gone to sleep. ZZZzzz…]
symm- has quit [Read error: Connection reset by peer]
symm- has joined #ruby-lang
toastynerd has quit [Remote host closed the connection]
vlad_starkov has joined #ruby-lang
bradcliffe has joined #ruby-lang
cmaxw has joined #ruby-lang
Coincidental has quit [Remote host closed the connection]
vlad_starkov has quit [Ping timeout: 264 seconds]
toastynerd has joined #ruby-lang
bin7me has quit [Remote host closed the connection]
dknox_lunch is now known as dknox
dingus_khan has quit [Remote host closed the connection]
caral has quit [Quit: caral]
dstynchula has joined #ruby-lang
mbj has quit [Ping timeout: 245 seconds]
lele` is now known as lele
dstynchu_ has quit [Ping timeout: 264 seconds]
ledestin has quit [Quit: ledestin]
saarinen has quit [Quit: saarinen]
mr-foobar has quit [Remote host closed the connection]
apeiros has joined #ruby-lang
d4rkr4i has quit [Quit: Leaving.]
lele is now known as lele|z
lele|z is now known as lele
mbj has joined #ruby-lang
workmad3 has joined #ruby-lang
gix has quit [Ping timeout: 246 seconds]
dknox is now known as dknox_bbib
kitopastorino has quit [Remote host closed the connection]
wallerdev has joined #ruby-lang
Coincidental has joined #ruby-lang
saarinen has joined #ruby-lang
yubrew has joined #ruby-lang
gix has joined #ruby-lang
bradcliffe has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
[spoiler] has quit [Quit: Leaving]
yubrew has quit [Ping timeout: 240 seconds]
Coincidental has quit [Remote host closed the connection]
mr-foobar has joined #ruby-lang
dstynchula has quit [Remote host closed the connection]
fragamus has joined #ruby-lang
arBmind has quit [Quit: Leaving.]
<ljarvis>
yorickpeterse: huh? no that's not how it would work
<ljarvis>
it only uses public methods of the controller (those are actions), anything not in that set will not be executed
caral has joined #ruby-lang
bantic has joined #ruby-lang
<yorickpeterse>
you'll still want to whitelist the explicit method names
<ljarvis>
why?
<ljarvis>
that defeats the entire point
<yorickpeterse>
ljarvis: what if somebody by accident declares a method as public?
<yorickpeterse>
that is not intended to be called
fragamus has quit [Client Quit]
<yorickpeterse>
or includes some module with public methods
elia has joined #ruby-lang
<ljarvis>
im not talking about dev stupidity
<ljarvis>
what happens if they delete everything
<ljarvis>
herp derp
Speed has joined #ruby-lang
riffraff has quit [Quit: Leaving]
<yorickpeterse>
relying on method visibility as the only system in preventing users from calling arbitrary methods is asking for trouble
dstynchula has joined #ruby-lang
ledestin has joined #ruby-lang
<ljarvis>
yorickpeterse: I basically want an empty controller where i can just add views, i dont want to list every view i have, so this fallback works perfectly
<ljarvis>
1 controller, 0 actions, X views
relix has joined #ruby-lang
<yorickpeterse>
ljarvis: do this
_ht has quit [Remote host closed the connection]
<yorickpeterse>
class Foo < ActionController::Base; end; Foo.public_instance_methods
agarie has quit [Remote host closed the connection]
<yorickpeterse>
if you were to directly map URLs to methods you can now call all those methods from a URL
<ljarvis>
:/
\dev\sda1 has joined #ruby-lang
\dev\sda1 has left #ruby-lang [#ruby-lang]
<ljarvis>
i dont want methods, that's the point
agarie has joined #ruby-lang
<yorickpeterse>
oh right, you want to map it directly to a view?
<yorickpeterse>
In that case you can create a catch-all method that renders views based on some param
agarie has quit [Client Quit]
<ljarvis>
exactly, which i've now done, by using: `get 'foo/:action', controller: 'foo'`
<ljarvis>
nope, dont need that method
<ljarvis>
that's what I did to start
<ljarvis>
my problem was using render in a method would raise a 500 if the template didn't exist
<ljarvis>
rather than a 404 because it's not found
<ljarvis>
yagetmebrah
<yorickpeterse>
lol just catch the 500 and re-raise it as a 404 :P
<ljarvis>
that's exactly what i wanted to avoid ;)
cmaxw has quit [Ping timeout: 252 seconds]
<badeball>
ljarvis: match ':controller(/:action(/:id))(.:format)'
<ljarvis>
calm down rails 3
<badeball>
this makes all actions in every controller available via GET requests. if the controller does not contain the action, BUT the view, the view is served statically.
<ljarvis>
ya, i dont really want that (hence specifying a controller), also thought they removed that in 4
<ljarvis>
thanks though!
<badeball>
ljarvis: had you wanted rails 3 though, could you just have replaced ':controller' with 'your-controller'?
<ljarvis>
yep
hfp has joined #ruby-lang
hfp has left #ruby-lang [#ruby-lang]
benlovell has joined #ruby-lang
<badeball>
ljarvis: get ':controller(/:action(/:id))'
alexju has quit [Remote host closed the connection]
<ljarvis>
badeball: you saw above how i fixed it right?