havenwood changed the topic of #ruby to: Rules & more: https://ruby-community.com || Ruby 2.4.1, 2.3.4 & 2.2.7: https://www.ruby-lang.org || Paste >3 lines of text to: https://gist.github.com || Rails questions? Ask in: #RubyOnRails || Logs: https://irclog.whitequark.org/ruby || Books: https://goo.gl/wpGhoQ
Rodya_ has joined #ruby
djbkd has joined #ruby
gfvcastro has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
uZiel has quit [Ping timeout: 268 seconds]
milardovich has joined #ruby
DTZUZU has quit [Ping timeout: 248 seconds]
milardov_ has quit [Ping timeout: 240 seconds]
Xiti has joined #ruby
oleo has quit [Read error: Connection reset by peer]
gfvcastro has joined #ruby
hutch34 has joined #ruby
Axy has quit [Ping timeout: 246 seconds]
orbyt_ has joined #ruby
deduped has quit [Ping timeout: 246 seconds]
MarkBilk has quit [Ping timeout: 255 seconds]
djbkd has quit [Remote host closed the connection]
oleo has joined #ruby
vondruch has quit [Quit: vondruch]
Cohedrin_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
vondruch has joined #ruby
hutch34 has quit [Ping timeout: 248 seconds]
Rodya_ has quit [Remote host closed the connection]
gfvcastro has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
Rodya_ has joined #ruby
nowhere_man has quit [Remote host closed the connection]
marr has quit [Ping timeout: 246 seconds]
Cohedrin_ has joined #ruby
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
baroquebobcat has joined #ruby
DTZUZO has quit [Ping timeout: 248 seconds]
nowhere_man has joined #ruby
djbkd has joined #ruby
DTZUZO has joined #ruby
Rodya_ has quit [Remote host closed the connection]
Rodya_ has joined #ruby
Axy has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
DTZUZU has joined #ruby
harai has joined #ruby
coderphive has joined #ruby
FastJack has quit [Read error: Connection reset by peer]
FastJack has joined #ruby
bronson has joined #ruby
dtcristo has joined #ruby
runescape07rsps has quit [Read error: Connection reset by peer]
bronson has quit [Ping timeout: 248 seconds]
mtkd has quit [Ping timeout: 255 seconds]
mtkd has joined #ruby
__Yiota has joined #ruby
gfvcastro has joined #ruby
ozcanesen has quit [Quit: ozcanesen]
t-recx has quit [Ping timeout: 240 seconds]
milardov_ has joined #ruby
mim1k has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
milardovich has quit [Ping timeout: 260 seconds]
mim1k has quit [Ping timeout: 240 seconds]
mwlang has quit [Quit: mwlang]
coderphive has quit [Read error: Connection reset by peer]
ts_ has joined #ruby
ts_ has quit [Remote host closed the connection]
jackjackdripper has joined #ruby
Guest17_ has joined #ruby
mson has joined #ruby
belmoussaoui has joined #ruby
enterprisey has quit [Ping timeout: 252 seconds]
Rodya_ has quit [Remote host closed the connection]
Guest17_ has quit [Quit: Textual IRC Client: www.textualapp.com]
pi4 has joined #ruby
enterprisey has joined #ruby
djbkd has quit [Remote host closed the connection]
milardovich has joined #ruby
Rodya_ has joined #ruby
gizmore has joined #ruby
pi2 has quit [Ping timeout: 260 seconds]
d^sh has quit [Ping timeout: 248 seconds]
milardov_ has quit [Ping timeout: 240 seconds]
gizmore|2 has quit [Ping timeout: 260 seconds]
Bhootrk_ has joined #ruby
d^sh has joined #ruby
jinie has quit [Ping timeout: 240 seconds]
jameser has joined #ruby
masterasia has joined #ruby
<masterasia> is anyone familiar with ruby functional programming?
<masterasia> What if I can't find a way to map an input to an output without keeping state
Rodya_ has quit [Quit: Leaving...]
jinie has joined #ruby
jameser has quit [Client Quit]
<elomatreb> masterasia: Do you have a concrete example?
maryo has joined #ruby
CBebop has joined #ruby
milardovich has quit [Remote host closed the connection]
milardovich has joined #ruby
Cohedrin_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jameser has joined #ruby
harai has quit [Ping timeout: 255 seconds]
milardovich has quit [Ping timeout: 248 seconds]
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Dimik has joined #ruby
BTRE has quit [Read error: Connection reset by peer]
harai has joined #ruby
maxvaillancourt1 has joined #ruby
apparition47 has joined #ruby
apparition47 has quit [Client Quit]
kreantos has joined #ruby
djbkd has joined #ruby
<baweaver> masterasia: without examples we couldn't tell you, though it would be best to remember that Ruby is not a purely functional language.
cadillac_ has quit [Quit: I quit]
cadillac_ has joined #ruby
bronson has joined #ruby
kreantos has quit [Ping timeout: 248 seconds]
milardovich has joined #ruby
runescape07rsps has joined #ruby
bronson has quit [Ping timeout: 252 seconds]
milardovich has quit [Ping timeout: 248 seconds]
belmoussaoui has quit [Ping timeout: 255 seconds]
maxvaillancourt1 has quit [Ping timeout: 240 seconds]
mim1k has joined #ruby
dviola has quit [Quit: WeeChat 1.9]
eckhardt has joined #ruby
mim1k has quit [Ping timeout: 248 seconds]
apparition47 has joined #ruby
belmoussaoui has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
minimalism has quit [Quit: minimalism]
milardovich has joined #ruby
theRealGent has quit [Ping timeout: 255 seconds]
eckhardt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
milardov_ has joined #ruby
BTRE has joined #ruby
milardovich has quit [Ping timeout: 248 seconds]
CBebop has quit [Quit: See you later, Space Cowboy.]
CBebop has joined #ruby
CBebop has quit [Client Quit]
CBebop has joined #ruby
Joufflu has quit [Read error: Connection reset by peer]
harfangk has joined #ruby
Joufflu has joined #ruby
gix has quit [Ping timeout: 240 seconds]
eckhardt has joined #ruby
redondos has joined #ruby
gix has joined #ruby
gothicsouth has quit [Read error: Connection reset by peer]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gothicsouth has joined #ruby
harfangk has quit [Ping timeout: 240 seconds]
cadillac_ has quit [Ping timeout: 248 seconds]
hutch34 has joined #ruby
Toledo has quit [Quit: No Ping reply in 180 seconds.]
Toledo has joined #ruby
cadillac_ has joined #ruby
mim1k has joined #ruby
eckhardt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mim1k has quit [Ping timeout: 252 seconds]
ornerymoose has joined #ruby
segy has quit [Ping timeout: 252 seconds]
KeyJoo has quit [Ping timeout: 260 seconds]
nofxxxx has joined #ruby
segy has joined #ruby
<cconstantine> I'm thinking about building a gem with native extensions for a c++ library I'm writing. My library uses a slightly non-trivial cmake build system and I'm wondering how easy it is to make use of that when building the native extension. All my googling is just giving me people failing to install gems with native extensions :(
nofxxx has quit [Ping timeout: 240 seconds]
imode has quit [Ping timeout: 246 seconds]
rockman37 has joined #ruby
rockman37 has left #ruby [#ruby]
hutch34 has quit [Ping timeout: 252 seconds]
QualityAddict has quit [Remote host closed the connection]
apparition47 has quit [Quit: Bye]
milardovich has joined #ruby
milardov_ has quit [Ping timeout: 252 seconds]
bronson has joined #ruby
bronson has quit [Ping timeout: 240 seconds]
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
Ishido has joined #ruby
alex`` has joined #ruby
harfangk has joined #ruby
segy_ has joined #ruby
milardov_ has joined #ruby
segy has quit [Ping timeout: 240 seconds]
segy_ is now known as segy
milardovich has quit [Ping timeout: 252 seconds]
McQueen has joined #ruby
McQueen has quit []
gothicsouth has quit [Ping timeout: 248 seconds]
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gothicsouth has joined #ruby
twillkens has quit [Ping timeout: 240 seconds]
segy has quit [Ping timeout: 240 seconds]
rippa has joined #ruby
enterprisey has quit [Read error: Connection reset by peer]
ornerymoose has quit [Quit: ornerymoose]
enterprisey has joined #ruby
milardovich has joined #ruby
bitsmart has joined #ruby
milardov_ has quit [Ping timeout: 240 seconds]
imode has joined #ruby
sbstudios has joined #ruby
BTRE has quit [Read error: Connection reset by peer]
sbstudios has left #ruby [#ruby]
BTRE has joined #ruby
bitsmart has quit [Quit: ZNC 1.6.5 - http://znc.in]
bitsmart has joined #ruby
uZiel has joined #ruby
apparition47 has joined #ruby
enterprisey has quit [Remote host closed the connection]
Emmanuel_Chanel has quit [Ping timeout: 248 seconds]
mkali has joined #ruby
Ishido has quit [Ping timeout: 240 seconds]
uZiel has quit [Ping timeout: 268 seconds]
djbkd has quit [Ping timeout: 240 seconds]
djbkd has joined #ruby
djbkd has quit [Client Quit]
Ishido has joined #ruby
harai has quit [Ping timeout: 240 seconds]
Dimik has quit [Ping timeout: 260 seconds]
bronson has joined #ruby
djbkd has joined #ruby
QualityAddict has joined #ruby
harai has joined #ruby
milardov_ has joined #ruby
Tungki has joined #ruby
Emmanuel_Chanel has joined #ruby
bronson has quit [Ping timeout: 248 seconds]
milardovich has quit [Ping timeout: 240 seconds]
jyaworski has quit [Ping timeout: 264 seconds]
mwlang has joined #ruby
ledestin has joined #ruby
samlisl_ has quit [Ping timeout: 248 seconds]
milardov_ has quit []
jyaworski has joined #ruby
ur5us has joined #ruby
mwlang has quit [Quit: mwlang]
amosbird has left #ruby ["WeeChat 1.9-dev"]
maryo has quit [Ping timeout: 240 seconds]
apparition47 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
djbkd has quit [Remote host closed the connection]
harfangk has quit [Ping timeout: 240 seconds]
QualityAddict has quit [Remote host closed the connection]
lxsameer has joined #ruby
mson has quit [Quit: Connection closed for inactivity]
conta has joined #ruby
harai has quit [Ping timeout: 260 seconds]
Guest40 has joined #ruby
QualityAddict has joined #ruby
_main_ has joined #ruby
_main_ has quit [Read error: Connection reset by peer]
_main_ has joined #ruby
_main_ has quit [Read error: Connection reset by peer]
kent\n has quit [Ping timeout: 246 seconds]
_main_0 has joined #ruby
__main__ has quit [Ping timeout: 252 seconds]
cats has quit [Ping timeout: 255 seconds]
kent\n has joined #ruby
Miron has quit [Ping timeout: 252 seconds]
ramortegui has quit [Ping timeout: 252 seconds]
cats has joined #ruby
Miron has joined #ruby
Pisuke has joined #ruby
c__ has joined #ruby
c__ has quit [Max SendQ exceeded]
MyMind has quit [Ping timeout: 240 seconds]
c__ has joined #ruby
c__ has quit [Max SendQ exceeded]
c__ has joined #ruby
claudiuinberlin has joined #ruby
c__ has quit [Max SendQ exceeded]
c__ has joined #ruby
c__ has quit [Max SendQ exceeded]
A124 has quit [Read error: No route to host]
marr has joined #ruby
A124 has joined #ruby
ramortegui has joined #ruby
runescape07rsps has quit [Quit: Leaving]
imode has quit [Ping timeout: 252 seconds]
ur5us has quit [Remote host closed the connection]
cconstantine has quit [Ping timeout: 255 seconds]
apparition47 has joined #ruby
ramortegui has quit [Ping timeout: 240 seconds]
dionysus69 has joined #ruby
dionysus69 has quit [Quit: dionysus69]
bronson has joined #ruby
cufujuku has joined #ruby
bronson has quit [Ping timeout: 240 seconds]
Guest40 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ramortegui has joined #ruby
lel has quit [Ping timeout: 252 seconds]
DTZUZO has quit [Ping timeout: 240 seconds]
Guest40 has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
lel has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
oleo has quit [Remote host closed the connection]
psychicist__ has joined #ruby
oleo has joined #ruby
cats has quit [Ping timeout: 255 seconds]
ur5us has joined #ruby
cats has joined #ruby
Miron has quit [Ping timeout: 255 seconds]
marr has quit [Ping timeout: 248 seconds]
Miron has joined #ruby
lxnr has joined #ruby
lxnr has quit [Client Quit]
ramortegui has quit [Quit: Ex-Chat]
ramortegui has joined #ruby
harai has joined #ruby
mkali has quit [Quit: mkali]
conta has quit [Quit: conta]
Tungki has quit [Read error: Connection reset by peer]
conta has joined #ruby
ur5us has quit [Remote host closed the connection]
agent_white has quit [Quit: brb]
<Mon_Ouie> You can use system to call cmake from your extconf.rb, I'd probably do that to compile a static library and link it to the bindings
ramortegui has quit [Ping timeout: 246 seconds]
gfvcastro has quit [Read error: Connection reset by peer]
romankapitonov has joined #ruby
roshanavand has joined #ruby
ShalokShalom_ has joined #ruby
guille-moe has joined #ruby
A124 has quit [Quit: '']
belmoussaoui has quit [Remote host closed the connection]
ShalokShalom has quit [Ping timeout: 252 seconds]
conta has quit [Quit: conta]
tomphp has joined #ruby
horst has joined #ruby
tomphp has quit [Read error: Connection reset by peer]
romankapitonov has quit [Read error: Connection reset by peer]
tomphp has joined #ruby
romankapitonov has joined #ruby
marr has joined #ruby
thnee has left #ruby ["WeeChat 1.8"]
phinxy has joined #ruby
tomphp has quit [Read error: Connection reset by peer]
tomphp_ has joined #ruby
phinxy has left #ruby [#ruby]
mtkd has quit [Ping timeout: 260 seconds]
romankapitonov has quit [Read error: Connection reset by peer]
mtkd has joined #ruby
tomphp_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
romankapitonov has joined #ruby
Fysicus has joined #ruby
mikecmpbll has joined #ruby
romankapitonov has quit [Read error: Connection reset by peer]
romankapitonov has joined #ruby
minimalism has joined #ruby
romankapitonov has quit [Read error: Connection reset by peer]
tomphp has joined #ruby
romankapitonov has joined #ruby
bronson has joined #ruby
<linduxed> here's a question i can't really figure out for myself
<linduxed> i very much like to have the `initialize` method be populated with nothing but instance variable assignment
<linduxed> that way i can instantiate objects knowing that there will be no side effects or behaviour triggered from the `.new` method
t-recx has joined #ruby
<linduxed> at the same time, if one follows that as a strict rule, then one must expect instance methods can exhibit behaviour that could have been prevented if the `initialize` method did validation
<linduxed> example: let's say that i have a Database class and that the initialize method has one argument: database_path
bronson has quit [Ping timeout: 260 seconds]
<linduxed> let's also say that Database only has one instance method: write_text
<linduxed> #write_text takes a string and writes it to the database. the details of how are not important
Ishido has quit [Ping timeout: 240 seconds]
<linduxed> by deciding on having #initialize only do instance variable setting, suddently the #write_text method needs to care for such things as "is @database_path a valid path?"
<linduxed> "@database_path.nil?"
<linduxed> these are things that one could argue would be helped by having a validation step as a part of #initialize, but then i couldn't instantiate objects as easily
<linduxed> i've been considering keeping #initialize in this rather pure form, but add a .build method to the Database class, essentially having a factory methdo
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<linduxed> but I'm unsure whether this is more confusing than beneficial
Fysicus has quit [Quit: The Truth Is Just An Excuse For A Lack Of Imagination]
<matthewd> linduxed: Personally, I don't see much point
maryo has joined #ruby
<matthewd> I'd agree that instantiating an object shouldn't "do stuff", but I'd apply a more semantic filter to what that threshold looks like
WeiJunLi has joined #ruby
<linduxed> hmmm, maybe ensuring correctness of what one tries to instantiate could be likened to the syntactic checks that are made (did you supply the right arguments? is this arg a string or a number?)
<linduxed> but then one needs to consider the existence of plenty of classes with the #valid? method
jameser has joined #ruby
roshanavand has quit [Ping timeout: 255 seconds]
WeiJunLi has quit [Ping timeout: 240 seconds]
snickers has joined #ruby
firstdayonthejob has joined #ruby
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ShalokShalom_ is now known as ShalokShalom
TomyLobo has joined #ruby
charliesome has joined #ruby
marr has quit [Ping timeout: 240 seconds]
yqt has joined #ruby
Fysicus has joined #ruby
<PacificSalmon> `#valid?` is very ORM-y, or AR-y. so is the approach you're taking. if the arguments for `#initialize` are in an invalid state, then raising an ArgumentError is probably suitable.
<clemens3> linduxed: in this case what if the file moves or gets deleted after the initialization, you might still have to deal with errors later as well
<PacificSalmon> it sounds a bit like you might be thinking yourself into a box for no gain. and also over thinking, so everything is complicated.
<matthewd> IMO there's a difference between "invalid-invalid" and "not conforming with business rules", and despite the name, a #valid? is more often the latter
<clemens3> and this whole purity thing regarding side effects, if you have a database, you have side effects.
<linduxed> PacificSalmon: raising ArgumentError might indeed be a good idea for some things!
<matthewd> Passing an integer to MyURL.new is exceptional, whereas MyURL#valid? might check whether it returns a 200
<linduxed> clemens3: true... while optimistic treatment of the database would simplify code, it wouldn't account for potential severe changes
Guest40 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<linduxed> clemens3: i specifically wrote "pure form" to avoid the expression "pure state", which i thought would imply something about side effects. i was just referencing the code structure. on the other hand, using "pure" already has its implications, i guess
firstdayonthejob has quit [Quit: WeeChat 1.9]
Guest40 has joined #ruby
firstdayonthejob has joined #ruby
<linduxed> matthewd: hmmm, will have to think how it applies to my code
<linduxed> thanks for all of your input!
<PacificSalmon> what are you writing exactly? there's some libraries out there that can handle 'attribute validation' in a AR-esque way if you're trying to plug that feature into something else.
<linduxed> PacificSalmon: tiny script which has a simple YAML file as a "database". nothing long running, which means that above discussion is purely academical for the purposes of my application
<PacificSalmon> alright. i see. well, have a look: https://github.com/solnic/virtus - if you want to enforce types and all that stuff, on regular ruby objects, may be useful
<PacificSalmon> but sounds like something way more simple would work
firstdayonthejob has quit [Quit: WeeChat 1.9]
<linduxed> i mostly asked for future reference, since i've been opting to have nothing but instance variable initialization in my #initialize methods for some time now, due to the comfort of always knowing that they can be instantiated without behaviour
sepp2k has joined #ruby
<linduxed> oooh, a solnic library!
<linduxed> reminds me of the fact that i should try out the DRY libraries
<linduxed> dry-validataion could be cool for this kind of purpose
<PacificSalmon> yeah. i never really checked out dry-* stuff, and i think examples in virtus readme are a lot better. dry-* readme is missing examples, and the docs are quite in-depth before getting to any code. but i would guess, it's just as good.
jtdowney has joined #ruby
dionysus69 has joined #ruby
firstdayonthejob has joined #ruby
vondruch has quit [Quit: vondruch]
firstdayonthejob has quit [Client Quit]
vondruch has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
__Yiota has joined #ruby
charliesome has quit [Read error: Connection reset by peer]
charliesome has joined #ruby
Guest40 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jameser has joined #ruby
skweek has quit [Read error: Connection reset by peer]
t-recx has quit [Ping timeout: 260 seconds]
t-recx has joined #ruby
romankapitonov has quit [Read error: Connection reset by peer]
romankapitonov has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jameser has quit [Quit: Textual IRC Client: www.textualapp.com]
WeiJunLi has joined #ruby
t-recx has quit [Ping timeout: 240 seconds]
moei has quit [Ping timeout: 248 seconds]
moei has joined #ruby
romankapitonov has quit [Read error: Connection reset by peer]
romankapitonov has joined #ruby
pi2 has joined #ruby
charliesome has joined #ruby
pi4 has quit [Ping timeout: 240 seconds]
ledestin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bronson has joined #ruby
Sembei has joined #ruby
Pisuke has quit [Ping timeout: 264 seconds]
DTZUZO has joined #ruby
bronson has quit [Ping timeout: 240 seconds]
romankapitonov has quit [Read error: Connection reset by peer]
romankapitonov has joined #ruby
arquebus has joined #ruby
oleo has quit [Ping timeout: 246 seconds]
moei has quit [Read error: Connection reset by peer]
moei has joined #ruby
oleo has joined #ruby
Guest40 has joined #ruby
raynold has quit [Quit: Connection closed for inactivity]
KeyJoo has joined #ruby
robnester has quit [Ping timeout: 264 seconds]
robnester has joined #ruby
arquebus has quit [Quit: konversation disconnects]
ngrigory has joined #ruby
epistrephein has joined #ruby
dviola has joined #ruby
ShalokShalom has quit [Read error: No route to host]
ShalokShalom has joined #ruby
sepp2k has quit [Quit: Leaving.]
houhoulis has joined #ruby
pi4 has joined #ruby
pi2 has quit [Ping timeout: 240 seconds]
Azure has joined #ruby
lxsameer has quit [Quit: WeeChat 1.7]
Olipro_ is now known as Olipro
brent__ has joined #ruby
unreal has joined #ruby
segy has joined #ruby
WeiJunLi has quit [Ping timeout: 240 seconds]
romankapitonov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
brent__ has quit [Remote host closed the connection]
lxsameer has joined #ruby
sepp2k has joined #ruby
t-recx has joined #ruby
raatiniemi has joined #ruby
imperator has joined #ruby
bronson has joined #ruby
hutch34 has joined #ruby
WeiJunLi has joined #ruby
horst has quit [Quit: horst]
imperator has quit [Client Quit]
bronson has quit [Ping timeout: 246 seconds]
bmurt has joined #ruby
workmad3 has joined #ruby
hutch34 has quit [Ping timeout: 260 seconds]
workmad3 has quit [Ping timeout: 248 seconds]
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
samlisl_ has joined #ruby
apparition47 has quit [Quit: Bye]
Dimik has joined #ruby
KeyJoo has quit [Remote host closed the connection]
<dminuoso> Oh boy!
<dminuoso> I found my new toy.
<dminuoso> [a, b, c].flat_map(&computeStep)
<dminuoso> So we have a monad after all in Ruby.
jdarius has quit [Ping timeout: 260 seconds]
Ishido has joined #ruby
enterprisey has joined #ruby
crst has joined #ruby
gfvcastro has joined #ruby
<crst> Hi, what's redundant here: f.select(:type, ['Auto', 'Semi-Auto', 'Man'], {}, { id: '', class: '' }) ?
<matthewd> crst: I guess you're talking about a rubocop message... I thought those were pretty specific though
<crst> matthewd: yeah, I get redundant curly braces around a hash parameter
brent__ has joined #ruby
<matthewd> Well, that does sound specific
Mon_Ouie has quit [Ping timeout: 264 seconds]
theRealGent has joined #ruby
hutch34 has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<crst> Where exactly is the error? I can't see it.
brent__ has quit [Ping timeout: 240 seconds]
Joufflu has quit [Ping timeout: 240 seconds]
<matthewd> 1. It's a lint warning, not an error. 2. There are two sets of curly braces: it's one of them.
<crst> matthewd: well now it suddenly works when I remove it, of course. thanks
hinbody has quit [Read error: Connection reset by peer]
__Yiota has joined #ruby
<dminuoso> Sounds like a case of making the linter happy.
__Yiota has quit [Client Quit]
<crst> dminuoso: well yeah, I just can't work when there's messages :D
hinbody has joined #ruby
alveric4 has quit [Ping timeout: 252 seconds]
orbyt_ has joined #ruby
<crst> What do you do when you want to have ['word1', 'tog ether', 'word3'] from %w[word1 tog ether Word3] ?
sepp2k has quit [Ping timeout: 240 seconds]
AlexRussia has quit [Quit: WeeChat 1.9]
uZiel has joined #ruby
<dminuoso> crst, you can escape spaces with \
conta has joined #ruby
<dminuoso> >> %w[word1 tog\ ether Word3]
<ruby[bot]> dminuoso: # => ["word1", "tog ether", "Word3"] (https://eval.in/854546)
<crst> dminuoso: cool! thanks
alveric4 has joined #ruby
hutch34 has quit [Read error: Connection reset by peer]
hutch34 has joined #ruby
kreantos has joined #ruby
cadillac_ has quit [Ping timeout: 240 seconds]
__Yiota has joined #ruby
epistrephein has quit [Quit: Textual IRC Client: www.textualapp.com]
cadillac_ has joined #ruby
uZiel has quit [Ping timeout: 268 seconds]
kreantos has quit [Remote host closed the connection]
selim has quit [Ping timeout: 255 seconds]
Cohedrin_ has joined #ruby
selim has joined #ruby
uZiel has joined #ruby
Kuukunen has quit [Ping timeout: 240 seconds]
Kuukunen has joined #ruby
uZiel has quit [Remote host closed the connection]
houhoulis has quit [Remote host closed the connection]
pi2 has joined #ruby
skweek has joined #ruby
pi4 has quit [Ping timeout: 240 seconds]
houhoulis has joined #ruby
cconstantine has joined #ruby
bronson has joined #ruby
bronson has quit [Ping timeout: 264 seconds]
hutch34 has quit [Ping timeout: 255 seconds]
Sambsquanch has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tacoboy has joined #ruby
^mtkd has joined #ruby
mtkd has quit [Read error: Connection reset by peer]
bmurt has joined #ruby
cufujuku has quit [Quit: Page closed]
bmurt has quit [Client Quit]
segy has quit [Ping timeout: 252 seconds]
segy has joined #ruby
ramortegui has joined #ruby
twillkens has joined #ruby
Sambsquanch has quit [Quit: Peace, take it easy.]
enterprisey has quit [Ping timeout: 248 seconds]
Azure has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dionysus69 has quit [Ping timeout: 240 seconds]
ftwig has joined #ruby
ftwig has quit [Client Quit]
funkytwig has joined #ruby
funkytwig has quit [Client Quit]
funkytwig has joined #ruby
funkytwig has quit [Client Quit]
s00pcan has quit [Ping timeout: 255 seconds]
funkytwig has joined #ruby
imode has joined #ruby
enterprisey has joined #ruby
bijan_ has joined #ruby
bijan_ has quit [Remote host closed the connection]
s00pcan has joined #ruby
maryo has quit [Ping timeout: 255 seconds]
bijan_ has joined #ruby
drcode has quit [Ping timeout: 248 seconds]
houhoulis has quit [Remote host closed the connection]
KeyJoo has joined #ruby
conta has quit [Ping timeout: 248 seconds]
pavelz has joined #ruby
maryo has joined #ruby
<pavelz> anyone using vim-rails / rails.vim ?
drcode has joined #ruby
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
^mtkd has quit [Ping timeout: 255 seconds]
dionysus69 has joined #ruby
twillkens has quit [Ping timeout: 240 seconds]
twillkens has joined #ruby
mtkd has joined #ruby
snickers has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
drcode has quit [Ping timeout: 240 seconds]
tomphp has joined #ruby
kreantos has joined #ruby
m27frogy has quit [Quit: ZNC - http://znc.in]
kreantos has quit [Ping timeout: 248 seconds]
^mtkd has joined #ruby
mtkd has quit [Read error: Connection reset by peer]
WeiJunLi has quit [Remote host closed the connection]
tomphp has quit [Ping timeout: 260 seconds]
hutch34 has joined #ruby
naftilos76 has joined #ruby
sepp2k has joined #ruby
^mtkd has quit [Ping timeout: 255 seconds]
mtkd has joined #ruby
hutch34 has quit [Ping timeout: 246 seconds]
KeyJoo has quit [Remote host closed the connection]
yeticry_ has quit [Read error: Connection reset by peer]
yeticry has joined #ruby
funkytwig has quit [Ping timeout: 246 seconds]
KeyJoo has joined #ruby
cconstantine has quit [Ping timeout: 246 seconds]
ovaltine has quit [Ping timeout: 246 seconds]
cconstantine has joined #ruby
ovaltine has joined #ruby
cconstantine has quit [Remote host closed the connection]
KeyJoo has quit [Quit: Good luck! Have a nice Day!]
KeyJoo has joined #ruby
nahra has quit [Quit: ERC (IRC client for Emacs 25.1.1)]
Dimik has quit [Ping timeout: 252 seconds]
ledestin has joined #ruby
bronson has joined #ruby
ayromo08 has joined #ruby
maryo has quit [Ping timeout: 240 seconds]
ayromo08 has quit [Client Quit]
funkytwig has joined #ruby
nahra has joined #ruby
bronson has quit [Ping timeout: 240 seconds]
drcode has joined #ruby
WeiJunLi has joined #ruby
sagax has joined #ruby
preyalone has joined #ruby
MyMind has joined #ruby
Sembei has quit [Ping timeout: 240 seconds]
drcode has quit [Ping timeout: 248 seconds]
sneakerhax has quit [Ping timeout: 248 seconds]
Pisuke has joined #ruby
twillkens has quit [Ping timeout: 240 seconds]
MyMind has quit [Ping timeout: 240 seconds]
yqt has quit [Quit: KVIrc 4.0.4 Insomnia http://www.kvirc.net/]
_sfiguser has joined #ruby
brent__ has joined #ruby
tvw has joined #ruby
gix has quit [Read error: Connection reset by peer]
Mon_Ouie has joined #ruby
brent__ has quit [Ping timeout: 240 seconds]
imode has quit [Ping timeout: 246 seconds]
gix has joined #ruby
Joufflu has joined #ruby
bijan_ has quit [Remote host closed the connection]
ayonkhan has joined #ruby
FrostCandy has joined #ruby
ayonkhan has quit [Client Quit]
runescape07rsps has joined #ruby
ayonkhan has joined #ruby
tamouse__ has joined #ruby
ayonkhan has quit [Client Quit]
ayonkhan has joined #ruby
moei has quit [Quit: Leaving...]
xco has joined #ruby
<xco> hello. i don’t understand this line https://gist.github.com/xcobar/a37801f53efbb8a7e54e6bb1f8f55f3e#file-state_machine-rb-L2 any help will be appreciated
<dminuoso> ast>> transition all - [:queued, :created] => :queued
<ruby[bot]> dminuoso: I have parsed your code, the result is at https://eval.in/854610
<dminuoso> xco, ^- is this what you were asking for?
VLetrmx has left #ruby [#ruby]
ayonkhan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
guille-moe has quit [Ping timeout: 248 seconds]
<xco> dminuoso: that confused me even more
<dminuoso> xco, ok.
dc_99 has joined #ruby
<xco> but thanks anyway :)
<dminuoso> xco, `m k => b` is basically the same as m({k => b})
<xco> now that’s better!
<xco> thank you! :) :) :)
<dminuoso> and the way precendece works that code means: transition (all - {[:queued, :created] => :queued})
<xco> dminuoso: awesome!
dc_99 has quit [Quit: Textual IRC Client: www.textualapp.com]
Mon_Ouie has quit [Quit: WeeChat 1.9]
dc_99 has joined #ruby
MrBismuth has joined #ruby
<xco> dminuoso: btw what’s this construct called?
charliesome has joined #ruby
<xco> this one i mean
<xco> transition all - [:queued, :created] => :queued
<dminuoso> xco, a method call.
twillkens has joined #ruby
<dminuoso> xco, and libraries use elaborate patterns to implement what we call a "domain specific language". this is a very simple form of that.
charliesome has quit [Remote host closed the connection]
MrBusiness3 has quit [Ping timeout: 252 seconds]
<dminuoso> But in the end its just plain old ruby code.
<xco> so here “transition” is the method
<xco> ?
<dminuoso> Yes.
<xco> thank you :)
mark_on_the_moon has joined #ruby
roshanavand has joined #ruby
<dminuoso> xco, actually excude my poor bracketing skills I made a mistake up there
<dminuoso> transition({(all - [:queued, :created]) => :queued})
<dminuoso> And A - B gives you the relative compliment of B in A.
high_fiver has joined #ruby
<xco> looks to me as if all - [:queued, :created] => :queued, then, is a hash. true or false?
<dminuoso> xco, yes.
<dminuoso> xco, using the result of all - [:queued, :created] as its key, and :queued as its value
<xco> peeeeerfect
<xco> something so simple boggled my mind :D
<xco> you’re awesome
<dminuoso> If I had been awesome I wouldnt have made this so complicated.
charliesome has joined #ruby
guille-moe has joined #ruby
<xco> also i didn’t nkow doing “hello” => “world” was a way of creating hashes...
<xco> but now i know :)
<xco> one beer for you
<dminuoso> xco, its actually the "real" way. { a: 1 } is just a shorthand for { :a => 1 }
naftilos76 has quit [Quit: Αποχώρησε]
<dminuoso> xco, for brevity you are allowed to omit the parens in method calls
<xco> yeap. it’s evident now
<dminuoso> or braces I guess?
charliesome has quit [Ping timeout: 252 seconds]
numbdewd has joined #ruby
skweek has quit [Ping timeout: 248 seconds]
<apeiros> there seems to be no real standard, but personally I use parens = (), brackets = [], (curly) braces = {}
<dminuoso> apeiros, what would you call <> ?
<apeiros> angle brackets iirc
SteenJobs_ has joined #ruby
<dminuoso> The C++ standard would agree with you at least.
<apeiros> or lt & gt :)
<dminuoso> Heh.
<dminuoso> Or SQL ne
FrostCandy has quit []
<apeiros> I only recently learned that most sql also supports !=
hutch34 has joined #ruby
charliesome has joined #ruby
enterprisey has quit [Read error: Connection reset by peer]
ur5us has joined #ruby
mark_on_the_moon has quit [Ping timeout: 252 seconds]
<PacificSalmon> does it support html entities. i'm only interested in databases that support: `select * from table where 'table.version' &gt; 9000`. which is why i have yet to use a database.
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<dminuoso> PacificSalmon, looks trivial enough to implement in Postgres.
<dminuoso> Maybe Ill keep that idea ready for next april fool's day.
<PacificSalmon> only reasonable DB
high_fiver has quit [Ping timeout: 240 seconds]
ornerymoose has joined #ruby
imode has joined #ruby
hutch34 has quit [Ping timeout: 252 seconds]
bronson has joined #ruby
TomyLobo has quit [Ping timeout: 240 seconds]
__Yiota has joined #ruby
houhoulis has joined #ruby
Bhootrk_ has quit [Quit: Leaving]
johnny56 has joined #ruby
bronson has quit [Ping timeout: 260 seconds]
Bhootrk_ has joined #ruby
Bhootrk_ has quit [Max SendQ exceeded]
claudiuinberlin has quit [Quit: Textual IRC Client: www.textualapp.com]
dionysus69 has quit [Ping timeout: 248 seconds]
skweek has joined #ruby
kreantos has joined #ruby
runescape07rsps has quit [Ping timeout: 248 seconds]
kreantos has quit [Ping timeout: 260 seconds]
ahrs has quit [Remote host closed the connection]
ahrs has joined #ruby
marr has joined #ruby
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
someuser has joined #ruby
sepp2k has quit [Quit: Leaving.]
Dimik has joined #ruby
SteenJobs_ has quit [Quit: SteenJobs_]
SteenJobs_ has joined #ruby
SteenJobs_ has quit [Client Quit]
SteenJobs_ has joined #ruby
roshanavand has quit [Ping timeout: 255 seconds]
hutch34 has joined #ruby
xco_ has joined #ruby
skweek has quit [Ping timeout: 252 seconds]
xco has quit [Ping timeout: 240 seconds]
xco_ is now known as xco
jinie has quit [Ping timeout: 260 seconds]
jinie has joined #ruby
karmayogi23 has joined #ruby
hutch34 has quit [Ping timeout: 252 seconds]
Neo95 has joined #ruby
gfvcastro has quit [Read error: Connection reset by peer]
__Yiota has joined #ruby
runescape07rsps has joined #ruby
hutch34 has joined #ruby
houhoulis has quit [Remote host closed the connection]
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Dimik has quit [Ping timeout: 248 seconds]
hutch34 has quit [Ping timeout: 246 seconds]
__Yiota has joined #ruby
Guest40 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Guest40 has joined #ruby
Guest40 has quit [Client Quit]
Guest40 has joined #ruby
Guest40 has quit [Client Quit]
Guest40 has joined #ruby
Guest40 has quit [Client Quit]
guille-moe has quit [Ping timeout: 240 seconds]
Guest40 has joined #ruby
Guest40 has quit [Client Quit]
nofxxx has joined #ruby
Guest40 has joined #ruby
Guest40 has quit [Client Quit]
nofxxxx has quit [Ping timeout: 246 seconds]
Neo95 has quit [Ping timeout: 260 seconds]
alveric has joined #ruby
preyalone has quit [Quit: Connection closed for inactivity]
bronson has joined #ruby
alveric4 has quit [Ping timeout: 255 seconds]
hutch34 has joined #ruby
bronson has quit [Ping timeout: 248 seconds]
SteenJobs_ has quit [Quit: SteenJobs_]
selim has quit [Ping timeout: 252 seconds]
ShalokShalom has quit [Ping timeout: 260 seconds]
selim has joined #ruby
hutch34 has quit [Ping timeout: 252 seconds]
SteenJobs_ has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
t-recx has quit [Quit: t-recx]
nadir has quit [Quit: Connection closed for inactivity]
AxelAlex has quit [Quit: AxelAlex]
brent__ has joined #ruby
armando has quit [Quit: ZNC 1.7.x-nightly-20170721-e5f20476 - https://znc.in]
armando has joined #ruby
brent__ has quit [Ping timeout: 248 seconds]
dc_99 has quit [Ping timeout: 255 seconds]
mostlybadfly has joined #ruby
eb0t has quit [Quit: WeeChat 1.4]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Neo95 has joined #ruby
ayonkhan has joined #ruby
ovaltine has quit [Ping timeout: 255 seconds]
lxsameer has quit [Ping timeout: 246 seconds]
ovaltine has joined #ruby
jackjackdripper has joined #ruby
alex`` has quit [Ping timeout: 255 seconds]
Dimik has joined #ruby
cconstantine has joined #ruby