havenwood changed the topic of #ruby to: Rules & more: https://ruby-community.com | Ruby 2.5.2, 2.4.5, 2.3.8, 2.6.0-preview2: https://www.ruby-lang.org | Paste 4+ lines of text to https://dpaste.de/ and select ruby as the language | Rails questions? Ask in #RubyOnRails | Books: https://goo.gl/wpGhoQ | Logs: https://irclog.whitequark.org/ruby | Can't talk? Register/identify with Nickserv first!
jcarl43 has quit [Quit: WeeChat 2.2]
stooj has joined #ruby
stooj_ has quit [Ping timeout: 252 seconds]
RedNifre has joined #ruby
throwntall has quit [Ping timeout: 252 seconds]
throwntall has joined #ruby
uplime has joined #ruby
RedNifre has quit [Ping timeout: 276 seconds]
<Eiam> RedNifre: Swift?
marmotini_ has quit [Remote host closed the connection]
marmotini_ has joined #ruby
teclator has quit [Ping timeout: 252 seconds]
SeepingN has quit [Quit: The system is going down for reboot NOW!]
cagomez has joined #ruby
nofxx has joined #ruby
ansraliant has joined #ruby
Freshnuts has joined #ruby
rivalomega has quit []
daemonwrangler has quit [Quit: ZNC 1.6.5 - http://znc.in]
daemonwrangler has joined #ruby
druonysus has quit [Read error: Connection reset by peer]
DTZUZO_ has quit [Ping timeout: 244 seconds]
cagomez has quit [Remote host closed the connection]
eckhardt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cagomez has joined #ruby
ramfjord has quit [Ping timeout: 276 seconds]
kent\n has joined #ruby
throwntall has quit [Quit: WeeChat 1.9.1]
marmotini_ has quit [Ping timeout: 245 seconds]
DTZUZO_ has joined #ruby
ta_ has joined #ruby
ta_ has quit [Ping timeout: 245 seconds]
Dimik has quit [Ping timeout: 272 seconds]
apeiros has joined #ruby
marmotini_ has joined #ruby
apeiros has quit [Ping timeout: 246 seconds]
ta_ has joined #ruby
Emmanuel_Chanel has quit [Ping timeout: 268 seconds]
akaiiro has quit [Remote host closed the connection]
akaiiro has joined #ruby
kurko__ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kurko_ has joined #ruby
kurko_ has quit [Client Quit]
kurko_ has joined #ruby
kurko_ has quit [Client Quit]
kurko_ has joined #ruby
kurko_ has quit [Client Quit]
kurko_ has joined #ruby
DTZUZO_ has quit [Read error: Connection reset by peer]
kurko_ has quit [Client Quit]
kurko_ has joined #ruby
kurko_ has quit [Client Quit]
ta_ has quit [Ping timeout: 252 seconds]
Emmanuel_Chanel has joined #ruby
orbyt_ has joined #ruby
apeiros has joined #ruby
apeiros has quit [Ping timeout: 268 seconds]
arescorpio has joined #ruby
esrse has joined #ruby
braincrash has quit [Quit: bye bye]
braincrash has joined #ruby
za1b1tsu has joined #ruby
marmotini_ has quit [Ping timeout: 268 seconds]
DTZUZO_ has joined #ruby
urbanmonk has joined #ruby
Nicmavr has quit [Read error: Connection reset by peer]
arescorpio has quit [Remote host closed the connection]
Nicmavr has joined #ruby
urbanmonk has quit [Client Quit]
apeiros has joined #ruby
ur5us has joined #ruby
apeiros has quit [Ping timeout: 245 seconds]
MoritaShinobu has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cagomez has quit [Remote host closed the connection]
johnny56 has quit [Ping timeout: 272 seconds]
lytol_ has quit [Remote host closed the connection]
ur5us has quit [Remote host closed the connection]
ta_ has joined #ruby
helpa has joined #ruby
za1b1tsu has quit [Ping timeout: 244 seconds]
apeiros has joined #ruby
apeiros has quit [Ping timeout: 268 seconds]
eckhardt has joined #ruby
mniip_ is now known as mniip
ta_ has quit [Ping timeout: 268 seconds]
johnny56 has joined #ruby
reber has joined #ruby
apeiros has joined #ruby
ta_ has joined #ruby
apeiros has quit [Ping timeout: 244 seconds]
ta_ has quit [Ping timeout: 268 seconds]
jetchisel has quit [Ping timeout: 276 seconds]
za1b1tsu has joined #ruby
dellavg_ has joined #ruby
jetchisel has joined #ruby
apeiros has joined #ruby
pharma_joe has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ta_ has joined #ruby
Tuor has joined #ruby
Dbugger has joined #ruby
aufi has joined #ruby
apeiros has quit [Remote host closed the connection]
Cthulu201 has quit [Ping timeout: 252 seconds]
snickers has joined #ruby
Cthulu201 has joined #ruby
DoubleMalt has joined #ruby
DoubleMalt has quit [Remote host closed the connection]
venmx has joined #ruby
Fusl has quit [Ping timeout: 256 seconds]
eckhardt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Fusl has joined #ruby
aupadhye has joined #ruby
leafyleong has quit [Ping timeout: 244 seconds]
Freshnuts has quit [Quit: Leaving]
leafyleong has joined #ruby
Tempesta has quit [Quit: See ya!]
cd has quit [Quit: cd]
clemens3_ has joined #ruby
Tempesta has joined #ruby
zxq2 has quit [Ping timeout: 252 seconds]
venmx has quit [Ping timeout: 272 seconds]
ta_ has quit [Ping timeout: 252 seconds]
ta_ has joined #ruby
ta_ has quit [Read error: Connection reset by peer]
nadir has quit [Quit: Connection closed for inactivity]
nowhere_man has joined #ruby
GodFather has quit [Read error: Connection reset by peer]
GodFather has joined #ruby
prillian5 has joined #ruby
mikecmpbll has joined #ruby
<prillian5> Hi, I'm a ruby noob and trying to setup fastlane (an ruby-application).
<prillian5> My problem is not with fastlane itself, but to understand the way to install ruby apps
<prillian5> I use Linux, so I can do "gem install" or "sudo gem install"
<prillian5> sudo installs the application to /root/.gem/ruby/2.5.0/gems/ ... without sudo to /user/.gem/ruby/2.5.0
<prillian5> How can I install an ruby-application globally for all users without the need of sudo if I call the app?
ur5us has joined #ruby
uplime has quit [Quit: she was a sk8r boi. she said see you later boy. he wasn't good enough for her. now he's a super star slammin on his guitar, show pretty face what he's worth]
ur5us has quit [Remote host closed the connection]
ua has quit [Read error: Connection reset by peer]
schneider has joined #ruby
lxsameer has joined #ruby
ua has joined #ruby
prillian5 has quit [Remote host closed the connection]
teclator has joined #ruby
wojnar has joined #ruby
mikecmpb_ has joined #ruby
mikecmpbll has quit [Ping timeout: 250 seconds]
blackmesa has joined #ruby
blackmesa has quit [Client Quit]
Tuor has quit [Ping timeout: 244 seconds]
stooj has quit [Quit: ZNC 1.7.0 - https://znc.in]
venmx has joined #ruby
stooj has joined #ruby
RedNifre has joined #ruby
nowhere_man has quit [Remote host closed the connection]
nowhere_man has joined #ruby
qolq has joined #ruby
MoritaShinobu has quit [Ping timeout: 250 seconds]
jetchisel has quit [Quit: Unfortunately time is always against us -- [Morpheus]]
MoritaShinobu has joined #ruby
ansraliant has quit [Quit: My planet needs me]
ur5us has joined #ruby
MyMind has quit [Read error: Connection reset by peer]
MyMind has joined #ruby
schneider has quit [Quit: WeeChat 2.0.1]
Azure has quit [Ping timeout: 244 seconds]
phaul has joined #ruby
esrse has quit [Ping timeout: 244 seconds]
djellemah has quit [Ping timeout: 246 seconds]
za1b1tsu has quit [Ping timeout: 250 seconds]
djellemah has joined #ruby
iMadper has joined #ruby
phaul has quit [Quit: bye]
phaul has joined #ruby
phaul has quit [Quit: bye]
phaul has joined #ruby
whysthatso has joined #ruby
roshanavand has joined #ruby
RedNifre has quit [Ping timeout: 268 seconds]
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
ur5us has quit [Ping timeout: 252 seconds]
whysthatso has quit [Quit: whysthatso]
z3uS has quit [Quit: /dev/null]
z3uS has joined #ruby
whysthatso has joined #ruby
leafyleong has quit [Ping timeout: 268 seconds]
kapil____ has joined #ruby
whysthatso has quit [Ping timeout: 252 seconds]
apparition has joined #ruby
kurko_ has joined #ruby
za1b1tsu has joined #ruby
Pupeno_ has quit [Remote host closed the connection]
leafyleong has joined #ruby
z3uS has quit [Quit: /dev/null]
<leah2> is the 2.5.2 tarball broken?
<leah2> masterdir/builddir/ruby-2.5.2/tool/config.sub -> ../.downloaded-cache/config.sub
<leah2> but that dir doesnt exist
wojnar has quit [Remote host closed the connection]
z3uS has joined #ruby
marmotini_ has joined #ruby
FireBurn has joined #ruby
<FireBurn> Hi
<FireBurn> Was Ruby 2.5.3 just released?
<leah2> makes sense
<leah2> 2.5.2 is broken :P
za1b1tsu has quit [Ping timeout: 252 seconds]
<FireBurn> Doesn't look like much changed bar the patch version, were the tarballs messed up?
<leah2> 13:27:28 <leah2> is the 2.5.2 tarball broken?
<leah2> 13:27:38 <leah2> masterdir/builddir/ruby-2.5.2/tool/config.sub ->
<leah2> ../.downloaded-cache/config.sub
roshanavand has quit [Ping timeout: 268 seconds]
discopatrick has joined #ruby
za1b1tsu has joined #ruby
RedNifre has joined #ruby
fiachetti has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
nertzy has joined #ruby
cd has joined #ruby
johnaj has joined #ruby
<johnaj> Is there any way for a block to call itself again?
justicefries has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
AJA4350 has joined #ruby
InfinityFye has joined #ruby
ShekharReddy has joined #ruby
rwb has quit [Ping timeout: 245 seconds]
roshanavand has joined #ruby
xfbs has joined #ruby
lxsameer has quit [Ping timeout: 252 seconds]
nertzy has quit [Quit: This computer has gone to sleep]
iMadper has quit [Remote host closed the connection]
lupine has quit [Remote host closed the connection]
lupine has joined #ruby
lxsameer has joined #ruby
vondruch has quit [Ping timeout: 246 seconds]
RougeR has joined #ruby
<RougeR> any ideas why i am getting: ! Unable to load application: NameError: uninitialized constant ActiveRecord
<RougeR> in my application
marmotini_ has quit [Ping timeout: 244 seconds]
aupadhye has quit [Remote host closed the connection]
rafadc has quit [Quit: ZNC 1.7.0 - https://znc.in]
KazeFX has quit [Remote host closed the connection]
<tbuehlmann> RougeR: can you gist the whole stacktrace to that error?
snickers has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rafadc has joined #ruby
<RougeR> tbuehlmann, sure
<RougeR> its happened in my sinatra application. when i added a few new files to the api dir
<RougeR> tbuehlmann, im not logged into github on here. but here is a pastebin
<RougeR> i know the bot will shout at me
<ruby[bot]> RougeR: as I told you already, please use https://gist.github.com
kapil____ has quit [Quit: Connection closed for inactivity]
<RougeR> tbuehlmann, ^
<tbuehlmann> I assume app/models/job.rb includes a Job model that inherits from ActiveRecord::Base and that at this point the active record library wasn't loaded
<RougeR> yeah it does
<RougeR> and its always worked untill i added these last set of changes
<tbuehlmann> what changed?
<RougeR> emmm, a fair bit. but the issues have got to be in one of two files
<RougeR> im adding resque task scheduling
<RougeR> tbuehlmann, id just paste up the source, but its work stuff so eh
<tbuehlmann> where do you require active record and is that file loaded before requiring the job.rb file?
<RougeR> tbuehlmann, im not sure. i suspect not tbh
<RougeR> im going to try requiring it in config.ry
<RougeR> .ru
<RougeR> hmm, im already doing that
abf_ has joined #ruby
<tbuehlmann> are you certain you're requiring active record before requiring the job?
jhass changed the topic of #ruby to: Rules & more: https://ruby-community.com | Ruby 2.5.3, 2.4.5, 2.3.8, 2.6.0-preview2: https://www.ruby-lang.org | Paste 4+ lines of text to https://dpaste.de/ and select ruby as the language | Rails questions? Ask in #RubyOnRails | Books: https://goo.gl/wpGhoQ | Logs: https://irclog.whitequark.org/ruby | Can't talk? Register/identify with Nickserv first!
<RougeR> if require 'active_record' is at the top of all the pages
<RougeR> then i would think so, no?
<RougeR> ive tried inheritting from active record and requiring it
<RougeR> hmm
Nicmavr has quit [Quit: ZNC 1.7.0 - https://znc.in]
<RougeR> tbuehlmann, job and settings are the AR classes im interacting with
<jhass> maybe something else defines a file called active_record.rb and gets priority now? dump $LOADED_FEATURES directly after the require and check the path
nowhereman has joined #ruby
nowhere_man has quit [Ping timeout: 252 seconds]
bauruine has quit [Read error: Connection reset by peer]
nowhereman is now known as Guest84598
justicefries has joined #ruby
bauruine has joined #ruby
<jhass> johnaj: call redo
Guest1392 has joined #ruby
leafyleong has quit [Ping timeout: 272 seconds]
akem__ has quit [Remote host closed the connection]
Guest1392 has quit [Quit: ZNC 1.7.0 - https://znc.in]
akem__ has joined #ruby
Guest19970 has joined #ruby
Guest19970 has quit [Client Quit]
Nicmavr has joined #ruby
apparition has quit [Quit: Bye]
roshanavand has quit [Ping timeout: 264 seconds]
samort7 has joined #ruby
kapil____ has joined #ruby
mikecmpbll has joined #ruby
mikecmpb_ has quit [Ping timeout: 246 seconds]
marmotini_ has joined #ruby
Nicmavr has quit [Read error: Connection reset by peer]
leafyleong has joined #ruby
Nicmavr has joined #ruby
Azure has joined #ruby
Azure has quit [Ping timeout: 252 seconds]
za1b1tsu has quit [Ping timeout: 276 seconds]
za1b1tsu_ has joined #ruby
Azure has joined #ruby
Guest84598 has quit [Read error: Connection reset by peer]
nowhere_man has joined #ruby
Dbugger has quit [Remote host closed the connection]
gregf_ has quit [Ping timeout: 256 seconds]
orbyt_ has joined #ruby
knight33 has joined #ruby
jecht has joined #ruby
kurko_ has quit [Ping timeout: 276 seconds]
RedNifre has quit [Ping timeout: 250 seconds]
aufi has quit [Ping timeout: 245 seconds]
RattyWork has joined #ruby
snickers has joined #ruby
RedNifre has joined #ruby
Rapture has joined #ruby
abf_ has quit [Quit: Leaving]
jcarl43 has joined #ruby
justicefries has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
FireBurn has quit [Quit: Konversation terminated!]
d10n-work has joined #ruby
apeiros has joined #ruby
samort7 has quit [Read error: Connection reset by peer]
tdy has joined #ruby
<RougeR> has anyone done work with resque-scheduler before
<RougeR> the documentation for the dynamic schedules bit is crap
<RougeR> im trying to require 'resque-scheduler'
<RougeR> but it just screams and cant load it
MoritaShinobu has quit [Quit: Leaving]
GodFather has quit [Ping timeout: 245 seconds]
mikecmpbll has quit [Ping timeout: 252 seconds]
beowuff has joined #ruby
<johnaj> jhass, I'd like to call the block again with different arguments -- can "redo" do that?
<johnaj> also, thanks for your suggestion :-)
<jhass> no
<jhass> ?xy
<ruby[bot]> it seems like you are asking for a specific solution to a problem, instead of asking about your problem. This often leads to bad solutions and increases frustration for you and those trying to help you. More: http://meta.stackexchange.com/a/66378
<johnaj> Hm ... this isn't xy, I specifically want to create a recursive block.
<jhass> like for the sake of it?
<johnaj> Like this: { |x| call_same_with(x+1) }, if call_same_with were to call the block itself again.
<johnaj> Yes, I would find it useful
<johnaj> Named recursive methods are useful, so would "unnamed" ones be
<jhass> essentially, the distinction between a block and a proc is that the block is fully anonymous
<jhass> you can make a recursive proc
<jhass> x = -> { x.call }
GodFather has joined #ruby
<johnaj> Aha! That's probably the functionality that I'm looking for. Thank you! I'll see whether I end up using it :-)
<jhass> you can make a method that yields a given block as a proc to itself: def x(&block); yield block; end; x {|y| y.call(y) }
<jhass> I never needed any of that in the real world
RougeR has quit [Ping timeout: 244 seconds]
<johnaj> Is there a way for the proc to call itself without referring to x? Would self.call work?
InfinityFye has quit [Quit: Leaving]
<jhass> no
ta_ has joined #ruby
clemens3_ has quit [Ping timeout: 244 seconds]
<johnaj> okay, thanks for clarifying
ta_ has quit [Ping timeout: 250 seconds]
ivanskie has joined #ruby
lxsameer has quit [Ping timeout: 244 seconds]
akaiiro has quit [Remote host closed the connection]
RedNifre has quit [Ping timeout: 268 seconds]
jecht has quit [Ping timeout: 272 seconds]
snickers has quit [Read error: Connection reset by peer]
Sauvin has quit [Read error: Connection reset by peer]
Guest15477 has joined #ruby
<Guest15477> wtffffffffffffffffffff
<Guest15477> guys
Guest15477 is now known as Bacteria
doubledup has joined #ruby
akaiiro has joined #ruby
ta_ has joined #ruby
conta1 has joined #ruby
<jhass> sup gal?
armyriad has quit [Quit: Leaving]
sameerynho has joined #ruby
whysthatso has joined #ruby
venmx has quit [Ping timeout: 252 seconds]
akaiiro has quit [Ping timeout: 245 seconds]
justicefries has joined #ruby
doubledup has quit [Quit: Leaving]
<TheBrayn> is something currently weird with rubygems.org or is it just me? https://gist.github.com/mmerfort/bc0f6e214dca2e061e87815e05769084
<Bacteria> yes
<Bacteria> its u
<havenwood> TheBrayn: I'm not seeing any issues.
RedNifre has joined #ruby
akaiiro has joined #ruby
whysthatso has quit [Ping timeout: 244 seconds]
apeiros has quit [Remote host closed the connection]
eckhardt has joined #ruby
ta_ has quit [Ping timeout: 272 seconds]
im0nde has quit [Ping timeout: 252 seconds]
mikecmpbll has joined #ruby
im0nde has joined #ruby
kujira has joined #ruby
kujira has quit [Client Quit]
kujira has joined #ruby
apeiros has joined #ruby
Dbugger has joined #ruby
conta1 has quit [Quit: conta1]
kent\n has quit [Ping timeout: 260 seconds]
kent\n has joined #ruby
Azure has quit [Read error: Connection reset by peer]
Azure has joined #ruby
akaiiro has quit [Ping timeout: 268 seconds]
doubledup has joined #ruby
mikecmpbll has quit [Ping timeout: 244 seconds]
mikecmpbll has joined #ruby
kapil____ has quit [Quit: Connection closed for inactivity]
mikecmpb_ has joined #ruby
mikecmpbll has quit [Ping timeout: 245 seconds]
mikecmpbll has joined #ruby
kujira has quit []
mikecmpb_ has quit [Ping timeout: 268 seconds]
whysthatso has joined #ruby
mikecmpbll has quit [Ping timeout: 244 seconds]
mikecmpbll has joined #ruby
johnaj has quit [Ping timeout: 252 seconds]
raulp has joined #ruby
RedNifre has quit [Ping timeout: 252 seconds]
akaiiro has joined #ruby
beowuff has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
venmx has joined #ruby
dinfuehr has quit [Ping timeout: 245 seconds]
al2o3-cr has quit [Quit: WeeChat 2.2]
dinfuehr has joined #ruby
al2o3-cr has joined #ruby
tdy has quit [Ping timeout: 245 seconds]
Azure|dc has joined #ruby
Azure has quit [Ping timeout: 250 seconds]
reber has quit [Remote host closed the connection]
samort7 has joined #ruby
za1b1tsu_ has quit [Ping timeout: 246 seconds]
doubledup has quit [Quit: Leaving]
RougeR has joined #ruby
tdy has joined #ruby
jcalla has quit [Quit: Leaving]
knight33 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ramfjord has joined #ruby
RougeR has quit [Ping timeout: 260 seconds]
nahra has quit [Remote host closed the connection]
<cthulchu> RUUUUUUUBYYYYY!
RougeR has joined #ruby
samort7 has quit [Read error: Connection reset by peer]
samort7 has joined #ruby
justicef_ has joined #ruby
kurko_ has joined #ruby
justicefries has quit [Ping timeout: 244 seconds]
rwb has joined #ruby
Dbugger has quit [Remote host closed the connection]
<cthulchu> hey folks
tdy has quit [Ping timeout: 250 seconds]
<RougeR> hi
<RougeR> need helpwith something? cthulchu
<cthulchu> well I thought so... But it's not worth asking
<cthulchu> :)_
<cthulchu> I want to measure performance of one my functions
<cthulchu> I'm gonna just do start = Time.now() in the beginning
<cthulchu> and then puts start-Time.now() at the end
<baweaver> Benchmark
<cthulchu> yeah, benchmark
<cthulchu> should work
<baweaver> No, like the Ruby feature Benchmark
<cthulchu> errr
<baweaver> That should give you a place to start
<cthulchu> it did
<baweaver> Now off I go to get coffee and interview peoples
<cthulchu> but looks like a lot more syntax than what I have
<cthulchu> thanks!
<cthulchu> when I need to benchmark something smaller, I'll do benchmark
justicef_ has quit [Ping timeout: 260 seconds]
SeepingN has joined #ruby
dviola has joined #ruby
justicefries has joined #ruby
wojnar has joined #ruby
jcalla has joined #ruby
justicefries has quit [Ping timeout: 276 seconds]
phaul has quit [Ping timeout: 252 seconds]
icarus has joined #ruby
pharma_joe has joined #ruby
granttrec has joined #ruby
<granttrec> so i've been looking for a language that has good syntax and good for hobby projects/scripting, was really happy to find ruby, feel like i've missed out on a lot by ignoring it :')
samort7 has quit [Read error: Connection reset by peer]
<granttrec> readable sytax I should say
<cthulchu> I prefer python's syntax
<cthulchu> I still hate how ruby has different ways to mark differnt blocks
<cthulchu> sometimes you can use {}, sometimes it's def-end or if-end
<cthulchu> but I got used to it. kinda.
<granttrec> yeah thats tough to beat, but wanted to print some binary tables in python, wasnt the best, in ruby was much better result, thats what got me here
<cthulchu> yes, ruby has immense amount of magic
<cthulchu> I have never seen so much magic
<cthulchu> it scares me a bit
<granttrec> I aprecitate the ideal of programmer productivity, tbh miranda is currently my fav syntax, note that inspired the sytax of both python and ruby
<granttrec> also the "pure" object oriented nature is great
<granttrec> a lot better than java/c++ for sure
sameerynho has quit [Ping timeout: 252 seconds]
<cthulchu> not better
<cthulchu> faster coding - yes
<cthulchu> there are certain tradeoffs
<cthulchu> but yeah, I appreciate the speed too
<granttrec> I was speaking specifically about the object oriented nature
<granttrec> each lang has its own benefits, and I've learned multiligualism is key
<cthulchu> tbh, I love Java's OOP implementation
<cthulchu> and how reliable it is
<cthulchu> I don't imagine coding similar low-level stuff in Ruby
<granttrec> no lol
<cthulchu> just take a look at proper implementation of static in Ruby
<cthulchu> first of all, Ruby doesn't seem to fully realize what static is
<cthulchu> and then when you see the proper implementation of static... it's hell.
<cthulchu> I still use the @@ shortcut for static vars
<cthulchu> also protection isn't the thing in Ruby. so if something is Private, you still can do whatever you want with it :)
<cthulchu> it's kinda relaxing
<granttrec> although I wish there was a systems lang with a more friendly sytax other than c, e.g. ada has a rich toolset but the syntax is off putting, but I can get over it
<granttrec> i'm still new to ruby so Ill run into that at some point
fluxAeon has quit [Quit: Textual IRC Client: www.textualapp.com]
whysthatso has quit [Quit: whysthatso]
mikecmpbll has quit [Quit: inabit. zz.]
icarus has quit [Ping timeout: 250 seconds]
<orbyt_> Will SecureRandom.urlsafe_base64 always return a String of the same length?
bsliger has quit [Quit: Unexpected Signal 11]
uplime has joined #ruby
<havenwood> orbyt_: no - it may or may not have padding
pharma_joe has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<havenwood> (an "=")
<havenwood> orbyt_: def urlsafe_base64(n=nil, padding=false)
<havenwood> orbyt_: also the first argument will determine the number of bytes
<havenwood> orbyt_: (the default for random_bytes is 16)
<orbyt_> i'm using the default method.
<havenwood> orbyt_: then, yes
<orbyt_> havenwood To be clear, it will return a constant length unless otherwise specified via the methods arguments
<orbyt_> correct?
<havenwood> orbyt_: yes
<havenwood> orbyt_: 22
<orbyt_> Cool, thanks
<orbyt_> yup
dviola has quit [Ping timeout: 245 seconds]
postmodern has joined #ruby
moei has quit [Quit: Leaving...]
orbyt_ has quit [Quit: Textual IRC Client: www.textualapp.com]
granttrec has left #ruby ["ERC (IRC client for Emacs 24.5.1)"]
RattyWork has quit [Remote host closed the connection]
icarus has joined #ruby
<cthulchu> not magic equals is !===?
<cthulchu> will irb it
<cthulchu> crap, Ruby!
kurko_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<cthulchu> why isn't there !== or !===?
<cthulchu> when left side DOESNT *magic* the right?
<cthulchu> I know why!
<cthulchu> cuz !(/.*flush.*/ === "flush keep") does the trick!
<uplime> isn't /.*flush.*/ the same as just /flush/ ?
venmx has quit [Ping timeout: 268 seconds]
<cthulchu> it's the same
<cthulchu> but I want to be explicit about what I expect to see
<havenwood> cthulchu: /flush/ is explicit, but less noise
<cthulchu> it may be explicit to you
<cthulchu> it's not explicit enough to me
<havenwood> cthulchu: Regexp is pretty universal, and unanchored. It's probably best to get used to that.
johnny56 has quit [Ping timeout: 272 seconds]
<cthulchu> I got used to using .* everywhere where I mean it
<cthulchu> doesn't harm productivity
<havenwood> cthulchu: Do you prepend + to positive numbers? :P
<havenwood> +42
<cthulchu> I see your point
<havenwood> cthulchu: I like your focus on readability. I do disagree on this one.
<cthulchu> it's a bad habit. I'll try to get rid of it. Thanks
Rapture has quit [Quit: Textual IRC Client: www.textualapp.com]
uplime has quit [Ping timeout: 252 seconds]
<havenwood> cthulchu: I really rarely use === directly. I think that tendency to only use it indirectly is probably the reason there's no !==.
<cthulchu> what is directly?
<cthulchu> or indirectly
<havenwood> directly: Integer === 42
nicesignal has joined #ruby
<cthulchu> and indirectly?
<havenwood> indirectly: case 42; when Integer
<cthulchu> errr
<cthulchu> but your indirect usage has no ===
<havenwood> cthulchu: That's true, but under the hood it's implicitly using ===.
<cthulchu> really?
<havenwood> cthulchu: Same with: [1, 2, 3].all?(Integer)
<cthulchu> wow
<cthulchu> cool
<cthulchu> I thought that black magic was just for kids to play with
johnaj has joined #ruby
marmotini_ has quit [Ping timeout: 252 seconds]
<havenwood> cthulchu: So when I define ===, I mean it to be used implicitly, indirectly - through either a case statement or predicate enumerable or some such way.
<cthulchu> nah, I find === too comfortable to use it indirectly
<cthulchu> also I'm the user of my software
<havenwood> cthulchu: The indirect use is what it's meant for. You're enabling powerful pattern matching.
<cthulchu> so if I see that explicit usage of === harms me, I'll rewrite it
<cthulchu> till now it was super comfy
<cthulchu> yeah, I know
<cthulchu> I know it's a lot more powerful than what I use it for
<havenwood> cthulchu: If you're going to use it explicitly, just consider if there's a more straightforward way to say what you're meaning.
<cthulchu> and it probably creates tons of potential bugs, but I'm the only consumer, so it's fine
<cthulchu> I'm not looking for straightforwardnes really. I look for speed and comfort
<havenwood> cthulchu: It's worth remembering the implicit use case, anyhow. It can be really nice from time to time.
<havenwood> cthulchu: I'd be curious how you're using it?
<havenwood> I do see it used explicitly in code in the wild from time to time.
<cthulchu> I write tests and so my testing function accepts strings to comare them with what happens in real life, but sometimes I wanna pass a regex instead of a string when it becomes a bit dynamic
<havenwood> cthulchu: Ahh
<cthulchu> I surely could check the type and then do regex match instead of == if the variable's type is regex, but === is so comfy
Azure|dc has quit [Read error: Connection reset by peer]
noobineer has joined #ruby
<baweaver> cthulchu: Explicitly using it is hard to read. You're going to be reading code more often than you write it, so be nice to future cthulchu
<baweaver> Now if you want to know what else it can do - https://medium.com/rubyinside/triple-equals-black-magic-d934936a6379
<cthulchu> I know
<cthulchu> it's pretty powerful
<baweaver> Want to see some real black magic that's done almost entirely by using === ?
<cthulchu> sure
ivanskie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<cthulchu> interesting
<cthulchu> is it heavy on resources?
<cthulchu> I suspect === is super vicious
<baweaver> Not especially.
<cthulchu> wow
<cthulchu> what is vanilla though
<cthulchu> ah
<cthulchu> I didn't know there was vanilla pattern matching
<baweaver> How you'd write it normally in Ruby
<baweaver> There's not
<cthulchu> hm
<cthulchu> and both Qo and Vanilla have the same complexity?
<baweaver> If you want a super advanced article, it _has_ gotten to within 10-20% of base Ruby speed.
wojnar has quit [Remote host closed the connection]
<cthulchu> same complexity?
<baweaver> Define complexity.
<cthulchu> O
<cthulchu> I guess for array*array it would be O(n^2)
Azure has joined #ruby
<baweaver> O(n) vs O(1) normally.
<baweaver> It'd be O(n) for vanilla in that case
<baweaver> Though Qo also uses == first.
<cthulchu> I'm asking if the comlexity for both is the same
<cthulchu> cuz if I do O(n^2) in vanilla and then O(n) in Qo, then I can't compare them
<baweaver> ...?
<cthulchu> the complexity of the algos you compare should be the same to be able to compare them
<cthulchu> or rather compare the implementation
<baweaver> That's... off
<baweaver> You can compare a bubble sort with a quick or merge sort
<cthulchu> ok, anyway
<baweaver> Different complexities, same task
<cthulchu> you can, but you won't compare their benchmarks
<cthulchu> you will compare their Os
<cthulchu> if you go down to benchmarks, you assume the Os are the same
<baweaver> The question becomes is it a big enough difference to matter.
<cthulchu> not really
<baweaver> Pretty much.
<cthulchu> the question is what was your vanilla
<cthulchu> was it comparable or not
<cthulchu> if it has a different complexity then it's ridiculous to compare them
<cthulchu> yes, and so I asked a question instead of reading the implementation
<baweaver> The implementation is the answer.
<cthulchu> meh
<baweaver> Also I'd compare and benchmark things which don't have the same complexity to see where improvements can be made.
<cthulchu> well I guess so
<baweaver> Mostly for historical reasons of there's finally a way that exists to make this crop down one O rank
<cthulchu> if the complexity difference is not obvious
discopatrick has quit [Quit: Connection closed for inactivity]
<baweaver> right now, without using Eval to change the syntax tree there's not.
<cthulchu> what I'm saying is if you want to test your implementation effectiveness, you should make sure the thing you test it with has identical complexity
<cthulchu> cuz if it doesn't, then you're cheating
pharma_joe has joined #ruby
<baweaver> I do, though there are ways to write things in Ruby to drop it an O level
<baweaver> and I would not call that cheating
<baweaver> I'd call it showing the fully optimized fastest way to write something
<baweaver> Though more times than not those are really ugly
<cthulchu> really?
<cthulchu> dropping complexity always seems very cool to me
timeless has joined #ruby
<cthulchu> even if it looks overthought
<timeless> can someone suggest a place where i can ask questions about `middleman`?
<baweaver> Where the set size is less than 1000 it often doesn't matter to do so.
<cthulchu> also I noticed that really polished solutions look very clean
<cthulchu> oh sure
<cthulchu> but if you're making a library, you want to make it as efficient as possible
<cthulchu> cuz you don't know what it's gonna be applied to
<baweaver> timeless: You could ask here, though you might check their site to see if they have any official resources.
<baweaver> cthulchu Hence the benchmark suite to remind me of that.
<cthulchu> like gitter
<cthulchu> right
<timeless> baweaver: thanks
<baweaver> I know in some cases Qo ranks up an O level, but the types of things I would have to do to change that may be really really dirty or introduce security concerns.
<cthulchu> a level is what? log(n)?
<baweaver> O(1) -> O(n) -> O(log(n)) -> ...
<cthulchu> errr
<cthulchu> are you sure about that?
<cthulchu> n>logn
<cthulchu> but yeah, I got the idea
<cthulchu> good chat, thanks
<cthulchu> gonna go home :)
Azure has quit [Read error: Connection reset by peer]
ur5us has joined #ruby