Nicmavr has quit [Read error: Connection reset by peer]
dinfuehr has quit [Ping timeout: 246 seconds]
dinfuehr has joined #ruby
Nicmavr has joined #ruby
arescorpio has joined #ruby
dinfuehr has quit [Ping timeout: 252 seconds]
druonysus has quit [Ping timeout: 252 seconds]
dinfuehr has joined #ruby
vutral has quit [Ping timeout: 260 seconds]
dinfuehr has quit [Ping timeout: 245 seconds]
dinfuehr has joined #ruby
za1b1tsu has quit [Ping timeout: 250 seconds]
zwliew has quit [Quit: Connection closed for inactivity]
za1b1tsu has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mahlon has quit [Ping timeout: 252 seconds]
tdy has quit [Ping timeout: 252 seconds]
arescorpio has quit [Quit: Leaving.]
cagomez has quit [Remote host closed the connection]
cagomez has joined #ruby
graphene has quit [Remote host closed the connection]
AKPWD has quit [Quit: じゃね。]
graphene has joined #ruby
AKPWD has joined #ruby
cagomez has quit [Ping timeout: 244 seconds]
cagomez has joined #ruby
cagomez has quit [Read error: Connection reset by peer]
mahlon has joined #ruby
dinfuehr has quit [Ping timeout: 244 seconds]
orbyt_ has joined #ruby
dinfuehr has joined #ruby
ta_ has joined #ruby
akaiiro has quit [Ping timeout: 268 seconds]
armyriad has quit [Ping timeout: 252 seconds]
armyriad has joined #ruby
rippa has joined #ruby
P1RATEZ has quit []
graphene has quit [Remote host closed the connection]
graphene has joined #ruby
beeman has joined #ruby
ta_ has quit [Ping timeout: 268 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tdy has joined #ruby
tdy has quit [Client Quit]
akaiiro has joined #ruby
cow[moo] has joined #ruby
acwatt has quit [Ping timeout: 252 seconds]
BTRE has quit [Remote host closed the connection]
cow[moo] has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
phaul has joined #ruby
rubydoc has joined #ruby
BTRE has joined #ruby
MaiconVieira has quit [Ping timeout: 252 seconds]
nowhereman_ has quit [Remote host closed the connection]
nowhereman_ has joined #ruby
mixfix41 has joined #ruby
reber has joined #ruby
za1b1tsu has quit [Ping timeout: 268 seconds]
za1b1tsu has joined #ruby
venmx has joined #ruby
za1b1tsu has quit [Ping timeout: 244 seconds]
conta has joined #ruby
cow[moo] has joined #ruby
cow[moo] has quit [Client Quit]
ta_ has joined #ruby
akaiiro has quit [Remote host closed the connection]
reber__ has joined #ruby
reber has quit [Ping timeout: 252 seconds]
mixfix41 has quit [Ping timeout: 250 seconds]
mixfix41 has joined #ruby
ta_ has quit [Ping timeout: 250 seconds]
_whitelogger has joined #ruby
_whitelogger has joined #ruby
Dimik has quit [Ping timeout: 268 seconds]
RougeR has joined #ruby
wildermind has joined #ruby
sameerynho has joined #ruby
conta has quit [Read error: Connection reset by peer]
conta has joined #ruby
throwntall has quit [Remote host closed the connection]
throwntall has joined #ruby
ta_ has joined #ruby
floehopper has joined #ruby
ams__ has joined #ruby
floehopper has quit []
venmx has quit [Ping timeout: 245 seconds]
graphene has quit [Remote host closed the connection]
graphene has joined #ruby
za1b1tsu has joined #ruby
ta_ has quit [Ping timeout: 272 seconds]
za1b1tsu has quit [Ping timeout: 268 seconds]
_whitelogger has joined #ruby
djellemah has quit [Ping timeout: 268 seconds]
vutral1 has joined #ruby
kapil____ has joined #ruby
gigetoo has joined #ruby
volix has quit [Quit: leaving]
volix has joined #ruby
ellcs has joined #ruby
ua_ has quit [Ping timeout: 252 seconds]
ellcs has quit [Ping timeout: 250 seconds]
ua has joined #ruby
dbz has quit [Remote host closed the connection]
ta_ has joined #ruby
nowhereman_ has quit [Ping timeout: 252 seconds]
mike11 has joined #ruby
BTRE has quit [Remote host closed the connection]
BTRE has joined #ruby
evdubs_ has joined #ruby
desperek has joined #ruby
evdubs has quit [Ping timeout: 250 seconds]
asphyxia has quit [Ping timeout: 244 seconds]
Turnikov[m] has quit [Ping timeout: 276 seconds]
sticaz has joined #ruby
venmx has joined #ruby
beeman has quit [Quit: Connection closed for inactivity]
bougyman has quit [Ping timeout: 264 seconds]
sticaz has quit [Quit: sticaz]
bougyman has joined #ruby
venmx has quit [Ping timeout: 246 seconds]
jtperreault has quit [Ping timeout: 246 seconds]
jtperreault has joined #ruby
ta_ has quit [Ping timeout: 252 seconds]
jyaworski_ has joined #ruby
apparition has joined #ruby
jyaworski_ is now known as jyaworski
jetchisel has joined #ruby
conta has quit [Remote host closed the connection]
GodFather has joined #ruby
conta has joined #ruby
Turnikov[m] has joined #ruby
venmx has joined #ruby
beeman has joined #ruby
GodFather has quit [Ping timeout: 244 seconds]
MoritaShinobu has joined #ruby
hakanai has joined #ruby
<hakanai>
Hi guys. I want to receive a mail everytime a exception is raised in the application, so I added in the end of the module "rescue => e ; <CODE TO SEND MAIL> ; raise ; end".
<hakanai>
Is there a better way to do it? It seems ugly
ams__ has quit [Quit: Connection closed for inactivity]
rubydoc has quit [Remote host closed the connection]
rubydoc has joined #ruby
MoritaShinobu has quit [Quit: Leaving]
houhoulis has joined #ruby
ta_ has joined #ruby
_whitelogger has joined #ruby
Azure has quit [Ping timeout: 268 seconds]
conta has quit [Quit: conta]
conta1 has joined #ruby
conta1 has quit [Client Quit]
Azure has joined #ruby
GodFather has quit [Ping timeout: 250 seconds]
ta_ has quit [Ping timeout: 245 seconds]
kurko_ has joined #ruby
venmx has quit [Remote host closed the connection]
graphene has quit [Remote host closed the connection]
graphene has joined #ruby
sticaz has joined #ruby
uplime has joined #ruby
graphene has quit [Remote host closed the connection]
graphene has joined #ruby
mike11 has joined #ruby
ta_ has joined #ruby
venmx has joined #ruby
cow[moo] has joined #ruby
gheegh has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tockitj has joined #ruby
nowhereman_ has joined #ruby
knight33 has joined #ruby
orbyt_ has joined #ruby
mike11 has quit [Quit: Leaving.]
GodFather has joined #ruby
ta_ has quit [Ping timeout: 276 seconds]
conta has joined #ruby
conta has quit [Remote host closed the connection]
RougeR has quit [Ping timeout: 252 seconds]
kurko_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ta_ has joined #ruby
ta_ has quit [Read error: Connection reset by peer]
kurko_ has joined #ruby
knight33 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nowhereman_ has quit [Ping timeout: 244 seconds]
kurko_ has quit [Client Quit]
nowhere_man has joined #ruby
nowhere_man has quit [Remote host closed the connection]
nowhere_man has joined #ruby
dellavg_ has joined #ruby
dbz has joined #ruby
thejamespinto has joined #ruby
<thejamespinto>
Hi Everyone!
<thejamespinto>
https://github.com/ruby/ruby Could anybody please help me understand where the statements for if/else and for/for-in are declared in the ruby sources?
beeman has quit [Quit: Connection closed for inactivity]
<uplime>
i doubt they're declared in any one place
<uplime>
what specifically are you looking for?
jetchisel has quit [Quit: Unfortunately time is always against us -- [Morpheus]]
beeman has joined #ruby
voker57 has joined #ruby
schneider has joined #ruby
uplime has quit [Ping timeout: 252 seconds]
Exuma has joined #ruby
schneider has quit [Quit: WeeChat 2.0.1]
nchambers has joined #ruby
za1b1tsu has joined #ruby
rubydoc has quit [Remote host closed the connection]
rubydoc has joined #ruby
<phaul>
&what_is size
<rubydoc>
It's a(n) method name.
MyMind has quit [Excess Flood]
MyMind has joined #ruby
Dimik has joined #ruby
duderonomy has joined #ruby
duderonomy has quit [Client Quit]
gheegh has joined #ruby
rubydoc has quit [Remote host closed the connection]
Exuma has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
GodFather has quit [Ping timeout: 245 seconds]
RougeR has joined #ruby
qolq has joined #ruby
darkhanb has joined #ruby
darkhanb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
duderonomy has joined #ruby
Exuma has joined #ruby
ua_ has joined #ruby
beeman has quit []
ua has quit [Ping timeout: 268 seconds]
sarmiena_ has joined #ruby
Puffball has quit [Remote host closed the connection]
Puffball has joined #ruby
beeman has joined #ruby
jetchisel has joined #ruby
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<apeiros>
phaul: is there any case where it is actually "an" for this?
darkhanb has joined #ruby
<phaul>
uh. no. :D I didn't even asked that question
<thejamespinto>
https://github.com/ruby/ruby Could anybody please help me understand where the statements for if/else and for/for-in are declared in the ruby sources?
duderonomy has joined #ruby
<apeiros>
thejamespinto: parse.y probably?
ellcs has joined #ruby
darkhanb has quit [Client Quit]
<phaul>
&what_is Array#size
<rubydoc>
It's a(n) instance method.
<apeiros>
oooh
<apeiros>
right! :D
<thejamespinto>
apeiros: I'd never have guessed it
nowhere_man has quit [Ping timeout: 272 seconds]
duderonomy has quit [Client Quit]
<thejamespinto>
apeiros: do you think a loop/else can be written in Ruby? Just like there is one in Handlebars?
<apeiros>
you mean whether you could change ruby's syntax? if you know your stuff, sure. I wouldn't be able to without a substantial time investment.
<thejamespinto>
yeah, I had just found them, too k_for
<thejamespinto>
I think what needs to happen there is that every for would need to be added around an if statement internally, so that'd be achievable
<apeiros>
that'd run the loop condition twice
<apeiros>
ah, too much C++ before. loop doesn't have a condition (so can't be wrapped in an if) and for/in works differently. anyway. have fun, I'm off :)
<thejamespinto>
apeiros: haha, thanks
<thejamespinto>
what I mean to say is that maybe it'd be needed to internally wrap that loop inside an IF, so you can have the ELSE
<thejamespinto>
but maybe it can simply be added as an extra `UNLESS arg` in the end that takes in the second block
<thejamespinto>
I see possibilities :D
<thejamespinto>
thank you so much, apeiros :D
rubydoc has quit [Remote host closed the connection]
<phaul>
thejamespinto: so the goal is to change Ruby syntax introducing a new control structure? Like a loop/conditional statement hybrid?
<thejamespinto>
yes
<thejamespinto>
the average rubist would prefer to use `[].each { |x| puts x } else { puts "so lonely" }`
<thejamespinto>
but each is a method on Enumerable, so I decided to investigate what using FOR would look like
<thejamespinto>
so.. `for x in [] { puts x } else { puts "so lonely" }`
<phaul>
an other / easier way would be to have an each like method that returns true / false value
<thejamespinto>
That's the most disgusting programming acronym I have ever seen
<phaul>
"it'd be easier to just write a new keyword" OK :)
<phaul>
welcome to the realm of "53 reduce conflict in grammar" error messages ..."
<phaul>
I would say it's really difficult
duderonomy has joined #ruby
<phaul>
and that's just the parser part. Then comes the code for code generation in the VM instruction sequence. and then comes along JIT
djellemah has joined #ruby
nowhere_man has joined #ruby
graphene has quit [Remote host closed the connection]
graphene has joined #ruby
<thejamespinto>
phaul: I'm not saying it's dead-easy. But a new keyword would showcase the benefit of the syntax and that'd get the conversation started on making it work with the existing `else`
<phaul>
thejamespinto: look, I really don't want to stop you doing that. If you manage to do it, you will learn a lot about ruby internals. also there is no harm in trying.
<phaul>
I dont think racc is relevant for this
<thejamespinto>
is there a good place to learn how to use YACC with the objective of adding a custom keyword to Ruby?
<thejamespinto>
I could not find a real proper place
<phaul>
it's bison for ruby yacc is very old
dbz has quit [Remote host closed the connection]
<thejamespinto>
phaul: do you think each/else could be created as a gem?
<phaul>
I don't know. you can do some background research in general related to compilers / gammars , parser
dellavg_ has quit [Ping timeout: 244 seconds]
<phaul>
there is a good book, I found. I can try to get a link if it's still online...
<thejamespinto>
I never took a proper compilers course
dviola has joined #ruby
<phaul>
there is a lot to the topic. Background knowledge would really help you in this
<phaul>
sorry, I can't find the link for the book :(
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
reber__ has quit [Read error: Connection reset by peer]
g- has quit [Ping timeout: 246 seconds]
g- has joined #ruby
dbz has joined #ruby
<thejamespinto>
phaul: think that could be delivered as a ruby gem?
ponga has joined #ruby
<phaul>
no. The ruby syntax cannot be altered as a gem. You can flex the already existing muscles of ruby syntax to the limits, and many gems do that to the extent that you first don't think it's ruby, think about rspec, rake, -- Qo :) but you can't change keywords from a gem
Azure has quit [Ping timeout: 246 seconds]
dbz has quit [Ping timeout: 246 seconds]
<thejamespinto>
phaul: in that case, can you help me locate where Enumerable#each is declared?
<phaul>
Enumerable#each is not implemented I think. the point is that every other Enumerable method would rely on each. Including classes have to implement #each to fullfil the Enumerable contract.
<phaul>
&ri Enumerable#each
<rubydoc>
Found no entry that matches class Enumerable instance method each.