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 ?
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]
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]
<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".
<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
<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]
<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. :/
<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>
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? :(
<[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>
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.
<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"
<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)
<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.
<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
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)
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]
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?
<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?
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?
<[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
<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 ...
<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_>
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...
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.
<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…]
<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]
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>
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!
<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
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)?
<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`
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
<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++
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]