baweaver changed the topic of #ruby to: Rules & more: https://ruby-community.com || Ruby 2.4.0, 2.3.3 & 2.2.6: 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
tau has joined #ruby
AndBobsYourUncle has joined #ruby
OTORelic has joined #ruby
millerti has joined #ruby
Fernando-Basso has quit [Quit: WeeChat 1.7]
milardovich has joined #ruby
JoshS has joined #ruby
charliesome has joined #ruby
choke has quit [Ping timeout: 240 seconds]
bounb has quit [Ping timeout: 245 seconds]
rkazak_ has quit [Quit: Sleep.....ing....]
BabyMario has left #ruby ["bbl"]
gloscombe_ has quit [Quit: gloscombe_]
czerasz has joined #ruby
augcesar has quit [Quit: Connection closed for inactivity]
preyalone has quit [Quit: Connection closed for inactivity]
pawnbox has joined #ruby
bigkevmcd has quit [Read error: Connection reset by peer]
bigkevmcd has joined #ruby
cschneid_ has joined #ruby
toretore has quit [Ping timeout: 264 seconds]
mikecmpbll has joined #ruby
pawnbox has quit [Ping timeout: 260 seconds]
cschneid_ has quit [Ping timeout: 260 seconds]
jgnagy has quit [Ping timeout: 240 seconds]
AndBobsYourUncle has quit [Quit: Textual IRC Client: www.textualapp.com]
jdelreal has joined #ruby
Olipro has quit [Ping timeout: 252 seconds]
houhoulis has joined #ruby
ramfjord_ has joined #ruby
ramfjord has quit [Ping timeout: 240 seconds]
ramfjord_ has quit [Ping timeout: 240 seconds]
houhoulis has quit [Remote host closed the connection]
_djbkd has quit [Remote host closed the connection]
SeepingN has quit [Quit: The system is going down for reboot NOW!]
bkxd has joined #ruby
brent__ has quit [Remote host closed the connection]
dopamean_ has joined #ruby
tmtwd has joined #ruby
brent__ has joined #ruby
pulkit4tech has quit [Quit: Connection closed for inactivity]
brent__ has quit [Ping timeout: 258 seconds]
benlieb has quit [Quit: benlieb]
benlieb has joined #ruby
benlieb has quit [Client Quit]
raul782 has quit [Remote host closed the connection]
raul782 has joined #ruby
saneax is now known as saneax-_-|AFK
jhack has joined #ruby
gsilva has joined #ruby
matcouto has quit [Ping timeout: 268 seconds]
lupine has quit [Ping timeout: 256 seconds]
BackEndCoder has quit [Excess Flood]
BackEndCoder has joined #ruby
benlieb has joined #ruby
dviola has joined #ruby
am55_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
pawnbox has joined #ruby
matcouto has joined #ruby
pawnbox has quit [Ping timeout: 240 seconds]
griffindy has joined #ruby
minimalism has joined #ruby
Olipro has joined #ruby
eyeye has quit [Remote host closed the connection]
rhyselsmore has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rhyselsmore has joined #ruby
rhyselsmore has quit [Client Quit]
grant has joined #ruby
raul782 has quit [Remote host closed the connection]
hutch34 has quit [Ping timeout: 258 seconds]
cfec0b8d has quit [Ping timeout: 268 seconds]
benlieb has quit [Quit: benlieb]
tau has quit [Remote host closed the connection]
maddmaxx has joined #ruby
maddmaxx has quit [Client Quit]
zeroDi has quit [Quit: WeeChat 1.7]
saneax-_-|AFK is now known as saneax
benlieb has joined #ruby
bkxd has quit [Ping timeout: 260 seconds]
minimalism has quit [Quit: minimalism]
minimalism has joined #ruby
marr has quit [Ping timeout: 240 seconds]
<mzo> hi folks
<mzo> what are the best parts about ruby
<mzo> that make it so magical to work with
<bougyman> The lack of surprises.
bmurt has joined #ruby
cdg has joined #ruby
xenops has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<allisio> lel
<mzo> here's a litmus test: are there other languages with the properties you listed, but which suck? then your answer is not that good
<Disavowed> Good metaprogramming. Wealth of good libraries. Broadly sensible language design choices.
<allisio> Remains Turing-complete no matter how much of it you remove.
tolerablyjake has joined #ruby
<mzo> wut
<mzo> that's just false
<mzo> Disavowed: that's a good one
<allisio> I linked you there the other day. :(
<mzo> i don't need to click any links to know that's false
<mzo> yes and i watched a good chunk of the talk
<allisio> I was obviously speaking hyperbolically, but only just.
benlieb has quit [Quit: benlieb]
<mzo> once you realize procs let you express the lambda calculus, the rest of the talk is just the boring process of going through church numerals, booleans, etc.
<allisio> Well, ain't you just too clever by half?
am55_ has joined #ruby
<mzo> i'm dumb i don't get functional programming
<allisio> How can functions be real if zygohistomorphic prepromorphisms aren't real?
<mzo> lel
<mzo> i want to make my language good so i need to know what to steal from ruby
<allisio> All of it.
<allisio> None of it.
<mzo> ur confusing me
m_31 has joined #ruby
<mzo> i definitely don't want all of it
<allisio> What's your least favorite part?
<mzo> lack of #to_i on TrueClass and FalseClass
<allisio> I, for one, hate having to say `@foo = foo; @bar = bar`.
<mzo> jk
<allisio> Please to fix.
<mzo> subclass Struct
benlieb has joined #ruby
nadir has quit [Quit: Connection closed for inactivity]
<Disavowed> allisio: I'm new-ish to Ruby and I'm surprised there isn't some syntactic sugar a la attr_reader to fix that one.
<mzo> i was thinking of that though
<mzo> i might do class Foo(x, y, z) and auto-generate a ctor like init(x, y, z) { self.x = x; self.y = y; self.z = z; }
m__31 has quit [Ping timeout: 260 seconds]
<mzo> Disavowed: what other langs do u know
<Disavowed> mzo: Have you ever seen that in any language though? It seems neat, but I assume people much smarter than me have thought of it before and rejected it in their implementation.
<mzo> yes Scala has it
<Disavowed> mzo: Nothing of note. Python and Clojure would be my main ones
<Disavowed> I'm trying to crack Haskell but I have that nagging feeling I'm not yet smart enough
<mzo> here's a hint
<mzo> nobody is smart enough for haskell
am55_ has quit [Quit: Textual IRC Client: www.textualapp.com]
<allisio> CoffeeScript has it.
<mzo> haskell and rust for example have similar
<Disavowed> interesting
<mzo> the implicit ctor in my lang would be like a data constructor in haskell
<mzo> data Foo = Foo Int Int Int ; let foo = Foo 4 5 6
eboaz has joined #ruby
<allisio> Without mucking around with TracePoint to get at the binding implicitly: https://eval.in/753890
<Disavowed> hang on, doesn't JS have prototypal inheritance? So if an attribute is bound to an object from the constructor, does that mean it's present on unrelated objects that inherit from the same type? Or have I made a mistake in my assumptions somewhere?
<jhack> avdi, thanks for the freebies :)
<mzo> every object has a prototype
<Disavowed> allisio: That is kind of neat
<allisio> Disavowed: You're kind of neat.
<Disavowed> allisio: <3
Coldblackice has joined #ruby
<Disavowed> You've just given me a wonderful idea
<allisio> I like it when that happens.
<allisio> Keep talkin' dirty to me.
<Disavowed> I always get frustrated at forgetting to coerce a varuiable to a string before I raise it as an exception. I could just patch the exception class to automatically do that for me when I'm debugging.
<Disavowed> allisio: You got it baby!
<allisio> Disavowed: You'd do that with Module#prepend, though.
<Disavowed> TIL
<mzo> how crucial are mixins to ruby's magicalness
<allisio> Multiple inheritance has its pros and cons.
<mzo> how about operator overloading. good?
<allisio> They don't have much of anything to do with its (absurdly thorough) metaprogramming facilities, though.
chrickso has joined #ruby
<allisio> Not something I'd want to be without, but you should make assignment an operator.
<mzo> what are the key features that make metaprogramming tick in ruby
FoolsGambit has joined #ruby
<mzo> make assignment an operator? isn't it already?
<allisio> How do I overload it?
<mzo> just because you can't overload it doesn't mean it's not an operator
<mzo> or does it
<allisio> It's not a "Ruby operator" like all the other Ruby operators.
<mzo> it doesn't make sense to overload though
<allisio> </3
mikecmpbll has quit [Quit: inabit. zz.]
<mzo> i mean how could it possibly have sensible semantics
<allisio> It'd be nice to be able to "respond" to an assignment.
tmtwd has quit [Ping timeout: 246 seconds]
<mzo> foo['bar'] = 'baz' would invoke = on foo['bar'], but presumably you'd want to call = on foo with 'bar', 'baz'?
shinnya has joined #ruby
<allisio> #[]= is an operator.
<mzo> yes
<allisio> But #= is not.
<allisio> Problem.
<mzo> how
<mzo> what could you ever want to do in response to =
<allisio> Things.
<allisio> Bad things, granted.
<allisio> But still things.
<mzo> user-defined operators
<mzo> what do u think
<allisio> Scary.
<bougyman> are you trying to make ruby golf better?
<bougyman> that's the only use case I could see for that.
<allisio> mzo: Have you seen what the Haskellers get up to in that department?
<mzo> used extensively in haskell and we all know haskell is the best
<mzo> are u telling me a <*<$>*> b doesn't make sense to u
<allisio> Puts the spaceship operator to shame.
jenrzzz has joined #ruby
<allisio> Did you know you can customize how your objects participate in Ranges?
milardovich has quit [Remote host closed the connection]
<mzo> no
antoniobeyah has quit [Quit: Connection closed for inactivity]
<mzo> does * work on any Enumerable
cdg has quit [Remote host closed the connection]
cdg has joined #ruby
rhyselsmore has joined #ruby
cdg_ has joined #ruby
<allisio> >> class Integer; def to_a; ['lol'] end end; *42
<ruby[bot]> allisio: # => /tmp/execpad-52bc8132ca2a/source-52bc8132ca2a:2: syntax error, unexpected '\n', expecting &. or :: o ...check link for more (https://eval.in/753893)
<allisio> Wat.
FoolsGambit has quit [Quit: Going offline, see ya! (www.adiirc.com)]
<allisio> Anyway, anything with a #to_ary or (failing that) #to_a method.
<chrickso> hi all. i'm looking for advice. i already know python and flask enough to make some stuff but i'm feeling this gravity towards rails to speed things up and have an all-in-one well-maintained package. anyone have experience with both languages/frameworks that could offer any insight?
hutch34 has joined #ruby
<mzo> do u find ruby's naming a little inconsistent
<allisio> It's objectively the case.
<mzo> why is array abbreviated in to_ary but then there's long methods like each_with_index
<baweaver> chrickso: Objectively Flask is analogous to Sinatra in Ruby.
jameser has joined #ruby
<allisio> Coercion implicitly tries to use #to_ary and #to_str first, but then it's #to_h for `**`.
<baweaver> chrickso As far as Rails itself, it's batteries included
<baweaver> chrickso: meaning that it does a lot of the lifting for you out of the gate. The problem with that is you have to know what those things are and then you have to play nicely with them being that way.
<chrickso> baweaver: ya, i've heard that. guess i have so many batteries plugged into flask and my concern is that they are not particularly well mainted/cohesive
<Disavowed> chrickso: I spent many years using Flask and Django; now I reach for Rails whenever I have the choice. YMMV of course, but the switch isn't that taxing
<baweaver> If you've dealt with one MVC framework Rails is straightforward
tolerablyjake has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
d^sh has quit [Ping timeout: 240 seconds]
cdg has quit [Ping timeout: 246 seconds]
<mzo> whats the best way to learn rails these days
raul782 has joined #ruby
<baweaver> Rails 4 in Action
<mzo> i thought rails 5 is out
<baweaver> It is. Books can take a bit to write.
<mzo> so that book there will get me up to speed
<baweaver> There are a few 5 specific books out, but the differences are small enough it's mainly just an extension on concepts you'd learn already as a base.
d^sh has joined #ruby
<mzo> chrickso: lets learn rails
<baweaver> The Rails 5 Way is still beta and is the Tome level book (big, beefy, and super-reference potential)
<baweaver> That'd be the advanced option
<baweaver> R4iA is the beginner option
<mzo> last thing i need is a tome
<mzo> lifes 2 short 4 tomes
<baweaver> There's also Hartl's Rails tutorial online which is also in the newbie category.
hutch34 has quit [Ping timeout: 264 seconds]
<Disavowed> mzo: I enjoyed this: https://www.railstutorial.org/book/ but it might be a little basic for you
<baweaver> ^ Hartl
<chrickso> mzo: you going to teach me rails?
<baweaver> Pragmatic Programmers had a Rails 5 book that I haven't read but they put out good stuff consistently
<mzo> chrickso: no i want to learn it hehe
<chrickso> whats the thoughts on learning from the rails 4 book using rails 5?
<mzo> check above baweaver commented on that
rkazak_ has joined #ruby
<baweaver> Basics are the same, only really big differences are Webpack and ActionCable, both of which I would avoid in the short term
<chrickso> whats a good place for tutorials beyond the beginner basics? like full blown user account setup with all the security in mind?
<baweaver> r4ia covers that
raul782 has quit [Ping timeout: 260 seconds]
rkazak_ has quit [Client Quit]
alibby has quit [Quit: Leaving.]
<baweaver> Radar: sell your dang book
<mzo> i want to make full blown rails apps
<Disavowed> mzo: The Hartl book I linked walks you through making a twitter clone, replete with authentication, etc
<baweaver> Jokes aside, both the Rails Tutorial and Rails 4 in Action build complete apps
<baweaver> including testing, authentication, and the rest of it
<mzo> i want to hook my rails app up to mongodb. i want it to talk to postgres. i want it playing with redis. you name it, i want my rails app to tie into it some how or other.
<baweaver> Avoid Mongo
<baweaver> PSQL is easy. Redis is easy.
<mzo> rails doesn't play nicely with mongo?
<baweaver> It can, but Mongo doesn't play nicely with architectural sanity
<mzo> ok i'll steer clear of that nonsense then
<chrickso> so rails 4 in action will take me from beginner to advanced and convert easily to rails 5?
<mzo> Disavowed: ok i will check that out
<baweaver> It'll take you from Beginner to Low Intermediate
<chrickso> anyone know a timeline if they are updating to rails 5 in action? hasn't 5 been out for like 6 months?
<baweaver> They'd have to find more authors because Manning treats authors poorly.
<chrickso> whats the low intermediate to advanced book?
<baweaver> The Rails 5 Way
<mzo> the idea of being a rails developer is very cool to me
<mzo> i want to get a rails sticker on my macbook
jhack has quit [Quit: Leaving]
jenrzzz has quit [Ping timeout: 258 seconds]
<mzo> can rails play nicely with React?
<baweaver> If it can supply JSON, it can play with React
<baweaver> or Angular or Ember or Vue or....
<mzo> i like to have my main http server just server static html, js, and css, and then have a separate rack server running my application that only serves JSON
<mzo> but it seems with rails there's this focus on erb
<baweaver> Rails API mode.
<mzo> is that popular?
<baweaver> Fairly, yes.
jameser_ has joined #ruby
jdelreal has quit [Quit: Connection closed for inactivity]
chimkan has joined #ruby
<mzo> what does that gem do
bkxd has joined #ruby
<mzo> why can't i transpile my jsx to es5 manually and serve it with nginx, then just serve json with rails
moei has quit [Quit: Leaving...]
<baweaver> You can.
<mzo> i mean i know i can, but should i be using that gem instead? like it seems overly-complicated to me but then again i dont know anything
<baweaver> Pragmatic Programmers is great in general, just never read that book specifically
<baweaver> I don't like it myself. I think it marries Frontend to Backend in a rather unholy way.
<chrickso> ha! whats the problem with it?
<chrickso> huh... alright. noted
<baweaver> I have no opinions on that book
jameser has quit [Ping timeout: 260 seconds]
<baweaver> As I said, I've not read it, so I cannot have any really useful opinions on it chrickso
<mzo> baweaver: that gem, you mean?
<mzo> or React in general
<chrickso> o. i read what you said as 'never reed that book' but you mean you've never red that book. my bad
hutch34 has joined #ruby
<baweaver> That gem
<mzo> lol english is so dumb
cdg_ has quit [Ping timeout: 240 seconds]
<baweaver> The simple pattern is Backend JSON, frontend JS Framework
<mzo> yes
<mzo> i like that a lot
jameser_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<mzo> i don't like any of this HTML templating stuff on the backend
<mzo> never have
<baweaver> rails new my_api --api
<baweaver> might need to use jbuilder for serialization though.
saneax is now known as saneax-_-|AFK
<baweaver> If you're just learning Rails though, start with the ERB/HAML system then worry about all the fancy stuff
<mzo> isn't this less fancy
<baweaver> Batteries included, remember
<mzo> do you still get sessions with rails api
electrostat has quit [Quit: uwotm8]
<baweaver> Depends on your auth framework
bruce_lee has joined #ruby
bruce_lee has joined #ruby
bruce_lee has quit [Changing host]
<baweaver> but in general yes.
<mzo> all the rails tutorial material uses erb/haml doesn't it
<baweaver> yep
<mzo> i'll have to use it
<baweaver> so run through those by the letter first
<baweaver> then branch out
<baweaver> I've used AngularJS 1.x for 2-3 years now.
<mzo> sorry to hear that
<baweaver> If I had it to do over again I would have picked EmberJS hands down. Angular 1 is a mess of design patterns.
rob has joined #ruby
<mzo> what do you think about Angular 2
<baweaver> Angular 2 looks like a vast improvement
<mzo> i'm no expert but React seems to be the clear winner when it comes to frontend frameworks, isn't it?
<baweaver> I've yet to do anything significant in it though
<mzo> and Vue is nice too
<baweaver> Vue is Angular light
<baweaver> React on its own isn't really a framework
<baweaver> it's a view layer
electrostat has joined #ruby
chimkan has quit [Quit: chimkan]
<baweaver> You'd need Flux or Redux to make it into a framework
jameser has joined #ruby
<baweaver> If you like Rails you'll like Ember. Katz wrote most of the original Ember and he was a Rails contributor for a good amount of time
<baweaver> I've not played with React enough to speak to it either.
<baweaver> though I have a great amount of skepticism towards build-your-own-framework systems, especially in Javascript.
<mzo> ok
<mzo> i will take a peek at ember
<baweaver> Evaluate a few of them.
<baweaver> Just remember it's a jungle out there, don't go in too deep.
<mzo> :]
hahuang61 has joined #ruby
govg has quit [Ping timeout: 246 seconds]
gsilva has quit [Ping timeout: 240 seconds]
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hxegon_afk has quit [Quit: leaving]
Channel6 has joined #ruby
hahuang61 has quit [Read error: Connection reset by peer]
libastral has quit [Ping timeout: 260 seconds]
rob has quit [Remote host closed the connection]
hxegon has joined #ruby
hahuang61 has joined #ruby
HoierM has quit [Ping timeout: 256 seconds]
roflmyeggo has joined #ruby
<allisio> Is it possible to defer a call to #binding?
moei has joined #ruby
libastral has joined #ruby
chouhoulis has joined #ruby
<mzo> allisio: still working on the Convenience module?
t-recx has quit [Quit: t-recx]
snath has joined #ruby
<allisio> mzo: Guilty.
<allisio> It feels like this oughta return `[:foo, :bar]`: https://eval.in/753900
<allisio> But `@deferred_binding` is obviously a misnomer.
roflmyeggo has quit [Ping timeout: 240 seconds]
pawnbox has joined #ruby
chrickso has quit []
raul782 has joined #ruby
roflmyeggo has joined #ruby
nofxx has joined #ruby
genpaku has quit [Remote host closed the connection]
astrobunny has joined #ruby
govg has joined #ruby
pawnbox has quit [Ping timeout: 260 seconds]
snath has left #ruby ["Leaving"]
genpaku has joined #ruby
hutch34 has quit [Ping timeout: 268 seconds]
hxegon is now known as hxegon_afk
gusrub has quit []
KnownSyntax has quit [Ping timeout: 240 seconds]
KnownSyntax has joined #ruby
KnownSyntax has joined #ruby
KnownSyntax has quit [Changing host]
kobain has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
Derperperd has joined #ruby
griffindy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cschneid_ has joined #ruby
govg has quit [Ping timeout: 260 seconds]
JeanCarloMachado has quit [Ping timeout: 260 seconds]
jnoob22 has quit [Changing host]
jnoob22 has joined #ruby
OTORelic has quit [Ping timeout: 240 seconds]
JeanCarloMachado has joined #ruby
raspado has quit [Remote host closed the connection]
chouhoulis has quit [Remote host closed the connection]
gigglypuff has joined #ruby
gigglypuff has left #ruby [#ruby]
cschneid_ has quit [Ping timeout: 264 seconds]
OTORelic has joined #ruby
Derperperd has quit [Quit: WeeChat 1.5]
govg has joined #ruby
xall_ has joined #ruby
Ropeney has joined #ruby
xall_ has quit [Client Quit]
dviola has quit [Quit: WeeChat 1.7]
xall has joined #ruby
duderonomy has joined #ruby
pawnbox has joined #ruby
bkxd has quit [Ping timeout: 260 seconds]
pilne has quit [Quit: Quitting!]
astrobunny has quit [Remote host closed the connection]
astrobunny has joined #ruby
pawnbox has quit [Ping timeout: 240 seconds]
astrobun_ has joined #ruby
astrobunny has quit [Read error: Connection reset by peer]
OTORelic has quit [Ping timeout: 260 seconds]
_djbkd has joined #ruby
eclecticjohny has joined #ruby
JeanCarloMachado has quit [Ping timeout: 260 seconds]
JeanCarloMachado has joined #ruby
enterprisey has joined #ruby
enterprisey has quit [Remote host closed the connection]
cfec0b8d has joined #ruby
enterprisey has joined #ruby
jameser_ has joined #ruby
matcouto_ has joined #ruby
jameser has quit [Ping timeout: 264 seconds]
matcouto has quit [Ping timeout: 240 seconds]
xenops has joined #ruby
jameser_ has quit [Ping timeout: 240 seconds]
pawnbox has joined #ruby
xenops has quit [Ping timeout: 240 seconds]
jameser has joined #ruby
hutch34 has joined #ruby
pawnbox has quit [Ping timeout: 258 seconds]
jameser has quit [Ping timeout: 240 seconds]
jameser has joined #ruby
hotpanca_ has quit [Remote host closed the connection]
ahrs_ has joined #ruby
hutch34 has quit [Ping timeout: 260 seconds]
patarr has joined #ruby
ahrs has quit [Ping timeout: 256 seconds]
jameser has quit [Ping timeout: 257 seconds]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
patarr has quit [Ping timeout: 268 seconds]
jameser has joined #ruby
gix has quit [Ping timeout: 258 seconds]
govg has quit [Ping timeout: 256 seconds]
jameser has quit [Read error: Connection reset by peer]
JeanCarloMachado has quit [Ping timeout: 258 seconds]
govg has joined #ruby
gix has joined #ruby
jameser has joined #ruby
JeanCarloMachado has joined #ruby
pawnbox has joined #ruby
hotpancakes has joined #ruby
pawnbox has quit [Remote host closed the connection]
jameser has quit [Ping timeout: 240 seconds]
Channel6 has quit [Quit: Leaving]
jameser has joined #ruby
JeanCarloMachado has quit [Ping timeout: 240 seconds]
bkxd has joined #ruby
ahrs_ has quit [Ping timeout: 268 seconds]
ahrs has joined #ruby
jameser has quit [Ping timeout: 246 seconds]
JeanCarloMachado has joined #ruby
bocaneri has joined #ruby
<raul782> Hi guys
jameser has joined #ruby
pawnbox has joined #ruby
<havenwood> raul782: hi
kolaman has quit [Quit: leaving]
<raul782> So I've been using rails for a while and I'm starting to dive deeper in how some gems work, but I'm finding really difficult to understand how/when a callback is called within the ruby code
<allisio> Generally, wherever you see `block.call` or `yield`.
matcouto has joined #ruby
matcouto_ has quit [Read error: Connection reset by peer]
<allisio> Under the broadest interpretation of "callback", anyway.
<raul782> humm, but somehow I can't catch where this is called, so I can debug the so called callback
<raul782> Let me show you the gem which is act_as_audited
JeanCarloMachado has quit [Ping timeout: 260 seconds]
jameser has quit [Read error: Connection reset by peer]
raul782 has quit [Read error: Connection reset by peer]
raul782 has joined #ruby
matcouto has quit [Read error: Connection reset by peer]
JeanCarloMachado has joined #ruby
<raul782> allisio: I assume the callback is called here, https://github.com/collectiveidea/audited/blob/3.0-stable/lib/audited/auditor.rb#L216
jameser has joined #ruby
<raul782> This is the part that elludes me, for example for the create action callback, you pass 3 attributes.
<raul782> and you call self.audits.create(attrs), I'd understand that only those 3 fields would be filled in the audits table
<raul782> but for other models, I see that the auditable_type and auditable_id are recorded
<raul782> and I can't figure it out, how this code is extracting those values
<raul782> It works on all models being audited except for the User model
<dminuoso> raul782: ?rubyonrails
<dminuoso> ?rails raul782
<ruby[bot]> raul782: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
<dminuoso> ?crossposting
<ruby[bot]> dminuoso: I don't know anything about crossposting
<dminuoso> ?cross
<ruby[bot]> dminuoso: I don't know anything about cross
* dminuoso sighs
<havenwood> ?crosspost
<ruby[bot]> 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.
Trynemjoel has quit [Ping timeout: 264 seconds]
<havenwood> ?factoids
<ruby[bot]> you can find an overview of the factoids I know about at http://ruby-community.com/ruboto/facts
Trynemjoel has joined #ruby
cschneid_ has joined #ruby
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
cschneid_ has quit [Read error: Connection reset by peer]
moei has quit [Read error: Connection reset by peer]
moei has joined #ruby
matcouto has joined #ruby
<raul782> sorry about that
moei has quit [Client Quit]
hutch34 has joined #ruby
Ropeney has quit [Ping timeout: 246 seconds]
anisha has joined #ruby
howdoi has joined #ruby
Guest77 has joined #ruby
hutch34 has quit [Ping timeout: 256 seconds]
raul782 has quit [Remote host closed the connection]
nadir has joined #ruby
matcouto has quit [Read error: Connection reset by peer]
milardovich has joined #ruby
Guest77 has quit [Quit: Textual IRC Client: www.textualapp.com]
hotpanca_ has joined #ruby
milardovich has quit [Ping timeout: 256 seconds]
pulkit4tech has joined #ruby
jeyraof^mbpr has joined #ruby
hotpancakes has quit [Ping timeout: 246 seconds]
JeanCarloMachado has quit [Ping timeout: 240 seconds]
acalycine has joined #ruby
acalycine has left #ruby [#ruby]
JeanCarloMachado has joined #ruby
Guest5519 has quit [Ping timeout: 256 seconds]
madsa has joined #ruby
czerasz_ has joined #ruby
renchan has joined #ruby
madsa is now known as Guest42101
maddmaxx has joined #ruby
maddmaxx has quit [Remote host closed the connection]
enterprisey has quit [Remote host closed the connection]
czerasz has quit [Ping timeout: 258 seconds]
roflmyeggo has quit [Ping timeout: 260 seconds]
bkxd has quit [Ping timeout: 240 seconds]
amclain has quit [Quit: Leaving]
JeanCarloMachado has quit [Ping timeout: 264 seconds]
d0nn1e has quit [Ping timeout: 258 seconds]
d0nn1e has joined #ruby
armyriad has joined #ruby
JeanCarloMachado has joined #ruby
pawnbox has quit [Remote host closed the connection]
czerasz_ has quit [Quit: Ex-Chat]
mzo has quit [Ping timeout: 260 seconds]
maddmaxx has joined #ruby
JeanCarloMachado has quit [Ping timeout: 240 seconds]
pawnbox has joined #ruby
opt has joined #ruby
maloik has quit [Remote host closed the connection]
maloik has joined #ruby
JeanCarloMachado has joined #ruby
maddmaxx has quit [Quit: Going offline, see ya! (www.adiirc.com)]
pawnbox has quit [Remote host closed the connection]
lightheaded has joined #ruby
jenrzzz has joined #ruby
<dminuoso> What would you name a predicate creator method?
aupadhye has joined #ruby
<dminuoso> i.e. something you could use as enumerable.select(&byId(list))
<allisio> Call it #_?.
<dminuoso> :|
<allisio> Or that.
<dminuoso> enumerable.select(&_?(list))
<dminuoso> it is charming I have to admit
<allisio> He looks so curious.
hotpanca_ has quit [Remote host closed the connection]
<allisio> So ready to predicate.
<dminuoso> heh
eclecticjohny has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
hutch34 has joined #ruby
hutch34 has quit [Ping timeout: 240 seconds]
patarr has joined #ruby
JeanCarloMachado has quit [Ping timeout: 246 seconds]
stoffus has joined #ruby
raul782 has joined #ruby
JeanCarloMachado has joined #ruby
patarr has quit [Ping timeout: 256 seconds]
raul782 has quit [Ping timeout: 258 seconds]
saneax-_-|AFK is now known as saneax
jgnagy has joined #ruby
pawnbox has joined #ruby
hotpanca_ has joined #ruby
bkxd has joined #ruby
moei has joined #ruby
hotpancakes has joined #ruby
hotpanca_ has quit [Ping timeout: 246 seconds]
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
JeanCarloMachado has quit [Ping timeout: 264 seconds]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
_djbkd has quit [Quit: My people need me...]
hotpancakes has quit [Remote host closed the connection]
stoffus has quit [Ping timeout: 240 seconds]
dionysus69 has joined #ruby
JeanCarloMachado has joined #ruby
hotpancakes has joined #ruby
benlieb has quit [Quit: benlieb]
benlieb has joined #ruby
charliesome has joined #ruby
lightheaded has quit [Remote host closed the connection]
lightheaded has joined #ruby
charliesome has quit [Client Quit]
stoffus has joined #ruby
hotpancakes has quit [Remote host closed the connection]
benlieb has quit [Ping timeout: 264 seconds]
jgnagy_ has joined #ruby
lightheaded has quit [Ping timeout: 258 seconds]
<allisio> I've always wanted to be able to use hyphens in method names.
<allisio> I suspect I've gone well and truly mad: https://eval.in/753967
jgnagy has quit [Ping timeout: 260 seconds]
Cohedrin has joined #ruby
pawnbox has quit [Remote host closed the connection]
elifoster has quit [Quit: sleep]
dionysus69 has quit [Read error: Connection reset by peer]
dionysus69 has joined #ruby
hotpancakes has joined #ruby
Mortomes|Work has joined #ruby
hotpancakes has quit [Ping timeout: 240 seconds]
hutch34 has joined #ruby
yaboiyungspasm has joined #ruby
<yaboiyungspasm> hello?
<yaboiyungspasm> is anyone here?
nofxxx has joined #ruby
hutch34 has quit [Ping timeout: 240 seconds]
ruby-lang229 has joined #ruby
jgnagy has joined #ruby
nofxx has quit [Ping timeout: 240 seconds]
hotpancakes has joined #ruby
<ruby-lang229> hiii
lightheaded has joined #ruby
jgnagy_ has quit [Ping timeout: 260 seconds]
milardovich has joined #ruby
JeanCarloMachado has quit [Ping timeout: 240 seconds]
<ruby-lang229> hello
milardovich has quit [Ping timeout: 246 seconds]
<yaboiyungspasm> ruby-land229: would switching to a higher level lang like ruby (as a c programmer) make any real difference in my overall understanding of code structure, being that it's less verbose?
<yaboiyungspasm> and doesn't have memory management?
<yaboiyungspasm> or does it really not matter?
jgnagy_ has joined #ruby
djbkd_ has joined #ruby
pawnbox has joined #ruby
jgnagy has quit [Ping timeout: 258 seconds]
ruby-lang229 has quit [Ping timeout: 260 seconds]
andikr has joined #ruby
hotpancakes has quit [Remote host closed the connection]
toretore has joined #ruby
conta has joined #ruby
yaboiyungspasm has left #ruby [#ruby]
bkxd has quit [Ping timeout: 264 seconds]
uncertainty has joined #ruby
hotpancakes has joined #ruby
ledestin has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
Tharbakim has quit [Ping timeout: 260 seconds]
last_staff has joined #ruby
milardovich has joined #ruby
Burgestrand has joined #ruby
TomyWork has joined #ruby
stoffus has left #ruby [#ruby]
norbertka has joined #ruby
milardovich has quit [Ping timeout: 240 seconds]
keanny479 has joined #ruby
<keanny479> hello
<keanny479> i have the following project https://goo.gl/b1bRMK, i'm looking for a way to color the score line (table) of the user when it is a new score, anyone can help me ?
djbkd_ has quit [Remote host closed the connection]
<tobiasvl> keanny479: I have no idea what file or line you're talking about and I don't want to go through your entire code, but check out https://github.com/fazibear/colorize
Burgestrand has quit [Quit: Closing time!]
<keanny479> tobiasvl, the code is located in format.rb
<keanny479> tobiasvl, line 14*
tomphp has joined #ruby
aufi has joined #ruby
<tobiasvl> then check out the gem I linked to
<tobiasvl> oh you already use it I guess
<tobiasvl> judging by line 6
<keanny479> tobiasvl, i use colored gem
Silthias has joined #ruby
Silthias2 has joined #ruby
<xpt> Hello, is there well-known regex to match valid domain or IP addr range, analogic to email regex stated here http://emailregex.com/
<xpt> hmm.. should have asked on #regex probably...
xall has quit [Ping timeout: 260 seconds]
lenwood has joined #ruby
Silthias1 has quit [Ping timeout: 260 seconds]
Silthias has quit [Ping timeout: 260 seconds]
pawnbox has quit [Remote host closed the connection]
cibs has quit [Ping timeout: 240 seconds]
pawnbox_ has joined #ruby
<keanny479> xpt, use a gem : https://rubygems.org/gems/ip_address
hotpancakes has quit [Ping timeout: 246 seconds]
cibs has joined #ruby
tau has joined #ruby
grant has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Tharbakim has joined #ruby
hutch34 has joined #ruby
tkcrib has joined #ruby
hotpancakes has joined #ruby
jgnagy has joined #ruby
patarr has joined #ruby
jaruga__________ has joined #ruby
hutch34 has quit [Ping timeout: 240 seconds]
jaruga________ has joined #ruby
xall has joined #ruby
keanny479 has quit [Quit: Page closed]
vali has joined #ruby
jgnagy_ has quit [Ping timeout: 240 seconds]
jgnagy__ has joined #ruby
jameser has quit [Ping timeout: 268 seconds]
patarr has quit [Ping timeout: 240 seconds]
jaruga__________ has quit [Ping timeout: 264 seconds]
jgnagy has quit [Ping timeout: 246 seconds]
kent\n has quit [Quit: No Ping reply in 180 seconds.]
mark_66 has joined #ruby
kent\n has joined #ruby
vali has quit [Quit: vali]
aufi has quit [Ping timeout: 260 seconds]
vali has joined #ruby
TheBrayn has quit [Quit: WeeChat 1.5]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
patientj has joined #ruby
pulkit4tech has quit [Quit: Connection closed for inactivity]
bkxd has joined #ruby
TheBrayn has joined #ruby
Snickers has joined #ruby
xen0fon has joined #ruby
teclator has quit [Remote host closed the connection]
aufi has joined #ruby
biberu has joined #ruby
TomyWork has quit [Remote host closed the connection]
TomyWork has joined #ruby
<xpt> thank you
jsrn_ has joined #ruby
tau has quit [Remote host closed the connection]
lightheaded has quit [Remote host closed the connection]
teclator has joined #ruby
lightheaded has joined #ruby
Fritz has joined #ruby
Fritz is now known as Guest29672
ddffg has joined #ruby
lightheaded has quit [Read error: No route to host]
Guest29672 has left #ruby [#ruby]
lightheaded has joined #ruby
esObe_ has joined #ruby
nullshock has joined #ruby
uncertainty has quit [Ping timeout: 264 seconds]
Burgestrand has joined #ruby
troulouliou_div2 has joined #ruby
jaiks has quit [Quit: Leaving]
astrobun_ has quit [Remote host closed the connection]
astrobunny has joined #ruby
xenops has joined #ruby
hotpancakes has quit [Remote host closed the connection]
postmodern has quit [Quit: Leaving]
postmodern has joined #ruby
postmodern has quit [Remote host closed the connection]
astrobunny has quit [Ping timeout: 260 seconds]
aufi has quit [Ping timeout: 256 seconds]
aganov has joined #ruby
Luna_Moonfang has quit [Quit: WeeChat 1.7]
Luna_Moonfang has joined #ruby
esObe_ has quit [Remote host closed the connection]
esObe_ has joined #ruby
hutch34 has joined #ruby
rhyselsmore has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
hotpancakes has joined #ruby
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
esObe_ has quit [Ping timeout: 260 seconds]
tomphp has joined #ruby
hutch34 has quit [Ping timeout: 240 seconds]
jgnagy__ has quit [Ping timeout: 246 seconds]
nowhereman has quit [Ping timeout: 240 seconds]
aufi has joined #ruby
raul782 has joined #ruby
P1C0 has joined #ruby
raul782 has quit [Ping timeout: 256 seconds]
jameser has joined #ruby
pawnbox_ has quit [Remote host closed the connection]
philpep has joined #ruby
pawnbox has joined #ruby
uncertainty has joined #ruby
milardovich has joined #ruby
bkxd has quit [Ping timeout: 240 seconds]
hotpancakes has quit [Remote host closed the connection]
matcouto has joined #ruby
matcouto has quit [Client Quit]
lxsameer has joined #ruby
unshadow has joined #ruby
milardovich has quit [Ping timeout: 268 seconds]
ferr1 has joined #ruby
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Todiann has joined #ruby
Todiann has quit [Client Quit]
jameser has joined #ruby
evie_hammond has quit [Ping timeout: 256 seconds]
jeyraof^mbpr has quit [Quit: Leaving]
marr has joined #ruby
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
ta_ has quit [Quit: Leaving...]
Fernando-Basso has joined #ruby
P1C0 has quit [Quit: leaving]
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
evie_hammond has joined #ruby
hotpancakes has joined #ruby
Silthias2 has quit [Ping timeout: 240 seconds]
ta_ has joined #ruby
uncertainty has quit [Ping timeout: 260 seconds]
Fernando-Basso has quit [Quit: WeeChat 1.7]
Fernando-Basso has joined #ruby
hotpancakes has quit [Ping timeout: 246 seconds]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
lenwood has quit [Ping timeout: 264 seconds]
lightheaded has quit [Remote host closed the connection]
BackEndCoder has quit [Excess Flood]
lightheaded has joined #ruby
BackEndCoder has joined #ruby
pandaant has joined #ruby
lheaded has joined #ruby
lightheaded has quit [Read error: Connection reset by peer]
vali has quit [Quit: vali]
hutch34 has joined #ruby
uncertainty has joined #ruby
lheaded has quit [Ping timeout: 256 seconds]
Fritz has joined #ruby
Fritz has quit [Client Quit]
patarr has joined #ruby
nullshock has quit [Ping timeout: 246 seconds]
tkcrib has quit [Remote host closed the connection]
hutch34 has quit [Ping timeout: 260 seconds]
vali has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
pawnbox has quit [Remote host closed the connection]
patarr has quit [Ping timeout: 240 seconds]
pawnbox has joined #ruby
bestel has joined #ruby
<bestel> Hello!
jenrzzz has quit [Ping timeout: 240 seconds]
milardovich has joined #ruby
<bestel> Can anybody explain how the method works in itself ? Big thanks! https://repl.it/GUR7/0
<tobiasvl> bestel: what do you want to know? also weird indentation
<canton7> I fixed the indentation: https://repl.it/GUR7/1
milardovich has quit [Ping timeout: 240 seconds]
bkxd has joined #ruby
nertzy has quit [Ping timeout: 240 seconds]
<bestel> thx, canton7
<bestel> tobiasvl: what happens with permutations method when we use in itself?
norbertka has quit [Ping timeout: 264 seconds]
__Yiota has joined #ruby
<tobiasvl> it's called recursion
boshhead has quit [Remote host closed the connection]
boshhead has joined #ruby
tvw has joined #ruby
uncertainty has quit [Ping timeout: 260 seconds]
xall has quit [Ping timeout: 240 seconds]
lenwood has joined #ruby
<bestel> tobiasvl: I'm add some commets https://repl.it/GUR7/3
<bestel> Big thanks!
tildes has quit [Remote host closed the connection]
<tobiasvl> bestel: so for every iteration of the block you split the string in two, char and rest. so rest is the entire string except one character. then you call permutations recursively with that shorter string.
<bestel> tobiasvl: Thank you so much! Cheers!
<bestel> It's clear
<bestel> ^)
troulouliou_div2 has quit [Quit: Leaving]
norbertka has joined #ruby
lightheaded has joined #ruby
milardovich has joined #ruby
bestel has quit [Ping timeout: 260 seconds]
jpterry has quit [Ping timeout: 268 seconds]
milardovich has quit [Ping timeout: 260 seconds]
pytuger has joined #ruby
herbmillerjr has quit [Remote host closed the connection]
<pytuger> in python I can do
<pytuger> my_dictionary = {key: [each_value for each_value in range(1,11)] for key in range(1,11)}
<pytuger> my_list = [x for x in range(1,11)] # to get a list of 1-10 and
<pytuger> how can list and dictionary comprehension be achieved in Ruby
<pytuger> in perl it is
<pytuger> @array = (1..11); #and one would use map for Perl hashes
<matthewd> The literal translation would be `my_list = (1..10).map {|x| x }`
<matthewd> But you'd actually use: my_list = (1..10).to_a
<pytuger> interesting
<pytuger> thank you matthewd
jpterry has joined #ruby
<matthewd> and... my_dictionary = Hash[(1..10).map {|key| [key, (1..10).to_a] }], I guess?
<pytuger> my_list = (1..10).map {|x| x } #is logic that makes sense to me
<pytuger> I appreciate that
<pytuger> I learn languages better when I can translate them
<elomatreb> (1..10).to_a is probably more common than that map construct, and possibly faster too
<matthewd> So on the latter, I'm mapping to an array of 2-element arrays, then just pass that to Hash.[] to convert it
<pytuger> that maybe so, but it will honestly probably take me longer to remeber
<pytuger> my brain is funny like that
<pytuger> also the mapping of ruby I can relate with perl
herbmillerjr has joined #ruby
cfec0b8d has quit [Ping timeout: 260 seconds]
<elomatreb> If you don't actually need the array and just want to iterate the numbers there are utility methods on the number classes, e.g. 10.times or 1.upto(10)
<matthewd> You can use 1...11 if you really prefer, too
ledestin has quit [Quit: Textual IRC Client: www.textualapp.com]
<pytuger> elomatreb, matthewd, thanks
alibby has joined #ruby
harfangk has joined #ruby
Lyubo1 has quit [Ping timeout: 240 seconds]
hutch34 has joined #ruby
patarr has joined #ruby
JeanCarloMachado has joined #ruby
jameser has joined #ruby
hutch34 has quit [Ping timeout: 240 seconds]
rhyselsmore has joined #ruby
rhyselsmore has quit [Client Quit]
patarr has quit [Ping timeout: 268 seconds]
jeffreylevesque_ has joined #ruby
cschneid_ has joined #ruby
jeffreylevesque has quit [Ping timeout: 260 seconds]
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
cschneid_ has quit [Ping timeout: 246 seconds]
jenrzzz has quit [Ping timeout: 240 seconds]
Arpanet69 has joined #ruby
Lyubo1 has joined #ruby
nadir has quit [Quit: Connection closed for inactivity]
nyuszika7h has quit [Read error: Connection reset by peer]
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nyuszika7h has joined #ruby
skweek has joined #ruby
augcesar has joined #ruby
bkxd has quit [Ping timeout: 260 seconds]
aganov has quit [Remote host closed the connection]
Snickers has quit [Quit: Snickers]
aganov has joined #ruby
pwnd_nsfw` has joined #ruby
pwnd_nsfw has quit [Ping timeout: 264 seconds]
Robtop__ has joined #ruby
ldnunes has joined #ruby
vali has quit [Quit: vali]
yusrideb has quit [Quit: yusrideb]
pwnd_nsfw` has quit [Ping timeout: 240 seconds]
HoierM has joined #ruby
charliesome has joined #ruby
krobzaur has joined #ruby
minimalism has quit [Ping timeout: 264 seconds]
Mr_Pancake has joined #ruby
vali has joined #ruby
milardovich has joined #ruby
milardovich has quit [Remote host closed the connection]
milardovich has joined #ruby
pawnbox has quit [Remote host closed the connection]
saneax is now known as saneax-_-|AFK
pawnbox has joined #ruby
CloCkWeRX has quit [Ping timeout: 256 seconds]
tyang has joined #ruby
mzo has joined #ruby
JeanCarloMachado has quit [Ping timeout: 240 seconds]
tyang has quit [Client Quit]
jameser has joined #ruby
EV3RYDAYPR0GRESS has quit [Read error: Connection reset by peer]
JeanCarloMachado has joined #ruby
EV3RYDAYPR0GRESS has joined #ruby
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
cfec0b8d has joined #ruby
nadir has joined #ruby
hutch34 has joined #ruby
griffindy has joined #ruby
CloCkWeRX has joined #ruby
pulkit4tech has joined #ruby
hutch34 has quit [Ping timeout: 240 seconds]
cfec0b8d has quit [Ping timeout: 246 seconds]
cfec0b8d has joined #ruby
pwnd_nsfw` has joined #ruby
Qchmqs has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
Robtop__ has quit [Ping timeout: 240 seconds]
Axy has quit [Ping timeout: 260 seconds]
Mia has quit [Ping timeout: 268 seconds]
Mia has joined #ruby
Axy has joined #ruby
Rodya_ has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
jamesaxl has quit [Read error: Connection reset by peer]
jamesaxl has joined #ruby
spicerack has joined #ruby
uncertainty has joined #ruby
bkxd has joined #ruby
krobzaur has quit [Ping timeout: 246 seconds]
Mortomes|Work has quit [Ping timeout: 260 seconds]
Axy has quit [Ping timeout: 240 seconds]
Mia has quit [Ping timeout: 240 seconds]
maxios has joined #ruby
brent__ has joined #ruby
nyuszika7h has quit [Read error: Connection reset by peer]
raul782 has joined #ruby
nyuszika7h has joined #ruby
Mia has joined #ruby
Mia has joined #ruby
Mia has quit [Changing host]
Axy has joined #ruby
Axy has joined #ruby
Axy has quit [Changing host]
krobzaur has joined #ruby
brent__ has quit [Ping timeout: 260 seconds]
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
raul782 has quit [Ping timeout: 240 seconds]
sepp2k has joined #ruby
<Bish> is twitter still a rails app?
<mzo> hi Bish
<Bish> ho
uncertainty has quit [Ping timeout: 256 seconds]
<mzo> Bish: how are you doing?
<Bish> im fine, you?
<mzo> i'm doing well, thank you [:
jonathanwallace_ has joined #ruby
jonathanwallace_ is now known as jonathanwallace
uncertainty has joined #ruby
maxios has quit [Quit: Page closed]
cibs has quit [Ping timeout: 258 seconds]
<jonathanwallace> in Ruby 2.4.0 is it expected that the behavior of BigDecimal would change when initialized with an empty string? https://gist.github.com/wallace/a8d50c87ae3c1f139182dc7b51d9d8dc
<jonathanwallace> i checked the NEWS and ruby-lang bug tracker but couldn't find anything about it.
<jonathanwallace> i did see that Integer is here
cibs has joined #ruby
<jonathanwallace> (but wouldn't expect that to effect BigDecimal)
<Bish> my tummy says yes
<matthewd> I believe that's a bug
<matthewd> BigDecimal("") should raise, but BigDecimal.new("") should not
<Bish> more like BugDecimal, ANYONE?
<jonathanwallace> @Bish heh.
<jonathanwallace> thanks @matthewd
nettoweb has joined #ruby
lenwood has quit [Ping timeout: 240 seconds]
<jonathanwallace> 👍
chouhoulis has joined #ruby
chouhoul_ has joined #ruby
bmurt has joined #ruby
milardovich has quit [Remote host closed the connection]
milardovich has joined #ruby
chouhoulis has quit [Ping timeout: 240 seconds]
hutch34 has joined #ruby
jhack has joined #ruby
jhack has joined #ruby
jhack has quit [Changing host]
milardovich has quit [Remote host closed the connection]
milardovich has joined #ruby
griffindy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
agent_white has joined #ruby
<agent_white> Mornin' folks
terens has quit [Remote host closed the connection]
chenzfroff has joined #ruby
chenzfroff has quit []
chenzfroff has joined #ruby
chenzfroff has left #ruby [#ruby]
nettoweb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
DLSteve_ has joined #ruby
martinhez has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
lenwood has joined #ruby
redhedded1 has joined #ruby
rfoust has joined #ruby
uncertainty has quit [Ping timeout: 264 seconds]
shinnya has quit [Ping timeout: 240 seconds]
bkxd has quit [Ping timeout: 240 seconds]
pytuger has quit [Ping timeout: 246 seconds]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
lightheaded has quit [Read error: No route to host]
lightheaded has joined #ruby
toretore has quit [Ping timeout: 260 seconds]
toretore has joined #ruby
pawnbox has quit [Ping timeout: 260 seconds]
Alina-malina has quit [Ping timeout: 240 seconds]
martinhez has quit [Ping timeout: 240 seconds]
lightheaded has quit [Remote host closed the connection]
bweston92 has joined #ruby
lightheaded has joined #ruby
chenzfroff has joined #ruby
lightheaded has quit [Read error: Connection reset by peer]
lightheaded has joined #ruby
aufi has quit [Ping timeout: 260 seconds]
lightheaded has quit [Remote host closed the connection]
lightheaded has joined #ruby
chenzfroff has left #ruby [#ruby]
krobzaur has quit [Ping timeout: 260 seconds]
lightheaded has quit [Ping timeout: 260 seconds]
millerti has joined #ruby
anisha has quit [Quit: Leaving]
cfec0b8d has quit [Ping timeout: 268 seconds]
lightheaded has joined #ruby
polishdub has joined #ruby
saneax-_-|AFK is now known as saneax
lightheaded has quit [Remote host closed the connection]
lightheaded has joined #ruby
cdg has joined #ruby
<mc_fail> hi guys
aufi has joined #ruby
<mc_fail> is there any way to distribute my .yaml configs with gems?
<mc_fail> like, i have an app which has condig file in etc/config.yaml inside the gem
<mc_fail> how do i read it from the app itself
<mc_fail> considering that every path for this gem can be different
lightheaded has quit [Read error: No route to host]
<mc_fail> (depending where you install it)
lightheaded has joined #ruby
lenwood has quit [Ping timeout: 260 seconds]
jhack_ has joined #ruby
mzo has quit [Quit: :*]
tenderlove has quit [Remote host closed the connection]
jhack has quit [Ping timeout: 246 seconds]
pawnbox has joined #ruby
jgnagy has joined #ruby
cdg has quit [Remote host closed the connection]
jhack_ is now known as jhack
cdg has joined #ruby
jhack has quit [Changing host]
jhack has joined #ruby
mikecmpbll has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
t-recx has joined #ruby
nowhereman has joined #ruby
tvw has quit [Ping timeout: 264 seconds]
dar123 has joined #ruby
tvw has joined #ruby
dopamean_ has quit [Ping timeout: 268 seconds]
lightheaded has quit [Remote host closed the connection]
lightheaded has joined #ruby
lightheaded has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 260 seconds]
aufi has quit [Ping timeout: 258 seconds]
jhack_ has joined #ruby
<jonathanwallace> can you keep the yaml file in the gem and allow end users to overwrite?
raul782 has joined #ruby
bkxd has joined #ruby
jhack has quit [Ping timeout: 268 seconds]
mzo has joined #ruby
<mzo> hi
Alina-malina has joined #ruby
<mzo> how do people feel about Array#[] returning nil for out-of-bounds indices? should it raise instead, or does this behavior make the most sense?
norbertka has quit [Quit: Leaving]
jhack__ has joined #ruby
cschneid_ has joined #ruby
Alina-malina has quit [Changing host]
Alina-malina has joined #ruby
<leah2> you can use .fetch if you want that behavior
jhack_ has quit [Ping timeout: 240 seconds]
minimalism has joined #ruby
<mzo> leah2: thanks, that's good to know
JeanCarloMachado has quit [Ping timeout: 258 seconds]
<mzo> is the behavior of #[] considered to be a mistake
<mzo> if you could go back in time would you make #[] raise for invalid indices
aufi has joined #ruby
<herwin> it's what most languages do
<leah2> i like the default behavior
JeanCarloMachado has joined #ruby
lightheaded has joined #ruby
<mzo> herwin: is it?
raul782 has quit [Read error: Connection reset by peer]
<herwin> perl returns undef (the equivalent of nil), I believe java returns null
raul782 has joined #ruby
<leah2> java raises
<herwin> it always confuses the heck out of me when I have to make a change to a python thing and it raises an error
<herwin> C just segfaults ;)
Inv1s1ble_ has quit [Ping timeout: 256 seconds]
lightheaded has quit [Remote host closed the connection]
lightheaded has joined #ruby
<mzo> yeah it's an exception in java and undefined behavior in C. in C++ it's undefined behavior, or on STL containers you can use .get() which will throw an exception
polishdub has quit [Quit: leaving]
krobzaur has joined #ruby
vali has quit [Ping timeout: 258 seconds]
<mzo> in javascript it returns undefined though
eclecticjohny has joined #ruby
hxegon_afk is now known as hxegon
lightheaded has quit [Read error: Connection reset by peer]
lheaded has joined #ruby
<mzo> in statically typed languages it almost *must* be an error, because e.g., in java if you have int[] a; then a[i] == null is ill-typed
rippa has joined #ruby
jhack__ has quit [Quit: Leaving]
lheaded has quit [Remote host closed the connection]
Mr_Pancake has quit [Ping timeout: 240 seconds]
jhack has joined #ruby
jhack has quit [Changing host]
jhack has joined #ruby
<mzo> do you frequently rely on the fact that #[] returns nil? like `foo = bar[i] or baz` or so?
<mzo> or would that be poor style in ruby
<herwin> foo.fetch(i, baz)
<leah2> i use || for default value often
<leah2> more with hashes than arrays tho
<herwin> actually, i don't think i use array indexes that much
Rodya_ has quit [Remote host closed the connection]
<herwin> mostly just map/each
nhhc has joined #ruby
lightheaded has joined #ruby
OTORelic has joined #ruby
dionysus69 has quit [Ping timeout: 268 seconds]
frack has joined #ruby
gsilva has joined #ruby
Inv1s1ble_ has joined #ruby
minimalism has quit [Quit: minimalism]
<frack> How do you print numbers to a new line ie puts var + var
lightheaded has quit [Remote host closed the connection]
<leah2> puts var, var
philpep has left #ruby [#ruby]
benlieb has joined #ruby
aupadhye has quit [Ping timeout: 240 seconds]
naprimer_2 has joined #ruby
jgnagy has quit [Ping timeout: 258 seconds]
ozcanesen has joined #ruby
krobzaur has quit [Ping timeout: 240 seconds]
naprimer_3 has quit [Ping timeout: 258 seconds]
CloCkWeRX has quit [Quit: Leaving.]
Lord_of_Life has quit [Excess Flood]
etehtsea has joined #ruby
Lord_of_Life has joined #ruby
patarr has joined #ruby
jgnagy has joined #ruby
raphaelmro has joined #ruby
yeticry has joined #ruby
Qchmqs has quit [Quit: Konversation terminated!]
unshadow has quit [Quit: leaving]
Arpanet69 has quit [Ping timeout: 264 seconds]
yeticry_ has quit [Read error: Connection reset by peer]
aganov has quit [Remote host closed the connection]
brent__ has joined #ruby
brent__ has quit [Remote host closed the connection]
ResidentBiscuit has joined #ruby
brent__ has joined #ruby
brent__ has quit [Remote host closed the connection]
brent__ has joined #ruby
Arpanet69 has joined #ruby
minimalism has joined #ruby
jenrzzz has joined #ruby
Burgestrand has quit [Read error: Connection reset by peer]
Burgestr_ has joined #ruby
uncertainty has joined #ruby
<allisio> mc_fail: Put it in your library's `data/` directory and use `Gem.datadir` later to retrieve the actual path.
jenrzzz has quit [Ping timeout: 268 seconds]
raspado has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
etehtsea has quit [Quit: Textual IRC Client: www.textualapp.com]
bkxd has quit [Ping timeout: 260 seconds]
antoniobeyah has joined #ruby
tau has joined #ruby
pawnbox has quit [Ping timeout: 268 seconds]
amclain has joined #ruby
teddysmoker has joined #ruby
bmurt has joined #ruby
haylon has joined #ruby
patarr has quit [Ping timeout: 264 seconds]
gsilva has quit [Ping timeout: 258 seconds]
tolerablyjake has joined #ruby
mzo has quit [Quit: :*]
juggler has joined #ruby
cdg has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 240 seconds]
cdg has joined #ruby
s2013 has joined #ruby
duderonomy has quit [Read error: Connection reset by peer]
troulouliou_div2 has joined #ruby
duderonomy has joined #ruby
Burgestr_ has quit [Quit: Closing time!]
workmad3 has joined #ruby
sylario has joined #ruby
futilegames has joined #ruby
[Butch] has joined #ruby
polishdub has joined #ruby
hahuang61 has quit [Ping timeout: 240 seconds]
Rodya_ has joined #ruby
ferr1 has quit [Quit: WeeChat 1.7]
renatosilva has joined #ruby
patarr has joined #ruby
tekniq has joined #ruby
Rodya_ has quit [Ping timeout: 246 seconds]
patarr has quit [Ping timeout: 260 seconds]
AlHafoudh has quit [Ping timeout: 252 seconds]
uncertainty has quit [Ping timeout: 260 seconds]
AlHafoudh has joined #ruby
TomyWork has quit [Ping timeout: 240 seconds]
aufi has quit [Quit: Leaving]
krobzaur has joined #ruby
teclator has quit [Remote host closed the connection]
mzo has joined #ruby
mark_66 has quit [Remote host closed the connection]
krobzaur has quit [Ping timeout: 260 seconds]
cdg_ has joined #ruby
krobzaur has joined #ruby
cdg has quit [Ping timeout: 246 seconds]
cfec0b8d has joined #ruby
chouhoul_ has quit [Remote host closed the connection]
chouhoulis has joined #ruby
patarr has joined #ruby
marxarelli|afk has quit [Quit: Textual IRC Client: www.textualapp.com]
marxarelli has joined #ruby
pawnbox has joined #ruby
conta has quit [Ping timeout: 240 seconds]
Danny_ has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
spicerack has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pawnbox has quit [Ping timeout: 246 seconds]
Arpanet69 has quit [Ping timeout: 240 seconds]
jenrzzz has quit [Ping timeout: 240 seconds]
bkxd has joined #ruby
futilegames has quit [Quit: futilegames]
pawnbox has joined #ruby
Rodya_ has joined #ruby
TomyLobo has joined #ruby
Arpanet69 has joined #ruby
Danny_ has quit [Remote host closed the connection]
Satyajit has joined #ruby
eclecticjohny has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
t-recx has quit [Quit: t-recx]
Danny_ has joined #ruby
eclecticjohny has joined #ruby
eclecticjohny has quit [Client Quit]
pilne has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jgnagy has quit [Ping timeout: 240 seconds]
alxgsv has joined #ruby
dionysus69 has joined #ruby
Danny_ has quit [Ping timeout: 258 seconds]
HoierM has quit [Ping timeout: 258 seconds]
pandaant has quit [Remote host closed the connection]
pawnbox_ has joined #ruby
pawnbox has quit [Ping timeout: 240 seconds]
jaruga________ has quit [Ping timeout: 264 seconds]
pawnbox_ has quit [Remote host closed the connection]
zel has joined #ruby
zel is now known as Guest43457
jaruga________ has joined #ruby
flopsec has joined #ruby
benlieb has quit [Quit: benlieb]
benlieb has joined #ruby
jsrn_ has quit [Quit: Leaving]
jgnagy has joined #ruby
juggler has quit [Ping timeout: 246 seconds]
dionysus69 has quit [Ping timeout: 258 seconds]
hahuang61 has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
keanny479 has joined #ruby
<keanny479> hello
<keanny479> i have the project https://goo.gl/b1bRMK
<keanny479> does anyone can help me to color the user score line in a table (i use terminal-table gem) ?
todd1 is now known as Todd
milardovich has quit [Remote host closed the connection]
<keanny479> the file concerned : lib/format.rb
blackwind_123 has quit [Ping timeout: 240 seconds]
milardovich has joined #ruby
uncertainty has joined #ruby
DARPA has joined #ruby
_djbkd has joined #ruby
Danny_ has joined #ruby
milardovich has quit [Ping timeout: 246 seconds]
Arpanet69 has quit [Ping timeout: 264 seconds]
DARPA has quit [Ping timeout: 256 seconds]
pawnbox has joined #ruby
dar123 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
troulouliou_div2 has quit [Quit: Leaving]
dar123 has joined #ruby
dlitvak has quit [Quit: Connection closed for inactivity]
mzo has quit [Ping timeout: 264 seconds]
duderonomy has quit [Ping timeout: 258 seconds]
mgorbach has quit [Ping timeout: 256 seconds]
<Eiam> a[20] if 20 is out of range shouldn't return nil, that perpetuates the practice of making nil have a meaning
<Eiam> which leads to people checking for nil like its a "thing"
tolerablyjake has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<allisio> It's a "thing" just as much as zero is.
tvw has quit [Ping timeout: 260 seconds]
tolerablyjake has joined #ruby
aupadhye has joined #ruby
<havenwood> Eiam: I recall someone saying that if you ask Ruby to go to the store and get some grapefruit gum it comes back and says there was none. If you ask Python to go to the store and by grapefruit gum it burns the store down.
<Eiam> allisio: um, no
dar123 has quit [Read error: Network is unreachable]
cdg_ has quit [Remote host closed the connection]
<allisio> Eiam: It's an encoding of absence.
<havenwood> Eiam: When something isn't there it makes sense to say there was nothing. It's not a particularly exceptional event.
<Eiam> I had 3 pieces of candy and I ate 3, now I have 0 left. 0 is a value, nil is not
<Eiam> 0 can become 1
cdg has joined #ruby
<Eiam> nil cannot become 1
<Eiam> its nil
<allisio> Is that a dare?
<Eiam> you can't have -1 nil, or +4 nil
<havenwood> >> nil.to_i.succ
<ruby[bot]> havenwood: # => 1 (https://eval.in/754567)
<havenwood> :-P
<Eiam> havenwood: =p
<allisio> You're using largely unrelated precepts from other fields to make conclusions about the Ruby language.
<Eiam> allisio: I write plenty of ruby every day. Using Nil as a placeholder for meaning is poor design. it leads to nil checks and all sorts of crap in your code
<Eiam> because you are treating nil like it has meaning , like "empty" or "0"
br0d1n has joined #ruby
<Eiam> then it creeps in everywhere and you are stuck defending your code from nils all over the place
<allisio> It has the meaning "nonexistence", but that does not cause nil itself to be nonexistent in any useful sense.
<Eiam> non-existence is not the same as 0
<allisio> No, they're not, but there's an obvious relationship.
<Eiam> if I take an average and the value is 0, thats not the same as the value being nil
* baweaver wanders in
<baweaver> Ah, we have another Nil zealotry argument, fun.
aupadhye has quit [Remote host closed the connection]
* Papierkorb sips tea
dar123 has joined #ruby
* havenwood gulps coffee
* herwin grabs the popcorn
* Eiam watches in amusement from the sidelines too
<Eiam> wait what?
<Papierkorb> What will happen next? Will Eiam and allisio come to a conclusion?! Tune in next time to Language Fights to find out!
<baweaver> If you're really bent on that you can always use a Hash instead with a default constructor
<baweaver> or make a new array
<eam> < allisio> Is that a dare? -- lol
<Eiam> I'm just generally against concepts that perpetuate the idea of assigning nil to have some kind of meaning in code instead of taking the time to assign it an ACTUAL value that has ACTUAL meaning
<Eiam> like :not_found or a results object, etc
<allisio> Eiam: Sparse arrays.
<allisio> Would you want to *have* to use a Hash for those?
<nofxxx> Eiam, which will be what for yourt unexistent oblivion NIHIL a[20] ?
<havenwood> >> eiam = {}; eiam.default = :not_found; eiam[:grapefruit_gum]
<ruby[bot]> havenwood: # => :not_found (https://eval.in/754571)
<allisio> A "null" type just *is* useful for encoding the notion of absence.
<Eiam> nofxxx: there are other solutions beyond a nil.
<Eiam> nofxxx: how do you distinguish if the nil means I put it there or it started that way?
<nofxxx> Eiam, I don't know a better one, do you?
* baweaver waits for Monads to come up again
keanny479 has quit [Ping timeout: 260 seconds]
<allisio> I concede that `nil` isn't "necessary", in any meaningful sense, but it's part of the "flavor" of Ruby and just one of those things you have to take on board at some point.
blackmesa has joined #ruby
roadrunneratwast has joined #ruby
<Eiam> nofxxx: you could raise, oob error, return a type designed to mean something. I'm not suggesting that Ruby should suddenly *start* doing these things ,but plenty of languages DON'T return a nil/null in such a case
<havenwood> Eiam: nil is the type designed to mean the something, from the Lisps
rquid has joined #ruby
<nofxxx> Eiam, that won't be simple as nil. Nothing beats the simplest solution.
preyalone has joined #ruby
<Eiam> havenwood: I get that its old
Snickers has joined #ruby
<elomatreb> If you want strict key behaviour, both Hash and Array have #fetch. But then you have rescues all over your code instead of nil checks :shrug:
<Eiam> okay as was pointed out this is a long, old argument. its been argued over and over https://www.lucidchart.com/techblog/2015/08/31/the-worst-mistake-of-computer-science/
<Eiam> I don't really care to LITERALLY have the argument again
<nofxxx> Occams agreeds with me, and also Nietzsche explains the value of nil =P
rquid has left #ruby ["PONG :orwell.freenode.net"]
<baweaver> ...you started the argument again?
<Eiam> The short answer: NULL is a value that is not a value. And that’s a problem.
<Eiam> elomatreb: at least you know what you are looking for!
<baweaver> *doesn't want to have argument* *literally started argument earlier*
veloutin has quit [Ping timeout: 260 seconds]
<toretore> schrödinger's object
* baweaver scratches head
<Eiam> baweaver: actually someone else asked about the behavior of out of bounds arrays
<Snickers> Can I determine if method require parameter. Something like :respod_to?
<baweaver> Eiam: http://learnyouahaskell.com/ - have fun
<toretore> snickers: elaborate
<Eiam> snickers: responds_to can be overloaded
<Eiam> baweaver: already done it thanks
<baweaver> Say monad
<Eiam> baweaver: cs194 is more commonly recommended
<baweaver> I need my bingo
<Eiam> baweaver: I can only say burrito and provide a metaphor for what a monad is like
<Eiam> i cannot ACTUALLY explain a monad
Paraxial has quit [Quit: Ping timeout (120 seconds)]
<baweaver> It's just a monoid in the category of an endofunctor
uncertainty has quit [Ping timeout: 264 seconds]
* baweaver shrugs
<havenwood> >> class Schrödinger; def observe; [self, nil].sample end end; Schrödinger.new.observe # toretore
<ruby[bot]> havenwood: # => nil (https://eval.in/754575)
<Eiam> I'm going to stick with the burrito
<toretore> havenwood: isn't this built in functionality?
<nofxxx> Eiam, well, we could agree in one thing: we should have a std lib 'maybe' monad
<toretore> havenwood: maybe not in ruby where nil actually is a reference, but in other languages it's the lack of one, and you don't know until you try
<nofxxx> rails did it with #try
Danny_ has quit []
<allisio> Is `nil` a reference?
<toretore> so in one way ruby doesn't actually have a null reference, the absence of a value is the value nil
<toretore> >> [nil.object_id, nil.class]
<ruby[bot]> toretore: # => [4, NilClass] (https://eval.in/754576)
<toretore> not strictly a reference, as it is an immediate object
frack has quit [Ping timeout: 246 seconds]
bigkevmcd has quit [Read error: Connection reset by peer]
veloutin has joined #ruby
bigkevmcd has joined #ruby
<matthewd> It's still a reference inside the language environment.. it just happens to not be stored as a pointer inside the bowels of the VM
<baweaver> >> [1&.succ, nil&.succ]
<ruby[bot]> baweaver: # => [2, nil] (https://eval.in/754577)
bkxd has quit [Ping timeout: 260 seconds]
mello has quit [Remote host closed the connection]
<dminuoso> Eiam: The main issue with nil is just the complexity of hiding it inside a monad such as Maybe.
<dminuoso> Or rather supplying comparable control structures.
harfangk has quit [Quit: Textual IRC Client: www.textualapp.com]
<dminuoso> But that's an inherent consequent of having a duck typed language.
benlieb has quit [Quit: benlieb]
roadrunneratwast has quit [Quit: Leaving.]
LambdaSix has quit [Ping timeout: 240 seconds]
LambdaSix has joined #ruby
andikr has quit [Remote host closed the connection]
tolerablyjake has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bilal80 has joined #ruby
lxsameer has quit [Quit: WeeChat 1.5]
duderonomy has joined #ruby
jgnagy has quit [Ping timeout: 258 seconds]
roadrunneratwast has joined #ruby
<allisio> Meow.
* dminuoso shoots allisio
<dminuoso> The sign says: Cats beware, here be hunters.
jgnagy has joined #ruby
<allisio> river << (bag << cat)
<allisio> That's a Breaking Bad reference.
jtdowney has quit [Read error: Connection reset by peer]
SeepingN has joined #ruby
jtdowney has joined #ruby
dar123 has quit [Read error: Network is unreachable]
tolerablyjake has joined #ruby
benlieb has joined #ruby
<dminuoso> allisio: I say that operation is associative.
<dminuoso> Or is it?
<dminuoso> No it isnot.
Todd has quit [Quit: WeeChat 0.4.2]
<dminuoso> Though it depends on what you look at. In both cases you end up with a pretty pissed off cat.
<allisio> #<< being left-associative is nice for string shovelling, but I really didn't wanna have to use those parens there.
benlieb has quit [Client Quit]
dar123 has joined #ruby
krobzaur has quit [Ping timeout: 256 seconds]
<dminuoso> allisio: I have pretty bad experience with that string shovelling.
milardovich has joined #ruby
<dminuoso> allisio: It looks like a neat idea at first, but try use C++ streams for a while.
<dminuoso> You won't know pain until you do.
<allisio> dminuoso: It's roughly the same idea, isn't it?
<dminuoso> allisio: Yes, but it's an absolutely downright horrid interface.
<dminuoso> allisio: Because then suddenly you wonder about locale, about formatting, about bitsets.
<dminuoso> And then you realize the only way to mutate the state of a stream is to shove things into it.
jhack_ has joined #ruby
<allisio> SGTM.
jhack has quit [Ping timeout: 246 seconds]
renchan has quit [Quit: Leaving...]
<dminuoso> baweaver: Heh, Im beginning to understand that you cant really understand monads until you grasp category theory.
cdg has quit [Ping timeout: 246 seconds]
jgnagy has quit [Read error: Connection reset by peer]
jgnagy has joined #ruby
jonathanwallace has quit [Quit: Connection closed for inactivity]
jgnagy_ has joined #ruby
mgorbach has joined #ruby
milardovich has quit [Remote host closed the connection]
ramfjord has joined #ruby
jgnagy has quit [Ping timeout: 260 seconds]
gusrub has joined #ruby
Cohedrin has joined #ruby
bocaneri has quit [Read error: Connection reset by peer]
mzo has joined #ruby
soumam has joined #ruby
xall has joined #ruby
dar123 has quit [Read error: Connection reset by peer]
renchan has joined #ruby
kith has joined #ruby
mgorbach has quit [Ping timeout: 260 seconds]
soumam has quit [Quit: Leaving]
mgorbach has joined #ruby
marcoecc has joined #ruby
username1 has joined #ruby
<username1> why doesnt this terminate early in Ruby?
<username1> def test; unless false; "Terminate early"; puts "Didn't terminate"; end; "Reached End"; end
jhack__ has joined #ruby
<username1> i thought explicit return isnt required in Ruby?
jgnagy has joined #ruby
<hxegon> username1: it isn't, A) Your condition doesn't trigger, B) it isn't the last statement
<hxegon> test returns "Didn't terminate"
<hxegon> >> def test; if false; return "terminated"; end; puts "unterminated"; end; test
<ruby[bot]> hxegon: # => unterminated ...check link for more (https://eval.in/754631)
<matthewd> username1: It wouldn't be very useful if all functions just returned the result from their first line
<patarr> Are there any tools to view a ruby heap dump graphically?
<hxegon> also your condition wasn't ended before you put "didn't terminate"
jhack has joined #ruby
<hxegon> >> def test; if true; return "terminated"; end; puts "unterminated"; end; test
<ruby[bot]> hxegon: # => "terminated" (https://eval.in/754632)
Silthias has joined #ruby
dopamean_ has joined #ruby
<hxegon> usually you only see return used when you want to end a function early because of some condition, otherwise it's just whatever value is last
jgnagy_ has quit [Ping timeout: 256 seconds]
jenrzzz has joined #ruby
mgorbach has quit [Remote host closed the connection]
jhack_ has quit [Ping timeout: 268 seconds]
enterprisey has joined #ruby
vikaton has joined #ruby
maattdd has quit [Read error: Connection reset by peer]
mgorbach has joined #ruby
jhack__ has quit [Ping timeout: 256 seconds]
uncertainty has joined #ruby
DTZUZU has joined #ruby
DARPA has joined #ruby
milardovich has joined #ruby
<hxegon> I guess to make code more in line with yours, and slightly more idiomatic:
jenrzzz has quit [Ping timeout: 258 seconds]
<hxegon> >> def test(bool); return "foo" if bool; "bar"; end; [test(true), test(false)]
<ruby[bot]> hxegon: # => ["foo", "bar"] (https://eval.in/754633)
DARPA has quit [Ping timeout: 240 seconds]
bkxd has joined #ruby
jaruga________ has quit [Quit: jaruga________]
<username1> matthewd: i agree
<username1> what about the fact that theres no action on the string
milardovich has quit [Ping timeout: 256 seconds]
[Butch]_ has joined #ruby
frack has joined #ruby
<matthewd> It would be *possible* for the parser to special-case that, I guess, but it doesn't seem generally useful
<username1> clearly, i had some misconceptions
<username1> matthewd: thanks
<username1> hxegon: thanks
<hxegon> username1: no problem.
jgnagy has quit [Ping timeout: 260 seconds]
invalidusrname has joined #ruby
[Butch] has quit [Ping timeout: 256 seconds]
[Butch] has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
nhhc has quit [Quit: Leaving]
blackmesa has joined #ruby
[Butch]_ has quit [Ping timeout: 256 seconds]
HoierM has joined #ruby
<mzo> ruby is exciting
HoierM has quit [Max SendQ exceeded]
<allisio> You're exciting.
HoierM has joined #ruby
<mzo> hehe ^___^
HoierM has quit [Max SendQ exceeded]
[Butch] has quit [Ping timeout: 240 seconds]
HoierM has joined #ruby
HoierM has quit [Max SendQ exceeded]
HoierM has joined #ruby
HoierM has quit [Max SendQ exceeded]
[Butch] has joined #ruby
aryaching has joined #ruby
rob has joined #ruby
zacts has quit [Quit: WeeChat 1.7]
zacts has joined #ruby
Ishido has joined #ruby
JeanCarloMachado has quit [Ping timeout: 260 seconds]
Coldbla2 has joined #ruby
uncertainty has quit [Ping timeout: 240 seconds]
Coldblackice has quit [Ping timeout: 246 seconds]
Jayson_Virissimo has joined #ruby
workmad3 has quit [Ping timeout: 240 seconds]
troulouliou_dev has joined #ruby
hahuang61 has quit [Ping timeout: 258 seconds]
jgnagy has joined #ruby
zeroDi has joined #ruby
xall has quit [Ping timeout: 256 seconds]
DARPA has joined #ruby
zeroDi has quit [Read error: Connection reset by peer]
zeroDi has joined #ruby
hotpancakes has joined #ruby
roadrunneratwast has left #ruby [#ruby]
dionysus69 has joined #ruby
szulak_ has joined #ruby
_djbkd has quit [Remote host closed the connection]
_djbkd has joined #ruby
bilal80 has quit [Quit: bilal80]
enterprisey has quit [Remote host closed the connection]
_djbkd has quit [Ping timeout: 240 seconds]
hotpancakes has quit [Remote host closed the connection]
Robtop__ has joined #ruby
hotpancakes has joined #ruby
rikkipitt has joined #ruby
rikkipitt has quit [Client Quit]
Ishido has quit [Ping timeout: 260 seconds]
pwnd_nsfw` has quit [Ping timeout: 258 seconds]
troulouliou_dev has quit [Quit: Leaving]
Ravunni has joined #ruby
jenrzzz has joined #ruby
frack has left #ruby ["Leaving"]
Ravunni has left #ruby [#ruby]
m_31 has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 240 seconds]
jgnagy has quit [Ping timeout: 268 seconds]
bkxd has quit [Ping timeout: 260 seconds]
jgnagy has joined #ruby
username1 has quit [Ping timeout: 246 seconds]
<Eiam> ruby is fun, definitely the most fun language I use =p
szulak_ has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
<Eiam> baweaver: I've seen this, thanks =) I used to have my results from LYAH & CS194 on github but I guess I pulled it down... did all the workshets and such. was fun, haskell was fun to play in
Rodya_ has quit [Remote host closed the connection]
rkazak_ has joined #ruby
gusrub has quit [Remote host closed the connection]
Jayson_Virissimo has quit []
hahuang61 has joined #ruby
mula has joined #ruby
_djbkd has joined #ruby
enterprisey has joined #ruby
gloscombe_ has joined #ruby
kitikonti has joined #ruby
onkelhotte has joined #ruby
augcesar has quit [Quit: Connection closed for inactivity]
JeanCarloMachado has joined #ruby
hahuang61 has quit [Quit: WeeChat 1.5]
vali has joined #ruby
vali has quit [Remote host closed the connection]
Raboo has quit [Ping timeout: 264 seconds]
uncertainty has joined #ruby
br0d1n has quit [Quit: Leaving]
benlieb has joined #ruby
onkelhotte has quit [Quit: WeeChat 1.6]
cdg has joined #ruby
cpruitt has quit [Ping timeout: 240 seconds]
onkelhotte has joined #ruby
username1 has joined #ruby
jgnagy_ has joined #ruby
gusrub has joined #ruby
jgnagy has quit [Ping timeout: 240 seconds]
rkazak_ has quit [Quit: Sleep.....ing....]
onkelhotte has quit [Quit: WeeChat 1.6]
enterprisey has quit [Ping timeout: 260 seconds]
SuperTux88 has quit [Ping timeout: 255 seconds]
blackmesa has quit [Ping timeout: 256 seconds]
onkelhotte has joined #ruby
enterprisey has joined #ruby
onkelhotte has quit [Client Quit]
onkelhotte has joined #ruby
rfoust has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
onkelhotte has quit [Client Quit]
DARPA has quit [Ping timeout: 258 seconds]
onkelhotte has joined #ruby
esObe_ has joined #ruby
esObe_ has quit [Remote host closed the connection]
esObe_ has joined #ruby
kirun has joined #ruby
haylon has quit [Quit: Leaving]
dopamean_ has quit [Ping timeout: 260 seconds]
workmad3 has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
SuperTux88 has joined #ruby
KnownSyntax has quit [Remote host closed the connection]
saslam has joined #ruby
bkxd has joined #ruby
marxarelli is now known as marxarelli|afk
uncertainty has quit [Ping timeout: 240 seconds]
KnownSyntax has joined #ruby
KnownSyntax has joined #ruby
KnownSyntax has quit [Changing host]
<raspado> hi all, I have a script that shows "self.delete( hosts )", it calls another lib with "def delete ( hosts = [] ) ... " is self.delete ( hosts ) an array or is it a string?
<raspado> not sure if I should pass hosts as ["blah.vmbox"] or "blah.vmbox"
roadrunneratwast has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
cpruitt has joined #ruby
onkelhotte has quit [Quit: WeeChat 1.6]
KnownSyntax has quit [Ping timeout: 246 seconds]
milardovich has joined #ruby
<agent_white> !tias
<agent_white> D:
dionysus69 has quit [Ping timeout: 240 seconds]
<dminuoso> ?tias
<ruby[bot]> Why don't you try it and see for yourself?
skweek has quit [Ping timeout: 268 seconds]
SeepingN has quit [Quit: The system is going down for reboot NOW!]
saslam_ has joined #ruby
DTZUZU has quit [Quit: WeeChat 1.5]
szulak_ has joined #ruby
griffindy has joined #ruby
tystr has joined #ruby
saslam has quit [Ping timeout: 258 seconds]
HoierM has joined #ruby
<raspado> array... i see thx!
HoierM has quit [Max SendQ exceeded]
onkelhotte has joined #ruby
griffindy has quit [Ping timeout: 258 seconds]
hooper has joined #ruby
IRCFrEAK has joined #ruby
IRCFrEAK has quit [Max SendQ exceeded]
pytuger has joined #ruby
KnownSyntax has joined #ruby
KnownSyntax has joined #ruby
KnownSyntax has quit [Changing host]
workmad3 has quit [Ping timeout: 264 seconds]
blackwind_123 has joined #ruby
hotpancakes has quit [Remote host closed the connection]
saslam has joined #ruby
saslam_ has quit [Ping timeout: 240 seconds]
blackmesa has joined #ruby
d0nn1e has quit [Ping timeout: 256 seconds]
d0nn1e has joined #ruby
renchan has quit [Remote host closed the connection]
raul782 has quit [Remote host closed the connection]
lupine has joined #ruby
ldnunes has quit [Quit: Leaving]
jgnagy_ has quit [Ping timeout: 268 seconds]
alphor has quit [Remote host closed the connection]
JeanCarloMachado has quit [Ping timeout: 256 seconds]
pawnbox has quit [Remote host closed the connection]
jgnagy has joined #ruby
aryaching has quit [Read error: Connection reset by peer]
pawnbox has joined #ruby
aryaching has joined #ruby
milardov_ has joined #ruby
vikaton has quit [Quit: Connection closed for inactivity]
oryman has joined #ruby
onkelhotte has quit [Quit: WeeChat 1.7]
oryman has quit [Client Quit]
blackmesa has quit [Ping timeout: 246 seconds]
milardovich has quit [Ping timeout: 260 seconds]
jgnagy_ has joined #ruby
pawnbox has quit [Ping timeout: 256 seconds]
DARPA has joined #ruby
hahuang61 has joined #ruby
jgnagy has quit [Ping timeout: 264 seconds]
gusrub has quit [Remote host closed the connection]
gusrub has joined #ruby
jamesaxl has quit [Read error: Connection reset by peer]
DARPA has quit [Ping timeout: 268 seconds]
jamesaxl has joined #ruby
hotpancakes has joined #ruby
invalidusrname has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hahuang61 has quit [Ping timeout: 268 seconds]
jamesaxl has quit [Read error: Connection reset by peer]
pulkit4tech has quit [Quit: Connection closed for inactivity]
jamesaxl has joined #ruby
uncertainty has joined #ruby
futilegames has joined #ruby
jamesaxl has quit [Read error: Connection reset by peer]
KnownSyntax has quit [Ping timeout: 260 seconds]
[Butch] has quit [Ping timeout: 260 seconds]
jamesaxl has joined #ruby
[Butch] has joined #ruby
bkxd has quit [Ping timeout: 246 seconds]
patarr has quit [Ping timeout: 240 seconds]
KnownSyntax has joined #ruby
KnownSyntax has joined #ruby
KnownSyntax has quit [Changing host]
kendocode has joined #ruby
cdg has quit [Remote host closed the connection]
kendocode has quit [Quit: Leaving]
kendocode has joined #ruby
agent_white has quit [Quit: leaving]
pwnd_nsfw has joined #ruby
Robtop__ has quit [Ping timeout: 268 seconds]
raul782 has joined #ruby
[Butch]_ has joined #ruby
alphor has joined #ruby
cdg has joined #ruby
tomphp has joined #ruby
[Butch]_ has quit [Client Quit]
[Butch] has quit [Ping timeout: 256 seconds]
workmad3 has joined #ruby
raul782 has quit [Remote host closed the connection]
postmodern has joined #ruby
blackmesa has joined #ruby
jamesaxl has quit [Quit: Leaving]
sepp2k has quit [Ping timeout: 256 seconds]
dlitvak has joined #ruby
litheum has joined #ruby
ta_ has quit [Read error: Connection reset by peer]
litheum has left #ruby [#ruby]
TomyLobo2 has joined #ruby
futilegames has quit [Quit: futilegames]
gsilva has joined #ruby
pwnd_nsfw` has joined #ruby
TomyLobo has quit [Ping timeout: 240 seconds]
ResidentBiscuit has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
pawnbox has joined #ruby
pwnd_nsfw has quit [Ping timeout: 246 seconds]
ta_ has joined #ruby
hutch34 has quit [Quit: WeeChat 1.5]
mula has quit [Remote host closed the connection]
uncertainty has quit [Ping timeout: 240 seconds]
OTORelic has quit [Ping timeout: 240 seconds]
pawnbox has quit [Ping timeout: 258 seconds]
<ddffg> ruby is a little faster than python
chopppe has joined #ruby
sepp2k has joined #ruby
<pytuger> ddffg, are you sure?
jaffejoe has joined #ruby
<ddffg> pytuger,check it out http://benchmarksgame.alioth.debian.org/
<jaffejoe> anyone here familiar with using watir gem for web scraping?
<jaffejoe> trying to figure out this error message i'm getting
raul782 has joined #ruby
<mzo> actually with the new optimizations in ruby 2.5 it's slightly faster than even hand-tuned assembly in several of the benchmarks i've put together
<ddffg> rust is super fast
HoierM has joined #ruby
HoierM has quit [Max SendQ exceeded]
HoierM has joined #ruby
HoierM has quit [Max SendQ exceeded]
<mzo> yes it is. the rust team is doing some impressive work and leveraging the amazing LLVM infrastructure. still not quite as fast as ruby 2.5, but before long i suspect rust will take the lead.
<Disavowed> mzo: Is 2.5 the one where the hash tables move to open addressing? I'm surprised to see Ruby smoke Python so comprehensively in those benchmarks
pwnd_nsfw` has quit [Read error: Connection reset by peer]
HoierM has joined #ruby
HoierM has quit [Max SendQ exceeded]
pwnd_nsfw` has joined #ruby
HoierM has joined #ruby
HoierM has quit [Max SendQ exceeded]
<havenwood> ddffg: That comparison doesn't allow high level languages to use idiomatic constructs. So it favors low level languages or those whose idiomatic form mirrors them.
<havenwood> kostya has an interesting fleet of benchmarks here: https://github.com/kostya/benchmarks
herbmillerjr has quit [Quit: Konversation terminated!]
HoierM has joined #ruby
cyphase has quit [Read error: Connection reset by peer]
SeepingN has joined #ruby
chouhoulis has quit [Remote host closed the connection]
roadrunneratwast has quit [Quit: Leaving.]
raul782 has quit [Remote host closed the connection]
kirun has quit [Quit: Konversation terminated!]
saslam has quit [Ping timeout: 260 seconds]
nofxx has joined #ruby
nofxxx has quit [Ping timeout: 240 seconds]
bkxd has joined #ruby
hotpanca_ has joined #ruby
redhedded1 has quit [Quit: Textual IRC Client: www.textualapp.com]
mula has joined #ruby
hotpancakes has quit [Ping timeout: 246 seconds]
szulak_ has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
last_staff has quit [Quit: last_staff]
chopppe has quit [Quit: Going offline, see ya! (www.adiirc.com)]
zapata has quit [Ping timeout: 264 seconds]
roadrunneratwast has joined #ruby
zapata has joined #ruby
DLSteve_ has quit [Quit: All rise, the honorable DLSteve has left the channel.]
herbmillerjr has joined #ruby
BackEndCoder has quit [Excess Flood]
sneakers has joined #ruby
BackEndCoder has joined #ruby
Rodya_ has joined #ruby
gsilva has quit [Remote host closed the connection]
ozcanesen has quit [Quit: Textual IRC Client: www.textualapp.com]
preyalone has quit [Quit: Connection closed for inactivity]
marxarelli|afk is now known as marxarelli
raul782 has joined #ruby
JoshS has quit [Quit: Leaving]
gusrub has quit [Remote host closed the connection]
Renich has joined #ruby
cyphase has joined #ruby
griffindy has joined #ruby
renatosilva has quit [Quit: http://renatosilva.net]
brent__ has quit [Remote host closed the connection]
polishdub has quit [Quit: leaving]
saneax is now known as saneax-_-|AFK
milardov_ has quit [Remote host closed the connection]
milardovich has joined #ruby
arescorpio has joined #ruby
raul782 has quit [Remote host closed the connection]
brent__ has joined #ruby
hahuang61 has joined #ruby
milardovich has quit [Ping timeout: 240 seconds]
elifoster has joined #ruby
workmad3 has quit [Ping timeout: 240 seconds]
bocaneri has joined #ruby
gusrub has joined #ruby
brent__ has quit [Ping timeout: 264 seconds]
CloCkWeRX has joined #ruby
cschneid_ has quit [Remote host closed the connection]
rob has quit [Remote host closed the connection]
raul782 has joined #ruby
roadrunneratwast has left #ruby [#ruby]
biberu has quit [Read error: Connection reset by peer]
charliesome has joined #ruby
HoierM has quit [Ping timeout: 240 seconds]
tolerablyjake has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
benlieb has quit [Quit: benlieb]
benlieb has joined #ruby
benlieb has quit [Client Quit]
pawnbox has joined #ruby
jaffejoe has quit [Quit: Leaving]
leonthemisfit has quit [Quit: ZNC 1.6.3+deb1 - http://znc.in]
mula has quit [Remote host closed the connection]
Rodya_ has quit [Remote host closed the connection]
mula has joined #ruby
milardovich has joined #ruby
mula has quit [Remote host closed the connection]
BabyMario has joined #ruby
mula has joined #ruby
raul782 has quit [Remote host closed the connection]
leonthemisfit has joined #ruby
leonthemisfit has joined #ruby
leonthemisfit has quit [Changing host]
mula has quit [Remote host closed the connection]
pawnbox has quit [Ping timeout: 246 seconds]
mula has joined #ruby
BabyMario has left #ruby [#ruby]
mula has quit [Remote host closed the connection]
mula has joined #ruby
mula has quit [Remote host closed the connection]
mula has joined #ruby
mula has quit [Remote host closed the connection]
mula has joined #ruby
mula has quit [Remote host closed the connection]
CloCkWeRX has quit [Ping timeout: 260 seconds]
Rodya_ has joined #ruby
hotpanca_ has quit [Remote host closed the connection]
hotpancakes has joined #ruby
CloCkWeRX has joined #ruby
mysticjohn has joined #ruby
mysticjohn has quit [Excess Flood]
bkxd has quit [Ping timeout: 268 seconds]
hotpancakes has quit [Ping timeout: 246 seconds]
tekniq has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
VladGh has quit [Remote host closed the connection]
Fernando-Basso has quit [Quit: WeeChat 1.7]
VladGh has joined #ruby
raul782 has joined #ruby