« Back to channel list

#ruby - 18 October 2018

« Back 1 day Forward 1 day »
[04:30:36] helpa: has joined #ruby
[04:34:05] apeiros: has joined #ruby
[04:47:32] eckhardt: has joined #ruby
[05:06:03] johnny56: has joined #ruby
[05:13:39] reber: has joined #ruby
[05:28:10] apeiros: has joined #ruby
[05:32:43] tAn: has joined #ruby
[05:50:55] za1b1tsu: has joined #ruby
[05:51:00] dellavg_: has joined #ruby
[05:56:09] jetchisel: has joined #ruby
[06:05:43] apeiros: has joined #ruby
[06:17:01] tAn: has joined #ruby
[06:19:10] tuor: has joined #ruby
[06:19:49] Dbugger: has joined #ruby
[06:22:36] aufi: has joined #ruby
[06:35:15] snickers: has joined #ruby
[06:36:02] Cthulu201: has joined #ruby
[06:36:43] DoubleMalt: has joined #ruby
[06:39:54] venmx: has joined #ruby
[06:57:11] Fusl: has joined #ruby
[06:58:41] aupadhye: has joined #ruby
[06:59:58] leafyleong: has joined #ruby
[07:08:30] clemens3_: has joined #ruby
[07:09:34] Tempesta: has joined #ruby
[07:19:27] tAn: has joined #ruby
[07:32:57] nowhere_man: has joined #ruby
[07:56:40] GodFather: has joined #ruby
[08:02:38] prillian5: has joined #ruby
[08:03:08] mikecmpbll: has joined #ruby
[08:03:09] prillian5: Hi, I'm a ruby noob and trying to setup fastlane (an ruby-application).
[08:03:28] prillian5: My problem is not with fastlane itself, but to understand the way to install ruby apps
[08:03:50] prillian5: I use Linux, so I can do "gem install" or "sudo gem install"
[08:04:34] prillian5: sudo installs the application to /root/.gem/ruby/2.5.0/gems/ ... without sudo to /user/.gem/ruby/2.5.0
[08:05:03] prillian5: How can I install an ruby-application globally for all users without the need of sudo if I call the app?
[08:06:06] ur5us: has joined #ruby
[08:08:14] schneider: has joined #ruby
[08:09:31] lxsameer: has joined #ruby
[08:10:45] ua: has joined #ruby
[08:12:18] teclator: has joined #ruby
[08:14:43] wojnar: has joined #ruby
[08:16:54] mikecmpb_: has joined #ruby
[08:20:13] blackmesa: has joined #ruby
[08:26:05] venmx: has joined #ruby
[08:26:23] stooj: has joined #ruby
[08:26:31] RedNifre: has joined #ruby
[08:33:22] nowhere_man: has joined #ruby
[08:41:34] qolq: has joined #ruby
[08:58:20] MoritaShinobu: has joined #ruby
[09:10:43] ur5us: has joined #ruby
[09:19:01] MyMind: has joined #ruby
[09:21:33] phaul: has joined #ruby
[09:28:57] djellemah: has joined #ruby
[09:35:34] iMadper: has joined #ruby
[09:36:43] phaul: has joined #ruby
[09:48:38] phaul: has joined #ruby
[10:02:25] whysthatso: has joined #ruby
[10:19:34] roshanavand: has joined #ruby
[10:28:44] ur5us: has joined #ruby
[10:38:37] z3uS: has joined #ruby
[10:42:23] whysthatso: has joined #ruby
[10:50:18] kapil____: has joined #ruby
[10:56:05] apparition: has joined #ruby
[10:57:52] kurko_: has joined #ruby
[10:59:54] za1b1tsu: has joined #ruby
[11:10:02] leafyleong: has joined #ruby
[11:27:29] leah2: is the 2.5.2 tarball broken?
[11:27:39] leah2: masterdir/builddir/ruby-2.5.2/tool/config.sub -> ../.downloaded-cache/config.sub
[11:27:43] leah2: but that dir doesnt exist
[11:30:14] z3uS: has joined #ruby
[11:33:49] marmotini_: has joined #ruby
[11:38:33] FireBurn: has joined #ruby
[11:38:58] FireBurn: Was Ruby 2.5.3 just released?
[11:39:20] FireBurn: https://github.com/ruby/ruby/commit/c38a183032a7826df1adabd8aa0725c713d53e1c
[11:39:44] leah2: makes sense
[11:39:57] leah2: 2.5.2 is broken :P
[11:41:31] FireBurn: Doesn't look like much changed bar the patch version, were the tarballs messed up?
[11:41:43] leah2: 13:27:28 <leah2> is the 2.5.2 tarball broken?
[11:41:44] leah2: 13:27:38 <leah2> masterdir/builddir/ruby-2.5.2/tool/config.sub ->
[11:41:46] leah2: ../.downloaded-cache/config.sub
[11:43:50] discopatrick: has joined #ruby
[11:44:41] za1b1tsu: has joined #ruby
[11:45:59] RedNifre: has joined #ruby
[11:54:32] nertzy: has joined #ruby
[11:55:00] cd: has joined #ruby
[11:56:48] johnaj: has joined #ruby
[11:57:54] johnaj: Is there any way for a block to call itself again?
[11:59:03] AJA4350: has joined #ruby
[12:03:45] InfinityFye: has joined #ruby
[12:05:48] ShekharReddy: has joined #ruby
[12:14:43] roshanavand: has joined #ruby
[12:17:34] xfbs: has joined #ruby
[12:51:12] lupine: has joined #ruby
[12:56:34] lxsameer: has joined #ruby
[13:03:29] RougeR: has joined #ruby
[13:03:35] RougeR: any ideas why i am getting: ! Unable to load application: NameError: uninitialized constant ActiveRecord
[13:03:40] RougeR: in my application
[13:09:38] tbuehlmann: RougeR: can you gist the whole stacktrace to that error?
[13:10:19] rafadc: has joined #ruby
[13:14:51] RougeR: tbuehlmann, sure
[13:15:09] RougeR: its happened in my sinatra application. when i added a few new files to the api dir
[13:17:20] RougeR: tbuehlmann, im not logged into github on here. but here is a pastebin
[13:17:24] RougeR: i know the bot will shout at me
[13:17:25] RougeR: https://pastebin.com/wmcWmCG5
[13:17:25] ruby[bot]: RougeR: as I told you already, please use https://gist.github.com
[13:18:11] RougeR: tbuehlmann, ^
[13:18:30] 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
[13:19:01] RougeR: yeah it does
[13:19:12] RougeR: and its always worked untill i added these last set of changes
[13:19:51] tbuehlmann: what changed?
[13:21:21] RougeR: emmm, a fair bit. but the issues have got to be in one of two files
[13:21:32] RougeR: im adding resque task scheduling
[13:23:55] RougeR: tbuehlmann, id just paste up the source, but its work stuff so eh
[13:23:58] tbuehlmann: where do you require active record and is that file loaded before requiring the job.rb file?
[13:24:14] RougeR: tbuehlmann, im not sure. i suspect not tbh
[13:24:27] RougeR: im going to try requiring it in config.ry
[13:24:51] RougeR: hmm, im already doing that
[13:25:51] abf_: has joined #ruby
[13:32:44] tbuehlmann: are you certain you're requiring active record before requiring the job?
[13:33:18] RougeR: if require 'active_record' is at the top of all the pages
[13:33:24] RougeR: then i would think so, no?
[13:33:47] RougeR: ive tried inheritting from active record and requiring it
[13:37:03] RougeR: tbuehlmann, job and settings are the AR classes im interacting with
[13:38:34] 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
[13:39:01] nowhereman: has joined #ruby
[13:41:35] JusticeFries: has joined #ruby
[13:45:11] bauruine: has joined #ruby
[13:45:12] jhass: johnaj: call redo
[13:46:09] Guest1392: has joined #ruby
[13:49:34] akemot: has joined #ruby
[13:54:03] Guest19970: has joined #ruby
[13:55:22] Nicmavr: has joined #ruby
[14:07:09] samort7: has joined #ruby
[14:09:44] kapil____: has joined #ruby
[14:09:50] mikecmpbll: has joined #ruby
[14:11:31] marmotini_: has joined #ruby
[14:13:12] leafyleong: has joined #ruby
[14:14:19] Nicmavr: has joined #ruby
[14:23:04] Azure: has joined #ruby
[14:35:37] za1b1tsu_: has joined #ruby
[14:50:46] Azure: has joined #ruby
[14:53:43] nowhere_man: has joined #ruby
[15:08:33] orbyt_: has joined #ruby
[15:10:54] knight33: has joined #ruby
[15:16:08] jecht: has joined #ruby
[15:29:43] RattyWork: has joined #ruby
[15:30:53] snickers: has joined #ruby
[15:34:32] RedNifre: has joined #ruby
[15:37:09] Rapture: has joined #ruby
[15:52:01] jcarl43: has joined #ruby
[16:05:53] d10n-work: has joined #ruby
[16:15:04] apeiros: has joined #ruby
[16:22:53] tdy: has joined #ruby
[16:23:01] RougeR: has anyone done work with resque-scheduler before
[16:23:24] RougeR: the documentation for the dynamic schedules bit is crap
[16:23:39] RougeR: im trying to require 'resque-scheduler'
[16:23:46] RougeR: but it just screams and cant load it
[16:35:29] beowuff: has joined #ruby
[16:36:40] johnaj: jhass, I'd like to call the block again with different arguments -- can "redo" do that?
[16:36:56] johnaj: also, thanks for your suggestion :-)
[16:38:34] 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
[16:39:54] johnaj: Hm ... this isn't xy, I specifically want to create a recursive block.
[16:41:11] jhass: like for the sake of it?
[16:41:13] johnaj: Like this: { |x| call_same_with(x+1) }, if call_same_with were to call the block itself again.
[16:41:22] johnaj: Yes, I would find it useful
[16:41:54] johnaj: Named recursive methods are useful, so would "unnamed" ones be
[16:42:09] jhass: essentially, the distinction between a block and a proc is that the block is fully anonymous
[16:42:19] jhass: you can make a recursive proc
[16:42:58] jhass: x = -> { x.call }
[16:42:59] GodFather: has joined #ruby
[16:43:39] johnaj: Aha! That's probably the functionality that I'm looking for. Thank you! I'll see whether I end up using it :-)
[16:44:17] 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) }
[16:44:24] jhass: I never needed any of that in the real world
[16:46:36] johnaj: Is there a way for the proc to call itself without referring to x? Would self.call work?
[16:49:33] tAn: has joined #ruby
[16:50:48] johnaj: okay, thanks for clarifying
[16:55:15] ivanskie: has joined #ruby
[17:19:23] Guest15477: has joined #ruby
[17:19:33] Guest15477: wtffffffffffffffffffff
[17:21:58] doubledup: has joined #ruby
[17:23:07] akaiiro: has joined #ruby
[17:23:45] tAn: has joined #ruby
[17:25:10] conta1: has joined #ruby
[17:33:04] sameerynho: has joined #ruby
[17:33:46] whysthatso: has joined #ruby
[17:36:43] JusticeFries: has joined #ruby
[17:38:42] TheBrayn: is something currently weird with rubygems.org or is it just me? https://gist.github.com/mmerfort/bc0f6e214dca2e061e87815e05769084
[17:39:19] havenwood: TheBrayn: I'm not seeing any issues.
[17:41:43] RedNifre: has joined #ruby
[17:42:23] akaiiro: has joined #ruby
[17:53:54] eckhardt: has joined #ruby
[17:58:33] mikecmpbll: has joined #ruby
[17:58:39] im0nde: has joined #ruby
[18:00:48] kujira: has joined #ruby
[18:01:58] kujira: has joined #ruby
[18:05:19] apeiros: has joined #ruby
[18:06:28] Dbugger: has joined #ruby
[18:14:17] kent\n: has joined #ruby
[18:20:44] Azure: has joined #ruby
[18:31:47] doubledup: has joined #ruby
[18:35:00] mikecmpbll: has joined #ruby
[18:41:50] mikecmpb_: has joined #ruby
[18:44:02] mikecmpbll: has joined #ruby
[18:52:40] whysthatso: has joined #ruby
[19:02:58] mikecmpbll: has joined #ruby
[19:05:45] raulp: has joined #ruby
[19:06:39] akaiiro: has joined #ruby
[19:23:29] venmx: has joined #ruby
[19:32:59] dinfuehr: has joined #ruby
[19:33:25] al2o3-cr: has joined #ruby
[19:41:44] Azure|dc: has joined #ruby
[19:54:49] samort7: has joined #ruby
[20:09:12] RougeR: has joined #ruby
[20:14:13] tdy: has joined #ruby
[20:33:40] ramfjord: has joined #ruby
[20:41:57] cthulchu: RUUUUUUUBYYYYY!
[20:43:25] RougeR: has joined #ruby
[20:49:29] samort7: has joined #ruby
[20:51:56] justicef_: has joined #ruby
[20:52:50] kurko_: has joined #ruby
[21:04:27] rwb: has joined #ruby
[21:12:07] RougeR: need helpwith something? cthulchu
[21:12:35] cthulchu: well I thought so... But it's not worth asking
[21:15:09] cthulchu: I want to measure performance of one my functions
[21:15:26] cthulchu: I'm gonna just do start = Time.now() in the beginning
[21:15:44] cthulchu: and then puts start-Time.now() at the end
[21:15:54] cthulchu: yeah, benchmark
[21:16:04] cthulchu: should work
[21:16:09] baweaver: No, like the Ruby feature Benchmark
[21:16:33] baweaver: https://blog.appsignal.com/2018/02/27/benchmarking-ruby-code.html
[21:17:08] baweaver: That should give you a place to start
[21:17:23] baweaver: Now off I go to get coffee and interview peoples
[21:17:26] cthulchu: but looks like a lot more syntax than what I have
[21:17:47] cthulchu: when I need to benchmark something smaller, I'll do benchmark
[21:32:54] SeepingN: has joined #ruby
[21:33:17] dviola: has joined #ruby
[21:37:23] JusticeFries: has joined #ruby
[21:39:03] wojnar: has joined #ruby
[21:42:26] jcalla: has joined #ruby
[21:52:47] icarus: has joined #ruby
[21:54:58] pharma_joe: has joined #ruby
[21:55:52] granttrec: has joined #ruby
[21:57:27] 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 :')
[21:57:52] granttrec: readable sytax I should say
[21:57:59] cthulchu: I prefer python's syntax
[21:58:21] cthulchu: I still hate how ruby has different ways to mark differnt blocks
[21:58:40] cthulchu: sometimes you can use {}, sometimes it's def-end or if-end
[21:58:50] cthulchu: but I got used to it. kinda.
[21:59:24] 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
[21:59:42] cthulchu: yes, ruby has immense amount of magic
[21:59:49] cthulchu: I have never seen so much magic
[21:59:55] cthulchu: it scares me a bit
[22:01:17] 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
[22:01:37] granttrec: also the "pure" object oriented nature is great
[22:02:08] granttrec: a lot better than java/c++ for sure
[22:02:39] cthulchu: faster coding - yes
[22:02:49] cthulchu: there are certain tradeoffs
[22:02:58] cthulchu: but yeah, I appreciate the speed too
[22:03:37] granttrec: I was speaking specifically about the object oriented nature
[22:03:56] granttrec: each lang has its own benefits, and I've learned multiligualism is key
[22:04:01] cthulchu: tbh, I love Java's OOP implementation
[22:04:09] cthulchu: and how reliable it is
[22:04:30] cthulchu: I don't imagine coding similar low-level stuff in Ruby
[22:05:09] cthulchu: just take a look at proper implementation of static in Ruby
[22:05:19] cthulchu: first of all, Ruby doesn't seem to fully realize what static is
[22:05:35] cthulchu: and then when you see the proper implementation of static... it's hell.
[22:05:47] cthulchu: I still use the @@ shortcut for static vars
[22:06:43] cthulchu: also protection isn't the thing in Ruby. so if something is Private, you still can do whatever you want with it :)
[22:06:50] cthulchu: it's kinda relaxing
[22:07:19] 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
[22:07:56] granttrec: i'm still new to ruby so Ill run into that at some point
[22:13:12] orbyt_: Will SecureRandom.urlsafe_base64 always return a String of the same length?
[22:18:54] uplime: has joined #ruby
[22:18:57] havenwood: orbyt_: no - it may or may not have padding
[22:19:36] havenwood: orbyt_: def urlsafe_base64(n=nil, padding=false)
[22:20:02] havenwood: orbyt_: also the first argument will determine the number of bytes
[22:20:11] havenwood: orbyt_: (the default for random_bytes is 16)
[22:20:37] orbyt_: i'm using the default method.
[22:20:53] havenwood: orbyt_: then, yes
[22:21:28] orbyt_: havenwood To be clear, it will return a constant length unless otherwise specified via the methods arguments
[22:22:16] havenwood: orbyt_: yes
[22:22:24] orbyt_: Cool, thanks
[22:29:06] postmodern: has joined #ruby
[22:37:25] granttrec: has left #ruby: ("ERC (IRC client for Emacs 24.5.1)")
[22:40:08] icarus: has joined #ruby
[22:57:03] cthulchu: not magic equals is !===?
[22:57:55] cthulchu: will irb it
[22:58:12] cthulchu: crap, Ruby!
[22:58:37] cthulchu: why isn't there !== or !===?
[22:58:58] cthulchu: when left side DOESNT *magic* the right?
[22:59:49] cthulchu: I know why!
[22:59:53] cthulchu: cuz !(/.*flush.*/ === "flush keep") does the trick!
[23:00:34] uplime: isn't /.*flush.*/ the same as just /flush/ ?
[23:03:59] cthulchu: it's the same
[23:04:09] cthulchu: but I want to be explicit about what I expect to see
[23:04:59] havenwood: cthulchu: /flush/ is explicit, but less noise
[23:05:15] cthulchu: it may be explicit to you
[23:05:20] cthulchu: it's not explicit enough to me
[23:06:09] havenwood: cthulchu: Regexp is pretty universal, and unanchored. It's probably best to get used to that.
[23:06:38] cthulchu: I got used to using .* everywhere where I mean it
[23:06:47] cthulchu: doesn't harm productivity
[23:06:59] havenwood: cthulchu: Do you prepend + to positive numbers? :P
[23:07:23] cthulchu: I see your point
[23:07:35] havenwood: cthulchu: I like your focus on readability. I do disagree on this one.
[23:07:36] cthulchu: it's a bad habit. I'll try to get rid of it. Thanks
[23:08:58] havenwood: cthulchu: I really rarely use === directly. I think that tendency to only use it indirectly is probably the reason there's no !==.
[23:09:51] cthulchu: what is directly?
[23:09:54] cthulchu: or indirectly
[23:10:11] havenwood: directly: Integer === 42
[23:10:18] nicesignal: has joined #ruby
[23:10:27] cthulchu: and indirectly?
[23:10:29] havenwood: indirectly: case 42; when Integer
[23:10:52] cthulchu: but your indirect usage has no ===
[23:11:21] havenwood: cthulchu: That's true, but under the hood it's implicitly using ===.
[23:11:35] havenwood: cthulchu: Same with: [1, 2, 3].all?(Integer)
[23:11:58] cthulchu: I thought that black magic was just for kids to play with
[23:12:05] johnaj: has joined #ruby
[23:12:19] 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.
[23:12:41] cthulchu: nah, I find === too comfortable to use it indirectly
[23:12:50] cthulchu: also I'm the user of my software
[23:13:04] havenwood: cthulchu: The indirect use is what it's meant for. You're enabling powerful pattern matching.
[23:13:04] cthulchu: so if I see that explicit usage of === harms me, I'll rewrite it
[23:13:09] cthulchu: till now it was super comfy
[23:13:21] cthulchu: yeah, I know
[23:13:37] cthulchu: I know it's a lot more powerful than what I use it for
[23:13:54] 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.
[23:14:01] cthulchu: and it probably creates tons of potential bugs, but I'm the only consumer, so it's fine
[23:14:25] cthulchu: I'm not looking for straightforwardnes really. I look for speed and comfort
[23:14:37] havenwood: cthulchu: It's worth remembering the implicit use case, anyhow. It can be really nice from time to time.
[23:14:38] havenwood: cthulchu: I'd be curious how you're using it?
[23:14:58] havenwood: I do see it used explicitly in code in the wild from time to time.
[23:15:31] 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
[23:15:47] havenwood: cthulchu: Ahh
[23:16:04] 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
[23:20:22] noobineer: has joined #ruby
[23:25:13] 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
[23:26:10] baweaver: Now if you want to know what else it can do - https://medium.com/rubyinside/triple-equals-black-magic-d934936a6379
[23:28:02] cthulchu: it's pretty powerful
[23:28:26] baweaver: Want to see some real black magic that's done almost entirely by using === ?
[23:28:47] baweaver: https://github.com/baweaver/qo
[23:30:50] cthulchu: interesting
[23:30:56] cthulchu: is it heavy on resources?
[23:31:07] cthulchu: I suspect === is super vicious
[23:31:15] baweaver: https://github.com/baweaver/qo/blob/master/performance_report.txt
[23:31:19] baweaver: Not especially.
[23:31:42] cthulchu: what is vanilla though
[23:32:03] cthulchu: I didn't know there was vanilla pattern matching
[23:32:10] baweaver: How you'd write it normally in Ruby
[23:32:11] baweaver: There's not
[23:32:44] cthulchu: and both Qo and Vanilla have the same complexity?
[23:32:56] baweaver: If you want a super advanced article, it _has_ gotten to within 10-20% of base Ruby speed.
[23:32:59] baweaver: https://medium.com/@baweaver/qo-evil-dynamic-compilation-with-eval-f66f7a25fe77
[23:33:12] cthulchu: same complexity?
[23:33:21] baweaver: Define complexity.
[23:33:51] cthulchu: I guess for array*array it would be O(n^2)
[23:34:00] Azure: has joined #ruby
[23:34:10] baweaver: O(n) vs O(1) normally.
[23:34:14] baweaver: It'd be O(n) for vanilla in that case
[23:34:20] baweaver: Though Qo also uses == first.
[23:34:33] cthulchu: I'm asking if the comlexity for both is the same
[23:35:04] cthulchu: cuz if I do O(n^2) in vanilla and then O(n) in Qo, then I can't compare them
[23:35:49] cthulchu: the complexity of the algos you compare should be the same to be able to compare them
[23:35:59] cthulchu: or rather compare the implementation
[23:36:10] baweaver: That's... off
[23:36:16] baweaver: You can compare a bubble sort with a quick or merge sort
[23:36:26] baweaver: Different complexities, same task
[23:36:31] cthulchu: you can, but you won't compare their benchmarks
[23:36:35] cthulchu: you will compare their Os
[23:36:47] cthulchu: if you go down to benchmarks, you assume the Os are the same
[23:37:32] baweaver: The question becomes is it a big enough difference to matter.
[23:37:44] baweaver: Pretty much.
[23:37:47] cthulchu: the question is what was your vanilla
[23:37:54] cthulchu: was it comparable or not
[23:38:09] cthulchu: if it has a different complexity then it's ridiculous to compare them
[23:38:11] baweaver: https://github.com/baweaver/qo/blob/master/Rakefile#L46
[23:38:32] cthulchu: yes, and so I asked a question instead of reading the implementation
[23:39:46] baweaver: The implementation is the answer.
[23:40:21] baweaver: Also I'd compare and benchmark things which don't have the same complexity to see where improvements can be made.
[23:40:50] cthulchu: well I guess so
[23:40:58] baweaver: Mostly for historical reasons of there's finally a way that exists to make this crop down one O rank
[23:40:58] cthulchu: if the complexity difference is not obvious
[23:41:23] baweaver: right now, without using Eval to change the syntax tree there's not.
[23:41:48] 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
[23:41:57] cthulchu: cuz if it doesn't, then you're cheating
[23:42:14] pharma_joe: has joined #ruby
[23:42:42] baweaver: I do, though there are ways to write things in Ruby to drop it an O level
[23:42:47] baweaver: and I would not call that cheating
[23:42:57] baweaver: I'd call it showing the fully optimized fastest way to write something
[23:43:18] baweaver: Though more times than not those are really ugly
[23:44:41] cthulchu: dropping complexity always seems very cool to me
[23:44:49] timeless: has joined #ruby
[23:44:50] cthulchu: even if it looks overthought
[23:44:59] timeless: can someone suggest a place where i can ask questions about `middleman`?
[23:45:34] baweaver: Where the set size is less than 1000 it often doesn't matter to do so.
[23:45:37] cthulchu: also I noticed that really polished solutions look very clean
[23:46:00] cthulchu: but if you're making a library, you want to make it as efficient as possible
[23:46:08] cthulchu: cuz you don't know what it's gonna be applied to
[23:46:10] baweaver: timeless: You could ask here, though you might check their site to see if they have any official resources.
[23:46:19] baweaver: cthulchu Hence the benchmark suite to remind me of that.
[23:46:22] cthulchu: like gitter
[23:47:03] timeless: baweaver: thanks
[23:47:12] 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.
[23:47:50] ruby[bot]: -bb $a:nine_milli$#ruby-banned nine_milli!*@*$#ruby-banned
[23:48:34] cthulchu: a level is what? log(n)?
[23:49:10] baweaver: O(1) -> O(n) -> O(log(n)) -> ...
[23:50:37] cthulchu: are you sure about that?
[23:51:08] cthulchu: but yeah, I got the idea
[23:51:13] cthulchu: good chat, thanks
[23:51:17] cthulchu: gonna go home :)
[23:57:47] ur5us: has joined #ruby