havenwood changed the topic of #ruby to: Rules & more: http://ruby-community.com || Ruby 2.2.3; 2.1.7; 2.0.0-p647: https://ruby-lang.org || Paste >3 lines of text on https://gist.github.com || log @ http://irclog.whitequark.org/ruby/
spider-mario has quit [Read error: Connection reset by peer]
freerobby has quit [Quit: Leaving.]
freerobby has joined #ruby
charliesome has joined #ruby
workmad3 has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
AlphaAtom has quit [Read error: Connection reset by peer]
marr has quit []
jonee has quit [Ping timeout: 252 seconds]
workmad3 has quit [Ping timeout: 246 seconds]
AlphaAtom has joined #ruby
skweek has joined #ruby
leafybas_ has joined #ruby
matcouto has joined #ruby
Fredrich010 has quit [Ping timeout: 240 seconds]
phutchins has joined #ruby
clx has joined #ruby
<matcouto> Is it possible to have something like that? "2".to_i.call(:years) ?? Basically, what I want to do is to build this 2.years. I've got two string fields, one with the number and other with the time(days/weeks/years).
leafybasil has quit [Ping timeout: 246 seconds]
crime has quit [Quit: Connection closed for inactivity]
<adaedra> .send
Fredrich010 has joined #ruby
Fredrich010 has quit [Read error: Connection reset by peer]
<adaedra> and remember to never trust user input.
leafybas_ has quit [Ping timeout: 256 seconds]
Fredrich010 has joined #ruby
wildlander has joined #ruby
<adaedra> sigh.
<matcouto> adaedra good point. Thanks a lot!!!
<adaedra> ?crosspost
<ruboto> 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.
alcipir has quit [Ping timeout: 260 seconds]
mary5030 has joined #ruby
phutchins has quit [Ping timeout: 268 seconds]
yqt has quit [Ping timeout: 260 seconds]
<Ox0dea> shevy: Refinements are "ugly" how?
mary5030 has quit [Remote host closed the connection]
<Ox0dea> Because you do the refining from within a block...?
blue_deref has quit [Quit: Taking myself out of hear.]
Guest41758 has quit [Quit: This computer has gone to sleep]
Rickmasta has joined #ruby
mary5030 has joined #ruby
blue_deref2 has joined #ruby
blue_deref2 has quit [Remote host closed the connection]
jjx_ has joined #ruby
<jjx_> How can I get all aliases of a particular method?
blue_deref has joined #ruby
<Ox0dea> jjx_: I don't think you can, but are you sure you need to do this?
<jjx_> Ox0dea: I don't need to, I was just wondering if it was possible to do this ...
HoloIRCUser1 has joined #ruby
<Ox0dea> jjx_: Aliased methods aren't "equal" in any sense meaningful enough to warrant comparison, so you won't be able to grab them programmatically.
vigintas has quit [Ping timeout: 268 seconds]
krazyj has joined #ruby
<jjx_> Ox0dea: Yeah I didn't want to do this to compare them. It was for something else. Oh well...
MeMoc has quit [Quit: Connection closed for inactivity]
mary5030 has quit [Remote host closed the connection]
<shevy> Ox0dea the whole syntax
<krazyj> hey folks… does anyone know if i can init an instance of Sinatra::Base with something like `Sinatra.new(bind: ‘123.456.789.0’)`?
Guest41758 has joined #ruby
<Ox0dea> shevy: There is no additional syntax for refinements.
<Ox0dea> >> method(:using) # Even `using` is just a method.
<ruboto> Ox0dea # => #<Method: main.using> (https://eval.in/456407)
mary5030 has joined #ruby
<shevy> module M; refine C do
<shevy> god awful
mollusk_ has joined #ruby
<Ox0dea> jjx_: Comparison is the bedrock of equality, mind.
dopamean_ has quit [Ping timeout: 256 seconds]
<Ox0dea> Are you able to elaborate on why you're looking for aliased methods? Maybe there's a better way.
<shevy> come on jjx_
Fredrich010 has quit [Ping timeout: 240 seconds]
tkuchiki has joined #ruby
jjx_ has left #ruby [#ruby]
mary5030 has quit [Ping timeout: 256 seconds]
AlphaAtom has quit [Read error: Connection reset by peer]
cwong_on_irc has quit [Quit: Leaving.]
<krazyj> any thoughts on my noob Sinatra question?
<shevy> and so another webchatter magically vanished
zarubin has joined #ruby
nsuke has quit [Remote host closed the connection]
AlphaAtom has joined #ruby
Fredrich010 has joined #ruby
Fredrich010 has quit [Read error: Connection reset by peer]
nertzy has quit [Quit: This computer has gone to sleep]
NeverDie has quit [Quit: http://radiux.io/ -> Manhattan Project]
alcipir has joined #ruby
nsuke has joined #ruby
zarubin has quit [Ping timeout: 250 seconds]
Nanuq has quit [Ping timeout: 264 seconds]
htmldrum has joined #ruby
saddad has quit [Ping timeout: 240 seconds]
bigmac_ has quit [Ping timeout: 260 seconds]
tkuchiki has quit [Remote host closed the connection]
alcipir has quit [Ping timeout: 252 seconds]
freerobby has quit [Quit: Leaving.]
freerobby has joined #ruby
jenrzzz has joined #ruby
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Fredrich010 has joined #ruby
bkxd has joined #ruby
bruno- has joined #ruby
Bellthoven has joined #ruby
bruno- is now known as Guest35224
AccordLTN has joined #ruby
bigmac_ has joined #ruby
lkba_ has joined #ruby
howdoicomputer has joined #ruby
ruby_student has quit [Ping timeout: 246 seconds]
mloy has joined #ruby
RegulationD has joined #ruby
<krazyj> aaaanybody? :D
<krazyj> i’ll give 1 million internet points
<shevy> the only ones to know may be on #sinatra
Guest35224 has quit [Ping timeout: 256 seconds]
Fredrich010 has quit [Ping timeout: 240 seconds]
<krazyj> they’re all quiet over there… but k
<shevy> yeah they are dying :)
lkba has quit [Ping timeout: 250 seconds]
<shevy> I only used Sinatra::Base in order to subclass from it
<shevy> can't you just do Sinatra::Base.new() ?
nycjv321 has joined #ruby
<krazyj> shevy: aha! yeah… i think that’s what i’m trying to do
<krazyj> thanks for the suggestion
howdoicomputer has quit [Ping timeout: 264 seconds]
<krazyj> (i’m an iOS dev… literally just trying to change one line in this mock server script)
<krazyj> :D
<nycjv321> Why would having a class defined within a module return "ClassName is not a class (TypEerror)?
haylon has quit [Quit: Leaving]
<adaedra> because a module of the same name would already exist
baweaver has quit [Remote host closed the connection]
RegulationD has quit [Ping timeout: 246 seconds]
Wsewolod has quit []
<nycjv321> your right lol.
<nycjv321> Thats a great error message.
<Ox0dea> >> class Enumerable; end rescue $!
<ruboto> Ox0dea # => #<TypeError: Enumerable is not a class> (https://eval.in/456408)
<adaedra> krazyj: the bind options are supposed to be set by the server you use to run your application.
jamto11_ has quit [Remote host closed the connection]
niftylettuce has joined #ruby
<krazyj> adaedra: right… so in the thing i’m modifying, an instance of Sinatra::Base just gets spun up, exactly like that
<krazyj> the modification i want to make is to set the `bind` property
<krazyj> which i’m thinking i can do via Sinatra::Base.new(bind: ...)
bahar_ has quit [Ping timeout: 272 seconds]
Klumben has joined #ruby
yfeldblum has quit [Ping timeout: 246 seconds]
alcipir has joined #ruby
saddad has joined #ruby
yfeldblum has joined #ruby
mloy has quit [Ping timeout: 244 seconds]
Fredrich010 has joined #ruby
alcipir has quit [Ping timeout: 260 seconds]
Nanuq has joined #ruby
<Ox0dea> What is this "coding 'wishfully'" thing?
tkuchiki has joined #ruby
<adaedra> oh, I went back in time :o
dopamean_ has joined #ruby
htmldrum has quit [Ping timeout: 260 seconds]
<shevy> back into the future with you
johnhamelink has joined #ruby
symm- has quit [Ping timeout: 256 seconds]
saddad has quit [Quit: WeeChat 1.4-dev]
saddad has joined #ruby
jamto11 has joined #ruby
tkuchiki has quit [Remote host closed the connection]
Fredrich010 has quit [Ping timeout: 240 seconds]
gregoriokusowski has quit [Quit: gregoriokusowski]
<shevy> someone tell a joke
<Ox0dea> I would like to receive a TCP joke.
<shevy> adaedra told that one already!
rodfersou has quit [Ping timeout: 255 seconds]
vikaton has quit [Quit: Connection closed for inactivity]
saddad has quit [Ping timeout: 260 seconds]
Thomas-0725 has joined #ruby
blackmesa has quit [Ping timeout: 250 seconds]
freerobby has quit [Quit: Leaving.]
bonhoeffer has joined #ruby
Thomas-0725 has quit [Client Quit]
freerobby has joined #ruby
ramfjord has quit [Ping timeout: 265 seconds]
maletor has joined #ruby
Thomas-0725 has joined #ruby
matcouto has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Musashi007 has joined #ruby
vigintas has joined #ruby
Uranio has joined #ruby
stardiviner has joined #ruby
rodfersou has joined #ruby
matcouto has joined #ruby
Rickmast_ has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
Musashi007 has quit [Client Quit]
baweaver has joined #ruby
vigintas has quit [Ping timeout: 246 seconds]
Rickmasta has quit [Ping timeout: 264 seconds]
s00pcan has quit [Ping timeout: 255 seconds]
Fredrich010 has joined #ruby
everbot has joined #ruby
ruby-lang755 has joined #ruby
sankaber has joined #ruby
bruce_lee2 has joined #ruby
matcouto has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
edimax has joined #ruby
<ruby-lang755> hello
<ruby-lang755> Any one could help me? I whant to list only posts from my following users, how i could do this
jamto11 has quit [Remote host closed the connection]
<Uranio> ruby-lang755: Ruby on Rails?
zarubin has joined #ruby
<ruby-lang755> yes
Fredrich010 has quit [Ping timeout: 240 seconds]
<Uranio> did you tried in #RubyOnRails channel
saddad has joined #ruby
bruce_lee has quit [Ping timeout: 264 seconds]
<ruby-lang755> I'll try, thanks dude
weemsledeux has joined #ruby
SuMo_D has joined #ruby
zarubin has quit [Ping timeout: 240 seconds]
<Ox0dea> ?dude
<ruboto> I don't know anything about dude
mary5030 has joined #ruby
cwong_on_irc has joined #ruby
cwong_on_irc has quit [Max SendQ exceeded]
cwong_on_irc has joined #ruby
towski_ has joined #ruby
<weaksauce> that's pretty neat actually
<weaksauce> does iterm2 do this already?
<Coraline> I don't know
tkuchiki has joined #ruby
<weaksauce> irc influencing terminal
Fredrich010 has joined #ruby
mary5030 has quit [Ping timeout: 250 seconds]
dikaio has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<weaksauce> it's nice to see that apple has made terminal better over the years. I haven't tried it in 10 but windows cmd has always been pretty terrible... resize on the fly not allowed. copy and paste is not a first class citizen, etc.
wildlander has quit [Quit: Saliendo]
ruby-lang755 has left #ruby [#ruby]
AlphaAtom has quit [Read error: Connection reset by peer]
tkuchiki has quit [Remote host closed the connection]
AlphaAtom has joined #ruby
towski_ has quit [Remote host closed the connection]
Fredrich010 has quit [Ping timeout: 240 seconds]
Uranio has quit [Ping timeout: 255 seconds]
wlch has joined #ruby
Fredrich010 has joined #ruby
workmad3 has joined #ruby
dikaio has joined #ruby
vanillapeach has joined #ruby
Rickmast_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Fredrich010 has quit [Ping timeout: 240 seconds]
crazydiamond has quit [Ping timeout: 260 seconds]
<shevy> that's microsoft for ya - users must always use windows
symm- has joined #ruby
<shevy> I mean a window user interface :-)
SuMo_D has quit [Quit: Off into this... Real world place...]
Fredrich010 has joined #ruby
solocshaw has quit [Ping timeout: 240 seconds]
workmad3 has quit [Ping timeout: 272 seconds]
matcouto has joined #ruby
<Ox0dea> shevy: http://logs.ryanbigg.com/p/[k-#4368111
<Ox0dea> It seems he wasn't kidding. :'(
Fredrich010 has quit [Ping timeout: 255 seconds]
matcouto has quit [Client Quit]
saddad has quit [Ping timeout: 265 seconds]
Fredrich010 has joined #ruby
mary5030 has joined #ruby
ibouvousaime has quit [Ping timeout: 256 seconds]
Rickmasta has joined #ruby
jenrzzz has quit [Ping timeout: 268 seconds]
mary5030 has quit [Remote host closed the connection]
AlphaAtom has quit [Ping timeout: 240 seconds]
mary5030 has joined #ruby
<shevy> huh
<shevy> what happened to him
baweaver has quit [Remote host closed the connection]
<shevy> [15:21:08] [k-: my battery dies quickly, i think i broke it
<shevy> HE BROKE IT
pontiki has joined #ruby
bonhoeffer has quit [Quit: bonhoeffer]
<pontiki> o/
Fredrich010 has quit [Ping timeout: 256 seconds]
<shevy> but pontiki is back
<shevy> from snowtiki \o
<pontiki> no snow yet, thank the skygods
Feyn has joined #ruby
mary5030 has quit [Ping timeout: 264 seconds]
blackmesa has joined #ruby
s00pcan has joined #ruby
* Ox0dea worships Basement Cat.
Nanuq has quit [Ping timeout: 264 seconds]
cwong_on_irc has quit [Quit: Leaving.]
phutchins has joined #ruby
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
craysiii has quit [Quit: Leaving.]
<pontiki> ceiling cat looks on
blackmesa has quit [Ping timeout: 264 seconds]
Bellthoven has quit [Ping timeout: 244 seconds]
AlphaAtom has joined #ruby
phutchins has quit [Ping timeout: 260 seconds]
<krazyj> hey guys… i’m reviewing a colleagues code and trying to understand what’s going on here. could anyone explain this to my non-ruby self? https://gist.github.com/joshavant/d784958d4945978d004c
solocshaw has joined #ruby
Fredrich010 has joined #ruby
fedexo has joined #ruby
<shevy> krazyj are you sure your colleague knows what he is doing
<shevy> other than that, extend self used like that is the lazy way to make module-methods there
<krazyj> ok
<shevy> so you can use for example:
<shevy> Mull::Container.server
<shevy> def server; Sinatra::Base; end
<shevy> sorta funny names he picked there
<shevy> the server method returns ... sinatra base.....
<shevy> always remember the hardest rule in programming - which is to give things a proper name :-)
<krazyj> thought it was weird… he’s an interesting guy
<krazyj> :P
<krazyj> smart tho
<shevy> take Ox0dea for instance... he so wanted to be known as 0x0dea instead
<shevy> I try to not outsmart my future self
htmldrum has joined #ruby
Lucky__ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
arup_r has joined #ruby
Asher has quit [Quit: Leaving.]
ghr has quit [Ping timeout: 240 seconds]
zarubin has joined #ruby
jamto11 has joined #ruby
ghr has joined #ruby
howdoicomputer has joined #ruby
<Ox0dea> > Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
diegoaguilar has joined #ruby
<Ox0dea> -- Brian Kermithands
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
unreal has joined #ruby
zarubin has quit [Ping timeout: 264 seconds]
jamto11 has quit [Ping timeout: 250 seconds]
leafybasil has joined #ruby
howdoicomputer has quit [Ping timeout: 260 seconds]
unreal_ has quit [Ping timeout: 255 seconds]
alcipir has joined #ruby
diegoaguilar has quit [Remote host closed the connection]
diegoaguilar has joined #ruby
mengu has quit [Remote host closed the connection]
alcipir has quit [Ping timeout: 244 seconds]
bruno- has joined #ruby
O47m341 has joined #ruby
bruno- is now known as Guest43121
chopin has joined #ruby
SuzieQueue has quit [Ping timeout: 250 seconds]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
RegulationD has joined #ruby
baroquebobcat has joined #ruby
workmad3 has joined #ruby
Guest43121 has quit [Ping timeout: 265 seconds]
nycjv321 has quit [Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org]
moeabdol has joined #ruby
Fredrich010 has quit [Ping timeout: 240 seconds]
Rickmasta has joined #ruby
RegulationD has quit [Ping timeout: 256 seconds]
baroquebobcat has quit [Read error: Connection reset by peer]
clx has quit [Ping timeout: 240 seconds]
dikaio has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
baroquebobcat has joined #ruby
ramfjord has joined #ruby
workmad3 has quit [Ping timeout: 240 seconds]
hakunin_ has joined #ruby
hakunin has quit [Read error: Connection reset by peer]
Asher has joined #ruby
Fredrich010 has joined #ruby
jenrzzz has joined #ruby
alcipir has joined #ruby
Yzguy has quit [Quit: Zzz...]
symm- has quit [Ping timeout: 250 seconds]
jenrzzz has quit [Ping timeout: 246 seconds]
alcipir has quit [Ping timeout: 252 seconds]
Fredrich010 has quit [Ping timeout: 240 seconds]
bmurt has joined #ruby
chipotle has quit [Quit: cheerio]
rshetty has joined #ruby
hololeap has joined #ruby
vigintas has joined #ruby
rgb-one has joined #ruby
htmldrum has quit [Ping timeout: 255 seconds]
wlch has quit [Quit: Leaving]
vigintas has quit [Ping timeout: 268 seconds]
Toto has joined #ruby
Toto is now known as Guest89101
mary5030 has joined #ruby
Fredrich010 has joined #ruby
chopin has quit [Remote host closed the connection]
moeabdol has quit [Ping timeout: 240 seconds]
clx has joined #ruby
Guest89101 has quit [Ping timeout: 246 seconds]
verdoc has quit [Read error: Connection reset by peer]
darkf has joined #ruby
devbug has joined #ruby
mary5030 has quit [Ping timeout: 250 seconds]
verdoc has joined #ruby
clx has quit [Ping timeout: 240 seconds]
roxtrongo has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Fredrich010 has quit [Ping timeout: 260 seconds]
zarubin has joined #ruby
cwong_on_irc has joined #ruby
vanillapeach has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
vanillapeach has joined #ruby
Fredrich010 has joined #ruby
Lucky__ has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
`tim` has joined #ruby
Meow-J has joined #ruby
Fredrich_ has joined #ruby
zarubin has quit [Ping timeout: 255 seconds]
dikaio has joined #ruby
Fredrich010 has quit [Ping timeout: 260 seconds]
vanillapeach has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
bryanray has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Fredrich_ has quit [Ping timeout: 260 seconds]
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mengu has joined #ruby
rodfersou has quit [Remote host closed the connection]
Xeago has joined #ruby
zenguy_pc has quit [Read error: Connection reset by peer]
bruno- has joined #ruby
postmodern has joined #ruby
bruno- is now known as Guest18600
mengu has quit [Ping timeout: 256 seconds]
rgb-one has quit [Ping timeout: 244 seconds]
pathrocle has quit [Remote host closed the connection]
sepp2k1 has quit [Read error: Connection reset by peer]
pathrocle has joined #ruby
Xeago has quit [Ping timeout: 264 seconds]
Guest18600 has quit [Ping timeout: 272 seconds]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
clx has joined #ruby
s2013 has joined #ruby
pathrocle has quit [Ping timeout: 264 seconds]
chipotle has joined #ruby
Fredrich010 has joined #ruby
yfeldblum has quit [Ping timeout: 246 seconds]
jenrzzz has joined #ruby
s00pcan has quit [Ping timeout: 264 seconds]
gener1c_ has joined #ruby
s00pcan has joined #ruby
tubuliferous_ has quit [Ping timeout: 240 seconds]
alcipir has joined #ruby
gener1c has quit [Ping timeout: 250 seconds]
roxtrongo has quit [Remote host closed the connection]
Fredrich010 has quit [Ping timeout: 256 seconds]
zenguy_pc has joined #ruby
jamto11 has joined #ruby
everbot has quit [Ping timeout: 272 seconds]
blackmesa has joined #ruby
sunya7a has quit [Quit: leaving]
leafybasil has quit [Remote host closed the connection]
braincrash has quit [Quit: bye bye]
symm- has joined #ruby
alcipir has quit [Ping timeout: 264 seconds]
sunya7a has joined #ruby
HoloIRCUser3 has joined #ruby
jamto11 has quit [Ping timeout: 250 seconds]
yeticry has joined #ruby
krazyj has quit [Quit: krazyj]
braincrash has joined #ruby
braincrash is now known as braincras
Fredrich010 has joined #ruby
blackmesa has quit [Ping timeout: 256 seconds]
jenrzzz has quit [Ping timeout: 264 seconds]
HoloIRCUser1 has quit [Ping timeout: 265 seconds]
roxtrongo has joined #ruby
BlackCoyote has joined #ruby
HoloIRCUser1 has joined #ruby
willardg has joined #ruby
Thomas-0725 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
skcin7 has quit [Max SendQ exceeded]
Fredrich010 has quit [Ping timeout: 260 seconds]
HoloIRCUser3 has quit [Ping timeout: 265 seconds]
rgb-one has joined #ruby
moeabdol has joined #ruby
freerobby has quit [Quit: Leaving.]
Fredrich010 has joined #ruby
AlphaAtom has quit [Read error: Connection reset by peer]
arescorpio has joined #ruby
moeabdol has quit [Ping timeout: 260 seconds]
Rickmasta has joined #ruby
Fredrich010 has quit [Ping timeout: 265 seconds]
howdoicomputer has joined #ruby
skcin7 has joined #ruby
bmurt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ramfjord has quit [Ping timeout: 268 seconds]
solocshaw has quit [Ping timeout: 246 seconds]
fedexo has quit [Quit: No Ping reply in 180 seconds.]
Gnomethrower has joined #ruby
gix has quit [Ping timeout: 244 seconds]
fedexo has joined #ruby
howdoicomputer has quit [Ping timeout: 260 seconds]
al2o3-cr has quit [Ping timeout: 264 seconds]
al2o3-cr has joined #ruby
s00pcan has quit [Ping timeout: 246 seconds]
gix has joined #ruby
diegoaguilar has quit [Remote host closed the connection]
skcin7 has quit [Ping timeout: 264 seconds]
willardg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jenrzzz has joined #ruby
Fredrich010 has joined #ruby
skcin7 has joined #ruby
bruce_lee2 has quit [Changing host]
bruce_lee2 has joined #ruby
bruce_lee2 is now known as bruce_lee
workmad3 has joined #ruby
swgillespie[GT] has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
`based_pdev` has quit [Read error: Connection reset by peer]
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
`based_pdev` has joined #ruby
Fredrich010 has quit [Ping timeout: 260 seconds]
zenguy_pc has quit [Read error: Connection reset by peer]
benlovell has joined #ruby
johnny56_ has joined #ruby
rgb-one has quit [Ping timeout: 265 seconds]
rgb-one has joined #ruby
weemsledeux has quit [Ping timeout: 240 seconds]
mbeasley has joined #ruby
vondruch has quit [Ping timeout: 265 seconds]
johnny56 has quit [Ping timeout: 244 seconds]
workmad3 has quit [Ping timeout: 265 seconds]
davedev2_ has joined #ruby
ramfjord has joined #ruby
vondruch has joined #ruby
davedev24 has quit [Ping timeout: 246 seconds]
benlovell has quit [Ping timeout: 252 seconds]
p1k has joined #ruby
bruno- has joined #ruby
bruno- is now known as Guest11870
RegulationD has joined #ruby
hakunin_ has left #ruby [#ruby]
Guest11870 has quit [Ping timeout: 240 seconds]
Fredrich010 has joined #ruby
RegulationD has quit [Ping timeout: 265 seconds]
vigintas has joined #ruby
dopie has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Guest41758 has quit [Ping timeout: 250 seconds]
tubuliferous_ has joined #ruby
kohgpat has joined #ruby
zenguy_pc has joined #ruby
Fredrich010 has quit [Ping timeout: 250 seconds]
vigintas has quit [Ping timeout: 256 seconds]
daffy_duck has quit [Ping timeout: 255 seconds]
daffy_duck has joined #ruby
alcipir has joined #ruby
houhouli_ has joined #ruby
jamto11 has joined #ruby
clx_ has joined #ruby
rgb-one has quit [Read error: Connection reset by peer]
HoloIRCUser4 has joined #ruby
clx has quit [Ping timeout: 240 seconds]
cmoneylulz has joined #ruby
houhoulis has quit [Ping timeout: 240 seconds]
keen______ has quit [Ping timeout: 244 seconds]
HoloIRCUser5 has joined #ruby
HoloIRCUser1 has quit [Read error: Connection reset by peer]
alcipir has quit [Ping timeout: 265 seconds]
keen______ has joined #ruby
HoloIRCUser4 has quit [Ping timeout: 260 seconds]
dotrb has joined #ruby
jamto11 has quit [Ping timeout: 265 seconds]
arescorpio has quit [Quit: Leaving.]
Or1on has quit [Ping timeout: 252 seconds]
Coldblackice has quit [Read error: Connection reset by peer]
symm- has quit [Ping timeout: 252 seconds]
skcin7 has quit [Ping timeout: 260 seconds]
skcin7 has joined #ruby
edimax has quit [Remote host closed the connection]
Fredrich010 has joined #ruby
alcipir has joined #ruby
govg has joined #ruby
jessemcgilallen has joined #ruby
jessemcgilallen has quit [Client Quit]
moeabdol has joined #ruby
Shidash_ is now known as Shidash
everbot has joined #ruby
Gnomethrower has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
beast has joined #ruby
moeabdol has quit [Ping timeout: 240 seconds]
kobain has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
trosborn has joined #ruby
Coldblackice has joined #ruby
cmoneylulz has quit []
jamto11 has joined #ruby
demonlove has joined #ruby
based_pdev_ has joined #ruby
johnny56_ has quit [Remote host closed the connection]
chipotle has quit [Ping timeout: 265 seconds]
rshetty has quit [Remote host closed the connection]
`based_pdev` has quit [Ping timeout: 260 seconds]
rshetty has joined #ruby
hanmac has quit [Quit: Leaving.]
CloCkWeRX has joined #ruby
trosborn has quit [Quit: trosborn]
troyready has quit [Remote host closed the connection]
chipotle has joined #ruby
psy_ has joined #ruby
symm- has joined #ruby
VeryBewitching has quit [Quit: Konversation terminated!]
clx_ has quit [Ping timeout: 252 seconds]
moeabdol has joined #ruby
moeabdol has quit [Client Quit]
kohgpat has quit [Ping timeout: 240 seconds]
jamto11 has quit [Remote host closed the connection]
relix has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
moeabdol has joined #ruby
`tim` has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jamto11 has joined #ruby
<gambl0re> anyone here?
<Ox0dea> There are dozens of us.
<gambl0re> hi
tmtwd has joined #ruby
baweaver has joined #ruby
willardg has joined #ruby
blackmesa has joined #ruby
verdoc has quit [Ping timeout: 246 seconds]
kohgpat has joined #ruby
pontiki has quit [Ping timeout: 246 seconds]
yeticry has quit [Read error: Connection reset by peer]
rshetty_ has joined #ruby
skweek has quit [Ping timeout: 240 seconds]
lxsameer has joined #ruby
Asher has quit [Quit: Leaving.]
lkba_ has quit [Remote host closed the connection]
howdoicomputer has joined #ruby
rshetty has quit [Ping timeout: 260 seconds]
blackmesa has quit [Ping timeout: 256 seconds]
demonlove has quit [Quit: Leaving]
davedev2_ has quit [Remote host closed the connection]
lkba has joined #ruby
howdoicomputer has quit [Ping timeout: 256 seconds]
jenrzzz has quit [Ping timeout: 268 seconds]
ramfjord has quit [Quit: Lost terminal]
mollusk_ has quit [Ping timeout: 250 seconds]
devbug_ has joined #ruby
yeticry has joined #ruby
fedexo has quit [Read error: Connection reset by peer]
jamto11 has quit [Remote host closed the connection]
tmtwd has quit [Ping timeout: 265 seconds]
devbug has quit [Ping timeout: 240 seconds]
devbug_ has quit [Read error: Connection reset by peer]
decoponio has joined #ruby
alcipir has quit [Ping timeout: 244 seconds]
verdoc has joined #ruby
workmad3 has joined #ruby
tmtwd has joined #ruby
benlovell has joined #ruby
grambo has joined #ruby
wharr has joined #ruby
trosborn has joined #ruby
Gnomethrower has joined #ruby
workmad3 has quit [Ping timeout: 260 seconds]
trosborn has quit [Client Quit]
wharr_ has quit [Ping timeout: 244 seconds]
grambo has quit [Quit: Leaving]
benlovell has quit [Ping timeout: 240 seconds]
patdohere has joined #ruby
AlphaAtom has joined #ruby
AlphaAtom has quit [Read error: Connection reset by peer]
AlphaAtom has joined #ruby
willardg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mengu has joined #ruby
vigintas has joined #ruby
clx has joined #ruby
CloCkWeRX has quit [Ping timeout: 268 seconds]
AlphaAtom has quit [Read error: Connection reset by peer]
AlphaAtom has joined #ruby
symm- has quit [Ping timeout: 260 seconds]
radgeRayden has joined #ruby
mengu has quit [Ping timeout: 268 seconds]
vigintas has quit [Ping timeout: 246 seconds]
clx has quit [Ping timeout: 244 seconds]
bruno- has joined #ruby
bruno- is now known as Guest48629
RegulationD has joined #ruby
danieli has quit [Quit: *does an epic backflip into nowhere*]
Guest48629 has quit [Ping timeout: 260 seconds]
RegulationD has quit [Ping timeout: 244 seconds]
zipace has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mm_ has joined #ruby
yardenbar has joined #ruby
arup_r has quit [Quit: Leaving]
kohgpat has quit [Ping timeout: 260 seconds]
CloCkWeRX has joined #ruby
grambo has joined #ruby
pontiki has joined #ruby
ajb- has quit [Quit: Bye.]
grambo has quit [Client Quit]
alem0lars has joined #ruby
grambo has joined #ruby
grambo has quit [Client Quit]
grambo has joined #ruby
mm_ has quit [Read error: Connection reset by peer]
duderonomy has quit [Read error: Connection reset by peer]
ajb- has joined #ruby
mm_ has joined #ruby
pontiki has quit [Ping timeout: 240 seconds]
ajb- has quit [Changing host]
ajb- has joined #ruby
p1k has quit [Ping timeout: 244 seconds]
yardenbar has quit [Ping timeout: 256 seconds]
ajb- is now known as ajb
kohgpat has joined #ruby
mm_ has quit [Read error: Connection reset by peer]
zipace has quit [Changing host]
zipace has joined #ruby
jenrzzz has joined #ruby
patdohere has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jenrzzz has quit [Ping timeout: 268 seconds]
jamto11 has joined #ruby
yardenbar has joined #ruby
DrCode has quit [Ping timeout: 256 seconds]
jamto11 has quit [Ping timeout: 264 seconds]
chipotle has quit [Quit: cheerio]
hiyosi has joined #ruby
tmtwd has quit [Ping timeout: 240 seconds]
keen_______ has joined #ruby
tkuchiki has joined #ruby
keen______ has quit [Ping timeout: 240 seconds]
baweaver has quit [Remote host closed the connection]
rehat has quit [Remote host closed the connection]
based_pdev_ has quit [Read error: Connection reset by peer]
based_pdev_ has joined #ruby
shinenelson has joined #ruby
bb010g has quit [Quit: Connection closed for inactivity]
fantazo has joined #ruby
chipotle has joined #ruby
Cyther has quit [Read error: Connection reset by peer]
bruno- has joined #ruby
bruno- is now known as Guest33400
cwong_on_irc has quit [Quit: Leaving.]
hanmac has joined #ruby
Outlastsheep has quit [Ping timeout: 272 seconds]
ahegyi has joined #ruby
Guest33400 has quit [Ping timeout: 244 seconds]
howdoicomputer has joined #ruby
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Xeago has joined #ruby
howdoicomputer has quit [Ping timeout: 240 seconds]
grambo has quit [Quit: Leaving]
pontiki has joined #ruby
rshetty_ has quit [Remote host closed the connection]
firstdayonthejob has joined #ruby
Xeago has quit [Ping timeout: 240 seconds]
andykingking has joined #ruby
blackmesa has joined #ruby
tkuchiki has quit [Remote host closed the connection]
tkuchiki has joined #ruby
pontiki has quit [Ping timeout: 250 seconds]
p1k has joined #ruby
blackmesa has quit [Ping timeout: 252 seconds]
aspiers has joined #ruby
tkuchiki has quit [Remote host closed the connection]
tkuchiki has joined #ruby
workmad3 has joined #ruby
tkuchiki has quit [Ping timeout: 240 seconds]
benlovell has joined #ruby
workmad3 has quit [Ping timeout: 252 seconds]
clx has joined #ruby
alcipir has joined #ruby
benlovell has quit [Ping timeout: 240 seconds]
jamto11 has joined #ruby
z4j5 has quit [Ping timeout: 255 seconds]
alcipir has quit [Ping timeout: 250 seconds]
jamto11 has quit [Ping timeout: 256 seconds]
minimalism has quit [Quit: leaving]
kohgpat has quit [Ping timeout: 260 seconds]
Xeago has joined #ruby
haxrbyte has quit [Ping timeout: 260 seconds]
vigintas has joined #ruby
matcouto has joined #ruby
ndrei has joined #ruby
armyriad has quit [Ping timeout: 264 seconds]
armyriad has joined #ruby
skade has joined #ruby
minimalism has joined #ruby
vigintas has quit [Ping timeout: 265 seconds]
^mg^ has joined #ruby
blue_deref has quit [Quit: bbn]
devoldmx_ has joined #ruby
wharr_ has joined #ruby
devoldmx has quit [Read error: Connection reset by peer]
armyriad has quit [Ping timeout: 244 seconds]
matp has quit [Excess Flood]
ajb is now known as ajb-
matp has joined #ruby
wharr has quit [Ping timeout: 244 seconds]
mg^^ has quit [Ping timeout: 244 seconds]
hfp_work has quit [Ping timeout: 256 seconds]
bigmac_ has quit [Ping timeout: 244 seconds]
yfeldblum has joined #ruby
helpa has quit [Remote host closed the connection]
armyriad has joined #ruby
helpa has joined #ruby
GnuYawk has quit [Ping timeout: 246 seconds]
hfp_work has joined #ruby
armyriad has quit [Max SendQ exceeded]
bigmac_ has joined #ruby
armyriad has joined #ruby
armyriad has quit [Max SendQ exceeded]
Trieste has quit [Ping timeout: 264 seconds]
armyriad has joined #ruby
RegulationD has joined #ruby
bruno- has joined #ruby
bruno- is now known as Guest66730
blackmesa has joined #ruby
Trieste has joined #ruby
bkxd has quit [Quit: leaving]
_mak has left #ruby [".."]
apfeluser has joined #ruby
RegulationD has quit [Ping timeout: 265 seconds]
relix has joined #ruby
Guest66730 has quit [Ping timeout: 250 seconds]
alcipir has joined #ruby
last_staff has joined #ruby
BlackCoyote has quit [Quit: Leaving]
jenrzzz has joined #ruby
karapetyan has joined #ruby
alcipir has quit [Ping timeout: 255 seconds]
skade has quit [Ping timeout: 246 seconds]
skade has joined #ruby
sl33k has joined #ruby
pontiki has joined #ruby
trosborn has joined #ruby
pontiki has quit [Ping timeout: 252 seconds]
skade has quit [Read error: Connection reset by peer]
blackmesa has quit [Ping timeout: 255 seconds]
tkuchiki has joined #ruby
jonee has joined #ruby
p1k has quit [Ping timeout: 246 seconds]
SCHAAP137 has joined #ruby
trosborn has quit [Quit: trosborn]
tkuchiki has quit [Ping timeout: 240 seconds]
Trieste has quit [Ping timeout: 250 seconds]
trosborn has joined #ruby
lkba has quit [Ping timeout: 250 seconds]
Trieste has joined #ruby
Voker57 has joined #ruby
jonee has quit [Quit: ChatZilla 0.9.92 [Firefox 41.0.2/20151015172900]]
jamto11 has joined #ruby
yardenbar has quit [Ping timeout: 260 seconds]
User458764 has joined #ruby
tkuchiki has joined #ruby
jamto11 has quit [Ping timeout: 240 seconds]
matcouto has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tkuchiki has quit [Remote host closed the connection]
dawkirst has joined #ruby
karapetyan has quit [Remote host closed the connection]
Trieste has quit [Ping timeout: 260 seconds]
karapetyan has joined #ruby
Trieste has joined #ruby
roxtrongo has quit [Remote host closed the connection]
tkuchiki has joined #ruby
roxtrong_ has joined #ruby
htmldrum has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
KnownSyntax has quit [Quit: Leaving]
karapetyan has quit [Ping timeout: 260 seconds]
DoubleMalt has joined #ruby
bigmac__ has joined #ruby
KnownSyntax has joined #ruby
Trieste has quit [Ping timeout: 250 seconds]
bigmac_ has quit [Ping timeout: 272 seconds]
yfeldblum has quit [Ping timeout: 246 seconds]
Trieste has joined #ruby
last_staff has quit [Quit: last_staff]
atomical has joined #ruby
bruno- has joined #ruby
bruno- is now known as Guest13386
postmodern has quit [Quit: Leaving]
clx_ has joined #ruby
Guest13386 has quit [Ping timeout: 244 seconds]
clx has quit [Ping timeout: 260 seconds]
blackmesa has joined #ruby
chipotle has quit [Quit: cheerio]
apfeluser has quit [Quit: Leaving]
workmad3 has joined #ruby
alcipir has joined #ruby
ahegyi has quit [Ping timeout: 244 seconds]
tkuchiki has quit [Remote host closed the connection]
pontiki has joined #ruby
benlovell has joined #ruby
alcipir has quit [Ping timeout: 244 seconds]
niftylettuce has quit [Quit: Connection closed for inactivity]
pontiki has quit [Ping timeout: 256 seconds]
charliesome has joined #ruby
benlovell has quit [Ping timeout: 255 seconds]
workmad3 has quit [Ping timeout: 260 seconds]
ndrei has quit [Ping timeout: 240 seconds]
hiyosi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
User458764 has quit [Ping timeout: 240 seconds]
hiyosi has joined #ruby
davedev2_ has joined #ruby
everbot has quit [Ping timeout: 250 seconds]
User458764 has joined #ruby
p1k has joined #ruby
vigintas has joined #ruby
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
stamina has joined #ruby
bruno-_ has joined #ruby
ahegyi has joined #ruby
nettoweb has joined #ruby
vigintas has quit [Ping timeout: 246 seconds]
kohgpat has joined #ruby
tubuliferous_ has quit [Ping timeout: 240 seconds]
Tempesta has quit [Quit: Going offline, see ya! (( www.adiirc.com )]
Xeago has quit [Remote host closed the connection]
davedev24 has joined #ruby
Fredrich010 has quit [Ping timeout: 256 seconds]
davedev__ has joined #ruby
andykingking has quit [Quit: Leaving.]
Tempesta has joined #ruby
kohgpat has quit [Ping timeout: 244 seconds]
Tempesta has quit [Client Quit]
davedev2_ has quit [Ping timeout: 240 seconds]
mengu has joined #ruby
mengu has joined #ruby
Fredrich010 has joined #ruby
Tempesta has joined #ruby
davedev24 has quit [Ping timeout: 246 seconds]
htmldrum has quit [Ping timeout: 240 seconds]
Jackneill has joined #ruby
allcentury has joined #ruby
alcipir has joined #ruby
chipotle has joined #ruby
dionysus69 has joined #ruby
Blaguvest has joined #ruby
alcipir has quit [Ping timeout: 240 seconds]
vigintas has joined #ruby
tkuchiki has joined #ruby
dawkirst has quit [Remote host closed the connection]
hfp_work has quit [Ping timeout: 264 seconds]
dawkirst has joined #ruby
dikaio has quit [Quit: ........]
alcipir has joined #ruby
hfp_work has joined #ruby
vigintas has quit [Ping timeout: 265 seconds]
tkuchiki has quit [Remote host closed the connection]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
lkba has joined #ruby
tkuchiki has joined #ruby
alcipir has quit [Ping timeout: 244 seconds]
blackmesa has quit [Quit: WeeChat 1.3]
RegulationD has joined #ruby
tkuchiki has quit [Remote host closed the connection]
workmad3 has joined #ruby
krazyj has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
sulky has quit [Ping timeout: 240 seconds]
alcipir has joined #ruby
RegulationD has quit [Ping timeout: 260 seconds]
User458764 has joined #ruby
sulky has joined #ruby
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
roxtrongo has joined #ruby
Gnomethrower has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
workmad3 has quit [Ping timeout: 252 seconds]
moeabdol has quit [Ping timeout: 255 seconds]
roxtrong_ has quit [Ping timeout: 268 seconds]
alcipir has quit [Ping timeout: 268 seconds]
spider-mario has joined #ruby
subscope has joined #ruby
pontiki has joined #ruby
kohgpat has joined #ruby
Fredrich010 has quit [Remote host closed the connection]
Alina-malina has quit [Ping timeout: 252 seconds]
sl33k has quit [Quit: sl33k]
alcipir has joined #ruby
sl33k has joined #ruby
steffkes has joined #ruby
pontiki has quit [Ping timeout: 268 seconds]
elaptics`away is now known as elaptics`
alcipir has quit [Ping timeout: 240 seconds]
houhouli_ has quit [Remote host closed the connection]
dionysus69 has quit [Remote host closed the connection]
edwardly has quit [Ping timeout: 240 seconds]
Fredrich010 has joined #ruby
karapetyan has joined #ruby
crazydiamond has joined #ruby
step1step2_ has quit [Quit: Leaving]
step1step2 has joined #ruby
yfeldblum has joined #ruby
sl33k has quit [Quit: sl33k]
skcin7 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Outlastsheep has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
howdoicomputer has joined #ruby
tkuchiki has joined #ruby
leafybasil has joined #ruby
Rollabunna has joined #ruby
govg has quit [Ping timeout: 246 seconds]
leafybasil has quit [Remote host closed the connection]
karapetyan has quit [Ping timeout: 246 seconds]
User458764 has joined #ruby
howdoicomputer has quit [Ping timeout: 256 seconds]
karapetyan has joined #ruby
sameerynho has joined #ruby
govg has joined #ruby
benlovell has joined #ruby
FernandoBasso has joined #ruby
lxsameer has quit [Ping timeout: 265 seconds]
karapetyan has quit [Remote host closed the connection]
tkuchiki has quit [Remote host closed the connection]
<shevy> wake up people!
karapetyan has joined #ruby
Mon_Ouie has joined #ruby
workmad3 has joined #ruby
benlovell has quit [Ping timeout: 272 seconds]
govg has quit [Ping timeout: 256 seconds]
joncol has joined #ruby
leafybasil has joined #ruby
<joncol> Is it common to have a constructor in a module that you define? It seems a bit ugly to have to explicitly remember to call your constructor from every class that includes your module...?
karapetyan has quit [Ping timeout: 250 seconds]
cornerma1 has joined #ruby
jenrzzz has joined #ruby
leafybasil has quit [Remote host closed the connection]
rshetty has joined #ruby
cornerman has quit [Ping timeout: 250 seconds]
cornerma1 is now known as cornerman
moeabdol has joined #ruby
workmad3 has quit [Ping timeout: 255 seconds]
ndrei has joined #ruby
vigintas has joined #ruby
jenrzzz has quit [Ping timeout: 255 seconds]
<Diabolik> hi shevy
govg has joined #ruby
moeabdol has quit [Ping timeout: 260 seconds]
mengu has quit []
<Diabolik> >forever alone
<shevy> joncol you can probably add some post-include hooks
workmad3 has joined #ruby
everbot has joined #ruby
L8 has joined #ruby
L8 is now known as Guest37498
<joncol> shevy: nice idea, I'll read up on those.
workmad3 has quit [Ping timeout: 240 seconds]
rshetty has quit [Remote host closed the connection]
Mark__ has joined #ruby
Mark__ has left #ruby [#ruby]
rshetty has joined #ruby
rshetty has quit [Remote host closed the connection]
sdothum has joined #ruby
tkuchiki has joined #ruby
lxsameer_ has joined #ruby
sameerynho has quit [Ping timeout: 264 seconds]
leafybasil has joined #ruby
FernandoBasso has quit [Quit: WeeChat 1.3]
Guest37498 is now known as L8
L8 has quit [Changing host]
L8 has joined #ruby
naztharune has joined #ruby
ponga has joined #ruby
phutchins has joined #ruby
clx_ has quit [Ping timeout: 250 seconds]
charliesome_ has joined #ruby
ruurd has joined #ruby
charliesome has quit [Read error: Connection reset by peer]
phutchins has quit [Ping timeout: 244 seconds]
skade has joined #ruby
jamto11 has joined #ruby
govg has quit [Ping timeout: 240 seconds]
govg has joined #ruby
<purplexed^> how often is currying, functional composition, and lambdas used in Ruby... ?
leafybasil has quit [Remote host closed the connection]
<purplexed^> is it prevalent, or is it something that the language allows, but only few use
<purplexed^> It seems counter intuitive to use these approaches, if the code is supposed to easily understandable
lxsameer_ has quit [Ping timeout: 252 seconds]
sameerynho has joined #ruby
workmad3 has joined #ruby
jamto11 has quit [Ping timeout: 246 seconds]
<jhass> I don't see proc currying much used, if at all
<purplexed^> lambdas seem much more usable... it's popping up in many languages
naztharune has quit [Quit: naztharune has no reason]
teclator has quit [Remote host closed the connection]
roxtrongo has quit [Remote host closed the connection]
pontiki has joined #ruby
The_Phoenix has joined #ruby
workmad3 has quit [Ping timeout: 260 seconds]
ruurd has quit [Quit: ZZZzzz…]
tk__ has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
lxsameer_ has joined #ruby
dionysus69 has joined #ruby
pontiki has quit [Ping timeout: 264 seconds]
sameerynho has quit [Ping timeout: 264 seconds]
<joncol> I don't know about Ruby, but in languages like Haskell, ML, etc currying is very prevalent.
<purplexed^> yes, but I was asking specifically about Ruby :-)
<purplexed^> i realize it will be prevalent in pure functional languages ofcourse
leafybasil has joined #ruby
cwong_on_irc has joined #ruby
pontiki has joined #ruby
<purplexed^> I'm just learning Ruby as a C# developer, and I would like to understand what are common techniques, eventhough the language does alot more
<adaedra> purplexed^: read code.
<shevy> purplexed^ lambda is used quite a lot, look at the rack code
<joncol> purplexed^: Studying the other languages' use of currying/partial application can be useful also for Ruby, I think.
<purplexed^> that sounds in efficient, if I can ask developers with experience, what is prevalent
<purplexed^> inefficient*
pathrocle has joined #ruby
<shevy> purplexed^ see here http://pastie.org/pastes/10506254/text rack uses lambda both in lib/ and for testing in test/
govg has quit [Ping timeout: 244 seconds]
skade has quit [Quit: Computer has gone to sleep.]
<purplexed^> adaedra: I can't figure out something is prevalent, other than asking other developers with much more experience than I have in the language. I can read code sure... but that doesn't really ask my question.... and will need to track it from reading code... and that's why I need to ask other with experience
Feyn has quit [Quit: Leaving]
<purplexed^> s/ask/answer
<shevy> you could try to ask if anyone here is using a lot of lambdas :)
<purplexed^> I thought my question was quite concise :)
workmad3 has joined #ruby
yfeldblum has quit [Ping timeout: 246 seconds]
<shevy> yeah, save for lambdas the rest is not used
<purplexed^> okay
<purplexed^> thanks
RegulationD has joined #ruby
Alina-malina has joined #ruby
fantazo has quit [Quit: Verlassend]
moeabdol has joined #ruby
arup_r has joined #ruby
RegulationD has quit [Ping timeout: 244 seconds]
Rollabunna has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 272 seconds]
demonlove has joined #ruby
<adaedra> well, I happen to use currying
kirun has joined #ruby
<shevy> lies!
<adaedra> no.
<shevy> code!
cwong_on_irc has quit [Quit: Leaving.]
<shevy> purplexed^ now you can study currying
<shevy> the art of applying curry to one's meal
<purplexed^> i did already
moeabdol has quit [Ping timeout: 250 seconds]
rippa has joined #ruby
Fredrich010 has quit [Ping timeout: 260 seconds]
<purplexed^> and I didn't find it hugeless helpful, for normal code
<purplexed^> that's why I was asking
<purplexed^> s/hugeless/hugely
<shevy> hugeless!
<adaedra> Well, it's indeed rarely used
<shevy> smallless
govg has joined #ruby
Kerber0s_ has joined #ruby
<purplexed^> No, Currying is after Haskell Curry, not the spice :)
beast has quit [Quit: Leaving]
Fredrich010 has joined #ruby
Kerber0s has quit [Ping timeout: 260 seconds]
leafybasil has quit [Remote host closed the connection]
demonlove has quit [Quit: Leaving]
pontiki has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
Thomas-0725 has joined #ruby
jgt has joined #ruby
<joncol> purplexed^: According to http://www.sitepoint.com/functional-programming-techniques-with-ruby-part-ii/, currying is "amazingly useful" :)
greenbigfrog has joined #ruby
<purplexed^> yes, and it is, .. but if it's a concept usually lost on the general population of Ruby developers, then I find it will cost more in development time, than using something that's "useful" but not normally understood.
Thomas-0725 has quit [Client Quit]
gregoriokusowski has joined #ruby
<joncol> purplexed^: You might be right.
<joncol> I guess it depends on in what context you're writing code.
alcipir has joined #ruby
sameerynho has joined #ruby
<purplexed^> yeah, and what team an so forth
<joncol> yes.
karapetyan has joined #ruby
<purplexed^> I'm a senior dev, so I need to take it into account
Thomas-0725 has joined #ruby
<purplexed^> my interns will probably get very confused
<purplexed^> but they already know about lambdas :)
everbot has quit [Ping timeout: 246 seconds]
L8 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kohgpat has quit [Ping timeout: 240 seconds]
<joncol> But if you find a really nice application of currying, you could use that as an excuse to teach them about it ?
Fredrich010 has quit [Ping timeout: 264 seconds]
<purplexed^> We don't currently use Ruby in our organisation, but I have two new projects that I think would be good to do in Ruby...
<purplexed^> all the developers are either Java or .NET folks
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
charliesome_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<purplexed^> so finding a good level to begin with, in coding style, is important
<joncol> purplexed^: Same situation here, but we're currently using C++. I just started up a new project using Ruby.
lxsameer_ has quit [Ping timeout: 268 seconds]
<purplexed^> oh, cool :) ... how are people reacting to it ?
alcipir has quit [Ping timeout: 255 seconds]
arup_r has quit [Ping timeout: 252 seconds]
<joncol> Thus far, it's only me that's using it. (We're only two programmers)
nettoweb has joined #ruby
<purplexed^> ah, okay :)
<purplexed^> we are 30 -some developers
<joncol> But development speed is much higher than C++, for many things.
zenguy_pc has quit [Read error: Connection reset by peer]
<purplexed^> what business area are you working in, and why do you consider Ruby a good match ?
alcipir has joined #ruby
<purplexed^> I work in media
Coldblackice has quit [Ping timeout: 252 seconds]
trosborn has quit [Quit: trosborn]
Fredrich010 has joined #ruby
<purplexed^> I'm working on a platform, where I can monitor servers, for CPU, Memory, HD-space, and verify if a port to a remote host is open. Since our ops team is unreliable we need to do that ourselves. And since we are multi platform, I needed a language that works equally well on Linux and Windows.
<joncol> Medical simulations. And we're currently doing an architectural rehaul, where we want to be able to support multiple connected devices, tablets etc. Our current C++ monolith is not very well suited to this. I quickly evaluated the following languages before we went with Ruby: Haskell (too exotic, hard to find people that know it), Python (no real benefits over Ruby), C# (boring :), Clojure (see Haskell).
<purplexed^> And i looked to Octopus Deploy, ... where it has agents on the client-servers... and I can ship code to it for scheduling and running
charliesome has joined #ruby
<joncol> purplexed^: nice
<purplexed^> joncol: okay, that sounds cool
simi has quit [Ping timeout: 272 seconds]
<purplexed^> I agree, eventhough Haskell is a nice language, it will be hard to find people who can code it
<purplexed^> I guess I don't agree C# is boring ;)
howdoicomputer has joined #ruby
<joncol> purplexed^: A more real disadvantage might be that it's still pretty Microsoft centric, even though that seems to be chaning.
phutchins has joined #ruby
alcipir has quit [Ping timeout: 256 seconds]
<purplexed^> yeah, ... if you have heard about Roslyn, and if you know how much their developers are emphasizing cross-platform support... it's very interesting what is happening. Also, they are working with Docker, to create containers specific for Windows
<purplexed^> being MS based is not a valid argument for not choosing their tools anymore :)
lxsameer_ has joined #ruby
Fredrich010 has quit [Ping timeout: 260 seconds]
sameerynho has quit [Ping timeout: 260 seconds]
<purplexed^> but being bound by their platform(s) is
devoldmx_ has quit [Remote host closed the connection]
pepperbreath1 has joined #ruby
otherj has joined #ruby
<joncol> Yes, that's good stuff (Roslyn etc)... So why did you go with Ruby instead of C#?
charliesome has quit [Client Quit]
<purplexed^> i'm working away from MS these days, trying to choose more "free" platforms.. like using nosql databases when I can
Fredrich010 has joined #ruby
<purplexed^> Because I need to install the .NET framework
<purplexed^> that's my main reason
leafybas_ has joined #ruby
<joncol> OK, your systems don't already have it?
<purplexed^> the second is that Ruby seems like a language that's open to code change, by shipping code over the wire
<purplexed^> well, like I mentioned, we use both linux and windows
pepperbreath has quit [Ping timeout: 246 seconds]
<purplexed^> the main project I'm working on should work for both Linux and Windows
<joncol> OK, I see. Well Ruby is nice. I'm not totally liking the duck typing thing and having no real way except tests to verify that objects implement a certain interface...
howdoicomputer has quit [Ping timeout: 268 seconds]
<purplexed^> and I don't like that C# is compiled for this scenarip
<purplexed^> -p+o
phutchins has quit [Ping timeout: 272 seconds]
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
`tim` has joined #ruby
<purplexed^> no, there are several things in Ruby that makes me feel uncomfortable... from a compiled language perspective
<purplexed^> but there are again several things that makes it applicable for my project
<joncol> Btw, have you tried Rubocop? Really nice way of enforcing common style and finding simple bugs.
<joncol> Static code analysis gem.
<purplexed^> no, but I'll look into that, thanks
<joncol> Easily integratable into Emacs, if you happen to use that :)
<joncol> Also other editors I'm sure.
rshetty has joined #ruby
<purplexed^> you can do the same in C# with Roslyn, in your unit tests, because the code because objects
<purplexed^> becomes*
<purplexed^> the whole codebase becomes a syntaxtree
<purplexed^> and you can query it like it was a xml document or something like that
<purplexed^> check for naming conventions etc.
User458764 has joined #ruby
otherj has quit [Quit: .]
bonhoeffer has joined #ruby
zenguy_pc has joined #ruby
Pupp3tm4st3r has joined #ruby
bonhoeffer has quit [Client Quit]
djellemah has joined #ruby
Thomas-0725 has quit [Quit: Textual IRC Client: www.textualapp.com]
sameerynho has joined #ruby
lxsameer_ has quit [Ping timeout: 265 seconds]
demonlove has joined #ruby
BlackGear has joined #ruby
s00pcan has joined #ruby
s2013 has joined #ruby
Or1on has joined #ruby
steffkes has quit [Ping timeout: 252 seconds]
crime has joined #ruby
leafybas_ has quit [Remote host closed the connection]
rbennacer has joined #ruby
BlackGear has quit [Ping timeout: 244 seconds]
Soda has joined #ruby
workmad3 has joined #ruby
RegulationD has joined #ruby
willardg has joined #ruby
BlackGear has joined #ruby
stardiviner has quit [Ping timeout: 264 seconds]
ibouvousaime has joined #ruby
asad has joined #ruby
kohgpat has joined #ruby
asad is now known as Guest16519
CloCkWeRX has quit [Quit: Leaving.]
Guest16519 is now known as mu_
<mu_> What's the difference between class_eval and module_eval?
<jhass> I think there's none
<mu_> jhass: So module_eval is just there because it makes more sense to use this on modules?
moeabdol has joined #ruby
sameerynho has quit [Quit: Leaving]
<jhass> because Ruby core likes aliases
<mu_> jhass: Is there a way I can programmatically get aliases for a method?
cmoneylulz has joined #ruby
BlackGear has quit [Ping timeout: 244 seconds]
<jhass> didn't you ask this yesterday/earlier already?
RegulationD has quit [Ping timeout: 260 seconds]
<mu_> jhass: Yeah, earlier today but I had to go somewhere so I left..
workmad3 has quit [Ping timeout: 272 seconds]
<jhass> ?logs
<ruboto> You can find a log of this channel at http://irclog.whitequark.org/ruby/
kohgpat has quit [Ping timeout: 252 seconds]
Ankhers has quit [Ping timeout: 240 seconds]
<mu_> jhass: Yeah I can't find an answer in the log. Do you know if there is a way? Or I just have to google for aliases?
sepp2k has joined #ruby
<jhass> http://irclog.whitequark.org/ruby/2015-10-25#14411557; is a pretty clear answer I think
moeabdol has quit [Ping timeout: 265 seconds]
Ankhers has joined #ruby
<jhass> most aliases properly appear as such in the docs, for the rest you usually can judge by them having the exact same docs
<mu_> jhass: When aliasing a method, does a new method get created that's just a copy of original method?
<jhass> that depends on the type of alias used
willardg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<jhass> alias_method does create a copy, alias only adds the name
<jhass> thus the former is a method call and the latter is syntax btw
<jhass> on the C level often the same C function is just bound to multiple names
chipotle has quit [Quit: cheerio]
<mu_> jhass: Isn't alias_method wasteful then? It creates a new method instead of just creating an alias that references the old method.
rshetty has quit [Remote host closed the connection]
<jhass> well, you won't do it in loops at runtime or anything like that, only when your program gets loaded. So the discussion is pretty mood, in Ruby anyway
zotherstupidguy has joined #ruby
karapetyan has quit [Remote host closed the connection]
govg has quit [Ping timeout: 250 seconds]
`tim` has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
govg has joined #ruby
hays has quit [Ping timeout: 244 seconds]
mollusk_ has joined #ruby
mu_ has quit [Quit: Page closed]
demonlove has quit [Quit: Leaving]
atomical has joined #ruby
dionysus69 has quit [Quit: dionysus69]
demonlove has joined #ruby
arup_r has joined #ruby
<shevy> and gone he is again!
<shevy> he always has to go somewhere
<adaedra> some people have something called "a life", shevy. you should try it.
<crime> busy guy, aliasing all those methods
<crime> burnt
govg has quit [Ping timeout: 255 seconds]
kohgpat has joined #ruby
codecop has joined #ruby
<shevy> adaedra oh yeah I also always disconnect from IRC
clx_ has joined #ruby
zotherstupidguy has quit [Ping timeout: 250 seconds]
cmoneylulz has quit [Remote host closed the connection]
<demonlove> '-'
clx__ has joined #ruby
clx_ has quit [Ping timeout: 250 seconds]
joncol has quit [Quit: leaving]
devoldmx has joined #ruby
beast has joined #ruby
crazydiamond has quit [Remote host closed the connection]
zotherstupidguy has joined #ruby
rshetty has joined #ruby
BlackGear has joined #ruby
devoldmx has quit [Ping timeout: 240 seconds]
ibouvousaime has quit [Read error: Connection reset by peer]
simi has joined #ruby
Pupp3tm4st3r has quit [Remote host closed the connection]
leafybasil has joined #ruby
kohgpat has quit [Ping timeout: 250 seconds]
tk__ has quit [Quit: ばいばい]
cmoneylulz has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea> jhass: I retract my previous statement: https://eval.in/456502
leafybasil has quit [Remote host closed the connection]
<Ox0dea> "Line of definition" is hardly the greatest comparator, but it "works".
Cyther has joined #ruby
diegoaguilar has joined #ruby
<jhass> Ox0dea: now make it work for core :P
kohgpat has joined #ruby
<Ox0dea> jhass: Aye, I suspect native methods were the intended target, but they're a no-go. :<
<jhass> well, pry-doc has found some way to figure out the source location, no?
beast_ has joined #ruby
<Ox0dea> Sure, it uses banister's method_source gem, but I forgot whether it provides the same semantics.
roxtrongo has joined #ruby
<Ox0dea> That is, a #source_location which would compare equal for aliased methods.
govg has joined #ruby
s2013 has joined #ruby
al2o3-cr has quit [Read error: Connection reset by peer]
al2o3-cr1 has joined #ruby
<Ox0dea> Scratch that; I was way off.
ajb- is now known as ajb
<Ox0dea> pry-doc uses static data. :<
BlackGear has quit [Ping timeout: 244 seconds]
BlackGea_ has joined #ruby
lkba has quit [Remote host closed the connection]
AlphaAtom has joined #ruby
roxtrongo has quit [Ping timeout: 250 seconds]
Cyther has quit [Quit: Leaving]
Cyther has joined #ruby
Pathfinder_ has joined #ruby
NeverDie has joined #ruby
<shevy> the world is not (yet) perfect
<shevy> * symbol.c (op_tbl): add DOTQ for ripper. [Feature #11537]
<shevy> what is DOTQ?
Pupp3tm4st3r has joined #ruby
al2o3-cr1 is now known as al2o3-cr
<Ox0dea> shevy: .?
<Ox0dea> It's the safe navigation operator's token.
bmurt has joined #ruby
BlackGea_ has quit [Quit: Textual IRC Client: www.textualapp.com]
<shevy> ah
<shevy> "safe navigation operator's token" has a lot more information than DOTQ!
diegoaguilar has quit [Quit: Leaving]
cmoneylulz has quit [Remote host closed the connection]
BlackGear has joined #ruby
workmad3 has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
spuk has joined #ruby
kfpratt has joined #ruby
moeabdol has joined #ruby
<Ox0dea> Finally! http://git.io/vWal7
<Ox0dea> I didn't even know how badly I wanted that.
demonlove has quit [Ping timeout: 264 seconds]
BlackGear has quit [Ping timeout: 240 seconds]
workmad3 has quit [Ping timeout: 250 seconds]
asad_ has joined #ruby
BlackGear has joined #ruby
<asad_> jhass: Can you explain this? https://eval.in/456506
<crime> If I wanted to have a program take input in, but with prompts and such, is there a repl gem I should use, or should I just do it all with .gets?
BlackGear has quit [Max SendQ exceeded]
moeabdol has quit [Ping timeout: 272 seconds]
zotherst1 has joined #ruby
BlackGear has joined #ruby
<apeiros> crime: puts & gets works. but check out stdlib's readline
<apeiros> also take a look at the highline gem
zotherstupidguy has quit [Ping timeout: 268 seconds]
<crime> will do, thanks!
<asad_> apeiros: Can you explain why this is false? https://eval.in/456506
<apeiros> well, for prompt on same line, you'll actually need print + $stdout.flush
<Ox0dea> >> binding == binding # asad_
<ruboto> Ox0dea # => false (https://eval.in/456507)
<apeiros> asad_: it's better to just ask the channel as a whole
<Ox0dea> Kernel#binding creates a new Binding.
<apeiros> and to put in words what Ox0dea demonstrated: binding always… creates a new binding :)
<apeiros> Ox0dea beat me to it
<asad_> Also, in irb TOPLEVEL_BINDING.local_variables does not have :foo in the list. While binding has :foo in it. I don't understand...
<apeiros> a binding is more like a snapshot
<apeiros> it will not contain locals which did not exist when it was created
<apeiros> and you can't create new locals using it either (only within that binding itself)
<asad_> apeiros: Where are locals stored anyway?
<apeiros> not quite sure.
jamto11 has joined #ruby
djellemah_ has joined #ruby
gregf has quit [Quit: WeeChat 1.3]
<arup_r> Any idea how can I get rid of these error? https://gist.github.com/aruprakshit/899914fbe69d9f4e60c6
<arup_r> I am now 2 hours on it
BlackGear has quit [Quit: Textual IRC Client: www.textualapp.com]
howdoicomputer has joined #ruby
<crime> hey jhass, if you wanted, I could gist each rule in a gist, and then you could link to the gist and a lot of clients inline gists right into the buffer
<crime> so they wouldnt have to click on it
asad_ has quit [Ping timeout: 246 seconds]
<crime> or even a simple bot to just say it out loud into chat or privmsg it to the person
alcipir has joined #ruby
djellemah has quit [Ping timeout: 250 seconds]
<jhass> crime: we'll eventually add them to the bot from a DB shared with the site
ruurd has joined #ruby
<crime> i only mention it because it would humanize the process a bit more, and could potentially lower friction when someone gets rule'd on
Yzguy has joined #ruby
tmtwd has joined #ruby
howdoicomputer has quit [Ping timeout: 264 seconds]
weihan has joined #ruby
alcipir has quit [Ping timeout: 256 seconds]
bmurt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
patdohere has joined #ruby
symm- has joined #ruby
patdohere has quit [Max SendQ exceeded]
gregf has joined #ruby
sankaber has joined #ruby
ibouvousaime has joined #ruby
AlphaAtom has quit [Read error: Connection reset by peer]
AlphaAtom has joined #ruby
gregf has quit [Quit: WeeChat 1.3]
UnMorenoBlanco1 has joined #ruby
<UnMorenoBlanco1> i want to become a backend developer. Which plattform is better Node.JS or Ruby on rails?
Guest____ has joined #ruby
ruurd_ has joined #ruby
Guest____ has left #ruby [#ruby]
<shevy> someone wants to get nick banned
<UnMorenoBlanco1> is forbidden to ask here?
<shevy> UnMorenoBlanco1 why did you pick this nick
<UnMorenoBlanco1> cause i like it
<UnMorenoBlanco1> mmmm
<UnMorenoBlanco1> donald trump racism here?
<shevy> UnMorenoBlanco1 come on buddy, show that I am wrong - change your nick
<jhass> UnMorenoBlanco1: what's better, a hammer or a saw? Both have their uses and things they do better
<UnMorenoBlanco1> why i must change my nick?
step1step2_ has joined #ruby
govg has quit [Ping timeout: 250 seconds]
eminencehc has joined #ruby
<Ox0dea> crime: Which IRC clients inline gists?
<crime> irssi and weechat I think have plugins in for it, irccloud has some .js for it
steffkes has joined #ruby
steffkes has joined #ruby
User458764 has joined #ruby
anaeem1_ has joined #ruby
<crime> what client are you on? i bet someone has written one for yours too
johnny56 has joined #ruby
step1step2 has quit [Ping timeout: 256 seconds]
<Ox0dea> crime: /ctcp <somebody> version
Kerber0s_ has quit [Quit: Textual IRC Client: www.textualapp.com]
anaeem1_ has quit [Remote host closed the connection]
dawkirst has quit [Quit: Leaving...]
GnuYawk has joined #ruby
Yzguy has quit [Quit: Zzz...]
step1step2_ has quit [Quit: Leaving]
step1step2 has joined #ruby
<shevy> probably several weechat users here
<crime> I found that then: idk weechat myself, but I dont think that /pastebuf command is issued automatically for those urls
<crime> so an additional hook would be needed to pattern match the urls you were looking for and the use that command on them
<crime> so its less easy than I thought, but still not that hard
p1k has quit [Ping timeout: 256 seconds]
tkuchiki has quit [Remote host closed the connection]
rshetty has quit [Remote host closed the connection]
pathrocle has quit [Remote host closed the connection]
zotherst1 has quit [Ping timeout: 250 seconds]
pathrocle has joined #ruby
rshetty has joined #ruby
s2013 has quit [Read error: Connection reset by peer]
roxtrongo has joined #ruby
moeabdol has joined #ruby
zotherstupidguy has joined #ruby
eminencehc has quit [Remote host closed the connection]
pathrocle has quit [Ping timeout: 255 seconds]
diegoaguilar has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
User458764 has joined #ruby
tmtwd has quit [Ping timeout: 255 seconds]
lxsameer has joined #ruby
lxsameer has joined #ruby
eminencehc has joined #ruby
gregoriokusowski has quit [Quit: gregoriokusowski]
gregf has joined #ruby
bmurt has joined #ruby
alcipir has joined #ruby
hmsimha has quit [Ping timeout: 265 seconds]
RegulationD has joined #ruby
Pathfinder_ has quit [Remote host closed the connection]
gregoriokusowski has joined #ruby
RegulationD has quit [Ping timeout: 265 seconds]
uber has quit [Ping timeout: 255 seconds]
<crime> if I require something I've already required, i get back false. does this mean that in large projects, if something is required across files that there is a cache that checks if something has already been required?
roxtrong_ has joined #ruby
govg has joined #ruby
rshetty has quit [Remote host closed the connection]
mrtomme has quit [Ping timeout: 260 seconds]
Mon_Ouie has quit [Ping timeout: 260 seconds]
Asher has joined #ruby
nertzy has joined #ruby
rshetty has joined #ruby
mrtomme has joined #ruby
fedexo has joined #ruby
roxtrongo has quit [Ping timeout: 272 seconds]
ruurd_ has quit [Quit: ZZZzzz…]
<Ox0dea> crime: That's exactly right.
<Ox0dea> More specifically, Kernel#require does its deduplication by looking into $LOADED_FEATURES and bailing early if it finds the target therein.
<crime> ah
<crime> is there a list of special globals somewhere I can peruse?
uber has joined #ruby
bruno-_ has quit [Ping timeout: 255 seconds]
<crime> like within ruby, i mean
asad_ has joined #ruby
steffkes has quit [Ping timeout: 255 seconds]
<asad_> This is so weird...can someone explain why the global variable gets reset?
<Ox0dea> ?quickref crime
tmtwd has joined #ruby
<Ox0dea> Almost all of the globals are given some treatment there.
ruurd has joined #ruby
<crime> how do those work exactly, because if I do $some_global = 5; puts $some_global.class its just a Fixnum
rshetty has quit [Remote host closed the connection]
<crime> there's not a global class?
pwnd_nfsw has joined #ruby
<Ox0dea> No, global variables are just identifiers.
rshetty has joined #ruby
<Ox0dea> >> global_variables # crime
<ruboto> Ox0dea # => [:$;, :$-F, :$@, :$!, :$SAFE, :$~, :$&, :$`, :$', :$+, :$=, :$KCODE, :$-K, :$,, :$/, :$-0, :$\, :$_, ...check link for more (https://eval.in/456519)
<Ox0dea> That's as "within Ruby" as it'll get, I suppose.
<crime> ah
pwnd_nsfw has quit [Ping timeout: 246 seconds]
bmurt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
danieli has joined #ruby
sebstrax has quit [Quit: Connection closed for inactivity]
bmurt has joined #ruby
asad_ has quit [Ping timeout: 246 seconds]
<crime> i assume most rubyists dont like the perl-ness of these and dont use them often
<Ox0dea> It's a mixed bag, really.
<Ox0dea> It's certainly not unwise to avoid the more obscure ones.
ibouvousaime has quit [Ping timeout: 250 seconds]
Pupp3tm4st3r has quit [Remote host closed the connection]
AlphaAtom has quit [Quit: Textual IRC Client: www.textualapp.com]
tubuliferous_ has joined #ruby
AlphaAtom has joined #ruby
<crime> so being that $LOADED_FEATURES is just a list of paths, I could potentially do all of my requiring in one file by just pushing into that array. is that what Gemfiles are doing, or is that another component?
hiyosi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
webopsx has joined #ruby
weihan has quit [Ping timeout: 240 seconds]
roxtrong_ has quit [Remote host closed the connection]
skweek has joined #ruby
phutchins has joined #ruby
devoldmx has joined #ruby
rbennacer has quit [Remote host closed the connection]
bruno- has joined #ruby
bruno- is now known as Guest40721
janelleb has joined #ruby
ruby__ has joined #ruby
phutchins has quit [Ping timeout: 250 seconds]
symm- has quit [Ping timeout: 250 seconds]
devoldmx has quit [Ping timeout: 260 seconds]
asad_ has joined #ruby
diegoaguilar has quit [Remote host closed the connection]
<asad_> I find this real confusing, can someone explain please: https://eval.in/456522
<Ox0dea> asad_: For what it's worth, $SAFE can only be 0 or 1 in 2.3, but your previous example is indeed a little confusing.
<Ox0dea> $SAFE is created with rb_define_virtual_variable(), but so are "scope-local" globals like $~ and friends, so I'm not sure what's happening.
<jhass> crime: no, $LOADED_FEATURES tracks what has been loaded, it's not a work queue for the loader. Loading happens as you call require (or more specifically as it calls Kernel#load)
<jhass> crime: bundler restricts what can be loaded, it does so by resetting $LOAD_PATH to the list of gems and preventing rubygems from auto activating gems
webopsx has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<crime> so then each gem just has a path associated, or a url or w/e, and bundler requires each one?
<jhass> crime: Bundler.require is merely a convenience function that can (but doesn't have to) called after that setup and that tries to guess and execute a require call for each gem listed
<jhass> crime: actually loading gems is not bundlers main job, that's just optional bonus. Its main job is what _can_ be loaded (required)
<asad_> Ox0dea: Perhaps $SAFE isn't a global variable? It just looks like one?
<jhass> *defining what
<jhass> or *restricting what rather
<Ox0dea> asad_: Sure, but $~ isn't a global variable either.
<jhass> well, a mix of both actually
`tim` has joined #ruby
trabulmonkee has joined #ruby
<jhass> crime: and yes, Gem::Specification#require_paths is what Rubygems normally adds to the $LOAD_PATH when activating a gem
trabulmonkee has quit [Client Quit]
<Ox0dea> asad_: https://eval.in/456523
<jhass> crime: bundler reads that too, disables Rubygems activation and prepopulates $LOAD_PATH with the entries for the gems listed in the Gemfile.lock
<asad_> Ox0dea: Yeah, $~ isn't a global
<Ox0dea> asad_: Right, many variables with $ in their heads aren't.
<crime> so then if I can just use a gemfile, messing with $LOAD_PATH by hand probably isnt the greatest idea
workmad3 has joined #ruby
<jhass> sounds like reinventing the wheel, yes
willardg has joined #ruby
tuxero has joined #ruby
<Ox0dea> asad_: https://eval.in/456524
<Ox0dea> Clearly $SAFE is different from the other "non-global globals", but it's unclear what exactly is going on.
tuxero has quit [Client Quit]
<Ox0dea> $SAFE is "binding-local" or something.
Motoservo has joined #ruby
ItSANgo has quit [Ping timeout: 250 seconds]
Asher has quit [Quit: Leaving.]
<Ox0dea> I grant that it's a little weird, but hey, free sandboxes!
eminencehc has quit [Remote host closed the connection]
asad_ has quit [Ping timeout: 246 seconds]
<crime> jhass, so thats just regular ruby, so then a gem could potentially detect the ruby version or the platform, or basically anything and then issue a different array for the files variable in Gem::Specification
asad_ has joined #ruby
The_Phoenix has quit [Read error: Connection reset by peer]
workmad3 has quit [Ping timeout: 250 seconds]
<jhass> crime: mh, I'm not sure, there's a certain serialization happening to the specification and I'm not sure if the original gemspec is reparsed on activation
<jhass> I wouldn't be surprised if it's parsed on gem build only
diegoaguilar has joined #ruby
willardg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
zotherstupidguy has quit [Ping timeout: 260 seconds]
<crime> hm
`tim` has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<jhass> but your gem should have a single entry point to require anyway and you could switch on RUBY_PLATFORM there
VeryBewitching has joined #ruby
<crime> so I could require something in a project, and then that code could determined what else was needed depending on the environment, add the relevant code to $LOAD_PATH and then call require again on the additional components
skweek has quit [Ping timeout: 260 seconds]
<jhass> no, you should never need to mess with $LOAD_PATH really
<crime> im speaking hypothetical at this point, but it seems like it'd be possible to dynamically require different code based on the output of any arbitrary ruby code
Motoservo has quit [Quit: Shhh. I'm trying to get some sleep here.]
janelleb has quit [Ping timeout: 260 seconds]
<jhass> all your require's should be relative to your gem's base load path
Contigi777 has joined #ruby
asad_ has quit [Ping timeout: 246 seconds]
Motoservo has joined #ruby
<jhass> my_foo.rb: case RUBY_PLATFORM; when /linux/; require "my_foo/linux_support"; when /win32/; require "my_foo/windows_support"; else; whine!; end
<crime> ah
<crime> i gotcha
bigmac__ has quit [Ping timeout: 264 seconds]
<crime> then all the other guy would have to do is require 'my_foo' and it'll figure it out
<jhass> yeah
<crime> but that could be anything, day of the week, moon phase, etc
<crime> thats cool
<jhass> and if you follow http://guides.rubygems.org/name-your-gem/ a Bundler.require and similar stuff will do the right thing too
Contigi has quit [Ping timeout: 272 seconds]
<crime> how irritating would it be to have a bug in something that only happens on fridays after 3pm?
tmtwd has quit [Ping timeout: 240 seconds]
s00pcan has quit [Ping timeout: 268 seconds]
bryanray has joined #ruby
polysics has joined #ruby
<Ox0dea> > #define if(x) rand(42) && (x)
dopie has quit [Ping timeout: 244 seconds]
<crime> #define false rand(1)
I has joined #ruby
howdoicomputer has joined #ruby
<Ox0dea> Real (wo)men don't use <stdbool.h>.
I is now known as Guest58021
janelleb has joined #ruby
bmurt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Pupp3tm4st3r has joined #ruby
howdoicomputer has quit [Ping timeout: 250 seconds]
kfpratt has quit [Remote host closed the connection]
bonhoeffer has joined #ruby
janelleb has quit [Ping timeout: 240 seconds]
bonhoeffer has quit [Client Quit]
chipotle has joined #ruby
stamina has quit [Ping timeout: 250 seconds]
kimegede has joined #ruby
n008f4g_ has joined #ruby
alcipir has quit [Ping timeout: 260 seconds]
mollusk_ has quit [Ping timeout: 265 seconds]
alcipir has joined #ruby
ljt has joined #ruby
mgorbach has quit [Quit: ZNC - http://znc.in]
patdohere has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mgorbach has joined #ruby
janelleb has joined #ruby
ljt has quit [Client Quit]
dotrb has quit [Quit: Lost terminal]
alcipir has quit [Ping timeout: 246 seconds]
relix has joined #ruby
ljt has joined #ruby
patdohere has quit [Read error: Connection reset by peer]
Soda has quit [Remote host closed the connection]
baweaver has joined #ruby
<Ox0dea> Would `::?` as a "safe resolution operator" be completely insane?
<Ox0dea> I'm trying to think of when it would be okay to fall back on the enclosing namespace if an expected entity turned up absent.
ta_ has quit [Remote host closed the connection]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jhass> Foo::?Bar.?new ? ugh
JammyHammy has quit [Read error: Connection reset by peer]
<crime> hey really dumb question, working on my little text game, if a do some_object = nil, GC will eventually pick it up, right? even if it has instance variables and stuff attached to it, as long as I dont reference the object after I assign it to nil, it should get recycled
jenrzzz has joined #ruby
baweaver has quit [Remote host closed the connection]
<crime> what about ^?
<crime> er, just ^
<crime> cuz you're going UP a namespace
alcipir has joined #ruby
arooni has joined #ruby
swgillespie has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
hectortrope has quit [Quit: WeeChat 0.4.2]
<jhass> correct, objects without a reference will be collected
edwardly has joined #ruby
<jhass> some_object = nil will make some_object reference nil instead of whatever it referenced previously
<crime> also how exactly do I do that, because I get an error when I try to do self = nil
nemo_ has joined #ruby
<jhass> self isn't an external reference, it doesn't count into the GC's checking
edwardly has quit [Changing host]
edwardly has joined #ruby
alcipir has quit [Ping timeout: 250 seconds]
UnMorenoBlanco1 has quit [Read error: Connection reset by peer]
ruurd has quit [Quit: ZZZzzz…]
bryanray has quit [Ping timeout: 260 seconds]
Yzguy has joined #ruby
UnMorenoBlanco1 has joined #ruby
UnMorenoBlanco1 has quit [Max SendQ exceeded]
UnMorenoBlanco1 has joined #ruby
UnMorenoBlanco1 has quit [Max SendQ exceeded]
UnMorenoBlanco1 has joined #ruby
UnMorenoBlanco1 has quit [Max SendQ exceeded]
karapetyan has joined #ruby
UnMorenoBlanco1 has joined #ruby
UnMorenoBlanco1 has quit [Max SendQ exceeded]
UnMorenoBlanco1 has joined #ruby
UnMorenoBlanco1 has quit [Max SendQ exceeded]
UnMorenoBlanco1 has joined #ruby
<Ox0dea> crime: ^ is a method, so that wouldn't work.
<Ox0dea> Well, it'd work for classes/modules that weren't constants, but that'd be weird.
<crime> hm idk i was spitballing
patdohere has joined #ruby
hololeap has quit [Ping timeout: 268 seconds]
<shevy> crime what kind of text game? a dungeon style game?
<crime> yeah, I'll gist it in a few minutes
<shevy> \o/
<crime> eventually it'll have a readline interface
dfinninger has joined #ruby
<Ox0dea> crime: Not io/console, then?
<crime> not yet
<crime> ive been running around a bit, have only actually had a little while to sit down and work on it
<crime> its terrible
<UnMorenoBlanco1> anyone here is doing the specialization of ruby on rails in coursera?
<jhass> ?rails
<ruboto> Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<crime> if there was a #coursera channel, thatd be a good place too, but sadly there isnt one
freerobby has joined #ruby
<shevy> I once wanted to write a ruby nethack in *curses
zotherstupidguy has joined #ruby
felltir has joined #ruby
<crime> yeah I found this gem dispel
<crime> gonna refurbish it a bit eventually
clx has joined #ruby
clx__ has quit [Ping timeout: 252 seconds]
<crime> dispel as in, dispel curses
<al2o3-cr> Sup! rubies
yqt has joined #ruby
<al2o3-cr> tick tock
<crime> variables with no sigil in a method definition are local to that method, right?
<shevy> yeah
<shevy> they won't persist outside the method
<crime> mk
symm- has joined #ruby
kimegede has quit [Quit: Leaving...]
diegoaguilar has quit [Remote host closed the connection]
<shevy> require 'gtksourceview3' TypeError: superclass mismatch for class InitError
fedexo has quit [Ping timeout: 246 seconds]
<shevy> hmm
moss has quit [Ping timeout: 246 seconds]
<shevy> I sorta lost gtksourceview support in the transition from ruby gtk2 to ruby gtk3
User458764 has joined #ruby
<crime> rubocop hates him! see the shocking reason why!
RegulationD has joined #ruby
<al2o3-cr> crime: you code this?
<crime> yeah
<crime> can I blame you though?
darkf has quit [Quit: Leaving]
<al2o3-cr> crime: sure :)
<crime> I've fixed about a dozen of those rubocop issues since I posted it, but I can't fix line 21: it says useless assignment to variable defender
Pupp3tm4st3r has quit [Remote host closed the connection]
<crime> how can I evaluate "defender = nil" in the context I need to kill that once it should be dead?
DoubleMalt has quit [Remote host closed the connection]
kohgpat has quit [Quit: leaving]
RegulationD has quit [Ping timeout: 255 seconds]
<shevy> you can simplify quite a bit there
moeabdol has quit [Ping timeout: 250 seconds]
<crime> yeah
<crime> all but one
<crime> and I know that this is awful
Underdogg has joined #ruby
<shevy> then line 46 to 48 will become simpler
Yzguy has quit [Quit: Zzz...]
grambo has joined #ruby
aspiers has quit [Ping timeout: 246 seconds]
<crime> well check that second gist i posted
last_staff has joined #ruby
<shevy> yeah you can simplify on dm.process_attack(HERO, MONSTER)
gambl0re has quit [Ping timeout: 240 seconds]
<crime> i know it could be better, but i would like to make it functional first
<crime> defender = nil doesnt do what I thought it would, how can I set the instance that an arg is referring to to nil?
<shevy> defender is only available within your method there anyway
sgambino has joined #ruby
<shevy> remember, you set a persistent constant prior to invoking the method with those two arguments: MONSTER = RandomMonster.new(3)
<crime> right
<crime> OH
<crime> so if process_attack was receiving RandomMonster.new(3), then would that work?
jonnie has joined #ruby
skade has joined #ruby
sgambino has quit [Client Quit]
<shevy> defender is only local to your method
<shevy> via RandomMonster.new, you create a new instance from your class RandomMonster, then assign this to the local variable defender, which will be available in your method
Nanuq has joined #ruby
skade has quit [Client Quit]
<shevy> people usually define a method called initialize, and pass in the required data, and assign to @foo instance variables
<shevy> so you could do:
<crime> but if I do defender = nil in that definition, will the instance of RandomMonster.new be assigned to nil or just the local variable?
<shevy> HERO = Player.new(5); MONSTER = RandomMonster.new(3); dm = DM.new(HERO, MONSTER)
yosiat has quit [Quit: Textual IRC Client: www.textualapp.com]
<shevy> you assign defender to nil
sl33k has joined #ruby
<shevy> the earlier instance of RandomMonster will be gone
beauby has joined #ruby
<shevy> but really use instance variables, they are the way to go when you wish to have persistent data; and if you don't want them anymore, you can assign them to nil, or simply remove them altogether via e. g. remove_instance_variable(:@foo)
<al2o3-cr> why apply a instance to a constant?
ta has joined #ruby
<crime> could I so @some_var at the top level of a file? or should I use another class to house player and monster objects?
skade has joined #ruby
jamto11 has quit [Remote host closed the connection]
<shevy> yeah you can use @var at the top level
<shevy> ideally you would namespace your @ under the same module or class name
<shevy> like module Dungeon; class Player ... or something
<crime> yeah I can separate this out to their respective files at some point
nemo_ has quit [Remote host closed the connection]
Rickmasta has joined #ruby
patdohere has quit [Read error: Connection reset by peer]
gambl0re has joined #ruby
yqt has quit [Ping timeout: 256 seconds]
saddad has joined #ruby
JammyHammy has joined #ruby
arooni has quit [Ping timeout: 246 seconds]
m3_del has joined #ruby
bmurt has joined #ruby
<crime> so shevy, if I had an array of entities within the game, with entities being members of classes or modules like players or characters, when I needed to kill an object, I could just set that position in the array to nil, and as long as method definitions dont mention a specific instance, it will be destroyed?
bmurt has quit [Client Quit]
devoldmx has joined #ruby
workmad3 has joined #ruby
rshetty has quit [Remote host closed the connection]
zarubin has joined #ruby
devoldmx has quit [Ping timeout: 255 seconds]
Fredrich010 has quit [Remote host closed the connection]
houhoulis has joined #ruby
<al2o3-cr> Someone explain polymorphism
freerobby has quit [Quit: Leaving.]
cwong_on_irc has joined #ruby
cwong_on_irc has quit [Max SendQ exceeded]
workmad3 has quit [Ping timeout: 240 seconds]
cwong_on_irc has joined #ruby
HANJIN has quit [Quit: HANJIN]
steffkes has joined #ruby
AccordLTN has quit []
<crime> is it like generics
zarubin has quit [Ping timeout: 260 seconds]
AccordLTN has joined #ruby
<saddad> providing the same interface to interact with a bunch of different types/objects
houhoulis has quit [Ping timeout: 246 seconds]
Rickmast_ has joined #ruby
Jardayn has joined #ruby
<al2o3-cr> saddad: Thanks -> :)
<al2o3-cr> thought i was tripping there for a moment
<saddad> no worries
<al2o3-cr> come play hangman everyone in channel 8
jamto11 has joined #ruby
Rickmasta has quit [Ping timeout: 250 seconds]
stamina has joined #ruby
<karapetyan> is "char" word is reserved in ruby?
alcipir has joined #ruby
<al2o3-cr> karapetyan: no
<karapetyan> can i use "char" as variable name?
<al2o3-cr> yep
<karapetyan> thanks
<al2o3-cr> but i wouldn't
ef has joined #ruby
nettoweb has joined #ruby
moss has joined #ruby
asxbr has joined #ruby
clx has quit [Ping timeout: 244 seconds]
cndiv has joined #ruby
User458764 has quit [Quit: Textual IRC Client: www.textualapp.com]
<karapetyan> how can i update values inside block? string.each_char { |}
<karapetyan> how can i update values inside block? string.each_char { |char| char.upcase! }
<karapetyan> yes, i know about string.upcase! but i have some condifions inside block
alcipir has quit [Ping timeout: 264 seconds]
clx has joined #ruby
skade has quit [Quit: Textual IRC Client: www.textualapp.com]
<crime> sounds like you want to map! instead if you are mutating the original string
steffkes has quit [Read error: Connection reset by peer]
<karapetyan> is there map for String class?
kimegede has joined #ruby
<crime> no but .split("") gives back an array of each character
<crime> so some_string.split("").map { |ch| ch.upcase! if some_conditions }
<al2o3-cr> String#chars
<kimegede> Would I be able to use the "factory_girl_rails" gem to generate some data for my development while clicking around? (Or is't only for test fixtures?)
<al2o3-cr> string is not a collection
houhoulis has joined #ruby
<al2o3-cr> >> "foobar".chars
<ruboto> al2o3-cr # => ["f", "o", "o", "b", "a", "r"] (https://eval.in/456534)
gener1c has joined #ruby
skade has joined #ruby
bigmac__ has joined #ruby
<crime> >> "crime is a cool guy".chars.map! { |ch| ch.upcase if ['a','e','i','o','u'].member?(ch) }
<ruboto> crime # => [nil, nil, "I", nil, "E", nil, "I", nil, nil, "A", nil, nil, "O", "O", nil, nil, nil, "U", nil] (https://eval.in/456535)
<crime> >> "crime is a cool guy".chars.map! { |ch| ch.upcase if ['a','e','i','o','u'].member?(ch) else ch }
<ruboto> crime # => /tmp/execpad-68b57125ae6b/source-68b57125ae6b:2: syntax error, unexpected keyword_else, expecting '} ...check link for more (https://eval.in/456536)
<karapetyan> okay
<karapetyan> thanks
<shevy> crime you don't really need to set much at all to nil; the garbage collector will run to get rid of unused objects without any references
Coldblackice has joined #ruby
gener1c_ has quit [Ping timeout: 272 seconds]
<al2o3-cr> crime: #select
<crime> yeah
<al2o3-cr> and don't use !
<al2o3-cr> unless really needed
ruurd has joined #ruby
<hanmac> crime hm why not gsub ?
centrx has joined #ruby
jenrzzz has joined #ruby
<crime> yeah thatd be good too
<al2o3-cr> or tr
alcipir has joined #ruby
skade has quit [Ping timeout: 252 seconds]
cndiv has quit [Quit: Be back later ...]
uber has quit [Ping timeout: 250 seconds]
yqt has joined #ruby
zarubin has joined #ruby
clx has quit [Ping timeout: 256 seconds]
jenrzzz has quit [Ping timeout: 268 seconds]
icedp has joined #ruby
relix has joined #ruby
Cyther has quit [Ping timeout: 272 seconds]
felltir has quit [Remote host closed the connection]
<karapetyan> h = "hello"; h.chars.map! { |i| i + "!" } ; p h #=> "hello" why not h!e!l!l!o!
dfinninger has quit [Ping timeout: 246 seconds]
Cyther has joined #ruby
djellemah_ is now known as djellemah
uber has joined #ruby
<jhass> karapetyan: h.chars creates a (new) array of (new) strings
<karapetyan> jhass: ok
<al2o3-cr> >> "hello".chars.map { |c| c << "!" }*''
<ruboto> al2o3-cr # => "h!e!l!l!o!" (https://eval.in/456539)
<jhass> jeez, just .join
<al2o3-cr> wow, whats got up your nose
<jhass> * is probably the most odd alias in Ruby core
<jhass> Array#*
<al2o3-cr> &ri Array#*
<al2o3-cr> there we go
swgillespie is now known as swgillespie[ATL]
<al2o3-cr> karapetyan: * AND join are the same, just to let you know
clx has joined #ruby
<al2o3-cr> on arrays
<jhass> except that you wouldn't do .join(''), just .join
asxbr has quit [Ping timeout: 272 seconds]
<al2o3-cr> karapetyan: `*` also called the splat operator
<al2o3-cr> e.g
clx has quit [Client Quit]
<jhass> not in this context, not at all
<karapetyan> oh, so many replies :) thanks folks!
<jhass> unary * is, binary * is just multiplication
<al2o3-cr> >> a = [3,4]; Math.hypot(*a)
<ruboto> al2o3-cr # => 5.0 (https://eval.in/456540)
<hanmac> >> p [1,2,3] * 2, [1,2,3] * "2"
<ruboto> hanmac # => [1, 2, 3, 1, 2, 3] ...check link for more (https://eval.in/456541)
<jhass> oh, hanmac is back
<al2o3-cr> hanmac: always around somewhere
<hanmac> jhass no i am not i am just for show ;P
<al2o3-cr> :P
Fredrich010 has joined #ruby
_blizzy_ has joined #ruby
* Qantourisc wonders CM vs C OS
<jhass> Qantourisc: let me guess, wrong channel? ;)
<Qantourisc> yep
<Qantourisc> off by one :p
ruurd has quit [Quit: ZZZzzz…]
Musashi007 has joined #ruby
chipotle has quit [Quit: cheerio]
ef has quit [Remote host closed the connection]
jgt has quit [Ping timeout: 240 seconds]
choke has quit [Remote host closed the connection]
Rickmast_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<al2o3-cr> who had a commodore 64?
* Coraline raises a hand
<al2o3-cr> first one i had being only early 30's
xxneolithicxx has quit [Remote host closed the connection]
Soda has joined #ruby
pandaant has quit [Remote host closed the connection]
saddad has quit [Ping timeout: 268 seconds]
<al2o3-cr> 10 PRINT ...
dikaio has joined #ruby
<al2o3-cr> memories
Fredrich010 has quit [Remote host closed the connection]
* al2o3-cr stay with you forever
<Coraline> I learned Assembly on the C64 so I could do hi-res graphics.
xxneolithicxx has joined #ruby
xxneolithicxx has quit [Max SendQ exceeded]
<Coraline> I was just a little kid
xxneolithicxx has joined #ruby
xxneolithicxx has quit [Max SendQ exceeded]
<al2o3-cr> Coraline: atari, amiga, acorn, spectrum any of these too?
hays has joined #ruby
xxneolithicxx has joined #ruby
<Coraline> I first got online with an Atari ST
xxneolithicxx has quit [Max SendQ exceeded]
<Coraline> It was my music computer. Built-in MIDI.
<al2o3-cr> nice :)
<Coraline> I used Video Toaster on an Amiga as well.
ahegyi has quit [Ping timeout: 250 seconds]
xxneolithicxx has joined #ruby
pygospa has quit [Quit: leaving]
<al2o3-cr> best pda i ever owned was the psion 3c 1mb Ram I think
<al2o3-cr> awesome little thing that was
pygospa has joined #ruby
<al2o3-cr> amiga 500 series ah the days
<Coraline> I had a Palm Pilot with a cell phone acccessory that plugged into the back. Using it I thought that having a combination PDA and cell phone was the worst idea ever.
ljt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<al2o3-cr> heh, yeah i had the gsm pcmia card 14.4kbs wow, slow isn't the word
<al2o3-cr> forgot what the language was on the psion now :(
skcin7 has joined #ruby
<al2o3-cr> just reminiscing really
hays has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
jgt has joined #ruby
hays has joined #ruby
<al2o3-cr> windows 3.11 who ever used this, or was ya'll brought up on linux
<bougyman> i bleed linux
<bougyman> but I remember 3.1.1
<bougyman> er 3.11
centrx has quit [Quit: "You cannot fix a machine by just power-cycling it with no understanding of what is going wrong."]
UnMorenoBlanco1 has quit [Quit: Leaving]
<al2o3-cr> got kicked out of school for computer related problems how i miss them days
<al2o3-cr> wish i would of listened now
<al2o3-cr> Mr x as been abusing the network, Mr X as done this, done that
`tim` has joined #ruby
uber has quit [Ping timeout: 252 seconds]
ql6wlld has joined #ruby
<al2o3-cr> shit happens can't dwell on the past and that
ql6wlld has quit [Client Quit]
<apeiros> mr x uses as instead of has, mr x uses of instead have… :-p
ql6wlld has joined #ruby
ql6wlld has quit [Client Quit]
<al2o3-cr> english was never my stong point
<al2o3-cr> heh
hololeap has joined #ruby
jgt has quit [Ping timeout: 250 seconds]
ljt has joined #ruby
<al2o3-cr> I'm that transfixed on ruby that i've forgot how to `ls`
<al2o3-cr> what is the matter with me?
<karapetyan> i feel it totally ugly
weemsledeux has joined #ruby
<karapetyan> but i don't know how to improve it
eminencehc has joined #ruby
gambl0re has quit [Ping timeout: 246 seconds]
<crime> so my dungeon game is now functional, i'll work on an interface tomorrow at some point
<apeiros> karapetyan: not ugly but wrong: don't use map! if you want the return value. use map in that case.
pathrocle has joined #ruby
<karapetyan> apeiros: ahh
<karapetyan> yes. so, how can i improve it?
<jhass> I'd split into words and handle each word
<karapetyan> i tried this before )
<apeiros> I'd probably use a single gsub :)
jgt has joined #ruby
<karapetyan> gsub - regular extension?
<karapetyan> expressions*
<apeiros> >> counter=0; string.gsub(/[^ ]/) { |m| counter += 1; counter.even? ? m.upcase : m.downcase }
<ruboto> apeiros # => undefined local variable or method `string' for main:Object (NameError) ...check link for more (https://eval.in/456542)
<jhass> string.split.map {|word| string.chars.map.with_index {|c, i| i.even? ? c.upcase : c.downcase }.join }.join(" ")
<apeiros> whoops, didn't mean to use >>
<jhass> >> "foo bar baz quux".split.map {|word| string.chars.map.with_index {|c, i| i.even? ? c.upcase : c.downcase }.join }.join(" ")
<ruboto> jhass # => undefined local variable or method `string' for main:Object (NameError) ...check link for more (https://eval.in/456543)
<jhass> eh
<apeiros> >> counter=0; "hello world".gsub(/[^ ]/) { |m| counter += 1; counter.even? ? m.upcase : m.downcase }
<ruboto> apeiros # => "hElLo WoRlD" (https://eval.in/456544)
<jhass> >> "foo bar baz quux".split.map {|word| word.chars.map.with_index {|c, i| i.even? ? c.upcase : c.downcase }.join }.join(" ")
<ruboto> jhass # => "FoO BaR BaZ QuUx" (https://eval.in/456545)
Rickmasta has joined #ruby
<apeiros> hm
<apeiros> >> "hello world".gsub(/[^ ]/).with_index { |m, i| i.even? ? m.upcase : m.downcase }
<ruboto> apeiros # => "HeLlO wOrLd" (https://eval.in/456546)
karapetyan has quit [Remote host closed the connection]
<apeiros> hah
<jhass> neat
<apeiros> keep forgetting that we can do that now
<apeiros> well, where now = for some time already
karapetyan has joined #ruby
jupitertheplanet has joined #ruby
<jhass> apeiros: it's not correct though
<apeiros> karapetyan: so `"hello world".gsub(/[^ ]/).with_index { |m, i| i.even? ? m.upcase : m.downcase }` is how I'd do it :)
<apeiros> jhass: what what whaaat?
<jhass> each word should reset
uber has joined #ruby
<jhass> >> "hello world".split.map {|word| word.chars.map.with_index {|c, i| i.even? ? c.upcase : c.downcase }.join }.join(" ")
<ruboto> jhass # => "HeLlO WoRlD" (https://eval.in/456547)
RegulationD has joined #ruby
<jhass> yours does wOrLd
<apeiros> ah, right
<apeiros> I just skip spaces, I don't reset
psy_ has quit [Ping timeout: 268 seconds]
<apeiros> hrm, now I'm tempted to do clever. but clever is bad, m'kay?
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
abra0 has quit [Quit: ZNC - 1.6.0 - http://znc.in]
<apeiros> jhass: though yours fails on multiple spaces. not necessary a problem.
<apeiros> >> s = "foo bar"; s.split.join(" ")
<jhass> well, it squeezes
<ruboto> apeiros # => "foo bar" (https://eval.in/456548)
sdothum has joined #ruby
Motoservo has quit [Ping timeout: 264 seconds]
<apeiros> erp, forgot the ==
<apeiros> right
karapetyan has quit [Ping timeout: 256 seconds]
abra0 has joined #ruby
RegulationD has quit [Ping timeout: 244 seconds]
saddad has joined #ruby
pygospa has quit [Quit: reboot tut gut]
jenrzzz has joined #ruby
pygospa has joined #ruby
psy_ has joined #ruby
centrx has joined #ruby
psy_ has quit [Max SendQ exceeded]
Under has joined #ruby
psy_ has joined #ruby
karapetyan has joined #ruby
<al2o3-cr> my version
<al2o3-cr> >> "string".chars.map.with_index {|c, i| i % 2 == 0 ? c.upcase : c.downcase }.join
<ruboto> al2o3-cr # => "StRiNg" (https://eval.in/456549)
<al2o3-cr> thats when i think
<jhass> >> "hello world".chars.map.with_index {|c, i| i % 2 == 0 ? c.upcase : c.downcase }.join
<ruboto> jhass # => "HeLlO WoRlD" (https://eval.in/456550)
<jhass> well lucky
<jhass> >> "foo bar".chars.map.with_index {|c, i| i % 2 == 0 ? c.upcase : c.downcase }.join
<ruboto> jhass # => "FoO BaR" (https://eval.in/456551)
<al2o3-cr> why lucky?
<karapetyan> :)
<jhass> >> "fooo bar".chars.map.with_index {|c, i| i % 2 == 0 ? c.upcase : c.downcase }.join
ljt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<ruboto> jhass # => "FoOo bAr" (https://eval.in/456552)
<jhass> there
<jhass> should be BaR still
Underdogg has quit [Ping timeout: 272 seconds]
<jhass> also what's wrong with .even?
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<al2o3-cr> can use either
<karapetyan> yep, jhass right
jenrzzz has quit [Ping timeout: 256 seconds]
<al2o3-cr> phaha
<al2o3-cr> karapetyan: jhass is right about what?
jupitertheplanet has left #ruby [#ruby]
psy_ has quit [Read error: No route to host]
jgt has quit [Ping timeout: 260 seconds]
<karapetyan> jhass # => "FoOo bAr" (https://eval.in/456552)
<karapetyan> each new word should be upcased
arooni has joined #ruby
kimegede has quit [Quit: Leaving...]
emptyflask has joined #ruby
nettoweb has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
blue_deref has joined #ruby
chipotle has joined #ruby
<sl33k> jhass: hi mate
devbug has joined #ruby
<sl33k> lazy question…rails has so much dsl and my knowledge of ruby isnt 100%. I know :foo has to do with symbols (which i didnt quite get). But its used in this syntax here: get :help
<sl33k> just need some layman explanation to help me read along
<jhass> get(:help), it's just calling the method get and passes the symbol :help
Musashi007 has quit [Quit: Musashi007]
<apeiros> :foo has as much to do with symbols as "foo" with strings - namely, it is a literal
psy_ has joined #ruby
`tim` has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<sl33k> jhass: i can guess what the router code is doing
<sl33k> its the :foo that I dont know what is to it
<jhass> you get "foo"?
<sl33k> @foo is an instance variable
<karapetyan> al2o3-cr: sorry, not upcased. Capitalized
finisherr has joined #ruby
arthurnn has joined #ruby
<sl33k> “foo” is just a string
<jhass> :foo is just a symbol
ponga has quit [Quit: Connection closed for inactivity]
<sl33k> what is a symbol? there is no symbol in java
<sl33k> looking for equivalents *facepalm*
<jhass> a value that we use as markers/identifiers
Motoservo has joined #ruby
workmad3 has joined #ruby
<jhass> a lot of the usecases where you would use an enum in Java for example
<jhass> or a magic value assigned to a constant
<sl33k> final String FOO = “foo”; //java code
<finisherr> Can I pass the pid I want to watch in the Process.waitpid2 call?
<sl33k> enum should have number of states
<sl33k> and why not use foo instead of :foo
<jhass> finisherr: waitpid2(pid=-1, flags=0) → [pid, status]
<jhass> sl33k: because foo is a local variable, not a value
<finisherr> I guess -1 means any process and otherwise you pass the pid you’re interested in?
<jhass> &ri Process.waitpid2
<sl33k> jhass: so a symbol is simply a special kind of value
<sl33k> and used for syntactic sugar
<jhass> sl33k: pretty much
<sl33k> cos some languages might have used. get “home” instead
cwong_on_irc has quit [Quit: Leaving.]
<jhass> sl33k: and that should even work there too
<finisherr> I guess it behaves as I thought the docs explained
<finisherr> ok
<sl33k> jhass: thanks mate.
<jhass> sl33k: rails blurs the borders a bit sometimes, but generally you use a symbol if you want to compare, say {foo: 1}[:foo], something == :bar, case whateve; when :foo; when :bar; end; and so on
lxsameer has quit [Quit: Leaving]
<jhass> sl33k: don't use a symbol if you want to use it for its string value, "foo".upcase, "foo".size == 3, "foo".chars
codecop has quit [Remote host closed the connection]
freerobby has joined #ruby
<sl33k> jhass: yeah. your enum reference makes sense in that context
buharin has joined #ruby
<buharin> Hash.new {|hash, key| hash[key] = [] }
<buharin> I cannt get this is default value
ibouvousaime has joined #ruby
<sl33k> in java we have stuff like View.HOME and then you could do a static import and just write HOME in code. but you cant do HOME.toUppercase()
workmad3 has quit [Ping timeout: 265 seconds]
<buharin> but what is it?
<sl33k> HOME here is :home albeit finer syntac
<jhass> buharin: that sets Hash#default_proc, which is invoked when a key is accessed that doesn't exist
fschuindt1 has joined #ruby
<buharin> ok
Musashi007 has joined #ruby
<buharin> so when I invoke hash[:one] << "uno" it is invoked
<buharin> but what it do
<jhass> buharin: well, did you think about it? guess and explain it to me
<buharin> what does |hash, key| hash[key] = []
<jhass> buharin: which ruby tutorial do you follow?
<buharin> koans
<jhass> redo the section about blocks, or use something more verbose that explains blocks
<buharin> ok
Fredrich010 has joined #ruby
<fschuindt1> Guys, how can I do this: a = %w(mike zac robert) so: b = ["dan", "eric", a, "erika"] should produce an mixed array as: dan, eric, mike, zac, robert, erika. ?
<jhass> fschuindt1: *a
<buharin> jhass, but see this
<buharin> Hash.new([])
<fschuindt1> jhass: lovely! whats the name of this? naver heard of
<buharin> the default value is [] array
<buharin> but why after adding two values
ibouvousaime has quit [Client Quit]
<jhass> buharin: yes, but the same object for all keys
<buharin> hash[:one] << "uno"
<sl33k> jhass: do you like rails?
<buharin> and the next
ibouvousaime has joined #ruby
phutchins has joined #ruby
<buharin> it added to the same object for all keys
<buharin> why?
devoldmx has joined #ruby
<buharin> it is working like that
eminencehc has quit [Remote host closed the connection]
<jhass> sl33k: it's okay for what it is, I think I prefer it over comparable frameworks of other languages
<jhass> buharin: because it's the same object all the time
<sl33k> jhass: whats its alternative in rails?
<buharin> and if we do Hash.new("bullshit")
workmad3 has joined #ruby
<jhass> >> h = Hash.new([]); [h[:a].object_id, h[:b].object_id]
<ruboto> jhass # => [549922880, 549922880] (https://eval.in/456554)
<buharin> only unknowhn value will be bullshit
<sl33k> do we have other popular web frameworks in ruby world?
<jhass> >> h = Hash.new("bullshit); h[:c] << " still"; [h[:a], h[:b], h[:a].object_id, h[:b].object_id] # buharin
<ruboto> jhass # => /tmp/execpad-f6efd31afe85/source-f6efd31afe85:2: syntax error, unexpected tIDENTIFIER, expecting ')' ...check link for more (https://eval.in/456555)
<jhass> damn
<havenwood> sl33k: Sinatra, Roda, Lotus, etc.
<jhass> >> h = Hash.new("bullshit"); h[:c] << " still"; [h[:a], h[:b], h[:a].object_id, h[:b].object_id] # buharin
<ruboto> jhass # => ["bullshit still", "bullshit still", 554090320, 554090320] (https://eval.in/456556)
<havenwood> sl33k: http://roda.jeremyevans.net
<buharin> yeah but h[:c]
<buharin> didn't add value to the
<buharin> default one
<buharin> what Hash.new([]) does
<jhass> buharin: yes, it doesn't
<jhass> buharin: it sets Hash#default, which defaults to nil if you don't provide it
<buharin> yeah I know
<jhass> then why do you ask what it does?
<buharin> why Has.new("asda") and Hash.new([])
<buharin> work different
rshetty has joined #ruby
<jhass> they don't
<jhass> I just proved you they don't
karapetyan has quit [Remote host closed the connection]
<sl33k> thanks guys. I assume picking the others would be easier once I master rails to a level and also know my Ruby
karapetyan has joined #ruby
<jhass> sl33k: the former is most likely untrue, can't say anything agains the latter obviously
<buharin> jhass, I expect that Hasn.new([]) should work like this
phutchins has quit [Ping timeout: 256 seconds]
<jhass> "this"?
<buharin> hash[:one] << "uno"
devoldmx has quit [Ping timeout: 255 seconds]
<buharin> hash[:one] "uno"
<jhass> that doesn't make sense
<buharin> but hash[:undefinied] []
willardg has joined #ruby
<buharin> not adding all new values of every key to the array
<sl33k> jhass: i get you. there are quite a number of very good rails tutorial (hence, my statement)
workmad3 has quit [Ping timeout: 272 seconds]
<jhass> buharin: it's the _same_ array each time. it's the _same_ string each time. Not a copy.
gambl0re has joined #ruby
<jhass> >> h = Hash.new([]); h[:c] << "uno"; h.has_key? :c # buharin
<ruboto> jhass # => false (https://eval.in/456557)
<jhass> buharin: it just returns Hash#default, it doesn't set the key
<apeiros> also this:
<apeiros> >> h = Hash.new([]); h[:c] << "uno"; h.default
<ruboto> apeiros # => ["uno"] (https://eval.in/456558)
craysiii has joined #ruby
<apeiros> you modified the default value
<buharin> ye
_blizzy_ has quit [Ping timeout: 256 seconds]
rshetty has quit [Ping timeout: 260 seconds]
<buharin> okay I understand
<buharin> now :)
jgt has joined #ruby
karapetyan has quit [Ping timeout: 252 seconds]
Azure has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Fredrich010 has quit [Remote host closed the connection]
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
willardg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Fredrich010 has joined #ruby
<oz> /afk
EllisTAA has joined #ruby
WillAmes has quit [Remote host closed the connection]
WillAmes has joined #ruby
step1step2 has quit [Quit: Leaving]
_blizzy_ has joined #ruby
chopin has joined #ruby
<sl33k> jhass: why dont they just write: provide(title, “About”) instead of provide(:title, “About”)?
<sl33k> is it a quirk in the language?
<sl33k> title can be a variable
<jhass> sl33k: both are valid and do different things
<sl33k> i can only guess one sets a variable, other sets a symbol.
<jhass> as you said title is a local variable or method call
<jhass> no
<jhass> it doesn't set anything
<jhass> and you can't set a symbol anyway
<jhass> that'd be like setting 1
<sl33k> so what is the “About”
<jhass> 1 = "a"
<jhass> a string?
<sl33k> okay not “set”, declaration?
<jhass> it calls the method provide, the first variant passes the return value of the local variable or method call title as first argument, the second variant passes the symbol :title as first argument. Both pass the the string "About" as second argument
<jhass> no, it doesn't declare anything either
<sl33k> template generators allow you to set (dynamic) variable placeholders. Rails seem to favor symbols. I just wonder why
<jhass> the method provide may define things based on the arguments
<jhass> but it may not either
centrx has quit [Quit: "You cannot fix a machine by just power-cycling it with no understanding of what is going wrong."]
dfinninger has joined #ruby
<sl33k> still doesnt help my why :symbol and not variable symbol
<jhass> sl33k: please just accept it for now, we're just wasting our time here otherwise. It'll start to make sense soon enough, the more you use it, I promise.
<sl33k> jhass: alright. :|
<sl33k> :D
pygospa has quit [Remote host closed the connection]
<jhass> I've given you all the explanations there are, if it didn't click by now it'll just take time
chipotle has quit [Ping timeout: 265 seconds]
galeido has quit [Quit: Going offline, see ya! (www.adiirc.com)]
devoldmx has joined #ruby
nfk has joined #ruby
chipotle has joined #ruby
blizzy has joined #ruby
chipotle has quit [Client Quit]
_blizzy_ has quit [Ping timeout: 246 seconds]
harryk has quit [Remote host closed the connection]
ruby__ has quit [Ping timeout: 246 seconds]
<apeiros> sl33k: assume provide took a string instead of a symbol as first arg. then ask your question again:
<apeiros> > why don't they just write: provide(title, "About") instead of provide("title", "About")?
<apeiros> and then tell me the answer
<sl33k> apeiros: that makes sense. title is undefined. “title” and hence :title are literals
<sl33k> :D
<sl33k> just weird. i’d carry on.
<apeiros> you can do: title = "title"; provide(title, "About"). the same way you can do title = :title; provide(title, "About")
<sl33k> yeah...
<apeiros> i.e., "title", :title, 12, /foo/ - those are all *values*. title on the other hand is a variable, which *references* a value (unless it's a method call, then it'd return/evaluate to a value)
<sl33k> apeiros: i follow :)
cwong_on_irc has joined #ruby
<apeiros> if you do `x = 12; foo(x)` you do not pass x (the variable), you pass 12 (the value, referenced by x)
<al2o3-cr> >> "this got me some headache".partition(/[\s]/).reject {|n| n.ord == 32 }.map { |s| s.chars.map.with_index { |c, i | i.even? ? c.upcase : c.downcase }*''}*' '
<ruboto> al2o3-cr # => "ThIs GoT Me sOmE HeAdAcHe" (https://eval.in/456562)
nfk has quit [Quit: Try memory.free_dirty_pages=true in about:config]
<jhass> al2o3-cr: SoMe
<apeiros> al2o3-cr: [\s] == \s
jordanm has quit [Remote host closed the connection]
<sl33k> long lines like that is ewww
* sl33k facepalm @ functional power
buharin has quit [Remote host closed the connection]
Meeh has quit [Remote host closed the connection]
<al2o3-cr> ah because i was testing something before :(
<sl33k> i hope i dont see that in my codebase
<al2o3-cr> still doesn't work
* al2o3-cr persists on
* al2o3-cr i will not give up
fschuindt1 has quit [Read error: Connection reset by peer]
mengu has joined #ruby
mengu has joined #ruby
Asher has joined #ruby
jonnie has quit [Ping timeout: 268 seconds]
alcipir has quit [Ping timeout: 260 seconds]
EllisTAA has quit [Quit: EllisTAA]
mloy has joined #ruby
lkba has joined #ruby
ljt has joined #ruby
cornerma1 has joined #ruby
pulgolino has quit [Remote host closed the connection]
janelleb has quit [Ping timeout: 246 seconds]
dfinninger has quit [Remote host closed the connection]
geezyx has joined #ruby
<apeiros> >> "this got me some headache".gsub(/\G([^ ])([^ ])?| /) { $1 ? $1.upcase+($2 ? $2.downcase : "") : $& }
<ruboto> apeiros # => "ThIs GoT Me SoMe HeAdAcHe" (https://eval.in/456564)
cornerman has quit [Ping timeout: 260 seconds]
<apeiros> since you're still on it - the clever way. and I mean "clever" in all its bad meaning.
<jhass> what the hell is \G
<apeiros> magic!
<apeiros> last match position
<jhass> I see hidden state. It's everywhere.
<apeiros> actually it'd work without it too
janelleb has joined #ruby
<apeiros> one of the iterations needed it and I never tried without :D
<geezyx> ahoy, I have a module/class structure question for you fine people...
<geezyx> building a module to handle a restful interface with an api
RegulationD has joined #ruby
<geezyx> i want to instantiate rest-client resource that is inherited somehow between all classes in the module
<geezyx> for the API connection details, url, username, password, etc
<geezyx> how would one accomplish this?
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
chipotle has joined #ruby
stamina has quit [Ping timeout: 250 seconds]
cornerman has joined #ruby
<geezyx> for example, Service.new('url', 'username', 'password') would return an instance of the Service, with a rest-client instance embedded
<geezyx> or rather, Application::Service.new(url, username, password)
cornerma1 has quit [Ping timeout: 268 seconds]
<geezyx> application = Application::Service.new(url, username, password)
<geezyx> application.get_obj() would return an Application::SomeObject instance
dotix has joined #ruby
<geezyx> obj = application.get_obj()
RegulationD has quit [Ping timeout: 240 seconds]
Azure has joined #ruby
<geezyx> finally, obj.save would use the Application::Service instance that it somehow inherits or references, to make the API call to save that object
al2o3-cr has quit [Ping timeout: 264 seconds]
<geezyx> banging my head against the wall on this...
al2o3-cr has joined #ruby
jordanloky has joined #ruby
last_staff has quit [Read error: Connection reset by peer]
duncannz has joined #ruby
yfeldblum has joined #ruby
baweaver has joined #ruby
ruurd has joined #ruby
cornerma1 has joined #ruby
minimalism has quit [Quit: leaving]
ruurd has quit [Client Quit]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
cyle has joined #ruby
cornerman has quit [Ping timeout: 250 seconds]
sdothum has joined #ruby
cornerma1 is now known as cornerman
ruurd has joined #ruby
sepp2k has quit [Read error: Connection reset by peer]
dotix has quit [Quit: Leaving]
subscope has quit [Quit: Leaving]
Musashi007 has quit [Quit: Musashi007]
Asher has quit [Ping timeout: 246 seconds]
ItSANgo has joined #ruby
BraddPit1 has joined #ruby
sepp2k has joined #ruby
rshetty has joined #ruby
arup_r has quit [Quit: Leaving]
workmad3 has joined #ruby
Asher has joined #ruby
phillips1012 has quit [Ping timeout: 268 seconds]
solenoids has joined #ruby
arooni has quit [Ping timeout: 246 seconds]
skcin7 has quit [Ping timeout: 240 seconds]
rshetty has quit [Ping timeout: 250 seconds]
thelastinuit has joined #ruby
thelastinuit has quit [Client Quit]
everbot has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<crime> sl33k: symbols evalute to themselves. variables evaluate to whatever value they hold or nil
<crime> sl33k: so :name will ALWAYS give back :name, and name could give back "crime" or "sl33k" or anything
<al2o3-cr> sherlock i think i've done it
<al2o3-cr> >> "shit i need to stop drinking beer".split(/ /).map{ |s| s.chars.map.with_index { |c,i| (i%2).zero? ? c.upcase : c.downcase }.join }.join(' ')
<ruboto> al2o3-cr # => "ShIt I NeEd To StOp DrInKiNg BeEr" (https://eval.in/456565)
<sl33k> crime: that actually makes sense thanks
<sl33k> >> 4 + 3
<ruboto> sl33k # => 7 (https://eval.in/456566)
<sl33k> :D
workmad3 has quit [Ping timeout: 265 seconds]
<sl33k> >>(1..10).each {|i| puts i}
<ruboto> sl33k # => 1 ...check link for more (https://eval.in/456567)
<sl33k> good catch
ruurd has quit [Ping timeout: 260 seconds]
* sl33k facepalm
ruurd_ has joined #ruby
<sl33k> ranges is a nice to have in a programming language
Soda has quit [Remote host closed the connection]
<jhass> al2o3-cr: well, that's what I did earlier...
<jhass> no need for regex and I still don't get what's wrong with .even? though
janelleb has quit [Ping timeout: 265 seconds]
<al2o3-cr> jhass: gotta love you :)
<al2o3-cr> jhass: << or push?
<jhass> I tend to << except if I .pop close by
<al2o3-cr> heh
<pipework> I tend to just use #push, #pop, #shift, #unshift myself
<pipework> I like werdz
<al2o3-cr> werdz is good
zarubin has quit [Remote host closed the connection]
gsingh93 has quit [Quit: ZNC - http://znc.in]
<al2o3-cr> anyway off to play hangman now =)
gsingh93 has joined #ruby
skcin7 has joined #ruby
zarubin has joined #ruby
jonnie has joined #ruby
diegoaguilar has joined #ruby
AlphaAtom has quit [Quit: Textual IRC Client: www.textualapp.com]
<sl33k> >>(‘a’..’z’).to_a.shuffle[0..7].join
<ruboto> sl33k # => undefined local variable or method `‘a’' for main:Object (NameError) ...check link for more (https://eval.in/456568)
<jhass> sl33k: turn off smart quotes already
<sl33k> jhass: irc problem?
<pipework> What a misnomer.
alcipir has joined #ruby
<jhass> OS X problem
<pipework> There's a time when smart quotes aren't a problem?
<jhass> pipework: but it's shiny!
<jhass> I guess
<pipework> :D
<sl33k> jhass: funny it didnt turn on and code works on my rails console terminal
<havenwood> >> 'sunday brunch'.downcase.split(' ').map { |word| word.gsub /(.)./, &:capitalize }.join ' '
<ruboto> havenwood # => "SuNdAy BrUnCh" (https://eval.in/456569)
<sl33k> jhass: any idea how to turn it off?
<jhass> hell no, google knows
<havenwood> didn't mean to leave that downcase in there
<sl33k> jhass: on it :D
<al2o3-cr> havenwood: smartass :P
<havenwood> >> 'sunday brunch'.split(' ').map { |word| word.gsub /../, &:capitalize }.join ' '
<ruboto> havenwood # => "SuNdAy BrUnCh" (https://eval.in/456570)
<havenwood> al2o3-cr: ^ there
<havenwood> al2o3-cr: :P
Rickmasta has joined #ruby
<al2o3-cr> =)
zarubin has quit [Ping timeout: 260 seconds]
tmtwd has joined #ruby
<sl33k> >>('a'..'z').to_a.shuffle[0..7].join
<ruboto> sl33k # => /tmp/execpad-4037b9c138ea/source-4037b9c138ea:2: Invalid char `\x1C' in expression (https://eval.in/456571)
<al2o3-cr> sl33k: what are you try to do?
<havenwood> sl33k: try it first in your local REPL then show it off with ruboto
zenguy_pc has quit [Read error: Connection reset by peer]
<sl33k> works on my terminal: generate range of letters from a - z, convert to array, shuffle and pick elements from 0 - 7 index and then join
<al2o3-cr> sl33k: lose the `?`
badhatter has quit [Read error: Connection reset by peer]
folbo has joined #ruby
<sl33k> smart quotes yes ' ' '
<al2o3-cr> sl33k: (?a..?z).to_a -> [*?a..?z]
badhatter has joined #ruby
badhatter has quit [Changing host]
badhatter has joined #ruby
<waxjar> shuffle[0..7] -> sample(8) :D
<Ox0dea> waxjar: s/sample/rand/
* al2o3-cr long way round all the friggin time
Rickmasta has quit [Read error: Connection reset by peer]
<sl33k> >>('a'..'z').to_a
<ruboto> sl33k # => ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", ...check link for more (https://eval.in/456572)
<waxjar> Ox0dea, how would that work?
<sl33k> >>('a'..'z').to_a.shuffle
<ruboto> sl33k # => ["a", "o", "w", "q", "x", "d", "b", "i", "p", "u", "c", "t", "h", "n", "y", "k", "v", "m", "g", "z", ...check link for more (https://eval.in/456573)
jamto11 has quit [Remote host closed the connection]
nertzy has quit [Quit: This computer has gone to sleep]
<al2o3-cr> sl33k: use irb/pry
Rickmasta has joined #ruby
<jhass> ?experiment sl33k
<ruboto> sl33k, Please use your local irb or pry (see ?pry) to experiment, ruboto's eval functionality is for demonstration purposes only.
<sl33k> grr...wanted to make sure it works here too.
<sl33k> jhass: is bot available for direct message?
<jhass> ?try
<ruboto> Why don't you try it and see for yourself?
<sl33k> fixed
mag42c has joined #ruby
beast has quit [Ping timeout: 265 seconds]
beast_ has quit [Ping timeout: 246 seconds]
jamto11 has joined #ruby
<al2o3-cr> hanmac: said gsub too, «shakes head»
dfinninger has joined #ruby
cyle has quit [Ping timeout: 240 seconds]
<Ox0dea> waxjar: In hindsight, it's not even clear what you were suggesting.
<Ox0dea> What is `sample(8)`?
beast has joined #ruby
<al2o3-cr> Ox0dea: rand(8) ?
<jhass> >> (1..10).to_a.sample(8)
<ruboto> jhass # => [3, 4, 5, 6, 9, 8, 2, 7] (https://eval.in/456577)
swgillespie[ATL] has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jhass> chose n random elements from array
<jhass> (without repetition)
<waxjar> yea, i was joining in on the discussion above
<Ox0dea> Right, I just didn't realize you weren't suggesting using those in isolation.
<Ox0dea> We have nomenclature for avoiding this ambiguities, dammit. :P
<Ox0dea> *these
dotix has joined #ruby
craysiii has quit [Remote host closed the connection]
gsingh93 has quit [Quit: ZNC - http://znc.in]
<crime> oh shit
gsingh93 has joined #ruby
<crime> i didnt know sample took an argument
<Ox0dea> crime: How about #first and #last?
<al2o3-cr> crime: Signature: sample(*arg1)
beast has quit [Ping timeout: 250 seconds]
tomchapin has joined #ruby
<crime> >> [1,2,3,4,5].first(3)
<ruboto> crime # => [1, 2, 3] (https://eval.in/456578)
<crime> !!!!!!
<Ox0dea> Ruby loves you.
<crime> lua never loved me this way
beast has joined #ruby
<crime> >> (1..25).first(3) { |n| n.even?}
<ruboto> crime # => [1, 2, 3] (https://eval.in/456579)
<al2o3-cr> >> [1,2,3].map.with_index(100) { |n, i| [i,n] }
<ruboto> al2o3-cr # => [[100, 1], [101, 2], [102, 3]] (https://eval.in/456580)
<Ox0dea> crime: You've gone too far.
<crime> sure have
<jhass> ?experiment crime
<ruboto> crime, Please use your local irb or pry (see ?pry) to experiment, ruboto's eval functionality is for demonstration purposes only.
<Ox0dea> Every method takes an implicit block, but not every method uses it.
<crime> is there a take?
<Ox0dea> Yes.
<crime> block?
<Ox0dea> No. :(
<crime> nvm i have irb
<crime> oh
zenguy_pc has joined #ruby
<Ox0dea> But #take_while is a thing.
bigmac__ has quit [Quit: Leaving]
<sl33k> ruby language is so neat...
<al2o3-cr> Can someone tell me why with_index was introduced?
<Ox0dea> crime: See also #gsub(Regexp, Hash) and Hash#merge(&blk) for solidifying that well-grounded belief.
beast_ has joined #ruby
<jhass> >> 1.upto(100).each.lazy.select(&:even).first(3)
<ruboto> jhass # => undefined method `even' for 1:Fixnum (NoMethodError) ...check link for more (https://eval.in/456581)
<sl33k> just read the breaking down of an example of stylesheet_link_tag function in an erb
<jhass> >> 1.upto(100).each.lazy.select(&:even?).first(3)
<ruboto> jhass # => [2, 4, 6] (https://eval.in/456582)
<crime> jhass i was doing something similar
<sl33k> read like normal html, however we were actually writing ruby.
<crime> oh wait nvm thats across an enumerator
<Ox0dea> jhass: Please always use Float::INFINITY for demonstrations of laziness.
<crime> thats cool
<waxjar> al2o3-cr: sometimes you need the index in a loop, too
<jhass> Ox0dea: but it's so much to type :/
<al2o3-cr> >> -1.arg
<ruboto> al2o3-cr # => 3.141592653589793 (https://eval.in/456584)
<Ox0dea> jhass: Ruby needs inf, you say?
<crime> >> inf
<jhass> I'm not sure
<ruboto> crime # => undefined local variable or method `inf' for main:Object (NameError) ...check link for more (https://eval.in/456585)
<al2o3-cr> waxjar: but why change from 0
<crime> al2o3-cr: hows that work?
<Ox0dea> #with_index takes an optional start.
<waxjar> i'm sure it's useful sometimes :p
<al2o3-cr> :P
<al2o3-cr> crime: Returns 0 if the value is positive, pi otherwise
<Ox0dea> al2o3-cr: Were you asking why we have #with_index when #each_with_index exists?
<al2o3-cr> pry you gotta love it
<crime> but why pi?
houhoulis has quit [Remote host closed the connection]
<al2o3-cr> Ox0dea: no just with_index
PlasmaStar has quit [Ping timeout: 246 seconds]
<al2o3-cr> i know it takes an arbitatry arg, just wondering thats all
tmtwd has quit [Ping timeout: 246 seconds]
Jackneill has quit [Ping timeout: 264 seconds]
<Ox0dea> al2o3-cr: https://eval.in/456586
<al2o3-cr> looking
<Ox0dea> For constructing the jump targets in a brainfuck interpreter.
jonnie has quit [Ping timeout: 264 seconds]
<Ox0dea> I probably should've un-golfed it, but the utility of #each_with_index is there.
<al2o3-cr> In what case would you use and index other than 0
<al2o3-cr> i mean lua use starts at 1 but..
PlasmaStar has joined #ruby
<crime> yea boi
<al2o3-cr> crime: what is boi?
<pipework> mmm lua
<pipework> al2o3-cr: sk8rboi bruh, get2no
<sl33k> who minds explaining the comparative advantage of modules (it seems like a collection of static methods in java so far ).
<crime> lua's metatables are the second easiest way to think about metaprogramming
<pipework> sl33k: Mixins and namespaces are pretty neat.
<al2o3-cr> setmetatable(self, {})
* sl33k runs away. not on that level yet
<pipework> Lua's pretty great, it has functions, tables, and 6(technically 8) data types.
<Ox0dea> pipework: Right, but sl33k is presently under the misapprehension that they're only for namespacing.
<pipework> Ox0dea: My advice: get2no
<waxjar> i did some lua today, i missed a str.split function badly
<Ox0dea> pipework: Pardon?
<al2o3-cr> technically all objects are (tables/hashes/dicts) to an extent
<sl33k> pipework: i just noticed that i added a helper method to some module and I had it magically. I wondered why it wasnt some class like in the controllers
<crime> yeah lua is great until you have to do any kind of work with it
<ja> Anyone know if there's something like Hash#rekey (http://stackoverflow.com/a/19460706/1569350) in recent versions of Ruby or in Active Support?
<crime> thats when it falls apart
howdoicomputer has joined #ruby
avahey has joined #ruby
geezyx has quit [Ping timeout: 246 seconds]
<al2o3-cr> ja: not in core
<sl33k> the lines in dynamic language is blurry
<sl33k> e.g map
zarubin has joined #ruby
<ja> al2o3-cr: how about in Active Support then?
<pipework> sl33k: rails is a funny place to be learning ruby in.
<al2o3-cr> ja: idk never used it
<sl33k> pipework: i dont see what ruby itself would give me
<pipework> sl33k: I don't know what you're asking about.
<waxjar> ja: isn't that just Hash#merge / Hash#merge!
<pipework> crime: It's great for doing work with, you just need some batteries to make it productive.
<pipework> luarocks, interestingly enough, rocks.
<sl33k> i want to build something; a web app (plenty projects to think of in this space), mobile app or desktop app
<al2o3-cr> lua is great
<waxjar> ah, nvm, i see what's happening
<pipework> Lua is my favorite language. Great multi-paradigm language.
<Ox0dea> Ya'll need some EWD831.
<crime> pipework: yeah i still like lua a great deal
<ja> al2o3-cr: Alright then, thanks anyway
<ja> waxjar: No, because I want to rename the keys
<crime> Ox0dea: nice font.... NOT
<Ox0dea> ja: Why?
<pipework> crime: there's a link
CloCkWeRX has joined #ruby
<sl33k> also its weird not tying classes to file names in dynamic lang, but convenient
<Ox0dea> ja: That is, how did you end up with "bad" keys in the first place?
<Ox0dea> sl33k: The Stockholm syndrome is strong in this one.
<pipework> sl33k: There are loaders, like rails uses, that do assume that constant paths are relative to file paths.
Or1on has quit [Quit: gone]
<ja> Ox0dea: I have an Active Record model with a bunch of attribute aliases, and #attributes returns the unaliased versions, so I want to rekey that attribute hash with my aliases
howdoicomputer has quit [Ping timeout: 252 seconds]
<sl33k> Ox0dea: you lose me
<crime> i never knew there was a real reason, it made sense to me because [-1] is last, [0] is first, and [1] and is second
<Ox0dea> ja: Yeah, fair enough.
zarubin has quit [Ping timeout: 240 seconds]
<crime> i guess its the continuity of it
cndiv has joined #ruby
<Ox0dea> crime: It's the only choice whose "drawbacks" exist between keyboard and chair.
phutchins has joined #ruby
<ja> I guess I'll just steal facet's Hash#rekey *shrugs*
<al2o3-cr> i like the way Lua uses ... as oppose to *args
<pipework> ja: Why not just use Hash#delete?
<Ox0dea> al2o3-cr: Does ... go both ways like splat does?
<al2o3-cr> no
<crime> I actually prefer *args, because it has a name to it
<Ox0dea> And because it goes both ways.
<Ox0dea> Symmetry is bliss.
<crime> lua has no default parameter values either which i hate
<pipework> ja: attributes.each { |(key, val)| attributes[key.upcase] = attributes.delete(key) }
<al2o3-cr> crime: but easy to reproduce
<pipework> In attributes[key.upcase], replace key.upcase with the new key name.
<crime> sure var = var or some_val
<crime> but thats one more line
hiyosi has joined #ruby
zarubin has joined #ruby
<crime> ive read a bit of lua and i see the same idioms over and over and i just think that with a small bit of tinkering, these could be language features that we would have to spend lines on
marr has joined #ruby
<al2o3-cr> crime: you know what Lua was a config language
<crime> of course, lua owes its speed largely in part to its regularity and minimalism
<crime> yeah
<crime> SOL was data entry, LUA was config
<ja> pipework: that's a lot more convoluted than `attributes.rekey(attribute_aliases)`
<pipework> ja: Convoluted? Did you read it?
<al2o3-cr> that's why it's insy bitsy teeny weeny yellow poker ....
<al2o3-cr> pardon my english
<pipework> I'm more fond of using just plain ruby than using someone's library to have a shorter calling interface when it's something as trivial as this, really.
firstdayonthejob has quit [Quit: WeeChat 1.4-dev]
<Ox0dea> That way lies NIH madness, mind.
phutchins has quit [Ping timeout: 250 seconds]
<pipework> Ox0dea: When it's renaming keys in a hash?
<pipework> The value of a library that does that is so small that I'd rather not incur any cost of including it.
<Ox0dea> pipework: How many of Facets' conveniences does ja need to "need" before depending on it becomes justified?
firstdayonthejob has joined #ruby
<pipework> Ox0dea: When the cost of maintenance and complexity are no longer trivial.
<crime> Jim Weirich thought it was convenient enough...
zarubin has quit [Ping timeout: 264 seconds]
<pipework> Appeal to authority much?
<crime> I've tackled this before in lua projects where it's "oh well we don't want to have to depend on penlight"
<crime> but it works, it's stable, and it saves my time
charliesome has joined #ruby
<pipework> If you've already got facets on hand and are using it to great success, then I'd say to continue using it. But adding it to not write the simple thing I wrote, that's a bit silly to me.
<crime> sure
<crime> i wouldnt depend on penlight just to save a couple function definitions either
<crime> but in larger projects it definitely pays for itself
<crime> idk about facets but I would assume the principle applies
bigmac_ has joined #ruby
<pipework> I don't personally know the facets library.
<pipework> I feel a lot more confident about trusting ruby core than I do about facets.
xet7 has joined #ruby
bmurt has joined #ruby
<al2o3-cr> ruby vs lua (voice speaks in my head) and says ruby ruby ruby
dfinninger has quit [Remote host closed the connection]
folbo has quit [Quit: Lost terminal]
mag42c has quit [Quit: mag42c]
chopin has quit [Remote host closed the connection]
<al2o3-cr> lua hasn't got a patch on ruby
<al2o3-cr> even though it's a nice language
<crime> idk they each serve their own masters
<al2o3-cr> speed, thats probably it
<pipework> Lua's pretty great at a lot of things.
<crime> luajit is extremely well optimized, mike pall is a mad scientist
<crime> metaprogramming is a breeze with mt's
<al2o3-cr> metaprogramming isn't with ruby?
<crime> not imo
Voker57 has quit [Remote host closed the connection]
<Ox0dea> Wat.
<pipework> Not as good as lua's, imo.
<ja> pipework: Of course, yes. I still think attributes.each { |(key, val)| attributes[attribute_aliases[key]] = attributes.delete(key) } is pretty long compared to just attributes.rekey(attribute_aliases)
<al2o3-cr> Well, opinions are opinions
<crime> like DSLs and dynamic methods? I personally dont like the cognitive overhead
<pipework> ja: Yeah, length, but it's trivial to understand exactly what's going on because it's all just ruby.
<pipework> Ruby Core, nothing more.
<ja> pipework: Also, I'd need to stick attributes in a variable instead of it being a method call
<Ox0dea> al2o3-cr: Relevant to that voice in your head: https://github.com/tric/trick2013/blob/master/yhara2/entry.rb
<pipework> ja: I don't know what that's supposed to mean in this context.
jonnie has joined #ruby
<crime> but if rekey were in Ruby Core, would your opinion change?
<ja> pipework: My `attributes` is a method, not a variable.
<pipework> ja: I still don't know what you're trying to convey.
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<pipework> ja: Activemodel attributes are a method, yes.
<ja> pipework: I can't mutate the return value
<al2o3-cr> Ox0dea: When is your next hospital appointment? jk (LOL)
<pipework> ja: You can, it just doesn't change the name of the attribute internally, just the representation of it when you call #attributes
<Ox0dea> al2o3-cr: Run it for a laugh.
ljt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<ja> pipework: Sorry, of course I can mutate the return value, but… yes… now I'm confused… and it's really noisy here…
<ja> pipework: Besides, it wouldn't just be attributes.each { |(key, val)| attributes[attribute_aliases[key]] = attributes.delete(key) }
vdamewood has joined #ruby
<al2o3-cr> Ox0dea: Awesome!!!
<ja> it would be, in my case, local_record.attributes.each { |(key, val)| local_record.attributes[local_record.class.attribute_aliases[key]] = local_record.attributes.delete(key) }, which is very long
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<ja> and it wouldn't work because I'd call #attributes multiple times, getting new hash instances every time, is what I meant by "I can't mutate the return value"
<pipework> ja: ActiveModel's attributes stuff is a bit weird to want to rename though, you'll be dealing with modifying their assumptions and then you're tied to them.
<waxjar> ja: create a static method somewhere so you can reuse it? while you're at it, let it return a new hash instead of mutating the original?
<pipework> I'd look for a better path than what you're doing, really.
<al2o3-cr> Ox0dea: hanman the second you, that's made my night that =)
<Ox0dea> al2o3-cr: I feel the need to clarify that I am not yhara.
zarubin has joined #ruby
lkba has quit [Ping timeout: 260 seconds]
<al2o3-cr> :P
bonhoeffer has joined #ruby
<ja> pipework: What do you mean "modifying their assumptions"? The problem is I'm using a third-party database schema with really messed up column names which I've aliased to something more reasonable
<Ox0dea> al2o3-cr: shevy never did link to specific instances of the sort of code that gained hanmac this reputation; could you?
<ja> waxjar: Yeah, I just stole #rekey from facet and implemented an #aliased_attributes using that on ActiveRecord::Base, so it's all good now :D
<al2o3-cr> Ox0dea: probably not now, but believe me 1 for 1
bonhoeffer has quit [Client Quit]
diegoaguilar has quit [Ping timeout: 250 seconds]
htmldrum has joined #ruby
<pipework> But I also wouldn't go with this renaming business, I'd just make an object that's an activemodel object that delegates ruby-friendly methods to the actual activerecord instance using their weird column names.
<ja> Hmm, interesting idea, pipework
sdwrage has joined #ruby
<pipework> ja: Think decorator pattern. In this case, maybe steveklabnik's draper would work.
<ja> Maybe I should look into that. I don't have much experience with using ActiveModel other than through ActiveRecord.
swgillespie has joined #ruby
EllisTAA has joined #ruby
<pipework> ja: I just feel that making activerecord objects even more complex, especially in an way that's not the norm for those kinds of objects might be an idea you rue having executed on.
dikaio has quit [Ping timeout: 268 seconds]
Motoservo has quit [Quit: Motoservo]
<pipework> I've done it myself, to myself, and for others. When it's to myself, I just hate it and it sucks. When I do it for others, it's because they just want to use the model objects they're comfortable with and are usually somewhat afraid of things that aren't model objects to deal with directly.
<pipework> I'm generally more a fan of presenters, but a decorator would let this object appear more like the object you expect.
<ja> pipework: But a few lines of calls to `alias_attribute` just seem a lot easier/cleaner than having to create a decorator model. It's worked great until now when I had to use #attributes.
bonhoeffer has joined #ruby
<pipework> ja: If that works really whale for you without any hiccups or unexpected behaviour, go for it.
<pipework> If something gets a bit fucky, you might reach for an alternative.
<ja> Or, well, it's been a bit annoying that #inspect doesn't use the aliased attributes either, so I ended up writing an override for #inspect... >_>
<ja> so it's actually already a bit fucky right now, I guess, haha
grambo has quit [Quit: Leaving]
<pipework> I made this weird little fun bit that built in extra attributes onto models that were dynamical. Basically, it was just a has_many with delegates and redefining a lot of methods including inspect. Similar to what you're doing.
<zenspider> ja: stop fighting active record so much. it's only going to cause pain and suffering in the long run
<pipework> The reason I did it like I did with modifying the expected behaviour of activerecord objects was because I had to make the whole thing duck type to current assumptions and not introduce anything too different for other developers. Had it been for more enlightened folk, I'd have done it differently.
lkba has joined #ruby
jonnie has quit [Ping timeout: 240 seconds]
bonhoeffer has quit [Read error: Connection reset by peer]
zarubin has quit [Ping timeout: 264 seconds]
<ja> https://gist.github.com/alminde/1cf48ee04d19d63b2baf — I'm starting to think I must've been drunk when I wrote that
bonhoeffer_ has joined #ruby
<ja> zenspider: yeah, you're right
<al2o3-cr> ja: don't worry i think that all the time
benlieb has joined #ruby
<pipework> It's probably a good idea to adopt the notion that activerecord objects are more someone else's objects than they yours in terms of ownership of internal behaviour.
<ja> pipework: "for more enlightened folk", lol
diegoaguilar has joined #ruby
<ja> al2o3-cr: well, sometimes it worse than other times, right? :D
chipotle has quit [Read error: Connection reset by peer]
<ja> pipework: that sounds like a very good idea indeed
chipotle has joined #ruby
<al2o3-cr> ja: oui
alcipir has quit [Ping timeout: 252 seconds]
tubuliferous_ has quit [Ping timeout: 252 seconds]
Under has quit [Read error: Connection reset by peer]
<pipework> It's some-time-of-day o' clock, time to booze.
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bonhoeffer_ has quit [Ping timeout: 240 seconds]
alcipir has joined #ruby
Motoservo has joined #ruby
<ja> booze can be a great help when you're dealing with insane database schemas
<Ox0dea> ja: Strive for the Ballmer peak.
<ja> hahaha, yeah, that's always my goal
arthurnn has quit [Quit: bye...]
diegoaguilar has quit [Max SendQ exceeded]
trosborn has joined #ruby
htmldrum has quit [Ping timeout: 240 seconds]
<ja> xkcd is full of truths
bmurt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
swgillespie has joined #ruby
rubyscraper has joined #ruby
diegoaguilar has joined #ruby
<Ox0dea> >> send def drink?; Time.now.strftime('%A')[-1] == ?y; end
<ruboto> Ox0dea # => true (https://eval.in/456612)
<pipework> ho ho!
<Ox0dea> Locale-dependent alcoholism.
diegoaguilar has quit [Max SendQ exceeded]
EllisTAA has quit [Quit: EllisTAA]
diegoaguilar has joined #ruby
RegulationD has joined #ruby
riotjon__ has joined #ruby
diegoaguilar has quit [Max SendQ exceeded]
patdohere has joined #ruby
Asher has quit [Quit: Leaving.]
diegoaguilar has joined #ruby
Ropeney has joined #ruby
riotjones has quit [Ping timeout: 240 seconds]
hmsimha has joined #ruby
patdohere has quit [Client Quit]
sdwrage has quit [Quit: This computer has gone to sleep]
rubyscraper has left #ruby [#ruby]
patdohere has joined #ruby
RegulationD has quit [Ping timeout: 265 seconds]
Fredrich010 has quit [Remote host closed the connection]
shinnya has joined #ruby
chipotle has quit [Read error: Connection reset by peer]
alcipir has quit [Ping timeout: 260 seconds]
patdohere has quit [Quit: Textual IRC Client: www.textualapp.com]
htmldrum has joined #ruby
eminencehc has joined #ruby
Fredrich010 has joined #ruby
alcipir has joined #ruby
sdwrage has joined #ruby
shinnya has quit [Ping timeout: 260 seconds]
zipace has quit [Ping timeout: 265 seconds]
jonnie has joined #ruby
txdv has joined #ruby
Fredrich010 has quit [Ping timeout: 272 seconds]
dfinninger has joined #ruby
alcipir has quit [Ping timeout: 240 seconds]
blue_deref has quit [Quit: bbn]
blue_deref has joined #ruby
trosborn has quit [Quit: trosborn]
dikaio has joined #ruby
jonnie has quit [Ping timeout: 268 seconds]
beast_ has quit [Quit: Leaving]
bmurt has joined #ruby
rshetty has joined #ruby
shinenelson has quit [Quit: Connection closed for inactivity]
beast has left #ruby ["Leaving"]
diegoaguilar has quit [Remote host closed the connection]
gregf has quit [Quit: WeeChat 1.3]
gregf has joined #ruby
Rickmasta has joined #ruby
tubuliferous_ has joined #ruby
rshetty has quit [Ping timeout: 240 seconds]
s00pcan has joined #ruby
ruurd_ has quit [Quit: ZZZzzz…]
firstdayonthejob has quit [Ping timeout: 264 seconds]
kirun has quit [Quit: Client exiting]
alcipir has joined #ruby
spider-mario has quit [Remote host closed the connection]
FrankD has joined #ruby
gambl0re has quit [Read error: Connection reset by peer]
gambl0re has joined #ruby
<banister> baweaver sup weaves
<banister> baweaver still enjoying this life or is your existential angst driving you towards nihilism
alcipir has quit [Ping timeout: 272 seconds]
jenrzzz has joined #ruby
workmad3 has joined #ruby
mengu has quit [Remote host closed the connection]
<banister> workmad3 sup work-dogg
alcipir has joined #ruby
bmurt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rehat has joined #ruby
danieli has quit [Quit: *does an epic backflip into nowhere*]
jenrzzz has quit [Ping timeout: 246 seconds]
workmad3 has quit [Ping timeout: 252 seconds]
gambl0re has quit [Read error: No route to host]
gambl0re has joined #ruby
alcipir has quit [Ping timeout: 250 seconds]
xet7 has quit [Quit: Leaving]
tomchapin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Mojo_Nixon has joined #ruby