monoprotic has quit [Remote host closed the connection]
aeontech has joined #ruby
monoprotic has joined #ruby
monoprotic has joined #ruby
monoprotic has quit [Changing host]
nixmaniack has joined #ruby
nixmaniack has quit [Changing host]
nixmaniack has joined #ruby
<devster31>
hi guys, I'm doing advent of code, I'm trying to improve my solution for day3, this is the new one: http://hastebin.com/umezujejuv.xml but it's not working, I'm missing something, it's off by a lot and the resulting visited hash is very strange, what am I doing wrong?
<devster31>
part 2
ElSif has joined #ruby
<devster31>
the 1 is a typo
<devster31>
line 13
elton has joined #ruby
nixmaniack has quit [Ping timeout: 246 seconds]
Jet4Fire has joined #ruby
Azure has quit [Ping timeout: 260 seconds]
pandaant has quit [Remote host closed the connection]
monoprotic has quit [Remote host closed the connection]
monoprotic has joined #ruby
monoprotic has quit [Changing host]
monoprotic has joined #ruby
pygospa has quit [Ping timeout: 260 seconds]
elton has quit [Ping timeout: 245 seconds]
Azure has joined #ruby
Jet4Fire has quit [Ping timeout: 246 seconds]
JonathanWilson has joined #ruby
<JonathanWilson>
this is crap
<JonathanWilson>
why is there a bootcamp that's 52 weeks long for women and it's 100% free
<JonathanWilson>
why isn't there one for men that offers the same things?
hxegon has quit [Ping timeout: 246 seconds]
<null__>
you could start one
<null__>
but you're missing the point
<JonathanWilson>
but wouldn't i get sued for discrimination?
<JonathanWilson>
how about i start a bootcamp that's 100% free for only white men
<JonathanWilson>
no minorities no women
akem has quit [Remote host closed the connection]
Jet4Fire has joined #ruby
shanemcd_ has joined #ruby
shanemcd_ has quit [Client Quit]
stannard has quit [Remote host closed the connection]
<apeiros>
JonathanWilson: you can stop your rant and go educate yourself about why it doesn't work this way. this channel ain't the place.
<JonathanWilson>
fighting discrimination with discrimination is not the solution
jessemcgilallen has joined #ruby
<JonathanWilson>
apeiros: why are you that daft?
DurstBurger has joined #ruby
<apeiros>
!kick JonathanWilson I said not here and certainly not in this tone.
JonathanWilson was kicked from #ruby by ruboto [I said not here and certainly not in this tone.]
JonathanWilson has joined #ruby
<JonathanWilson>
fuck you
<apeiros>
I heard "ban me". will do.
<JonathanWilson>
free speech
<apeiros>
!ban JonathanWilson !T 1w rude behavior
JonathanWilson was kicked from #ruby by ChanServ [Banned: rude behavior]
<null__>
lol free speech
Jet4Fire has quit [Ping timeout: 260 seconds]
<apeiros>
no, you don't get free speech in here.
maloik has quit [Ping timeout: 246 seconds]
nateberkopec has joined #ruby
sgambino has joined #ruby
mbff has quit [Ping timeout: 260 seconds]
aeontech has quit [Ping timeout: 265 seconds]
rikai has joined #ruby
zarubin has quit [Remote host closed the connection]
pygospa has joined #ruby
Jet4Fire has joined #ruby
mbff has joined #ruby
Musashi007 has joined #ruby
mbff has quit [Client Quit]
jetpackjoe has joined #ruby
alindeman has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nateberkopec has quit [Quit: Leaving...]
ur5us has quit [Remote host closed the connection]
rikai has quit [Ping timeout: 260 seconds]
dlitvak has joined #ruby
sucks has joined #ruby
Jet4Fire has quit [Ping timeout: 260 seconds]
duckpuppy has joined #ruby
aeontech has joined #ruby
sepp2k1 has quit [Read error: Connection reset by peer]
nixmaniack has joined #ruby
mikecmpbll has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sucks has quit [Remote host closed the connection]
pygospa has quit [Ping timeout: 246 seconds]
sucks has joined #ruby
TheBloke- has joined #ruby
Jet4Fire has joined #ruby
duckpuppy has quit [Ping timeout: 246 seconds]
TheBloke has quit [Ping timeout: 260 seconds]
nixmaniack has quit [Ping timeout: 260 seconds]
maloik has joined #ruby
Jet4Fire has quit [Ping timeout: 260 seconds]
TheBloke- has quit [Read error: Connection reset by peer]
KensoDev has quit [Remote host closed the connection]
TheBloke has joined #ruby
maloik has quit [Ping timeout: 245 seconds]
Jet4Fire has joined #ruby
Pupeno has quit [Quit: Leaving...]
JDiPierro has joined #ruby
rikai has joined #ruby
dlitvak has quit [Ping timeout: 260 seconds]
boxofrox has joined #ruby
Jet4Fire has quit [Ping timeout: 246 seconds]
sucks has quit [Read error: Connection reset by peer]
sucks has joined #ruby
dlitvak has joined #ruby
jetpackjoe has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sharkman has quit [Quit: Leaving]
FooMunki has joined #ruby
jetpackjoe has joined #ruby
jetpackjoe has quit [Max SendQ exceeded]
<cryocaustik>
lol, well that
sucks_ has joined #ruby
<cryocaustik>
that's a story to come back to
sucks_ has quit [Read error: Connection reset by peer]
alindeman has joined #ruby
Jet4Fire has joined #ruby
chipotle has joined #ruby
jhill has quit [Ping timeout: 260 seconds]
<cyberfawkes>
Thoughts on using Ruby for Game Development?
speaking1ode has quit [Ping timeout: 246 seconds]
<cyberfawkes>
Or should I use Python, or C++
Rodya_ has joined #ruby
jhill has joined #ruby
zast has quit [Ping timeout: 260 seconds]
sucks has quit [Remote host closed the connection]
<devster31>
so in the second case I'm passing the values and in the first the object?
<jhass>
oh wait, you're using arrays as keys? ugh
<devster31>
shouldn't I?
Jet4Fire has joined #ruby
aeontech has quit [Ping timeout: 265 seconds]
<jhass>
devster31: you use arrays in the first case as keys, which is clumsy
elton has joined #ruby
<jhass>
in the second case you convert them to strings
aeontech has joined #ruby
B1n4r10 has quit [Ping timeout: 245 seconds]
<jhass>
devster31: ruby is pass by reference so a = [0, 0]; first_key = a; a[0] = 1; second_key = a; first_key == second_key
<jhass>
devster31: but a = [0, 0]; first_key = a.to_s; a[0] = 1; second_key = a.to_s; first_key == second_key
<jhass>
er
<jhass>
devster31: but a = [0, 0]; first_key = a.to_s; a[0] = 1; second_key = a.to_s; first_key != second_key
<jhass>
but then again you change the arrays and the .hash changes and you don't .rehash and idk
<jhass>
it's just messy
<devster31>
ok, so what should I use here to make it better?
<jhass>
I didn't really figure out what it's supposed to do in the first place tbh
bronson has joined #ruby
<devster31>
advent of code day 3, it's a map basically, it changes coordinates for every value of the string for 2 walkers
elton has quit [Ping timeout: 245 seconds]
Jet4Fire has quit [Ping timeout: 245 seconds]
sucks has joined #ruby
davedev2_ has quit []
<jhass>
well, I'll just use the lame excuse "figuring out a nice way is part of the challenge" and bail :P
solocshaw has quit [Ping timeout: 260 seconds]
<devster31>
it is, my first try was a long list of case statements
dionysus69 has quit [Ping timeout: 260 seconds]
bronson has quit [Ping timeout: 245 seconds]
crowell has joined #ruby
crowell has quit [Changing host]
crowell has joined #ruby
aeon has joined #ruby
aeontech has quit [Ping timeout: 265 seconds]
aeon is now known as aeontech
alindeman has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Jet4Fire has joined #ruby
KensoDev has quit [Remote host closed the connection]
alindeman has joined #ruby
sankaber has joined #ruby
sucks has quit [Read error: Connection reset by peer]
stannard has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
dlitvak has quit [Ping timeout: 246 seconds]
juddey has joined #ruby
Jet4Fire has quit [Ping timeout: 246 seconds]
greg has joined #ruby
<greg>
when do we expeect rails 5 to be publiclly released?
SCHAAP137 has quit [Quit: Leaving]
<devster31>
however I notice something else, the final hash is comprised of only 2 values, the final array values, it seems that during the loop every single value of the keys in the hash is changed to reflect the value of the array, like every time it points to the same thing
hxegon has joined #ruby
stannard has quit [Ping timeout: 260 seconds]
B1n4r10 has joined #ruby
<jhass>
?crospost greg
<ruboto>
greg, I don't know anything about crospost
<jhass>
er
<jhass>
?crosspost greg
<ruboto>
greg, Please do not crosspost without at least telling so and mentioning provided suggestions and their outcome in all channels. Experience shows that people don't do either, and not doing so is considered rude.
Jet4Fire has joined #ruby
<greg>
sorry
Jardayn has quit [Read error: Connection reset by peer]
beast has joined #ruby
dlitvak has joined #ruby
pdoherty has quit [Ping timeout: 246 seconds]
Jet4Fire has quit [Ping timeout: 260 seconds]
marr has quit []
gregf has quit [Quit: WeeChat 1.3]
duckpuppy has joined #ruby
gwaanbatimon has joined #ruby
<gwaanbatimon>
wah gwaan
thiagofm has quit [Ping timeout: 264 seconds]
FrankD has joined #ruby
devbug has joined #ruby
<jhass>
!ban gwaanbatimon !T 1w bad nick
gwaanbatimon was banned on #ruby by ChanServ [gwaanbatimon!*@*]
gwaanbatimon was kicked from #ruby by ChanServ [Banned: bad nick]
Jet4Fire has joined #ruby
supermarin has joined #ruby
_djbkd has joined #ruby
duckpuppy has quit [Ping timeout: 245 seconds]
juddey has quit [Remote host closed the connection]
Trynemjoel has quit [Ping timeout: 250 seconds]
maloik has joined #ruby
hxegon has quit [Quit: Lost terminal]
pdoherty has joined #ruby
Jet4Fire has quit [Ping timeout: 260 seconds]
supermarin has quit [Ping timeout: 260 seconds]
workmad3_ has joined #ruby
_djbkd has quit [Ping timeout: 260 seconds]
maloik has quit [Ping timeout: 245 seconds]
workmad3 has quit [Ping timeout: 260 seconds]
lokulin has quit [Changing host]
lokulin has joined #ruby
ethe has quit [Ping timeout: 245 seconds]
aeontech has quit [Read error: Connection reset by peer]
radgeRayden has joined #ruby
Jet4Fire has joined #ruby
gregf has joined #ruby
zacts has quit [Quit: leaving]
Trynemjoel has joined #ruby
dlitvak_ has joined #ruby
Jet4Fire has quit [Ping timeout: 260 seconds]
aeontech has joined #ruby
ta has joined #ruby
jpfuentes2 has joined #ruby
greg has quit [Quit: Leaving]
Trynemjoel has quit [Ping timeout: 250 seconds]
dlitvak has quit [Ping timeout: 245 seconds]
RegulationD has joined #ruby
Jet4Fire has joined #ruby
ta has quit [Ping timeout: 245 seconds]
jpfuentes2 has quit [Ping timeout: 246 seconds]
KensoDev has joined #ruby
RegulationD has quit [Ping timeout: 245 seconds]
platzhirsch has quit [Ping timeout: 260 seconds]
_djbkd has joined #ruby
Jet4Fire has quit [Ping timeout: 260 seconds]
iateadonut has quit [Ping timeout: 245 seconds]
Jet4Fire has joined #ruby
bkxd has quit [Ping timeout: 245 seconds]
elton has joined #ruby
gregf has quit [Quit: WeeChat 1.3]
n_blownapart has joined #ruby
<n_blownapart>
wrong channel
<jhass>
you didn't say anything ...
<n_blownapart>
hi
Jet4Fire has quit [Ping timeout: 245 seconds]
<jhass>
hi :D
KensoDev_ has joined #ruby
<n_blownapart>
I gave up on Ruby . learning scheme. jhass gave me patient help in the past
elton has quit [Ping timeout: 260 seconds]
KensoDev has quit [Ping timeout: 260 seconds]
<jhass>
scheme's easier for you? mkay
<n_blownapart>
someone told me ruby would make sense if I studied scheme first
<cryocaustik>
hey all - is .exclude? still valid?
<jhass>
sounds like a stupid advice
<jhass>
cryocaustik: context?
<cryocaustik>
I am trying to use it with a user entry
<cryocaustik>
to check if the entry has certain letters
<cryocaustik>
randomtest_2.rb:3:in `<main>': undefined method `exclude?' for "alex":String (NoMethodError)
user1138 has joined #ruby
user1138 has quit [Remote host closed the connection]
<cryocaustik>
I used it as: puts usr.exclude?("s")
Jet4Fire has joined #ruby
<jhass>
cryocaustik: welll I guess you don't have ActiveSupport loaded then
duwang has joined #ruby
edj has joined #ruby
<cryocaustik>
oh.. you are right
<cryocaustik>
sorry and thnx!
user1138 has joined #ruby
user1138 has quit [Remote host closed the connection]
<edj>
so i have these two files in the same directory, and when i try to require one in the other i get an error.
<duwang>
Hey, if I have an object where I have a hashmap as a field and want to make a get method where I return a copy of a hash map rather than the actual hashmap, how would I do so?
<jhass>
edj: use require_relative instead
<edj>
thank you so much jhass
<jhass>
duwang: call dup on it
<n_blownapart>
jhass the argument was that languages like scheme, lisp, haskell are better to understand the internals. ruby / python make it hard to see what the program is doing.. blah blah. what do you think?
<duwang>
jhass: so like this? - @hashmap.dup
<jhass>
n_blownapart: bullshit, you don't need to know the internals in order to get quite productive
<jhass>
duwang: yup
<edj>
yup that did the trick jhass
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<duwang>
jhass: cool, thanks!
gregf has quit [Client Quit]
<n_blownapart>
ok thanks jhass
maloik has quit [Ping timeout: 260 seconds]
<jhass>
duwang: btw I hope it's not really called @hashmap, name your variables according to what they represent, not what datastructure they are
Jet4Fire has quit [Ping timeout: 245 seconds]
n_blownapart has quit [Remote host closed the connection]
diegoviola has quit [Quit: WeeChat 1.3]
alindeman has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Musashi007 has quit [Quit: Musashi007]
cryocaustik has quit [Read error: Connection reset by peer]
gregf has joined #ruby
alindeman has joined #ruby
diprotic has joined #ruby
diprotic has quit [Changing host]
diprotic has joined #ruby
alindeman has quit [Client Quit]
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
cryocaustik has joined #ruby
Jet4Fire has joined #ruby
monoprotic has quit [Ping timeout: 260 seconds]
devbug has quit [Ping timeout: 264 seconds]
<pocketprotector>
LOL
Jet4Fire has quit [Ping timeout: 245 seconds]
gregf has quit [Quit: WeeChat 1.3]
aeontech has quit [Ping timeout: 265 seconds]
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Trynemjoel has joined #ruby
CloCkWeRX has quit [Ping timeout: 246 seconds]
Rumbles has quit [Ping timeout: 245 seconds]
duckpuppy has joined #ruby
gregf has joined #ruby
maloik has joined #ruby
Jet4Fire has joined #ruby
aeontech has joined #ruby
diegoviola has joined #ruby
duckpuppy has quit [Ping timeout: 245 seconds]
maloik has quit [Ping timeout: 245 seconds]
Aasha has joined #ruby
Jet4Fire has quit [Ping timeout: 260 seconds]
alindeman has joined #ruby
Wsewolod has quit [Ping timeout: 260 seconds]
Wsewolod has joined #ruby
Wsewolod has quit [Max SendQ exceeded]
Wsewolod has joined #ruby
maloik has joined #ruby
dimik has joined #ruby
diprotic has quit [Remote host closed the connection]
Beverage has joined #ruby
monoprotic has joined #ruby
monoprotic has quit [Changing host]
monoprotic has joined #ruby
Aasha has quit [Ping timeout: 260 seconds]
<cryocaustik>
other than using activesupport and .exclude?, is there any other way to check if a string does not include certain characters?
<norc>
This is a neat pattern to inject behavior into existing code. :)
<shevy>
ah yeah I think the problem there is that it would have the same name right? I'd kinda want to grab just the method signature alone, without the name of the associated method
brennebe_ has joined #ruby
<norc>
Mmm
brennebeck has quit [Read error: Connection reset by peer]
dlitvak has joined #ruby
dionysus69 has joined #ruby
blackmesa has quit [Ping timeout: 260 seconds]
<shevy>
if it is not possible that is ok, I can do a PR request to ruby core
brennebeck has joined #ruby
troys_ is now known as troys
jscheel has joined #ruby
maloik has quit [Ping timeout: 246 seconds]
Jet4Fire has quit [Ping timeout: 260 seconds]
<norc>
shevy: Well, you do have method(__method__).parameters
sorbo_ has joined #ruby
<norc>
Or generally Method#parameters.
<shevy>
hmm
<norc>
That is basically the signature of the function.
saneax is now known as saneax_AFK
<shevy>
cool
<shevy>
method(:foo).parameters # => [[:opt, :i]]
brennebe_ has quit [Ping timeout: 260 seconds]
dlitvak has quit [Ping timeout: 260 seconds]
radgeRayden has joined #ruby
sorbo_ has quit [Ping timeout: 260 seconds]
Jet4Fire has joined #ruby
platzhirsch has joined #ruby
houhoulis has quit [Remote host closed the connection]
bronson has quit [Remote host closed the connection]
dimik has quit [Ping timeout: 246 seconds]
Jet4Fire has quit [Ping timeout: 260 seconds]
sucks has quit [Remote host closed the connection]
duckpuppy has joined #ruby
bronson has joined #ruby
digneety has joined #ruby
<norc>
shevy: Remember that blocks not bound to a proc will have to be dealt with.
dionysus69 has quit [Quit: dionysus69]
<norc>
(They really are special)
devbug has joined #ruby
karapetyan has quit [Remote host closed the connection]
<apeiros>
cryocaustik: there's two schools regarding do/end vs. {}
bronson has quit [Remote host closed the connection]
<shevy>
they are not 100% identical due to different precedences; in DSLs such as sinatra you often see do/end, partially because one may have to use () when using {}
<apeiros>
cryocaustik: a) use do/end if you don't care about the return value but only about the side-effect (e.g. `each` loop which prints) and {} if you want the return value (when you assign the result or chain)
<apeiros>
cryocaustik: b) use do/end for multiple lines, {} for single lines
<shevy>
get '/' do; 'Hello world!'; end
spider-mario has joined #ruby
<apeiros>
personally, I'm following a)
<shevy>
get('/') { 'Hello world!' }
Azulinho has quit [Ping timeout: 260 seconds]
<apeiros>
the difference between do/end and {} is precedence.
<shevy>
long live {} !
<shevy>
down with the do/end hipster movement!!!
<cryocaustik>
haha
<cryocaustik>
thank you both for the advice, I have to admit option a) does make sense to me as well
Meow-J has joined #ruby
<cryocaustik>
I had one more question about print/puts and how to call on variable in them
<cryocaustik>
is there any difference in using "#{var1} : #{var2}" verses using var1 + ":" + var2
S01780 has quit [Quit: Connection closed for inactivity]
Jet4Fire has joined #ruby
<apeiros>
apart from the missing spaces in the second?
<apeiros>
the former is usually preferred. also #{} automatically does the .to_s call for you in case var1/var2 are not strings.
<cryocaustik>
sorry, say I did have the spaces in the second
lapide_viridi has joined #ruby
<apeiros>
and I wouldn't be surprised if the former (string interpolation) was also faster
<cryocaustik>
ah, that is useful. I didn't know that, I was using "#{var1.to_s} more text"
<cryocaustik>
thanks again, apeiros and shevy
<cryocaustik>
really appreciate all the help today!
kfrz has quit [Quit: Leaving.]
Jet4Fire has quit [Ping timeout: 260 seconds]
Pupeno has joined #ruby
elton has joined #ruby
blackmesa has quit [Ping timeout: 245 seconds]
elton has quit [Ping timeout: 245 seconds]
Jet4Fire has joined #ruby
howdoicomputer has joined #ruby
Hounddog has quit [Remote host closed the connection]
Jet4Fire has quit [Ping timeout: 260 seconds]
<conrfrmn>
rbenv which ruby says ~/.rbenv/ruby but ruby -v says ruby 2.0.0
tildes has joined #ruby
<shevy>
conrfrmn you have more than one ruby?
duncannz has quit [Remote host closed the connection]
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<conrfrmn>
mac osx comes with it
<shevy>
yeah
mikecmpbll has joined #ruby
howdoicomputer has quit [Ping timeout: 260 seconds]
n1x has quit [Ping timeout: 246 seconds]
nixmaniack has joined #ruby
<conrfrmn>
this is usually stupid simple. i just got a new mac, so i'm setting up manually. this should work damnit!
yfeldblum has joined #ruby
Jet4Fire has joined #ruby
Jackneill has joined #ruby
wldcordeiro has quit [Ping timeout: 246 seconds]
Jet4Fire has quit [Ping timeout: 260 seconds]
howdoi has joined #ruby
sorbo_ has joined #ruby
nixmaniack has quit [Ping timeout: 246 seconds]
Jet4Fire has joined #ruby
sorbo_ has quit [Ping timeout: 260 seconds]
thiagofm has joined #ruby
karapetyan has joined #ruby
Jet4Fire has quit [Ping timeout: 260 seconds]
duckpuppy has joined #ruby
wldcordeiro has joined #ruby
nixmaniack has joined #ruby
nixmaniack has quit [Changing host]
nixmaniack has joined #ruby
Jet4Fire has joined #ruby
mozzarella has joined #ruby
duckpuppy has quit [Ping timeout: 245 seconds]
cryocaustik has quit [Read error: Connection reset by peer]
lapide_viridi has quit [Quit: Leaving]
Jet4Fire has quit [Ping timeout: 245 seconds]
The_Phoenix1 has joined #ruby
The_Phoenix has quit [Ping timeout: 260 seconds]
karapetyan has quit [Remote host closed the connection]
colegatron has quit [Ping timeout: 245 seconds]
linduxed has joined #ruby
karapetyan has joined #ruby
n1x has joined #ruby
nixmaniack has quit [Read error: Connection reset by peer]
Jet4Fire has joined #ruby
InvGhost has joined #ruby
Jet4Fire has quit [Ping timeout: 260 seconds]
jpfuentes2 has joined #ruby
zast has quit [Quit: Leaving.]
bronson has joined #ruby
karapetyan has quit [Remote host closed the connection]
sandstrom has joined #ruby
jpfuentes2 has quit [Ping timeout: 246 seconds]
Jet4Fire has joined #ruby
colegatron has joined #ruby
n1x has quit [Ping timeout: 245 seconds]
bronson has quit [Ping timeout: 245 seconds]
iamnix has joined #ruby
nixmaniack has joined #ruby
nixmaniack has quit [Changing host]
nixmaniack has joined #ruby
Jet4Fire has quit [Ping timeout: 252 seconds]
elton has joined #ruby
Ox0dea has joined #ruby
<Ox0dea>
"[Method#parameters] is basically the signature of the function."
<Ox0dea>
Ah, damn. norc isn't even here. :<
Jet4Fire has joined #ruby
AlphaAtom has joined #ruby
<Ox0dea>
Someone got away with being wrong on the Internet.
elton has quit [Ping timeout: 245 seconds]
n1x has joined #ruby
Rodya_ has quit [Quit: Leaving...]
nixmaniack has quit [Ping timeout: 260 seconds]
howdoicomputer has joined #ruby
Jet4Fire has quit [Ping timeout: 260 seconds]
Asher has quit [Quit: Leaving.]
yashinbasement has quit [Quit: Leaving]
maloik has quit [Read error: Connection reset by peer]
Asher has joined #ruby
Asher has quit [Remote host closed the connection]
howdoicomputer has quit [Ping timeout: 260 seconds]
otherj has quit [Quit: .]
Jet4Fire has joined #ruby
nixmaniack has joined #ruby
Snowy has joined #ruby
maloik has joined #ruby
nixmaniack has quit [Client Quit]
Snowy has quit [Remote host closed the connection]
Jet4Fire has quit [Ping timeout: 260 seconds]
<shevy>
I can break irb!
<shevy>
(irb):3:in `method_missing': wrong number of arguments (1 for 0) (ArgumentError)
sorbo_ has joined #ruby
Jet4Fire has joined #ruby
B1n4r10 has joined #ruby
sorbo_ has quit [Ping timeout: 246 seconds]
<shevy>
hmm if I have an array such as ['horse','cat','dog','mice'] and I want 'cat' to be first, what would be the best way to have this become ['cat','horse','dog','mice'] ?
Jet4Fire has quit [Ping timeout: 260 seconds]
<canton7>
remove 'cat', re-insert at the beginning
B1n4r10 has quit [Ping timeout: 260 seconds]
Uptime has quit [Max SendQ exceeded]
duckpuppy has joined #ruby
Uptime has joined #ruby
Jet4Fire has joined #ruby
duckpuppy has quit [Ping timeout: 260 seconds]
azgil has joined #ruby
supermarin has joined #ruby
Jet4Fire has quit [Ping timeout: 260 seconds]
<Ox0dea>
shevy: That's so not the sort of question you'd expect from somebody with 161 gems, man. What's going on?
ta has joined #ruby
Moosashi has joined #ruby
<Ox0dea>
Array#delete and #unshift are first-week-of-Ruby-type things.
zarubin has joined #ruby
SCHAAP137 has quit [Quit: Leaving]
yardenbar has quit [Ping timeout: 246 seconds]
saneax is now known as saneax_AFK
supermarin has quit [Ping timeout: 260 seconds]
<shevy>
Ox0dea: That's so not the sort of answer you'd expect from somebody who is wasting time, man. What's going on?
karapetyan has joined #ruby
big|bad|wolf has joined #ruby
<Ox0dea>
You keep doing that, but it's really not having whatever effect you think it is. I'm trying to help you identify a problem, and you're minimizing for the sake of maintaining some obviously ineffective status quo.
ta has quit [Ping timeout: 245 seconds]
Jet4Fire has joined #ruby
<shevy>
You keep doing that, but it's really just wasting whatever time you think others have to waste time bothering with you. I'm trying to get answers, if you can't contribute then please stop highlighting me.
zarubin has quit [Ping timeout: 246 seconds]
<shevy>
This is the second time that you ran your ad-hominem attack via the gems now.
<shevy>
Could you kindly stop doing this?
* Rotwang
opens popcorn
Moosashi has quit [Quit: Moosashi]
yardenbar has joined #ruby
jairojunior has joined #ruby
Jet4Fire has quit [Ping timeout: 245 seconds]
kies has joined #ruby
The_Phoenix1 has quit [Ping timeout: 260 seconds]
bronson has joined #ruby
The_Phoenix has joined #ruby
Jet4Fire has joined #ruby
benhuda has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
benhuda has joined #ruby
bronson has quit [Ping timeout: 245 seconds]
Jet4Fire has quit [Ping timeout: 245 seconds]
Snowy has joined #ruby
Jet4Fire has joined #ruby
atomical has joined #ruby
atomical has quit [Remote host closed the connection]
pandaant has joined #ruby
tk__ has joined #ruby
Jet4Fire has quit [Ping timeout: 260 seconds]
howdoicomputer has joined #ruby
CloCkWeRX has quit [Ping timeout: 260 seconds]
<blub>
hm hm
<blub>
so i can write "\C-n" for control n or whatever
<blub>
is there a trick to pulling the 'n' out of that, if i just know that it's control something
Meow-J has quit [Quit: Connection closed for inactivity]
howdoicomputer has quit [Ping timeout: 245 seconds]
Snowy has quit [Remote host closed the connection]
Jet4Fire has quit [Ping timeout: 245 seconds]
sandstrom has quit [Quit: My computer has gone to sleep.]
<Ox0dea>
blub: I think ?\C-! being valid (and equivalent to ?\C-A) is incidental.
nixmaniack has joined #ruby
<Ox0dea>
Would you actually use \C-! if it were different from \C-1 or \C-A?
Snowy has joined #ruby
Snowy has quit [Read error: Connection reset by peer]
govg has joined #ruby
Snowy has joined #ruby
Jet4Fire has joined #ruby
FooMunki has joined #ruby
<Ox0dea>
blub: Did you know about control character literals already?
CloCkWeRX has joined #ruby
Snowy has quit [Remote host closed the connection]
Vivekananda has joined #ruby
iateadonut has joined #ruby
Bellthoven has joined #ruby
agent_white has quit [Ping timeout: 260 seconds]
Jet4Fire has quit [Ping timeout: 245 seconds]
<Zarthus>
Is it possible for OptParse to have an option with two parameters, or would this require putting the argument in quotes and splitting it by space? (for example, I want to recognize --abc first second, but I can only get the first parameter to be recognized. passing --abc 'first second' works, but might be confusing. Would I have to do --second second --abc first, and then look at options[:second]?
<Zarthus>
essentially, the syntax I desire is --abc [first [second]]
Snowy has joined #ruby
<Ox0dea>
Zarthus: Are you sure?
<blub>
i just ran into them trying to find the reverse
<Ox0dea>
Zarthus: Are you sure that's the syntax you desire? It's pretty unorthodox.
duckpuppy has joined #ruby
karapetyan has quit [Remote host closed the connection]
<Zarthus>
Ox0dea: well, I could ask the user to instead use namespaced strings (e.g. first:second) - but then I feel like I should have everything behave that way
<Ox0dea>
Zarthus: Are you writing a CLI with subcommands?
lubarch has quit [Ping timeout: 246 seconds]
karapetyan has joined #ruby
Jet4Fire has joined #ruby
lubarch has joined #ruby
sandstrom has joined #ruby
<Zarthus>
more or less, I have a generic "--make" command that accepts a name (for example, a controller) and a filename (such as UserController)
<Ox0dea>
Zarthus: That's a switch.
Snowy has quit [Remote host closed the connection]
<Zarthus>
it has an alias --controller [filename], but I wanted to have something that captures everything as well
duckpuppy has quit [Ping timeout: 246 seconds]
<Zarthus>
I'm open to suggestions of course, but it sounds weird to do it like first:second for only one command
<Ox0dea>
Well, having a switch that takes more than one argument is a pretty stark violation of the principle of least surprise.
nixmaniack has quit [Read error: Connection reset by peer]
<Ox0dea>
Thor would be overkill if `make` is your only subcommand, but if you'll eventually have many of them, I'd recommend looking into it.
Jet4Fire has quit [Ping timeout: 246 seconds]
<Zarthus>
i've looked into thor already, this is really the only scenario I can think of where it might be useful
<Ox0dea>
> Special cases aren't special enough to break the rules.
<Papierkorb>
There's also the Commandeer gem, but I never used it
lubarch has quit [Ping timeout: 246 seconds]
<Zarthus>
I'm thinking the other solution would be to require user input
<Papierkorb>
uargh
lubarch has joined #ruby
<Ox0dea>
Zarthus: You might be a masochist.
<Zarthus>
:<
elton has joined #ruby
<Papierkorb>
it is generally a design-flaw if you ask a user for information mid-process which you knew you needed before starting it
<Ox0dea>
Papierkorb: Tell that to every package manager ever.
<Ox0dea>
Besides the various AUR helpers that get it right. ^_^
<Papierkorb>
Ox0dea: --yes
<Papierkorb>
or no, it was --noconfirm
<Ox0dea>
I just pipe `yes`. :)
<Papierkorb>
i just hammer return
<Zarthus>
hehe
<Ox0dea>
Ew.
<Papierkorb>
the upper case letter is the default option
<Ox0dea>
And not always the one you want.
agent_white has joined #ruby
towski_ has joined #ruby
<Papierkorb>
Then I should've taken a look, cause then it does require my attention, so no rule break there
<Ox0dea>
$ yes | pacaur -Scc
<Ox0dea>
(I really do that.)
Jet4Fire has joined #ruby
elton has quit [Ping timeout: 245 seconds]
Jet4Fire has quit [Ping timeout: 245 seconds]
jpfuentes2 has joined #ruby
speaking1ode has quit [Ping timeout: 246 seconds]
towski_ has quit [Remote host closed the connection]
big|bad|wolf has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
speaking1ode has joined #ruby
big|bad|wolf has joined #ruby
bronson has joined #ruby
Anderson69s has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Jet4Fire has joined #ruby
jpfuentes2 has quit [Ping timeout: 245 seconds]
slackbotgz has joined #ruby
unshadow has joined #ruby
bronson has quit [Ping timeout: 245 seconds]
bubbys has quit [Ping timeout: 260 seconds]
Jet4Fire has quit [Ping timeout: 260 seconds]
Azure has quit [Excess Flood]
aryaching has joined #ruby
Azure has joined #ruby
Jet4Fire has joined #ruby
Jet4Fire has quit [Ping timeout: 246 seconds]
karapetyan has quit [Remote host closed the connection]
roshanavand has joined #ruby
ponga has joined #ruby
karapetyan has joined #ruby
howdoicomputer has joined #ruby
d0nn1e has quit [Ping timeout: 246 seconds]
Jet4Fire has joined #ruby
d0nn1e has joined #ruby
yfeldblum has quit [Ping timeout: 260 seconds]
howdoicomputer has quit [Ping timeout: 246 seconds]
B1n4r10 has joined #ruby
bubbys has joined #ruby
Pupp3tm4st3r has joined #ruby
Jet4Fire has quit [Ping timeout: 260 seconds]
minimalism has joined #ruby
mooe has quit [Quit: Connection closed for inactivity]
B1n4r10 has quit [Ping timeout: 245 seconds]
big|bad|wolf has quit [Ping timeout: 246 seconds]
maloik has quit [Ping timeout: 245 seconds]
roshanavand has quit [Ping timeout: 260 seconds]
<devster31>
http://dpaste.com/3EH0XY4 hi, adventofcode day6, is there a better way to write line 49?
benhuda has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Jet4Fire has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
vdamewood has quit [Quit: Life beckons.]
sandstrom has joined #ruby
Jet4Fire has quit [Ping timeout: 245 seconds]
patronus_ has joined #ruby
Marsjan has joined #ruby
justinmcp_ has joined #ruby
artmann has joined #ruby
wnd_ has joined #ruby
Nahra``` has joined #ruby
alindeman has joined #ruby
err_ok_ has joined #ruby
Killerkeksdose_ has joined #ruby
bjmllr_ has joined #ruby
eboaz has joined #ruby
tw1sted_ has joined #ruby
angiebadillo_ has joined #ruby
RTG` has joined #ruby
knight- has joined #ruby
Davey_ has joined #ruby
Davey_ has quit [Changing host]
Davey_ has joined #ruby
RazorX- has joined #ruby
perrier___ has joined #ruby
heinrich5991_ has joined #ruby
mhenrixon_ has joined #ruby
belak51 has joined #ruby
rcs_ has joined #ruby
nkts_ has joined #ruby
tethra_ has joined #ruby
Sp4rKy_ has joined #ruby
wjimenez5271_ has joined #ruby
tekku has joined #ruby
funnel_ has joined #ruby
TheSpectre has joined #ruby
Pro| has joined #ruby
Tristan-Speccy has joined #ruby
karapetyan has quit [Remote host closed the connection]
bier has joined #ruby
Marsjan is now known as marsjaninzmarsa
kobain has quit [Ping timeout: 240 seconds]
Davey_ is now known as Davey
zapata has quit [Ping timeout: 240 seconds]
kobain has joined #ruby
epitron has joined #ruby
mfqr has joined #ruby
mfqr has joined #ruby
kobain has joined #ruby
epitron has joined #ruby
Tristan-Speccy is now known as Guest41262
err_ok_ is now known as err_ok
belak51 is now known as belak
Sp4rKy_ is now known as Sp4rKy
funnel_ is now known as funnel
heinrich5991_ is now known as heinrich5991
FIGO_ has joined #ruby
Symbiosisz has joined #ruby
go|dfish has joined #ruby
samuelkadolph has joined #ruby
slackbotgz has quit [Remote host closed the connection]
Jet4Fire has joined #ruby
angiebadillo_ is now known as angiebadillo
duckpuppy has joined #ruby
SilentEcho has joined #ruby
nixmaniack has joined #ruby
nixmaniack has quit [Changing host]
nixmaniack has joined #ruby
Affix has joined #ruby
martinbjeldbak has joined #ruby
Bilge has joined #ruby
Sp4rKy has quit [Changing host]
Sp4rKy has joined #ruby
Affix is now known as Guest43116
unshadow has quit [Quit: leaving]
FIGO_ is now known as Platini
maxmanders has joined #ruby
<Ox0dea>
devster31: How come you're using string keys?
crayfishx has joined #ruby
thomasfedb has joined #ruby
thomasfedb has quit [Changing host]
thomasfedb has joined #ruby
stuartb has joined #ruby
M-prosodyContext has quit [Ping timeout: 260 seconds]
bjmllr_ has quit [Ping timeout: 260 seconds]
Qantourisc has joined #ruby
spectra has joined #ruby
sepp2k has joined #ruby
Shidash has joined #ruby
karapetyan has joined #ruby
Jet4Fire has quit [Ping timeout: 260 seconds]
duckpuppy has quit [Ping timeout: 260 seconds]
teotwaki has joined #ruby
DenSchub has joined #ruby
InvGhostt has joined #ruby
karapetyan has quit [Remote host closed the connection]
wnd_ is now known as wnd
supermarin has joined #ruby
bjmllr_ has joined #ruby
roshanavand has joined #ruby
karapetyan has joined #ruby
ta has joined #ruby
<devster31>
I tried with arrays but it was doing something weird and the final hash was composed of only 1 array, which means there were like 100000 copies of the same 2 values
<Ox0dea>
Well, Arrays work just fine as keys, so the problem was in your code.
M-prosodyContext has joined #ruby
Akagi201 has quit [Remote host closed the connection]
InvGhost has quit [Ping timeout: 260 seconds]
elton has joined #ruby
karapetyan has quit [Remote host closed the connection]
sgambino has joined #ruby
blub has left #ruby ["bye"]
blub has joined #ruby
karapetyan has joined #ruby
Jet4Fire has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
supermarin has quit [Ping timeout: 245 seconds]
Bellthoven has quit []
kirun has joined #ruby
<devster31>
I know, but I couldn't find it so I switched
haasn has joined #ruby
<devster31>
I think I was trying with bright[x,y]
nixmaniack has quit [Read error: Connection reset by peer]
karapetyan has quit [Remote host closed the connection]
<Ox0dea>
That should've been `bright[[x, y]]`.
KensoDev_ has quit []
ta has quit [Ping timeout: 246 seconds]
karapetyan has joined #ruby
elton has quit [Ping timeout: 245 seconds]
troter______ has quit [Ping timeout: 264 seconds]
colstrom_ has joined #ruby
lsv_ has joined #ruby
knowtheory has quit [Ping timeout: 264 seconds]
colstrom has quit [Ping timeout: 264 seconds]
colstrom_ is now known as colstrom
ruid has joined #ruby
ruid has quit [Changing host]
ruid has joined #ruby
Jet4Fire has quit [Ping timeout: 246 seconds]
ss_much has quit [Quit: Connection closed for inactivity]
Anderson69s has joined #ruby
<devster31>
I think I get why, basically I was referencing something instead of creating a new array with those values?
troter______ has joined #ruby
<Ox0dea>
You should've gotten an ArgumentError.
zarubin has quit [Remote host closed the connection]
CyberAssassin has joined #ruby
tylersmith has joined #ruby
CyberAssassin is now known as Guest64474
<Ox0dea>
`hash[foo, bar]` is just sugar for `hash.[](foo, bar)`, and similarly for `[]=`.
knowtheory has joined #ruby
roshanavand has quit [Ping timeout: 260 seconds]
Shidash has quit [Ping timeout: 264 seconds]
karapetyan has quit [Remote host closed the connection]
Mia has joined #ruby
Mia has quit [Changing host]
Mia has joined #ruby
karapetyan has joined #ruby
Shidash has joined #ruby
greister has joined #ruby
SCHAAP137 has joined #ruby
Hobbyboy has quit [Excess Flood]
iamdevnul_ has joined #ruby
Hobbyboy has joined #ruby
karapetyan has quit [Remote host closed the connection]
iamdevnul has quit [Ping timeout: 264 seconds]
iamdevnul_ is now known as iamdevnul
ruid has quit [Ping timeout: 260 seconds]
leslie has quit [Ping timeout: 260 seconds]
user1138_ has joined #ruby
iateadonut has quit [Quit: Leaving.]
nixmaniack has joined #ruby
CloCkWeRX has quit [Quit: Leaving.]
ibouvousaime has joined #ruby
elektronaut has quit [Ping timeout: 264 seconds]
SCHAAP137 has quit [Quit: Leaving]
iateadonut has joined #ruby
lubarch has quit [Quit: leaving]
Meow-J has joined #ruby
leslie has joined #ruby
leslie has quit [Changing host]
leslie has joined #ruby
SCHAAP137 has joined #ruby
doublemalt_ has joined #ruby
Pupp3tm4st3r has quit [Remote host closed the connection]
alindeman has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
howdoicomputer has joined #ruby
Cohedrin has joined #ruby
elektronaut has joined #ruby
DoubleMalt has quit [Ping timeout: 260 seconds]
sandstrom has joined #ruby
Wsewolod has joined #ruby
Bellthoven has joined #ruby
A124 has joined #ruby
roshanavand has joined #ruby
nixmaniack has quit [Ping timeout: 260 seconds]
howdoicomputer has quit [Ping timeout: 246 seconds]
alindeman has joined #ruby
beneills has joined #ruby
davedev24 has joined #ruby
jgt has joined #ruby
FooMunki has quit [Ping timeout: 260 seconds]
agent_white has quit [Quit: night]
Coldblackice has quit [Ping timeout: 260 seconds]
FooMunki has joined #ruby
kies has quit [Ping timeout: 260 seconds]
roshanav_ has joined #ruby
roshanavand has quit [Read error: Connection reset by peer]
pandaant has quit [Remote host closed the connection]
timonv has joined #ruby
soahccc has quit [Ping timeout: 264 seconds]
zarubin has joined #ruby
stannard has joined #ruby
tk__ has quit [Quit: ばいばい]
karapetyan has joined #ruby
lightstalker has joined #ruby
Guest43116 is now known as Affix
Affix has quit [Changing host]
Affix has joined #ruby
kalleth has quit [Quit: No Ping reply in 180 seconds.]
roshanav_ has quit [Read error: Connection reset by peer]
roshanavand has joined #ruby
soahccc has joined #ruby
kalleth has joined #ruby
Akagi201 has joined #ruby
ta has joined #ruby
alindeman has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
benlakey has quit [Ping timeout: 264 seconds]
DarkBushido has quit [Ping timeout: 264 seconds]
Jet4Fire has joined #ruby
benlakey has joined #ruby
elton has joined #ruby
nixmaniack has joined #ruby
jgt has quit [Quit: WeeChat 1.2]
PhilK has quit [Ping timeout: 264 seconds]
solenoids has quit [Ping timeout: 245 seconds]
ta has quit [Ping timeout: 246 seconds]
alindeman has joined #ruby
Jet4Fire has quit [Ping timeout: 246 seconds]
DLSteve has joined #ruby
elton has quit [Ping timeout: 245 seconds]
solenoids has joined #ruby
PhilK has joined #ruby
Ishido has joined #ruby
roshanavand has quit [Read error: No route to host]
roshanavand has joined #ruby
jpfuentes2 has joined #ruby
Jet4Fire has joined #ruby
beneills has quit [Ping timeout: 260 seconds]
Pupeno has quit [Quit: Leaving...]
jscheel has joined #ruby
rgrmatt_ has joined #ruby
bronson has joined #ruby
lurch_ has joined #ruby
jpfuentes2 has quit [Ping timeout: 260 seconds]
solenoids has quit [Ping timeout: 260 seconds]
Jet4Fire has quit [Ping timeout: 260 seconds]
DLSteve has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
yardenbar has quit [Ping timeout: 260 seconds]
roshanavand has quit [Read error: No route to host]
roshanavand has joined #ruby
DLSteve has joined #ruby
jscheel has quit [Quit: jscheel]
nixmaniack has quit [Remote host closed the connection]
bronson has quit [Ping timeout: 245 seconds]
yatish27 has joined #ruby
jscheel has joined #ruby
jscheel has quit [Client Quit]
Jet4Fire has joined #ruby
zarubin has quit [Remote host closed the connection]
alindeman has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
B1n4r10 has joined #ruby
beneills has joined #ruby
zly has quit [Changing host]
zly has joined #ruby
nixmaniack has joined #ruby
alindeman has joined #ruby
Akagi201 has quit [Ping timeout: 260 seconds]
zarubin has joined #ruby
DarkBushido has joined #ruby
Jet4Fire has quit [Ping timeout: 246 seconds]
tildes has quit [Ping timeout: 246 seconds]
B1n4r10 has quit [Ping timeout: 246 seconds]
moeabdol has joined #ruby
DLSteve has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
zarubin has quit [Ping timeout: 245 seconds]
roshanavand has quit [Ping timeout: 246 seconds]
alindeman has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
user1138_ has quit [Quit: Leaving]
codecop has quit [Remote host closed the connection]
howdoicomputer has joined #ruby
<shevy>
circle.rb:69:in `create': failed to allocate memory (NoMemoryError)
<shevy>
yay \o/
yardenbar has joined #ruby
nfk|laptop has joined #ruby
alindeman has joined #ruby
Jet4Fire has joined #ruby
x0f has quit [Ping timeout: 264 seconds]
user1138 has joined #ruby
x0f has joined #ruby
hackeron has quit [Ping timeout: 245 seconds]
howdoicomputer has quit [Ping timeout: 246 seconds]
<Zarthus>
Your favourite number.
hackeron has joined #ruby
Rickmasta has joined #ruby
kmckelvin has quit [Ping timeout: 260 seconds]
Jet4Fire has quit [Ping timeout: 260 seconds]
kmckelvin has joined #ruby
<Ox0dea>
69 is not particularly conducive to (pro)creating, but it's still funny that that's the method in which the error occurred.
monoprotic has quit [Remote host closed the connection]
monoprotic has joined #ruby
monoprotic has quit [Changing host]
monoprotic has joined #ruby
solenoids has joined #ruby
Bugboy1028 has joined #ruby
karapetyan has quit [Remote host closed the connection]
Jardayn has joined #ruby
sepp2k has quit [Read error: Connection reset by peer]
patdohere has quit [Read error: Connection reset by peer]
Jet4Fire has joined #ruby
JDiPierro has joined #ruby
sankaber has joined #ruby
karapetyan has joined #ruby
<shevy>
apparently I was trying to build The Infinite String
rgrmatt_ has quit [Remote host closed the connection]
Jet4Fire has quit [Ping timeout: 245 seconds]
Arnvald has joined #ruby
iateadonut has quit [Quit: Leaving.]
TomPeed has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
bubbys has quit [Ping timeout: 260 seconds]
bubbys has joined #ruby
slackbotgz has joined #ruby
shoutsid has joined #ruby
nixmaniack has quit [Ping timeout: 246 seconds]
lxsameer has quit [Quit: Leaving]
Jet4Fire has joined #ruby
iateadonut has joined #ruby
nixmaniack has joined #ruby
spider-mario has quit [Ping timeout: 246 seconds]
yatish27 has quit [Remote host closed the connection]
zarubin has joined #ruby
duckpuppy has joined #ruby
rgrmatt has joined #ruby
spider-mario has joined #ruby
Jet4Fire has quit [Ping timeout: 246 seconds]
rgrmatt has quit [Remote host closed the connection]
nfk|laptop has quit [Ping timeout: 246 seconds]
skade has joined #ruby
rgrmatt has joined #ruby
hectortrope has quit [Read error: Connection reset by peer]
duckpuppy has quit [Ping timeout: 245 seconds]
zarubin has quit [Ping timeout: 260 seconds]
supermarin has joined #ruby
moeabdol has quit [Read error: Connection reset by peer]
rgrmatt has quit [Remote host closed the connection]
roshanavand has quit [Read error: No route to host]
roshanavand has joined #ruby
<adaedra>
p too is colored in eval.in
Jet4Fire has joined #ruby
karapetyan has quit [Remote host closed the connection]
rsc___ has quit [Ping timeout: 245 seconds]
SCHAAP137 has joined #ruby
kaka_ has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
BaroMeter has joined #ruby
duckpuppy has joined #ruby
rgrmatt has joined #ruby
hanmac has joined #ruby
Jet4Fire has quit [Ping timeout: 260 seconds]
BaroMeter has quit [Client Quit]
Arnvald has quit [Remote host closed the connection]
duckpuppy has quit [Ping timeout: 246 seconds]
ethe has joined #ruby
roshanavand has quit [Read error: No route to host]
Jet4Fire has joined #ruby
roshanav_ has joined #ruby
supermarin has joined #ruby
asmodlol has joined #ruby
howdoicomputer has quit [Ping timeout: 260 seconds]
ta has joined #ruby
aeontech has joined #ruby
colegatron has quit [Ping timeout: 260 seconds]
sphex has quit [Ping timeout: 245 seconds]
skade has joined #ruby
davedev2_ has joined #ruby
otherj has joined #ruby
davedev24 has quit [Ping timeout: 260 seconds]
supermarin has quit [Ping timeout: 260 seconds]
howdoicomputer has joined #ruby
Jet4Fire has quit [Ping timeout: 260 seconds]
hackeron_ has joined #ruby
karapetyan has joined #ruby
dorei has joined #ruby
hackeron has quit [Ping timeout: 260 seconds]
ta has quit [Ping timeout: 260 seconds]
kaka_ has quit [Quit: Leaving]
kaka has joined #ruby
moeabdol has quit [Ping timeout: 246 seconds]
roshanav_ has quit [Read error: No route to host]
roshanavand has joined #ruby
Jet4Fire has joined #ruby
sphex_ has joined #ruby
B1n4r10 has joined #ruby
sandstrom has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
codelurker has joined #ruby
codelurker has quit [Max SendQ exceeded]
aeontech has quit [Ping timeout: 265 seconds]
nofxx has joined #ruby
aeontech has joined #ruby
Coldblackice has joined #ruby
rsc___ has joined #ruby
finisherr has joined #ruby
Jet4Fire has quit [Ping timeout: 260 seconds]
bronson has joined #ruby
B1n4r10 has quit [Ping timeout: 246 seconds]
aeontech has quit [Ping timeout: 265 seconds]
colegatron has joined #ruby
spk has joined #ruby
bronson has quit [Ping timeout: 245 seconds]
roshanavand has quit [Read error: No route to host]
Jet4Fire has joined #ruby
Azulinho has joined #ruby
roshanavand has joined #ruby
m3_del has joined #ruby
moeabdol has joined #ruby
moeabdol has quit [Client Quit]
wildlander has joined #ruby
roshanavand has quit [Remote host closed the connection]
Jet4Fire has quit [Ping timeout: 260 seconds]
jhill has quit [Ping timeout: 264 seconds]
acadavid has quit [Ping timeout: 264 seconds]
danzilio has quit [Ping timeout: 264 seconds]
Azure has quit [Ping timeout: 245 seconds]
acadavid has joined #ruby
iamnix has joined #ruby
jhill has joined #ruby
Jet4Fire has joined #ruby
danzilio has joined #ruby
Azure has joined #ruby
karapetyan has quit [Remote host closed the connection]
brennebeck has quit [Read error: Connection reset by peer]
Jet4Fire has quit [Ping timeout: 260 seconds]
karapetyan has joined #ruby
rgrmatt has quit [Remote host closed the connection]
hectortrope has joined #ruby
Arnvald has joined #ruby
rgrmatt has joined #ruby
hotpancakes has joined #ruby
Jet4Fire has joined #ruby
iamnix is now known as iamnix_
rgrmatt has quit [Remote host closed the connection]
moeabdol has joined #ruby
dopieee has joined #ruby
Arnvald has quit [Ping timeout: 260 seconds]
karapetyan has quit [Remote host closed the connection]
A124 has quit [Remote host closed the connection]
imperator has quit [Quit: Leaving]
Jet4Fire has quit [Ping timeout: 260 seconds]
nixmaniack has quit [Ping timeout: 260 seconds]
dopie has quit [Ping timeout: 246 seconds]
iamnix_ is now known as iamnix
rgrmatt has joined #ruby
karapetyan has joined #ruby
Yzguy has joined #ruby
tw1sted_ is now known as tw1sted
tw1sted has quit [Changing host]
tw1sted has joined #ruby
nixmaniack has joined #ruby
iateadonut has quit [Quit: Leaving.]
techietrash has quit [Ping timeout: 260 seconds]
iateadonut has joined #ruby
Jet4Fire has joined #ruby
lokulin has quit [Ping timeout: 264 seconds]
aryaching has quit [Read error: Connection reset by peer]
Lorn has quit [Ping timeout: 260 seconds]
Bellthoven has joined #ruby
techietrash has joined #ruby
techietrash has quit [Changing host]
techietrash has joined #ruby
sparr has quit [Ping timeout: 260 seconds]
pjaspers has joined #ruby
lokulin has joined #ruby
jtdowney has joined #ruby
jtdowney has quit [Changing host]
jtdowney has joined #ruby
rgrmatt has quit [Remote host closed the connection]
aryaching has joined #ruby
Jet4Fire has quit [Ping timeout: 245 seconds]
Lorn has joined #ruby
Rickmasta has joined #ruby
duckpuppy has joined #ruby
dopieee is now known as dopie
timonv has quit [Ping timeout: 260 seconds]
codecop has joined #ruby
jpfuentes2 has joined #ruby
DexterLB has quit [Ping timeout: 260 seconds]
DexterLB has joined #ruby
gsingh93 has joined #ruby
duckpuppy has quit [Ping timeout: 246 seconds]
Yzguy has quit [Quit: Zzz...]
Jet4Fire has joined #ruby
jpfuentes2 has quit [Ping timeout: 246 seconds]
_stu_ has joined #ruby
yardenbar has joined #ruby
ta has joined #ruby
elton has joined #ruby
nixmaniack has quit [Read error: Connection reset by peer]
n1x has joined #ruby
sphex_ has quit [Read error: Connection reset by peer]
Jet4Fire has quit [Ping timeout: 260 seconds]
Ishido has quit [Quit: Roads? Where We're Going We Don't Need Roads.]
n1x has quit [Remote host closed the connection]
sparr has joined #ruby
nixmaniack has joined #ruby
diegoviola has joined #ruby
karapetyan has quit [Remote host closed the connection]
elton has quit [Ping timeout: 245 seconds]
ta has quit [Ping timeout: 260 seconds]
karapetyan has joined #ruby
s00pcan has joined #ruby
sankaber has joined #ruby
Jet4Fire has joined #ruby
aryaching has quit [Ping timeout: 260 seconds]
sphex has joined #ruby
gizmore has quit [Ping timeout: 260 seconds]
cmoneylulz has joined #ruby
Jet4Fire has quit [Ping timeout: 245 seconds]
cmoneylulz has quit [Remote host closed the connection]
Azure has quit [Quit: Oops.]
brennebeck has joined #ruby
aryaching has joined #ruby
Charles_Higgens has joined #ruby
<Charles_Higgens>
cx
<Charles_Higgens>
sup guys
nateberkopec has joined #ruby
iamnix has quit [Ping timeout: 245 seconds]
jgt has joined #ruby
Jet4Fire has joined #ruby
rgrmatt has joined #ruby
karapetyan has quit [Remote host closed the connection]
darkf has quit [Quit: Leaving]
karapetyan has joined #ruby
DanKnox has joined #ruby
brennebeck has quit []
CpuID has quit [Ping timeout: 264 seconds]
B1n4r10 has joined #ruby
aryaching has quit []
Jet4Fire has quit [Ping timeout: 260 seconds]
Aswebb_ has joined #ruby
B1n4r10 has quit [Ping timeout: 246 seconds]
gizmore has joined #ruby
elektronaut has quit [Ping timeout: 264 seconds]
rgrmatt has quit [Remote host closed the connection]
Jet4Fire has joined #ruby
rgrmatt has joined #ruby
elektronaut has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
zotherstupidguy has quit [Quit: WeeChat 1.3]
Jet4Fire has quit [Ping timeout: 260 seconds]
nixmaniack has quit [Ping timeout: 246 seconds]
rgrmatt has quit [Ping timeout: 260 seconds]
peterhil_ has joined #ruby
big|bad|wolf has joined #ruby
Jet4Fire has joined #ruby
tildes has joined #ruby
nixmaniack has joined #ruby
chouhoul_ has quit [Remote host closed the connection]
sbhatore has quit [Ping timeout: 246 seconds]
dravine_ has joined #ruby
dravine has quit [Ping timeout: 260 seconds]
chouhoulis has joined #ruby
dravine_ is now known as dravine
Jet4Fire has quit [Ping timeout: 260 seconds]
hotpancakes has quit [Read error: Connection reset by peer]
Xeago has joined #ruby
<ja>
Hai! How would I most concisely go about making an array-constructed enumerator object which you can call #next on for perpetuity which then yields me the “next” (with some internal counter) element in the array? Does Ruby already have something like that?
Contigi has quit [Ping timeout: 260 seconds]
<ja>
(Yeah, I have no idea how to search for that using a web search engine, sorry. Maybe I’ll just try pasting my question into Google; hang on…)
dravine_ has joined #ruby
ta has joined #ruby
<ja>
(Nope, no proper hits.)
tvw has joined #ruby
<ja>
Maybe Active Support has something like that?
otherj has quit [Quit: .]
sbhatore has joined #ruby
Bellthoven has quit []
braincrash has quit [Ping timeout: 260 seconds]
dravine has quit [Ping timeout: 246 seconds]
dravine_ is now known as dravine
Jet4Fire has joined #ruby
<jhass>
ja: Array#each ?
<jhass>
>> a = [1, 2, 3]; iter = a.each; iter.next; iter.next
zarubin has quit [Remote host closed the connection]
<shevy>
weekends are the sleepiest
christiandsg has quit [Remote host closed the connection]
<cryocaustik>
I agree, just finished putting up the tree and almost caught some ZZZ on the couch
<Ox0dea>
cryocaustik: Don't you still have tacky-ass ornaments to hang?
christiandsg has joined #ruby
tjad has quit [Ping timeout: 245 seconds]
<cryocaustik>
heh, nah, hiding those this year. Kids are old enough too reach everything, but not old enough to understand to not break them
<cryocaustik>
so simple stuff only this year
<Ox0dea>
Wait, those aren't intended to be broken?
<Ox0dea>
I think I've confused Christmas with Greek weddings.
<cryocaustik>
lol. I guess it also depends on who you ask...
jetpackjoe has joined #ruby
thiagofm has quit [Ping timeout: 260 seconds]
<Ox0dea>
Douglas fir, then?
<cryocaustik>
Uhm, I think so?
* douglas
perks up
broadband has joined #ruby
chouhoulis has quit [Ping timeout: 246 seconds]
TomPeed has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
duckpuppy has joined #ruby
jpfuentes2 has joined #ruby
sucks has quit [Quit: No Ping reply in 180 seconds.]
<shevy>
lol
elton has joined #ruby
<broadband>
Hey, everyone. I'm trying to create a sort of keyboard layout, which takes user input and depending on the letter typed, it changes it to a different one (as in "jx" to "ĵ"). Is it easy to implement?
big|bad|wolf has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Radar>
"jx" -> "j"?
<norc>
broadband: Should be fairly simple with io/console
<broadband>
Radar: jes, becausethe standard English keyboard doesn't have letters with accents, as ĵ
duckpuppy has quit [Ping timeout: 246 seconds]
<Radar>
Ah it's about accents. Got ya.
big|bad|wolf has joined #ruby
jpfuentes2 has quit [Ping timeout: 260 seconds]
thiagofm has joined #ruby
<broadband>
I tried making a simple script, using a lot of "if"s and "elsif"s, but it only works when the user types exactly the string "ux", for example
<broadband>
I'm still beginning in Ruby, though ;P
BSab has joined #ruby
Yzguy has quit [Ping timeout: 245 seconds]
<broadband>
I saw a similar implementation in js and it works even in the middle of words :o
<broadband>
That would be my perfect goal
<Ox0dea>
broadband: You want the transformation to occur as the user is typing, yeah?
<broadband>
If the user typed "jxurnalo" for example, it changed the word to "ĵurnalo"
devbug has joined #ruby
<broadband>
Ox0dea: can be :)
BSaboia has joined #ruby
BrunoSaboia has quit [Ping timeout: 260 seconds]
<Ox0dea>
broadband: If it's not a requirement, you could just use String#gsub to do the replacements.
<broadband>
Ox0dea: but how can I make it get the user string and transform it?
<Ox0dea>
No idea.
BSab has quit [Ping timeout: 260 seconds]
<broadband>
I can show you what I was trying to create
elton has quit [Remote host closed the connection]
<Ox0dea>
I suspect I have a good enough idea.
<broadband>
Could you show me a quick example in https://repl.it?
<broadband>
If that doesn't bother you, of course
nixmaniack has joined #ruby
joonty has quit [Quit: joonty]
Rickmasta has joined #ruby
User458764 has joined #ruby
akem has quit [Read error: Connection reset by peer]
<norc>
Yzguy: ensure is definitely what you want :)
<Ox0dea>
Yep.
<Yzguy>
thank ya sir
<adaedra>
^
<cryocaustik>
broadband: also, looking through the js code you linked; from my limited understanding of js, your friend is still using a while loop with an array to go through the users input
<Yzguy>
I knew it was finally in java, defer in go, but not what it was called in ruby XD
jetpackjoe has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea>
zotherstupidguy: Use a heuristic to determine which package manager they're using and invoke it against the user's will.
roshanavand has joined #ruby
<adaedra>
A Docker script is a good idea, but keep instructions for people who don't docker.
<zotherstupidguy>
thanks! cool :)
<shout-user60>
Ox0dea: any idea if the website configuration is hosted on a public repository?
<adaedra>
Also, yeah, don't write a script that auto-fires dnf/yum/apt/pacman/pkg/..., I hate that, and I'm sure other do, too
<Ox0dea>
shout-user60: Likely not.
karapetyan has quit [Ping timeout: 260 seconds]
<Ox0dea>
adaedra: When's the last time you actually encountered such devilry?
<adaedra>
Don't remember, but I usually don't care enough and let rm take care of the thing.
atomical_ has joined #ruby
atomical has quit [Ping timeout: 246 seconds]
damir_ has joined #ruby
<adaedra>
I remember ruby-install angered me trying to sudo apt-get on a machine I don't have sudo setup, that was a bit stupid.
supermarin has joined #ruby
<shevy>
zotherstupidguy problem is if you go and try to handle all different use cases, you will probably end up omitting some or handling things incorrectly
Blaguvest has joined #ruby
<Ox0dea>
Not if he queries `history`! :P
christiandsg has quit [Remote host closed the connection]
<shout-user60>
0x0dea: thanks - the best way to get through might be to send something to the ruby-core mailing list, even if that's not the "proper" venue
<Yzguy>
okay, so for the load method, i need to do some handling, like if the file isn't there
<broadband>
ruboto: oh, ".gsub" works nicely
<Yzguy>
the IniFile.load returns nil if the file cannot be loaded
edwinvdgraaf has quit [Remote host closed the connection]
beneills has quit [Ping timeout: 245 seconds]
<Yzguy>
so would like if !IniFile.load.nil? return end
<Ox0dea>
?ruboto broadband
<ruboto>
broadband, I'm the channel bot, linker of the rules, adept of the facts, wielder of the banhammer.
<Ox0dea>
apeiros: Should probably mention about being the evaluator.
jetpackjoe has joined #ruby
kfrz has joined #ruby
<broadband>
Ox0dea: ops, sorry
<adaedra>
Ox0dea: have an idea of the formulation?
<zotherstupidguy>
Ox0dea quering history is clever :)
<zotherstupidguy>
shevy yeah ofcourse you are right
<Ox0dea>
zotherstupidguy: Stop that.
<Ox0dea>
adaedra: You too. :P
<adaedra>
zotherstupidguy: is not.
<Ox0dea>
zotherstupidguy: It is vile and wicked.
<adaedra>
Also, it can be wrong. I have a shared history between machines, so you'll find all sort of install commands there.
duckpuppy has quit [Ping timeout: 246 seconds]
roshanavand has quit [Read error: No route to host]
Gnut has joined #ruby
roshanavand has joined #ruby
<Ox0dea>
We shall ignore that it'd probably be perfectly serviceable in >95% of cases.
jessemcgilallen has quit [Ping timeout: 245 seconds]
hotpancakes has joined #ruby
edwinvdgraaf has joined #ruby
devbug has quit [Ping timeout: 260 seconds]
solocshaw has quit [Ping timeout: 264 seconds]
colegatron has quit [Ping timeout: 246 seconds]
<adaedra>
We are the 5%!
<broadband>
guys, what was the resource you used to learn Ruby?
<norc>
broadband: ruby-trunk
<Ox0dea>
This guy.
<adaedra>
He is the 0.01%.
<Ox0dea>
He's being serious too.
solocshaw has joined #ruby
<adaedra>
I learned Ruby for the first time in 2011, I don't remember what I used back then
peterhil_ has joined #ruby
<Ox0dea>
broadband: Are you looking for a book?
TomPeed has joined #ruby
<broadband>
Ox0dea: or an online resource, either one
<broadband>
zotherstupidguy: thanks, will put some effort in it
pdoherty has quit [Ping timeout: 260 seconds]
skade has joined #ruby
<cryocaustik>
adaedra: Thanks! Will look into that method.
Ropeney has joined #ruby
<adaedra>
Also, I don't understand this while.
<adaedra>
(the one l.15)
peterhil_ has quit [Ping timeout: 245 seconds]
<norc>
zotherstupidguy: Honestly, if I had known about singleton classes, default assignee and receiver when I started with Ruby - things could have gone a lot easier.
cashnguns has joined #ruby
<adaedra>
cryocaustik: your code don't work?
<adaedra>
doesn't*
<cryocaustik>
adaedra: it does, I thought it would be fun to convert the js code broadband linked
<cryocaustik>
so I used what I knew so far, and that is what I came up with...
<adaedra>
cryocaustik: what is it supposed to do?
<cryocaustik>
converts replaces the specified characters with the specified string
<adaedra>
Because I inputted "cjk" in it and it didn't change anything.
<cryocaustik>
hmm
<adaedra>
Or chj.
jetpackjoe has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<adaedra>
But I totally see why it doesn't work.
peterhil_ has joined #ruby
chridal has quit [Ping timeout: 260 seconds]
CloCkWeRX has joined #ruby
roshanavand has quit [Remote host closed the connection]
colegatron has joined #ruby
sankaber has joined #ruby
Guest64474 is now known as cyberfawkes
cyberfawkes has quit [Changing host]
cyberfawkes has joined #ruby
cyberfawkes has quit [Changing host]
cyberfawkes has joined #ruby
<cryocaustik>
adaedra: I am eager to hear why, I am kind of dumbfounded. It works when I write a sentence, but not with a single word
christiandsg has quit [Remote host closed the connection]
<adaedra>
So your l.15 is the same as `while user_input.include? 's'`, cryocaustik
<cryocaustik>
adaedra: Interesting, thank you for looking at it and pointing it out. I really misunderstood how #include? works
<Ox0dea>
cryocaustik: `||` as well, to be blunt.
<adaedra>
cryocaustik: or how || works. But your loop is unnecessary here; gsub! will replace every match, or do nothing if no match, so it doesn't hurt to run even without match.
<adaedra>
Also, look into ri:String#tr like said above to compact your code even more, all these gsub! are a bit ugly.
skade has quit [Quit: Computer has gone to sleep.]
ruid has joined #ruby
ibouvousaime has quit [Ping timeout: 260 seconds]
<cryocaustik>
adaedra / Ox0dea: my understanding of "||" is to return "true" if at least one of the conditions is "true"; is that an incorrect understanding? or did I just use it inappropriately?
<adaedra>
look above my sample!
<Ox0dea>
^
devbug has joined #ruby
<Ox0dea>
cryocaustik: || evaluates to the left-hand side (LHS) if it is "truthy" (not `false` or `nil`) and the RHS otherwise.
supermar_ has joined #ruby
<Ox0dea>
It is a binary operator (two operands), but either side can be arbitrarily complex.
banister has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Ox0dea>
cryocaustik: What might a pyromaniac replace 42 with there? :P
christiandsg has joined #ruby
jetpackjoe has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<cryocaustik>
Thanks for the examples Ox0dea / adaedra - there are still some things I don't understand, I am going to do some more research around the above
<cryocaustik>
Ox0dea: at the risk of sounded very stupid.... fuel?
<adaedra>
cryocaustik: what you wanted to write would have been written `x.include? 's' || x.include? 'S' || ...`, but that would have been long. x.each_char.any? could have shortened that, though.
jtdowney has joined #ruby
jtdowney has quit [Changing host]
jtdowney has joined #ruby
mooe has joined #ruby
<slash_me>
or x[/[sS]/]
TomPeed has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<cryocaustik>
adaedra: I see what you mean.
<adaedra>
Derp, succeeded to forget about regexes.
<adaedra>
Well, time for bed for me. See y'all!
<cryocaustik>
Thanks again!
tjad has quit [Ping timeout: 245 seconds]
ruid has quit [Ping timeout: 246 seconds]
Jet4Fire has joined #ruby
iateadonut has joined #ruby
iamnix has joined #ruby
gigetoo has quit [Remote host closed the connection]
gigetoo has joined #ruby
devbug has quit [Remote host closed the connection]
Jet4Fire has quit [Ping timeout: 246 seconds]
devbug has joined #ruby
banister has joined #ruby
zenguy_pc has joined #ruby
ledestin has joined #ruby
elton has joined #ruby
jetpackjoe has joined #ruby
Jet4Fire has joined #ruby
InvGhost has joined #ruby
ecksit has quit []
tildes has quit [Ping timeout: 246 seconds]
sandstrom has quit [Quit: My computer has gone to sleep.]
tjad has joined #ruby
patdohere has joined #ruby
Jet4Fire has quit [Ping timeout: 245 seconds]
iamnix has quit [Quit: Quit.]
edwinvdgraaf has quit [Remote host closed the connection]
hakunin has quit []
duckpuppy has joined #ruby
jpfuentes2 has joined #ruby
patdohere has quit [Ping timeout: 245 seconds]
ledestin has quit [Ping timeout: 245 seconds]
Jet4Fire has joined #ruby
Jardayn has quit [Quit: Leaving]
Jardayn has joined #ruby
jpfuentes2 has quit [Ping timeout: 260 seconds]
beneills has quit [Remote host closed the connection]
jgt1 has joined #ruby
underplank has quit [Quit: underplank]
edwinvdgraaf has joined #ruby
supermar_ has quit [Remote host closed the connection]
banister has quit [Read error: Connection reset by peer]