jhass changed the topic of #ruby to: Rules & more: http://ruby-community.com || Ruby 2.3.0; 2.2.4; 2.1.9: https://ruby-lang.org || Paste >3 lines of text on https://gist.github.com || log @ http://irclog.whitequark.org/ruby/
BSaboia has joined #ruby
yfeldblum has joined #ruby
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rcvalle has quit [Quit: rcvalle]
LoneHerm_ has joined #ruby
diegoaguilar has quit [Ping timeout: 252 seconds]
benlieb has joined #ruby
Vile` has joined #ruby
* mwlang deletes loooong question he figured out for himself… :-D
djcp1 has quit [Quit: WeeChat 1.0.1]
speaking1ode has joined #ruby
speakingcode has quit [Disconnected by services]
zeroDivisible has quit [Quit: WeeChat 1.3]
speaking1ode is now known as speakingcode
abyx has quit [Ping timeout: 264 seconds]
<speakingcode> anyone know about issues with installing/compiling 2.1.3 with rvm? keep getting an error uncommon.mk:180: recipe for target 'build-ext' failed
<Radar> speakingcode: Have you tried using ruby-install + chruby instead?
n008f4g_ has quit [Ping timeout: 276 seconds]
<Radar> speakingcode: I've seen people who have had problems with RVM try that combination and then it has worked for them.
marr has quit [Ping timeout: 252 seconds]
FooMunki has quit [Quit: FooMunki]
statelesscode has joined #ruby
FooMunki has joined #ruby
QualityAddict has joined #ruby
<speakingcode> nope, never heard of either of them. so it's an rvm issue perhaps?
<Radar> speakingcode: perhaps
<Ox0dea> speakingcode: Which extension failed to build?
<Gasher> hello
* Ox0dea bets on OpenSSL.
<Gasher> I have a questions about erb - how do you do things like "==yield" or "include" in there? so you have things like head and navbar shared across pages?
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
uglybandersnatch has quit [Ping timeout: 244 seconds]
i_luv_radar has joined #ruby
<i_luv_radar> just me Radar, testing about. Cheers.
<i_luv_radar> Also, boo
uglybandersnatch has joined #ruby
i_luv_radar has quit [Client Quit]
<Radar> Gasher: Is this relating to Rails?
stunder has quit [Ping timeout: 246 seconds]
diegoaguilar has joined #ruby
<Gasher> Radar, any Ruby framework
<Radar> Gasher: Ok. I don't understand the question.
<Gasher> and erb is included with ruby, so it's a legit question for this channel
jdawgaz has joined #ruby
<Gasher> what templating engine did you use Radar ?
<Radar> ERB.
<Radar> The code you wrote is not ERB-ish.
<speakingcode> loks like it's an openssl issue actually but there's a patch
<Radar> I don't know what you mean by "== yield"
Ropeney has joined #ruby
jdawgaz has quit [Client Quit]
ur5us has joined #ruby
pawnbox has joined #ruby
<Gasher> Radar, "==yield" is on Slim
<Radar> [11:13:43] <Gasher>I have a questions about erb -
<Radar> [11:19:04] <Gasher>Radar, "==yield" is on Slim
<Radar> uh huh.
<Radar> And we still haven't got to the real questions yet.
<Gasher> I'm asking for the equivelant with erb
<Gasher> so you have things like head and navbar shared across pages?
<Gasher> real question, there were 2 actually
<Radar> <%= yield %>
<Radar> I don't know what you mean by "include"
<baweaver> partials
safe has joined #ruby
FooMunki has quit [Quit: FooMunki]
<speakingcode> Radar, Ox0dea it was an openssl issue but applying the patch worked, thanks
<Gasher> yes, exactly, partials
LoneHerm_ has quit [Remote host closed the connection]
<Ox0dea> speakingcode: Huzzah! Glad you got it sorted.
pawnbox has quit [Ping timeout: 244 seconds]
hiyosi has joined #ruby
<rehat> is there a way to trigger a ruby script with erb? Like user enters something in a textfield and when they press submit it would trigger a ruby script that would reload the page. Just running it locally not on a server
B1n4r10 has joined #ruby
shinnya has quit [Ping timeout: 264 seconds]
sneakerhax has quit [Ping timeout: 240 seconds]
djbkd has quit [Ping timeout: 276 seconds]
<Radar> >> [[1,2,3,4,5]].any? { |a| a.include?(2) }
<ruby[bot]> Radar: # => true (https://eval.in/545948)
FooMunki has joined #ruby
<smathy> rehat, not with erb, erb is a template language. You could do something with JS.
<smathy> ...not really "trigger a ruby script" though, not without a server, JS is in a sandbox.
djbkd has joined #ruby
<rehat> smathy: ok thanks
rkazak has joined #ruby
B1n4r10 has quit [Ping timeout: 248 seconds]
baweaver is now known as mices
mices is now known as baweaver
misterm__ has quit [Remote host closed the connection]
Aviio has joined #ruby
duckpuppy has joined #ruby
andywojo has joined #ruby
benlieb has quit [Quit: benlieb]
<Gasher> <a href="/upload/<%= image %>">
<Gasher> will that work?
smathy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
preyalone has joined #ruby
rodfersou has joined #ruby
stunder has joined #ruby
ponga has quit []
hxegon has quit [Ping timeout: 276 seconds]
duckpuppy has quit [Ping timeout: 276 seconds]
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sgambino has joined #ruby
<benzrf> well, there *is* opal
<Gasher> what does it have to do with anything?
KensoDev has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
B1n4r10 has joined #ruby
<benzrf> er, i was remarking on rehat's question
<Gasher> ah, ok
<rehat> benzrf: ahh neat, thanks
<Gasher> I'm going, gnight all
Gasher has left #ruby ["Leaving"]
<benzrf> rehat: it's probably not the right solution to what it is you want to do, though
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
cdg has quit [Remote host closed the connection]
maletor has joined #ruby
cdg has joined #ruby
cdg has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 276 seconds]
pawnbox has joined #ruby
Yiota has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
BSaboia has quit [Read error: Connection reset by peer]
BSaboia has joined #ruby
bkxd has joined #ruby
arlek has quit [Ping timeout: 252 seconds]
tomchapin has quit [Quit: Textual IRC Client: www.textualapp.com]
tomchapin has joined #ruby
pawnbox has quit [Ping timeout: 252 seconds]
krz has quit [Ping timeout: 250 seconds]
safe has quit [Read error: Connection reset by peer]
DLSteve has quit [Quit: All rise, the honorable DLSteve has left the channel.]
mistermo_ has quit [Ping timeout: 268 seconds]
RegulationD has joined #ruby
shazaum_ has joined #ruby
Yiota has joined #ruby
dvinciguerra__ has quit [Ping timeout: 248 seconds]
moei has joined #ruby
bkxd has quit [Ping timeout: 244 seconds]
mistermocha has joined #ruby
mbff has joined #ruby
<mbff> Hello! I am getting a strange result when using AMS!
abyx has joined #ruby
RegulationD has quit [Ping timeout: 276 seconds]
<mbff> any idea what is going on here?
x77686d has quit [Quit: x77686d]
tubuliferous_ has quit [Ping timeout: 246 seconds]
dopie has quit [Ping timeout: 260 seconds]
rodfersou has quit [Quit: leaving]
Nawn has joined #ruby
chipotle has joined #ruby
abyx has quit [Quit: This computer has gone to sleep]
<mbff> nevermind, just dumb
B1n4r10 has quit [Ping timeout: 264 seconds]
rmulligan has quit [Ping timeout: 250 seconds]
skweek has joined #ruby
BSaboia has quit [Ping timeout: 240 seconds]
mbff has quit [Quit: Leaving]
Inside_ has quit [Ping timeout: 250 seconds]
bronson has quit [Remote host closed the connection]
maletor has quit [Quit: Computer has gone to sleep.]
cjbottaro has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rmulligan has joined #ruby
phpwebdev has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
hplar has joined #ruby
mikecmpbll has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
hxegon has joined #ruby
benlovell has joined #ruby
_stu_ has joined #ruby
rmulligan has quit [Ping timeout: 268 seconds]
mistermo_ has joined #ruby
hays has joined #ruby
tubuliferous_ has joined #ruby
benlovell has quit [Ping timeout: 248 seconds]
ekinmur has joined #ruby
monoprotic has quit [Excess Flood]
monoprotic has joined #ruby
Nawn has quit [Quit: Leaving]
pawnbox has joined #ruby
baweaver has quit [Remote host closed the connection]
pawnbox has quit [Ping timeout: 250 seconds]
B1n4r10 has joined #ruby
rmulligan has joined #ruby
jt___ has joined #ruby
blackmes1 has quit [Ping timeout: 250 seconds]
duckpuppy has joined #ruby
jt__ has quit [Ping timeout: 244 seconds]
cjbottaro has joined #ruby
MyMind has quit [Max SendQ exceeded]
duckpuppy has quit [Ping timeout: 240 seconds]
MyMind has joined #ruby
chouhoulis has joined #ruby
kies has joined #ruby
skweek has quit [Ping timeout: 248 seconds]
frem has quit [Quit: Connection closed for inactivity]
jt___ has quit [Remote host closed the connection]
rmulligan has quit [Ping timeout: 248 seconds]
tubuliferous_ has quit [Ping timeout: 248 seconds]
sorbo_ has joined #ruby
jdawgaz has joined #ruby
tubuliferous_ has joined #ruby
Spami_ has quit [Quit: This computer has gone to sleep]
rbennacer has joined #ruby
B1n4r10 has quit [Ping timeout: 252 seconds]
FooMunki has quit [Quit: FooMunki]
leon_e has joined #ruby
FooMunki has joined #ruby
saneax is now known as saneax_AFK
tristanp has quit [Read error: Connection reset by peer]
tristanp has joined #ruby
leon_e has quit [Client Quit]
sudo has joined #ruby
sudo is now known as Guest40885
vale_tudo has quit [Ping timeout: 244 seconds]
rmulligan has joined #ruby
Guest40885 has quit [Client Quit]
A124 has quit [Read error: Connection reset by peer]
nando293921 has joined #ruby
FooMunki has quit [Quit: FooMunki]
Digpig has joined #ruby
rmulligan has quit [Ping timeout: 268 seconds]
c355e3b has quit [Quit: Connection closed for inactivity]
A124 has joined #ruby
Yzguy has joined #ruby
_stu_ has quit [Quit: _stu_]
bkxd has joined #ruby
aeterne has joined #ruby
grill has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
chriskeele has joined #ruby
<chriskeele> why is my if statement not working? http://bit.ly/1UGtjGt
ekinmur has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rkazak has quit [Quit: Sleep.....ing....]
bkxd has quit [Ping timeout: 276 seconds]
_stu_ has joined #ruby
ramfjord_ has quit [Ping timeout: 248 seconds]
bronson has joined #ruby
banister has joined #ruby
<banister> anyone here use 'jira' ?
ekinmur has joined #ruby
adminm has joined #ruby
bronson has quit [Ping timeout: 252 seconds]
pawnbox has joined #ruby
misterm__ has joined #ruby
GodFather has quit [Ping timeout: 244 seconds]
<Radar> banister: yes
arescorpio has joined #ruby
<shevy> chriskeele use a sane pastie site
<banister> Radar cool, how do you attach a github PR to a given jira ticket?
tessier-ashpool has quit [Quit: leaving]
<Radar> !ban chriskeele
chriskeele was kicked from #ruby by ruby[bot] [bannable offense, see http://ruby-community.com/pages/user_rules]
josephan has joined #ruby
<Radar> banister: Great question.
josephan has quit [Client Quit]
<Radar> banister: We do it, but I don't know how it's done. Let me look at the things.
ruby-lang324 has joined #ruby
<ruby-lang324> Hello
<banister> in trello it was trivial, but now we're using jira i can't figure out how, and the docs are terrible
<ruby-lang324> I used to have one large file and it's test file counterpart: poker.rb and poker_test.rb
<Radar> banister: We've setup webhooks for https://<our subdomain>.atlassian.net/rest/bitbucket/1.0/repository/64/sync (push events only)
<ruby-lang324> Now I broke up the files for each seperate class and they are all under the poker module
<Radar> banister: Oh, and it's Pull requests, pull request review comment and issue comments too.
<Radar> banister: Your repository number may be different?
<ruby-lang324> I have to require them all in a seperate file is that correct? For example if I want to load all those classes in pry
adminm has left #ruby [#ruby]
mistermo_ has quit [Ping timeout: 276 seconds]
<banister> Radar thanks
pawnbox has quit [Ping timeout: 264 seconds]
uglybandersnatch has quit [Ping timeout: 276 seconds]
hxegon has quit [Quit: BRB]
x77686d has joined #ruby
ruby-lang324 has quit [Ping timeout: 250 seconds]
rubie has quit [Remote host closed the connection]
thai_ has joined #ruby
moeabdol2 has joined #ruby
benlieb has joined #ruby
Eiam_ has joined #ruby
cjbottaro has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
amclain has quit [Quit: Leaving]
rbennacer has quit [Remote host closed the connection]
jackjackdripper has quit [Quit: Leaving.]
bry4n_ has joined #ruby
gregf has joined #ruby
Meow-J has quit [Quit: Connection closed for inactivity]
shazaum__ has joined #ruby
stunder has quit [Ping timeout: 276 seconds]
tubuliferous_ has quit [Ping timeout: 244 seconds]
shazaum_ has quit [Ping timeout: 248 seconds]
Yiota has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tubuliferous_ has joined #ruby
krobzaur has quit [Ping timeout: 248 seconds]
pawnbox has joined #ruby
Devalo has joined #ruby
djbkd has quit [Quit: My people need me...]
diegoaguilar has quit [Remote host closed the connection]
Rickmasta has quit [Read error: Connection reset by peer]
Rickmasta has joined #ruby
_stu_ has quit [Quit: _stu_]
djbkd has joined #ruby
BTRE has quit [Quit: Leaving]
pawnbox has quit [Ping timeout: 244 seconds]
Devalo has quit [Ping timeout: 260 seconds]
rmulligan has joined #ruby
preyalone has quit [Quit: Connection closed for inactivity]
freerobby has joined #ruby
ramfjord has joined #ruby
RegulationD has joined #ruby
djbkd has quit [Ping timeout: 248 seconds]
rmulligan has quit [Ping timeout: 250 seconds]
shazaum__ has quit [Quit: Leaving]
RegulationD has quit [Ping timeout: 240 seconds]
tubuliferous_ has quit [Ping timeout: 268 seconds]
ekinmur has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
G has joined #ruby
braincrash has quit [Quit: bye bye]
statelesscode has quit [Quit: statelesscode]
benlovell has joined #ruby
zast has joined #ruby
ta__ has quit [Remote host closed the connection]
benlovell has quit [Ping timeout: 250 seconds]
BTRE has joined #ruby
uglybandersnatch has joined #ruby
braincrash has joined #ruby
Yiota has joined #ruby
Yiota has quit [Client Quit]
stunder has joined #ruby
krobzaur has joined #ruby
tercenya has quit []
davedev24 has quit []
IrishGringo has joined #ruby
stunder has quit [Ping timeout: 244 seconds]
marcdel has joined #ruby
Yiota has joined #ruby
Dimik has joined #ruby
chipotle has quit [Ping timeout: 240 seconds]
baweaver has joined #ruby
blackgoat has quit [Ping timeout: 252 seconds]
Aviio has quit [Remote host closed the connection]
gix- has quit [Ping timeout: 276 seconds]
benlieb has quit [Quit: benlieb]
triangles has joined #ruby
duckpuppy has joined #ruby
Aviio has joined #ruby
Aviio has quit [Remote host closed the connection]
gix has joined #ruby
fedexo has joined #ruby
Aviio has joined #ruby
pawnbox has joined #ruby
grill has joined #ruby
bkxd has joined #ruby
finisherr has joined #ruby
duckpuppy has quit [Ping timeout: 276 seconds]
benlieb has joined #ruby
benlieb has quit [Client Quit]
chipotle has joined #ruby
stunder has joined #ruby
pawnbox has quit [Ping timeout: 244 seconds]
stunder has quit [Client Quit]
jdawgaz has quit [Ping timeout: 252 seconds]
bkxd has quit [Ping timeout: 248 seconds]
benlieb has joined #ruby
Don_John has quit [Read error: Connection reset by peer]
rmulligan has joined #ruby
chipotle has quit [Max SendQ exceeded]
hahuang61 has joined #ruby
cdg has joined #ruby
chipotle has joined #ruby
hahuang65 has quit [Ping timeout: 248 seconds]
Inside has joined #ruby
Inside has joined #ruby
yfeldblum has quit [Remote host closed the connection]
Aviio has quit [Remote host closed the connection]
Meow-J has joined #ruby
rmulligan has quit [Ping timeout: 264 seconds]
drewo has quit [Ping timeout: 260 seconds]
djbkd has joined #ruby
codecop has joined #ruby
cdg has quit [Ping timeout: 268 seconds]
pawnbox has joined #ruby
Vile` has quit [Ping timeout: 260 seconds]
djbkd has quit [Ping timeout: 244 seconds]
chipotle has quit [Max SendQ exceeded]
diegoviola has quit [Quit: WeeChat 1.4]
Yzguy has quit [Quit: Zzz...]
hk238 has joined #ruby
Yzguy has joined #ruby
Yiota has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
uglybandersnatch has quit [Ping timeout: 252 seconds]
x77686d has quit [Quit: x77686d]
tercenya has joined #ruby
misterm__ has quit [Remote host closed the connection]
ta_ has joined #ruby
Chagel has joined #ruby
hinbody has joined #ruby
bluOxigen has joined #ruby
bronson has joined #ruby
freerobby has quit [Quit: Leaving.]
uglybandersnatch has joined #ruby
mistermo_ has joined #ruby
bronson has quit [Ping timeout: 252 seconds]
kobain has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
Renich has joined #ruby
Suntzu has quit [Read error: Connection reset by peer]
mistermo_ has quit [Ping timeout: 244 seconds]
tubuliferous_ has joined #ruby
ta_ has quit [Ping timeout: 246 seconds]
solocshaw has quit [Ping timeout: 244 seconds]
P4Titan has quit [Ping timeout: 240 seconds]
karioleez has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
poguez_ has quit [Quit: Connection closed for inactivity]
hxegon has joined #ruby
rmulligan has joined #ruby
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
uglybandersnatch has quit [Ping timeout: 268 seconds]
drewo has joined #ruby
Aviio has joined #ruby
abyx has joined #ruby
Suntzu has joined #ruby
Asher has joined #ruby
Digpig has quit [Quit: Konversation terminated!]
tubuliferous_ has quit [Ping timeout: 276 seconds]
marcdel has quit [Ping timeout: 248 seconds]
djbkd has joined #ruby
Aviio has quit [Read error: Connection reset by peer]
merida has joined #ruby
duncannz has joined #ruby
benlovell has joined #ruby
jt__ has joined #ruby
Digpig has joined #ruby
marcdel has joined #ruby
ICantCook has joined #ruby
mistermo_ has joined #ruby
djbkd has quit [Ping timeout: 244 seconds]
grill has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
alexherbo2 has quit [Ping timeout: 244 seconds]
benlovell has quit [Ping timeout: 260 seconds]
mistermo_ has quit [Ping timeout: 250 seconds]
jt__ has quit [Ping timeout: 276 seconds]
claw has quit [Ping timeout: 260 seconds]
yfeldblum has joined #ruby
triangles2 has joined #ruby
G has quit [Quit: leaving]
torandu has quit [Quit: leaving]
torandu has joined #ruby
sauvin has joined #ruby
triangles has quit [Ping timeout: 252 seconds]
Aviio has joined #ruby
torandu has quit [Client Quit]
<Aviio> Morning folks
bkxd has joined #ruby
torandu has joined #ruby
saneax_AFK is now known as saneax
<Yzguy> so for something like
<Yzguy> if running_instances.empty?
<Yzguy> if i want to negate it, the only way is !running_instances.empty? correct
<Yzguy> nothing like if not running_instances.empty?
<Ox0dea> Yzguy: Use `unless`.
sauvin has quit [Remote host closed the connection]
<Yzguy> oo
<Yzguy> i dig it
<Ox0dea> Ruby loves you. :)
<Aviio> I found that hard to read at first
<Yzguy> i guess I'd say I'm still pretty beginner to ruby
<Yzguy> like i can write ruby in a procedural manner but haven't done much more than scripts
<Aviio> Its real fun to learn
<Yzguy> I love it
<Yzguy> my buddy is against it, he's all "I'm only doing python and go"
bry4n_ has quit [Ping timeout: 246 seconds]
<Aviio> I only started a few months ago, actually preferring it to my day job which is .net
<Yzguy> except the company we work for, mostly is ruby
<Yzguy> for internal stuff
<Aviio> damn
<Aviio> I wish we could do ruby @ work
<Yzguy> New Relic haha
<Yzguy> so its all languages
p0p0pr37 has quit [Ping timeout: 252 seconds]
bkxd has quit [Ping timeout: 246 seconds]
jt__ has joined #ruby
<Yzguy> cuz that's what our product monitors
sauvin has joined #ruby
abyx has quit [Quit: This computer has gone to sleep]
<baweaver> we use Ruby for most ops over here
codecop has quit [Remote host closed the connection]
<Aviio> Heres one for you guys - im trying to automate the wordpress installation (https://github.com/WordPress/WordPress/blob/master/wp-admin/install.php), using curl.. so far ive got 'curl -d "weblog_title=testTitle&user_name=testUser&admin_password=carhorsebatterystaple&admin_password2=carhorsebatterystaple&admin_email=test@testserver.test&blog_public=0" http://127.0.0.1/wordpress/wp-admin/install.php' but this just returns me some
hxegon has quit [Quit: BRB]
ta_ has joined #ruby
Emmanuel_Chanel has joined #ruby
arescorpio has quit [Remote host closed the connection]
nanoz has joined #ruby
Devalo has joined #ruby
uglybandersnatch has joined #ruby
sigurding has joined #ruby
<Radar> how is this Ruby related
Xiti has quit [Quit: Xiti]
<Aviio> It really isnt
<Radar> Ok, please go ask in #wordpress?
Inside has quit [Ping timeout: 248 seconds]
karioleez has quit [Remote host closed the connection]
sorbo_ has quit []
zast has quit [Remote host closed the connection]
noService has quit [Ping timeout: 246 seconds]
moeabdol2 has quit [Quit: WeeChat 1.4]
aganov has joined #ruby
hahuang61 has quit [Ping timeout: 264 seconds]
duckpuppy has joined #ruby
howdoi has joined #ruby
Digpig has quit [Remote host closed the connection]
chouhoulis has quit [Remote host closed the connection]
Digpig has joined #ruby
mistermo_ has joined #ruby
Mia has quit [Read error: Connection reset by peer]
duckpuppy has quit [Ping timeout: 252 seconds]
hahuang61 has joined #ruby
norc has joined #ruby
norc has quit [Changing host]
norc has joined #ruby
norc has joined #ruby
pawnbox has quit [Remote host closed the connection]
mistermo_ has quit [Ping timeout: 250 seconds]
<Yzguy> this is what i was working on
<Yzguy> just a quick "turn all instances off except these ones" script
sigurding has quit [Quit: sigurding]
Aviio has left #ruby [#ruby]
Eiam_ has quit [Quit: ╯°□°)╯︵ǝpouǝǝɹɟ]
Renich has quit [Quit: leaving]
solars has joined #ruby
Aviio has joined #ruby
moeabdol has joined #ruby
hiyosi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Aviio has quit [Remote host closed the connection]
Aviio has joined #ruby
djbkd has joined #ruby
Aviio has quit [Remote host closed the connection]
skade has joined #ruby
moeabdol1 has joined #ruby
moeabdol has quit [Ping timeout: 264 seconds]
djbkd has quit [Ping timeout: 250 seconds]
aufi has joined #ruby
Aviio has joined #ruby
ur5us has quit [Remote host closed the connection]
fedexo has quit [Ping timeout: 250 seconds]
pawnbox has joined #ruby
rkazak has joined #ruby
karioleez has joined #ruby
karioleez has quit [Remote host closed the connection]
karioleez has joined #ruby
webus has joined #ruby
joonty has joined #ruby
<baweaver> Yzguy: running_instances = resp.instance_status.select { |i| i.instance_state.name == 'running' }.map(&:instance_id) - instances_to_skip
joonty has quit [Client Quit]
<baweaver> select the running instances, transform it to a list of instance ids, subtract your skip list
sudoubuntu has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
solars has quit [Quit: WeeChat 0.4.2]
solars has joined #ruby
aeterne has quit [Read error: Connection reset by peer]
noService has joined #ruby
Cohedrin_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
benlieb has quit [Quit: benlieb]
Devalo has quit [Remote host closed the connection]
abyx has joined #ruby
Yzguy has quit [Quit: Zzz...]
bronson has joined #ruby
blackms has quit [Ping timeout: 264 seconds]
rkazak has quit [Quit: Sleep.....ing....]
abyx has quit [Client Quit]
noService has quit [Ping timeout: 246 seconds]
ramfjord has quit [Ping timeout: 248 seconds]
uglybandersnatch has quit [Ping timeout: 246 seconds]
pawnbox has quit [Remote host closed the connection]
abyx has joined #ruby
pawnbox has joined #ruby
noService has joined #ruby
bronson has quit [Ping timeout: 252 seconds]
uglybandersnatch has joined #ruby
abyx has quit [Client Quit]
uglybandersnatch has quit [Ping timeout: 264 seconds]
nando293921 has quit [Quit: Lost terminal]
mistermo_ has joined #ruby
Aviio has quit [Remote host closed the connection]
nando293921 has joined #ruby
nando293921 has quit [Client Quit]
shmuli has joined #ruby
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
MyMind has quit [Ping timeout: 268 seconds]
nando293921 has joined #ruby
haraoka has joined #ruby
last_staff has joined #ruby
mistermo_ has quit [Ping timeout: 248 seconds]
tvw has joined #ruby
tvw has quit [Client Quit]
tvw has joined #ruby
nando293921 has quit [Read error: Connection reset by peer]
nando293921 has joined #ruby
andikr has joined #ruby
CausaMortis has joined #ruby
AnoHito_ has joined #ruby
kollex has joined #ruby
bigkevmcd has joined #ruby
polysics has joined #ruby
polysics has quit [Remote host closed the connection]
polysics has joined #ruby
CausaMortis_ has joined #ruby
IrishGringo has quit [Ping timeout: 246 seconds]
AnoHito has quit [Ping timeout: 252 seconds]
chouhoulis has joined #ruby
CausaMortis has quit [Ping timeout: 260 seconds]
Eiam_ has joined #ruby
ur5us has joined #ruby
benlovell has joined #ruby
chouhoulis has quit [Ping timeout: 250 seconds]
edwinvdgraaf has quit [Remote host closed the connection]
Xeago has joined #ruby
ur5us has quit [Remote host closed the connection]
pawnbox has quit [Read error: Connection reset by peer]
pawnbox has joined #ruby
nanoz has quit [Ping timeout: 276 seconds]
choke has joined #ruby
vikaton has quit [Quit: Connection closed for inactivity]
qhp has joined #ruby
nando293921 has quit [Quit: Lost terminal]
jackjackdripper has joined #ruby
Xeago has quit [Ping timeout: 244 seconds]
nando293921 has joined #ruby
benlovell has quit [Ping timeout: 276 seconds]
<norc> Hi, I have written a small module that brings AR association semantics to regular classes (providing for #foo, #foo=, #foo_id, #foo_id= accessor methods). I seem to have found myself in a circlejerk for writing specs for this.
sandstrom has joined #ruby
<norc> I cannot sensibly test a reader without invoking a writer or the other way around.
<apeiros> then don't. test them in tandem.
<apeiros> unless you want to do whitebox testing. then you can test it by using rubys reflection capabilities.
djbkd has joined #ruby
johnbat26 has joined #ruby
nikger has joined #ruby
sergey_makagon has joined #ruby
CausaMortis_ is now known as CausaMortis
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
DoubleMalt has joined #ruby
claw has joined #ruby
djbkd has quit [Ping timeout: 244 seconds]
biberu has joined #ruby
<norc> apeiros: Okay guess it makes sense to test them in tandem. Not sure what you meant by testing it by using reflection though.
<apeiros> I assume the accessor methods change something within the object
ericlee has joined #ruby
<norc> Indeed. I have some internal hashes to keep track of things and caching.
<apeiros> and with whitebox-testing, you'd read that internal state. e.g. using instance_variable_get
<norc> Ah.
<norc> Okay I understand what you mean.
Dimik has quit [Ping timeout: 244 seconds]
mark2 has joined #ruby
michael_mbp has quit [Quit: ZNC - http://znc.sourceforge.net]
AlexJakeGreen has joined #ruby
claw has quit [Ping timeout: 244 seconds]
bruce_lee has joined #ruby
bruce_lee has joined #ruby
bkxd has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
sandstrom has quit [Quit: My computer has gone to sleep.]
ur5us has joined #ruby
claw has joined #ruby
bkxd has quit [Ping timeout: 248 seconds]
AlexJakeGreen has quit [Remote host closed the connection]
Asher has quit [Quit: Leaving.]
baweaver has quit [Remote host closed the connection]
Couch has joined #ruby
claw has quit [Ping timeout: 246 seconds]
dn` has joined #ruby
drewo has quit [Ping timeout: 248 seconds]
terlar has joined #ruby
duncannz has quit [Ping timeout: 260 seconds]
marcdel has quit [Ping timeout: 276 seconds]
claw has joined #ruby
krz has joined #ruby
triangles2 is now known as triangles
harryk has quit [Quit: leaving]
sandstrom has joined #ruby
pandaant has joined #ruby
Xeago has joined #ruby
merida has quit [Remote host closed the connection]
merida has joined #ruby
jt__ has quit [Remote host closed the connection]
nikger has quit [K-Lined]
djbkd has joined #ruby
mr_oh has joined #ruby
dn` has quit [Quit: dn`]
vondruch has joined #ruby
dc4 has joined #ruby
duckpuppy has joined #ruby
mrgrieves has joined #ruby
<mr_oh> :(
ur5us has quit [Remote host closed the connection]
<Ox0dea> You broke your screen, innit?
chouhoulis has joined #ruby
noService has quit [Ping timeout: 246 seconds]
duckpuppy has quit [Ping timeout: 268 seconds]
dionysus69 has joined #ruby
Sembei has joined #ruby
sigurding has joined #ruby
<mr_oh> Screen is good
chouhoulis has quit [Ping timeout: 244 seconds]
hinbody has quit [Ping timeout: 248 seconds]
bkxd has joined #ruby
abyx has joined #ruby
quazimodo has quit [Ping timeout: 244 seconds]
rmulligan has quit [Ping timeout: 246 seconds]
anisha has joined #ruby
ericlee has quit [Ping timeout: 250 seconds]
noService has joined #ruby
<Ox0dea> And, so, but, then, well, why the 0x5adface?
<norc> Ox0dea: So ever since I have started writing my own compiler for a subset of C, I began to realise the uglificationess of the MRI lexer/parser...
<norc> The lexer is pure magic.
<Ox0dea> norc: But... parser combinators.
<mr_oh> No one was typing
edwinvdgraaf has joined #ruby
<adaedra> HELLO
finisherr has quit [Quit: finisherr]
<norc> Meh.
<norc> adaedra: I wish you the best of luck fixing your capslock key.
<norc> Hello on that note.
<adaedra> Fun fact: my caps lock key produces '\'.
<apeiros> that's indeed more useful than what it normally does
Xeago has quit [Ping timeout: 248 seconds]
Dreamer3 has quit [Read error: Connection reset by peer]
<norc> Indeed, it is probably the one key I practically never use on my keyboard. Remapping it to \ might actually be sensible on this damn apple keyboard.
Dreamer3 has joined #ruby
* manveru always remaps caps to ctrl
jt__ has joined #ruby
djbkd_ has joined #ruby
uglybandersnatch has joined #ruby
<mr_oh> I bought an old(er) used thinkpad. Keyboard is epic except no separate num pad.
<norc> Mm, that does not seem very trustworthy.
abyx has quit [Quit: This computer has gone to sleep]
PaulCapestany has joined #ruby
<norc> I just bought a unicomp keyboard for my home computer, because I was getting sick of having no Windows button on my IBM Model M. :-)
moeabdol1 has quit [Ping timeout: 244 seconds]
<mr_oh> :-)
GitGud has quit [Quit: You're gonna carry that weight...]
<mr_oh> windows won't run on this p.c. convertible!
djbkd_ has quit [Ping timeout: 250 seconds]
sepp2k has joined #ruby
PaulCape_ has quit [Ping timeout: 276 seconds]
ericlee has joined #ruby
mikecmpbll has joined #ruby
moeabdol1 has joined #ruby
<mr_oh> craving french fries...
sigurding has quit [Quit: sigurding]
skade has joined #ruby
uglybandersnatch has quit [Ping timeout: 250 seconds]
elaptics`away is now known as elaptics
nando293921 has quit [Ping timeout: 244 seconds]
jenrzzz has quit [Ping timeout: 264 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
<adaedra> TMI.
jenrzzz has quit [Ping timeout: 250 seconds]
tvw has quit [Remote host closed the connection]
uniqm has joined #ruby
baweaver has joined #ruby
Xeago has joined #ruby
quazimodo has joined #ruby
uniqm has left #ruby [#ruby]
dionysus69 has quit [Ping timeout: 248 seconds]
shmuli has quit [Remote host closed the connection]
bronson has joined #ruby
Xeago has quit [Remote host closed the connection]
Xeago has joined #ruby
jaruga_ has joined #ruby
baweaver has quit [Ping timeout: 250 seconds]
pawnbox has quit [Remote host closed the connection]
shmuli has joined #ruby
pawnbox has joined #ruby
dn` has joined #ruby
mrgrieves has quit [Ping timeout: 260 seconds]
quazimodo has quit [Read error: Connection reset by peer]
bronson has quit [Ping timeout: 252 seconds]
norc_ has joined #ruby
norc_ has quit [Client Quit]
ferr has joined #ruby
PaulCape_ has joined #ruby
Spami has joined #ruby
shmuli has quit [Remote host closed the connection]
Ropeney has joined #ruby
PaulCapestany has quit [Ping timeout: 250 seconds]
krz has quit [Read error: Connection reset by peer]
AimlessRaven has joined #ruby
<AimlessRaven> hi all, i have 1 question
Emmanuel_Chanel_ has joined #ruby
Emmanuel_Chanel_ has quit [Client Quit]
<AimlessRaven> https://gist.github.com/anonymous/b2e1f87a34ea255160cd1c2c390bcb2c here is my code i always select my second product prices
<AimlessRaven> but if product have 1 price
<AimlessRaven> i want this price is be selected
Emmanuel_Chanel has quit [Ping timeout: 276 seconds]
ferr has quit [Quit: WeeChat 1.4]
marr has joined #ruby
Chagel has quit [Ping timeout: 240 seconds]
<norc> AimlessRaven: I would use the decorator pattern to elegantly solve this.
<norc> AimlessRaven: Also it is not a wise choice to have any business logic in your views. Make it so that your views get complete collections.
<norc> As opposed to having sql fragments in your views.
Emmanuel_Chanel has joined #ruby
shmuli has joined #ruby
Spami_ has joined #ruby
<norc> So in short: Have your controller prepare the collection, ordering it the way you want it, wrap it inside a decorator which then provides some utility method that gives you the index of the pre-selected price.
<AimlessRaven> norc oks
ruby-lang220 has joined #ruby
<AimlessRaven> but in code how would be looks like
Spami has quit [Ping timeout: 260 seconds]
rmulligan has joined #ruby
AimlessRaven has quit [Quit: Page closed]
<apeiros> hm, too late for ?crosspost
Spami has joined #ruby
<apeiros> they left somebody on #rubyonrails hanging on a follow-up question and instead cross-posted here. pondering to ban.
sepp2k has quit [Ping timeout: 240 seconds]
shmuli has quit [Remote host closed the connection]
SCHAAP137 has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
Spami_ has quit [Ping timeout: 260 seconds]
chouhoulis has joined #ruby
evidex has joined #ruby
rmulligan has quit [Ping timeout: 268 seconds]
jenrzzz has quit [Ping timeout: 264 seconds]
Ormm has quit [Quit: Nettalk6 - www.ntalk.de]
qhp has quit [Read error: Connection reset by peer]
chouhoulis has quit [Ping timeout: 260 seconds]
benlovell has joined #ruby
ferr has joined #ruby
qhp has joined #ruby
johnbat26 has quit [Remote host closed the connection]
marr has quit [Read error: Connection reset by peer]
marr has joined #ruby
staticfox has quit [Quit: ZNC - http://znc.in]
vale_tudo has joined #ruby
staticfox has joined #ruby
hays has quit [Quit: No Ping reply in 180 seconds.]
GitGud has joined #ruby
jt__ has quit [Read error: Connection reset by peer]
drbrain has quit [Ping timeout: 252 seconds]
hays has joined #ruby
drbrain has joined #ruby
jt__ has joined #ruby
Veejay has quit [Ping timeout: 252 seconds]
PaulCapestany has joined #ruby
benlovell has quit [Ping timeout: 248 seconds]
sepp2k has joined #ruby
sepp2k has quit [Client Quit]
PaulCape_ has quit [Ping timeout: 244 seconds]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
vale_tudo has quit [Ping timeout: 244 seconds]
skislak has joined #ruby
djbkd_ has joined #ruby
bruce_lee has quit [Ping timeout: 248 seconds]
RegulationD has joined #ruby
bruce_lee has joined #ruby
djbkd_ has quit [Ping timeout: 240 seconds]
Mon_Ouie has quit [Quit: WeeChat 1.4]
RegulationD has quit [Ping timeout: 244 seconds]
Suntzu has quit [Quit: changing servers]
bkxd has quit [Ping timeout: 244 seconds]
rsc___ has joined #ruby
ur5us has joined #ruby
cpup has quit [Ping timeout: 250 seconds]
Snowy has joined #ruby
madgen has quit [Ping timeout: 246 seconds]
cpup has joined #ruby
Keltia_ is now known as Keltia
platzhirsch has joined #ruby
daivyk has quit [Ping timeout: 248 seconds]
djbkd has quit [Quit: My people need me...]
polll has joined #ruby
quazimodo has joined #ruby
PaulCape_ has joined #ruby
chihhsin has joined #ruby
GriffinHeart has joined #ruby
mr_oh has quit [Quit: Page closed]
Xeago has quit [Remote host closed the connection]
Zai00 has joined #ruby
Xeago has joined #ruby
Xeago has quit [Remote host closed the connection]
Xeago has joined #ruby
ruby-lang220 has quit [Quit: Page closed]
PaulCapestany has quit [Ping timeout: 276 seconds]
krobzaur has quit [Ping timeout: 260 seconds]
<Ox0dea> $ gem install cant_even
CloCkWeRX has quit [Ping timeout: 248 seconds]
<apeiros> $ gem install can_odd
Chagel has joined #ruby
patrick_star_3 has joined #ruby
Suntzu has joined #ruby
blackmes1 has joined #ruby
rmulligan has joined #ruby
Xeago has quit [Remote host closed the connection]
f4cl3y has quit [Quit: Leaving]
patrick_star_2 has quit [Ping timeout: 260 seconds]
polll has quit []
rmulligan has quit [Ping timeout: 250 seconds]
Guest51156 has joined #ruby
Xeago has joined #ruby
qhp has quit [Read error: Connection reset by peer]
Xeago has quit [Remote host closed the connection]
duckpuppy has joined #ruby
GitGud has quit [Quit: You're gonna carry that weight...]
qhp has joined #ruby
CloCkWeRX has joined #ruby
mikecmpbll has quit [Read error: Connection reset by peer]
GitGud has joined #ruby
Xeago has joined #ruby
jt__ has quit [Remote host closed the connection]
nobitanobi has joined #ruby
mikecmpbll has joined #ruby
duckpuppy has quit [Ping timeout: 260 seconds]
sandstrom has quit [Quit: My computer has gone to sleep.]
chouhoulis has joined #ruby
nanoz has joined #ruby
Spami has quit [Read error: Connection reset by peer]
merida has quit [Remote host closed the connection]
mosez has joined #ruby
PaulCapestany has joined #ruby
Spami has joined #ruby
merida has joined #ruby
DuneMan has joined #ruby
Es0teric has joined #ruby
PaulCape_ has quit [Ping timeout: 250 seconds]
chouhoulis has quit [Ping timeout: 244 seconds]
nanoz has quit [Ping timeout: 252 seconds]
madgen has joined #ruby
zeroDivisible has joined #ruby
TvL2386 has joined #ruby
yfeldblum has quit [Remote host closed the connection]
krobzaur has joined #ruby
triangles2 has joined #ruby
triangles2 has quit [Max SendQ exceeded]
triangles2 has joined #ruby
triangles2 has quit [Max SendQ exceeded]
pawnbox has quit [Remote host closed the connection]
triangles2 has joined #ruby
pawnbox has joined #ruby
binaryplease1 has joined #ruby
triangles2 has quit [Max SendQ exceeded]
Es0teric has quit [Quit: Computer has gone to sleep.]
triangles2 has joined #ruby
triangles has quit [Ping timeout: 276 seconds]
triangles2 has quit [Max SendQ exceeded]
triangles2 has joined #ruby
triangles2 has quit [Max SendQ exceeded]
binaryplease has quit [Ping timeout: 240 seconds]
roelof has joined #ruby
<roelof> Hello, Anyone a tip how I can capitalize this : the Bridge over the river kwai to this : The Bridge over the River Kwai
<roelof> Expecially about the dubble the
Es0teric has joined #ruby
<roelof> one time it has to be capitalized and another time not
nanoz has joined #ruby
FooMunki has joined #ruby
lxsameer has joined #ruby
chrisjohnson has joined #ruby
<chrisjohnson> my code isn't working http://j.gs/7c5u
Xeago has quit [Remote host closed the connection]
binaryplease1 is now known as binaryplease
<roelof> chrisjohnson: why not use th gist.github link ?
<chrisjohnson> i don't like using github becuse i use my real name on there and i don't want people to know me who i am on irc because of security reasons
<roelof> oke, but the link you use , you first see a lot of advertising and I do not think people will help you
Antiarc_ has quit [Quit: No Ping reply in 180 seconds.]
<roelof> chrisjohnson: you can also use lpaste or another pastebin
<manveru> yeah, gave up after it complained about my adblocker :P
QualityAddict has quit [Ping timeout: 246 seconds]
QualityAddict has joined #ruby
Antiarc has joined #ruby
<roelof> I have this : https://gist.github.com/rwobben/63ff6a68da3858d30c4fd005ed75feaa but then both the are not capitalized. Is there a better way ?
millerti has joined #ruby
ur5us has quit [Remote host closed the connection]
PaulCape_ has joined #ruby
scepticulous has joined #ruby
PaulCapestany has quit [Ping timeout: 248 seconds]
BLuEGoD has joined #ruby
ur5us has joined #ruby
yfeldblum has joined #ruby
skydiver has quit [Quit: WeeChat 1.4]
chrisjohnson has quit []
<roelof> oke, this is working but it feels like double work : https://gist.github.com/rwobben/754220ff20741b00cd896ec72ebff210
<roelof> can I somehow improve it
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
DuneMan has quit [Quit: Textual IRC Client: www.textualapp.com]
baweaver has joined #ruby
Coldblackice_ has quit [Ping timeout: 240 seconds]
Coldblackice_ has joined #ruby
bronson has joined #ruby
baweaver has quit [Ping timeout: 248 seconds]
<workmad3> roelof: `ignore_list = %w(and or the); word.split.map{ |word| ignore_list.include?(word) ? word : word.capitalize }` for starters
hk238 has quit [Quit: http://www.kvirc.net/ 4.9.1 Aria]
kollex has left #ruby [#ruby]
nfk has joined #ruby
<roelof> workmad3: expected: "The Bridge over the River Kwai" got: "the Bridge Over the River Kwai"
bronson has quit [Ping timeout: 252 seconds]
<workmad3> roelof: if you notice, I only addressed the first line, not the second (where you're ensuring word 1 is capitalized)
<workmad3> roelof: i.e. don't just copy-paste, spend some time understanding
<roelof> workmad3: the first "the" must be capitalized. the second not
<roelof> of course, I try to understand
<workmad3> roelof: then can you see that I didn't write a complete replacement?
<roelof> the problem is when I have one word like jaws it is already capitalized, so the second do not have to work
<roelof> I was hoping there is a solution that does not have to work with 2 lines ?
<gregf_> roelof: what workmad3's suggested is something you can build on?
platzhirsch has quit [Quit: Leaving.]
<gregf_> presumably they're trying to test your logical abilities and not use of functions/methods?
<roelof> nope, I do not see how I can capitalize the first "then" but not the second one
<roelof> I could capitalize the first one but then I have to make a iterate that begins at the second word
<gregf_> roelof: fair enough. thats logic very *specific* to what you want. perhaps, so that you can get your logic right :)
GriffinHeart has quit [Remote host closed the connection]
<roelof> both cases I can not find a solution for
<roelof> each or map looks to start from the beginning
<roelof> gregf_: so Im stuck in my mind how to handle this :(
rsc___ has quit [Ping timeout: 264 seconds]
<gregf_> >> str = "the Bridge over the river kwai";ignore_list = [ %r{\s+the}, %r{^[A-Z]} , %r{over} ]; p str.split.map{ |s| ignore_list.select {|i| s =~ i }.size > 0 ? s : s.capitalize }.join(" ") # roelof: run that and go away happy now
<ruby[bot]> gregf_: # => "The Bridge over The River Kwai" ...check link for more (https://eval.in/546111)
<roelof> or can I do something like this : answer.slice(0,1).capitalize + answer.slice(1..-1) if word.length > 1 so the second line only works if there are more words
rsc___ has joined #ruby
the_drow has joined #ruby
PaulCapestany has joined #ruby
codecop has joined #ruby
sphex_ has joined #ruby
FooMunki has quit [Quit: FooMunki]
<Ox0dea> &ri #with_index roelof
PaulCape_ has quit [Ping timeout: 246 seconds]
noService has quit [Ping timeout: 246 seconds]
<Ox0dea> You want to treat index 0 specially.
FooMunki has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
<roelof> gregf_: why does this not work : %r{\s+and}
sphex has quit [Read error: Connection reset by peer]
<gregf_> er, prolly you need anchors?
<gregf_> but that said, are you familiar with regular expressions?
<Ox0dea> Blech.
<roelof> gregf_: a little bit
Chagel has quit [Ping timeout: 260 seconds]
<gregf_> >> ["and", " and"].select{ |w| w =~ %r{\A\s+and\z} }
<ruby[bot]> gregf_: # => [" and"] (https://eval.in/546120)
<gregf_> roelof: ^^se
<roelof> I changed to this : ignore_list = [ %r{\s+the}, %r{over}, %r{\s+and}] and the and is still uppercase :(
chouhoulis has joined #ruby
wethu has quit [Quit: Leaving]
bulletxt has joined #ruby
<apeiros> >> "the Bridge".split # roelof
<ruby[bot]> apeiros: # => ["the", "Bridge"] (https://eval.in/546122)
<apeiros> oh
<apeiros> wait
<apeiros> misremembered the default for split. ignore :)
bulletxt has left #ruby ["Once you know what it is you want to be true, instinct is a very useful device for enabling you to know that it is"]
c355e3b has joined #ruby
chouhoulis has quit [Ping timeout: 244 seconds]
joonty has joined #ruby
<Ox0dea> roelof: https://eval.in/546125
<apeiros> >> "War and Peace".split
<ruby[bot]> apeiros: # => ["War", "and", "Peace"] (https://eval.in/546126)
<gregf_> roelof: ah - i see.. yeah, that wont work. the 'spaces' dissapear :|. its far more simpler . but.. meh
<apeiros> roelof: tell me what %{\s+and} matches in words
<roelof> a space and then the word and
<apeiros> roelof: does that occur in that array?
<roelof> oke, I will try without the /s
<apeiros> why do you use regex at all btw.?
<Ox0dea> Because gregf_. :(
<roelof> when I change it to this : ignore_list = [ %r{\s+the}, %r{over}, %r{and}] the "and" is still in uppercase even if it's in the ignore list
FooMunki has quit [Quit: FooMunki]
<apeiros> ah you changed your code
<apeiros> didn't notice before
Veejay has joined #ruby
<apeiros> roelof: how does Array#include? work?
<roelof> apeiros: I have to make a difference between the first "then" and the second 'then"
<apeiros> how does it figure whether an item is in the array?
<roelof> apeiros: as far as I understand, it looks if a item is a part of a array and give true if so and false if the item is not in the array
<apeiros> re differ first and second then - you won't be able to do that if you split the string
<apeiros> roelof: how does it do that? check whether an item is part of the array?
<roelof> apeiros: I think it's iterate through the array and compares the current item in the list with the item to look for
<apeiros> correct. what does it use to compare?
<apeiros> as in, which method?
<roelof> the == ?
<apeiros> correct
aspiers_ is now known as aspiers
<apeiros> so you have %r{and} (which is a regex) and compare it with == to "and" (which is a string)
<apeiros> those are not ==
platzhirsch has joined #ruby
<apeiros> so either you have to use something else than Array#include?, or something else than regexen in your ignore-list.
<roelof> oke, this is a dead end way
<roelof> I have to think how I can differ the first "then" and the second "then"
<apeiros> roelof: maybe take a look at what Ox0dea wrote you
bkxd has joined #ruby
noService has joined #ruby
<roelof> oke, so when its the first word or the word in not in the ignore list then capitalize otherwise return the word
<roelof> that is what I was looking for
RegulationD has joined #ruby
sandstrom has joined #ruby
<roelof> never knew that you can iterate with a index
spiman has joined #ruby
Macaveli has joined #ruby
<roelof> Thanks all, learned another thing. Pity I could not find this one myself
blackgoat has joined #ruby
<roelof> I think not using the right google terms
<Ox0dea> The docs are a closely guarded secret.
<apeiros> >> ignore = %w[and over the]; "War and Peace".gsub(/(?<!\A)\b(?!#{Regexp.union(ignore)})\w+\b/, &:capitalize) # regex solution
<ruby[bot]> apeiros: # => "War and Peace" (https://eval.in/546131)
noService has quit [Ping timeout: 246 seconds]
<apeiros> >> ignore = %w[and over the]; "war and peace".gsub(/(?<!\A)\b(?!#{Regexp.union(ignore)})\w+\b/, &:capitalize) # regex solution - this time with an example where something actually changes
<ruby[bot]> apeiros: # => "war and Peace" (https://eval.in/546133)
nighttime has quit [Changing host]
nighttime has joined #ruby
CloCkWeRX has quit [Quit: Leaving.]
<Ox0dea> Whoops.
bkxd has quit [Ping timeout: 268 seconds]
RegulationD has quit [Ping timeout: 248 seconds]
<apeiros> hm?
<apeiros> Ox0dea: why whoops?
nighttime has quit [Quit: <uptime> >quotes himself in his quit message]
<Ox0dea> apeiros: The first word didn't get capitalized.
<apeiros> that's what he wanted, no?
<Ox0dea> No.
<apeiros> oh
<Ox0dea> I think #titleize is supposed to do what it says on the tin. :P
<apeiros> ah, I see. Misread.
<apeiros> should not be difficult to update the regex…
<apeiros> ignore = %w[and over the]; "war and peace".gsub(/\A\w+\b|\b(?!#{Regexp.union(ignore)})\w+\b/, &:capitalize) # and now according to spec :D
<apeiros> grah
<apeiros> >> ignore = %w[and over the]; "war and peace".gsub(/\A\w+\b|\b(?!#{Regexp.union(ignore)})\w+\b/, &:capitalize) # and now according to spec :D
<ruby[bot]> apeiros: # => "War and Peace" (https://eval.in/546135)
<Ox0dea> And, but, well, the specs really ought to throw the "over and over" curveball.
* apeiros doesn't know baseball and hence doesn't get metaphors relating to it
andywojo has quit [Read error: Connection reset by peer]
<Ox0dea> "over and over" => "Over and Over" is slightly tricksy.
Rahul_Roy has joined #ruby
<Ox0dea> Sneaky little Hobbitses.
forest has joined #ruby
<apeiros> ah, that's what you get for having silly casing rules.
forest is now known as Guest25154
<apeiros> (not that german casing rules were better)
rodfersou has joined #ruby
noService has joined #ruby
Guest51156 has quit [Ping timeout: 248 seconds]
<Ox0dea> https://en.wikipedia.org/wiki/Studly_caps is objectively superior.
<apeiros> yes, lets use studly caps.
<apeiros> interesting hint regarding the meaning of shoebox…
spiman_ has joined #ruby
tomaz_b has joined #ruby
Devalo has joined #ruby
Xeago has joined #ruby
michael_mbp has joined #ruby
spiman has quit [Ping timeout: 264 seconds]
trinaldi has joined #ruby
freerobby has joined #ruby
Devalo has quit [Ping timeout: 260 seconds]
Gasher has joined #ruby
nfk has quit [Quit: Try memory.free_dirty_pages=true in about:config]
tvw has joined #ruby
krobzaur has quit [Ping timeout: 260 seconds]
merida has quit [Remote host closed the connection]
ldnunes has joined #ruby
tildes has quit [Remote host closed the connection]
hk238 has joined #ruby
but3k4 has joined #ruby
but3k4 has quit [Read error: Connection reset by peer]
y0da has joined #ruby
duckpuppy has joined #ruby
chrisco has joined #ruby
yfeldblum has quit [Ping timeout: 268 seconds]
_blizzy_ has quit [Quit: Leaving]
Chagel has joined #ruby
duckpuppy has quit [Ping timeout: 244 seconds]
madgen has quit [Ping timeout: 244 seconds]
krz has joined #ruby
SHyx0rmZ has joined #ruby
chouhoulis has joined #ruby
al2o3-cr has quit [Ping timeout: 276 seconds]
Snowy has quit [Remote host closed the connection]
krz has quit [Ping timeout: 246 seconds]
chrisco has quit []
joonty has quit [Ping timeout: 244 seconds]
rodferso1 has joined #ruby
Dysp has joined #ruby
chouhoulis has quit [Ping timeout: 264 seconds]
quazimodo has quit [Ping timeout: 260 seconds]
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
webus has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
quazimodo has joined #ruby
<Dysp> Hello lovely people! I have an array and I want to remove any element being below 2,5 % of X value. I do this by the following array.delete_if {|x| x >= value}
<Dysp> Works fine!
<Ox0dea> apeiros: You nerd-sniped me. I tried to do every single combination, but it'd've taken ages. The longest alternator is "UnPoRoUsNeSs".
<Dysp> However, how would I approach only assessing the first 50% of the array?
Es0teric has quit [Ping timeout: 248 seconds]
<apeiros> Dysp: array.first(array.size/2)
<Dysp> I guess I could create a new array with the first 50% and simply do it there and then put it back together, but is there an easier way?
sdothum has joined #ruby
<apeiros> Ox0dea: I did what now?
<Dysp> apeiros: The myth. The legend.
<apeiros> legendary myth
<Ox0dea> apeiros: The shoebox thing.
<Dysp> array.first(array.size/2).delete_if {|x| x >= value}
<Dysp> Would that do?
<Ox0dea> I started to find all the word pairs hidden in larger words, but I have a massive dictionary.
haraoka has quit [Ping timeout: 276 seconds]
rodfersou has quit [Ping timeout: 268 seconds]
<apeiros> Dysp: depends on whether I understood you correctly.
<apeiros> Ox0dea: what does "upruns" mean?
pawnbox has quit [Remote host closed the connection]
<Dysp> I only want to run the "delete_if" on the first 50% of the array.
<Ox0dea> apeiros: Wiktionary says "uprun" is synonymous with "ascend".
<Ox0dea> ¯\_(ツ)_/¯
<apeiros> Ox0dea: interesting. online translator doesn't know the word :)
<Ox0dea> Dysp: And the problem is that #delete_if modifies the Array in-place, yes?
pawnbox has joined #ruby
<Dysp> No, that's fine. I want a new array.
Es0teric has joined #ruby
<Dysp> Or. A modified array
<apeiros> oh, is delete_if == select! ?
<Dysp> I simply do only want to run the delete_if on the first part of the array.
<apeiros> I thought it'd be == select
<apeiros> errr, reject
pietr0 has quit [Ping timeout: 246 seconds]
<Dysp> You are confusing me :D
<rahc> I want to find out what code is modifying a particular array
<Dysp> I mean; I could split the array, run the delete_if and then connect it again. But I would hope there would be an easier way.
<apeiros> rahc: freeze it and watch the explosion
<rahc> I've tried using byebug's "display" command but it doesn't watch the actual object, it simply evaluates a context-dependent variable name on each frame
<apeiros> Dysp: ah yes, the given solution does that
<rahc> apeiros: what do you mean?
<Dysp> apeiros: This? array.first(array.size/2).delete_if {|x| x >= value}
<apeiros> rahc: call .freeze on it. when something tries to modify it, it'll raise an exception. the exception tells you where it has been modified.
<rahc> apeiros: I see
roelof has quit [Ping timeout: 250 seconds]
<apeiros> Dysp: yes
whippythellama has quit [Ping timeout: 248 seconds]
<rahc> apeiros: that doesn't help me though because I need to see each invocation
<rahc> s/invocation/modification/
<Dysp> I had an error. Because I forgot to put in a value. I'm not a clever man, apeiros .
Ropeney has quit [Remote host closed the connection]
<rahc> apeiros: how can I do that?
sudoubuntu has joined #ruby
<apeiros> wrap it in a proxy object and log access
<rahc> apeiros: do you know how I can do that?
<rahc> apeiros: a proxy object for an array is going to be pretty extensive, no?
<rahc> apeiros: do you know of such a proxy object?
<apeiros> SimpleDelegator & co might work. It's easy to write one yourself, though.
pawnbox has quit [Remote host closed the connection]
<Ox0dea> >> a = [*1..10]; a.reject!.with_index { |e, i| i < a.size / 2 && e > 2 }; a # Dysp
<ruby[bot]> Ox0dea: # => [1, 2, 6, 7, 8, 9, 10] (https://eval.in/546218)
dionysus69 has joined #ruby
pawnbox has joined #ruby
<Ox0dea> But that's wasteful since it'll still go through the whole collection.
<apeiros> Ox0dea: my premature optimization bone itches
Chagel has quit [Ping timeout: 276 seconds]
<Dysp> Don't tickle that bone, Ox0dea!
<Dysp> :D
<Ox0dea> Huehuehue.
vale_tudo has joined #ruby
uglybandersnatch has joined #ruby
<Ox0dea> This is one of those times where it'd be nice if #slice returned a reference.
<Ox0dea> ary[0, ary.size / 2].reject! { ... }
bluOxigen_ has joined #ruby
volCat has joined #ruby
joonty has joined #ruby
<apeiros> while it does return a reference, it's COW :)
duckpuppy has joined #ruby
bluOxigen has quit [Ping timeout: 246 seconds]
Ropeney has joined #ruby
<Ox0dea> Right, right.
norc has quit [Ping timeout: 250 seconds]
Vile` has joined #ruby
last_staff has quit [Quit: last_staff]
uglybandersnatch has quit [Ping timeout: 244 seconds]
Digpig has quit [Quit: Konversation terminated!]
<Cork> anyone know how to convert UTF-8 to 3 byte UTF-8 in ruby? (mysql string)
Yiota has joined #ruby
<apeiros> aaahahaha
<apeiros> sorry
<adaedra> you don't have to do that.
<adaedra> mysql will just reject your unencodable characters.
<adaedra> (iirc)
<apeiros> the question sounded like they think those could be "translated", though
<Cork> adaedra: ya, it rejects the entire insert string
<adaedra> mysql utf-8 is just a less-capable utf-8
<Cork> ActiveRecord::StatementInvalid (Mysql2::Error: Incorrect string value: '\xF0\x9F\x98\x84\x0D\x0A...' for column 'body' at row 1: INSERT INTO
<Cork> "e
<apeiros> iirc those longer sequences are beyond codepoint 2**32-1, so you could probably .unpack("U*").reject { |cp| cp >= 2**32 }.pack("U*")
<apeiros> alternatively read the WP page on unicode and write the proper regex. should not be hard.
whippythellama has joined #ruby
<Cork> hmm let me give it a try
<Cork> thx for the help!
<adaedra> Next time, go utf8mb4
<apeiros> sequence start is iirc fixed and unambiguous, no matter which byte you look at
Zai00 has quit [Quit: Zai00]
<Cork> adaedra: ya, i was trying
<Cork> but the mysql client in debian doesn't support > utf8
<Cork> Mysql2::Error (Can't initialize character set utf16 (path: /usr/share/mysql/charsets/)):
<Cork> (same for utf8mb4)
andywojo has joined #ruby
GodFather has joined #ruby
baweaver has joined #ruby
pietr0 has joined #ruby
<Cork> adaedra: had to change it to .unpack("U*").reject { |cp| cp >= 2**16 }.pack("U*") for it to work but ya
<Dysp> apeiros: Hm. What seems to happen is that array.first(array.size/2).delete_if {|x| x >= value} indeed scans the first 50% of the array and deletes any element >= value. However the second half of the array is also deleted.
<Dysp> Could you confirm this?
CloCkWeRX has joined #ruby
<apeiros> Dysp: yes, I thought that was obvious.
gregf has quit [Quit: WeeChat 1.4]
<apeiros> after array.first(array.size/2) you only have the first half of the array.
<Dysp> Nothing is obvious to me in programming yet, apeiros ;)
bronson has joined #ruby
<Dysp> My own idea for a solution would be to split the array up and then put it back together, but could you propose a more elegant solution?`
baweaver has quit [Ping timeout: 248 seconds]
sudoubuntu has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<apeiros> no. as I said before, my solution simply implements (a part of) your solution
bronson has quit [Ping timeout: 244 seconds]
<Dysp> Alrighty. I'll get it to work. Thanks for your help as always.
al2o3-cr has joined #ruby
swills_ has quit [Remote host closed the connection]
bkxd has joined #ruby
sudoubuntu has joined #ruby
rsc___ has quit [Quit: rsc___]
whippythellama has quit [Ping timeout: 248 seconds]
Zai00 has joined #ruby
nfk|laptop has joined #ruby
madgen has joined #ruby
y0da has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
merida has joined #ruby
aupadhye has joined #ruby
bkxd has quit [Ping timeout: 248 seconds]
spiman_ has quit []
jrafanie has joined #ruby
infernix has quit [Ping timeout: 244 seconds]
but3k4 has joined #ruby
bluOxigen has joined #ruby
<apeiros> Dysp: I don't think it's a good solution, but sometimes a little magic is fun: https://gist.github.com/apeiros/6428ca06a6c2a8dd60e25c501c07a8de
Ropeney_ has joined #ruby
Ropeney_ has quit [Client Quit]
bluOxigen_ has quit [Ping timeout: 248 seconds]
Xeago has quit [Remote host closed the connection]
cdg has joined #ruby
<Dysp> apeiros: Looks lovely, however I am still too newb to actually understand what you are doing there.
<djellemah> >> ry = [0.1,0.7,0.7,0.1]; stop_index = ry.size / 2; ry.reject!.each_with_index{|v,i| break if i >= stop_index; v < 0.5}; ry # Dysp
<ruby[bot]> djellemah: # => [0.7, 0.7, 0.1] (https://eval.in/546237)
n0xff has joined #ruby
Mendenhall has quit [Ping timeout: 240 seconds]
Mendenhall has joined #ruby
<apeiros> Dysp: doesn't matter much, what matters is that you see how it's used and that it's a generic solution for all destructive methods :D
<Dysp> Generic solution for destructive methods? I'm so sorry, I actually don't understand the discourse
<Dysp> :|
<Dysp> It's hard being new.
pawnbox has quit [Remote host closed the connection]
<apeiros> a destructive/mutating/in-place method is a method which modifies an object
<apeiros> select!, reject!, gsub! etc. do that
<apeiros> many of them have a non-destructive counterpart, which does not modify the object, but returns a copy with the changes applied there.
<apeiros> select, reject, gsub etc. would be the counterparts to those named above
<apeiros> and my solution lets you apply any destructive method to only a slice of the array
blackjid has quit [Excess Flood]
millerti has joined #ruby
<Dysp> Ah. So you mean that destructive methods deletes an object to create a new one, whereas the counterparts lets the other stay, but returns a new object too?
tpendragon has quit [Ping timeout: 248 seconds]
<apeiros> no, it does not delete an object. it modifies an object.
IrishGringo has joined #ruby
<apeiros> >> a = [1,2,3]; a.reject! { |x| x.odd? }; a
<ruby[bot]> apeiros: # => [2] (https://eval.in/546239)
<Dysp> So X = > X'
<apeiros> >> a = [1,2,3]; a.reject { |x| x.odd? }; a
<ruby[bot]> apeiros: # => [1, 2, 3] (https://eval.in/546240)
<apeiros> see the difference?
<Dysp> And X => X + Y
chouhoulis has joined #ruby
<Dysp> Hm.
haylon has joined #ruby
pawnbox has joined #ruby
<Dysp> I understand that .reject! would modify (remove) the odd numbers in the array.
<apeiros> brb, reboot
<Dysp> I honestly do not understand what .reject does.
<jaroslav> it creates a new object
<apeiros> Dysp: run the code in pry, check the return value of both
<djellemah> Dysp: gives you back a new array without the odd numbers
<jaroslav> leaving original one as is
<apeiros> also run it where no change happens and check the return values
Madplatypus has quit [Quit: Connection closed for inactivity]
<Dysp> So, reject: X.reject => X + X2
<Dysp> And reject!: X.reject! => X'
<Dysp> ?
<apeiros> Dysp: I don't think that notation helps anybody
Vile` has quit [Ping timeout: 252 seconds]
<Dysp> Don't see it as code
<Dysp> Analogy
<apeiros> yes, but it doesn't help if you have to explain your analogy first
<Dysp> Haha, you have a point there, good sir.
<Dysp> So. x.reject leaves me with two arrays. The original one and a new one? Reject! modifies the original one to create a new one with the applied method?
chouhoulis has quit [Ping timeout: 260 seconds]
jas02 has joined #ruby
blackjid has joined #ruby
wlanboy has quit [Ping timeout: 276 seconds]
<djellemah> Dysp: you've got reject now, and almost there with reject!
aupadhye is now known as aupadhye|call
pawnbox has quit [Ping timeout: 276 seconds]
<Dysp> HAha :D
tpendragon has joined #ruby
<Dysp> So, Reject! modifies the original one with the applied method?
<djellemah> yes
<Dysp> Hereuka!
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<djellemah> \o/
quazimodo has quit [Ping timeout: 276 seconds]
<Dysp> Then one question remains in my mind; if I get two arrays from .reject, what is second one called?
<Dysp> the*
<apeiros> Dysp: one part omitted - check the return value of reject!, once when it does change something, and once when it doesn't
wlanboy has joined #ruby
Xeago has joined #ruby
<djellemah> >> name_it_whatever_you_like = [1,2,3,4].reject{|v| v.odd?} # Dysp
<ruby[bot]> djellemah: # => [2, 4] (https://eval.in/546242)
infernix has joined #ruby
<apeiros> Dysp: the second one is called "return value", and you assign it to whatever variable you want
<apeiros> or maybe even pass it on directly. objects don't have names.
<Dysp> I think I geti t.
<Dysp> Thats nice. Learning something new every day!
<Dysp> May I ask what you two do for a living?
n008f4g_ has joined #ruby
<djellemah> write code, and occasionally help others write code :-p
kobain has joined #ruby
<Dysp> Sounds like a very noble doing!
pawnbox has joined #ruby
<Dysp> In your before mentioned solution, you write break if i >= stop_index
<Dysp> What is that exactly for?
pawnbox has quit [Remote host closed the connection]
Snowy has joined #ruby
pawnbox has joined #ruby
<Dysp> Oh, that's what keeps it from going beyond the predefined size. Alright.
johnmilton has joined #ruby
andikr has quit [Quit: No Ping reply in 180 seconds.]
jas02 has quit [Quit: jas02]
<djellemah> It's only fair - I've been using open source software for years.
jas02 has joined #ruby
jas02 has left #ruby [#ruby]
millerti has joined #ruby
blackgoat has quit [Quit: WeeChat 1.4]
merida has quit [Quit: Leaving...]
dvinciguerra__ has joined #ruby
millerti has quit [Client Quit]
Xeago has quit [Remote host closed the connection]
Xeago has joined #ruby
<Dysp> djellemah: Im getting Wrong number of arguments.
Rixius has quit [Ping timeout: 244 seconds]
GitGud has quit [Ping timeout: 250 seconds]
<Dysp> Hm. Ill return. It's probably not what you provided.
millerti has joined #ruby
aupadhye|call is now known as aupadhye
aganov has quit [Ping timeout: 244 seconds]
sigurding has joined #ruby
aegis3121 has joined #ruby
whippythellama has joined #ruby
blackmesa has joined #ruby
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sgambino has joined #ruby
blackmes1 has quit [Read error: Connection reset by peer]
noService has quit [Ping timeout: 246 seconds]
banister has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ekinmur has joined #ruby
zapata has quit [Ping timeout: 260 seconds]
<Dysp> djellemah: I must have misunderstood something, because it's not working. Would you take a look? https://gist.github.com/anonymous/79f1363fb1e503ece11e2be64a04613c
Chagel has joined #ruby
Devalo has joined #ruby
<apeiros> what I do for a living? I professionally pet squirrels.
<Dysp> Sounds like an enjoyable living.
<Dysp> I am a one-time-use lighter repairman.
blackmesa has quit [Quit: WeeChat 1.4]
Xeago has quit [Remote host closed the connection]
ur5us has quit [Remote host closed the connection]
ocbtec has joined #ruby
<Dysp> Btw, "wrong number of argument.."
banister has joined #ruby
Devalo has quit [Ping timeout: 244 seconds]
Xeago has joined #ruby
cdg has quit [Remote host closed the connection]
cdg has joined #ruby
aganov has joined #ruby
workmad3 has quit [Quit: Lost terminal]
darkf has quit [Quit: Leaving]
krobzaur has joined #ruby
krobzaur has quit [Client Quit]
malconis has joined #ruby
Xeago has quit [Remote host closed the connection]
Xeago has joined #ruby
malconis has quit [Remote host closed the connection]
cdg has quit [Ping timeout: 268 seconds]
malconis has joined #ruby
last_staff has joined #ruby
mistermocha has quit [Ping timeout: 252 seconds]
sigurding_ has joined #ruby
davedev24 has joined #ruby
swills has joined #ruby
zapata has joined #ruby
sigurding has quit [Ping timeout: 260 seconds]
sigurding_ is now known as sigurding
rbennacer has joined #ruby
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
<Dysp> djellemah: Alright. Pinned it down. a.reject.each_with_index{|v,i| break if i >= stop_index; v > 10} produced nil. Why?
<apeiros> because it hit break
<apeiros> and break returns from the method, letting the method return nil
dionysus69 has quit [Ping timeout: 276 seconds]
<apeiros> (in case of no argument to break)
<apeiros> djellemah's code used reject!, and didn't make use of the return value - if memory serves right
sdothum has joined #ruby
krz has joined #ruby
<Dysp> That's true. But I don't want to modify the already existing array.
<Dysp> Because I use it later for something else.
<apeiros> then you have to dup, assing to a variable, apply the reject! there.
<apeiros> but djellemah's approach won't work in a non-destructive manner
codecop has quit [Remote host closed the connection]
luise_ has joined #ruby
platzhirsch has left #ruby [#ruby]
<Dysp> apeiros: How do I produce a dup?
<apeiros> with dup
<apeiros> &ri Object#dup
radza_ has joined #ruby
<Dysp> Looking it up
kies has quit [Ping timeout: 276 seconds]
<Dysp> Yay. I got it to work.
<Dysp> I love you.
millerti has joined #ruby
<Dysp> Now, off for beers with the research lab. If you are in Copenhagen, feel free to join ;)
elzid has joined #ruby
<apeiros> a couple hundred kilometers to the south
<apeiros> hf
<shevy> Dysp off for bears?
<Dysp> I haven't been up there yet, but I have no idea if are any bears.
<Dysp> But can' tell without being there, I guess.
<Dysp> I'll go look for bears.
<Dysp> See you all.
Dysp has quit [Quit: Page closed]
<adaedra> Silly danes, keeping the beer for themselves.
skislak has quit [Quit: Leaving]
ChiefAlexander has joined #ruby
chouhoulis has joined #ruby
platzhirsch has joined #ruby
<elzid> Hi, newb Q: if :symbols are immutable, how does this work? https://gist.github.com/anonymous/6a1e4a2b85028de36b2a03dadf8b1793
<apeiros> elzid: where do you think a symbol is being mutated there?
marr has quit [Ping timeout: 276 seconds]
<elzid> aperios: I would've thought that the if else blocks are checking to see if the options have been passed to the script and then either uses predefined default or assigns a value?
BSaboia has joined #ruby
<elzid> unless the actual assignment isn't happening there...
AlexJakeGreen has joined #ruby
<apeiros> ?tabnick elzid
<ruby[bot]> elzid: pro-tip - use tab completion for nicks. avoids typos in nicks.
Rixius has joined #ruby
<elzid> apeiros: great thanks!
<apeiros> elzid: you're referring to line 18-22?
rippa has joined #ruby
mostlybadfly has quit [Quit: Connection closed for inactivity]
<elzid> apeiros: yes
kobain has quit [Ping timeout: 260 seconds]
<elzid> ok, it's setting a hash I suppose but why is a symbol being used as the key?
<elzid> and when does it become immutable?
<apeiros> the block is only invoked when the option is present. but I guess it can be invoked multiple times. but again, where is it mutating a symbol there?
<apeiros> a symbol is always immutable. it does not become immutable.
al2o3-cr has quit [Ping timeout: 248 seconds]
<apeiros> and a symbol is used as a key because that's something it's good at.
nando293921 has joined #ruby
Rixius has quit [Ping timeout: 248 seconds]
<elzid> apeiros: ok, am I right in thinking that the :symbol itself holds no value, rather it's only used as a key to a value, which is being reset depending on whether the option is present or not? Say the option is present, the @options hash already has that symbol set to a default value, how can it then set a different value. Unless my first sentence here is correct...
<apeiros> :symbol holds a value - itself
<elzid> apeiros: and that's not changing, so it's ok right?
<apeiros> but I think you're confusing the hash and its key
jaruga_ has quit [Quit: jaruga_]
<apeiros> the only thing which is mutated there is the options hash. and that's - as said - a hash, which is mutable.
<apeiros> setting a value in a hash does in no way mutate the key - why would it?
<elzid> apeiros: precisely - that's where I got lost - I've not come across :symbols in anywhere else and when I found it in ruby, I was a little lost and then I tried to look for examples and found this. Confused myself. Many thanks for your help indeed.
<apeiros> would you have the same issues understanding what's going on if the keys where strings? would you think the strings are being mutated when assigning a value to the hash?
<apeiros> *were
<elzid> apeiros: not at all
bkxd has joined #ruby
<elzid> it's the :symbol concept that done me!
<apeiros> you have to separate that. it's unrelated.
triangles has joined #ruby
<apeiros> you can use any object as a key in a hash.
<apeiros> and none is mutated by being used as a key.
<apeiros> and the :symbol concept is just a convenient way to have a "named number".
GitGud has joined #ruby
<elzid> apeiros: and the benefit of using a :symbol as hash key is because it's always the same underlying object and therefore more memory efficient?
<apeiros> that's one aspect. the other is that being a number makes comparison very fast.
<elzid> apeiros: ah yes, it has a string and number representation
<apeiros> yeah. the string is for us puny meatbags.
madgen has quit [Ping timeout: 276 seconds]
lkba has joined #ruby
<elzid> apeiros: cool
skade has joined #ruby
<elzid> thank you
madgen has joined #ruby
<apeiros> last but not least - everything with a name in ruby has that name identified by a symbol
aganov has quit [Ping timeout: 248 seconds]
bkxd has quit [Ping timeout: 246 seconds]
bronson has joined #ruby
joneshf-laptop has joined #ruby
<elzid> apeiros: "everything with a name"?
Yiota has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tubuliferous_ has joined #ruby
<apeiros> methods, local variables, instance variables, class variables, globals, …
Snowy has quit [Remote host closed the connection]
zast has joined #ruby
bkxd has joined #ruby
parduse has joined #ruby
pagios has joined #ruby
pagios has left #ruby ["Leaving"]
pagios has joined #ruby
tubuliferous_ has quit [Read error: Connection reset by peer]
<pagios> hello, i have a field that reads a date in utc format, i would like to create a query to select the dates that happen to be a friday, what is the best way to do it thanks.
idle_task has joined #ruby
Silox| has joined #ruby
idletask has quit [Ping timeout: 260 seconds]
<apeiros> pagios: the question as asked feels a bit like "please do it for me". to avoid that, please, show us what you've tried so far.
<pagios> apeiros, i tried .where (date.wday == 5)
<apeiros> ok, so we're indeed talking about activerecord
<pagios> yep
<apeiros> that'd be #rubyonrails. but what you have to do: instead of date.wday == 5, write that part as SQL. i.e. find your db's sql docs, and in there the appropriate date functions.
bkxd has quit [Ping timeout: 244 seconds]
Xeago has quit [Read error: Connection reset by peer]
stannard has joined #ruby
speakingcode has quit [Ping timeout: 268 seconds]
saneax is now known as saneax_AFK
machinewar has joined #ruby
<machinewar> is there a way to parse a csv string line by line? I know I could open a csv file and call readline
<machinewar> but I have a string and want to parse it line by line without using a block because some lines might have encoding issues
<apeiros> machinewar: check CSV lib's docs.
<apeiros> and yes, there is a way.
<apeiros> ah, a string
hxegon has joined #ruby
<machinewar> apeiros: currently looking in there
<machinewar> yeah
grill has joined #ruby
<machinewar> its already been opened from a file
<apeiros> StringIO might work
skweek has joined #ruby
<machinewar> apeiros: okay will check thanks
<apeiros> though why'd you parse it line by line if you have it already in memory?
<apeiros> ah
* apeiros should learn to read
<pagios> apeiros, i didnt get it
<machinewar> ahh maybe StringIO#each_line and pass that to CSV#parse_line
<apeiros> machinewar: no
tomaz_b has quit [Ping timeout: 276 seconds]
<apeiros> a csv record can contain a newline
<apeiros> otherwise I'd have told you to use string.each_line
<pagios> apeiros, where('extract(day from date_column) = ?', desired_day_of_month)
Snowy has joined #ruby
<apeiros> pagios: looks like the right direction. but you wanted day_of_week, no?
solars has quit [Ping timeout: 244 seconds]
DTZUZU has quit [Ping timeout: 244 seconds]
Xiti has joined #ruby
<apeiros> don't know about the sql function, since you failed to mention the db you use…
<apeiros> ?crosspost pagios
<ruby[bot]> pagios: 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.
<apeiros> count me out on this question.
nobitanobi has quit [Remote host closed the connection]
workmad3 has joined #ruby
fexilal has joined #ruby
Khaki has joined #ruby
rubie has joined #ruby
Yiota has joined #ruby
dhollinger has joined #ruby
barajasfab has joined #ruby
cpruitt has joined #ruby
imperator has joined #ruby
<imperator> good morning
<imperator> just tinkering with a local proxy server that i'm using for testing: https://gist.github.com/djberg96/e9eca6387bca29043c0f1ec82a0b0352
bry4n_ has joined #ruby
<imperator> but, confused why i can still connect without enabling SSL or using an https string
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
nobitanobi has joined #ruby
karioleez has quit []
sdothum has joined #ruby
<imperator> e.g. this works: "curl -x localhost:8080 -U admin:passxxx123 http://www.google.com", but i would have expected the --ssl option to be required
Yiota has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pagios has left #ruby ["Leaving"]
hiyosi has joined #ruby
RegulationD has joined #ruby
nando293921 has quit [Ping timeout: 250 seconds]
Zai00 has quit [Read error: Connection reset by peer]
Donkoko has joined #ruby
RegulationD has quit [Ping timeout: 244 seconds]
Snowy has quit [Remote host closed the connection]
Zai00 has joined #ruby
<djellemah> imperator: looks like HTTPProxyServer.new just ignores options it doesn't recognise, including SSLEnable.
Macaveli_ has joined #ruby
kies has joined #ruby
dvinciguerra__ has quit [Ping timeout: 244 seconds]
Macaveli has quit [Ping timeout: 244 seconds]
speakingcode has joined #ruby
<imperator> djellemah, WEBrick::HTTPProxyServer ignores :SSLEnable ?
norc has joined #ruby
rubie has quit [Remote host closed the connection]
rubie has joined #ruby
<imperator> it is a subclass of HTTPServer, which (supposedly) recognizes it, right?
Chagel has quit [Ping timeout: 248 seconds]
aeterne has joined #ruby
Snowy has joined #ruby
anisha has quit [Quit: Leaving]
jaruga_ has joined #ruby
<imperator> maybe it's the authenticator
<Ropeney> imperator, I wonder if https://github.com/nahi/webrick/blob/master/lib/webrick.rb#l151 and dropping permissions has something to do with it
jaruga_ has quit [Client Quit]
jaruga_ has joined #ruby
baweaver has joined #ruby
DTZUZU has joined #ruby
scepticulous has quit [Ping timeout: 250 seconds]
<norc> apeiros, Im close to pulling my hair out. It seems that aroea (activerecord-oracle_enhanced-adapter) is quite easy to break when you have it generate WHERE xxx IN (...) fragments with lists over 1000 entries. How do you deal with these random bugs..
<norc> Or the recent bug where the adapter randomly drops connection...
bronson has quit [Remote host closed the connection]
Zai00 has quit [Read error: Connection reset by peer]
RTG` has quit [Ping timeout: 248 seconds]
<norc> havenwood, wtf...
<norc> I mean I get it, but that is a bit silly.
bronson has joined #ruby
<imperator> ah, april 1st, i should just stay offline today
<havenwood> norc: yeah, when perfectly good emoji are available: 0️⃣1️⃣2️⃣
<shevy> imperator lol
<shevy> imperator I almost fell for another suggestion
symm- has joined #ruby
tildes has joined #ruby
<shevy> but since I saw nobu and dürst tag-team along with jokes just like 10 minutes ago, I was more prepared for the one above just now
helpa has quit [Remote host closed the connection]
fexilal has left #ruby [#ruby]
helpa has joined #ruby
<shevy> We need endddd
Zai00 has joined #ruby
Suntzu has quit [Read error: Connection reset by peer]
<havenwood> en_fin
* imperator is guilty of this sort of stuff, too, but hasn't done it for many years
roelof has joined #ruby
Xeago has joined #ruby
<hanmac> i hate the april ... i feel so trolled by the weather :/ yesterday it was warn outside, today it was snowing oO
<norc> We had the funniest and weirdest announcement today, with the most unlikely change of department heads - sad thing is its not an april fools joke. :-(
dc4 has quit [Ping timeout: 260 seconds]
stunder has joined #ruby
<adaedra> you may want to give more details.
<adaedra> how is it not working?
<norc> roelof, implement the === operator for the relevant, that is what case uses under the hood
pandaant has quit [Remote host closed the connection]
<norc> *for the relevant class.
hxegon has quit [Quit: BRB]
<roelof> norc: so I have to use the == for a case
<norc> roelof, no.
RegulationD has joined #ruby
<roelof> sorry, the === is what you talk about
<roelof> I was hoping I could use a case instead of a big nested if then
Xeago has quit [Remote host closed the connection]
<shevy> hanmac really snowing??? it was hot here too yesterday, today it is cloudy and a bit rainy... but no snow
<roelof> norc: so I have to make my custom === function ?
mistermocha has joined #ruby
<norc> roelof, nevermind, I wasnt really looking at your code when I made that remark.
hxegon has joined #ruby
<roelof> here it is sunny and some 16 degrees ( The Netherlands
<hanmac> shevy: it was at morning around 4-9am, now its warm again
dipnlik has joined #ruby
skweek has quit [Ping timeout: 260 seconds]
hxegon has quit [Client Quit]
<roelof> norc: oke, np
threh has joined #ruby
loc22 has joined #ruby
loc22 has quit [Remote host closed the connection]
<roelof> someone else who can help me ?
<norc> roelof, case sends the === method to woord, passing the the result of each expression in "when exp" and stopping when it yields a truey result
volCat has quit [Quit: Leaving]
loc22 has joined #ruby
<norc> roelof, do not use case here, its not what you think it is. ;-)\
aegis3121 has quit [Ping timeout: 248 seconds]
tjohnson has joined #ruby
<roelof> oke, what can I do then the best. I use a big if then and that looks not good
<norc> In your case it would constantly check whether word === true or word === false which is probably not what you meant.
B1n4r10 has joined #ruby
<dipnlik> hi all. i have a few rails apps that are still running in ruby 2.0.0, any upgrade tips/tutorials are welcome. should I go straight to 2.3? anything special I should look for?
albercuba has joined #ruby
freerobby has quit [Quit: Leaving.]
andikr has joined #ruby
<norc> ?rubyonrails dipnlik
<ruby[bot]> norc: I don't know anything about rubyonrails
<roelof> norc: so a lot of if then's would be better /
<norc> ?rails dipnlik
<ruby[bot]> dipnlik: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
<roelof> ?
<albercuba> hello everyone, why if I run apt-get install ruby2.0 it installs ruby1.9.1 and sets it as default
<albercuba> ?
<albercuba> ruby -v
freerobby has joined #ruby
baweaver has quit [Remote host closed the connection]
<norc> roelof, probably not. Im trying to figure out what you are trying to do, i.e. what your "translation" is trying to do.
joonty has quit [Ping timeout: 244 seconds]
<norc> albercuba, the plain ubuntu way would be: sudo update-alternatives --config ruby
<albercuba> norc ok i am going to try that
<albercuba> thanks
last_staff has quit [Quit: last_staff]
<norc> albercuba, note that most people here do not use repo supplied ruby though, as ruby-install with chruby offers the most up-to-date versions while easily managing multiple verisons.
<dipnlik> norc: thought asking here was more appropriate but will try there too, thanks
joonty has joined #ruby
<havenwood> albercuba: Brightbox ships up-to-date Ruby packages for Ubuntu: https://www.brightbox.com/docs/ruby/ubuntu/
<norc> Or that. :)
parduse is now known as Guest34886
whippythellama has quit [Ping timeout: 246 seconds]
<albercuba> norc löet my show you what I used, the problem is that after restart ruby is gone
helpa has quit [Remote host closed the connection]
Guest34886 has quit [Read error: Connection reset by peer]
helpa has joined #ruby
<havenwood> dipnlik: 2.2.4 or 2.3.0!
<roelof> norc: I try to make a pig latin function so it has to translate words or sentences to some rules explained here : http://lpaste.net/158081
pardusf has joined #ruby
rubie has quit [Remote host closed the connection]
ChiefAlexander_ has joined #ruby
<norc> From a quick glance it seems to be bugged.
<albercuba> norc, http://paste.ee/p/tevsA
jolts has joined #ruby
jolts has quit [Max SendQ exceeded]
<apeiros> norc: was commuting
<apeiros> norc: where possible: manually create subqueries. in many cases that can be done by simply having an ARRelation in the where clause
bkxd has joined #ruby
<apeiros> norc: where not possible, we do batches
<norc> albercuba, if you make changes to your bash the changes will not persist. You have to add those to your .bash_profile (or .bashrc)
<apeiros> and yes, it's annoying to no end
<darix> albercuba: you could try update-alternatives --config ruby
jolts has joined #ruby
<darix> and configure it to ruby 2
<albercuba> darix, i get update-alternatives: error: no alternatives for ruby
<apeiros> but I'm really looking forward to mssql which I've been informed is catastrophic with subqueries :D
ferr has quit [Quit: WeeChat 1.4]
hxegon has joined #ruby
ncopa has joined #ruby
ChiefAle_ has joined #ruby
<ncopa> hi is the the channel for discussing bugs in ruby itself?
<norc> apeiros, well in all fairness, its not as much the databases, as it is the fact that only few people use oracle or mssql, so there are not many people actively contributing.
<havenwood> MySQL announced they're self-deprecating in favor of DBM, so might as well just use DBM.
ChiefAlexander has quit [Ping timeout: 240 seconds]
<apeiros> havenwood: mssql, not mysql
<havenwood> ncopa: It's for Ruby! (Bugs and all.)
SCHAAP137 has quit [Remote host closed the connection]
<norc> ncopa, sure, you have come to the right place.
<havenwood> apeiros: Oooh! :)
<apeiros> I'm not quite sure which of the two I find worse, though
<havenwood> hehe
<albercuba> It is amazing ahving this problem in an LTS
<ncopa> there is an interesting bug with ruby built with musl libc: in string::include? https://github.com/docker-library/ruby/issues/77
<ncopa> i wonder what source file i should look in
<dipnlik> havenwood: running my specs in 2.3.0, so far so good
stunder has quit [Ping timeout: 248 seconds]
<norc> ncopa, you have caught my undivided attention.
<havenwood> dipnlik: :D
<roelof> is this more the ruby way ? http://lpaste.net/158082
nfk|laptop has quit [Ping timeout: 244 seconds]
<roelof> so I can make later a lot of if then on every case ?
<norc> roelof, try it and see what happens.
<havenwood> roelof: "Words" is the plural. Though I like "woord" as the singular. :P
bkxd has quit [Ping timeout: 244 seconds]
ChiefAlexander_ has quit [Ping timeout: 244 seconds]
<norc> Its better than me telling you it wont do what you expect it to.
<norc> havenwood, guess he was scared about the block param not shadowing the outer lvar. :p
<ncopa> norc: where can i find where string::include? is implemented? I suppose its implemented in C
<norc> ncopa, yes it is, give me one second.
<havenwood> norc: Ah, I see! I'm slow today, headache...
<apeiros> norc: re "not as much the db" - sure, more users/contributors would yield better drivers. but that limit is just ridiculous.
<norc> ncopa, that is the entry point.
rubie has joined #ruby
pawnbox has quit [Remote host closed the connection]
<roelof> havenwood: yes, words for me is the same as a sentence where woord is the Dutch word for word
<havenwood> roelof: nice
<ncopa> norc: thanks!
<roelof> Later it must be working on more then 1 word
<norc> ncopa, be prepared for a hell of the worst undocumented string manipulation library you have ever seen.
<norc> You have been warned.
<norc> We will see if you still thank me if you come back...
<roelof> havenwood: maybe I can better name words -> sentence and woord -> word ?
<ncopa> We will see if i come back at all...
x77686d has joined #ruby
<ncopa> :)
<havenwood> roelof: Did you try it out in irb/pry yet?
stunder has joined #ruby
<roelof> but then it looks like the function only works on sentences where it also works on a single word
<roelof> yep, this case is working
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<roelof> I use irb , pry I did not learned to use yet
<norc> roelof, be careful. Once you try out pry you will never use irb again.
<roelof> hmm, maybe I can better use *words so it's clear it can work on one or more words ?
millerti has joined #ruby
<havenwood> ?pry
<ruby[bot]> Pry, the better IRB, provides easy object inspection `ls`, `history`, viewing docs `?`, viewing source `$`, syntax highlighting and other features (see `help` for more). Put `binding.pry` in your source code for easy debugging. Install Pry (https://pryrepl.org/): gem install pry pry-doc
skade has quit [Quit: Computer has gone to sleep.]
Yiota has joined #ruby
whippythellama has joined #ruby
<roelof> wierd, I see a 404 error on that page about pry
<havenwood> roelof: Check non-vowel words.
Suntzu has joined #ruby
<roelof> that is the next step
<apeiros> should we have ?irb -> irb, the better pry, …
<adaedra> lel.
skweek has joined #ruby
aufi has quit [Quit: Konversation terminated!]
freerobby has quit [Quit: Leaving.]
<adaedra> ?irb
<ruby[bot]> irb is "interactive ruby", it is part of ruby. You can run ruby code and see results immediately. it's useful for testing code. Also see ?pry, a gem which is a popular alternative to irb.
<grill> what exactly does this line do, assuming flags['file-list'] is an array, and build_differ.changed_files is a hash? flags['file-list'] ||= []).concat(build_differ.changed_files)
baweaver has joined #ruby
<norc> grill, ||= is a conditional assign, that assigns to the left side if its either nil or not declared
<apeiros> grill: it should raise
<apeiros> grill: but I'd bet changed_files isn't a hash
rkazak has joined #ruby
<ncopa> $ ruby -e 'puts "xxxAy".index "Azzz"'
<ncopa> 240
<ncopa> thats a bug^^
<grill> it does raise
<norc> >> puts "xxxAy".index "Azzz"
<ruby[bot]> norc: # => ...check link for more (https://eval.in/546386)
<apeiros> grill: then… why your question? you already know what it does.
pawnbox has joined #ruby
<norc> ncopa, this is just alpine related, right?
<norc> ncopa, what specific version are you using?
imperator has left #ruby ["Leaving"]
<grill> apeiros i wanted to test your knowledge of ruby
<apeiros> norc: drop the puts ;-)
DTZUZU has quit [Ping timeout: 252 seconds]
<ncopa> norc: ruby 2.2.4p230 (2015-12-16 revision 53155) [x86_64-linux-musl]
<grill> or maybe i just needed to know what a conditional assign was
<ncopa> note the "musl" libc
al2o3-cr has joined #ruby
d0nn1e has quit [Ping timeout: 268 seconds]
maletor has joined #ruby
<roelof> havenwood: this http://lpaste.net/158083 breaks the vowel case :( . What went wrong ?
<apeiros> grill: but the conditional assignment is unrelated to the code raising
d0nn1e has joined #ruby
<ncopa> norc: you can reproduce with docker: $ docker run ruby:2.3-alpine ruby -e 'puts "xxxAy".index "Azzz"'
<ncopa> 440
<apeiros> it's raising because you try to concat a hash to an array.
<grill> apeiros it is related to my understanding!
<grill> yolo!
<apeiros> *shrug*
<ncopa> ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-linux]
<havenwood> roelof: Whatever line 4 returns is what is joined, no matter what line 3 does.
<roelof> havenwood: something is wrong with the second if then but I cannot see why
<norc> grill, a ||= b is almost (!) the same as a = a || b
karioleez has joined #ruby
<havenwood> roelof: Line four returns your String or nil.
FooMunki has joined #ruby
<havenwood> >> [nil, nil, nil].join
<ruby[bot]> havenwood: # => "" (https://eval.in/546390)
terlar has quit [Ping timeout: 276 seconds]
<norc> grill, actually no, it is exactly the same.
<norc> That is interesting.
<norc> >> a = a || 1
<ruby[bot]> norc: # => 1 (https://eval.in/546391)
<norc> asm>> a = a || 1
<ruby[bot]> norc: I have disassembled your code, the result is at https://eval.in/546392
<roelof> wierd, If I comment out line 4 , line 3 is given the right code for example apple
hxegon has quit [Quit: BRB]
<apeiros> norc: it's not, though :)
<apeiros> but let's see
<havenwood> norc: ||= doesn't do the assignment if not a
<apeiros> >> A ||= 1
<ruby[bot]> apeiros: # => 1 (https://eval.in/546393)
<havenwood> norc: so it differs
<apeiros> ast>> A ||= 1
<ruby[bot]> apeiros: I have parsed your code, the result is at https://eval.in/546394
pawnbox has quit [Ping timeout: 276 seconds]
phpwebdev has joined #ruby
<roelof> havenwood : line 3 is supposed to work on a vowel and line4 on a non-vowel word
<havenwood> roelof: Yet line 4 is what is always returned.
<apeiros> asm>> A ||= 1
<norc> havenwood, a = a || 1 would not either.
<ruby[bot]> apeiros: I have disassembled your code, the result is at https://eval.in/546397
<havenwood> roelof: Line three is swallowed into the abyss.
<havenwood> roelof: yeah huh
<havenwood> norc: ^
<havenwood> norc: a is assigned to a there
<roelof> sorry , I do not understand what you mean
<roelof> havenwood: ^^
<Donkoko> Anyone has an idea why when we render our rails app within Facebook canvas the session gets destroyed and we get logged out, even tho we are still logged in, in another tab? Seems like the cookie is conflicting somehow with FB but cant figure out why and how.
<havenwood> >> [1, 2, 3].map { |n| 'not this'; 'nor this'; 'but this' }
<ruby[bot]> havenwood: # => ["but this", "but this", "but this"] (https://eval.in/546399)
<havenwood> roelof: ^
<norc> havenwood, nope, 1 is assigned to a, which is confusing as heck, because this is the first time I see uninitialized lvars in Ruby.
DoubleMalt has quit [Read error: Connection reset by peer]
hxegon has joined #ruby
<ncopa> how do i test run ruby built from git?
<ncopa> $ ./ruby -e 'puts "hello"'
<ncopa> <internal:gem_prelude>:4:in `require': cannot load such file -- rubygems.rb (LoadError)
<norc> ncopa, install it. Build it with some prefix.
<havenwood> norc: right, i should have actually looked at your example :P
<shevy> :D
<havenwood> norc: still different though :P
<shevy> he thought you were april joking!
<norc> ncopa, I usually install mine in .rubies/whatever_version_I_implease and then chruby them
element_zer0 has joined #ruby
<norc> havenwood, nope
<norc> >> a = a || 1
<ruby[bot]> norc: # => 1 (https://eval.in/546400)
<norc> >> a ||= 1
<ruby[bot]> norc: # => 1 (https://eval.in/546401)
freerobby has joined #ruby
halfamind has joined #ruby
<roelof> havenwood: thanks, I think I will use a if then elsif
nando293921 has joined #ruby
freerobby has quit [Client Quit]
<norc> havenwood, meh that is a really edgy case being mentioned. :P
<roelof> seperate if then's do not work as I expect
<norc> Though the curious part it this:
<norc> asm>> a ||= 1
<ruby[bot]> norc: I have disassembled your code, the result is at https://eval.in/546402
freerobby has joined #ruby
<norc> That lvar is never initialized. :S
baweaver has quit [Remote host closed the connection]
<norc> Im guessing that it gets automatically initialized with nil though.
<havenwood> `a ||= b` behaves like `a || a = b` is true!
<havenwood> still || then equal, just an a crammed in there
<norc> havenwood, if a is just a tIDENTIFIER yes.
dopamean_ has quit [Ping timeout: 248 seconds]
pardusf has quit [Read error: Connection reset by peer]
abyx has joined #ruby
<havenwood> if `a` calls out to assembly that changes the runtime to be different then it isn't the same, and other cases :P
<norc> >> a = a
<ruby[bot]> norc: # => nil (https://eval.in/546403)
<norc> Hah. I even know why this works, this is hilarious.
_stu_ has joined #ruby
<norc> Thank god for this brilliant magical lexer we have.
parduse has joined #ruby
<havenwood> >> [0,-42, 1].public_send (a = a).inspect.next.reverse
<ruby[bot]> havenwood: # => -42 (https://eval.in/546404)
bluOxigen has quit [Read error: Connection reset by peer]
<ncopa> i can reproduce with current git: $ ~/.rubies/git/bin/ruby -e 'puts "xxxAy".index "Azzz"'
<ncopa> 320
marxarelli has joined #ruby
<norc> >> _=_
<ruby[bot]> norc: # => nil (https://eval.in/546405)
<norc> What a wonderful way of representing nil.
<norc> ncopa, but with musl libc right?
stunder has quit [Ping timeout: 250 seconds]
<ncopa> correct
<ncopa> $ ~/.rubies/git/bin/ruby -e 'puts "HELLO".index "Ozz"'
<ncopa> 320
<ncopa> this too
<norc> Which version are you linking against?
GnuYawk has joined #ruby
<ncopa> $ apk version musl
<ncopa> Installed: Available:
<ncopa> musl-1.1.14-r6 = 1.1.14-r6
GnuYawk has quit [Changing host]
GnuYawk has joined #ruby
<ncopa> its 1.1.14 + some backported patches from git
crazydiamond has quit [Ping timeout: 276 seconds]
Chagel has joined #ruby
dvinciguerra has joined #ruby
AlexJakeGreen has quit [Remote host closed the connection]
<havenwood> norc: If you're using that for nil maybe this for true:
<havenwood> >> (a = a).public_send (a = a).inspect + ??
<ruby[bot]> havenwood: # => true (https://eval.in/546407)
LaT0rtue has joined #ruby
GnuYawk has quit [Client Quit]
symm- has quit [Ping timeout: 268 seconds]
mjc_ has joined #ruby
DTZUZU has joined #ruby
<havenwood> i guess this is nicer: (a = a).send(a.inspect<<??)
<norc> havenwood, I would have expected that to yield false actually...
<norc> Im wondering whether that might even be a bug.
<norc> Oh wait, nevermind wrong thinking all good.
<norc> havenwood, I just dislike the inspect there. Its giving away too much.
al2o3-cr has quit [Ping timeout: 276 seconds]
<norc> >> !!??
<ruby[bot]> norc: # => /tmp/execpad-b512a4d4c15a/source-b512a4d4c15a:2: warning: string literal in condition ...check link for more (https://eval.in/546412)
<norc> Is the nicer true.
<havenwood> >> a = !a
<ruby[bot]> havenwood: # => true (https://eval.in/546413)
<roelof> what is the best alternative for this structure : if then elsif if then else elsif and so on ?
<havenwood> norc: how about that ^ :)
<norc> roelof, generally case.. it just didnt fit your original problem.
CausaMortis has quit [Ping timeout: 260 seconds]
<norc> havenwood, think I prefer the !!??
<roelof> oke, how do I then make a case which checks for vowels, non-vowels and multiple non-vowels at the beginning norc ?
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<havenwood> depends on the goal i suppose
<norc> >> _=_???:!!??
<ruby[bot]> norc: # => /tmp/execpad-4dcf1396f587/source-4dcf1396f587:2: syntax error, unexpected ':', expecting keyword_end ...check link for more (https://eval.in/546416)
<norc> something along those lines.
<norc> okay.. why isnt that parsing?
bratchley has left #ruby [#ruby]
<norc> roelof, you could do the following. Build a comparator class which defines the method === and accept a symbol as a parameter which could be :vowel :non_vowel :multiple_non_vowel and does its logic there.
<norc> like
diegoaguilar has joined #ruby
stantona has quit [Ping timeout: 248 seconds]
pawnbox has joined #ruby
<norc> roelof, MyComparator = Struct.new(word) { def ===(sym) case(sym) when :vowel then (exp) else raise UnknownSymbol end; end }
<norc> where exp does the actual test and returns with false or true depending on whether it has say a single vowel
bronson has quit [Remote host closed the connection]
bronson has joined #ruby
mostlybadfly has joined #ruby
ascarter_ has joined #ruby
stunder has joined #ruby
<roelof> norc: thanks, I will play with it
ascarter has joined #ruby
ascarter_ has quit [Client Quit]
<norc> roelof, https://eval.in/546418
<norc> there is a working example to show what I mean.
ascarter has quit [Client Quit]
Suntzu has quit [Read error: Connection reset by peer]
pawnbox has quit [Ping timeout: 268 seconds]
ascarter has joined #ruby
<norc> Updated. I really should have gisted this: https://eval.in/546419
<norc> :P
Asher has joined #ruby
gregf has joined #ruby
Asher has quit [Client Quit]
loc22 has quit [Quit: Be back later ...]
stunder has quit [Ping timeout: 246 seconds]
skweek has quit [Ping timeout: 276 seconds]
marr has joined #ruby
<roelof> thanks, now time for dinner
maletor has quit [Quit: Computer has gone to sleep.]
amclain has joined #ruby
Chagel has quit [Ping timeout: 244 seconds]
_stu_ has quit [Quit: _stu_]
DTZUZU has quit [Ping timeout: 268 seconds]
<norc> roelof, you could also simply use "case true ..." or try to use regular expressions, so you have a couple options there.
hxegon has quit [Quit: BRB]
<Donkoko> roelof: bon apetit
stunder has joined #ruby
mikecmpbll has quit [Ping timeout: 240 seconds]
uglybandersnatch has joined #ruby
Couch has quit [Ping timeout: 240 seconds]
<grill> how can i force rake to repackage a gem?
roelof has quit [Quit: Page closed]
gizmore has joined #ruby
<apeiros> grill: rake -T
<apeiros> because that's not a rake feature. it depends on the gem's rakefile
millerti has joined #ruby
rubie has quit [Remote host closed the connection]
<apeiros> e.g. none of my gems even have a task to package a gem. `gem build *.gemspec` is easy enough.
<grill> ok
<Donkoko> grill: gem build <gemspec>
<Donkoko> grill: if you want to push to Rubygems.ord `gem push <built gem>`
stunder has quit [Ping timeout: 264 seconds]
benlieb has joined #ruby
joonty has quit [Ping timeout: 250 seconds]
duderonomy has joined #ruby
uglybandersnatch has quit [Ping timeout: 244 seconds]
<norc> apeiros, you were one one of the people here writing your own language, does my memory serve me right here?
<apeiros> yes. been a while since I worked at it, though.
kobain has joined #ruby
<norc> Was the project ever publicly hosted?
<apeiros> -> ot
<apeiros> oh, you're not in #ruby-offtopic?
mark2 has quit [Remote host closed the connection]
eljimbo has joined #ruby
rubie has joined #ruby
frem has joined #ruby
<aspiers> anyone know of a stdlib or gem method which can convert Arrays like [1, 2, 3, 5, 7, 8, 10] to a string "1-3,5,7-8,10" ?
bronson has quit [Remote host closed the connection]
<apeiros> aspiers: nothing in stdlib. but let me scour my snippets lib. I think I wrote that once.
<aspiers> thanks!
<aspiers> I love that you obviously memorised most of stdlib in order to be able to answer that ;-)
benlieb has quit [Quit: benlieb]
hxegon has joined #ruby
chouhoulis has quit [Remote host closed the connection]
<apeiros> aspiers: it pays off to know core/stdlib
<aspiers> indeed
Silox| has quit [Quit: Connection closed for inactivity]
<Donkoko> your names look so much a like at first I thought aspiers is talking to himself/herself
<aspiers> Donkoko: it's not the first time we've been confused
<apeiros> Donkoko: we could still be the same person!
<aspiers> I often get misdirected messages
chouhoulis has joined #ruby
<Donkoko> :)
<apeiros> I believe I found my snippet
<aspiers> one of us should swap an 'o' for an 's' so we can be anagrams
pawnbox has joined #ruby
<aspiers> my childhood nickname was actually spiro
<Donkoko> aspiers: I also had a friend we called Spiro :)
<aspiers> heh
<apeiros> gets you an array of ranges. only a tiny step from there.
<aspiers> apeiros: great! worth gemifying, maybe? :)
<apeiros> are we npm? o0
<aspiers> lol
<apeiros> if you want, feel free to package it as a gem
<aspiers> I was just gonna say, then in a few years time, you could yank it and cause leftpad-gate II
jackjackdripper has quit [Quit: Leaving.]
<aspiers> hmm
<aspiers> I have a few other things which need gemifying - this might be good practice
<norc> apeiros, meh. at least put it inside a refinement? :p
<aspiers> what would be a good name?
Suntzu has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
* aspiers wonders what a refinement is
stunder has joined #ruby
pawnbox has quit [Ping timeout: 244 seconds]
<apeiros> norc: that code is from well before refinements
<norc> aspiers, one of the better recent features.
rodferso1 has quit [Quit: leaving]
<aspiers> norc: in npm?
<norc> &ri Refinement
<`derpy> No results
<norc> mmm
rodfersou has joined #ruby
<apeiros> you forget that I wrote ruby when it was still young! (well, not really young, but…)
rodfersou is now known as rodfersou|lunch
<norc> &ri refinements
<`derpy> No results
lsmola has quit [Ping timeout: 244 seconds]
chouhoulis has quit [Ping timeout: 276 seconds]
<apeiros> &ri Kernel#using
<`derpy> No results
<aspiers> I wrote my first Ruby in 2001, I think
<apeiros> eh, silly me
drewo has joined #ruby
<apeiros> &ri Module#using
<norc> aspiers, it is an elegant way of modifying classes you dont own with a greatly reduced chance of breaking things in the long run.
edwinvdgraaf has quit [Ping timeout: 248 seconds]
<aspiers> oh, that's awesome
<norc> (Though formally modifying classes you dont own is not elegant in the first place)
Balzrael has joined #ruby
<aspiers> I'm not sure I agree 100% with that last statement
<apeiros> norc: but that's the point of refinements - you don't modify the class
<norc> apeiros, duck typing, its effectively the same.
n008f4g_ has quit [Ping timeout: 260 seconds]
<apeiros> norc: no
howdoi has quit [Quit: Connection closed for inactivity]
<apeiros> norc: even with duck typing, it's still global
xue has joined #ruby
<apeiros> refinements are lexically scoped
<apeiros> and that's what makes them more robust for their intended purpose than other solutions
KensoDev has joined #ruby
<norc> apeiros, had that discussion with someone else the other day. Usually when people modify foreign classes, subclassing is the better solution.
<apeiros> I disagree
_blizzy_ has joined #ruby
<apeiros> subclassing classes you don't own is a bad idea
<apeiros> stuff you don't own -> composition over inheritance
stunder has quit [Ping timeout: 246 seconds]
<apeiros> but refinements are IMO playing in a different area
BLuEGoD has quit [Ping timeout: 260 seconds]
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
cdg has joined #ruby
<yxhuvud> apeiros: there are people that actually use refinements?
<apeiros> I'd assume so. I myself only started playing with it. and only recently. so I still haven't fully made up my mind.
blackjid has quit [Max SendQ exceeded]
<norc> yxhuvud, the main place where I use them to a great extend is my rails projects where I make all kinds of modifications to some of the core classes of ActiveRecord and ActiveSupport.
<apeiros> one short-coming I found with them was that it's hard to provide a way to do multiple separate refinements in a single go
baweaver has joined #ruby
blackjid has joined #ruby
rkazak has quit [Ping timeout: 244 seconds]
<norc> asm>> a = "foo"; puts a
<ruby[bot]> norc: I have disassembled your code, the result is at https://eval.in/546437
zeroDivisible has quit [Ping timeout: 246 seconds]
B1n4r10 has quit [Ping timeout: 244 seconds]
<apeiros> by that I mean: think of something of the scope of ActiveSupport - if you have to pull in each atomic refinement on its own then your code starts with 200 lines of "using …"
ascarter has joined #ruby
<norc> asm>> puts "#{""}"
<apeiros> it'd be nice to allow a way to enable "using ActiveSupport::All"
<ruby[bot]> norc: I have disassembled your code, the result is at https://eval.in/546438
machinewar has quit []
<apeiros> (in whichever way)
B1n4r10 has joined #ruby
element_zer0 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
hightower3 has joined #ruby
dopie has joined #ruby
benlieb has joined #ruby
pawnbox has joined #ruby
loc22 has joined #ruby
<norc> apeiros, you could easily do that by providing a wrapper module and using the included hook no?
xblade has joined #ruby
nobitanobi has quit [Remote host closed the connection]
<apeiros> norc: not sure that way would work. I do have a solution, though. but it'd be nice if there was a native solution.
<apeiros> my solution requires you to intercept the block evaluated in the refinement
jrafanie has quit [Quit: Textual IRC Client: www.textualapp.com]
baweaver has quit [Ping timeout: 248 seconds]
hightower2 has quit [Ping timeout: 246 seconds]
CausaMortis has joined #ruby
sergey_makagon has quit [Ping timeout: 260 seconds]
B1n4r10 has quit [Ping timeout: 246 seconds]
shinnya has joined #ruby
<norc> apeiros, Module#using is not permitted in methods (RuntimeError)
<norc> Sigh.
<norc> There goes my brilliant plan.
<apeiros> even if it was permitted
<apeiros> it's lexically scoped
Xiti has quit [Quit: Xiti]
<apeiros> that's why my solution "comes from the other side", so to speak
fedexo has joined #ruby
<apeiros> I compose the refinement module on the fly
<apeiros> i.e., `using Jacob::Support(:String, :Array)`
<norc> Oh well, guess it would not make much sense what I was trying indeed.
dipnlik has quit [Ping timeout: 268 seconds]
kam270 has quit [Ping timeout: 244 seconds]
johnmilton has quit [Remote host closed the connection]
sandstrom has joined #ruby
pawnbox has quit [Remote host closed the connection]
mistermo_ has joined #ruby
Guest58 has joined #ruby
<shevy> YES
whiteline has quit [Ping timeout: 250 seconds]
fedexo has quit [Ping timeout: 250 seconds]
Aviio has joined #ruby
<adaedra> NO
<apeiros> MAYBE
<shevy> oh you monad you!
freerobby has quit [Quit: Leaving.]
_stu_ has joined #ruby
freerobby has joined #ruby
pawnbox has joined #ruby
ChiefAle_ has quit [Remote host closed the connection]
<gizmore> Promise.new{"after all"}
Chagel has joined #ruby
_stu_ has quit [Client Quit]
kam270 has joined #ruby
Guest25154 has quit [Remote host closed the connection]
johnmilton has joined #ruby
Renich has joined #ruby
Guest58 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Snowy has quit [Remote host closed the connection]
Macaveli_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ivanskie_work has joined #ruby
ramfjord has joined #ruby
mtkd has quit [Ping timeout: 260 seconds]
baweaver has joined #ruby
stantona has joined #ruby
baweaver has quit [Remote host closed the connection]
johnmilton has quit [Remote host closed the connection]
pawnbox has quit [Ping timeout: 276 seconds]
platzhirsch has left #ruby [#ruby]
mtkd has joined #ruby
Chagel has quit [Ping timeout: 244 seconds]
blandflakes has joined #ruby
bkxd has joined #ruby
jaruga_ has quit [Quit: jaruga_]
hiyosi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
elzid has quit [Ping timeout: 248 seconds]
the_drow has quit [Quit: This computer has gone to sleep]
bkxd has quit [Ping timeout: 244 seconds]
davedev24 has quit [Remote host closed the connection]
davedev24 has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
mikecmpbll has joined #ruby
pawnbox has joined #ruby
mrgrieves has joined #ruby
evidex has quit [Remote host closed the connection]
Renich has quit [Ping timeout: 244 seconds]
Devalo has joined #ruby
Renich has joined #ruby
bronson has joined #ruby
stannard has quit [Remote host closed the connection]
xue has quit [Ping timeout: 248 seconds]
stannard has joined #ruby
choke has joined #ruby
KensoDev has quit [Quit: Textual IRC Client: www.textualapp.com]
pawnbox has quit [Remote host closed the connection]
bronson has quit [Remote host closed the connection]
bronson has joined #ruby
pawnbox has joined #ruby
Devalo has quit [Ping timeout: 250 seconds]
sudoubuntu has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
smathy has joined #ruby
B1n4r10 has joined #ruby
sudoubuntu has joined #ruby
al2o3-cr has joined #ruby
Cohedrin has joined #ruby
rodfersou|lunch is now known as rodfersou
johnmilton has joined #ruby
stunder has joined #ruby
tvw has quit [Ping timeout: 276 seconds]
pawnbox has quit [Remote host closed the connection]
Cohedrin_ has joined #ruby
ramfjord has quit [Ping timeout: 248 seconds]
mrgrieves has quit [Ping timeout: 246 seconds]
scepticulous has joined #ruby
Cohedrin has quit [Ping timeout: 244 seconds]
xue has joined #ruby
n0xff has left #ruby [#ruby]
Zai00 has quit [Quit: Zai00]
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
johnbat26 has joined #ruby
malconis has joined #ruby
scepticulous has quit [Ping timeout: 244 seconds]
kobain has quit [Ping timeout: 260 seconds]
xblade has quit [Remote host closed the connection]
pawnbox has joined #ruby
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
scepticulous has joined #ruby
hxegon is now known as hxegon_AFK
davedev24 has quit [Read error: Connection reset by peer]
jt__ has joined #ruby
davedev24 has joined #ruby
<ncopa> norc: it was a bug in musl
<ncopa> thanks for your help!
wof_ is now known as wof
johnbat26 has quit [Read error: Connection reset by peer]
andikr has quit [Remote host closed the connection]
johnbat26 has joined #ruby
sudoubuntu has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
darkxploit has joined #ruby
mtkd has quit [Ping timeout: 244 seconds]
rbennacer has quit [Remote host closed the connection]
ssiris has quit [Quit: End of Line]
mtkd has joined #ruby
rbennacer has joined #ruby
scepticulous has quit [Ping timeout: 248 seconds]
dagda1 has joined #ruby
SCHAAP137 has joined #ruby
ascarter has joined #ruby
halfamind has quit [Quit: Leaving.]
dopie has quit [Ping timeout: 264 seconds]
misterm__ has joined #ruby
ascarter has quit [Max SendQ exceeded]
misterm__ has quit [Remote host closed the connection]
ascarter has joined #ruby
mistermo_ has quit [Ping timeout: 252 seconds]
mistermo_ has joined #ruby
shmuli has joined #ruby
kirun has joined #ruby
B1n4r10 has quit [Ping timeout: 276 seconds]
halfamind has joined #ruby
djbkd has joined #ruby
halfamind1 has joined #ruby
halfamind has quit [Read error: Connection reset by peer]
halfamind has joined #ruby
halfamind1 has quit [Read error: Connection reset by peer]
postmodern has joined #ruby
Xeago has joined #ruby
Aviio has quit [Remote host closed the connection]
baweaver has joined #ruby
threh has quit [Ping timeout: 276 seconds]
cb has quit [Read error: Connection reset by peer]
hxegon_AFK has quit [Quit: BRB]
shinnya has quit [Ping timeout: 244 seconds]
hk238 has quit [Quit: http://www.kvirc.net/ 4.9.1 Aria]
rodfersou is now known as rodfersou|afk
bkxd has joined #ruby
baweaver has quit [Ping timeout: 264 seconds]
BLuEGoD has joined #ruby
baweaver has joined #ruby
BLuEGoD is now known as Guest89319
Guest89319 has quit [Client Quit]
cb has joined #ruby
scepticulous has joined #ruby
hxegon has joined #ruby
workmad3 has quit [Ping timeout: 248 seconds]
rbennacer has quit [Remote host closed the connection]
chouhoulis has joined #ruby
Cohedrin has joined #ruby
tubuliferous_ has joined #ruby
bkxd has quit [Ping timeout: 276 seconds]
dmr8 has joined #ruby
mistermo_ has quit [Remote host closed the connection]
babblebre has joined #ruby
Cohedrin_ has quit [Ping timeout: 244 seconds]
loc22 has quit [Quit: Lingo: www.lingoirc.com]
mistermo_ has joined #ruby
zast has quit [Remote host closed the connection]
ramfjord has joined #ruby
tubuliferous_ has quit [Remote host closed the connection]
ereslibre_laptop is now known as ereslibre
madgen has quit [Ping timeout: 248 seconds]
Pintor has joined #ruby
Pintor has left #ruby [#ruby]
baweaver changed the topic of #ruby to: Rules & more: http://ruby-community.com || Ruby 2.3.0; 2.2.4; 2.1.9: https://ruby-lang.org || Paste >3 lines of text on https://gist.github.com || log @ http://irclog.whitequark.org/ruby/ || Ruby 3.0 release announcement: https://goo.gl/SsAhv
codecop has joined #ruby
codecop_ has joined #ruby
Armaggedon has joined #ruby
<adaedra>
hightower3 has quit [Ping timeout: 264 seconds]
codecop_ has quit [Client Quit]
adaedra changed the topic of #ruby to: Ruby 3.0 release announcement: https://goo.gl/SsAhv
nando293921 has quit [Quit: Lost terminal]
<llua> :|
Armaggedon has quit [Quit: Page closed]
nugit has quit [Quit: Leaving]
_stu_ has joined #ruby
B1n4r10 has joined #ruby
Donkoko has quit [Remote host closed the connection]
sauvin has quit [Read error: Connection reset by peer]
_stu_ has quit [Client Quit]
<baweaver>
dagda1 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tubuliferous has joined #ruby
jackjackdripper has joined #ruby
jackjackdripper has quit [Read error: Connection reset by peer]
shadoi has joined #ruby
jackjackdripper has joined #ruby
jackjackdripper1 has joined #ruby
jackjackdripper has quit [Read error: Connection reset by peer]
mrgrieves has joined #ruby
The_Phoenix has joined #ruby
The_Phoenix has quit [Max SendQ exceeded]
The_Phoenix has joined #ruby
radza_ has quit [Read error: Connection reset by peer]
hightower3 has joined #ruby
crazydiamond has joined #ruby
The_Phoenix has quit [Max SendQ exceeded]
CausaMortis has quit [Ping timeout: 244 seconds]
PedramT has joined #ruby
mrgrieves has quit [Ping timeout: 248 seconds]
The_Phoenix has joined #ruby
iamvery has quit [Ping timeout: 240 seconds]
The_Phoenix has quit [Max SendQ exceeded]
xaxisx has joined #ruby
madgen has joined #ruby
darkxploit has quit [Ping timeout: 260 seconds]
The_Phoenix has joined #ruby
luise_ has quit [Ping timeout: 250 seconds]
lemur has joined #ruby
jackjackdripper1 has quit [Quit: Leaving.]
jackjackdripper has joined #ruby
The_Phoenix has quit [Max SendQ exceeded]
dopamean_ has joined #ruby
pawnbox has quit [Remote host closed the connection]
polysics_ has joined #ruby
The_Phoenix has joined #ruby
Khaki has quit [Ping timeout: 252 seconds]
johnbat26 has quit [Quit: KVIrc 4.9.1 Aria http://www.kvirc.net/]
mdw has joined #ruby
xue has quit [Ping timeout: 246 seconds]
polysics has quit [Ping timeout: 244 seconds]
Jackneill has joined #ruby
lemur has quit [Ping timeout: 248 seconds]
kriskropd has quit [Quit: WeeChat 0.4.2]
<baweaver>
<mozzarella> I knew what it would be before clicking
Xeago has quit [Read error: Connection reset by peer]
iamvery has joined #ruby
<baweaver> Yep. Beautiful
dravine_ has joined #ruby
pawnbox has joined #ruby
dravine has quit [Ping timeout: 244 seconds]
dravine_ is now known as dravine
Xeago has joined #ruby
scepticulous has quit [Ping timeout: 248 seconds]
mistermo_ has quit [Remote host closed the connection]
Ishido has joined #ruby
mostlybadfly has quit [Quit: Connection closed for inactivity]
mistermo_ has joined #ruby
andywojo has quit [Ping timeout: 246 seconds]
darkxploit has joined #ruby
mistermo_ has quit [Remote host closed the connection]
baweaver has quit [Remote host closed the connection]
symm- has joined #ruby
Xeago has quit [Read error: Connection reset by peer]
m8 has joined #ruby
drewo has quit [Ping timeout: 260 seconds]
darkxploit has quit [Max SendQ exceeded]
blackmesa has joined #ruby
al2o3-cr has quit [Ping timeout: 244 seconds]
mistermo_ has joined #ruby
mistermo_ has quit [Read error: Connection reset by peer]
cpup has quit [Ping timeout: 260 seconds]
B1n4r10 has quit [Ping timeout: 260 seconds]
mistermo_ has joined #ruby
krz has quit [Read error: Connection reset by peer]
snguyen has joined #ruby
tercenya has quit []
tristanp_ has joined #ruby
PedramT has quit [Ping timeout: 244 seconds]
ivanskie_work has quit [Quit: Going offline, see ya! (www.adiirc.com)]
Xeago has joined #ruby
B1n4r10 has joined #ruby
tristanp has quit [Ping timeout: 244 seconds]
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Gasher has quit [Ping timeout: 268 seconds]
idle_task is now known as idletask
Regulati_ has joined #ruby
symm- has quit [Ping timeout: 250 seconds]
Donkoko has joined #ruby
<Donkoko> hahah, that april's fools
ascarter has joined #ruby
<tvon> 4/1 is the worst day for the internet
RegulationD has quit [Ping timeout: 248 seconds]
<Ox0dea> I guess that's one way to spell "best".
B1n4r10 has quit [Ping timeout: 264 seconds]
moeabdol1 has quit [Ping timeout: 248 seconds]
al2o3-cr has joined #ruby
dionysus69 has joined #ruby
nibbo_ has quit [Ping timeout: 240 seconds]
<hanmac> Donkoko: the jokes of today, will become the new features of apple tomorrow ;P
dagda1 has joined #ruby
darkxploit has joined #ruby
The_Phoenix has quit [Read error: Connection reset by peer]
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
trinaldi has quit [Ping timeout: 276 seconds]
<shevy> the worst joke will be when some of these jokes become reality!
cpup has joined #ruby
<Donkoko> shevy: still not sure if bash on windows is a joke or fo real
<eam> gmail's launch was announced on april 1st
<shevy> Donkoko yeah, they prepared it really good
<shevy> several days before
<Donkoko> haha
choke has joined #ruby
mdw has quit [Quit: Sleeping Zzzzz]
<shevy> let's open up the "april fool WEEK" :)
B1n4r10 has joined #ruby
bigkevmcd has quit [Quit: Outta here...]
<choke> sounds good chevy, i'm implementing april fools day within our api as we speak...
<choke> shevy*
momomomomo has joined #ruby
joneshf-laptop has quit [Ping timeout: 248 seconds]
nibbo has joined #ruby
B1n4r10_ has joined #ruby
drewo has joined #ruby
<shevy> I try to do serious work!
<adaedra> They should move next US election results on 1/4 too.
symm- has joined #ruby
B1n4r10 has quit [Ping timeout: 244 seconds]
yfeldblum has joined #ruby
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy> hmm the elections are a year long april joke!
Dimik has joined #ruby
n008f4g_ has joined #ruby
ascarter has joined #ruby
Mon_Ouie has joined #ruby
tristanp_ has quit [Read error: Connection reset by peer]
tristanp has joined #ruby
<eljimmy> damnit. got me.
ekinmur has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rmulligan has joined #ruby
ekinmur has joined #ruby
Ishido has quit [Quit: Roads? Where We're Going We Don't Need Roads.]
dopie has joined #ruby
scepticulous has joined #ruby
yqt has joined #ruby
dravine_ has joined #ruby
DonOtreply has joined #ruby
BrunoSaboia has joined #ruby
BSaboia has quit [Ping timeout: 240 seconds]
dravine has quit [Ping timeout: 248 seconds]
dravine_ is now known as dravine
al2o3-cr1 has joined #ruby
scarab1 has joined #ruby
<scarab1> What is a good alternative to Sinatra?
<havenwood> scarab1: Roda
swills has quit [Quit: Leaving]
<tvon> rails!
smoose has quit [Remote host closed the connection]
<havenwood> scarab1: It has a lovely plugin system so you can compose your app and there are a variety of other wins.
mrgrieves has joined #ruby
al2o3-cr has quit [Ping timeout: 244 seconds]
momomomomo has quit [Quit: momomomomo]
smoose has joined #ruby
ramfjord_ has joined #ruby
<havenwood> scarab1: jeremyevans often hangs out in the #roda channel
ramfjord has quit [Read error: Connection reset by peer]
johnmilton has quit [Remote host closed the connection]
freerobby has quit [Quit: Leaving.]
sneakerhax has joined #ruby
mdw has joined #ruby
mrgrieves has quit [Ping timeout: 248 seconds]
<tubbo> rails
<scarab1> havenwood: thanks
<scarab1> I won't touch rails, but thanks
Dimik has quit [Ping timeout: 248 seconds]
rodfersou|afk is now known as rodfersou
parduse has quit []
<shevy> hehe
n_blownapart has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
PedramT has joined #ruby
scepticulous has quit [Ping timeout: 260 seconds]
scarab1 has quit [Quit: [BX] Mr. Rogers uses BitchX. Won't you be my neighbor?]
tjohnson has quit [Quit: Connection closed for inactivity]
Devalo has joined #ruby
smathy is now known as smathy_afk
cdg has quit [Remote host closed the connection]
cdg has joined #ruby
PedramT has quit [Ping timeout: 246 seconds]
hxegon has quit [Quit: BRB]
hxegon has joined #ruby
Don_John has joined #ruby
baweaver has joined #ruby
joneshf-laptop has joined #ruby
dopie has quit [Ping timeout: 246 seconds]
dravine_ has joined #ruby
cdg has quit [Ping timeout: 260 seconds]
dunpeal has joined #ruby
dravine has quit [Ping timeout: 276 seconds]
dravine_ is now known as dravine
andywojo has joined #ruby
nanoz has quit [Ping timeout: 240 seconds]
<shevy> oh we need this https://rubygems.org/gems/phuby
cdg has joined #ruby
<dunpeal> Hi. I am looking for a good solution for integration testing a web application. Besides Capybara, is there anything else I should check out?
cdg has quit [Remote host closed the connection]
DonOtreply has quit [Quit: DonOtreply]
baweaver has quit [Ping timeout: 252 seconds]
gizmore has quit [Quit: KVIrc 4.9.1 Aria http://www.kvirc.net/]
<yorickpeterse> adaedra: I HATE YOU
<yorickpeterse> FK YOU FOR THAT /TOPIC
<yorickpeterse> This is the 2nd time I get rickrolled today
<yorickpeterse> (╯°□°)╯︵ ┻━┻
blackmesa has quit [Ping timeout: 276 seconds]
<apeiros> trollol
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ascarter has joined #ruby
ur5us has joined #ruby
ur5us has quit [Remote host closed the connection]
Chagel has joined #ruby
gizmore has joined #ruby
djbkd has quit [Remote host closed the connection]
al2o3-cr has joined #ruby
djbkd has joined #ruby
BTRE has quit [Quit: Leaving]
pawnbox has quit [Remote host closed the connection]
freerobby has joined #ruby
ur5us has joined #ruby
mfb2 has joined #ruby
Chagel has quit [Ping timeout: 276 seconds]
pawnbox has joined #ruby
lxsameer has quit [Ping timeout: 250 seconds]
phaza has joined #ruby
al2o3-cr1 has quit [Ping timeout: 248 seconds]
uglybandersnatch has joined #ruby
bkxd has joined #ruby
<choke> speaking of rickroll, april fools day in the api is complete ;)
djbkd has quit [Ping timeout: 244 seconds]
IrishGringo has quit [Ping timeout: 246 seconds]
choke has quit [Remote host closed the connection]
blackmesa has joined #ruby
choke has joined #ruby
cpup has quit [Ping timeout: 240 seconds]
uglybandersnatch has quit [Ping timeout: 252 seconds]
B1n4r10_ has quit [Ping timeout: 244 seconds]
bkxd has quit [Ping timeout: 276 seconds]
cpup has joined #ruby
parduse has joined #ruby
<adaedra> yorickpeterse: if I may. http://irclog.whitequark.org/ruby/2016-04-01#16009275;
blitheBoudica has joined #ruby
drewo has quit [Ping timeout: 244 seconds]
cpup has quit [Ping timeout: 244 seconds]
<adaedra> seems like _whitelogger doesn't like emoji.
rbennacer has joined #ruby
htmldrum has joined #ruby
sigurding has quit [Quit: sigurding]
cpup has joined #ruby
<apeiros> no bot likes emoji
spider-mario has joined #ruby
<apeiros> characters to express feelings - that just goes to remind them that they don't have any!
<Ox0dea> Yet.
gheegh has joined #ruby
<apeiros> which of course makes them feel bad
<`derpy>
Aviio has joined #ruby
<gheegh> Hey guys.. question. Anyone doing Amazon Map Reduce Jobs in ruby code? I'm looking for some sort of best current practice... as all the stuff out there is like 4 years old on the internet.
B1n4r10 has joined #ruby
<apeiros> 4 yo code can't work, amirite?
rehat has quit [Remote host closed the connection]
<systemsgotyou> when would you use a stored procedure and when would you use a function?
petricore has joined #ruby
petricore has quit [Client Quit]
<choke> of course it can work... but best practices changing so often, there's a big chance that 4yo code goes against todays development standards.
<gheegh> Wukong's last update was in 2014..
iNs has joined #ruby
Xiti has joined #ruby
chouhoulis has quit []
<moss> hello
jt__ has quit [Remote host closed the connection]
<moss> how do I include a variable in a file that I need opened?
parduse has quit []
<moss> for instance: File.foreach('/etc/sysconfig/network-scripts/ifcfg-' + interface)
djbkd has joined #ruby
<adaedra> what's wrong with this method?
_blizzy_ has quit [Quit: Leaving]
<apeiros> systemsgotyou: I think you want to ask that in #whicheverdbyouuse
chouhoulis has joined #ruby
mistermocha has quit [Ping timeout: 276 seconds]
dling` has quit []
maletor has joined #ruby
rbennacer has quit [Remote host closed the connection]
chouhoulis has quit [Remote host closed the connection]
dvinciguerra has quit [Ping timeout: 244 seconds]
chouhoulis has joined #ruby
rbennacer has joined #ruby
dn` has quit [Quit: dn`]
yfeldblum has quit [Ping timeout: 268 seconds]
codecop has quit [Remote host closed the connection]
skweek has joined #ruby
uglybandersnatch has joined #ruby
BTRE has joined #ruby
jt__ has joined #ruby
kpwarr_ has quit [Quit: leaving]
mistermocha has joined #ruby
uglybandersnatch has quit [Ping timeout: 244 seconds]
GodFather has quit [Ping timeout: 244 seconds]
baweaver has joined #ruby
dagda1 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Aviio has quit [Remote host closed the connection]
GodFather has joined #ruby
uglybandersnatch has joined #ruby
mistermocha has quit [Ping timeout: 248 seconds]
elaptics is now known as elaptics`away
mistermocha has joined #ruby
baweaver has quit [Ping timeout: 248 seconds]
kobain has joined #ruby
joneshf-laptop has quit [Ping timeout: 246 seconds]
blandflakes has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
jenrzzz has quit [Ping timeout: 244 seconds]
skade has joined #ruby
diegoaguilar has quit [Ping timeout: 248 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
DTZUZU has joined #ruby
uglybandersnatch has quit [Ping timeout: 244 seconds]
tristanp_ has joined #ruby
Meow-J has quit [Quit: Connection closed for inactivity]
chouhoul_ has joined #ruby
tristanp has quit [Ping timeout: 268 seconds]
duckpuppy has quit [Ping timeout: 252 seconds]
Ormm has joined #ruby
chouhoulis has quit [Ping timeout: 246 seconds]
Spami has quit [Ping timeout: 244 seconds]
tvw has joined #ruby
Xiti has quit [Quit: Xiti]
bullets has joined #ruby
baweaver has joined #ruby
rodfersou has quit [Quit: leaving]
Spami has joined #ruby
brent_ has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
n_blownapart has quit [Remote host closed the connection]
nibbo has quit [Ping timeout: 244 seconds]
shmuli has quit [Remote host closed the connection]
mistermocha has quit [Ping timeout: 250 seconds]
rehat has joined #ruby
rehat has joined #ruby
Aviio has joined #ruby
<baweaver>
Gasher has joined #ruby
diegoaguilar has joined #ruby
<shevy> see what you did there baweaver! <yorickpeterse> adaedra: I HATE YOU
<baweaver> <3
<adaedra> <3
<bullets> oh it's pril
<bullets> almost fell for that
<bullets> April
<baweaver> shevy ruined our fun
blackmesa has quit [Ping timeout: 248 seconds]
B1n4r10 has quit [Ping timeout: 260 seconds]
drewo has joined #ruby
devbug has joined #ruby
joneshf-laptop has joined #ruby
<shevy> I must protect this world from Rick
<baweaver> .!kick shevy
<shevy> .!rick !!!
dagda1 has joined #ruby
<ruurd> lame!
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
dopie has joined #ruby
<adaedra> Too bad for them if they can't fun a little ¯\_(ツ)_/¯
mistermocha has joined #ruby
blackmesa has joined #ruby
<brent_> looking for some help on creating a list of a Nodes children on creation
halfamind has quit [Quit: Leaving.]
<brent_> on intialization of an an instance fo the object
<rehat> is there a way to change my ip in ruby lol? I'm such a noob. I wrote a screen scraper and the site banned my ip lol
go|dfish has quit [Ping timeout: 244 seconds]
<brent_> https://gist.github.com/brentgsw/c9a1830b2777fbb847ee98d5cb2d78aa is the class. trying to understand how to best have Node#method called on initialization
<brent_> sorry Node#children method
LHdez has joined #ruby
Azure has joined #ruby
Lomex_ has joined #ruby
go|dfish has joined #ruby
Spami has quit [Ping timeout: 248 seconds]
Suntzu has quit [Read error: Connection reset by peer]
halfamind has joined #ruby
<bullets> rehat: you can try resetting your router
jottr has joined #ruby
rippa has joined #ruby
snguyen has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<rehat> bullets: haha I was looking for something to prevent getting banned for future scrapes. I'll try adding a random sleep but I read online that I should use ip rotating or a proxy service but I'm now familiar with that stuff. I guess I read a wiki lol
nibbo has joined #ruby
rippa has quit [Client Quit]
n008f4g_ has quit [Ping timeout: 244 seconds]
stannard has quit [Remote host closed the connection]
stannard has joined #ruby
Spami has joined #ruby
ur5us has quit [Remote host closed the connection]
Spami has quit [Remote host closed the connection]
mg^ has quit [Ping timeout: 240 seconds]
n008f4g_ has joined #ruby
baweaver has quit [Remote host closed the connection]
mg^ has joined #ruby
gregf has quit [Quit: WeeChat 1.4]
mistermocha has quit [Ping timeout: 264 seconds]
dionysus69 has quit [Ping timeout: 244 seconds]
dopie has quit [Ping timeout: 244 seconds]
GitGud has quit [Quit: going to sleep attempt no. 1]
mistermocha has joined #ruby
r0b3rt has joined #ruby
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
shadoi has quit [Quit: Leaving.]
bronson has quit [Remote host closed the connection]
BSab has joined #ruby
vdamewood has joined #ruby
ldnunes has quit [Quit: Leaving]
shmuli has joined #ruby
BrunoSaboia has quit [Ping timeout: 268 seconds]
skade has joined #ruby
aupadhye has quit [Ping timeout: 248 seconds]
norc has quit [Ping timeout: 240 seconds]
Suntzu has joined #ruby
dunpeal has quit [Ping timeout: 276 seconds]
GodFather has quit [Ping timeout: 240 seconds]
Aviio has quit [Remote host closed the connection]
yfeldblum has joined #ruby
brendan- has quit [Quit: Textual IRC Client: www.textualapp.com]
choke has quit [Quit: Textual IRC Client: www.textualapp.com]
polll has joined #ruby
haylon has quit [Quit: WeeChat 1.4]
mostlybadfly has joined #ruby
m8 has quit [Quit: Sto andando via]
Technodrome has joined #ruby
duckpuppy has joined #ruby
GodFather has joined #ruby
axl_ has quit [Quit: axl_]
sudoubuntu has joined #ruby
ur5us has joined #ruby
mdw has quit [Quit: Sleeping Zzzzz]
Aviio has joined #ruby
drewo has quit [Ping timeout: 244 seconds]
<majuscule> can someone give me super simple explanation of the difference between foo[:bar] and foo['bar']? it's driving me crazy. or a link to some good documentation would be cool too :-)
baweaver has joined #ruby
<apeiros> majuscule: do you understand the difference between foo["1"] and foo[1]?
<majuscule> the first is a string, the second is an index
<apeiros> um, no?
<apeiros> the second is an integer (or a number). an integer can be an index, but in this case, both are a key.
<apeiros> but you understand that both are keys? and that they look similar, but they are different keys?
duckpuppy has quit [Ping timeout: 276 seconds]
blitheBoudica has left #ruby ["Leaving..."]
<majuscule> ahh sorry, that's essentially what i meant, the key in the first is a string, the second is an integer, and generally numerical keys are indexes
<majuscule> yes
<majuscule> i do
<havenwood> majuscule: Are you familiar with `:bar.class` and `'bar'.class`?
<apeiros> same thing with "foo" and :foo
swills has joined #ruby
FooMunki has quit [Quit: FooMunki]
<apeiros> one thing is a string, the other a symbol. they look similar, but they are not the same. they can both be used as a key.
polll has quit [Ping timeout: 264 seconds]
<majuscule> ahh okay. that makes sense.
FooMunki has joined #ruby
<majuscule> and is there generally a reason to choose one over the other when defining a hash?
<apeiros> symbols are more light-weight and faster
<havenwood> majuscule: Hash keys are often Symbols. You'd not want to do that if say the key was determined by user input.
darkf has joined #ruby
stannard has quit [Remote host closed the connection]
<apeiros> but they're bad if the set of possible keys is not finite
<majuscule> hrmm
smathy_afk is now known as smathy
<majuscule> interesting
<majuscule> alright
<apeiros> which means that e.g. they're not good for user input (because you don't know all possible user inputs)
ljames has quit []
<apeiros> also ruby internally uses symbols to identify everything in code which has a name (methods, variables)
dhollinger has quit [Quit: WeeChat 1.4]
bronson has joined #ruby
n008f4g_ has quit [Ping timeout: 260 seconds]
eljimbo has quit [Quit: This computer has gone to sleep]
ekinmur has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
drewo has joined #ruby
eljimbo has joined #ruby
xaxisx has quit [Ping timeout: 244 seconds]
grill has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea> apeiros: Almost.
dopamean_ has quit [Quit: WeeChat 1.3]
<Ox0dea> >> RubyVM::INSTRUCTION_NAMES.grep Symbol
<ruby[bot]> Ox0dea: # => [] (https://eval.in/546543)
halfamind has quit [Quit: Leaving.]
mfb2_ has joined #ruby
havenwood changed the topic of #ruby to: Ruby 3.0 release announcement: https://goo.gl/SsAhv
FooMunki has quit [Quit: FooMunki]
mfb2_ has quit [Remote host closed the connection]
tubuliferous has quit [Remote host closed the connection]
mfb2_ has joined #ruby
jero_ has quit [Ping timeout: 260 seconds]
<apeiros> Ox0dea: eh?
mfb2_ has quit [Remote host closed the connection]
n_blownapart has joined #ruby
<apeiros> $ ruby -e 'p Symbol.all_symbols.grep(/Symbol/)' -> [:Symbol]
mfb2_ has joined #ruby
noService has joined #ruby
mfb2 has quit [Ping timeout: 244 seconds]
shmuli has quit [Remote host closed the connection]
bkxd has joined #ruby
p0wn3d has joined #ruby
Devalo has quit [Remote host closed the connection]
p0wn3d has quit [Client Quit]
p0wn3d has joined #ruby
barajasfab has quit [Quit: Leaving]
quazimodo has joined #ruby
biberu has quit []
gizless has joined #ruby
hiyosi has joined #ruby
mdw has joined #ruby
bkxd has quit [Ping timeout: 264 seconds]
ecksit has joined #ruby
gheegh has quit [Ping timeout: 248 seconds]
mistermocha has quit [Remote host closed the connection]
gizmore has quit [Ping timeout: 260 seconds]
Aviio has quit [Remote host closed the connection]
<baweaver>
bry4n_ has quit [Ping timeout: 248 seconds]
halfamind has joined #ruby
<havenwood> 3x faster... mmhmm!
<bullets> I hadn't seen the link of the ruby 3 release
<apeiros> I heard 30x
<bullets> I'm pleased
<smathy> Weird choice to go fully functional though.
n_blownapart has quit [Remote host closed the connection]
dunpeal has joined #ruby
<havenwood>
<bullets> Ruby 5.0 when?
zeroDivisible has joined #ruby
ur5us has quit [Remote host closed the connection]
<baweaver> smathy: Yeah, I was surprised that they went with immutable values all around
<havenwood> smathy: True, and the macros will take some getting accustomed to.
<baweaver> Though the pattern matching in the video is amazing, Matz really hit it out of the park
<apeiros> but did they really have to switch to pythonesque meaningful whitespace instead of `end`?
<baweaver> I'm just happy they finally required parens
marsjaninzmarsa has quit [Excess Flood]
<baweaver> apeiros: it'll take some getting used to
marsjaninzmarsa has joined #ruby
<apeiros> thanks god for the --old-and-shitty-code compat switch
Aviio has joined #ruby
<baweaver> pretty sure that's their joke feature
<shevy> now you guys are talking about python3!
rbennacer has quit [Remote host closed the connection]
<baweaver> No, just that much has changed in Ruby 3
<baweaver> A lot of bold decisions
<smathy> It makes Angular 2 look like a backwardly compatible bugfix.
<baweaver> Heck, they even made Python 3 look tame
LaT0rtue has quit [Read error: Connection reset by peer]
p0wn3d has quit [Quit: WeeChat 1.2]
p0wn3d has joined #ruby
baweaver has quit [Remote host closed the connection]
<smathy> Not Perl6 though, that still looks like a Dali painting.
n_blownapart has joined #ruby
<Ox0dea> apeiros: I'm confused by your confusion.
<shevy> lol
<apeiros> let me recurry that
<Ox0dea> Regarding "names are always Symbols", that's not the case for RubyVM::INSTRUCTION_NAMES; they're Strings.
<Ox0dea> I'm not sure why.
chouhoul_ has quit [Remote host closed the connection]
<apeiros> you misunderstood me
<Ox0dea> Your use of `grep(/Symbol/)` seems to belie that you did the misunderstanding. :/
<apeiros> ruby internally identifies things with symbols, as that's how it came to be
abyx has quit [Quit: This computer has gone to sleep]
workmad3 has joined #ruby
rbennacer has joined #ruby
kobain has quit [Ping timeout: 260 seconds]
n_blownapart has quit [Ping timeout: 244 seconds]
BTRE has quit [Ping timeout: 240 seconds]
freerobby has quit [Quit: Leaving.]
n_blownapart has joined #ruby
ecksit has quit []
rbennacer has quit [Ping timeout: 264 seconds]
stunder has quit [Ping timeout: 264 seconds]
htmldrum has quit [Ping timeout: 248 seconds]
Donkoko has quit [Remote host closed the connection]
karioleez has quit [Remote host closed the connection]
pawnbox has quit [Remote host closed the connection]
babblebre has quit [Quit: Connection closed for inactivity]
karioleez has joined #ruby
freerobby has joined #ruby
mg^ has quit [Quit: Leaving]
pawnbox has joined #ruby
mg^ has joined #ruby
BTRE has joined #ruby
diegoviola has joined #ruby
bkxd has joined #ruby
n_blownapart has quit [Ping timeout: 264 seconds]
zenlot6 has joined #ruby
baweaver has joined #ruby
karioleez has quit [Ping timeout: 252 seconds]
n_blownapart has joined #ruby
pawnbox has quit [Ping timeout: 250 seconds]
zenlot has quit [Ping timeout: 260 seconds]
abyx has joined #ruby
rubie has quit [Remote host closed the connection]
halfamind has quit [Quit: Leaving.]
kirun has quit [Quit: Client exiting]
freerobby has quit [Quit: Leaving.]
baweaver has quit [Ping timeout: 248 seconds]
bullets has quit [Quit: leaving]
karioleez has joined #ruby
baweaver has joined #ruby
Coldblackice_ has quit []
Rahul_Roy has quit [Quit: Connection closed for inactivity]
n_blownapart has quit [Ping timeout: 248 seconds]
triangles2 has joined #ruby
Canar has quit [Quit: WeeChat 1.4]
Lomex_ has quit [Remote host closed the connection]
dmr8 has quit [Quit: Leaving]
last_staff has joined #ruby
pawnbox has joined #ruby
Coldblackice has joined #ruby
triangles has quit [Ping timeout: 264 seconds]
karioleez has quit [Ping timeout: 276 seconds]
Inside has joined #ruby
Inside has joined #ruby
mfb2_ has quit [Read error: Connection reset by peer]
bkxd has quit [Ping timeout: 252 seconds]
poguez_ has joined #ruby
bry4n_ has joined #ruby
ssiris has joined #ruby
Renich has quit [Ping timeout: 252 seconds]
bkxd has joined #ruby
davedev24 has quit []
djbkd has quit [Quit: My people need me...]
Renich has joined #ruby
bry4n has quit [Ping timeout: 250 seconds]
bronson has quit [Remote host closed the connection]
Aviio has quit [Remote host closed the connection]
jottr has quit [Ping timeout: 244 seconds]
dunpeal has quit [Quit: Lost terminal]
Lomex_ has joined #ruby
<brent_> Ox0dea, wondering if you would take a quick look at my mazesolver. Wasn't able to work on it for a few days
Lomex_ has quit [Remote host closed the connection]
<brent_> trying to see if you think i'm on the right path
bkxd has quit [Ping timeout: 248 seconds]
bruce_lee has quit [Remote host closed the connection]
bkxd has joined #ruby
kies has quit [Ping timeout: 276 seconds]
snguyen has joined #ruby
Jackneill has quit [Ping timeout: 268 seconds]
cpruitt has quit [Quit: cpruitt]
ur5us has joined #ruby
halfamind has joined #ruby
bkxd has quit [Ping timeout: 260 seconds]
davedev24 has joined #ruby
karioleez has joined #ruby
bkxd has joined #ruby
halfamind has quit [Client Quit]
skade has quit [Quit: Computer has gone to sleep.]
siaw has quit [Quit: siaw]
<smathy> Hey, within a case statement, is there some shorthand to refer to the subject of the case, like `case "Foo" when <something here>.downcase == "foo" ` or even more commonly: `case "blah" when...when...when...else <something here> end` ?
magikid has joined #ruby
htmldrum has joined #ruby
kobain has joined #ruby
<smathy> (I end up doing `case s = "foo"; when ....` a fair bit :)
karioleez has quit [Ping timeout: 244 seconds]
shmuli has joined #ruby
bkxd has quit [Remote host closed the connection]
freerobby has joined #ruby
<baweaver> lambdas would be the only way I could think of
Madplatypus has joined #ruby
bronson has joined #ruby
<baweaver> when -> v { v.downcase == foo }
<pizzaops> This really feels like it should be a "map" to me not an "each", but map obviously returns an array not a hash, so yeah...any thoughts? https://gist.github.com/pizzaops/1f44b4e37bc2c57272c227102d83f851
<baweaver> or you could make a builder to get syntax like this:
<baweaver> when case_subject.downcase.eq(foo)
<pizzaops> I mean it's basically fine as is, I'm just curious if there's a better way than yet another `.each`
toretore has joined #ruby
htmldrum has quit [Ping timeout: 264 seconds]
<Papierkorb> pizzaops: sorry forgot to change #each to #map, fixed
<Papierkorb> +now
kappy has quit [Quit: Lost terminal]
<baweaver> >> Person = Struct.new(:name, :age); [Person.new('bob', 25), Person.new('jane', 25)].map{|person| [person.name, person]}.to_h
<ruby[bot]> baweaver: # => {"bob"=>#<struct Person name="bob", age=25>, "jane"=>#<struct Person name="jane", age=25>} (https://eval.in/546548)
<baweaver> rails has #index_by
<pizzaops> Papierkorb: so calling .to_hash on an array of arrays where each item is an array of length 2 converts it to a hash?
<baweaver> could also use group_by, though that returns collections
<Papierkorb> pizzaops: Array#to_h expects the array to contain only arrays, with each of those arrays containing exactly two values. the first value will be the key, the second value will be the value
Renich has quit [Quit: leaving]
<pizzaops> that's perfect, thanks
duckpuppy has joined #ruby
<baweaver> >> [:a, 1, :b, 2].to_h
<ruby[bot]> baweaver: # => wrong element type Symbol at 0 (expected array) (TypeError) ...check link for more (https://eval.in/546549)
<baweaver> hm. Thought there was a variant like that
kfpratt has quit [Ping timeout: 268 seconds]
<baweaver> Ox0dea: what did I do stupid?
rubie has joined #ruby
last_staff has quit [Quit: last_staff]
karioleez has joined #ruby
<Ox0dea> baweaver: They've gotta be pairs.
<Papierkorb> >> Hash[:foo, 123] # baweaver
<ruby[bot]> Papierkorb: # => {:foo=>123} (https://eval.in/546550)
n_blownapart has joined #ruby
<Papierkorb> but OOP > functional programming :P
<Ox0dea> ¿Por qué no los dos?
<baweaver> I'd disagree heavily with that statement
<Ox0dea> I'd swap > for +.
<pizzaops> Papierkorb: does this seem reasonable? https://gist.github.com/pizzaops/1f44b4e37bc2c57272c227102d83f851 — I need the ||= because calls on these objects can potentially trigger network traffic, so I don't want to create the hash again if I've already created it.
jottr has joined #ruby
mistermocha has joined #ruby
polyidus has joined #ruby
<Papierkorb> pizzaops: If you want to memoize it, use an @instance variable. Your method will always run the #map, as 'networks' is at that point always nil
<pizzaops> Papierkorb: right, I meant to, just forgot. Thanks!
<Papierkorb> pizzaops: So replace 'networks' with @networks. You can then remove the last line
<pizzaops> So @networks will always return either way? (with that last line @networks/networks removed
kfpratt has joined #ruby
<Papierkorb> pizzaops: Yes, assigning to a variable (same goes for ||=) returns the assigned value
<Ox0dea> *evaluates to
<pizzaops> <3
duckpuppy has quit [Ping timeout: 260 seconds]
<pizzaops> MINANBYGANSTY
<pizzaops> (Matsz is not actually nice but you guys are nice so thank you)
karioleez has quit [Ping timeout: 248 seconds]
n_blownapart has quit [Ping timeout: 244 seconds]
Renich has joined #ruby
<Ox0dea> smathy? https://eval.in/546551
<Ox0dea> Oh, you don't necessarily want access to the subject in the `when` clause, just the body.
htmldrum has joined #ruby
polyidus has quit [Read error: Connection reset by peer]
<adaedra> “Matsz is not actually nice” — HERESY
davedev2_ has joined #ruby
pwnd_nsfw has quit [Read error: Connection reset by peer]
pwnd_nsfw has joined #ruby
davedev__ has joined #ruby
bronson has quit [Remote host closed the connection]
nachoman has joined #ruby
tvw has quit [Remote host closed the connection]
htmldrum has quit [Ping timeout: 260 seconds]
djbkd has joined #ruby
<smathy> Ox0dea, yeah, that's what I do now. I was asking if there was an implicit version of `s` in all `case` statements.
saneax_AFK is now known as saneax
davedev24 has quit [Ping timeout: 248 seconds]
<Ox0dea> smathy: There isn't, but I'm fiddling. :)
<smathy> I mean obviously it's stored _somewhere_ internally, for the comparisons, I was just wondering if that was exposed to ruby itself.
x77686d has quit [Quit: x77686d]
DarthGandalf has quit [Ping timeout: 248 seconds]
rehat has quit [Remote host closed the connection]
<Ox0dea> Well, but, it gets compiled down, so a lot of the information that would make it easier to get to isn't available from Ruby land.
<smathy> Right, makes sense.
davedev2_ has quit [Ping timeout: 268 seconds]
htmldrum has joined #ruby
<smathy> I suppose it's just compiled to if/elsifs.
<Ox0dea> Hm? It's an actual bytecode instruction.
<Ox0dea> Several of them in tandem, really.
jenrzzz has quit [Ping timeout: 268 seconds]
BSab has quit [Ping timeout: 240 seconds]
karioleez has joined #ruby
Mia has joined #ruby
Mia has quit [Changing host]
Mia has joined #ruby
<Ox0dea> This is quite monstrous: https://eval.in/546561
<Ox0dea> Don't look at it overlong.
Balzrael has quit [Remote host closed the connection]
Xeago has quit [Remote host closed the connection]
<Papierkorb> require 'english'
bronson has joined #ruby
<smathy> Heh :)
whippythellama has quit [Quit: WeeChat 1.4]
<smathy> $_ - you Perler you!
<havenwood> Papierkorb: require 'english'.capitalize
<Ox0dea> Papierkorb: But $LAST_READ_LINE would be quite inappropriate here.
htmldrum has quit [Ping timeout: 250 seconds]
<Ox0dea> I wanted it to just be `_`, but you can't introduce new locals into bindings.
<Papierkorb> I believe in you to hack that in using just ruby and Fiddle!
<Ox0dea> So much pointer chasing! :(
<Papierkorb> it's for the greater good though
* smathy ships Ox0dea's code to production, despite the date ;)
whathappens has joined #ruby
<Ox0dea> Huehuehue.
zeroDivisible has quit [Quit: WeeChat 1.3]
sandstrom has joined #ruby
karioleez has quit [Ping timeout: 268 seconds]
jenrzzz has joined #ruby
LaT0rtue has joined #ruby
<shevy> I wanna be a Fiddler
crank1988 has quit [Ping timeout: 276 seconds]
Gasher has quit [Quit: Leaving]
baweaver has quit [Remote host closed the connection]
LHdez has quit [Read error: No route to host]
n_blownapart has joined #ruby
ekinmur has joined #ruby
diegoaguilar has quit [Ping timeout: 276 seconds]
crank1988 has joined #ruby
mdw has quit [Quit: Sleeping Zzzzz]
jackjackdripper has quit [Quit: Leaving.]
polyidus has joined #ruby
sneakerhax has quit [Quit: back later]
davedev24 has joined #ruby
n_blownapart has quit [Remote host closed the connection]
n_blownapart has joined #ruby
_tc has joined #ruby
rkazak has joined #ruby
croberts has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
bry4n_ has quit [Ping timeout: 260 seconds]
croberts has joined #ruby
houhoulis has joined #ruby
karioleez has joined #ruby
davedev__ has quit [Ping timeout: 248 seconds]
Renich has quit [Quit: leaving]
gizmore has joined #ruby
stantona has quit [Ping timeout: 244 seconds]
gizmore has quit [Client Quit]
gizless has quit [Ping timeout: 264 seconds]
rmulligan has quit [Ping timeout: 248 seconds]
karioleez has quit [Ping timeout: 244 seconds]
DarthGandalf has joined #ruby
jenrzzz has quit [Ping timeout: 244 seconds]
nachoman has quit []
diegoaguilar has joined #ruby
mistermo_ has quit [Ping timeout: 268 seconds]
FooMunki has joined #ruby
B4daBing73 has joined #ruby
marxarelli has quit [Quit: Textual IRC Client: www.textualapp.com]
nachoman has joined #ruby
kies has joined #ruby
smathy has quit [Read error: Connection reset by peer]
_tc has quit [Quit: Leaving]
smathy has joined #ruby
quazimodo has quit [Ping timeout: 248 seconds]