drale2k_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
yohji has joined #ruby
lypsis has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
DarthGandalf has quit [Ping timeout: 265 seconds]
drale2k_ has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
sleetdrop has joined #ruby
Burgestrand has joined #ruby
alfiemax has joined #ruby
graphene has quit [Remote host closed the connection]
graphene has joined #ruby
postmodern has quit [Quit: Leaving]
graphene has quit [Remote host closed the connection]
Burgestrand has quit [Quit: Closing time!]
graphene has joined #ruby
sleetdrop has quit [Ping timeout: 264 seconds]
rrichard_ has quit [Quit: Apparantly my attempt to stay awake has failed...]
agent_white has quit [Quit: brb]
sysvalve has quit [Ping timeout: 256 seconds]
c0ncealed2 has quit [Remote host closed the connection]
c0ncealed2 has joined #ruby
alfiemax has quit [Ping timeout: 264 seconds]
vondruch has quit [Quit: vondruch]
FernandoBasso has joined #ruby
SuperL4g has joined #ruby
d^sh has quit [Ping timeout: 248 seconds]
Xeago has joined #ruby
tristanp has joined #ruby
SuperLag has quit [Ping timeout: 240 seconds]
d^sh has joined #ruby
sysvalve has joined #ruby
tristanp has quit [Ping timeout: 240 seconds]
Mike11 has quit [Ping timeout: 240 seconds]
Burgestrand has joined #ruby
graphene has quit [Remote host closed the connection]
graphene has joined #ruby
<ineb>
whats a good way to design enums in ruby? Something like ["LOW","HIGH","DEFAULT"]. I was thinking about subclassing String and only allow one of these values
<ineb>
but i would call it bad design when subclassing a string just to restrict it
blackmesa has joined #ruby
aufi has joined #ruby
Nicmavr has quit [Read error: Connection reset by peer]
graphene has quit [Remote host closed the connection]
Nicmavr has joined #ruby
graphene has joined #ruby
AJA4350 has joined #ruby
arup_r has joined #ruby
eblip has quit [Quit: WeeChat 2.0.1]
graphene has quit [Remote host closed the connection]
graphene has joined #ruby
graphene has quit [Remote host closed the connection]
graphene has joined #ruby
eblip has joined #ruby
<vutral|kali>
ineb: why dont you use constants
blackmesa1 has joined #ruby
<ineb>
vutral|kali: because its difficult to model COLOR::RED.is_a?(COLOR)
blackmesa has quit [Ping timeout: 256 seconds]
<vutral|kali>
how many colors are there
<ineb>
plenty :)
<vutral|kali>
ineb: there are rails enum and someone wrote an enum class
<apeiros>
(not necessarily the solution I'd prefer, tho)
Burgestrand has quit [Quit: Closing time!]
UserOO7 has quit [Remote host closed the connection]
graphene has quit [Remote host closed the connection]
TomyWork has quit [Ping timeout: 240 seconds]
alfiemax_ has joined #ruby
graphene has joined #ruby
arup_r has joined #ruby
arup_r has quit [Ping timeout: 248 seconds]
bmurt has joined #ruby
dionysus69 has quit [Remote host closed the connection]
dionysus69 has joined #ruby
darkhanb has joined #ruby
Burgestrand has joined #ruby
alfiemax_ has quit [Ping timeout: 244 seconds]
dionysus69 has quit [Remote host closed the connection]
dionysus69 has joined #ruby
TomyWork has joined #ruby
TomyWork has left #ruby ["Leaving"]
VladGh has joined #ruby
vondruch has joined #ruby
darkhanb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bauruine has quit [Read error: Connection reset by peer]
bauruine has joined #ruby
snickers has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
vondruch has quit [Quit: vondruch]
DTZUZO has quit [Quit: WeeChat 2.0]
DTZUZO has joined #ruby
vondruch has joined #ruby
HoierM has joined #ruby
bugant has left #ruby [#ruby]
donofrio has joined #ruby
Rapture has joined #ruby
mojtaba has joined #ruby
<mojtaba>
Hello, I am using rails 5.1.6 and ruby 2.5.0.p0. Could you please let me know how should I update to the latest version of rails? (I am using Ubuntu 16.04 LTS)
<mojtaba>
Also to update ruby.
arup_r has joined #ruby
Rapture has quit [Client Quit]
arup_r has quit [Client Quit]
alex`` has quit [Ping timeout: 248 seconds]
HoierM has quit [Ping timeout: 244 seconds]
dionysus69 has quit [Ping timeout: 256 seconds]
ciro has quit [Ping timeout: 256 seconds]
Rapture has joined #ruby
alem0lars has quit [Ping timeout: 256 seconds]
blackmesa1 has joined #ruby
rrichardsr3 has joined #ruby
<mojtaba>
Hello, I am using rails 5.1.6 and ruby 2.5.0.p0. Could you please let me know how should I update to the latest version of rails? (I am using Ubuntu 16.04 LTS)
savolla has quit [Quit: Lost terminal]
blackmesa1 has quit [Ping timeout: 256 seconds]
Aetherical has joined #ruby
<Aetherical>
Hello
alex`` has joined #ruby
Tuor has joined #ruby
sauvin has quit [Ping timeout: 268 seconds]
mistergibson has quit [Ping timeout: 260 seconds]
SeepingN has quit [Quit: The system is going down for reboot NOW!]
drale2k_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
akaiiro has joined #ruby
<apeiros>
?rails mojtaba
<ruby[bot]>
mojtaba: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
<apeiros>
hi Aetherical
<Aetherical>
Hi
BTRE has quit [Read error: Connection reset by peer]
AnLog has joined #ruby
<Aetherical>
Just wanted to say, because of how there's basically no answer on google, i made a gem for linux that can make editable beeps. It's called boopbeep, and it's basic but works great.
Tuor has quit [Ping timeout: 264 seconds]
vondruch has quit [Read error: Connection reset by peer]
sauvin has joined #ruby
rippa has joined #ruby
ferhaty has quit [Quit: ferhaty]
BTRE has joined #ruby
blackmesa1 has joined #ruby
Zaab1t has joined #ruby
mynameisdebian has joined #ruby
polishdub has joined #ruby
Inline has joined #ruby
drale2k_ has joined #ruby
Burgestrand has quit [Quit: Closing time!]
mynameisdebian has quit [Ping timeout: 256 seconds]
HoierM has joined #ruby
graphene has quit [Remote host closed the connection]
graphene has joined #ruby
<apeiros>
Aetherical: 👍🏻
apeiros has quit []
blackmesa1 has quit [Ping timeout: 240 seconds]
<Aetherical>
?
apeiros_ has joined #ruby
chouhoulis has joined #ruby
AJA4350 has quit [Quit: AJA4350]
AJA4350 has joined #ruby
clemens3 has quit [Ping timeout: 244 seconds]
g- has quit [Ping timeout: 260 seconds]
g- has joined #ruby
apeiros_ has quit [Remote host closed the connection]
mojtaba has quit [Quit: Leaving.]
chouhoulis has quit [Ping timeout: 256 seconds]
sysvalve has quit [Quit: Leaving]
apeiros_ has joined #ruby
HoierM has quit [Ping timeout: 256 seconds]
akaiiro has quit [Remote host closed the connection]
aufi has quit [Ping timeout: 240 seconds]
HoierM has joined #ruby
alem0lars has joined #ruby
Mike11 has joined #ruby
Beams_ has quit [Quit: .]
DTZUZO has quit [Quit: WeeChat 2.0]
DTZUZO has joined #ruby
axsuul has joined #ruby
nowhere_man has joined #ruby
rrichardsr3 has quit [Ping timeout: 240 seconds]
ciro has joined #ruby
yohji has quit [Remote host closed the connection]
tolland has quit [Ping timeout: 244 seconds]
ciro has quit [Ping timeout: 240 seconds]
orbyt_ has joined #ruby
Aetherical has quit [Ping timeout: 252 seconds]
r29v has joined #ruby
banisterfiend has joined #ruby
lxsameer has quit [Ping timeout: 256 seconds]
akaiiro has joined #ruby
mikecmpbll has quit [Ping timeout: 256 seconds]
ens has joined #ruby
<ens>
hi folks. learning some ruby
<ens>
how can i do (firstvar, secondvar) = somestring.split("|", 2) ?
<ens>
or do i have to explictly use an array for LHS
<apeiros>
I fear for the sanity of hundreds of rubyists
<z64>
it's a yikes from me
lxsameer has joined #ruby
lxsameer has quit [Ping timeout: 260 seconds]
eckhardt_ has joined #ruby
<baweaver>
>> Point = Struct.new(:x, :y); fn = -> x, y { x + y }; asunder=->fn,t{fn.call *fn.parameters.map{|p|t.public_send(p.last)}}; asunder[fn, Point.new(0,3)]
lxsameer has joined #ruby
<ruby[bot]>
baweaver: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
<baweaver>
>> Point = Struct.new(:x, :y); fn = -> x, y { x + y }; asunder=->fn,t{fn.call *fn.parameters.map{|p|t.public_send(p.last)}}; asunder[fn, Point.new(0,3)]
mroutis has quit [Remote host closed the connection]
zenspider has quit [Quit: bye]
lxsameer has joined #ruby
Creatornator has joined #ruby
zenspider has joined #ruby
TJ- has quit [Ping timeout: 240 seconds]
kenichi has joined #ruby
<zenspider>
rawr
lxsameer has quit [Ping timeout: 260 seconds]
lxsameer has joined #ruby
blackmesa1 has joined #ruby
<zenspider>
gah. something odd is happening on my server. I can't reach gmail's smtp servers. They time out. Confirmed with `swaks` and confirmed that `swaks` works fine in the cafe I'm in... Not sure how to diagnose this
<zenspider>
hrm... I can ping the damn thing. I think this is IPv6 BS?!?! but why? "IO::Socket::INET6: connect: timeout"
<zenspider>
I have IPv6 set up for link-local only
<Radar>
"final plus1_then_times2 = times2 << plus1"
<Radar>
what is "final"?
Nicmavr has quit [Read error: Connection reset by peer]
yoshida has quit [Quit: leaving]
Nicmavr has joined #ruby
yoshida has joined #ruby
modin has quit [Ping timeout: 264 seconds]
modin has joined #ruby
dshep has quit [Quit: WeeChat 2.1]
lxsameer has joined #ruby
kapil___ has quit [Quit: Connection closed for inactivity]
<havenwood>
Radar: Oh, that makes more sense... I was wondering what you meant.
apeiros has quit []
yoshida has quit [Quit: leaving]
sameerynho has quit [Ping timeout: 244 seconds]
za1b1tsu has joined #ruby
lxsameer has quit [Ping timeout: 256 seconds]
lxsameer has joined #ruby
gnufied has joined #ruby
za1b1tsu has quit [Ping timeout: 256 seconds]
polishdub has quit [Quit: leaving]
arooni has quit [Ping timeout: 248 seconds]
AJA4350 has quit [Quit: AJA4350]
arooni_team_b has joined #ruby
<hahuang65>
if I have a hash, and I separate them out with `hash.keys` and `hash.values`, am I guaranteed that the index of the values matches the index of the keys?
sariyar has joined #ruby
Creatornator has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
AJA4350 has joined #ruby
<Radar>
hahuang65: I believe it's the case that in modern Ruby versions (I think maybe post 2.2?) that hashes are ordered. So yeah?
ogres has quit [Quit: Connection closed for inactivity]
<Radar>
>> h = ("a".."z").zip(1..26).to_h; h.keys
<Radar>
>> h = ("a".."z").zip(1..26).to_h; h.values
<ruby[bot]>
Radar: # => ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", ...check link for more (https://eval.in/1045823)
<Radar>
ruby[bot]: why have you forsaken me in my hour of need?
<hahuang65>
Radar: lol thanks
<Radar>
Oh perhaps it is because I am in the train tunnel.
noudle has quit [Ping timeout: 260 seconds]
alfiemax has quit [Ping timeout: 240 seconds]
Xiti` has joined #ruby
mozzarel1 has joined #ruby
APK has joined #ruby
duckpuppy has joined #ruby
APK has quit [Remote host closed the connection]
APK has joined #ruby
spiette_ has joined #ruby
<havenwood>
hahuang65: Yes, the order is guaranteed to match order of insertion of keys since 1.9.
miah_ has joined #ruby
AKPWD has quit [Disconnected by services]
<havenwood>
hahuang65: It was switched to a doubly-circularly linked list in 1.9 and the docs got the mention: "Hashes enumerate their values in the order that the corresponding keys were inserted."
<havenwood>
hahuang65: The ISO spec also mentions that Hashes are ordered.
APK is now known as AKPWD
fumk has joined #ruby
timmow_ has joined #ruby
<hahuang65>
havenwood: thanks for the detailed explanation! really appreciate it
akhkharu has joined #ruby
<zenspider>
hahuang65: why are you calling keys and values separately?
<zenspider>
the question itself raises red flags
jetchisel has quit [*.net *.split]
miah has quit [*.net *.split]
armyriad has quit [*.net *.split]
spiette has quit [*.net *.split]
Tempesta has quit [*.net *.split]
levifig has quit [*.net *.split]
segy has quit [*.net *.split]
lightstalker has quit [*.net *.split]
dan64 has quit [*.net *.split]
yokel has quit [*.net *.split]
ArahaelPi has quit [*.net *.split]
Xiti has quit [*.net *.split]
alnewkirk has quit [*.net *.split]
paraxial has quit [*.net *.split]
fumck has quit [*.net *.split]
go|dfish has quit [*.net *.split]
Exagone313 has quit [*.net *.split]
mozzarella has quit [*.net *.split]
Cyrus has quit [*.net *.split]
duckpupp- has quit [*.net *.split]
mistym has quit [*.net *.split]
timmow has quit [*.net *.split]
brainslug has quit [*.net *.split]
nikivi has quit [*.net *.split]
Prira_ has quit [*.net *.split]
m4rCsi has quit [*.net *.split]
chkilroy has quit [*.net *.split]
Fridtjof has quit [*.net *.split]
zumbi has quit [*.net *.split]
KrzaQ has quit [*.net *.split]
pelegreno has quit [*.net *.split]
setient has quit [*.net *.split]
machty has quit [*.net *.split]
syndikate has quit [*.net *.split]
mozzarel1 is now known as mozzarella
syndikate has joined #ruby
alnewkirk has joined #ruby
armyriad has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]