<elomatreb>
b0mbnet: It's not getting overriden, the local variable just takes precendence. You can still call the method if you use parentheses
eightlimbed has joined #ruby
<b0mbnet>
but how do i know where this local variable takes precendence? which file and which line
<b0mbnet>
i have a problem with grape, grape defined attr_reader for params, but it gets ovveride by local variable, and result is nil, i want to debug this
<b0mbnet>
params() or self.params or send(params), it is wired
mim1k has quit [Ping timeout: 255 seconds]
<elomatreb>
All of those (provided you used a symbol for send) should call the method, not a local variable
Cohedrin has joined #ruby
<b0mbnet>
yes, i know, but how do i trace when a local variable is defined?
<PorcoRex>
b0mbnet, are you in search for where the local variable is defined, and not the method? I'm not sure that's possible, but I'd imagine that is one long method you're working with.
<elomatreb>
I think a debugger might be able to trace where a variable was defined, but I haven't had to do that ever
<b0mbnet>
yes, i have searched using ripgrep , but it is large result. i don't know where to start
<PorcoRex>
b0mbnet, local variables should be encapsulated by a method. Do you know what this method is?
jrafanie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<elomatreb>
No, that's just since eval.in doesn't have any gems
<PorcoRex>
What would be the actual error you're getting?
<stormbytes>
elomatreb let me look...
<b0mbnet>
params is nil
<b0mbnet>
but @params is ok
acemo has quit []
<elomatreb>
I think byebug (an actual debugger) may be able to do what you need, I don't know if it can trace variables directly but you can certainly step through your code until you see where it is defined
gothicsouth has joined #ruby
acemo has joined #ruby
gix has joined #ruby
<PorcoRex>
I hate to bring this again, but I'm not sure how this would work "desc 'create order' params do --- end post do --- end" without commas or anything.
<elomatreb>
PorcoRex: Remove one level of indentation from lines 5-15
<b0mbnet>
where this params local_variable is defined?
<elomatreb>
That's the weird thing, unless you're defining it in a scope above and before that it shouldn't bleed over from anywhere
<PorcoRex>
There is no local variable both "params", inside and outside are different methods. Not variables.
<elomatreb>
Then defined? would return "method" not "local-variable"
shinnya has joined #ruby
MrBusiness has quit [Read error: Connection reset by peer]
<PorcoRex>
elomatreb, but "method(:params).owner" returned Grape::Endpoint.
<PorcoRex>
Inside the block.
MrBusiness has joined #ruby
<elomatreb>
Yes, and they said it worked as intended when they explicitely called the method using self.params, params() or send
MrBusiness has quit [Read error: Connection reset by peer]
<PorcoRex>
Ok, I think I've missed something then. I thought the confusion was because the call to "params" from withing "post" wasn't the one expected.
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nicesignal has quit [Remote host closed the connection]
nicesignal has joined #ruby
mim1k has quit [Ping timeout: 240 seconds]
bkxd_ has joined #ruby
bkxd has quit [Ping timeout: 246 seconds]
_sfiguser has quit [Ping timeout: 260 seconds]
zacts has joined #ruby
sts has joined #ruby
sts is now known as Guest94393
Kug3lis has joined #ruby
blackmesa has joined #ruby
armyriad has quit [Ping timeout: 240 seconds]
nicesignal has quit [Ping timeout: 240 seconds]
armyriad has joined #ruby
nokepala has quit [Quit: Leaving.]
_sfiguser has joined #ruby
blackmesa has quit [Ping timeout: 255 seconds]
codehotter has joined #ruby
<codehotter>
I'm a little bit out of my depth here, but if someone has time... How different would Ruby's AST format be from Mozilla's AST format?
<codehotter>
What does a different AST format mean in general?
<codehotter>
Don't they have to fulfill mostly the same functions and so you'd expect them to look similar?
timvisher has quit [Remote host closed the connection]
bkxd_ has quit [Ping timeout: 240 seconds]
<Mon_Ouie>
I'm not sure what you mean by Mozilla's AST format. For JavaScript? JS and Ruby are two different languages, so the AST (Abstract Syntax Tree) used by each language needs to be able to represent that language's constructs
<Mon_Ouie>
e.g. Ruby has constructs for defining classes or calling a method with a block, which do not exist in JavaScript
blackwind_123 has quit [Ping timeout: 260 seconds]
jane_booty_doe has joined #ruby
blackwind_123 has joined #ruby
Miron has quit [Ping timeout: 245 seconds]
nicesignal has joined #ruby
niao has quit [Ping timeout: 240 seconds]
_whitelogger has joined #ruby
GodFather has quit [Ping timeout: 240 seconds]
railswebdev has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
DeeJayh_ has quit [Ping timeout: 260 seconds]
Mia has quit [Ping timeout: 260 seconds]
ski7777 has joined #ruby
BaroMeter has joined #ruby
GodFather has joined #ruby
ecuanaso has joined #ruby
nokepala has joined #ruby
nowhere_man has joined #ruby
apparition has joined #ruby
Kug3lis_off is now known as Kug3lis
da3d has joined #ruby
Mia has joined #ruby
Mia has joined #ruby
Mia has quit [Changing host]
daed has quit [Quit: leaving]
da3d is now known as daed
rc48 has joined #ruby
daed has quit [Changing host]
daed has joined #ruby
eregon_ has quit [Write error: Broken pipe]
eregon has joined #ruby
MarkBilk has quit [Ping timeout: 246 seconds]
cjhowe has joined #ruby
rc48 has quit [Read error: Connection reset by peer]
cjhowe has quit [Client Quit]
cjhowe has joined #ruby
cjhowe has quit [Client Quit]
cjhowe has joined #ruby
cjhowe has quit [Client Quit]
cjhowe has joined #ruby
cjhowe has quit [Client Quit]
cjhowe has joined #ruby
nullobject has quit [Quit: zzz]
jrafanie has joined #ruby
jrafanie has quit [Client Quit]
ur5us has quit [Remote host closed the connection]
cfec0b8d has joined #ruby
minimalism has quit [Quit: minimalism]
__Yiota has joined #ruby
_whitelogger has joined #ruby
MarkBilk has joined #ruby
otherj has joined #ruby
Yonk__ is now known as Yonk
matled has quit [Remote host closed the connection]
charliesome has joined #ruby
charliesome has quit [Client Quit]
otherj has quit [Client Quit]
danman has quit [Quit: danman]
ledestin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mostlybadfly has joined #ruby
matled has joined #ruby
jameser has joined #ruby
charliesome has joined #ruby
danman has joined #ruby
rgr has quit [Quit: rgr]
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rgr has joined #ruby
kleelk has joined #ruby
kleelk has left #ruby [#ruby]
jameser has joined #ruby
jameser has quit [Client Quit]
Miron has joined #ruby
im0nde has joined #ruby
BSaboia has joined #ruby
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
blackwind_123 has quit [Ping timeout: 240 seconds]
jameser has joined #ruby
jameser has quit [Client Quit]
jameser has joined #ruby
ytti has quit [Ping timeout: 260 seconds]
BaroMeter has quit [Quit: Leaving]
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
__Yiota has joined #ruby
r_rios has joined #ruby
railswebdev has joined #ruby
ytti has joined #ruby
houhoulis has joined #ruby
dionysus69 has joined #ruby
CacoS has quit [Read error: Connection reset by peer]
eightlimbed has joined #ruby
rfoust has quit [Read error: Connection reset by peer]
rfoust has joined #ruby
bernd27 has quit [Remote host closed the connection]
rfoust has quit [Read error: Connection reset by peer]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kith has joined #ruby
Kug3lis is now known as Kug3lis_off
DeeJayh_ has joined #ruby
eightlimbed has quit [Ping timeout: 240 seconds]
interki has joined #ruby
BSaboia has quit [Ping timeout: 258 seconds]
dionysus69 has quit [Ping timeout: 240 seconds]
dionysus69 has joined #ruby
BSaboia has joined #ruby
jgt has quit [Ping timeout: 268 seconds]
MarkBilk has quit [Ping timeout: 240 seconds]
gothicsouth has joined #ruby
nokepala has quit [Quit: Leaving.]
Kug3lis_off is now known as Kug3lis
ur5us has joined #ruby
MarkBilk has joined #ruby
interki has quit [Quit: Going offline, see ya! (www.adiirc.com)]
ur5us has quit [Ping timeout: 240 seconds]
KnownSyntax has quit [Ping timeout: 260 seconds]
Qchmqs__ has quit [Ping timeout: 240 seconds]
KnownSyntax has joined #ruby
KnownSyntax has joined #ruby
KnownSyntax has quit [Changing host]
jgnagy has quit [Remote host closed the connection]
jgnagy has joined #ruby
redaudit has joined #ruby
gothicsouth has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
shinnya has quit [Ping timeout: 268 seconds]
andrzejk_ has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
Xandaros has joined #ruby
Kug3lis is now known as Kug3lis_off
<Xandaros>
Hi! I'm currently trying to understand this ruby script and I encountered a line I don't understand. Maybe someone here can help me. (I can't share the entire script, unfortunately). Line in question:
<Xandaros>
I have never used ruby before, so most of that is very confusing to me
weathermaker has joined #ruby
cam27 has joined #ruby
quobo has quit [Quit: Connection closed for inactivity]
gothicsouth has joined #ruby
uZiel has joined #ruby
railswebdev has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Kug3lis_off is now known as Kug3lis
Kug3lis is now known as Kug3lis_off
Kug3lis_off is now known as Kug3lis
jane_booty_doe has quit [Quit: Leaving]
Fernando-Basso has quit [Quit: WeeChat 1.8]
blackmesa has joined #ruby
duderonomy has quit [Ping timeout: 260 seconds]
railswebdev has joined #ruby
rc48 has joined #ruby
tristanp has joined #ruby
rc48 has quit [Read error: Connection reset by peer]
r_rios has quit [Ping timeout: 272 seconds]
duderonomy has joined #ruby
im0nde has quit [Ping timeout: 246 seconds]
BSAlb has joined #ruby
BSaboia has quit [Disconnected by services]
BSAlb has quit [Read error: Connection reset by peer]
BSaboia has joined #ruby
tristanp has quit [Ping timeout: 246 seconds]
sepp2k has joined #ruby
duderonomy has quit [Ping timeout: 258 seconds]
apparition has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
weathermaker has quit [Ping timeout: 240 seconds]
duderonomy has joined #ruby
duderonomy has quit [Ping timeout: 268 seconds]
houhoulis has quit [Remote host closed the connection]
* apeiros
writes too clever code again
nokepala has joined #ruby
<apeiros>
lambda creating lambdas. it's fun, though. probably totally common in FP land.
<ineb>
Xandaros: calls a function named 'select' with 4 parameter. first parameter is an array with one entry. its only element is the global variable $my_socket. second parameter is nil, or null, nada. third parameter is identical to the first one and the last parameter is integer 1
<ineb>
whatever the function 'select' returns goes into the variable select_result
<ineb>
its crappy code btw :)
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<apeiros>
it is? I only see two bad things?
<apeiros>
Xandaros: note that `select` is most likely `Kernel#select` (can't tell without the surrounding code)
Mia has quit [Read error: Connection reset by peer]
eightlimbed has quit [Ping timeout: 268 seconds]
railswebdev has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
railswebdev has joined #ruby
__Yiota has joined #ruby
__Yiota has quit [Client Quit]
hanmac1 has joined #ruby
cdg has joined #ruby
hanmac has quit [Ping timeout: 258 seconds]
ahrs has quit [Remote host closed the connection]
cdg has quit [Remote host closed the connection]
cdg has joined #ruby
ionte has quit [Ping timeout: 260 seconds]
ahrs has joined #ruby
bmurt has joined #ruby
ionte has joined #ruby
chopin has quit [Remote host closed the connection]
chopin has joined #ruby
jwr has joined #ruby
<jwr>
I'm not planning on doing ruby development, but i want to use ruby software (eg. jekyll) and have all the gems for each project separate so that various projects don't conflict with each other. do i want bundler, rbenv, or something else?
chopin has quit [Ping timeout: 260 seconds]
<hanmac1>
jwr if you want gem (sets) for each of your projects, you probably want bundler
ecuanaso has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hndk has joined #ruby
hndk has quit [Client Quit]
tristanp has quit [Remote host closed the connection]
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ecuanaso has joined #ruby
rrios has joined #ruby
c0mrad3 has quit [Quit: Connection closed for inactivity]
r_rios has quit [Ping timeout: 260 seconds]
DoubleMalt has joined #ruby
Macrobiotic has quit [Quit: Connection closed for inactivity]
DoubleMalt has quit [Read error: Connection reset by peer]
eightlimbed has joined #ruby
DoubleMalt has joined #ruby
t-recx has joined #ruby
DoubleMalt has quit [Remote host closed the connection]
<jwr>
hanmacl: thanks. upon reading the docs, the `cd some_project ; bundle exec some_cmd` workflow looks like exactly what i want.
<jwr>
basically python virtualenvs, but for ruby
minimalism has joined #ruby
thnee has quit [Quit: WeeChat 1.6]
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
CacoS has quit [Quit: Leaving]
minimalism has quit [Quit: minimalism]
last_staff has joined #ruby
muelleme has quit [Ping timeout: 255 seconds]
minimalism has joined #ruby
uZiel has quit [Ping timeout: 240 seconds]
ecuanaso has joined #ruby
jwr has quit [Read error: Connection reset by peer]
jwr has joined #ruby
cdg has quit [Remote host closed the connection]
cdg has joined #ruby
ur5us has joined #ruby
gothicsouth has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
minimalism has quit [Remote host closed the connection]
minimalism has joined #ruby
ur5us has quit [Ping timeout: 258 seconds]
gothicsouth has joined #ruby
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gizmore|2 has quit [Remote host closed the connection]
railswebdev has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
zacts has quit [Ping timeout: 240 seconds]
<zenspider>
jwr: I use ohmygems for most things. much simpler (it just sets up GEM_HOME + PATH)