baweaver changed the topic of #ruby to: Rules & more: https://ruby-community.com | Ruby 2.5.1, 2.4.4, 2.3.7, 2.6.0-preview2: https://www.ruby-lang.org | Paste 4+ lines of text to https://gist.github.com | Rails questions? Ask in #RubyOnRails | Books: https://goo.gl/wpGhoQ | Logs: https://irclog.whitequark.org/ruby | Can't talk? Register/identify with Nickserv first!
apparition has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cats has quit [Ping timeout: 248 seconds]
ansraliant has joined #ruby
cats has joined #ruby
cats has quit [Ping timeout: 240 seconds]
cats has joined #ruby
rrichardsr3 has quit [Quit: Apparantly my attempt to stay awake has failed...]
cats has quit [Ping timeout: 240 seconds]
jcarl43 has quit [Quit: WeeChat 2.2]
NightMonkey has quit [Quit: ZNC - http://znc.in]
NightMonkey has joined #ruby
lxsameer has joined #ruby
catsed has joined #ruby
jrich523 has quit [Ping timeout: 244 seconds]
lxsameer has quit [Ping timeout: 256 seconds]
chouhoulis has quit [Remote host closed the connection]
duderonomy has joined #ruby
Dark_Arc has quit [Quit: ZNC 1.6.5 - http://znc.in]
r29v has quit [Quit: r29v]
Dark_Arc has joined #ruby
r29v has joined #ruby
noobineer has joined #ruby
Nicmavr has quit [Read error: Connection reset by peer]
Nicmavr has joined #ruby
Dark_Arc has quit [Quit: ZNC 1.6.5 - http://znc.in]
SeepingN has quit [Quit: The system is going down for reboot NOW!]
noobineer has quit [Ping timeout: 240 seconds]
Dark_Arc has joined #ruby
orbyt_ has joined #ruby
nowhere_man has quit [Ping timeout: 256 seconds]
nowhere_man has joined #ruby
TJ- has quit [Quit: WeeChat 1.9.1]
lxsameer has joined #ruby
catsed is now known as cats
lxsameer has quit [Ping timeout: 256 seconds]
eckhardt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
pedahzur has quit []
vikaton has quit [Quit: Connection closed for inactivity]
millerti has joined #ruby
lxsameer has joined #ruby
DTZUZO has quit [Ping timeout: 240 seconds]
drbrain has quit [Quit: Goodbye]
lxsameer has quit [Ping timeout: 240 seconds]
lxsameer has joined #ruby
AJA4350 has quit [Quit: AJA4350]
lxsameer has quit [Ping timeout: 240 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
orbyt_ has joined #ruby
orbyt_ has quit [Client Quit]
orbyt_ has joined #ruby
orbyt_ has quit [Client Quit]
BTRE has quit [Remote host closed the connection]
Guest88311 has joined #ruby
Puffball_ has quit [Read error: Connection reset by peer]
lxsameer has joined #ruby
Guest88311 has quit [Ping timeout: 256 seconds]
fmcgeough has joined #ruby
tag has quit [Quit: Connection closed for inactivity]
Puffball has joined #ruby
maryo_ has joined #ruby
jetchisel has quit [Quit: "Unfortunately time is always against us" -- * Morpheus*]
lxsameer has quit [Ping timeout: 240 seconds]
SeepingN has joined #ruby
drbrain has joined #ruby
Creatornator has joined #ruby
postmodern has joined #ruby
graphene has joined #ruby
hurricanehrndz has joined #ruby
Creatornator has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nowhereFast has joined #ruby
ogres has joined #ruby
BTRE has joined #ruby
BTRE has quit [Remote host closed the connection]
Puffball has quit [Remote host closed the connection]
alfiemax has quit [Ping timeout: 244 seconds]
BTRE has joined #ruby
Puffball has joined #ruby
drbrain has quit [Quit: Goodbye]
braincrash has quit [Quit: bye bye]
orbyt_ has joined #ruby
thy0 has quit [Quit: TTFN]
DTZUZO has joined #ruby
maryo_ has quit [Ping timeout: 240 seconds]
braincrash has joined #ruby
fmcgeough has quit [Quit: fmcgeough]
lxsameer has joined #ruby
Creatornator has joined #ruby
DTZUZO has quit [Ping timeout: 240 seconds]
gix has joined #ruby
lxsameer has quit [Ping timeout: 240 seconds]
lxsameer has joined #ruby
UserOO7 has joined #ruby
drbrain has joined #ruby
lxsameer has quit [Ping timeout: 240 seconds]
lxsameer has joined #ruby
quazimod1 has joined #ruby
<quazimod1> so I've done a function that hurts my brain
<quazimod1> forget the first part where it takes shitty arguments, i can fix that, what about the list operation
<quazimod1> I need at most 4 teams & departments, and want an equal distribution if I can, and need to report them separately for consumption
<quazimod1> so I may teams to array of { team: t }, departments to { department: d } then use zip & flatten to grab the top 4
<quazimod1> then unwrap
<quazimod1> it's ugyl
UserOO7 has quit [Ping timeout: 240 seconds]
lxsameer has quit [Ping timeout: 240 seconds]
lxsameer has joined #ruby
humam has joined #ruby
UserOO7 has joined #ruby
UserOO7 has quit [Ping timeout: 240 seconds]
ciro has quit [Quit: WeeChat 2.2]
howdoi has joined #ruby
r29v has quit [Quit: r29v]
millerti has quit [Ping timeout: 240 seconds]
lxsameer has quit [Ping timeout: 256 seconds]
\void has joined #ruby
donofrio has quit [Remote host closed the connection]
moei has quit [Quit: Leaving...]
samort7 has quit [Quit: Leaving]
apparition has quit [Quit: Bye]
jetchisel has joined #ruby
za1b1tsu has joined #ruby
alfiemax has joined #ruby
Creatornator has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
lxsameer has joined #ruby
dhollinger has quit [Ping timeout: 244 seconds]
dhollinger has joined #ruby
n13z has quit [Ping timeout: 248 seconds]
lxsameer has quit [Ping timeout: 256 seconds]
n13z has joined #ruby
lxsameer has joined #ruby
lomex has joined #ruby
lxsameer has quit [Ping timeout: 256 seconds]
Creatornator has joined #ruby
lxsameer has joined #ruby
Creatornator has quit [Client Quit]
ineb has joined #ruby
lxsameer has quit [Ping timeout: 240 seconds]
apeiros_ has joined #ruby
lomex has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
lomex has joined #ruby
alfiemax_ has joined #ruby
reber has joined #ruby
duderonomy has quit [Read error: Connection timed out]
duderonomy has joined #ruby
alfiemax has quit [Ping timeout: 240 seconds]
lomex has quit [Ping timeout: 256 seconds]
ur5us has quit [Remote host closed the connection]
sauvin has joined #ruby
Inline has quit [Quit: Leaving]
lxsameer has joined #ruby
\void has quit [Quit: So long, and thanks for all the fish.]
za1b1tsu has quit [Quit: WeeChat 2.1]
lxsameer has quit [Ping timeout: 240 seconds]
lxsameer has joined #ruby
tty has quit [Quit: tty]
akaiiro has quit [Remote host closed the connection]
lxsameer has quit [Ping timeout: 244 seconds]
helpa has joined #ruby
nowhereFast has left #ruby [#ruby]
moei has joined #ruby
DTZUZO has joined #ruby
alfiemax has joined #ruby
apeiros_ has quit [Remote host closed the connection]
alfiemax_ has quit [Ping timeout: 256 seconds]
quazimod1 has quit [Ping timeout: 240 seconds]
snickers has joined #ruby
quazimodo has joined #ruby
alfiemax has quit [Ping timeout: 264 seconds]
alfiemax has joined #ruby
hfp_work has quit [Quit: bye]
biberu has joined #ruby
biberu has quit [Excess Flood]
eckhardt_ has joined #ruby
apeiros_ has joined #ruby
rrichardsr3 has joined #ruby
nowhere_man has quit [Remote host closed the connection]
r29v has joined #ruby
nowhere_man has joined #ruby
apeiros_ has quit [Remote host closed the connection]
lxsameer has joined #ruby
r29v has quit [Read error: Connection reset by peer]
<baweaver> !!!
connor_goodwolf has joined #ruby
<baweaver> havenwood
<baweaver> Nobu got put on composing procs
<havenwood> hooah! I think the << and >> syntax looks really nice. glad nobu is on it!
aufi has joined #ruby
<havenwood> patch monster!!
<baweaver> patch monster is in for the kill
UserOO7 has joined #ruby
lxsameer has quit [Ping timeout: 260 seconds]
lxsameer has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
UserOO7 has quit [Ping timeout: 240 seconds]
apeiros_ has joined #ruby
<Radar> What's this final business?
gnufied has quit [Ping timeout: 244 seconds]
hfp_work has joined #ruby
lxsameer has quit [Ping timeout: 240 seconds]
lxsameer has joined #ruby
orbyt_ has joined #ruby
gnufied has joined #ruby
dionysus69 has joined #ruby
snickers has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
eckhardt_ has quit [Quit: Textual IRC Client: www.textualapp.com]
snickers has joined #ruby
ogres has quit [Quit: Connection closed for inactivity]
sysvalve has joined #ruby
yohji has joined #ruby
valkyr2e has quit [Ping timeout: 248 seconds]
clemens3 has joined #ruby
avelldiroll has quit [Ping timeout: 248 seconds]
alex`` has joined #ruby
Mike11 has joined #ruby
kapil___ has joined #ruby
valkyr2e has joined #ruby
lxsameer has quit [Ping timeout: 268 seconds]
Caerus has quit [Quit: Zzz.zz.z]
desnudopenguino has quit [Quit: leaving]
desnudopenguino has joined #ruby
avelldiroll has joined #ruby
ruskie has joined #ruby
alex`` has quit [Quit: WeeChat 2.2]
alex`` has joined #ruby
alex`` has quit [Client Quit]
alex`` has joined #ruby
drale2k_ has joined #ruby
<havenwood> Radar: Seems the extra step of a little sugar on Symbols would be easy to take next. I think it looks pretty nice: https://gist.github.com/havenwood/d305b42f5b542e9de1eaa8e56ba6bdd7#file-compose_procs-rb-L32-L45
<havenwood> "We need more discussion if we would add combination methods to the Symbol class."
<havenwood> Seems nice to add to me.
TomyWork has joined #ruby
ferhaty has joined #ruby
<apeiros_> amazing that this doesn't need parens
apeiros_ is now known as apeiros
jmcgnh has quit [Ping timeout: 268 seconds]
lxsameer has joined #ruby
jmcgnh has joined #ruby
dionysus69 has quit [Ping timeout: 248 seconds]
mikecmpbll has joined #ruby
Burgestrand has joined #ruby
dionysus69 has joined #ruby
_aeris_ has left #ruby ["Konversation terminated!"]
graphene has quit [Remote host closed the connection]
graphene has joined #ruby
Beams has joined #ruby
desperek has joined #ruby
aufi has quit [Ping timeout: 240 seconds]
Dbugger has joined #ruby
nowhere_man has quit [Ping timeout: 256 seconds]
Burgestrand has quit [Quit: Closing time!]
Burgestrand has joined #ruby
alfiemax has quit [Remote host closed the connection]
quazimodo has quit [Ping timeout: 264 seconds]
kbsa has joined #ruby
quazimodo has joined #ruby
kbsa has quit []
aufi has joined #ruby
alfiemax has joined #ruby
dhollinger has quit [Ping timeout: 240 seconds]
rrichardsr3 has quit [Quit: Apparantly my attempt to stay awake has failed...]
TJ- has joined #ruby
vondruch has joined #ruby
vondruch has quit [Client Quit]
vondruch has joined #ruby
rrichardsr3 has joined #ruby
aufi has quit [Ping timeout: 260 seconds]
aufi has joined #ruby
UserOO7 has joined #ruby
graphene has quit [Remote host closed the connection]
graphene has joined #ruby
UserOO7 has quit [Ping timeout: 260 seconds]
alfiemax_ has joined #ruby
alfiemax has quit [Ping timeout: 240 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Puffball has quit [Remote host closed the connection]
orbyt_ has joined #ruby
alem0lars has joined #ruby
alfiemax_ has quit [Ping timeout: 240 seconds]
rrichard_ has joined #ruby
rrichardsr3 has quit [Ping timeout: 240 seconds]
aufi has quit [Ping timeout: 260 seconds]
dhollinger has joined #ruby
Burgestrand has quit [Quit: Closing time!]
graphene has quit [Remote host closed the connection]
graphene has joined #ruby
yohji has quit [Remote host closed the connection]
lypsis has quit [Quit: ZNC - http://znc.in]
arahael1 is now known as ArahaelPi
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
Meow-J___ has quit [Quit: Connection closed for inactivity]
<vutral|kali> if i were you i would have a look at the rails enum class
blackmesa1 has quit [Ping timeout: 256 seconds]
<ineb> vutral|kali: looks like none of them implements it in a way where enums are actual instances of a class but constants
<ineb> which again would make COLOR::RED.is_a?(COLOR) not possible
<vutral|kali> isnt COLOR::RED already a color ?
<vutral|kali> doesnt make much sense to me
<ineb> no RED is a constant that resides inside module COLOR
<vutral|kali> so you still want constants
<ineb> no, that was your suggestion
<ineb> and the way ruby-enum and rails enum class are implementing them
<vutral|kali> if all colors are subclasses to a color class they can be a color and if they are all instances of a color class they can be a color too
Beams_ has joined #ruby
<ineb> you mean something like class Color; def initialize(color) { @color = color }; RED = Color.new(:red); BLUE = Color.new(:blue); end
Beams has quit [Ping timeout: 264 seconds]
thy0 has joined #ruby
<ineb> it would work.
SuperLag has joined #ruby
<vutral|kali> well thats the way its often done in programming
<ineb> havent seen it anywhere yet.
<ineb> but that would mean nothing.
<ineb> or maybe i have and forgot about it :)
<vutral|kali> well they do it in java
<vutral|kali> using constants to initialize classes
<ineb> java has real enums: enum Color { BLUE, RED; };
<vutral|kali> yeah you can get constants from an java enum
<vutral|kali> they work like in c
<vutral|kali> so you just have numbers describing your values
<vutral|kali> you cannot compare these enums
<vutral|kali> value one from one enough is equal to value 1 from another :p
SuperL4g has quit [Ping timeout: 256 seconds]
<vutral|kali> the only thing which possibily works is using the enum as type
ciro has joined #ruby
<vutral|kali> and that you got a verification on it
<ineb> vutral|kali: in java, BLUE.getClass().getName() would be 'Color' in my definition above
<ineb> i mean Color.BLUE.getClass().getName()
<ineb> but you are right with C enums
eb0t has quit [Quit: WeeChat 2.0.1]
<vutral|kali> ineb: if its an instance of color yes
<ineb> it always is in this case
<vutral|kali> well you need to choose what way you do it in i cant tell you whats quicker for your case
<vutral|kali> if quickness is important
<vutral|kali> on most modern computers it shouldnt be much overhead
arup_r has quit [Remote host closed the connection]
graphene has quit [Remote host closed the connection]
graphene has joined #ruby
eb0t has joined #ruby
nowhere_man has joined #ruby
graphene has quit [Remote host closed the connection]
graphene has joined #ruby
savolla has joined #ruby
UserOO7 has joined #ruby
nowhere_man has quit [Ping timeout: 256 seconds]
fmcgeough has joined #ruby
nicesignal has quit [Ping timeout: 256 seconds]
<apeiros> >> module Color; Red = "red"; Blue = "blue"; Red.extend Color; Blue.extend Color; end; {color_is_a_color: Color::Red.is_a?(Color), string_is_color: "red".is_a?(Color); value: Color::Red}
<ruby[bot]> apeiros: # => /tmp/execpad-f8e8d7c9edfc/source-f8e8d7c9edfc:2: syntax error, unexpected ';', expecting '}' ...check link for more (https://eval.in/1045741)
<apeiros> >> module Color; Red = "red"; Blue = "blue"; Red.extend Color; Blue.extend Color; end; {color_is_a_color: Color::Red.is_a?(Color), string_is_color: "red".is_a?(Color), value: Color::Red}
<ruby[bot]> apeiros: # => {:color_is_a_color=>true, :string_is_color=>false, :value=>"red"} (https://eval.in/1045742)
<apeiros> vutral|kali: ^
<apeiros> oh, actually ineb ^
<ineb> :)
<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
lxsameer has joined #ruby
banisterfiend has quit [Quit: Textual IRC Client: www.textualapp.com]
<apeiros_> >> firstvar, secondvar = "some|string|foo".split("|", 2)
<ruby[bot]> apeiros_: # => ["some", "string|foo"] (https://eval.in/1045783)
<apeiros_> ok, that was not all that enlightening, let me try again :D
<apeiros_> >> firstvar, secondvar = "some|string|foo".split("|", 2); {first_var: firstvar, second_var: secondvar}
<ruby[bot]> apeiros_: # => {:first_var=>"some", :second_var=>"string|foo"} (https://eval.in/1045784)
apeiros_ is now known as apeiros
<apeiros> ens: ^
<apeiros> and * if you want to be explicit (`a,b = *expr`)
g- has quit [Ping timeout: 240 seconds]
<ens> thanks, that explicit operator looks advanced
lxsameer has quit [Ping timeout: 244 seconds]
<ens> i'm coming from a perl background so this is all very strange to me
ciro has joined #ruby
<ens> is there some main differences that i should keep in mind?
<ens> the interpolation of variables seems to be a big one
Creatornator has joined #ruby
za1b1tsu has joined #ruby
lxsameer has joined #ruby
maryo_ has joined #ruby
lxsameer has quit [Ping timeout: 240 seconds]
HoierM has quit [Ping timeout: 240 seconds]
gnufied has quit [Ping timeout: 240 seconds]
Zaab1t has quit [Quit: Zaab1t]
lxsameer has joined #ruby
<apeiros> ens: the main difference is that everything is blessed in perl terms I guess? (been ages since perl)
lxsameer has quit [Ping timeout: 264 seconds]
akaiiro has quit [Ping timeout: 256 seconds]
<ens> apeiros: true, all things are objects
<ens> and iirc everything is already a pointer so no need to pass by reference
<ens> even regexes are objects which looks really weird at first
jcarl43 has joined #ruby
lxsameer has joined #ruby
Creatornator has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
SeepingN has joined #ruby
gnufied has joined #ruby
Creatornator has joined #ruby
ferhaty has joined #ruby
[Butch] has joined #ruby
lxsameer has quit [Ping timeout: 244 seconds]
snickers has joined #ruby
alex`` has quit [Quit: WeeChat 2.2]
mikecmpbll has joined #ruby
<apeiros> ens: I think the one thing which catches more people by surprise is that classes are objects too
<apeiros> and I guess one of the pitfalls early on is that everything except nil & false is truthy. i.e. 0, "", [], {} are all truthy expressions.
lxsameer has joined #ruby
jalcine is now known as Jacky
nowhere_man has quit [Ping timeout: 256 seconds]
lxsameer has quit [Ping timeout: 240 seconds]
Creatornator has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nowhere_man has joined #ruby
snickers has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<baweaver> [6] pry(main)> -> a, b, *as, **bs, &fn {}.parameters
<baweaver> => [[:req, :a], [:req, :b], [:rest, :as], [:keyrest, :bs], [:block, :fn]]
<baweaver> Oh I'm going to have fun with this.
<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)]
<ruby[bot]> baweaver: # => 3 (https://eval.in/1045791)
<baweaver> Work and show this brilliance bot
graphene has quit [Remote host closed the connection]
g- has joined #ruby
graphene has joined #ruby
lxsameer has quit [Ping timeout: 240 seconds]
nicesignal has joined #ruby
graphene has quit [Read error: Connection reset by peer]
sameerynho has joined #ruby
tag has joined #ruby
alem0lars has quit [Ping timeout: 244 seconds]
lxsameer has joined #ruby
<baweaver> apeiros / z64 BEHOLD!
* apeiros beholds
* apeiros is beheld?
<apeiros> beholden?
* apeiros no english
<baweaver> I've just found a way to do destructured pattern matching
<baweaver> Qo.case(Point.new(0, 3)) { |m| m.when(x: 0) { |x, y| Point.new(1, y) } }
<baweaver> Let the fun begin :)
safetypin has joined #ruby
lxsameer has quit [Ping timeout: 264 seconds]
<baweaver> eckhardt_: Come, witness our madness
* eckhardt_ sprays silver paint on his mouth
<z64> oh dear.
eckhardt has quit [Disconnected by services]
eckhardt_ is now known as eckhardt
tomaw has quit [Read error: Connection reset by peer]
<havenwood> "And I looked, and behold, there was a pale horse, and he that sat on it was Death, and Hades followed close behind him."
tomaw has joined #ruby
<apeiros> why's my dog following a pale horse?
atmosx has joined #ruby
<apeiros> wait, do I have a pale horse?
<havenwood> apeiros: are you, uhh, riding the pale horse?
<havenwood> :-O
dionysus69 has joined #ruby
lxsameer has joined #ruby
atmosx has quit [Client Quit]
<apeiros> na, I'm the origin, death is the end, so should be my sister
Creatornator has joined #ruby
lxsameer has quit [Ping timeout: 260 seconds]
akaiiro has joined #ruby
lxsameer has joined #ruby
scrptktty has joined #ruby
snickers has joined #ruby
scottj has joined #ruby
alem0lars has joined #ruby
lxsameer has quit [Ping timeout: 244 seconds]
<miah> is the horse pale due to malnutrition?
lxsameer has joined #ruby
sauvin has quit [Remote host closed the connection]
lxsameer has quit [Ping timeout: 256 seconds]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Creatornator has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
lxsameer has joined #ruby
bmurt has joined #ruby
HoierM has joined #ruby
lxsameer has quit [Ping timeout: 256 seconds]
za1b1tsu has quit [Ping timeout: 240 seconds]
lxsameer has joined #ruby
ferhaty has quit [Quit: ferhaty]
mojtaba has joined #ruby
lxsameer has quit [Ping timeout: 248 seconds]
cthulchu_ has joined #ruby
cthulchu has quit [Ping timeout: 244 seconds]
lxsameer has joined #ruby
mroutis has joined #ruby
lxsameer has quit [Ping timeout: 240 seconds]
mojtaba has quit [Remote host closed the connection]
lxsameer has joined #ruby
ogres has joined #ruby
alem0lars has quit [Ping timeout: 276 seconds]
rrichardsr3 has joined #ruby
lxsameer has quit [Ping timeout: 240 seconds]
lxsameer has joined #ruby
rrichardsr3 has quit [Quit: He who dares .... wins.]
humam has quit [Quit: leaving]
snickers has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
lxsameer has quit [Ping timeout: 240 seconds]
nowhere_man has quit [Read error: Connection reset by peer]
humam has joined #ruby
j416 has left #ruby ["o/"]
mojtaba has joined #ruby
lxsameer has joined #ruby
alfiemax_ has joined #ruby
mrush has joined #ruby
lxsameer has quit [Ping timeout: 240 seconds]
mojtaba has quit [Ping timeout: 240 seconds]
lxsameer has joined #ruby
lxsameer has quit [Ping timeout: 240 seconds]
beowuff has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
Mike11 has quit [Read error: Connection reset by peer]
beowuff has joined #ruby
lxsameer has joined #ruby
za1b1tsu has joined #ruby
lxsameer has quit [Ping timeout: 240 seconds]
mroutis has quit [Ping timeout: 240 seconds]
mojtaba has joined #ruby
maryo_ has quit [Ping timeout: 240 seconds]
HoierM has quit [Ping timeout: 240 seconds]
snickers has joined #ruby
drale2k_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nowhere_man has joined #ruby
lxsameer has joined #ruby
dionysus69 has quit [Ping timeout: 256 seconds]
lxsameer has quit [Ping timeout: 240 seconds]
safetypin has quit [Quit: ZZZzzz…]
lxsameer has joined #ruby
lxsameer has quit [Ping timeout: 244 seconds]
psychicist__ has joined #ruby
lxsameer has joined #ruby
duderonomy has quit [Ping timeout: 256 seconds]
lxsameer has quit [Ping timeout: 256 seconds]
mroutis has joined #ruby
FernandoBasso has quit [Quit: Page closed]
zenspider has joined #ruby
s2013 has joined #ruby
lxsameer has joined #ruby
[Butch] has quit [Read error: Connection reset by peer]
lxsameer has quit [Ping timeout: 240 seconds]
camilasan has quit [Ping timeout: 240 seconds]
s2013 has quit [Quit: Textual IRC Client: www.textualapp.com]
r29v has quit [Quit: r29v]
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
Xeago has quit [Quit: ZNC 1.7.0 - https://znc.in]
za1b1tsu has quit [Ping timeout: 240 seconds]
Xeago has joined #ruby
legit has left #ruby ["WeeChat 2.2"]
zerowaitstate has joined #ruby
<zerowaitstate> is there an alternative interactive debugger for ruby instead of pry?
lxsameer has quit [Ping timeout: 256 seconds]
eckhardt has quit [Quit: Textual IRC Client: www.textualapp.com]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
Dbugger has quit [Remote host closed the connection]
s2013 has joined #ruby
r29v has joined #ruby
Creatornator has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<miah> i use pry-byebug its still pry, but adds a bunch of useful features
alfiemax_ has quit [Ping timeout: 248 seconds]
za1b1tsu has joined #ruby
blackmesa1 has quit [Ping timeout: 256 seconds]
za1b1tsu has quit [Ping timeout: 240 seconds]
alfiemax has joined #ruby
snickers has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
yoshida has joined #ruby
lxsameer has joined #ruby
<yoshida> anyone know why #ruby-lang is a private channel?
<apeiros> yoshida: because #ruby is the official channel and #ruby-lang redirects here.
<yoshida> really?
<apeiros> …
<yoshida> theres a bunch of websites that reference the other channel
<zenspider> zerowaitstate: you can always use the debugger that ships with ruby. tack on -rdebug
<zenspider> they're old websites then
<apeiros> yoshida: their info is outdated by 2y then.
<yoshida> ah okay
lxsameer has quit [Ping timeout: 240 seconds]
lxsameer has joined #ruby
al2o3-cr has quit [Quit: WeeChat 2.2]
<yoshida> apeiros: crazy, i must be linking to old pages
<apeiros> you could tell the owners of those pages to update :)
gr33n7007h has joined #ruby
<yoshida> im on the phone with them right now
fmcgeough has quit [Quit: fmcgeough]
gr33n7007h is now known as al2o3-cr
<apeiros> 👍🏻
lxsameer has quit [Ping timeout: 260 seconds]
reber has quit [Remote host closed the connection]
Creatornator has joined #ruby
gnufied has quit [Ping timeout: 248 seconds]
zerowaitstate has quit [Quit: leaving]
<Radar> havenwood: I meant the "final" prefix on the final comment here: https://bugs.ruby-lang.org/issues/6284#change-73367
<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)
<ruby[bot]> Radar: # => [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26] (https://eval.in/1045824)
lxsameer has quit [Ping timeout: 260 seconds]
Creatornator has joined #ruby
<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…]
lightstalker has joined #ruby
paraxial has joined #ruby
cpallares has quit [Ping timeout: 240 seconds]
valkyr2e has quit [Ping timeout: 260 seconds]
Alina-malina has quit [Ping timeout: 260 seconds]
Caerus has joined #ruby
Exagone313 has joined #ruby
segy has joined #ruby
<hahuang65> zenspider: I'm not anymore, but I'm doing something similar now... something like this https://gist.github.com/hahuang65/a194c63728b9a4624ca55966706ba4e2
Alina-malina has joined #ruby
cpallares has joined #ruby
infernix has quit [Ping timeout: 265 seconds]
Cyrus has joined #ruby
jetchisel has joined #ruby
s2013 has joined #ruby
valkyr2e has joined #ruby
ArahaelPi has joined #ruby
ivanskie has joined #ruby
s2013 has quit [Ping timeout: 256 seconds]
ivanskie has quit [Client Quit]
desperek has quit [Quit: xoxo]
setient has joined #ruby
lxsameer has joined #ruby
infernix has joined #ruby
_habnabit has left #ruby [#ruby]
jcarl43 has quit [Read error: Connection reset by peer]
jcarl has joined #ruby
Creatornator has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cschneid_ has joined #ruby
lxsameer has quit [Ping timeout: 240 seconds]
lxsameer has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
cschneid_ has quit [Ping timeout: 265 seconds]
psychicist__ has quit [Ping timeout: 244 seconds]
lxsameer has quit [Ping timeout: 240 seconds]
lxsameer has joined #ruby
s2013 has joined #ruby
arooni_team_b is now known as arooni
felix_vs has joined #ruby
lxsameer has quit [Ping timeout: 256 seconds]
miah_ is now known as miah
mojtaba has quit [Quit: Leaving.]
jcarl has quit [Quit: WeeChat 2.2]
felix_vs has quit [Ping timeout: 240 seconds]
Rapture has quit [Quit: Textual IRC Client: www.textualapp.com]
Creatornator has joined #ruby