jhass changed the topic of #ruby to: Welcome new users migrating from #ruby-lang! || Rules & more: http://ruby-community.com || Ruby 2.2.2; 2.1.6; 2.0.0-p645: https://ruby-lang.org || Paste >3 lines of text on https://gist.github.com || log @ http://irclog.whitequark.org/ruby/
<baweaver> granted, which is why that's filed under hard tasks
Pupeno has joined #ruby
Pupeno has joined #ruby
<baweaver> the gist right now is to get application structure generated at least.
FernandoBasso has quit [Quit: WeeChat 1.2]
<pontiki> i did preface my comment with "these are theoreticals"...
<baweaver> I caught it :)
hotpancakes has joined #ruby
workmad3 has joined #ruby
senayar has joined #ruby
senayar has quit [Changing host]
senayar has joined #ruby
vyorkin2 has joined #ruby
bosma has quit [Ping timeout: 255 seconds]
hotpancakes has quit [Ping timeout: 255 seconds]
vyorkin1 has quit [Ping timeout: 255 seconds]
<baweaver> aha, define_method
chris2 has quit [Ping timeout: 248 seconds]
<baweaver> that I can hack
<baweaver> just throw it through a class eval to intercept constants with new called to define an OpenStruct with method missing to 'define' the code
<baweaver> ....easier said than done though
Jarboe has quit []
godemper2r has quit [Ping timeout: 244 seconds]
workmad3 has quit [Ping timeout: 276 seconds]
stoodfarback has quit [Ping timeout: 256 seconds]
godemperor has quit [Ping timeout: 255 seconds]
<pontiki> doggone it, i think i left my flex pen at work
lupine has quit [Ping timeout: 246 seconds]
lupine has joined #ruby
<pontiki> crud crud crud :(
stylus has quit [Ping timeout: 256 seconds]
stylus has joined #ruby
Pupeno has quit [Remote host closed the connection]
arooni-mobile has quit [Ping timeout: 248 seconds]
nfk has quit [Quit: yawn]
dgutierrez1287 has joined #ruby
GPrime has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Rollabunna has joined #ruby
bb010g has quit [Quit: Connection closed for inactivity]
sharpmachine has joined #ruby
entropie has joined #ruby
j4cknewt has quit [Remote host closed the connection]
j4cknewt has joined #ruby
Rollabunna has quit [Ping timeout: 248 seconds]
sharpmachine has quit [Ping timeout: 248 seconds]
ivanskie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
j4cknewt has quit [Remote host closed the connection]
Pupeno has joined #ruby
Pupeno has joined #ruby
MasterPiece has joined #ruby
tuxaddicted has quit [Quit: leaving]
allomov has quit [Remote host closed the connection]
blue_deref has quit [Quit: bbn]
bronson has quit [Remote host closed the connection]
j4cknewt has joined #ruby
DLSteve has quit [Quit: Leaving]
Musashi007 has quit [Read error: No route to host]
Musashi007 has joined #ruby
allomov has joined #ruby
Musashi007 has quit [Client Quit]
RobertBirnie has joined #ruby
allomov has quit [Remote host closed the connection]
chris2 has joined #ruby
war_pigs has joined #ruby
finisherr has joined #ruby
war_pigs has quit [Max SendQ exceeded]
war_pigs has joined #ruby
CloCkWeRX has joined #ruby
war_pigs has quit [Max SendQ exceeded]
war_pigs has joined #ruby
Pupeno has quit [Remote host closed the connection]
war_pigs has quit [Max SendQ exceeded]
kjones_ has joined #ruby
war_pigs has joined #ruby
chris2 has quit [Ping timeout: 252 seconds]
ivanskie has joined #ruby
coffeecupp has joined #ruby
pgatt has quit [Quit: Connection closed for inactivity]
finisherr has quit [Quit: finisherr]
whiteline has joined #ruby
dgutierrez1287 has quit [Remote host closed the connection]
workmad3 has joined #ruby
chris2 has joined #ruby
vyorkin2 has quit [Ping timeout: 265 seconds]
GPrime has joined #ruby
IanV0rn2341 has quit [Ping timeout: 244 seconds]
vyorkin2 has joined #ruby
kjones_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mandarinkin2 has quit [Ping timeout: 276 seconds]
workmad3 has quit [Ping timeout: 246 seconds]
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
gizmore has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
j4cknewt has quit [Remote host closed the connection]
CloCkWeRX has quit [Quit: Leaving.]
kjones_ has joined #ruby
CloCkWeRX has joined #ruby
havenwood has quit [Ping timeout: 255 seconds]
hotpancakes has joined #ruby
GPrime has quit [Quit: Textual IRC Client: www.textualapp.com]
JDiPierro has quit [Remote host closed the connection]
j4cknewt has joined #ruby
ivanskie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
hotpanca_ has joined #ruby
adamski2600 has joined #ruby
hotpancakes has quit [Read error: No route to host]
dgutierrez1287 has joined #ruby
hotpanca_ has quit [Ping timeout: 246 seconds]
jesterfraud has joined #ruby
jesterfraud has quit [Client Quit]
jesterfraud has joined #ruby
Rollabunna has joined #ruby
nahtnam has joined #ruby
michael_mbp has quit [Excess Flood]
eggoez has quit [Ping timeout: 256 seconds]
RobertBirnie has joined #ruby
eggoez has joined #ruby
dgutierrez1287 has quit [Remote host closed the connection]
michael_mbp has joined #ruby
Rollabunna has quit [Ping timeout: 248 seconds]
RobertBirnie has quit [Client Quit]
sharpmachine has joined #ruby
yh has joined #ruby
sharpmachine has quit [Ping timeout: 246 seconds]
rodfersou has joined #ruby
coffeecupp has quit [Quit: Leaving]
adamski2600 has quit [Read error: Connection timed out]
adamski2600 has joined #ruby
jesterfraud has quit [Quit: Textual IRC Client: www.textualapp.com]
baweaver has quit [Remote host closed the connection]
jesterfraud has joined #ruby
<postmodern> refresh my memory, how do you yield and capture output in plain Erb?
MasterPiece has quit [Quit: Leaving]
bronson has joined #ruby
war_pigs has quit [Quit: later... computer is sleeping]
tmtwd has quit [Ping timeout: 264 seconds]
bronson has quit [Ping timeout: 264 seconds]
kephra has left #ruby ["Leaving"]
crazydiamond has joined #ruby
sarkyniin has joined #ruby
chipotle has joined #ruby
blue_deref has joined #ruby
war_pigs has joined #ruby
n008f4g_ has quit [Quit: leaving]
war_pigs has quit [Max SendQ exceeded]
bruno- has joined #ruby
adamski2600 has quit [Read error: Connection timed out]
c355E3B has quit [Quit: Connection closed for inactivity]
dgutierrez1287 has joined #ruby
Muhannad has quit [Ping timeout: 255 seconds]
war_pigs has joined #ruby
adamski2600 has joined #ruby
war_pigs has quit [Max SendQ exceeded]
war_pigs has joined #ruby
bruno- has quit [Ping timeout: 246 seconds]
war_pigs has quit [Max SendQ exceeded]
balazs has joined #ruby
war_pigs has joined #ruby
rodfersou has quit [Ping timeout: 256 seconds]
war_pigs has quit [Max SendQ exceeded]
war_pigs has joined #ruby
war_pigs has quit [Max SendQ exceeded]
war_pigs has joined #ruby
mfranzwa has joined #ruby
vyorkin3 has joined #ruby
speaking1ode has joined #ruby
war_pigs has quit [Max SendQ exceeded]
war_pigs has joined #ruby
vyorkin2 has quit [Ping timeout: 264 seconds]
Rollabunna has joined #ruby
war_pigs has quit [Max SendQ exceeded]
balazs has quit [Remote host closed the connection]
hotpancakes has joined #ruby
mfranzwa has quit [Client Quit]
renderful has joined #ruby
dgutierrez1287 has quit [Remote host closed the connection]
war_pigs has joined #ruby
speaking1ode has quit [Ping timeout: 252 seconds]
serivich has joined #ruby
davedev24_ has joined #ruby
Rollabunna has quit [Ping timeout: 248 seconds]
speaking1ode has joined #ruby
renderful has quit [Ping timeout: 252 seconds]
luriv_ has joined #ruby
hotpancakes has quit [Ping timeout: 256 seconds]
davedev2_ has quit [Ping timeout: 248 seconds]
JDiPierro has joined #ruby
luriv has quit [Ping timeout: 248 seconds]
xxneolithicxx has joined #ruby
kjones_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
_whitelogger has quit [Ping timeout: 252 seconds]
_whitelogger has joined #ruby
drPoggs has joined #ruby
sarkyniin has quit [Quit: Quit]
sarkyniin has joined #ruby
[k- has joined #ruby
elektronaut has joined #ruby
sharpmachine has joined #ruby
kies^ has quit [Ping timeout: 244 seconds]
crdpink has joined #ruby
crdpink2 has quit [Ping timeout: 248 seconds]
chouhoulis has joined #ruby
dgutierrez1287 has joined #ruby
sharpmachine has quit [Ping timeout: 246 seconds]
chouhoulis has quit [Ping timeout: 244 seconds]
Indian has quit [Ping timeout: 255 seconds]
toiletlips has quit [Ping timeout: 248 seconds]
dgutierrez1287 has quit [Ping timeout: 265 seconds]
psy_ has quit [Ping timeout: 264 seconds]
psy_ has joined #ruby
yh has quit [Ping timeout: 250 seconds]
kies^ has joined #ruby
lessless has joined #ruby
workmad3 has joined #ruby
arescorpio has joined #ruby
kjones_ has joined #ruby
TimeTime has joined #ruby
workmad3 has quit [Ping timeout: 250 seconds]
<TimeTime> DO YOU KNOW WHAT YOUR DOMAIN NAME IS WORTH??? -> VALUE YOUR DOMAIN @ >>> WWW.VALBOT.COM <<< OR GOOGLE >>> VALBOT.COM <<<
JDiPierro has quit [Remote host closed the connection]
TimeTime has quit []
xxneolithicxx has quit [Ping timeout: 255 seconds]
bronson has joined #ruby
vyorkin3 has quit [Ping timeout: 250 seconds]
war_pigs has quit [Quit: later... computer is sleeping]
CloCkWeRX has quit [Quit: Leaving.]
_blizzy_ has quit [Read error: Connection reset by peer]
kjones_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
_blizzy_ has joined #ruby
eggoez has quit [Ping timeout: 252 seconds]
bronson has quit [Ping timeout: 265 seconds]
sarkyniin has quit [Quit: Quit]
nobitanobi has joined #ruby
Musashi007 has joined #ruby
sarkyniin has joined #ruby
sarkyniin has quit [Read error: Connection reset by peer]
Rollabunna has joined #ruby
xcesariox has joined #ruby
eggoez has joined #ruby
CloCkWeRX has joined #ruby
penzur has joined #ruby
flaf has joined #ruby
jamesaxl|2 has joined #ruby
Rollabunna has quit [Ping timeout: 250 seconds]
senayar has quit [Remote host closed the connection]
kjones_ has joined #ruby
<flaf> Hi, I have a question about 'ipaddr' lib. With a = IPAddr.new('172.31.0.1/16') I have this object #<IPAddr: IPv4:172.31.0.0/255.255.0.0>. b = a.succ is a different object => #<IPAddr: IPv4:172.31.0.1/255.255.0.0>. Is it possible to instance b = a.succ directly ?
drewvanstone has joined #ruby
jamesaxl has quit [Ping timeout: 246 seconds]
mdz has joined #ruby
mdz has left #ruby [#ruby]
<flaf> Maybe it will be clearer with this paste => http://paste.alacon.org/37768
braincras has quit [Quit: bye bye]
devdazed has joined #ruby
Agoldfish has quit [Quit: G'Bye]
shum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
<flaf> In fact, from a CIDR string, I would like to get netmask and broadcast without know it the address is ipV4 or V6.
devdazed has quit [Client Quit]
jamesaxl|2 has quit [Remote host closed the connection]
xxneolithicxx has joined #ruby
drewvanstone has quit [Quit: leaving]
<flaf> *if the address...
Zimsky_ has quit [Quit: leaving]
braincrash has joined #ruby
<[k-> IPAddr.new("172.31.0.1") => #<IPAddr: IPv4:172.31.0.1/255.255.255.255>
<[k-> I'm not sure about the 2nd part of your question though
Soda has quit [Remote host closed the connection]
kies^ has quit [Ping timeout: 256 seconds]
<flaf> [k-: IPAddr.new("172.31.0.1") is different of my "b" object in my example.
darkf has joined #ruby
<flaf> (netmask is different)
<[k-> oh
penzurx has joined #ruby
<[k-> maybe IPAddr.new('172.31.0.1/16').succ will do?
war_pigs has joined #ruby
<flaf> [k-: no unfortunately
radialneon has joined #ruby
<flaf> irb(main):007:0> IPAddr.new('172.31.0.1/16')
<flaf> => #<IPAddr: IPv4:172.31.0.0/255.255.0.0>
sharpmachine has joined #ruby
penzur has quit [Ping timeout: 246 seconds]
nobitanobi has quit [Remote host closed the connection]
kkeuning has joined #ruby
<[k-> I have no idea then :(
kkeuning has quit [Max SendQ exceeded]
brain_shim has quit [Ping timeout: 264 seconds]
nobitanobi has joined #ruby
war_pigs has quit [Max SendQ exceeded]
j4cknewt has quit [Remote host closed the connection]
<flaf> [k-: in fact, you are right for IPAddr.new('172.31.0.1/16').succ, but in fact I would like to create instances like #<IPAddr: IPv4:172.31.100.12/255.255.0.0> etc.
war_pigs has joined #ruby
<flaf> And with the `.succ` method, it could be long. :)
zachk has quit [Quit: WeeChat 0.4.2]
<flaf> but the `.succ` method is the only way I have found to instance this kind of object.
ivanskie has joined #ruby
war_pigs has quit [Max SendQ exceeded]
sharpmachine has quit [Ping timeout: 248 seconds]
<[k-> 12.times.to_a.reduce(IPAddr
<flaf> :))
kjones_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
war_pigs has joined #ruby
<flaf> I think I have missed something very simple, but I can't find.
brain_shim has joined #ruby
bosma has joined #ruby
symm- has quit [Ping timeout: 246 seconds]
hotpancakes has joined #ruby
war_pigs has quit [Max SendQ exceeded]
xxneolithicxx has quit [Ping timeout: 255 seconds]
kjones_ has joined #ruby
sepp2k has quit [Read error: Connection reset by peer]
war_pigs has joined #ruby
war_pigs has quit [Max SendQ exceeded]
crazydiamond has quit [Remote host closed the connection]
war_pigs has joined #ruby
hotpancakes has quit [Ping timeout: 246 seconds]
platosha has quit [Quit: This computer has gone to sleep]
solocsha1 has quit [Ping timeout: 255 seconds]
war_pigs has quit [Max SendQ exceeded]
war_pigs has joined #ruby
war_pigs has quit [Max SendQ exceeded]
genpaku has quit [Ping timeout: 265 seconds]
genpaku has joined #ruby
adamski2600 has quit [Ping timeout: 250 seconds]
radialneon has quit [Ping timeout: 256 seconds]
kjones_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
gix has quit [Ping timeout: 264 seconds]
kjones_ has joined #ruby
radialneon has joined #ruby
kjones_ has quit [Max SendQ exceeded]
xxneolithicxx has joined #ruby
j4cknewt has joined #ruby
Feyn has joined #ruby
gix has joined #ruby
penzur has joined #ruby
penzur has quit [Client Quit]
revath has joined #ruby
penzurx has quit [Ping timeout: 248 seconds]
revath has quit [Remote host closed the connection]
Rollabunna has joined #ruby
hotpancakes has joined #ruby
Rollabunna has quit [Ping timeout: 248 seconds]
tkuchiki has joined #ruby
chipotle has quit [Quit: cheerio]
yh has joined #ruby
charliesome has joined #ruby
senayar has joined #ruby
bb010g has joined #ruby
brain_shim has quit [Ping timeout: 252 seconds]
senayar has quit [Ping timeout: 256 seconds]
Musashi007 has quit [Quit: Musashi007]
tkuchiki has quit [Remote host closed the connection]
tkuchiki has joined #ruby
Lucky has quit [Disconnected by services]
serivich has quit [Ping timeout: 246 seconds]
eGGshke has quit [Ping timeout: 250 seconds]
radialneon has quit [Quit: Leaving]
platosha has joined #ruby
eGGshke has joined #ruby
nobitanobi has quit [Remote host closed the connection]
sharpmachine has joined #ruby
tkuchiki has quit [Remote host closed the connection]
jesterfraud has quit [Quit: Textual IRC Client: www.textualapp.com]
charliesome has quit [Quit: zzz]
blue_deref has quit [Quit: bbn]
sharpmachine has quit [Ping timeout: 250 seconds]
oo_ has joined #ruby
workmad3 has joined #ruby
oo_ has quit [Remote host closed the connection]
tsvenson is now known as tsvenson|afk
houhoulis has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 246 seconds]
bronson has joined #ruby
balazs has joined #ruby
baweaver has joined #ruby
allomov has joined #ruby
babykosh has joined #ruby
houhoulis has joined #ruby
bronson has quit [Ping timeout: 256 seconds]
GitGud has joined #ruby
icebourg has joined #ruby
chinmay_dd has joined #ruby
tkuchiki has joined #ruby
tkuchiki has quit [Remote host closed the connection]
serivich has joined #ruby
tkuchiki has joined #ruby
allomov has quit [Ping timeout: 256 seconds]
tkuchiki has quit [Remote host closed the connection]
Rollabunna has joined #ruby
CloCkWeRX has quit [Ping timeout: 246 seconds]
tkuchiki has joined #ruby
Rollabunna has quit [Ping timeout: 248 seconds]
tkuchiki has quit [Remote host closed the connection]
jbw_ has joined #ruby
Musashi007 has joined #ruby
jbw__ has quit [Ping timeout: 264 seconds]
acke has joined #ruby
luriv_ has quit [Quit: Leaving]
xcesariox has quit [Ping timeout: 265 seconds]
CloCkWeRX has joined #ruby
SpikeMaster has joined #ruby
SpikeMaster has left #ruby [#ruby]
acke has quit [Ping timeout: 246 seconds]
jbw__ has joined #ruby
intyl has quit [Ping timeout: 276 seconds]
jbw_ has quit [Ping timeout: 244 seconds]
eGGshke has quit [Ping timeout: 248 seconds]
Tarkers34|2 has quit [Ping timeout: 244 seconds]
mleung has joined #ruby
chinmay_dd has quit [Quit: See ya!]
devbug has joined #ruby
hanmac has quit [Remote host closed the connection]
sharpmachine has joined #ruby
riotjones has joined #ruby
BillSussman has joined #ruby
Spami has joined #ruby
AndyBotwin has quit [Ping timeout: 276 seconds]
craysiii has quit [Ping timeout: 248 seconds]
sharpmachine has quit [Ping timeout: 252 seconds]
eGGshke has joined #ruby
j4cknewt has quit [Remote host closed the connection]
j4cknewt has joined #ruby
davedev24_ has quit [Remote host closed the connection]
riotjones has quit [Ping timeout: 264 seconds]
davedev24_ has joined #ruby
solocshaw has joined #ruby
hanmac has joined #ruby
tkuchiki has joined #ruby
<nofxx> flaf, when you use a netmask it;s no longer a IP, it's a subnet
yh has quit [Ping timeout: 252 seconds]
<nofxx> check out IPAddr.new x vs same with netmask
<flaf> nofxx: but how can I instance this object #<IPAddr: IPv4:172.31.100.12/255.255.0.0> ?
davedev24_ has quit [Ping timeout: 248 seconds]
<flaf> (except with IPAddr.new('172.31.0.1/16').succ.succ....[snip]...succ)
tkuchiki has quit [Remote host closed the connection]
araujo_ has joined #ruby
balazs has quit [Remote host closed the connection]
yh has joined #ruby
solocshaw has quit [Ping timeout: 255 seconds]
arescorpio has quit [Quit: Leaving.]
<nofxx> flaf, why do you need the netmask?
araujo has quit [Ping timeout: 265 seconds]
<flaf> It's a little dev in a personal puppet module.
Soda has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<flaf> If I take this o = IPAddr.new('172.31.0.0/16').succ, it seems to be an IP in a subnet, not a subnet (o.to_s give me => '172.31.0.1' not '172.31.0.0')
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
tkuchiki has joined #ruby
Musashi007 has quit [Quit: Musashi007]
railsraider has joined #ruby
Rollabunna has joined #ruby
kies^ has joined #ruby
tkuchiki has quit [Remote host closed the connection]
El3ktra has quit [Ping timeout: 246 seconds]
babykosh has quit [Quit: babykosh]
Rollabunna has quit [Ping timeout: 248 seconds]
byroniczero has quit [Quit: Textual IRC Client: www.textualapp.com]
kobain has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
byroniczero has joined #ruby
tlolczyk has joined #ruby
<tlolczyk> According to the pry docs, typing next will cause the debugger to step to the next line. But I keep getting "can't escape from eval with next".
railsraider has quit [Quit: railsraider]
araujo_ has quit [Ping timeout: 252 seconds]
yh has quit [Ping timeout: 252 seconds]
sevenseacat has joined #ruby
<baweaver> http://baweaver.com/blog/2015/07/04/the-clairvoyant-project/ - New article out on what madness I'm planning with Clairvoyant
kotk has joined #ruby
araujo has joined #ruby
tkuchiki has joined #ruby
alexa_ has joined #ruby
<alexa_> Hey guys, I just noticed a few places saying rbenv is recommended over rvm. Any particular reasoning? I ask because I'm used to rvm but would consider switching
araujo has quit [Max SendQ exceeded]
serivich has quit [Ping timeout: 244 seconds]
tkuchiki has quit [Remote host closed the connection]
araujo has joined #ruby
tkuchiki has joined #ruby
Guest59510 is now known as bl4ckdu5t
bl4ckdu5t has quit [Changing host]
bl4ckdu5t has joined #ruby
bl4ckdu5t is now known as silverdust
tkuchiki has quit [Remote host closed the connection]
workmad3 has joined #ruby
<postmodern> alexa_, mostly that RVM is big and being replaced by RVM2
<postmodern> alexa_, there's also chruby+ruby-install
<sevenseacat> an unbiased +1 for chruby/ruby-install ;)
<postmodern> alexa_, if RVM is still working for you, keep using it
<postmodern> sevenseacat, not that i'd know anything about this chruby thing http://gifrific.com/wp-content/uploads/2012/07/homer-plays-with-mustache-simpsons.gif
<sevenseacat> haha
mleung has quit [Quit: mleung]
Rollabunna has joined #ruby
elektronaut has quit [Ping timeout: 252 seconds]
workmad3 has quit [Ping timeout: 244 seconds]
_whitelogger has quit [Ping timeout: 252 seconds]
_whitelogger has joined #ruby
sharpmachine has quit [Ping timeout: 264 seconds]
Ox0dea has joined #ruby
Miron has quit [Ping timeout: 252 seconds]
railsraider has joined #ruby
<Ox0dea> Is there really no way to capture missing constants at the top level other than defining Object.const_missing? :/
lxsameer has joined #ruby
tvw has joined #ruby
sulky has quit [Ping timeout: 246 seconds]
hotpancakes has quit [Remote host closed the connection]
Musashi007 has joined #ruby
eGGshke has quit [Ping timeout: 265 seconds]
<sphex> Ox0dea: hrm. I think I sort of see why this is a problem; constants are lexically bound aren't they? so FOO is is looked up in the top-level environment. I would assume that const_missing is only used when explicitly accessing a module/class' scope with "::"... but it's the first time I hear about this method.
krz has joined #ruby
<Ox0dea> sphex: That would certainly explain it, and it does make some sense, but it's a regrettable shortcoming nonetheless.
baweaver has joined #ruby
bronson has joined #ruby
yh has joined #ruby
<sphex> Ox0dea: I'd say that's usually the right thing for blocks in general. but I see how it could be limiting when making DSLs and stuff. passing a string to instance_eval prolly does it differently?
keen__________12 has joined #ruby
tkuchiki has quit [Remote host closed the connection]
bronson has quit [Ping timeout: 244 seconds]
<Ox0dea> sphex: Indeed it does, but that'll of course defeat the point for this particular use case.
keen__________11 has quit [Ping timeout: 264 seconds]
hotpancakes has joined #ruby
yh has quit [Ping timeout: 250 seconds]
<Ox0dea> That seems like it ought to work, and that it doesn't feels like a bug to me.
yh has joined #ruby
<Ox0dea> baweaver: I wonder whether RubyVM::InstructionSequence.of might play some advantageous role in making Clairvoyant live up to her name.
<sphex> ooh fancy
<baweaver> oho
<baweaver> I'll have to poke that
<baweaver> Right now the next two tasks are learning enough Prolog to be dangerous and a bit on Lexers and autonamas
<baweaver> (probably butchered that spelling)
<sphex> eh. maybe the constants have already been resolved (during compilation) by the time "using" is executed? maybe const_missing is only for "::" lookups?
uptownhr has quit [Quit: uptownhr]
jbw_ has joined #ruby
<sphex> since "using" is given a value, I'm guessing its effects are at run-time
jbw__ has quit [Ping timeout: 276 seconds]
<sphex> oh wait.. unless it only accepts constants. then it could be lexical I guess.
<Ox0dea> sphex: Well, but defining const_missing on Object's singleton class does provide the desired behavior.
<Ox0dea> It just doesn't work inside a refinement for some reason.
<sphex> oh ok
vikaton has joined #ruby
<Ox0dea> baweaver: I suspect applying the principles of logic programming to Ruby, perhaps the most dynamic language ever, is going to be heaps of fun.
<baweaver> it's already been done
<baweaver> and Lisp is far more so
eGGshke has joined #ruby
bruno- has joined #ruby
<Ox0dea> Well, I meant more for your use case of determining how to build a method which meets some constraints.
<Ox0dea> There are just so many different directions from which those constraints can come in Ruby code.
<baweaver> indeed
ledestin has joined #ruby
<baweaver> which is why I have a spark cluster eating ruby projects
<Ox0dea> Ooh!
<baweaver> If I can't guess what it should look like I steal ideas
<baweaver> that's the Machine Learning part, and dang hard
<baweaver> mostly above my head
<baweaver> though that's what makes it so fun.
<Ox0dea> I suppose you could take the stacksort approach. :)
<baweaver> I'm training it on good repos rspec vs implementation
jbw__ has joined #ruby
jbw_ has quit [Ping timeout: 246 seconds]
<Ox0dea> The input being S-expressions?
<baweaver> yep
ivanskie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<baweaver> zenspider: I'm going to make use of some of your work on that
<baweaver> the ruby builtin is a bit unwieldy honestly.
cschneid has quit [Ping timeout: 248 seconds]
sulky has joined #ruby
bruno- has quit [Ping timeout: 255 seconds]
<sphex> maybe const_missing only happens when lexical lookup failed for the module that was current at the time the block was compiled (or the LHS of "::"). this really confusing... lexical lookups could happen at parse/compile-time, but const_missing happens at run-time.
hotpancakes has quit [Remote host closed the connection]
vikaton has quit []
jesterfraud has joined #ruby
<sphex> wait no.. then refining/using should just work :/
cschneid has joined #ruby
<Ox0dea> sphex: `def Object.const_missing...` can appear anywhere, after which it will receive all unresolved constants that aren't picked up by a more specific module. :/
<Ox0dea> >> foo = -> { FOO }; def Object.const_missing(c) 42 end; foo[]
<ruboto> Ox0dea # => 42 (https://eval.in/392672)
<sphex> but which module does it ask specifically? what if you added some debug prints that would identify the module? (I'm not sure how to do that... :/)
<Ox0dea> sphex: Constant resolution is pretty much the same as method resolution; it just walks up the ancestor chain until it finds out, or else bails with the relevant _missing hook.
<Ox0dea> s/out/it (the constant)/
DexterLB has quit [Ping timeout: 252 seconds]
<Ox0dea> baweaver: You're probably going to end up learning a lot about strength reduction for this project. :)
<baweaver> strength reduction?
<baweaver> or string?
devbug has quit [Ping timeout: 256 seconds]
<Ox0dea> Turning complex expressions into their simpler forms.
<Ox0dea> To better infer relationships between specs and implementations.
<baweaver> ah
<baweaver> any suggested reading there?
<baweaver> Already going to go back over Understanding Computation
<Ox0dea> Well, the Dragon Book comes to mind, but that's probably overkill.
acke has joined #ruby
hotpancakes has joined #ruby
<Ox0dea> Fun fact: Tom Stuart finally joined the issue tracker the other day to voice his support of Proc#compose.
<Ox0dea> Well, "Callable"#compose, really.
<baweaver> Ox0dea: I guess you could say
<baweaver> there be dragons there
* baweaver knows _of_ the dragon book
<sevenseacat> I've read the dragon book
* Ox0dea has a mostly untouched copy. :/
roolo has joined #ruby
eGGshke has quit [Read error: Connection reset by peer]
<Ox0dea> That be the one.
<Ox0dea> Aho is the A in AWK, incidentally.
<sevenseacat> I have the older version
yardenbar has joined #ruby
rehat has quit []
<Ox0dea> sevenseacat: Worked with LLVM any?
<sevenseacat> nein
_ht has joined #ruby
<sevenseacat> the book was a uni textbook :)
DexterLB has joined #ruby
acke has quit [Ping timeout: 265 seconds]
hotpancakes has quit [Ping timeout: 255 seconds]
hotpancakes has joined #ruby
<baweaver> My CS education was a bit lackluster
<baweaver> more engineered towards making cheap replicas of ideal workers for local companies.
<baweaver> hence me knowing RPG and COBOL
<sevenseacat> mine was all theory-based, and very little practical work.
roolo has quit [Ping timeout: 264 seconds]
The_Phoenix has joined #ruby
adamski2600 has joined #ruby
<sevenseacat> though we did learn tools like gdb and cvs, which is apparently quite uncommon.
<jesterfraud> sevenseacat: we covered rcs for our version control, I believe
<baweaver> fair warning, I'll probably have a good deal of meta / compiler type questions later on
<jesterfraud> ridiculously antiquated
<sevenseacat> ouch. we did rcs first, then cvs
The_Phoenix has quit [Read error: Connection reset by peer]
<sevenseacat> we spent more time trying to get the cvs repo up and running than we did actually using it
Rollabunna has joined #ruby
<baweaver> Ox0dea: under what context would I _need_ to read the Dragon book?
<baweaver> I should probably stop specifically name tagging those. Anyways
tkuchiki has joined #ruby
niemcu has joined #ruby
intyl has joined #ruby
adamski2600 has quit [Ping timeout: 244 seconds]
bronson has joined #ruby
dfockler has joined #ruby
tkuchiki has quit [Remote host closed the connection]
peter_paule has joined #ruby
uptownhr has joined #ruby
Musashi007 has quit [Quit: Musashi007]
Rollabunna has quit [Ping timeout: 246 seconds]
jesterfraud has quit [Quit: Textual IRC Client: www.textualapp.com]
kies^ has quit [Ping timeout: 252 seconds]
The_Phoenix has joined #ruby
bronson has quit [Ping timeout: 252 seconds]
<Ox0dea> baweaver: Well, I don't doubt it touches on strength reduction, but perhaps that's not the best description of what Clairvoyant will need to do. In the final analysis, you're going to need to figure out which methods called with which arguments on which objects produce the expected value, and doing that efficiently will come down to paring the solution space as much as possible.
dfockler has quit [Ping timeout: 264 seconds]
tmtwd has joined #ruby
<Ox0dea> Given that there are infinitely many ways to arrive at the same result, you'll want to have some way of choosing the simplest one(s).
vyorkin3 has joined #ruby
peter_paule has quit [Ping timeout: 250 seconds]
<baweaver> Probably the cheapest way is to standardize RSPEC
hotpancakes has quit [Remote host closed the connection]
<baweaver> If I know I can put keywords in there it's a lot easier.
<Ox0dea> As you noted elsewhere, making people rewrite their specs kinda defeats the point.
<baweaver> The further out I go to generalizing the more Natural Language Comprehension I'll need
<baweaver> indeed
<baweaver> I could make a "Cold Reader" that asks leading questions
<[k-> 2 + 2 should equal 4. class Fixnum alias_method :old+, :+; def + other; return 4 if self == 2 && other == 2;end;end
<[k-> I forgot to call old+ but anyways
<[k-> tada!
<Ox0dea> It's not even a legal method name, so it's okay.
vyorkin3 has quit [Ping timeout: 246 seconds]
solocsha1 has joined #ruby
alexa_ has quit [Ping timeout: 252 seconds]
valeriansaliou has joined #ruby
gianlucadv has joined #ruby
valeriansaliou has quit [Client Quit]
yh has quit [Ping timeout: 244 seconds]
solocsha1 has quit [Ping timeout: 255 seconds]
ropeney has quit [Quit: Leaving]
jesterfraud has joined #ruby
yfeldblum has quit [Ping timeout: 248 seconds]
senayar has joined #ruby
riotjones has joined #ruby
platosha has quit [Ping timeout: 276 seconds]
gagrio_ has joined #ruby
eGGshke has joined #ruby
platosha has joined #ruby
senayar has quit [Ping timeout: 252 seconds]
riotjones has quit [Ping timeout: 264 seconds]
baweaver has quit [Remote host closed the connection]
tmtwd has quit [Ping timeout: 252 seconds]
kb3ien has quit [Ping timeout: 246 seconds]
hotpancakes has joined #ruby
pengin has joined #ruby
hotpancakes has quit [Ping timeout: 265 seconds]
abuzze has joined #ruby
ndrei has joined #ruby
pengin has quit [Remote host closed the connection]
Musashi007 has joined #ruby
SCHAAP137 has joined #ruby
sameerynho has joined #ruby
wallerdev has quit [Quit: wallerdev]
allomov has joined #ruby
daas has joined #ruby
lxsameer has quit [Ping timeout: 264 seconds]
workmad3 has joined #ruby
<daas> hi all
<[k-> hello
hotpancakes has joined #ruby
<daas> I'm relatively new to Ruby, I've thought about doing something like this as a first project: http://www.kershner.org/scrape
<daas> I've familiarized myself with basic Ruby syntax, but I have no idea where to start on making something like that
Rollabunna has joined #ruby
abuzze has quit [Remote host closed the connection]
<daas> any pointers would be really helpful
workmad3 has quit [Ping timeout: 252 seconds]
<daas> I'm already familiar with HTML/CSS/JS, just not sure how to use API's with Reddit and creating a web app in general
hotpancakes has quit [Ping timeout: 248 seconds]
chinmay_dd has joined #ruby
<[k-> 1. you need a http library (or you can write one yourself)
<Ox0dea> daas: You asked about this almost two weeks ago and haven't made any progress? :(
dseitz has quit [Quit: Textual IRC Client: www.textualapp.com]
<[k-> shouldn't shevy be doing that ^
<daas> Ox0dea: Actually took a detour from it lol
Rollabunna has quit [Ping timeout: 248 seconds]
<[k-> I read Ox0dea as shevy but realised it was Ox0dea...
ohaibbq has quit [Remote host closed the connection]
Jackneill has joined #ruby
Pupeno has joined #ruby
<shevy> wat
daas has quit [Remote host closed the connection]
<[k-> shecy
<[k-> shevy!
<shevy> look at his sentences
<[k-> *
<shevy> he properly uses a '.' to terminate
<shevy> look at my sentences
<shevy> free chaos, no grammar
bronson has joined #ruby
<[k-> if I looked at that minor a detail I would go crazy
<[k-> I don't like semicolons, though
workmad3 has joined #ruby
TheHodge has joined #ruby
<Ox0dea> Complex language is the only thing that truly distinguishes our species from the lower animals; I try not to forsake that gift by using it properly.
<[k-> oooooo buuuuuuurn
bronson has quit [Ping timeout: 252 seconds]
acke has joined #ruby
workmad3 has quit [Ping timeout: 256 seconds]
<shevy> see how long the sentences are, and they terminate properly [k-
timonv has joined #ruby
<shevy> that's true, animals don't have abstract
<shevy> concepts
<shevy> through words
CloCkWeRX has quit [Ping timeout: 264 seconds]
<Ox0dea> shevy: We are animals.
<[k-> dun dun dun
<Ox0dea> [k-: 3spooky5u?
acke has quit [Remote host closed the connection]
peter_paule has joined #ruby
<[k-> what is a rimshot again
<[k-> is this appicable
<Ox0dea> It's a drum technique, but I'm not sure it applies here.
<Ox0dea> To be honest, I'm not sure how to interpret that "dun dun dun".
abuzze has joined #ruby
<shevy> rand(300) == 0 # means 1 in 300 chance to finish?
<Ox0dea> The Mersenne twister has its shortcomings, but yes.
<shevy> [k- lol with german translation, this comes up what a rimshot is supposed (?) to be: http://www.rewel.com/Bilder/MTB/MTB_01.gif
<shevy> Ox0dea you know that you sound like an oracle?
<Ox0dea> ?
<Ox0dea> Capable of telling the future and such?
lordkryss has joined #ruby
<shevy> "Ox0dea, what will the weather be tomorrow." "Ox0dea: The weather dynamics fluctuate between the butterfly effect and mankind's attempt of self-destruction through climate change, but I sense slight rain"
<[k-> haha
eGGshke has quit [Ping timeout: 246 seconds]
<[k-> that sounds like Ox0dea alright
<shevy> yeah and mystic symbols that become working ruby code
<shevy> like those $____ -> ___ {} things
<[k-> I still don't know how that quick sort worked
<Ox0dea> shevy: You got all that from my reminding you that you're flesh and bone?
<shevy> I got it from long standing observations of patterns!
<Ox0dea> [k-: Hey, when did you discover it contains Quicksort?
<shevy> he googled it
dudedudeman has quit [Ping timeout: 246 seconds]
<Ox0dea> Oh, never mind. I thought you were referring to the Quicksort implementation hidden inside the variadic anagram checker.
Soda has quit [Remote host closed the connection]
GitGud has quit [Ping timeout: 252 seconds]
gianlucadv has quit [Quit: Ex-Chat]
<shevy> :D
<[k-> wut
<[k-> you said that it was a quicksort algorithm!
senayar has joined #ruby
spider-mario has joined #ruby
hahuang65 has quit [Ping timeout: 252 seconds]
<shevy> >> "Ox0dea".tr('x','r').tr('d','c').tr('e','l').tr('a','e').tr('0','a')
<ruboto> shevy # => "Oracle" (https://eval.in/392696)
<shevy> omg look [k- the nick is a dead giveaway!
acke has joined #ruby
<shevy> I am stuck rewriting old boring code; IRC is more fun
<[k-> lel
lkba_ has joined #ruby
<[k-> >> "Ox0dea".tr "xdea0", "rclea"
<ruboto> [k- # => "Oracle" (https://eval.in/392697)
intinig has joined #ruby
<[k-> except that you changed his nick totally
<[k-> you obfuscated it so I wouldn't know!
<shevy> cool
senayar has quit [Ping timeout: 250 seconds]
<shevy> I give you a ruby award [k- the haskell has not yet ruined your ruby powers
lkba has quit [Ping timeout: 244 seconds]
<[k-> tr is basically much faster than using a key-value or an array
intinig has quit [Remote host closed the connection]
<[k-> strings FTW!
solars has joined #ruby
CloCkWeRX has joined #ruby
<[k-> >> "Ox0dea".gsub /[^O]+/, "racle"
<ruboto> [k- # => "Oracle" (https://eval.in/392700)
yfeldblum has joined #ruby
<[k-> is this shortet
<[k-> boo it's longer
peter_paule has quit [Ping timeout: 256 seconds]
<[k-> >> "Ox0dea".new("Oracle")
<ruboto> [k- # => undefined method `new' for "Ox0dea":String (NoMethodError) ...check link for more (https://eval.in/392703)
<Ox0dea> [k-: You wanted String#replace.
<Ox0dea> [k-: I've written up a demystification of the anagram checker, but I'm waiting for baweaver to concede defeat before posting it.
timonv has quit [Ping timeout: 256 seconds]
<shevy> that beaver is a winner
<[k-> anagrams are what again?
<Ox0dea> [k-: "Penis", "spine", and "pines" are all anagrams of each other.
j4cknewt has quit [Remote host closed the connection]
<shevy> "An anagram is a type of word play, the result of rearranging the letters of a word or phrase to produce a new word or phrase, using all the original letters exactly once"
j4cknewt has joined #ruby
<[k-> lel
<[k-> penis even
<Ox0dea> >> @_,$_,@__=->_,__{_==''?_:(__[_[$_-$_]]?_[$_-$_]:'')+@_[_[$_..-$_],__]},$$/$$,@__=->_{__,___=_[$_-$_],_[$_..-$_];_==''?_:@__[@_[___,->_{_<__}]]+__+@__[@_[___,->_{_>=__}]]};($__=->*_{__=@__[_[$.]];$*[$_-$_]==__ ?_:$*<<__;_[$.+=$_]?$__[*_]:!$*[$_]})['allergy', 'gallery', 'largely', 'regally']
<ruboto> Ox0dea # => true (https://eval.in/392704)
<Ox0dea> I found a few groups of five, but they contained some pretty obscure words, so I went with those four.
<[k-> oh gosh
j4cknewt has quit [Remote host closed the connection]
<Ox0dea> >> @_,$_,@__=->_,__{_==''?_:(__[_[$_-$_]]?_[$_-$_]:'')+@_[_[$_..-$_],__]},$$/$$,@__=->_{__,___=_[$_-$_],_[$_..-$_];_==''?_:@__[@_[___,->_{_<__}]]+__+@__[@_[___,->_{_>=__}]]};($__=->*_{__=@__[_[$.]];$*[$_-$_]==__ ?_:$*<<__;_[$.+=$_]?$__[*_]:!$*[$_]})['penis', 'spine', 'pines', 'snipe']
<ruboto> Ox0dea # => true (https://eval.in/392705)
<[k-> demystify
<[k-> diːˈmɪstɪfʌɪ/
<[k-> verb
<[k-> make (a difficult subject) clearer and easier to understand.
<[k-> you aren't doing that!
<shevy> yeah
<shevy> but what did you expect from an Oracle
howdoi has joined #ruby
bruno- has joined #ruby
acke has quit [Remote host closed the connection]
<sevenseacat> I love that you're using the term 'muggle' for the readable version :D
<Ox0dea> sevenseacat: baweaver's idea. :)
arooni-mobile has joined #ruby
<[k-> >> %w(cry yrc ycr).map(&:sort).tap { |o| o.all? { |p| p == o.first } }
<ruboto> [k- # => undefined method `sort' for "cry":String (NoMethodError) ...check link for more (https://eval.in/392706)
<Ox0dea> Feckin' pleb.
<[k-> sad
<sevenseacat> lawl
duderonomy has joined #ruby
duderonomy has quit [Max SendQ exceeded]
bb010g has quit [Quit: Connection closed for inactivity]
roolo has joined #ruby
<Ox0dea> >> !%w(cry yrc ycr).uniq { |w| w.chars.sort }[1]
<ruboto> Ox0dea # => true (https://eval.in/392707)
<Ox0dea> That's pretty much the sane version of my crazy one.
bruno- has quit [Ping timeout: 246 seconds]
duderonomy has joined #ruby
<Ox0dea> How people have conflated my shenanigans with golfing is beyond me.
<[k-> ooooooo
<[k-> clever
adamski2600 has joined #ruby
<[k-> if it has 2 elements, then it's false
<Ox0dea> Oui.
<[k-> if it has 1, it returns !nil
<Ox0dea> What would we do without nil, eh?
solars has quit [Ping timeout: 252 seconds]
Rollabunna has joined #ruby
<Ox0dea> Somebody posted on /r/ruby the other day their ideas for "class composition". It's a pretty interesting idea, at least insofar as it would let us represent things like Maybe String pretty cleanly.
<[k-> modifying the kernel?
<Ox0dea> Not at all necessary.
adamski2600 has quit [Ping timeout: 265 seconds]
<Ox0dea> class Class; def * other; magic goes here; end end
Atlantean has joined #ruby
daas has joined #ruby
Atlantean has left #ruby [#ruby]
acke has joined #ruby
<Ox0dea> [k-: What would you say is None's "type"?
<[k-> you mean nothing?
<Ox0dea> It seems I do.
<[k-> NothingClass just like NilClass TrueClass FalseClass, etc
Rollabunna has quit [Ping timeout: 248 seconds]
<Ox0dea> Well, I meant Haskell's Nothing, but Maybe a does make sense after giving it a bit of thought.
<[k-> Nothing.is_a? Maybe a should be true
<Ox0dea> Indeed.
<[k-> Nothing.is_a? Maybe is also true
<[k-> we should have #<Maybe:String @value="test"> or #<Maybe:Nothing>
<daas> [k-: You recommended me to get an HTTP library
<[k-> yes
<daas> I've started learning Sinatra, will I still need something else for HTTP?
<[k-> Sinatra != http library
<daas> alright
<tbuehlmann> sinatra is indeed an HTTP library
meph has joined #ruby
<tbuehlmann> had this conversation often times, but you might ask konstantin about that :p
<daas> ._.
lavros has joined #ruby
CloCkWeRX has quit [Ping timeout: 250 seconds]
j4cknewt has joined #ruby
<Ox0dea> tbuehlmann: Is it also an FTP library?
<[k-> fun fact: defining #call allows you to use .()
<Ox0dea> [k-: As well as #[].
<Ox0dea> Erm, maybe not.
<Ox0dea> Yeah, not.
<[k-> hue hue
<Ox0dea> On a related note, there are four ways to call Procs.
<Ox0dea> #call, #[], .(), and...
<[k-> ()!
<Ox0dea> Nah.
<shevy> SEND
<Ox0dea> Nope.
<Ox0dea> >> x { x * 2 } === 21
<ruboto> Ox0dea # => undefined method `x' for main:Object (NoMethodError) ...check link for more (https://eval.in/392715)
<Ox0dea> >> -> x { x * 2 } === 21
<[k-> >> (proc { :Hi })()
<ruboto> Ox0dea # => 42 (https://eval.in/392717)
<ruboto> [k- # => /tmp/execpad-f8e442c0393f/source-f8e442c0393f:2: syntax error, unexpected '(', expecting keyword_end ...check link for more (https://eval.in/392717)
<[k-> :(
<[k-> it worked for literal lambdas
* ljarvis would prefer first-class funcs and enforced parenthesis
<shevy> ack
<shevy> enforced lisps
<[k-> he is looking at you, Ox0dea
<shevy> Ox0dea uses lots of parens
<Ox0dea> I don't.
<shevy> well perhaps not
<[k-> not with the literal lambda syntax
<shevy> {_==''?_:(__[_[$_-$_]]?_[$_-$_]:'')
<[k-> he just drops it like nobody's business!
<shevy> I sense one lisp!
<[k-> that's not a lisp
<[k-> it is ? :
<shevy> it's one layer of (lisp)
<ljarvis> in a new language I'm working on, *every* object is "callable"
<[k-> so Ruby doesn't get confised
<Ox0dea> ljarvis: What can I call 4 with?
<shevy> yeah ruby does not get confised a lot but [k- does
<ljarvis> Ox0dea: no args, 4() == 4
<[k-> Ruby does get confused a lot!
DLSteve has joined #ruby
<shevy> you would too if you'd be run by such a long grammar rule
<[k-> ljarvis you mean, like Scala?
<Ox0dea> ljarvis: Hashes are functions of their keys, presumably?
<ljarvis> Ox0dea: although as a side-effect, 4(+, 4) would work
<ljarvis> [k-: not exactly
<Ox0dea> Clojure gets "callable" right, I think.
RandyT has quit [Ping timeout: 246 seconds]
<[k-> operators are not special, yay
<ljarvis> Ox0dea: pretty much, currently
<Ox0dea> Hashes are functions of their keys, keys are functions "into" hashes.
eGGshke has joined #ruby
<[k-> >> (-> { 42 })()
<ruboto> [k- # => /tmp/execpad-0ee5477ff935/source-0ee5477ff935:2: syntax error, unexpected '(', expecting keyword_end ...check link for more (https://eval.in/392718)
The_Phoenix has quit [Read error: Connection reset by peer]
<Ox0dea> [k-: What are you even?
<ljarvis> foo = SomeObj.new; foo() == foo # true or define #call and it'll override it
<[k-> >> a = -> { 42 }; a()
<ruboto> [k- # => undefined method `a' for main:Object (NoMethodError) ...check link for more (https://eval.in/392719)
acke has quit [Remote host closed the connection]
<ljarvis> [k-: seriously, it doesn't work
<[k-> ?experiment [k-
<ruboto> [k-, Please use your local irb or pry (see ?pry) to experiment, ruboto's eval functionality is for demonstration purposes only.
<[k-> I swear it did!
<Ox0dea> You just didn't notice the period.
<Ox0dea> I don't even know why that's a feature.
pgatt has joined #ruby
<Ox0dea> It's almost like it's trying to cover over the lack of first-class functions.
<ljarvis> heh pretty much
<[k-> at least they tried
alex88 has joined #ruby
sharpmachine has joined #ruby
eGGshke has quit [Ping timeout: 256 seconds]
hotpancakes has joined #ruby
<ljarvis> it shouldn't have been added imo, but go figure. I'd like a Ruby with first-class functions. Though I know a lot of people love not having to add parens to method calls
vdamewood has joined #ruby
<Ox0dea> I'd like a Ruby with awesome destructuring for more than just Arrays.
<Ox0dea> >> _,(_,_,((_,(foo,_)),_)) = [1, [2, [3, 4], [[5, [:target], 6], [7], 8, [9], 10]]]; foo
<ruboto> Ox0dea # => :target (https://eval.in/392720)
<ljarvis> elixir/erlang gets this right imo
<ljarvis> right for me, anyway
<sphex> ljarvis: as it is, you can have variables with the same name as methods, and they are syntactically distinguishable. calling variables with just parentheses would be ambiguous.
<ljarvis> where = isn't an assignment orderator
<[k-> ljarvis = sandwich pls
<Ox0dea> Do E/E add anything to Haskell's destructuring semantics?
<sphex> I'd like Ruby to have real multiple return values, and make flat_map unnecessary with it :/
<[k-> it combines them into an array and you can destructure it
<ljarvis> Ox0dea: I haven't dived deep enough to know that yet. Started on Elixir yesterday and never got into Erlang because the syntax makes me want to rip my face off
<Ox0dea> sphex: In light of parallel assignment, what's the practical difference?
sharpmachine has quit [Ping timeout: 255 seconds]
bosma is now known as superkai64
hotpancakes has quit [Ping timeout: 276 seconds]
<ljarvis> Elixir is probably the most exciting language for me since Ruby. I love some other languages but I'm rarely excited to use them. Then again I've spent like 2 hours with Elixir so maybe that's premature
superkai64 is now known as bosma
<[k-> data Person = Person String Int String String String String String String String
<shevy> sevenseacat is a cat that drinks elixir
CloCkWeRX has joined #ruby
norc_ has joined #ruby
<[k-> f (Person name _ _ _ _ _ _ _ _ _ _ _) = name
<[k-> :D
<Ox0dea> Looks totally idiomatic!
<norc_> Right channel now. So - I would like to do private inheritance (create a custom class that dervies from Array) without exposing the Array functionality to the outside.
<norc_> Is that possible?
<[k-> totes.
<ljarvis> norc_: you should just encapsulate an internal array
jbw_ has joined #ruby
<norc_> ljarvis: Yeah but I dont want to specify the extra sender object every time :D
<[k-> private(*[Array.instance_methods - Object.instance_methods])
<ljarvis> norc_: what do you mean?
<[k-> tada!
<shevy> you can use .send still or?
<ljarvis> norc_: you want to expose some methods?
<norc_> ljarvis: Yeah.
<ljarvis> norc_: you could use Delegator
nofxx has quit [Ping timeout: 256 seconds]
jbw__ has quit [Ping timeout: 256 seconds]
<[k-> wait, that should be () in place of []
<ljarvis> but you mentioned "without exposing the Array functionality to the outside" so that confuses me a bit
<Ox0dea> [k-: Or you could put the * inside the [].
<[k-> does that splat
<ljarvis> >> [*1..10]
<ruboto> ljarvis # => [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] (https://eval.in/392721)
<Ox0dea> Well, it splats Ranges, but maybe not subtraction.
<ljarvis> prob need another ()
<norc_> ljarvis: That was phrased a bit badly I admit. Basically I want to enforce using my own methods that can manipulate the array.
<Ox0dea> ljarvis: Nope.
<[k-> I mean, pass multiple arguments without array
<ljarvis> norc_: in which case you could have to write your own methods anyway
<ljarvis> Ox0dea: heh, go figure
<norc_> ljarvis: Now I know I can just redefine them.
<Ox0dea> >> x = [1, 2, 3]; y = [1]; [*x - y]
<ruboto> Ox0dea # => [2, 3] (https://eval.in/392722)
<Ox0dea> Ruby so cray.
<ljarvis> cray cray
arooni-mobile has quit [Ping timeout: 248 seconds]
<ljarvis> norc_: could you provide an example?
<norc_> ljarvis: It just made me think whether it was possible in general to get the same inheritance behavior, that they get declared as private by default.
<Ox0dea> [k-: Heh, the brackets aren't even necessary.
chinmay_dd has quit [Ping timeout: 252 seconds]
<ljarvis> norc_: yeah that doesn't exist via inheritance
<Ox0dea> >> def foo a, b; a + b end; a = [1, 2, 3]; b = [1]; foo(*a - b)
<ruboto> Ox0dea # => 5 (https://eval.in/392723)
<ljarvis> cray cray cray
abuzze has quit [Remote host closed the connection]
<ljarvis> parse.y. not even once.
yfeldblum has quit [Ping timeout: 248 seconds]
chinmay_dd has joined #ruby
<Ox0dea> I've tried twice now to get everything straight to add %d(1 2 3), but there's just so much going on in there.
<[k-> >> class Array;private *(Array.instance_methods - Object.instance_methods) end; [].new.each {}
<ruboto> [k- # => undefined method `new' for []:Array (NoMethodError) ...check link for more (https://eval.in/392724)
<[k-> oops
<ljarvis> Ox0dea: check out the commit where aaron (I think) adds %I -- I remember it being quite succinct
<norc_> :D
towski_ has joined #ruby
<ljarvis> norc_: D:
<[k-> >> class Array;private *(Array.instance_methods - Object.instance_methods) end; [].each {}
<ruboto> [k- # => private method `each' called for []:Array (NoMethodError) ...check link for more (https://eval.in/392725)
<[k-> yay!
CloCkWeRX has left #ruby [#ruby]
<Ox0dea> norc_: Are you sure it wouldn't be wiser to delegate?
<ljarvis> [k-: instance_methods(false) removes superclass methods
<[k-> it's basically what I done, but with more functionality!
<[k-> ooo
<[k-> cool, ljarvis
<norc_> Ox0dea: Delegation is a bit cumbersome if you have a lot of methods.
<ljarvis> although it doesn't do exactly what yours does
<ljarvis> norc_: huh, how?
Miron has joined #ruby
<ljarvis> you don't have to write the methods
<[k-> method_missing => delegate
Jackneill has quit [Quit: Leaving]
<norc_> And that is what private inheritance tries to avoid in the first place.
<ljarvis> you don't need to mess with method_missing
<norc_> ljarvis: For a second I was thinking "that is a bold thing to say in #RubyOnRails" until I realized it was a different channel. Heh.
<[k-> but Rails does it *all* the time
Jackneill has joined #ruby
<daas> is there a channel for sinatra
<[k-> Ruby provides hooks on method added deleted and whatnot
<[k-> you could call private immediately using those hooks
<ljarvis> daas: did you try #sinatra?
<daas> i was worried about joining a Frank Sinatra fan chat
<ljarvis> aha, why worried? that might be fun
<norc_> [k-: Well either way. The gem I found up there seems to accomplish private inheritance.
<norc_> daas: If you are worried about that, you shouldnt be using Sinatra.
<daas> fair enough lol
<[k-> why do you want inheritance again
<Ox0dea> norc_: Could you explain why you're not just backing your thing with an Array under the hood?
darkf_ has joined #ruby
frem has quit [Quit: Connection closed for inactivity]
sdothum has joined #ruby
Tarkers34 has joined #ruby
<Ox0dea> I think it might be a bug.
towski_ has quit [Remote host closed the connection]
yfeldblum has joined #ruby
Ilyas has joined #ruby
bruno- has joined #ruby
darkf has quit [Ping timeout: 248 seconds]
darkf_ is now known as darkf
<norc_> Ox0dea: Because composition does not allow you to change the behavior of internal methods.
towski__ has joined #ruby
<norc_> Ox0dea: If you inherit, you can do something along these lines: http://pastie.org/10273874
Rollabunna has joined #ruby
allomov has quit [Remote host closed the connection]
edb__ has joined #ruby
<Ox0dea> That's not at all demonstrative of why you can't just use an internal array, but all right.
jamesaxl has joined #ruby
<norc_> Ox0dea: Overriding methods is not demonstrative of why inheritance can be useful?
<norc_> That is quite an interesting opinion.
<Ox0dea> norc_: Is your thing not sufficiently Array-like that you could define the methods you're overriding in terms of an underlying array?
<norc_> Ox0dea: Oh I think you misunderstood my example with the Array. I dont have the actual need to do private inheritance for the case with Array. It was just what got me thinking if you read back.
bruno- has quit [Ping timeout: 252 seconds]
<norc_> So my question was in general, not specific to what Im doing with the Array.
towski_ has joined #ruby
<norc_> Ox0dea: Not sure what you mean by that..
<ljarvis> Ox0dea: yeah seems weird to me
<Ox0dea> norc_: I'm sure your rationale is much easier to follow in light of being able to see the actual code, so I'll leave you to it.
towski__ has quit [Ping timeout: 256 seconds]
<[k-> isn't the purpose of subclassing to augment
michael_mbp has quit [Excess Flood]
dgutierrez1287 has joined #ruby
mandarinkin has joined #ruby
<shevy> isn't this the purpose of modules
towski__ has joined #ruby
Rollabunna has quit [Ping timeout: 248 seconds]
<Ox0dea> They're probably mathematically equivalent, in some sense.
michael_mbp has joined #ruby
abuzze has joined #ruby
towski___ has joined #ruby
<norc_> I guess Array is actually a bad example since it is a built-in class.
towski_ has quit [Ping timeout: 264 seconds]
towski___ has quit [Read error: Connection reset by peer]
tsvenson|afk is now known as tsvenson
<shevy> \o/
<shevy> look how angry they got here when you said you wanna subclass Array
<[k-> is it time for ?fake?
<[k-> ?fake
<ruboto> Please show your real code to illustrate your problem. Using fake code often hides it or won't bring up the best possible solution.
<[k-> tada!
dgutierrez1287 has quit [Ping timeout: 256 seconds]
<shevy> what is fake code
<jesterfraud> shevy not real code
<[k-> maybe jhass would explain!
<shevy> my code is real!
<[k-> no its not
<shevy> :(
<[k-> if cake isn't real
<[k-> code isn't too!
towski__ has quit [Ping timeout: 264 seconds]
<shevy> you can't have cake anymore [k-
<[k-> :( I never did
<shevy> hah... been a long time since I ate cake too, it's usually way too much sugar
workmad3 has joined #ruby
towski_ has joined #ruby
Tarkers34 has quit [Remote host closed the connection]
<shevy> now I shall find out when Hello World was first issued to the world
mhib has joined #ruby
towski_ has quit [Read error: Connection reset by peer]
<shevy> hmm... "Kernighan's 1972 A Tutorial Introduction to the Language B"
<Ox0dea> That's the one.
towski_ has joined #ruby
Pupeno has quit [Remote host closed the connection]
renderful has joined #ruby
<Ox0dea> >> class Fixnum; def [] o; o[self] end end; foo = [1, 2, 3]; 1[foo]
<ruboto> Ox0dea # => 2 (https://eval.in/392731)
<Ox0dea> Just like C!
peter_paule has joined #ruby
<shevy> extrn a,b,c; putchar(a); putchar(b); putchar(c); putchar('!*n');
<shevy> B is strange
<[k-> disgusting
<shevy> lol
towski_ has quit [Remote host closed the connection]
<shevy> good code is hard
towski_ has joined #ruby
<[k-> hard code (as in solid code) is good
<jesterfraud> hard code (as in the Mohs scale) is a concern
<Ox0dea> Lisp is old as dirt and yet more powerful than anything we've devised since; I wish more people agreed that it's also beautiful, but alas.
workmad3 has quit [Ping timeout: 248 seconds]
<shevy> didn't lisp feature a hello world example?
<jesterfraud> if only they would lispen
<[k-> lel
<shevy> (hello (world))
<Ox0dea> shevy: That would require McCarty to have been a time traveller, no?
towski_ has quit [Read error: Connection reset by peer]
<Ox0dea> *McCarthy
tkuchiki has joined #ruby
<shevy> is that the father of the NSA
<[k-> oh gosh
towski_ has joined #ruby
lkba has joined #ruby
<Ox0dea> I wonder if he's the father of the FSA.
<Ox0dea> Doubtful.
<shevy> there must be older examples of hello world than B
lkba has joined #ruby
zz_Outlastsheep is now known as Outlastsheep
<Ox0dea> shevy: Nope, it was Kernighan's idea.
<shevy> Ox0dea you weren't even born in 1972!!!
<Ox0dea> You're not wrong.
arup_r has joined #ruby
tkuchiki has quit [Remote host closed the connection]
<Ox0dea> But there are people who were.
towski_ has quit [Remote host closed the connection]
<sevenseacat> 1972 was a thing?
<Ox0dea> Sort of.
<[k-> people born in 1972 didn't know about hello world!
<shevy> [k- well perhaps if they would have known B
towski_ has joined #ruby
renderful has quit [Ping timeout: 265 seconds]
<shevy> hacking back then must have been fun
<[k-> yes, searching the cables for bugs must be fun
<Ox0dea> shevy: Writing assembly really does have its charms.
yfeldblum has quit [Ping timeout: 248 seconds]
<Outlastsheep> Or having one of your bloody punch-cards bent slightly.
<shevy> [k-, a short history of hacking http://www.onlinemba.com/images/hacking.jpg
<[k-> clojure or lisp
towski_ has quit [Remote host closed the connection]
<Ox0dea> Clojure is a Lisp.
lkba_ has quit [Ping timeout: 264 seconds]
towski_ has joined #ruby
<[k-> the lispers don't agree
<jesterfraud> I remember one of my CS lecturers talking about the sysadmins cutting the cable for the 'halt' command to stop people using it at the end of their script
multi_io has quit [Ping timeout: 252 seconds]
<arup_r> currently I am making a url string by hand.. any way to build it dynamically, when I have an array ["https://", "example.com", "80", "context"]
<[k-> especially the common lisp people
<jesterfraud> because if they did that, you had to restart it manually
towski_ has quit [Remote host closed the connection]
<shevy> good old days
<arup_r> I tried URI.join(*["https://", "example.com", "80", "context"]).to_s .. but it is giving something which I don't want
peter_paule has quit [Ping timeout: 276 seconds]
adamski2600 has joined #ruby
towski_ has joined #ruby
<arup_r> Am I blocked to send here in this channe any FQDN ?
daas has quit [Remote host closed the connection]
<[k-> your array consists of port
multi_io has joined #ruby
<arup_r> Yes.. I know
<shevy> how should the final URL look like arup_r
<Ox0dea> [k-: What do they say makes Clojure a not-Lisp?
bronson has joined #ruby
<[k-> URI doesn't know that "80" is the port
<[k-> so you are doing it wrong
<arup_r> I am currently making by hand
<shevy> arup_r I think you have to write a method that does that, with the entry at position [2] in your array, add a :
<shevy> yeah
towski_ has quit [Remote host closed the connection]
<[k-> Ox0dea I would recall if I cared :p
<arup_r> manual way I am doing ... just was checking if any inbuilt method is present in Ruby
towski_ has joined #ruby
<Ox0dea> arup_r: Is the port going to be the only numeric part of the URL?
<shevy> don't think there is a method that checks for ports there :)
<arup_r> no.. that I don't know
<[k-> something about... zilch, I recall none of the arguments
<Ox0dea> arup_r: Is the domain name going to contain any digits?
towski_ has quit [Read error: Connection reset by peer]
<arup_r> it is like <protocol>//:<domain>:<port>/<context>
edb__ has quit [Ping timeout: 265 seconds]
<Ox0dea> arup_r: That doesn't answer my question, though.
<arup_r> as of now domain name has only characters
<arup_r> no digit
<Ox0dea> If the port is going to be the first numeric part of the URL, you could do foo.join.sub(/\d+/, ':\1/')
<arup_r> Ox0dea: ^^
towski_ has joined #ruby
<Ox0dea> arup_r: ^
<arup_r> ok
<[k-> eww, disgusting
<Ox0dea> Better than mucking about with foo[2].
workmad3 has joined #ruby
railsraider_ has joined #ruby
towski_ has quit [Remote host closed the connection]
yfeldblum has joined #ruby
railsraider has quit [Read error: Connection reset by peer]
railsraider_ is now known as railsraider
<arup_r> I was doing "%{protocol}//:%{domain}:%{port}/%{context}" % hash_of_url_parts
towski_ has joined #ruby
<Ox0dea> That's certainly more readable.
bronson has quit [Ping timeout: 276 seconds]
Tarkers34 has joined #ruby
<Ox0dea> To some eyes, anyhow.
<[k-> or you could just have a hash { protocol: "http", domain: "example.com", port: "80"---
<arup_r> thing is I need to check the trailing/leading `/` which is annoying :/
<[k-> I was in the midst of typing that :(
<arup_r> [k-: yes that is what i am doing
<shevy> you are too slowy [k-
<[k-> I'm on mobile!
towski_ has quit [Remote host closed the connection]
<[k-> you were the person who ewwed coding on mobile!
<arup_r> I though we have something like `File.join()` for `URI` also..
towski_ has joined #ruby
<[k-> oh gosh, php
<[k-> you have ruined my eyes
hotpancakes has joined #ruby
<arup_r> but I think we have.. UIR.join don't understand port
CloCkWeRX has joined #ruby
sharpmachine has joined #ruby
<arup_r> [k-: Yes.. I am using my second eyes :)
allomov has joined #ruby
<[k-> it wasn't designed to handle ports :(
<arup_r> php code is horrible
<arup_r> humm,.. I see that
Miron has quit [Ping timeout: 252 seconds]
bruno- has joined #ruby
woodennails has joined #ruby
sulky has quit [Ping timeout: 244 seconds]
woodennails has quit [Remote host closed the connection]
<arup_r> I checked Rails API also... as I am writing code for Rails only.. But didn't notice any method there too.. atleast I didn't find
towski__ has joined #ruby
<shevy> arup_r did you finish porting the php code? :)
<arup_r> hahah 40%
workmad3 has quit [Ping timeout: 256 seconds]
<arup_r> my understanding of PhP is slowwwwwwww
<arup_r> yes split does
<arup_r> but join don't :/
matp has quit [Ping timeout: 246 seconds]
towski__ has quit [Read error: Connection reset by peer]
towski__ has joined #ruby
krz has quit [Ping timeout: 264 seconds]
hotpancakes has quit [Ping timeout: 246 seconds]
oylm has quit [Ping timeout: 265 seconds]
towski__ has quit [Remote host closed the connection]
towski_ has quit [Ping timeout: 256 seconds]
sharpmachine has quit [Ping timeout: 255 seconds]
krz has joined #ruby
towski_ has joined #ruby
<arup_r> Rails have the reverse of what I want btw.. ;) http://api.rubyonrails.org/classes/ActionDispatch/Http/URL.html#method-i-host
bruno- has quit [Ping timeout: 265 seconds]
towski_ has quit [Remote host closed the connection]
alex88 has quit [Remote host closed the connection]
DexterLB has quit [Read error: Connection reset by peer]
alex88 has joined #ruby
towski_ has joined #ruby
serivich has joined #ruby
stylus has quit [Remote host closed the connection]
Papierkorb has joined #ruby
towski_ has quit [Read error: Connection reset by peer]
towski_ has joined #ruby
stylus has joined #ruby
towski_ has quit [Remote host closed the connection]
oylm has joined #ruby
towski_ has joined #ruby
<[k-> if array use "%s://%s:%d/%s" % [v.shift, v.shift, v.shift, v.join ?/]
vyorkin3 has joined #ruby
<[k-> tada!
<[k-> that's worser than your hash
<shevy> ugly
<shevy> disgusting
<[k-> indeed
<shevy> <[k-> disgusting
<shevy> :D
<[k-> yes
towski_ has quit [Remote host closed the connection]
<shevy> arup_r let [k- port the php code to ruby
cpruitt has joined #ruby
<shevy> distribute one-method (of php) per channel user
<[k-> Ox0dea will do a better job!
<Ox0dea> I've already suggested using a very simple substitution.
towski_ has joined #ruby
<Ox0dea> If it's a Hash, foo.values.join.sub(/(\d+)/, ':\1/') is a nice, simple approach that doesn't require much thinking.
<[k-> well it was less terrible than mine
bruno- has joined #ruby
DexterLB has joined #ruby
Miron has joined #ruby
towski_ has quit [Remote host closed the connection]
<shevy> how weird
<shevy> when [k-'s code becomes less readable than Ox0dea's code
<Ox0dea> What a time to be in #ruby!
towski_ has joined #ruby
<[k-> isn't that Ox0dea's job as well? :o
<[k-> he even did $_ = $$ / $$ to get 1
towski_ has quit [Remote host closed the connection]
<Ox0dea> >> ' '=~/$/
<ruboto> Ox0dea # => 1 (https://eval.in/392747)
timonv has joined #ruby
<[k-> next time you see $$/$$ you know it's 1
<[k-> >> '' =~ /^/
<ruboto> [k- # => 0 (https://eval.in/392748)
vyorkin3 has quit [Quit: WeeChat 1.2]
<Ox0dea> But 0 is useless for deriving other numbers.
<[k-> now, why doesn't that work
<Ox0dea> It does?
tno has joined #ruby
<[k-> I mean, for 1
<Ox0dea> Because the start of the string is at index 0.
Muhannad has joined #ruby
<shevy> [k- lol
<shevy> you even analyze his code [k-
<Ox0dea> It's not like there's nothing to learn from it.
<[k-> that's the way to learn!
<Ox0dea> A lot of the tricks I'm using are quite useful when used without crazy variable names.
towski_ has joined #ruby
<Ox0dea> [k-: String#=~ returns the index at which the regex matched.
<[k-> ooo
<[k-> so if you have 2 spaces, it will be 2?
<Ox0dea> Ffor /$/, yes.
<Ox0dea> *For
<Ox0dea> $ is the end-of-string anchor.
towski_ has quit [Read error: Connection reset by peer]
<[k-> he uses Array#* instead of Array#join ;-;
<arup_r> Ox0dea: I am not much good with with Regex.. so I went with Hash.. https://gist.github.com/aruprakshit/41e698c43a21e535a80e#file-e24_payment_pipe-rb-L90
Abhijit has joined #ruby
<Ox0dea> Whatever tickles your fancy.
<Abhijit> gem is independent of distro specific repos right? my gem cant find localtunnel in cestos7
<arup_r> Ox0dea: I just want my code work properly end of the day :)
<Abhijit> flask tutorial says to install gem install localtunnel
towski_ has joined #ruby
Asher has quit [Quit: Leaving.]
yaw has joined #ruby
<Ox0dea> Abhijit: Flask is Python?
<Abhijit> I knew my question will go wrong.
<Ox0dea> The tutorial for a Python Web framework is telling you to install a gem?
towski_ has quit [Remote host closed the connection]
<Abhijit> ok
<[k-> >> !%($).length * %w(:()
<ruboto> [k- # => /tmp/execpad-5a17447c2039/source-5a17447c2039:2: unterminated string meets end of file ...check link for more (https://eval.in/392749)
towski_ has joined #ruby
<Abhijit> Ox0dea, so can you "imagine" what gem i am talking about?
<arup_r> shevy: pointer to build this part https://gist.github.com/aruprakshit/ba7b0eb50c4c1ff418f3#file-e24-php-L454-L473 what module of Ruby stdlib I should look into .. O God! :/
Rollabunna has joined #ruby
<Ox0dea> Abhijit: I suspect you are powerfully confused.
Asher has joined #ruby
<Abhijit> I am confident that you are 100% powerfully confused.
<Abhijit> Ox0dea, read the question properly.
towski_ has quit [Remote host closed the connection]
<Ox0dea> Abhijit: Good luck installing a yanked gem, bud: https://rubygems.org/gems/localtunnel
towski_ has joined #ruby
<Abhijit> Ox0dea, so answer about that gem status inntead of talking about my confidence and knowledge.
workmad3 has joined #ruby
<[k-> arup_r good luck getting anyone to willingly read php
<Ox0dea> Abhijit: Why on earth does your firewall block access to rubygems.org?
<Abhijit> Ox0dea, how on earth I would know this when using Centos 7 which is not built by me but community?
towski_ has quit [Remote host closed the connection]
<Abhijit> and I never touched any firewall setting. how do you know this is a firewall causing issue?
towski_ has joined #ruby
<Abhijit> ERROR: Could not find a valid gem 'localtunnel' (>= 0) in any repository is the error I get. what firewall has to do with it?
<Ox0dea> Abhijit: The gem has been yanked; it cannot be installed by anybody anymore.
Outlastsheep is now known as zz_Outlastsheep
<Abhijit> thats fine. i came here to know that only. Thank you for that.
towski_ has quit [Remote host closed the connection]
Rollabunna has quit [Ping timeout: 248 seconds]
<Ox0dea> Abhijit: So, to be clear, you didn't know of the existence of rubygems.org prior to your joining the channel?
towski_ has joined #ruby
towski_ has quit [Remote host closed the connection]
houhoulis has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 246 seconds]
towski_ has joined #ruby
towski_ has quit [Remote host closed the connection]
towski_ has joined #ruby
jesterfraud has quit [Quit: Textual IRC Client: www.textualapp.com]
towski__ has joined #ruby
<shevy> arup_r omg that looks awful
towski__ has quit [Remote host closed the connection]
<shevy> arup_r I think that is just a wrapper over curl; not sure what you need, either open-uri in ruby, or perhaps a gem that wraps over curl very closely
narph has joined #ruby
towski__ has joined #ruby
<shevy> apparently with ssl support CURLOPT_SSL_VERIFYHOST
<arup_r> I think Net::HTTPS I can use
<Ox0dea> Net::HTTPS would do just fine.
<arup_r> ^^
<arup_r> yes
<arup_r> I think so
<shevy> arup_r that php code has no comments/documentation?
<arup_r> but needs to lookinto the parameters they use there
<Ox0dea> arup_r: A line being 189 characters long doesn't bother you?
<arup_r> Nothing it has
<shevy> hehe
towski_ has quit [Ping timeout: 276 seconds]
<Ox0dea> Yes.
towski_ has joined #ruby
<arup_r> I don't know how to make cute .. so I kept it that ugly
<arup_r> :/
alex88 has quit [Remote host closed the connection]
<[k-> arup_r: this is how you can break a line into multiple: https://eval.in/392766
towski_ has quit [Remote host closed the connection]
<arup_r> ok..
<arup_r> thanks.. let me do it
towski_ has joined #ruby
sulky has joined #ruby
towski__ has quit [Ping timeout: 265 seconds]
towski_ has quit [Remote host closed the connection]
towski_ has joined #ruby
tkuchiki has joined #ruby
towski_ has quit [Remote host closed the connection]
towski_ has joined #ruby
tkuchiki has quit [Remote host closed the connection]
towski_ has quit [Remote host closed the connection]
towski_ has joined #ruby
lkba_ has joined #ruby
towski_ has quit [Remote host closed the connection]
towski_ has joined #ruby
towski_ has quit [Remote host closed the connection]
towski_ has joined #ruby
lkba has quit [Ping timeout: 276 seconds]
CloCkWeRX has quit [Ping timeout: 255 seconds]
towski__ has joined #ruby
symm- has joined #ruby
towski__ has quit [Remote host closed the connection]
towski__ has joined #ruby
davedev24_ has joined #ruby
ndrei has quit [Ping timeout: 264 seconds]
Musashi007 has quit [Quit: Musashi007]
edb__ has joined #ruby
towski_ has quit [Ping timeout: 256 seconds]
<[k-> you have not learnt
<[k-> you can use \ to extend the line
towski_ has joined #ruby
towski__ has quit [Remote host closed the connection]
<[k-> the code I showed you was purposeful!
vdamewood has quit [Ping timeout: 256 seconds]
hotpancakes has joined #ruby
towski_ has quit [Read error: Connection reset by peer]
narph has left #ruby [#ruby]
towski_ has joined #ruby
<arup_r> [k-: I used that too... but was not looks good with `\` or may be I couldn't built it up with it .. so I deleted and used the `heredoc` style
<arup_r> **look
towski_ has quit [Remote host closed the connection]
towski__ has joined #ruby
<[k-> "%{protocol:// \
<[k-> %{blah} \
meph has quit [Quit: Leaving.]
<[k-> hmm, you're right
towski_ has joined #ruby
towski__ has quit [Read error: Connection reset by peer]
hotpancakes has quit [Ping timeout: 244 seconds]
doublemalt_ has quit [Ping timeout: 252 seconds]
sharpmachine has joined #ruby
towski_ has quit [Read error: Connection reset by peer]
<[k-> since you have the <<-
<[k-> split the parts to each line
towski_ has joined #ruby
towski_ has quit [Remote host closed the connection]
doublemalt_ has joined #ruby
towski_ has joined #ruby
Pupeno has joined #ruby
Pupeno has joined #ruby
tkuchiki has joined #ruby
<arup_r> if I split.. then I am getting something like `=> "https:// example.com: 447/ azs/ servlet/ aa"`
<arup_r> [k-:
towski_ has quit [Remote host closed the connection]
<[k-> doesnt <<- solve that :o
<[k-> time to revise
tkuchiki has quit [Remote host closed the connection]
CloCkWeRX has joined #ruby
towski_ has joined #ruby
<[k-> oops, here docs aren't the right tool
<arup_r> humm
sharpmachine has quit [Ping timeout: 244 seconds]
towski_ has quit [Remote host closed the connection]
<arup_r> Ox0dea: should I use Net::HTTPS or Httparty ...?
towski_ has joined #ruby
<Ox0dea> arup_r: That's not my decision to make, but it seems you're making pretty simple requests, for which Net:HTTPS should serve just fine.
<Ox0dea> No sense brining in a dependency you don't really need.
<arup_r> yup
<arup_r> I just need to read the reponse after doing the POST
towski_ has quit [Ping timeout: 244 seconds]
abuzze has quit [Remote host closed the connection]
Indian has joined #ruby
cpruitt has quit [Quit: cpruitt]
chinmay_dd has quit [Read error: Connection reset by peer]
[k- has quit [Read error: Connection reset by peer]
mahmoudmahfouz has joined #ruby
Rollabunna has joined #ruby
krz has quit [Ping timeout: 252 seconds]
[k-_ has joined #ruby
[k-_ is now known as [k-
peter_paule has joined #ruby
Abhijit has quit [Quit: Bye.]
jpfuentes2 has joined #ruby
Rollabunna has quit [Ping timeout: 248 seconds]
ndrei has joined #ruby
<arup_r> I have to POST to the url `https://example.com:447/azs/servlet/aa` .. but http://docs.ruby-lang.org/en/2.0.0/Net/HTTP.html#method-c-new supports only `addrs, posrt`.. how should I pass other parts of my url ?
Akagi201 has joined #ruby
serivich has quit [Ping timeout: 244 seconds]
peter_paule has quit [Ping timeout: 256 seconds]
abuzze has joined #ruby
yh has joined #ruby
Akagi201_ has quit [Ping timeout: 276 seconds]
tvw has quit []
peter_paule has joined #ruby
<[k-> Net::HTTPS.new("https://example.com", 447).post("azs/server/aa", ...)
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
FernandoBasso has joined #ruby
<[k-> oh, you must have the / in front of azs
<[k-> yes
<[k-> at the top of the page, you will see examples of how to use Net::HTTP
symm- has quit [Ping timeout: 276 seconds]
Akagi201 has quit [Remote host closed the connection]
arup_r has quit [Read error: Connection reset by peer]
kirun has joined #ruby
Jackneill has quit [Quit: Leaving]
c355E3B has joined #ruby
vdamewood has joined #ruby
krz has joined #ruby
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
lxsameer_ has joined #ruby
jpfuentes2 has joined #ruby
war_pigs has joined #ruby
jpfuentes2 has quit [Client Quit]
yfeldblum has quit [Ping timeout: 248 seconds]
sameerynho has quit [Ping timeout: 244 seconds]
Jackneill has joined #ruby
bronson has joined #ruby
tkuchiki has joined #ruby
CatMartyn has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tkuchiki has quit [Remote host closed the connection]
peter_paule has quit [Ping timeout: 252 seconds]
bronson has quit [Ping timeout: 244 seconds]
mahmoudmahfouz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
FernandoBasso has quit [Quit: WeeChat 1.2]
FernandoBasso has joined #ruby
war_pigs has quit [Quit: later... computer is sleeping]
CatMartyn has joined #ruby
jesterfraud has joined #ruby
arup_r has joined #ruby
xxneolithicxx has quit [Ping timeout: 255 seconds]
aryaching has joined #ruby
krz has quit [Ping timeout: 256 seconds]
Papierkorb_ has joined #ruby
hotpancakes has joined #ruby
<arup_r> am I visible here ?
<apeiros> who's talking?
tsvenson has left #ruby ["Leaving"]
serivich has joined #ruby
<arup_r> me ........ :)
<arup_r> thanks for confirming...
<arup_r> I saw something like *User mode for arup_r is now +Zi* ... so thought I got banned :/
hotpancakes has quit [Ping timeout: 246 seconds]
Rollabunna has joined #ruby
<[k-> we aren't evil bastards!
<[k-> Z means you are connecting via SSL
<[k-> i means invisible
workmad3 has joined #ruby
<[k-> #ruby +b arup_r means you are banned
DLSteve has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<arup_r> ok
tflat has quit []
Rollabunna has quit [Ping timeout: 246 seconds]
SolarSailor has joined #ruby
Indian has quit [Ping timeout: 255 seconds]
<[k-> don't worry, no one gets banned from #ruby
<[k-> except spammers
<shevy> and people with a big nose
<[k-> like shevy >:D
<Ox0dea> I turned Ruby into Assembly: https://gist.github.com/0x0dea/45aae87c0180d36b6f0c
<Ox0dea> Sort of.
workmad3 has quit [Ping timeout: 248 seconds]
<[k-> would it kill you to use the `then` keyword specially reserved for this purpose
<skmp> oh look, a stack based vm
jesterfraud has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
iateadonut has joined #ruby
<shevy> random fun changelog of today
<shevy> guess who may be the author without googling!
<shevy> "the original array may not be embedded even if a substitution array is embedded, as it is embedded when the original array is short enough but not embedded."
<Ox0dea> Nobu?
brain_shim has joined #ruby
<shevy> yeah
<shevy> I am not sure what is happening, but I think it has something to do with embedding
<[k-> wut
<Ox0dea> skmp: Please defend register VMs.
xxneolithicxx has joined #ruby
<shevy> [k- but ; is shorter than then :)
<Ox0dea> "then" is just noise, always.
<shevy> don't let apeiros read that!
warriorkitty has joined #ruby
<[k-> he is showering, its ok
<shevy> haha how do you know
<shevy> you damn peeking?
<[k-> ?ot
<ruboto> this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
lxsameer_ has quit [Quit: Leaving]
<[k-> :D
<warriorkitty> Hi, what is the easiest way to check if the Ruby 2D array is a matrix/squared... (if its NxN). Thank you.
<Ox0dea> warriorkitty: foo.all? { |row| row.size == foo.size }
<[k-> s/foo/col
<warriorkitty> Ox0dea: Thank you! I knew it must be something easier then two each. :D
<IceDragon> Ox0dea: only under the assumption that all elements are Arrays (strings would work too)
<warriorkitty> than*
<ytti> Ox0dea, did sometihng similiar for friend's geo cache challenge, which required runnning Z80 code, implemented relevant part of it in sruby
Rollabunna has joined #ruby
<ytti> Ox0dea, but i think i only needed sub and rlca implementation
NeverDie has joined #ruby
war_pigs has joined #ruby
Rollabun_ has joined #ruby
warriorkitty has quit [Quit: Lost terminal]
pocketprotector has quit [Ping timeout: 252 seconds]
Rollabunna has quit [Ping timeout: 248 seconds]
<[k-> square = false; !foo.map(&:size).uniq.tap { |o| square = o[0].size == foo.size }[1]
bmurt has joined #ruby
<shevy> what are you doing [k-
<[k-> wait
<[k-> that doesn't work
<[k-> square = false; !foo.map(&:size).uniq.tap { |o| square = o[0].size == foo.size }[1] && square
<[k-> that should do the trick!
JDiPierro has joined #ruby
<[k-> I learnt, Ox0dea!
eggoez has quit [Ping timeout: 252 seconds]
<shevy> 1985
<shevy> Ada: Ranked 3
<shevy> hmmmm
<shevy> I should have started to program in 1985
<[k-> look, haskell!
bmurt has quit [Client Quit]
<shevy> I can't overcome the monad barrier
tkuchiki has joined #ruby
<[k-> just read more
<[k-> then sleep
<[k-> then read another monad tutorial
<Ox0dea> I do wish Ruby had Haskell's ability to define arbitrary symbolic methods and specify their fixation.
<[k-> then sleep
<[k-> and you will get it eventually
<shevy> the oracle has spoken
<shevy> [k- I have no time to sleep!
<[k-> pls
abuzze has quit [Remote host closed the connection]
<Ox0dea> [k-: If you weren't having a laugh back there, I must observe that I'm having a detrimental effect on the quality of your Ruby code.
<Ox0dea> /whisper All is going to plan...
mleung has joined #ruby
<shevy> he said your code sucks [k- :(
abuzze has joined #ruby
<[k-> that is probably true x10
<Ox0dea> I need a translator?
<shevy> yes
<shevy> a simplifier
<Ox0dea> [k-: He said you don't speak English.
tkuchiki has quit [Remote host closed the connection]
<[k-> >> "shevy".sub /[^s]+/, "haman"
<ruboto> [k- # => "shaman" (https://eval.in/392811)
hotpancakes has joined #ruby
j4cknewt has quit [Remote host closed the connection]
<[k-> I speak basic English
<sevenseacat> re: tiobe index - boo Java
<Ox0dea> >> 'landline'.tr('denial', '-/ fmr')
tkuchiki has joined #ruby
<ruboto> Ox0dea # => "rm -rf /" (https://eval.in/392813)
<[k-> :o
<sevenseacat> what on earth is ABAP
<Ox0dea> GitHub gave it a specific color in Linguist, so apparently somebody's using it.
<shevy> sounds like a song
<sevenseacat> ABAP (Advanced Business Application Programming, originally Allgemeiner Berichts-Aufbereitungs-Prozessor, German for "general report creation processor") is a high-level programming language created by the German software company SAP.
<sevenseacat> SAP. there we go.
<shevy> hahaha oh my god
<shevy> Allgemeiner Berichts-Aufbereitungs-Prozessor - now that is awesome
<al2o3-cr> y
<shevy> general report-recycle-processor # what the ...
<[k-> >> "shevy!".tr "y!ev", "anam"
<ruboto> [k- # => "shaman" (https://eval.in/392814)
abuzze has quit [Ping timeout: 246 seconds]
<shevy> I find .tr very arcane
<shevy> gsub is so much nicer!
<sevenseacat> tiobe list needs more elixir
SolarSailor has quit [Quit: Textual IRC Client: www.textualapp.com]
<[k-> it is more powerful than all my code combined!
<shevy> elixir is too hipster young
JDiPierro has quit [Remote host closed the connection]
<[k-> go is too hipster young
<shevy> "All Elixir code runs inside lightweight threads of execution (called processes) that are isolated and exchange information via messages"
sepp2k has joined #ruby
<shevy> hey
<shevy> ruby needs that
j4cknewt has joined #ruby
hotpancakes has quit [Ping timeout: 256 seconds]
<[k-> >> Thread.current
<ruboto> [k- # => #<Thread:0x41ec5a54 run> (https://eval.in/392815)
iateadonut has quit [Quit: Leaving.]
idafyaid has joined #ruby
<shevy> import Supervisor.Spec
<shevy> damn, they have import... ruby may be the last language on earth to not have import
<[k-> require "supervisor/spec"
<shevy> am I wrong or is the elixir syntax heavily ruby inspired?
<shevy> def serve_drinks(%User{age: age}) when age >= 21 do
<Ox0dea> You derpin'.
<[k-> you are right
<shevy> %User{name: name, age: age} = User.get("John Doe")
<shevy> ruby makes children
DexterLB has quit [Ping timeout: 252 seconds]
<[k-> Ruby has a lot of children
<shevy> hmm babies... so crystal, elixir...
<shevy> some things are weird: defmodule MathTest do
<shevy> huh
<[k-> data User = { name :: String, age :: Int }
<shevy> name is a string and age is an integer [k-
<[k-> Ox0dea do you prefer : or ::
<Ox0dea> For?
<[k-> types
<shevy> Tools like IEx (Elixir's interactive shell)
<shevy> irb <- -> iex !!!
<shevy> what does haskell use?
dgutierrez1287 has joined #ruby
<[k-> ghci
<shevy> I mean to denote types
<[k-> ::
<shevy> ghci is like 10 terabytes or something
<[k-> yes
DexterLB has joined #ruby
<[k-> I'm outdated!
<shevy> ah ok... the source is at around 10 MB
<shevy> compiled ghc-7.10.1-i386-unknown-linux-deb7.tar.xz is at 69 MB so that is not that bad
<Ox0dea> ~ $ pacman -Qql ghc | xargs stat -c '%s' | paste -sd + | bc
<Ox0dea> 943868136
<Ox0dea> Shit is massive.
<[k-> Ox0dea you haven't answered :(
<Ox0dea> [k-: Whichever, really.
<[k-> Elm does it the other way round
<[k-> Haskell or Elm!
<Ox0dea> TypeScript!
<_blizzy_> back to square one with no project ideas.
<[k-> ewwww
<_blizzy_> I wanna make something in ruby. :/
<Ox0dea> _blizzy_: Did you make that humanized time difference thing?
<shevy> the oracle uses archlinux
<[k-> TypeScript is basically java and JavaScript, like I have said
<_blizzy_> Ox0dea, no, I was tired when I got home from locals/yugioh.
<Ox0dea> _blizzy_: Then you're all set.
<shevy> _blizzy_ do it like I do; I wrote so much ruby code that I literally now spend most of my time rewriting old code!
<_blizzy_> shevy, good idea!
<[k-> shevy is crazy
<_blizzy_> oh I remembered that I started a django project that I need to finish.
<shevy> ohhh
<Ox0dea> ?ot _blizzy_
<ruboto> _blizzy_, this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
<shevy> <_blizzy_> I wanna make something in ruby. :/
<shevy> :)
<shevy> rails!!!
<_blizzy_> Ox0dea, ok. c:
<[k-> ?it ruboto
<ruboto> ruboto, I don't know anything about it
<shevy> j/k I don't use rails
<[k-> :(
<Ox0dea> _blizzy_: Really, though, human time difference is pretty nifty; if there really aren't any good libraries for it, you should totally go for it.
<_blizzy_> Ox0dea, I might.
<[k-> you should make a relative time logger too
<shevy> translation: the oracle sees good luck in your future ways
yh has quit [Ping timeout: 276 seconds]
<[k-> so I don't have to
<Ox0dea> _blizzy_: You really ought to provide accuracy to the femtosecond, though.
<shevy> someone still has to port arup_r's php code to ruby
<_blizzy_> slightly off topic, but I found this. https://github.com/stevenlordiam/logos if you ever need vectors of web dev logos. it has ruby.
<_blizzy_> php to ruby doesn't sound that bad.
rodfersou has joined #ruby
<[k-> ?ot pho
<ruboto> pho, this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
<[k-> php*
<[k-> actually, don't even dare move it there
rodfersou has quit [Remote host closed the connection]
<_blizzy_> ruby to ruby doesn't sound that bad.
<arup_r> shevy: what are you checking here https://gist.github.com/aruprakshit/ba7b0eb50c4c1ff418f3#file-e24-php-L345 :) my little test not telling me that http://codepad.org/3CFvTWBu
<arup_r> `-1` means ?
<_blizzy_> oh cool, php. -1 means false I'm assuming.
<arup_r> me too .. but tried to confirm myself
<arup_r> couldn't confirm
guyz has quit [Quit: quit]
<[k-> _blizzy_ will handle your php issues!
<Ox0dea> -1 means "not found".
<sevenseacat> arup_r: why are you seeking php help here?
<_blizzy_> I can finally use this
<_blizzy_> ?ot arup_r
<ruboto> arup_r, this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
<_blizzy_> I feel like I'm part of the #ruby family now
<shevy> arup_r what the ... is this ... if ($i == -1) {
<shevy> _blizzy_ yeah - you successfully managed to use the spambot :D
<_blizzy_> shevy, yep.
<shevy> arup_r I'd probably remove all .php files and rewrite in ruby from scratch :D
<[k-> ?ot ruboto
<ruboto> ruboto, this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
<shevy> haha
<_blizzy_> why not keep it in php. c:
<shevy> yeah ruboto go over
<arup_r> I'll use String#include? hehehe
<Ox0dea> He's already there.
<shevy> well that's a lot of php code to port, like more than 2000 lines...
<_blizzy_> then I would keep it in said language.
<[k-> ruboto says hi from #ruby-offtopic
<_blizzy_> I say hi back.
<sevenseacat> arup_r: don't ask PHP questions here.
<_blizzy_> ##php is better for this
<_blizzy_> or should I say self
<_blizzy_> ;)
<arup_r> sevenseacat: is silent learner..
brendan- has quit [Remote host closed the connection]
<[k-> sevenseacat is the master of all Ruby related things!
<_blizzy_> oh really?
<[k-> and php is not related to Ruby
<_blizzy_> if so, what's the value of a ruby in this current market? :o
<Ox0dea> Well, there's Phuby.
<shevy> sevenseacat is the master of elixir code
Pisuke has quit [Max SendQ exceeded]
<sevenseacat> i wish.
<_blizzy_> I wish I was a master of java or scala
<[k-> ugh java
<[k-> ?java
<ruboto> I don't know anything about java
<shevy> we need brainchips so that we don't have to learn boring languages
<_blizzy_> java isn't boring to me
<_blizzy_> inb4 ?ot _blizzy_
<shevy> java is a very exciting language
<[k-> ?ot _blizzy_ your wish is granted
<ruboto> _blizzy_, this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
Pisuke has joined #ruby
<_blizzy_> so, about them rubies.
<_blizzy_> [k-, I'm psychic. :D
<shevy> [k- just loves that bot here
<[k-> yes, I use it _all_ the time
<[k-> I have the command reference memorised
<_blizzy_> ruby doesn't have a process.uptime() like in node, doesn't it?
<[k-> no
<_blizzy_> rip.
sharpmachine has joined #ruby
<_blizzy_> thxs.
jesterfraud has joined #ruby
<_blizzy_> my battle bot is almost out of alpha.
<Ox0dea> _blizzy_: You could set a global variable to Time.now in a BEGIN block.
jesterfraud has quit [Client Quit]
<_blizzy_> Ox0dea, I thought g variables were bad.
<Ox0dea> They have their use cases.
jesterfraud has joined #ruby
<[k-> Thread.current[:local]= value
<Ox0dea> You could just as well make it a constant, I suppose.
Rollabun_ has quit [Read error: Connection reset by peer]
<Ox0dea> [k-: But then it'd only be accessible from the main thread.
<[k-> Thread.main
Rollabunna has joined #ruby
digifiv5e has joined #ruby
roolo has quit [Remote host closed the connection]
Rollabunna has quit [Read error: Connection reset by peer]
sharpmachine has quit [Ping timeout: 264 seconds]
warriorkitty has joined #ruby
Rollabun_ has joined #ruby
<Ox0dea> It's basically a global variable then, but it's true that it'd be much less likely to be modified by something else.
<shevy> \o/
lessless has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<warriorkitty> Hi again, just another question. I have an array and I need to check if inside that array are values between 1 and N.
<Ox0dea> warriorkitty: Array#all? again.
<Ox0dea> But you've got to figure out the predicate this time. :)
chouhoulis has joined #ruby
<warriorkitty> Ox0dea: Haha that's the problem.
<Ox0dea> Do you know about Ranges?
Rollabu__ has joined #ruby
<warriorkitty> Yes, but my array doesn't have contain? for Ranges.
<shevy> >> (1..5).include? 3
<ruboto> shevy # => true (https://eval.in/392823)
<warriorkitty> Ox0dea: Please, tell me the predicate! xD
<Ox0dea> warriorkitty: Someday (https://bugs.ruby-lang.org/issues/11286#change-53064), you might be able to say Array.all?(1..N), but until such time comes you'll have to open a block and check each element against a Range.
<Ox0dea> shevy demonstrated how to do so.
<warriorkitty> Oh, thank you very much.
<Ox0dea> We should totally be able to say Array.all?(1..N)!
<shevy> oracle-lang
<Ox0dea> But it's such a "Ruby" way to do it.
<[k-> Array#min == 1 && Array#max == N
Rollabun_ has quit [Ping timeout: 248 seconds]
<Ox0dea> [k-: Not quite.
<[k-> why ever not
michael_mbp has quit [Excess Flood]
<Ox0dea> Because it doesn't actually check that all of the elements are between 1 and N?
chouhoulis has quit [Ping timeout: 246 seconds]
<[k-> if the list is all numbers, it will work?
<Ox0dea> Nah.
<[k-> array*
<[k-> yes it will!
<Ox0dea> Oh, jeeze. I'm tired.
<Ox0dea> Sorry.
rho45dium_ has quit [Quit: Connection closed for inactivity]
<Ox0dea> That was bad.
<[k-> I thought my brain stopped working ;-;
<[k-> I was doing absolute graphs
<[k-> and my mind went blank
<Ox0dea> In my defense, it should be Array.min >= 1 && Array.max <= N.
<[k-> Well, true
kobain has joined #ruby
<arup_r> shevy: 70% done.. :)
<[k-> it's less efficient tho
michael_mbp has joined #ruby
<Ox0dea> But it gives the correct answer.
Vile` has quit [Quit: .]
<[k-> is it more expressive?
<Ox0dea> [2, 3, 4] satisfies all?(1..5), but just checking for min=1 and max=N would fail.
<[k-> (I was talking about min max vs range#include)
eggoez has joined #ruby
<Ox0dea> I think Range#include? is pretty expressive.
<[k-> seems so
timonv has quit [Ping timeout: 265 seconds]
chris2 has quit [Ping timeout: 248 seconds]
idafyaid has quit [Remote host closed the connection]
<[k-> but is it shorter?
<Ox0dea> warriorkitty: Now that I look back at it, your question isn't entirely clear. Are you wanting to check that all of the elements are between 1 and N, or that the array contains all of the numbers from 1 to N?
meatchicken has quit [Ping timeout: 250 seconds]
jesterfr_ has joined #ruby
meatchicken has joined #ruby
rmoriz has quit [Ping timeout: 252 seconds]
retornam has quit [Ping timeout: 256 seconds]
artmann has quit [Quit: No Ping reply in 180 seconds.]
<Ox0dea> [k-: From a performance perspective, #min + #max is not that great because both of them have to walk the entire collection to compute the result, whereas #all? + Range#include? stops as soon as an element fails the predicate.
drewo has quit [Ping timeout: 256 seconds]
artmann has joined #ruby
GarethAdams has quit [Ping timeout: 252 seconds]
mustmodify has joined #ruby
jenksy has quit [Ping timeout: 246 seconds]
G has quit [Ping timeout: 252 seconds]
jbw__ has joined #ruby
GarethAdams has joined #ruby
blue_deref has joined #ruby
G has joined #ruby
chris2 has joined #ruby
jbw_ has quit [Ping timeout: 246 seconds]
bmurt has joined #ruby
<[k-> i agree
Rollabu__ has quit [Remote host closed the connection]
towski_ has joined #ruby
mustmodify has left #ruby [#ruby]
Rollabunna has joined #ruby
krz has joined #ruby
bmurt has quit [Client Quit]
<[k-> for the second part: array.uniq.sort == *1..N
<[k-> that is if the array is a array of numbers only
hotpancakes has joined #ruby
retornam has joined #ruby
xcesariox has joined #ruby
rmoriz has joined #ruby
drewo has joined #ruby
<warriorkitty> Ox0dea: Sorry for late reply. I need to ask if every element in array is between 1..N.
<warriorkitty> Ox0dea: If one is not in that range, return false.
mleung has quit [Quit: mleung]
<Ox0dea> warriorkitty: Are you able to say which is more likely?
towski_ has quit [Ping timeout: 265 seconds]
havenwood has joined #ruby
jenksy has joined #ruby
<[k-> (returns true more often | returns false more often)
hotpancakes has quit [Ping timeout: 246 seconds]
bf4 has joined #ruby
yaw has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Rixius|Alt has quit [Ping timeout: 248 seconds]
jesterfr_ has quit [Quit: Textual IRC Client: www.textualapp.com]
<warriorkitty> Ox0dea: It's more likely that every record will be in that range.
rippa has joined #ruby
<Ox0dea> warriorkitty: Then [k-'s suggestion of checking that the minimum is >= 1 and the maximum is <= N is a good one.
<warriorkitty> Ox0dea: Thank you very much, I appreciate your help.
<Ox0dea> Sure thing.
<[k-> :o it is?
warriork1tty has joined #ruby
<Ox0dea> Well, the optimal approach would be defining the range outside of the #all? loop and checking against it inside, but I didn't want to complicate things.
<Ox0dea> #all? + Range#include? probably creates a new Range object for every iteration, which isn't great.
<[k-> all?.with_object ?
hotpancakes has joined #ruby
<Ox0dea> Yeah, that'd be a nice way to avoid explicitly defining the Range.
<Ox0dea> You think like a Haskeller. :P
<[k-> I learnt that from you :o
Muhannad has quit [Ping timeout: 244 seconds]
<Ox0dea> Ack, it doesn't work, though. :( #all? without a block returns true if all of the elements are truthy.
war_pigs has quit [Quit: later... computer is sleeping]
warriorkitty has quit [Ping timeout: 244 seconds]
xcesariox has quit [Remote host closed the connection]
Rixius has joined #ruby
xcesariox has joined #ruby
krz has quit [Ping timeout: 250 seconds]
<Ox0dea> Of course, if the sequence predicates provided case equality (!), the answer would've been obvious from the start.
warriork1tty has quit [Client Quit]
<Ox0dea> matz was assigned to it almost as soon as I proposed it; I wonder why he's not voiced his opinion yet. :/
peter_paule has joined #ruby
hotpancakes has quit [Ping timeout: 244 seconds]
<[k-> it's 11pm in Japan now
<[k-> GMT +9
krz has joined #ruby
peter_paule has quit [Ping timeout: 246 seconds]
<Ox0dea> I proposed it two weeks ago. :(
Jackneill has quit [Remote host closed the connection]
jesterfraud has quit [Quit: Textual IRC Client: www.textualapp.com]
Jackneill has joined #ruby
<[k-> I don't get your phrasing :s
TheHodge has quit [Quit: Connection closed for inactivity]
<Ox0dea> I submitted a patch to Ruby that lets you say, for instance, foo.all?(Fixnum) instead of foo.all? { |f| Fixnum === f }.
yh has joined #ruby
bronson has joined #ruby
<Ox0dea> One of the core team assigned it to matz on the issue tracker, and I'm sure that gave him a notification, but he hasn't said yet whether or not he likes the idea and wants it to go into core.
Papierkorb_ has quit [Quit: Konversation terminated!]
j4cknewt has quit [Remote host closed the connection]
<[k-> interesting
<[k-> it would be nice to have that
<[k-> especially for code golfing
michael_mbp has quit [Excess Flood]
radialneon has joined #ruby
<[k-> this would be a non existent problem in Haskell because all elements of a list has the same type!
<Ox0dea> No, it's much more than just for types, though. It uses the case equality operator (===) to do its checking.
<Ox0dea> #=== does something useful for several classes.
<Ox0dea> It's an alias for #include? on Ranges, for instance.
Jackneill has quit [Remote host closed the connection]
<Ox0dea> >> (1..5) === 3
<ruboto> Ox0dea # => true (https://eval.in/392851)
<[k-> amazing!
<Ox0dea> Also Regexps, so you can quickly check that all of the strings in an array match: foo.all?(/bar/) is much nicer than foo.all? { |f| /bar/ === f }, in my opinion.
<Ox0dea> Not even from a golfing perspective; it's just a much cleaner and more expressive way to say the same thing.
Jackneill has joined #ruby
bronson has quit [Ping timeout: 276 seconds]
<[k-> you have my vote!
<Ox0dea> ^_^
niemcu has quit [Ping timeout: 248 seconds]
Rixius has quit [Ping timeout: 252 seconds]
michael_mbp has joined #ruby
JDiPierro has joined #ruby
s00pcan has joined #ruby
arup_r has quit [Ping timeout: 246 seconds]
workmad3 has joined #ruby
sharpmachine has joined #ruby
<Ox0dea> Rebooting for kernel 4.1; wish me luck.
dfockler has joined #ruby
Ox0dea has quit [Quit: WeeChat 1.2]
Rollabunna has quit [Ping timeout: 252 seconds]
<[k-> kernel 4.1? :o
Ox0dea has joined #ruby
workmad3 has quit [Ping timeout: 244 seconds]
sharpmachine has quit [Ping timeout: 244 seconds]
<shevy> the oracle goes down for maintenance work
aryaching has quit [Ping timeout: 256 seconds]
vdamewood has quit [Quit: Life beckons.]
dfockler has quit [Ping timeout: 264 seconds]
iamninja has joined #ruby
<[k-> The Earth has rotated around the axis and now the Moon faces us. It is time to cease but to repair.
chouhoulis has joined #ruby
<Ox0dea> [k-: Good night.
howdoi has quit [Quit: Connection closed for inactivity]
<[k-> :o you are back
<[k-> #ruby-offtopic in your channel autojoin plz
<Ox0dea> I secretly enjoy when things get off-topic in #ruby.
niemcu has joined #ruby
<[k-> you still have to maintain a presence in #ruby-offtopic!
dagda1 has quit [Read error: No route to host]
woodennails has joined #ruby
dagda1 has joined #ruby
djellemah has joined #ruby
chouhoulis has quit [Ping timeout: 256 seconds]
<[k-> I wish my scrollback was long
<[k-> then I could laugh at shevy's imitation of Ox0dea
<[k-> hehe
<[k-> time to increase it
<[k-> my scroll back buffer size is 20000 o_O
eggoez has quit [Ping timeout: 246 seconds]
<Ox0dea> [k-: You don't keep logs?
Feyn has quit [Quit: Leaving]
yh has quit [Ping timeout: 252 seconds]
<[k-> logs are silly waste of space, especially on mobile, where you are constantly fighting
<[k-> [for space]
havenwood has quit [Read error: Connection reset by peer]
mhib has quit [Quit: Leaving]
eggoez has joined #ruby
djellemah has quit [Remote host closed the connection]
djellemah has joined #ruby
djellemah has quit [Remote host closed the connection]
<[k-> found it: <shevy> "Ox0dea, what will the weather be tomorrow." "Ox0dea: The weather dynamics fluctuate between the butterfly effect and mankind's attempt of self-destruction through climate change, but I sense slight rain" 
krz has quit [Ping timeout: 256 seconds]
Jackneill has quit [Remote host closed the connection]
arup_r has joined #ruby
yh has joined #ruby
Muhannad has joined #ruby
<shevy> yeah
<shevy> the oracle
Rollabunna has joined #ruby
<shevy> now I am compiling kernel 4.1.1 as well, following the footsteps of the Ox0dea oracle \o/
mleung has joined #ruby
<shevy> and then ruby 2.3.0
<[k-> shevy: how many babies will be born tomorrow in the whole world?
<Ox0dea> shevy: I figured you already kept abreast with trunk given your poking fun at nobu's wording in the ChangeLog.
<shevy> I once read 3 new ones get in per second
<[k-> assuming 24h from this message
<shevy> Ox0dea not really, I am too lazy to use the latest git checkouts; I use tarballs
<Ox0dea> Isn't it, on average, one birth every three seconds and one death every five?
<shevy> naaah
gagrio_ has quit [Quit: Leaving...]
<[k-> I implore you guys to word it in an Oracle-like manner.
* Ox0dea still doesn't quite get the "oracle" thing.
<shevy> now he wants us to collect all his oracle-like quotes
<shevy> I can't scrollback that much!
Jackneill has joined #ruby
<shevy> <Ox0dea> What a time to be in #ruby!
<[k-> #ruby has a log bot, thankfully
<shevy> aha
<shevy> ?oracle
<ruboto> I don't know anything about oracle
<shevy> that bot is so useless
<[k-> ?rude shevy
<ruboto> shevy, I don't know anything about rude
<Ox0dea> "Eat the rude."
<shevy> someone needs to update the bot knowledge base
alexa_ has joined #ruby
<[k-> Rude is when a twister takes out your house.
<shevy> we don't really have twisters in europe :(
brain_shim has quit [Ping timeout: 264 seconds]
CamonZ has joined #ruby
krz has joined #ruby
<[k-> you don't have rudeness then
<[k-> good for you!
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
<shevy> nature doesn't chase us down
<shevy> the one or other taifun would be great
<shevy> especially when you don't have access to an ocean, like here!
<[k-> typhoon*
abuzze has joined #ruby
chipotle has joined #ruby
<Ox0dea> Functional programming is happy programming: http://i.imgur.com/hmawWPd.png
<adaedra> <[k-> you don't have rudeness then
<adaedra> hahahaha
<adaedra> if only.
* [k- throws a potato at Ox0dea
* Ox0dea remembers his potato from last night.
<[k-> I'm glad you like the joke
<Ox0dea> Food time.
Rollabun_ has joined #ruby
sarkyniin has joined #ruby
<Ox0dea> I'm a Python guy if yesterday wasn't a quintessential case of Too Many Cooks.
Rollabunna has quit [Ping timeout: 246 seconds]
peter_paule has joined #ruby
riotjones has joined #ruby
alexa_ has left #ruby ["WeeChat 0.4.2"]
mfranzwa has joined #ruby
bf4 has quit [Ping timeout: 248 seconds]
peter_paule has quit [Ping timeout: 246 seconds]
krz has quit [Ping timeout: 246 seconds]
shakes has joined #ruby
krz has joined #ruby
urbanmonk has joined #ruby
riotjones has quit [Ping timeout: 264 seconds]
chinmay_dd has joined #ruby
dgutierrez1287 has quit [Remote host closed the connection]
JDiPierro has quit [Remote host closed the connection]
abuzze has quit [Remote host closed the connection]
brain_shim has joined #ruby
war_pigs has joined #ruby
<shevy> there
<shevy> oracle time again
<[k-> Time is sacred. Please try again later.
JDiPierro has joined #ruby
darkf has quit [Quit: Leaving]
timonv has joined #ruby
<shevy> :P
JDiPierro has quit [Ping timeout: 252 seconds]
nobitanobi has joined #ruby
krz has quit [Ping timeout: 256 seconds]
tkuchiki has quit [Remote host closed the connection]
sharpmachine has joined #ruby
yaw has joined #ruby
tkuchiki has joined #ruby
ndrei has quit [Remote host closed the connection]
yaw has quit [Client Quit]
Azure has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mandarinkin has quit [Ping timeout: 252 seconds]
chipotle has quit [Quit: cheerio]
ndrei has joined #ruby
CloCkWeRX has quit [Ping timeout: 256 seconds]
codecop has joined #ruby
codecop_ has joined #ruby
sharpmachine has quit [Ping timeout: 252 seconds]
woodennails has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
arup_r has quit [Ping timeout: 256 seconds]
bf4 has joined #ruby
niemcu has quit [Ping timeout: 250 seconds]
niemcu has joined #ruby
railsraider has quit [Ping timeout: 252 seconds]
krz has joined #ruby
hotpancakes has joined #ruby
yeticry has quit [Ping timeout: 246 seconds]
mleung has quit [Quit: mleung]
s2013 has joined #ruby
arup_r has joined #ruby
shakes has quit [Quit: Leaving]
Indian has joined #ruby
roolo has joined #ruby
<Ox0dea> >> require 'fiddle'; magic =->o { Fiddle::Pointer.new(o.__id__*2)[4,4] = [Fixnum.__id__*2].pack ?Q }; str = 'foo'; magic[str]; str
<ruboto> Ox0dea # => 546603210 (https://eval.in/392984)
hotpancakes has quit [Ping timeout: 244 seconds]
leonardoajim has quit [Quit: Be back later ...]
AlphaAtom has joined #ruby
leonardoajim has joined #ruby
mandarinkin has joined #ruby
acke has joined #ruby
roolo_ has joined #ruby
<[k-> :oooo
<[k-> str was changed!
abuzze has joined #ruby
roolo has quit [Read error: Connection reset by peer]
Channel6 has joined #ruby
<Ox0dea> Fiddle is voodoo.
<[k-> this is legit Ruby: ->o{
bronson has joined #ruby
Jonah11_ has joined #ruby
havenwood has joined #ruby
arup_r has quit [Ping timeout: 264 seconds]
<al2o3-cr> [k-: stubby lambda
<[k-> ->{ looks like a flower
yaw has joined #ruby
<Ox0dea> al2o3-cr: "Stabby", because it looks sharp.
<Ox0dea> >> require 'fiddle'; thaw=->o{Fiddle::Pointer.new(o.__id__*2)[1]^=8}; [s = 'foo'.freeze, s.frozen?, thaw[s], s.frozen?]
<al2o3-cr> *stabby
<ruboto> Ox0dea # => ["foo", true, -64, false] (https://eval.in/392985)
<al2o3-cr> stubby lol
<Ox0dea> We can even thaw objects with Fiddle! That's just crazy.
yaw has quit [Max SendQ exceeded]
CloCkWeRX has joined #ruby
crazydiamond has joined #ruby
<[k-> >> [self.object_id, self.__id__]
<ruboto> [k- # => [549631770, 549631770] (https://eval.in/392986)
yeticry has joined #ruby
<[k-> they are the same o_O
<Ox0dea> [k-: You get a warning when overriding __id__.
<[k-> ah
sevenseacat has quit [Quit: Me dun like you no more.]
<Ox0dea> object_id, rather.
bronson has quit [Ping timeout: 265 seconds]
<Ox0dea> __id__ is an "internal method" because of the underscores; I guess that's why they don't warn when you override it.
cir0x has joined #ruby
<[k-> is there __equal__
<Ox0dea> Nah, but equal? is the one you're never supposed to redefine.
<[k-> we could try it out in refinements and see what happens :>
wallerdev has joined #ruby
t_ has quit [Ping timeout: 248 seconds]
chris2 has quit [Ping timeout: 252 seconds]
vdamewood has joined #ruby
<[k-> isn't it weird that -> doesn't follow { | | }
edb__ has quit [Quit: Textual IRC Client: www.textualapp.com]
iamninja has quit [Read error: Connection reset by peer]
cpruitt has joined #ruby
lictor36 has joined #ruby
lictor36 has left #ruby [#ruby]
cpruitt has quit [Client Quit]
<shevy> -> is evil
yardenbar has quit [Quit: Leaving]
cpruitt has joined #ruby
cpruitt has quit [Client Quit]
Symbiosisz has joined #ruby
kies^ has joined #ruby
bf4 has quit [Ping timeout: 252 seconds]
JDiPierro has joined #ruby
spider-mario has quit [Remote host closed the connection]
_blizzy_ has quit [Read error: Connection reset by peer]
bronson has joined #ruby
Symbiosisz has quit [Remote host closed the connection]
Symbiosisz has joined #ruby
vdamewood has quit [Quit: Life beckons.]
JDiPierro has quit [Remote host closed the connection]
renderful has joined #ruby
t_ has joined #ruby
hotpancakes has joined #ruby
chris2 has joined #ruby
renderful has quit [Ping timeout: 252 seconds]
hotpancakes has quit [Ping timeout: 248 seconds]
workmad3 has joined #ruby
sarkyniin has quit [Read error: Connection reset by peer]
<Ox0dea> I like that it looks like it's pushing its parameter list into the block.
<Ox0dea> "Get in there, arguments!"
sarkyniin has joined #ruby
arup_r has joined #ruby
Meow-J has joined #ruby
bronson has quit [Remote host closed the connection]
Rickmasta has joined #ruby
workmad3 has quit [Ping timeout: 248 seconds]
cir0x has quit [Quit: Leaving.]
pgatt has quit [Quit: Connection closed for inactivity]
wallerdev has quit [Quit: wallerdev]
brain_shim has quit [Ping timeout: 250 seconds]
ivanskie has joined #ruby
<[k-> then it's not idiomatic
<[k-> we use << !
war_pigs has quit [Quit: later... computer is sleeping]
<Ox0dea> >> class Object; def >> o; o << self end end; ?a >> ?b >> ?c >> []
<ruboto> Ox0dea # => ["cba"] (https://eval.in/392997)
sharpmachine has joined #ruby
<[k-> that's wrong!
<[k-> a:b:c[] == [a,b,c]!
Ilyas_ has joined #ruby
<[k-> infixr pls
<adaedra> waouh
bf4 has joined #ruby
<[k-> class Object; def >> o; o << self end end; ?a >> (?b >> (?c >> []))
<[k-> >> class Object; def >> o; o << self end end; ?a >> (?b >> (?c >> []))
<Ox0dea> It's not necessarily meant to be cons, though.
<ruboto> [k- # => ["c", "b", "a"] (https://eval.in/392998)
<Ox0dea> It's just "reverse shovel".
<[k-> :(
<[k-> oh that looks right if you say it that way
<[k-> class Object; def >> o; o.unshift self end end; ?a >> (?b >> (?c >> []))
<[k-> >> class Object; def >> o; o.unshift self end end; ?a >> (?b >> (?c >> []))
<ruboto> [k- # => ["a", "b", "c"] (https://eval.in/392999)
<[k-> turdurr
rehat has joined #ruby
Ilyas has quit [Ping timeout: 255 seconds]
sharpmachine has quit [Ping timeout: 246 seconds]
bf4 has quit [Ping timeout: 256 seconds]
BillSussman has quit [Quit: Leaving]
<arup_r> Bye all
<[k-> >> def :;test end
<ruboto> [k- # => /tmp/execpad-6da833522458/source-6da833522458:2: syntax error, unexpected tSYMBEG ...check link for more (https://eval.in/393000)
christiandsg has joined #ruby
<[k-> >> ::
<ruboto> [k- # => /tmp/execpad-31fa2469af66/source-31fa2469af66:3: syntax error, unexpected keyword_rescue, expecting ...check link for more (https://eval.in/393001)
bronson has joined #ruby
arup_r has quit [Quit: ChatZilla 0.9.91.1 [Firefox 38.0.1/2015051400]]
Carnage\ has joined #ruby
wallerdev has joined #ruby
<[k-> I need to stop wasting time on weekends :(
<Ox0dea> [k-: No current projects?
<shevy> no girlfriend!
<[k-> I waste so much time on weekends (by not doing my homework) that I do my home work now
<[k-> causing a great lack of time
<ljarvis> What's a better hash key for a non-mandatory "thing", I'm trying to avoid; mandatory: true
<ljarvis> because the word sucks and I think it could be simplified
<[k-> required
<shevy> obligatory: true
<[k-> optional
<[k-> compulsory
hotpancakes has joined #ruby
<shevy> do_or_die: true
<[k-> must
<shevy> must_have
<[k-> should_specify
<ljarvis> :|
<Ox0dea> The paradox of choice.
<ljarvis> thought about compulsory but it's no better. required is probably better though
<shevy> so many possibilities :)
bmurt has joined #ruby
<[k-> must_state
<[k-> must_input
<[k-> input_required
bmurt has quit [Client Quit]
lavros has quit [Ping timeout: 244 seconds]
<[k-> required_field
<[k-> I could go on
cir0x has joined #ruby
solocsha1 has joined #ruby
radialneon has quit [Quit: Leaving]
<Ox0dea> >> def foo bar: mandatory; end
<ruboto> Ox0dea # => :foo (https://eval.in/393002)
<Ox0dea> That way the client has to pass the parameter or else the code explodes.
<[k-> !important
<Ox0dea> ^
nobitanobi has quit [Read error: Connection reset by peer]
<[k-> ;)
lavros has joined #ruby
codecop_ has quit [Remote host closed the connection]
codecop has quit [Remote host closed the connection]
<[k-> required is better
chouhoulis has joined #ruby
hotpancakes has quit [Ping timeout: 256 seconds]
<[k-> the rest are bossy
Guest23257 has quit [Quit: Stary2001 killed me D:]
prasselpikachu has quit [Quit: ZNC - http://znc.in]
<ljarvis> I agree, thanks for the suggestions
<Ox0dea> ljarvis: "Mandatory" is really standard nomenclature for CLIs, for what it's worth.
<shevy> The Oracle has decided.
<[k-> the arguments supplied are provided "as is" without any guarantee
<shevy> guarantee for what :)
<ljarvis> I don't think mandatory options themselves are very common, though
<shevy> awesomeness?
<ljarvis> in fact I'm struggling to find an example
<[k-> that your program doesn't explode
<[k-> ruby -llib?
<[k-> -rlib?
<Ox0dea> -rlib.
<ljarvis> they take arguments, this discussion isn't about mandatory arguments
<ljarvis> slop already has those
<Ox0dea> ~ $ zgrep -i mandatory /usr/share/man/man1/* | wc -l
<Ox0dea> 241
<ljarvis> this issue brings up mandatory options. i.e the script will fail if --file is not passed
<ljarvis> right, another bad example ;)
Biohazard has joined #ruby
allomov has quit [Remote host closed the connection]
<[k-> such unrobust code
prasselpikachu has joined #ruby
NeverDie has joined #ruby
Tarkers34|2 has joined #ruby
<ljarvis> tbh I still think just checking ARGV is more explicit
<[k-> on_missing do fail "Missing argument" end
<Ox0dea> It's rarely the correct thing to make a script fail if not given an explicit file argument.
chouhoulis has quit [Ping timeout: 264 seconds]
<ljarvis> right
sarkyniin has quit [Read error: No route to host]
<Ox0dea> ARGF is a blessing.
<ljarvis> hence the name "option"
<ljarvis> I think I've rejected this feature idea before
jeanlinux has joined #ruby
sarkyniin has joined #ruby
sarkyniin has quit [Read error: Connection reset by peer]
nfk has joined #ruby
Tarkers34 has quit [Ping timeout: 246 seconds]
<[k-> should options be mandatory at all
aryaching has joined #ruby
<ljarvis> that's.. the discussion
<[k-> if you have --version why would you need --file
<ljarvis> aye
<Tarkers34|2> is there a way to permantly increment the counter variable inside a loop based on a condition set inside the loop? Example: https://gist.github.com/anonymous/5fca06cf9104a9b027c5
<ljarvis> Tarkers34|2: don't use each_with_index
<ljarvis> Tarkers34|2: use each and provide your own integer
<apeiros> *for that
<ljarvis> right, for that
<ljarvis> ty
<Tarkers34|2> haha yeah nothing wrong with each_with_integer good save
* apeiros totally sees future Tarkers34|2 telling people how somebody on IRC told him each_with_index was bad :D
<ljarvis> each_with_index <333333
<ljarvis> clarified.
jeanlinux has quit [Ping timeout: 276 seconds]
<Tarkers34|2> haha I was worried for a second it took up mad memory or something weird :P okay I'll roll my own int in this case, thanks
<ljarvis> mad memory, is that like a lot or like really angry
<Tarkers34|2> haha a lot
<ljarvis> nope, you're fine
<[k-> i =! 100!
<[k-> screw the world!
bf4 has joined #ruby
<[k-> i.assign! 100
wallerdev has quit [Quit: wallerdev]
DLSteve has joined #ruby
<Ox0dea> >> iota = (0..1/0.0); [*?a..?f].zip(iota)
<ruboto> Ox0dea # => [["a", 0], ["b", 1], ["c", 2], ["d", 3], ["e", 4], ["f", 5]] (https://eval.in/393003)
<ljarvis> what have i done
<Ox0dea> ljarvis: Your language is called Tiger?
<[k-> it looks like lisp
<ljarvis> currently yes, but because I haven't thought of anything better
<[k-> at least it composes!
<ljarvis> [k-: that syntax is a side-effect really
<Ox0dea> You're writing it on top of Ruby?
axilla_ has quit [Quit: Lost terminal]
<ljarvis> no, the vm is written in C but I've been porting it to Go
<[k-> >> 1/0.0
<ruboto> [k- # => Infinity (https://eval.in/393004)
xxneolithicxx has quit [Ping timeout: 255 seconds]
<[k-> eww go
<ljarvis> eh, "the vm" lol.. the entire thing since the vm is tiny
<[k-> Ox0dea your trick is revealed
<Ox0dea> Gadzooks!
nfk has quit [Ping timeout: 244 seconds]
dgutierrez1287 has joined #ruby
<[k-> I will now take my leave :)
[k- has quit [Quit: -a- IRC for Android 2.1.25]
Pupeno has quit [Remote host closed the connection]
hotpancakes has joined #ruby
nfk has joined #ruby
wallerdev has joined #ruby
mhib has joined #ruby
hotpancakes has quit [Remote host closed the connection]
RobertBirnie has joined #ruby
RobertBirnie has quit [Read error: Connection reset by peer]
RobertBirnie has joined #ruby
RobertBirnie has quit [Client Quit]
cytoskeletor has joined #ruby
demoph01n has joined #ruby
Agoldfish has joined #ruby
niemcu has quit [Ping timeout: 264 seconds]
last_staff has joined #ruby
blackmesa has joined #ruby
cytoskeletor has quit [Ping timeout: 256 seconds]
hotpancakes has joined #ruby
peter_paule has joined #ruby
iateadonut has joined #ruby
<Tarkers34|2> just realised how cool ruboto is
<Tarkers34|2> >> puts 'something'
<ruboto> Tarkers34|2 # => something ...check link for more (https://eval.in/393005)
<Tarkers34|2> that. rocks.
kreantos has joined #ruby
wallerdev has quit [Quit: wallerdev]
alex88 has joined #ruby
Jonah11_ has quit [Remote host closed the connection]
<kreantos> Hi, I am using geocoder. I have model request with latlong and a radius and model b with latlong. i want to get all requests nearby a certain model b but the radius is always stored in model a. Any suggestions how to formulate a query?
mistermocha has joined #ruby
tkuchiki has quit [Remote host closed the connection]
christiandsg has quit [Remote host closed the connection]
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kies^ has quit [Ping timeout: 256 seconds]
alex88 has quit [Remote host closed the connection]
tkuchiki has joined #ruby
AlphaAtom has joined #ruby
mistermocha has quit [Remote host closed the connection]
demophoon has quit [Quit: ohai]
tkuchiki has quit [Ping timeout: 255 seconds]
kies^ has joined #ruby
chinmay_dd has quit [Quit: See ya!]
zz_Outlastsheep is now known as Outlastsheep
demoph01n is now known as demophoon
porglezomp has joined #ruby
msgodf has joined #ruby
nofxx has joined #ruby
CloCkWeRX has quit [Quit: Leaving.]
msgodf has quit [Remote host closed the connection]
wallerdev has joined #ruby
senayar has joined #ruby
hotpancakes has quit [Remote host closed the connection]
bf4 has quit [Ping timeout: 255 seconds]
adamski2600 has quit [Remote host closed the connection]
howdoicomputer has joined #ruby
baweaver has joined #ruby
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
hotpancakes has joined #ruby
jbw_ has joined #ruby
<shevy> don't think many people here on #ruby know geocoder
peter_paule has quit [Ping timeout: 244 seconds]
jbw__ has quit [Ping timeout: 256 seconds]
senayar has quit [Ping timeout: 250 seconds]
baweaver has quit [Remote host closed the connection]
davedev24_ has quit [Read error: Connection reset by peer]
davedev24_ has joined #ruby
claw has joined #ruby
Ilyas has joined #ruby
jaygen has joined #ruby
doublemalt_ has quit [Remote host closed the connection]
norc_ has quit [Quit: Page closed]
Ilyas_ has quit [Ping timeout: 255 seconds]
jaygen_ has quit [Ping timeout: 264 seconds]
<ljarvis> kreantos: can't you store the radios on model b?
<ljarvis> seems ideal to avoid creating a superfluous join
<yxhuvud> kreantos: what underlying database do you have? if you use postgis I'd fall back to that since that is quite straightforward, assuming you have the correct indices set up.
peter_paule has joined #ruby
allomov has joined #ruby
demoph01n has joined #ruby
Surger has joined #ruby
eggoez has quit [Ping timeout: 256 seconds]
ruby-lang794 has joined #ruby
iateadonut has left #ruby [#ruby]
<ruby-lang794> Does anyone know where to find the code or a picture of one of the classes in ruby? So like Class String < Object def upcase #code here end def downcase #codehere end etc.?
<Tarkers34|2> can I extend the Integer and Float classes to include javascript's ++ method? So I can do i++ in ruby? Or would editing the syntax like that require editing ruby itself (in C)?
<jhass> MRIs core classes are implemented in C
<apeiros> ruby-lang794: github.com/ruby/rub
<apeiros> ruby-lang794: whoops - github.com/ruby/ruby
<apeiros> Tarkers34|2: no you can't.
<Tarkers34|2> apeiros coool
<Tarkers34|2> oh well
<c355E3B> If you wanted that style of syntax, you would need to patch MRI
<ruby-lang794> Thank you everyone
<apeiros> you'd also have to introduce a concept of what's considered "post-statement".
<Tarkers34|2> yeah thought as much...just wondering if I could do a quick monkey patch, no worries
<apeiros> I'd argue ruby doesn't have (nor need) that concept. but with ++, you would.
workmad3 has joined #ruby
wallerdev has quit [Quit: wallerdev]
rehat has quit [Remote host closed the connection]
RandyT has joined #ruby
blackmesa has quit [Ping timeout: 255 seconds]
demoph01n has quit [Quit: :wqall!]
wallerdev has joined #ruby
diegoviola has joined #ruby
symm- has joined #ruby
workmad3 has quit [Ping timeout: 256 seconds]
serivich has quit [Ping timeout: 246 seconds]
<kreantos> ljarvis: yxhuvud: no the radius needs to be stored in the request model. i am using mysql
stantonnet has quit [Ping timeout: 246 seconds]
dgutierrez1287 has quit [Remote host closed the connection]
nofxx has quit [Ping timeout: 256 seconds]
dgutierrez1287 has joined #ruby
wallerdev has quit [Ping timeout: 256 seconds]
Pupeno has joined #ruby
Pupeno has joined #ruby
ohaibbq has joined #ruby
<kreantos> ljarvis: e.g. https://www.dropbox.com/s/ko3jm7vnh23nu3p/requests_by_b.pdf?dl=0 B1.requests should return Request1 and Request2
<Ox0dea> Tarkers34|2: For what it's worth, you can define unary + on any class, but you won't be able to modify integers in place.
<Ox0dea> >> class Fixnum; def +@; self + 0.5 end end; ++4
<ruboto> Ox0dea # => 4.5 (https://eval.in/393007)
<Ox0dea> >> class Fixnum; def +@; self + 0.5 end end; +++4
<ruboto> Ox0dea # => 4.5 (https://eval.in/393008)
<Tarkers34|2> that's pretty neat :)
ruby-lang794 has quit [Ping timeout: 246 seconds]
shazaum_ has joined #ruby
Gadgetoid has joined #ruby
pabs has quit [Ping timeout: 244 seconds]
blackmesa has joined #ruby
<Ox0dea> I made a thing that lets you chain unary operators arbitrarily, but it can't make ++ and -- work like they do in other languages.
<Ox0dea> We can make it work for strings, though!
<Tarkers34|2> Yeah strings are great for modifying in place
<Ox0dea> >> class String; alias +@ succ!; end; ++'1'
<ruboto> Ox0dea # => "3" (https://eval.in/393009)
<Tarkers34|2> >> int = 5 class Fixnum; def +@; self += 0.5 end end; ++int puts 5
<ruboto> Tarkers34|2 # => /tmp/execpad-b7696118d218/source-b7696118d218:2: syntax error, unexpected keyword_class, expecting k ...check link for more (https://eval.in/393010)
<Tarkers34|2> fail
brain_shim has joined #ruby
pabs has joined #ruby
<Ox0dea> Even without the syntax error, you can't assign to self.
<Ox0dea> In any context.
<Tarkers34|2> Yeah...immutable and that.
<Ox0dea> No, not quite.
<apeiros> would certainly be fun if one place in your code decided that 2 is now 3 :-p
baweaver has joined #ruby
<Tarkers34|2> apeiros: but what if that place in the code was only after you changed it in place? hypothetically speaking of course
<apeiros> I think you missed the point
<Tarkers34|2> works with strings and arrays?
<Tarkers34|2> probably
bronson has quit [Remote host closed the connection]
<apeiros> imagine: `a = 2; some_method; a + a # => 6`
<Ox0dea> >> ObjectSpace.each_object(Class).select { |c| c.instance_methods.include?(:replace) }
<ruboto> Ox0dea # => [Hash, Array, String] (https://eval.in/393011)
<Ox0dea> ^ The mutable classes.
<Ox0dea> Things with a #replace method let you blow them away and swap them out for a completely new instance in-place.
<apeiros> damn, Structs are not mutable? I must be living in a parallel world :-p
Papierkorb has quit [Quit: ArchLinux completes an endless loop faster than any other distro!]
railsraider has joined #ruby
spider-mario has joined #ruby
<Ox0dea> Technically, anything with an accessible singleton class is "mutable", but do forgive my simplifying for the sake of demonstration.
<Ox0dea> apeiros: There's no way to completely replace a Struct in-place, right?
<apeiros> there's no built-in method to do it in one go. but you could implement Struct#replace
jeanlinux has joined #ruby
<Ox0dea> It would have the same object_id.
<apeiros> it would
eggoez has joined #ruby
SCHAAP137 has quit [Ping timeout: 250 seconds]
<apeiros> class Struct; def replace(other); <assertions here>; other.each.with_index do |ele, idx| self[idx] = ele end; self; end
dseitz has joined #ruby
symbol has joined #ruby
lessless has joined #ruby
Xoro has joined #ruby
<Tarkers34|2> apeiros : I just get what you mean about the number changing in your code haha that would suck
ivanskie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bronson has joined #ruby
Surger has quit [Ping timeout: 246 seconds]
jeanlinux has quit [Ping timeout: 264 seconds]
christiandsg has joined #ruby
Rarikon has quit [Ping timeout: 252 seconds]
idafyaid has joined #ruby
hotpancakes has quit [Remote host closed the connection]
lkba has joined #ruby
<Ox0dea> Tarkers34|2: It doesn't suck any less for other types.
<apeiros> oh, yes, yes it totally sucks less for other types.
<apeiros> mainly because a = []; b = [] creates two different objects
<apeiros> of course, you could (and almost certainly would, if numeric types were mutable) make numbers do the same.
allomov has quit [Read error: Connection reset by peer]
<Tarkers34|2> I was thinking 5.increment!(5) #=> 10. puts 5 #=> 10 that's what I was thinking would happen if ints were mutable.
christiandsg has quit [Read error: Connection reset by peer]
<Ox0dea> Yes, that's something that could happen, but I don't think any language has mutable integers; it's just too crazy.
lkba_ has quit [Ping timeout: 264 seconds]
<Ox0dea> On that note, I brought Python's decorators to Ruby: https://gist.github.com/0x0dea/16adbc769d1d7acc6224
<shevy> ack
<Ox0dea> For giggles.
framling has quit [Read error: Connection reset by peer]
jbw__ has joined #ruby
railsraider has quit [Quit: railsraider]
jbw_ has quit [Ping timeout: 250 seconds]
allomov has joined #ruby
aryaching has quit [Read error: Connection reset by peer]
dagda1 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Scroff has joined #ruby
christiandsg has joined #ruby
finisherr has joined #ruby
aryaching has joined #ruby
Carnage\ has quit [Ping timeout: 256 seconds]
bf4 has joined #ruby
railsraider has joined #ruby
hotpancakes has joined #ruby
lessless has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
shazaum_ has quit [Ping timeout: 250 seconds]
dagda1 has joined #ruby
finisherr has quit [Quit: finisherr]
christiandsg has quit [Remote host closed the connection]
ndrei has quit [Ping timeout: 264 seconds]
spyderman4g63 has joined #ruby
DoubleMalt has joined #ruby
bronson has quit [Remote host closed the connection]
s00pcan has quit [Read error: Connection reset by peer]
jbw_ has joined #ruby
bf4 has quit [Ping timeout: 252 seconds]
jbw__ has quit [Ping timeout: 255 seconds]
ruby-lang865 has joined #ruby
dgutierrez1287 has quit [Remote host closed the connection]
Rollabun_ has quit [Remote host closed the connection]
ValicekB has joined #ruby
Rollabunna has joined #ruby
dgutierrez1287 has joined #ruby
Rollabun_ has joined #ruby
diegoviola has quit [Quit: WeeChat 1.2]
ruby-lang865 has quit [Ping timeout: 246 seconds]
Outlastsheep is now known as zz_Outlastsheep
TheHodge has joined #ruby
craysiii has joined #ruby
workmad3 has joined #ruby
Rollabunna has quit [Ping timeout: 246 seconds]
spyderman4g63 has quit []
RobertBirnie has joined #ruby
AlphaAtom has joined #ruby
workmad3 has quit [Ping timeout: 255 seconds]
kjones_ has joined #ruby
intinig has joined #ruby
therod has joined #ruby
therod has quit [Client Quit]
luckyruby has joined #ruby
tejasmanohar_ has joined #ruby
<tejasmanohar_> is this an ok place to ask activerecord questions?
<tejasmanohar_> or if im using rails should that stay to #ror
alex88 has joined #ruby
<jhass> the AR expertise is bigger in #RubyOnRails in any case
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bronson has joined #ruby
xxneolithicxx has joined #ruby
Ilyas has quit [Quit: Leaving]
intinig has quit []
alex88 has quit [Remote host closed the connection]
Channel6 has quit [Quit: Leaving]
blackmesa has quit [Ping timeout: 250 seconds]
<tejasmanohar_> :)
tejasmanohar_ has quit [Quit: WeeChat 1.1.1]
peter_paule has quit [Ping timeout: 252 seconds]
ndrei has joined #ruby
aryaching has quit [Ping timeout: 255 seconds]
msgodf has joined #ruby
sargas has joined #ruby
mkosaki has joined #ruby
Meow-J has quit [Quit: Connection closed for inactivity]
abuzze has quit [Remote host closed the connection]
abuzze has joined #ruby
varunwachaspati has joined #ruby
serivich has joined #ruby
Muhannad has quit [Ping timeout: 250 seconds]
porglezomp has left #ruby [#ruby]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
sargas has quit [Quit: This computer has gone to sleep]
mary5030 has joined #ruby
sdothum has joined #ruby
Musashi007 has joined #ruby
railsraider has quit [Quit: railsraider]
serivich has quit [Ping timeout: 255 seconds]
wallerdev has joined #ruby
j4cknewt has joined #ruby
Scroff has quit [Remote host closed the connection]
mary5030 has quit [Remote host closed the connection]
wallerdev has quit [Read error: Connection reset by peer]
hotpancakes has quit [Remote host closed the connection]
workmad3 has joined #ruby
acke has quit [Remote host closed the connection]
tubuliferous_ has joined #ruby
wallerdev has joined #ruby
workmad3 has quit [Ping timeout: 264 seconds]
blenny has quit [Max SendQ exceeded]
hotpancakes has joined #ruby
blenny has joined #ruby
Scroff has joined #ruby
adamski2600 has joined #ruby
GitGud has joined #ruby
<ght> Question: I have a values I would like to format as a JSON variable. Essentially, to begin with, I have a person's name, and I execute an API call to return lunches, such as chicken, steak, fish, etc.
enders has quit [Ping timeout: 252 seconds]
Vols has joined #ruby
arooni-mobile has joined #ruby
acke has joined #ruby
mistermocha has joined #ruby
<ght> this happens for a few people, so I need to build out a JSON-formatted var to consist of names and corresponding lunch values.
Vols is now known as Volsus
Limix has joined #ruby
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mistermocha has quit [Read error: Connection reset by peer]
mistermocha has joined #ruby
adamski2600 has quit [Ping timeout: 244 seconds]
yfeldblum has joined #ruby
AlphaAtom has joined #ruby
<apeiros> ght: and what's your question?
s00pcan has joined #ruby
<ght> How to do this?
enders has joined #ruby
<apeiros> ght: far too vague of a question which boils down to somebody doing it for you
<apeiros> ght: please show what you've done so far and where you struggle
<ght> lol
timonv has quit [Ping timeout: 276 seconds]
<ght> I'll figure it out on my own, thanks just the same.
<adaedra> >_>
<bougyman> hrm.
<apeiros> ok
<postmodern> ghormoon, require 'json'
<postmodern> ght, require 'json'
<postmodern> ght, also use a Hash to store names/lunches
<postmodern> ght, your_var.to_json
adamski2600 has joined #ruby
mistermocha has quit [Ping timeout: 248 seconds]
duderonomy has quit [Quit: Textual IRC Client: www.textualapp.com]
baweaver has quit [Remote host closed the connection]
bf4 has joined #ruby
Scroff has quit [Remote host closed the connection]
symm- has quit [Ping timeout: 246 seconds]
blackmesa has joined #ruby
i8igmac has joined #ruby
JDiPierro has joined #ruby
yardenbar has joined #ruby
k3asd` has joined #ruby
bf4 has quit [Ping timeout: 248 seconds]
JohnBat26 has joined #ruby
PlasmaStar has quit [Ping timeout: 246 seconds]
lala has quit [Quit: Connection closed for inactivity]
mesamoo has joined #ruby
<Senjai> Gday ruby
lkba_ has joined #ruby
msgodf has quit [Remote host closed the connection]
d5sx43 has joined #ruby
jeanlinux has joined #ruby
PlasmaStar has joined #ruby
<apeiros> o/ Senjai
<Senjai> Almost done setting up arch
<apeiros> reminds me…
<apeiros> should set up a DO instance too
<Senjai> Switched to urxvt, and to awesome wm
<Senjai> Also getting rid of zprezto
<adaedra> DO?
<apeiros> trying germany this time. curious to see the difference in latency compared with amsterdam
<apeiros> do = digital ocean
<adaedra> oh
<apeiros> a droplet in the ocean…
<Senjai> I will be installing openbsd on my next droplet
symm- has joined #ruby
<adaedra> got big latency with NL?
<apeiros> ~40ms
<apeiros> fine IMO. but could get lower.
lkba has quit [Ping timeout: 250 seconds]
varunwachaspati has quit [Remote host closed the connection]
<Senjai> apeiros: What are you hosting?
<apeiros> some small things I do besides work
<apeiros> like ruby-community.com ;-)
stantonnet has joined #ruby
hololeap has joined #ruby
codecop has joined #ruby
codecop_ has joined #ruby
beilabs_ has quit [Ping timeout: 265 seconds]
_ht has quit [Quit: Konversation terminated!]
beilabs_ has joined #ruby
d5sx43 has quit []
codecop_ has quit [Quit: Išeinu]
alex88 has joined #ruby
bronson has quit [Remote host closed the connection]
swgillespie has joined #ruby
Omilun has joined #ruby
sebbers_ has joined #ruby
jeanlinux has quit [Remote host closed the connection]
Pupeno has quit [Remote host closed the connection]
peter_paule has joined #ruby
<sebbers_> hello!
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
acke has quit [Remote host closed the connection]
alex88 has quit []
codecop has quit [Remote host closed the connection]
benanne has joined #ruby
<adaedra> hi
Pupeno has joined #ruby
Pupeno has quit [Remote host closed the connection]
<oddmunds> hi
Spami has joined #ruby
<sebbers_> where are you guys from?
<sebbers_> have a good 4th?
blue_deref has quit [Quit: bbn]
abuzze has quit [Ping timeout: 246 seconds]
radialneon has joined #ruby
<theahindle> apeiros: Hey, what is the .slim on your views files for ruby-community?
<theahindle> Looks like it minimises the HTML you have to write
therod has joined #ruby
<apeiros> theahindle: it's a markup language, and yes, it translates to html
<apeiros> theahindle: http://slim-lang.com
<theahindle> Thanks :)
<apeiros> yw
Hobogrammer has quit [Ping timeout: 264 seconds]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Rollabun_ has quit [Remote host closed the connection]
Rollabunna has joined #ruby
Yiota has joined #ruby
JDiPierro has quit [Remote host closed the connection]
dagda1 has quit [Quit: Textual IRC Client: www.textualapp.com]
arooni-mobile has quit [Ping timeout: 248 seconds]
Yiota has quit [Client Quit]
fantazo has joined #ruby
yeltzooo has quit [K-Lined]
seal has joined #ruby
Rollabunna has quit [Ping timeout: 248 seconds]
jeramyRR has joined #ruby
seal has quit [Remote host closed the connection]
Miesco has joined #ruby
<Miesco> Okay... what is up with this ruby-install. I can't run ruby as root...
krz has quit [Quit: WeeChat 1.0.1]
j4cknewt has quit [Remote host closed the connection]
sebbers_ has left #ruby [#ruby]
j4cknewt has joined #ruby
<havenwood> Miesco: You want to install in your root user home dir?
Yiota has joined #ruby
<Miesco> havenwood: Well, no. I thought it would install globally
<havenwood> To install to /usr/local: ruby-install --system
symbol has quit [Quit: WeeChat 1.1]
<havenwood> Miesco: ^
Yiota has quit [Client Quit]
Jackneill has quit [Remote host closed the connection]
<Miesco> havenwood: Is that common?
<Omilun> hello i need help for fix my first ruby code : http://dpaste.com/13WH5PY
workmad3 has joined #ruby
<havenwood> Miesco: You can install elsewhere with `--intsall-dir` but yeah `--system`.
<havenwood> --install-dir*
<oddmunds> Omilun: what is wrong with it?
<Miesco> havenwood: Is it common to use --system?
<havenwood> Miesco: If you just want one Ruby /usr/local is a good way to do it. Yup, that's common.
blackmesa has quit [Ping timeout: 244 seconds]
<Miesco> I got an error from `ruby-install --system`
<havenwood> Miesco: If you want to use chruby to switch Rubies just install to the default location where it will be detected.
<havenwood> Miesco: What error?
<apeiros> Omilun: why gets(''). why do you pass an empty string as param to gets?
<apeiros> Omilun: also note that variables starting with an upper case letter are constants. you should change the ones in your code to lowercase named variables.
<Miesco> ruby-install: too few arguments
<Miesco> havenwood: ^
<Miesco> havenwood: Wait, why don't I just install it with my package manager?
blackmesa has joined #ruby
<havenwood> Miesco: Good question?
<Miesco> havenwood: i was told not to
k3asd` has quit [Ping timeout: 244 seconds]
<Omilun> apeiros: ammm i dont know i know cin and cout in c++
<havenwood> Miesco: But it'd be: ruby-install ruby 2.2.2 --system --sha256 5ffc0f317e429e6b29d4a98ac521c3ce65481bfd22a8cf845fa02a7b113d9b44
<Omilun> apeiros: so u understand my code?
<havenwood> Miesco: What OS/distro?
gregf has quit [Quit: WeeChat 1.1.1]
hanmac has quit [Ping timeout: 256 seconds]
<Miesco> havenwood: debian
<Omilun> apeiros: do*
<apeiros> Omilun: I understand what you intend to do, yes. oddmunds' question is still up, though.
<Miesco> How do I use ruby-install do uninstall everything it installed
yardenbar has quit [Quit: Leaving]
<Miesco> to*
jeramyRR has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<havenwood> Miesco: rm -rf /opt/rubies
workmad3 has quit [Ping timeout: 252 seconds]
<Miesco> havenwood: And what about all the gem stuff
<havenwood> Miesco: Or cd to the src dir and make uninstall.
<Omilun> oddmunds: i have problem with gets and #{se} in my code
<oddmunds> what is the problem with gets?
<apeiros> Omilun: and your problem with "gets" is that it keeps reading and your code does not continue?
gregf has joined #ruby
<havenwood> Miesco: src in /usr/local/src
<havenwood> Miesco: Check?: gem env gemdir
<Omilun> apeiros: i need cin>> a inpute.... and show mr or miss in #{se} too
adamski2600 has quit []
<havenwood> Miesco: ruby-all-dev
<oddmunds> try gets without the '' argument
<havenwood> Miesco: Assuming you're on Jessie: https://packages.debian.org/jessie/ruby-all-dev
<oddmunds> like SEX = gets
mistermocha has joined #ruby
stoodfarback has joined #ruby
<Omilun> oddmunds: gets() this way?
<Miesco> havenwood: so rm -rf ~/.gem?
<oddmunds> Omilun: or like that yes
<havenwood> Miesco: If you want to nuke those gems, yup.
<Miesco> havenwood: Then I will have everything gone?
<havenwood> Miesco: And that's it.
<havenwood> Miesco: Yup
<Omilun> oddmunds: ooo u are right ... thx
<Miesco> havenwood: Okay thanks. Installing with package manager so I will stay sane.
<Omilun> oddmunds: and i need to see mr or miss /mrs in #{se}
<havenwood> Miesco: If you want to install gems locally with the package manager Ruby install gems with `--user-install` or add it to your .gemrc.
<havenwood> Miesco: gem: "--user-install --env-shebang"
jeramyRR has joined #ruby
bullcitydev has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rbennacer has joined #ruby
<havenwood> Miesco: If you just need one version of Ruby and your package manager has that version, great!
peter_paule has quit [Ping timeout: 264 seconds]
<havenwood> Miesco: If you need a version it doesn't have, ruby-install to /usr/local. Or if you need multiple versions, ruby-install to default location and switch with chruby.
niemcu has joined #ruby
bf4 has joined #ruby
brain_shim has quit [Ping timeout: 246 seconds]
<Miesco> havenwood: But then I would have to uninstall from my package manager if I use ruby-instal?
tubuliferous_ has quit [Ping timeout: 248 seconds]
<havenwood> Miesco: chruby system
<havenwood> Miesco: ^ will switch to system Ruby
<Omilun> oddmunds: can i do this?
<Miesco> Oh okay
mistermocha has quit [Ping timeout: 248 seconds]
<havenwood> Miesco: Or you can use chruby to even switch between different package manager Rubies as well, see: https://gist.github.com/jhass/8839655bb038e829fba1
chouhoulis has joined #ruby
<havenwood> Miesco: So ruby-install to install anywhere and chruby to switch to any Ruby.
<havenwood> Miesco: But yeah, totally unnecessary if you have a nice package and that suffices.
<oddmunds> Omilun: hmmm im looking at it now, not sure why it doesnt work
<oddmunds> give me a minute
<Miesco> havenwood: Okay, and why is my rails in ~/.gem when I installed the rails debian package?
hanmac has joined #ruby
<Omilun> oddmunds: thx
<havenwood> Miesco: After installing ruby-all-dev and a `gem install rails`?
Scroff has joined #ruby
<oddmunds> Omilun: oh, i know
christiandsg has joined #ruby
<oddmunds> it is because your input includes the newline (return)
bf4 has quit [Ping timeout: 256 seconds]
marr has joined #ruby
<Omilun> oddmunds: ammm how can i fix that?
<oddmunds> Omilun: replace your gets() with gets().strip()
Al3ks has joined #ruby
<havenwood> Miesco: Maybe they switched to a --user-install default? I don't know.
<Miesco> havenwood: Do you know who installed '/var/lib/gems/2.1.0/'?
<Miesco> havenwood: I did: apt-get install rails
<havenwood> oooh
chouhoulis has quit [Ping timeout: 250 seconds]
<havenwood> I don't know about the rails package or how well it works.
bronson has joined #ruby
daas has joined #ruby
<postmodern> Miesco, i'd recommend against installing gems from apt-get, they are usually out of date or packaged incorrectly
<Miesco> havenwood: I really want to know where /var/lib/gems/ came from... It wasn't from debian packages 'ruby' or 'rails'
<Omilun> oddmunds: thxxxxxxxxxxxxxx what is .strip()?
Volsus has quit [Ping timeout: 248 seconds]
Hobogrammer has joined #ruby
<havenwood> Miesco: I use RubyGems for gems. What postmodern said.
christiandsg has quit [Ping timeout: 265 seconds]
<oddmunds> Omilun: it removes leading and tailing whitespace http://ruby-doc.org/core-2.2.0/String.html#method-i-strip
<oddmunds> Omilun: no problem
Volsus has joined #ruby
<Omilun> oddmunds: thx dude
<Miesco> havenwood: There is no package on debian that installs /var/lib/gems...
war_pigs has joined #ruby
<Miesco> havenwood: I guess it must of been from the gem command?
<Miesco> havenwood: Would it be okay to rm -rf /var/lib/games?
tubuliferous_ has joined #ruby
<havenwood> Miesco: Sounds like system RubyGems gem directory?
dgutierrez1287 has quit [Remote host closed the connection]
<havenwood> Miesco: Dunno.
Papierkorb has joined #ruby
s00pcan has quit [Read error: Connection reset by peer]
eggoez has quit [Ping timeout: 248 seconds]
railsForDaiz has joined #ruby
workmad3 has joined #ruby
TheHodge has quit [Quit: Connection closed for inactivity]
abyss_ has quit [Ping timeout: 252 seconds]
jordsmi has joined #ruby
Rollabunna has joined #ruby
destra33 has joined #ruby
baweaver has joined #ruby
abyss has joined #ruby
mhib has quit [Remote host closed the connection]
rbennacer has quit [Remote host closed the connection]
rbennacer has joined #ruby
northfurr has joined #ruby
rbennacer has quit [Remote host closed the connection]
chipotle has joined #ruby
Miesco has quit [Ping timeout: 276 seconds]
workmad3 has quit [Ping timeout: 264 seconds]
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Rollabunna has quit [Ping timeout: 248 seconds]
rbennacer has joined #ruby
Pupeno has joined #ruby
mary5030 has joined #ruby
Muhannad has joined #ruby
armyriad has joined #ruby
rbennacer has quit [Remote host closed the connection]
rbennacer has joined #ruby
Al3ks has quit [Quit: Leaving]
lavros has quit [Quit: leaving]
Pupeno has quit [Remote host closed the connection]
al2o3-cr has quit [Quit: WeeChat 1.2]
AlphaAtom has joined #ruby
k3asd` has joined #ruby
eggoez has joined #ruby
aotg has quit [Quit: ZNC - http://znc.in]
arooni-mobile has joined #ruby
aotg has joined #ruby
rbennacer has quit [Remote host closed the connection]
al2o3-cr has joined #ruby
kirun has quit [Quit: Client exiting]
northfurr has quit [Quit: northfurr]
rbennacer has joined #ruby
hololeap has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
ignoch has joined #ruby
j4cknewt has quit [Remote host closed the connection]
christiandsg has joined #ruby
genpaku has quit [Ping timeout: 252 seconds]
yokel has quit [Ping timeout: 256 seconds]
yokel has joined #ruby
<Omilun> how can i take a mod from two number ? for ex: 20 mod 6
Vile` has joined #ruby
<havenwood> >> 20 % 6
<ruboto> havenwood # => 2 (https://eval.in/393050)
<havenwood> >> 20.modulo 6
<ruboto> havenwood # => 2 (https://eval.in/393051)
hotpancakes has quit [Remote host closed the connection]
genpaku has joined #ruby
bruno- has quit [Ping timeout: 246 seconds]
<Omilun> havenwood: aha ...thx
ramaflap has joined #ruby
<Omilun> havenwood: % is nice :D
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<adaedra> It's a common sign for modulo
matp has joined #ruby
kjones_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
chipotle has quit [Quit: cheerio]
michael_mbp has quit [Excess Flood]
wallerdev has quit [Quit: wallerdev]
fantazo has quit [Ping timeout: 264 seconds]
Musashi007 has quit [Quit: Musashi007]
workmad3 has joined #ruby
dfockler has joined #ruby
Pupeno has joined #ruby
Pupeno has joined #ruby
blackmesa has quit [Ping timeout: 264 seconds]
devbug has joined #ruby
asif has joined #ruby
michael_mbp has joined #ruby
Pupeno has quit [Remote host closed the connection]
asif has quit [Client Quit]
j4cknewt has joined #ruby
DLSteve has quit [Quit: Leaving]
mistermocha has joined #ruby
mary5030 has quit [Remote host closed the connection]
Yiota has joined #ruby
workmad3 has quit [Ping timeout: 246 seconds]
dfockler has quit [Ping timeout: 276 seconds]
wallerdev has joined #ruby
allomov has quit [Remote host closed the connection]
war_pigs has quit [Quit: later... computer is sleeping]
j4cknewt has quit [Ping timeout: 264 seconds]
j4cknewt has joined #ruby
railsForDaiz has quit [Read error: Connection reset by peer]
hotpancakes has joined #ruby
mesamoo has quit [Quit: Konversation terminated!]
crdpink2 has joined #ruby
crdpink has quit [Ping timeout: 248 seconds]
mistermocha has quit [Ping timeout: 264 seconds]
enders has quit [Ping timeout: 246 seconds]
Musashi007 has joined #ruby
Surger has joined #ruby
hotpancakes has quit [Ping timeout: 250 seconds]
kjones_ has joined #ruby
ramaflap has quit [Quit: Leaving]
arooni-mobile has quit [Ping timeout: 248 seconds]
tmtwd has joined #ruby
jamesaxl has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
JohnBat26 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
nofxx has joined #ruby
nofxx has quit [Changing host]
nofxx has joined #ruby
Rollabunna has joined #ruby
enders has joined #ruby
decoponyo has joined #ruby
Scroff has quit [Remote host closed the connection]
abyss has quit [Ping timeout: 264 seconds]
ignoch has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
last_staff has quit [Remote host closed the connection]
Scroff has joined #ruby
abyss has joined #ruby
decoponio has quit [Ping timeout: 248 seconds]
rbennacer has quit [Remote host closed the connection]
Rollabunna has quit [Ping timeout: 265 seconds]
rbennacer has joined #ruby
intyl has quit [Ping timeout: 256 seconds]
df has quit [Ping timeout: 256 seconds]
phizzbuzz has quit [Remote host closed the connection]
Pupeno has joined #ruby
Tarkers34|2 has quit [Ping timeout: 276 seconds]
Pupeno has quit [Remote host closed the connection]
hotpancakes has joined #ruby
dviola has joined #ruby
wallerdev has quit [Quit: wallerdev]
christiandsg has quit [Remote host closed the connection]
blackmesa has joined #ruby
niemcu has quit [Ping timeout: 264 seconds]
wallerdev has joined #ruby
yayfoxes has joined #ruby
hololeap has joined #ruby
abuzze has joined #ruby
war_pigs has joined #ruby
bf4 has joined #ruby
Scroff has quit [Ping timeout: 264 seconds]
arooni-mobile has joined #ruby
Soda has joined #ruby
hololeap has quit [Ping timeout: 250 seconds]
abuzze has quit [Ping timeout: 246 seconds]
finisherr has joined #ruby
dviola is now known as diegoviola
perrier_ has quit [Remote host closed the connection]
jbw__ has joined #ruby
bf4 has quit [Ping timeout: 252 seconds]
bullcitydev has joined #ruby
_whitelogger has joined #ruby
spider-mario has quit [Read error: Connection reset by peer]
bruno- has quit [Ping timeout: 256 seconds]
ljt has joined #ruby
Pupeno has joined #ruby
Pupeno has quit [Remote host closed the connection]
yayfoxes has quit [Quit: rebooting to Haiku]
christiandsg has joined #ruby
jbw_ has joined #ruby
benanne has quit [Quit: kbai]
JDiPierro has joined #ruby
JDiPierro has quit [Remote host closed the connection]
Tarkers34|2 has quit [Remote host closed the connection]
jbw__ has quit [Ping timeout: 265 seconds]
chouhoulis has joined #ruby
blackmesa has quit [Ping timeout: 255 seconds]
Rollabunna has joined #ruby
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
chouhoulis has quit [Ping timeout: 248 seconds]
Limix has quit [Quit: Limix]
[Keith] has joined #ruby
ndrei has quit [Ping timeout: 256 seconds]
lordkryss has quit [Quit: Connection closed for inactivity]
mary5030 has joined #ruby
blackmesa has joined #ruby
sarkyniin has joined #ruby
Rollabunna has quit [Ping timeout: 246 seconds]
jbw__ has joined #ruby
tno has quit [Remote host closed the connection]
eggoez has quit [Ping timeout: 248 seconds]
diegoviola has quit [Ping timeout: 246 seconds]
jbw_ has quit [Ping timeout: 264 seconds]
mary5030 has quit [Ping timeout: 265 seconds]
RandyT has quit [Ping timeout: 264 seconds]
RandyT has joined #ruby
bronson has quit [Remote host closed the connection]
mr_blue has quit [Ping timeout: 248 seconds]
armyriad has joined #ruby
radialneon has quit [Read error: Connection reset by peer]
Tarkers34|2 has joined #ruby
radialneon has joined #ruby
ledestin has joined #ruby
RandyT has quit [Ping timeout: 250 seconds]
bruno- has joined #ruby
dgutierrez1287 has joined #ruby
eggoez has joined #ruby
shellie_ has joined #ruby
RandyT has joined #ruby
blackmesa has quit [Ping timeout: 264 seconds]
christiandsg has quit [Remote host closed the connection]
devbug_ has joined #ruby
dgutierrez1287 has quit [Ping timeout: 256 seconds]
devbug has quit [Ping timeout: 244 seconds]
jordsmi has quit [Quit: Connection closed for inactivity]
Exuma has joined #ruby
devbug has joined #ruby
diegoviola has joined #ruby
devbug_ has quit [Ping timeout: 264 seconds]
devbug_ has joined #ruby
bronson has joined #ruby
iamninja has joined #ruby
devbug has quit [Ping timeout: 244 seconds]
tubuliferous_ has quit [Ping timeout: 248 seconds]
tkuchiki has joined #ruby
Ropeney has joined #ruby
rbennacer has quit [Remote host closed the connection]
workmad3 has joined #ruby
ljt has quit []
jbw_ has joined #ruby
dgutierrez1287 has joined #ruby
tkuchiki has quit [Remote host closed the connection]
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
gix has quit [Ping timeout: 252 seconds]
Yzguy has joined #ruby
ljt has joined #ruby
k3asd` has quit [Ping timeout: 264 seconds]
jbw__ has quit [Ping timeout: 265 seconds]
noobQ has quit [Remote host closed the connection]
ledestin has joined #ruby
workmad3 has quit [Ping timeout: 255 seconds]
urbanmonk has quit [Quit: urbanmonk]
ivanskie has joined #ruby
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
<tmtwd> my ruby -v outputs 2.2 but when I install a gem (byebug) it says I need at least 2.0
gix has joined #ruby
radialneon has quit [Remote host closed the connection]
radialneon has joined #ruby
tubuliferous_ has joined #ruby
<Darkwater> tmtwd: maybe gem is using an out-of-date ruby installation?
<tmtwd> Darkwater, you mean I need to update gem?
devbug has joined #ruby
<Darkwater> not sure
<toretore> `which ruby`
<toretore> `which gem`
idafyaid has quit [Ping timeout: 264 seconds]
iateadonut has joined #ruby
devbug_ has quit [Ping timeout: 248 seconds]
jbw__ has joined #ruby
rawtext has joined #ruby
<tmtwd> ~/ruby.d $ which ruby
<tmtwd> ~/ruby.d $ which gem
<tmtwd> ~/ruby.d $
<tmtwd> tmtwd@timothy:~/ruby.d$ which gem │ CATCGTAATGACGGCCT
<tmtwd> hello
jbw_ has quit [Ping timeout: 264 seconds]
<tmtwd> eh, I guess I'll just use pry ... thats really odd
arooni-mobile has joined #ruby
arooni-mobile__ has joined #ruby
Rollabunna has joined #ruby
bf4 has joined #ruby
devbug_ has joined #ruby
mistermocha has joined #ruby
Rollabunna has quit [Ping timeout: 248 seconds]
devbug__ has joined #ruby
devbug has quit [Ping timeout: 252 seconds]
devbug_ has quit [Ping timeout: 250 seconds]
bf4 has quit [Ping timeout: 264 seconds]
kjones_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ruurd has joined #ruby
radialneon has quit [Quit: Leaving]
Oog has joined #ruby
radialneon has joined #ruby
nfk has quit [Quit: yawn]
thedonkdonk has joined #ruby
devbug has joined #ruby
<Oog> module ShiftWindow; def ShiftWindow.foo(time); ...; end; end - is there a difference in ShiftWindow.foo and ShiftWindow::foo ? both seem to work
lanemeyer has quit [Read error: Connection reset by peer]
mistermocha has quit [Ping timeout: 255 seconds]
<thedonkdonk> not sure if this the right place to ask about Ruby on Rails questions?
Vile` has quit [Read error: Connection reset by peer]