« Back to channel list

#ruby - 21 July 2017

« Back 1 day Forward 1 day »
[00:02:13] astrobunny: has joined #ruby
[00:02:43] emers2n: Awesome. Thanks @havenwood
[00:03:45] aaa: has joined #ruby
[00:06:08] veex: has joined #ruby
[00:06:34] tAn: has joined #ruby
[00:06:34] vinod: has joined #ruby
[00:08:07] veex: has left #ruby: ()
[00:08:10] veex: has joined #ruby
[00:12:08] RahulT: has joined #ruby
[00:13:35] PresidentBiscuit: has joined #ruby
[00:15:45] petruff: has joined #ruby
[00:15:53] tAn: has joined #ruby
[00:21:28] gothicsouth: has joined #ruby
[00:24:53] perniciouscaffei: has joined #ruby
[00:30:57] Hanmac: has joined #ruby
[00:32:47] jackjackdripper: has joined #ruby
[00:34:17] dcunit3d: has joined #ruby
[00:34:19] cagomez: has joined #ruby
[00:34:41] c-c: has joined #ruby
[00:39:13] inhwrb: has joined #ruby
[00:39:24] inhwrb: hi all i have a small sinatra app that works fine locally
[00:39:54] inhwrb: but for some reason it just shows "Internal Server Error" when I press a button on the actual production site
[00:40:11] havenwood: inhwrb: what do the prod logs show?
[00:40:19] inhwrb: ah i guess thats what i need
[00:40:40] inhwrb: was going to ask for a stack trace or something but i think if i search heroku ill be able to find out how to do that
[00:42:33] ecuanaso: has joined #ruby
[00:45:31] inhwrb: thanks havenwood lol im new to having something on prod
[00:45:38] inhwrb: was able to fix it after reading the logs
[00:46:08] inhwrb: although not sure why it was working locally and not on production
[00:46:25] inhwrb: basically just needed to use `https` instead of `http` in my API request
[00:50:32] bronson: has joined #ruby
[00:54:46] rundor: has joined #ruby
[00:54:48] enterprisey: has joined #ruby
[00:56:01] PresidentBiscuit: has joined #ruby
[01:00:57] mim1k: has joined #ruby
[01:01:39] jnollette: has joined #ruby
[01:02:51] astrobunny: has joined #ruby
[01:03:04] kculpis: has joined #ruby
[01:05:41] bambanx: has joined #ruby
[01:06:24] brent__: has joined #ruby
[01:07:24] juggler: has joined #ruby
[01:10:55] bruno-: has joined #ruby
[01:14:14] Rodya_: has joined #ruby
[01:25:26] __Yiota: has joined #ruby
[01:26:47] ElFerna: has joined #ruby
[01:28:39] Ropeney: has joined #ruby
[01:32:10] gothicsouth: has joined #ruby
[01:32:21] dcunit3d: has joined #ruby
[01:32:22] Jameser: has joined #ruby
[01:34:10] cschneid_: has joined #ruby
[01:39:47] PresidentBiscuit: has joined #ruby
[01:40:49] gizmore|2: has joined #ruby
[01:46:04] ElFerna: has joined #ruby
[01:46:11] dcunit3d: has joined #ruby
[01:48:41] d^sh: has joined #ruby
[01:50:04] cdg: has joined #ruby
[01:50:07] iMadper`: has joined #ruby
[01:51:42] bronson: has joined #ruby
[01:55:14] Jameser`: has joined #ruby
[01:58:47] jenrzzz: has joined #ruby
[01:59:51] digitalnomad: has joined #ruby
[02:03:29] aaas: has joined #ruby
[02:03:34] astrobunny: has joined #ruby
[02:05:20] runescape07rsps: has joined #ruby
[02:06:12] GodFather: has joined #ruby
[02:06:36] digitalnomad: has joined #ruby
[02:06:47] bruno-: has joined #ruby
[02:12:12] _whitelogger: has joined #ruby
[02:12:12] Arahael: In ruby, how do I provide a 'default block'? Eg, def foo(b = {|| true})
[02:12:14] astrobunny: has joined #ruby
[02:13:29] Radar: arahael: I don't think that is possible.
[02:13:56] Arahael: Hmm, so a workaround would be to set it to nil by default, and handle that case?
[02:14:23] Radar: Let me fiddle some more.
[02:15:13] Radar: It's possible to do it using Proc.new.
[02:15:29] Radar: At least, I think so
[02:16:20] Rodya_: has joined #ruby
[02:16:21] Arahael: Hmm, that's weird, I can't seem to do 'foo = {true}' either.
[02:16:39] ElFerna: has joined #ruby
[02:16:41] Radar: https://gist.github.com/radar/b860fce3c7a09030385a6509380803d2
[02:17:08] matthewd: def foo(&b); b ||= lambda { true }; ..; end
[02:17:31] matthewd: ^ I think that's what you want
[02:18:13] Arahael: matthewd: Close - turns out there's something funky with the {}'s. (I think it's just syntatic sugar?) Anyway, I've got it going with: def foo(b = lambda {true})
[02:19:09] matthewd: Depends how you want to call it when you do pass a block
[02:19:41] Arahael: matthewd: If I do provide the block, I've specified the argument, surely?
[02:20:42] robouk: has joined #ruby
[02:23:43] Radar: arahael: some Real Code™ might be helpful here... something around an actual rather than theoretical problem. We might come up with a different solution altogether.
[02:27:16] ecuanaso: has joined #ruby
[02:27:47] Arahael: Radar: I wrote to a logfile (using log4r), and have launched another application; I want to read those log entries written to by that application.
[02:27:55] xathereal: has joined #ruby
[02:28:01] Arahael: Radar: I'd use it's stdout, if I had access to it. :(
[02:28:22] robouk: has joined #ruby
[02:29:13] Ropeney: has joined #ruby
[02:29:28] Arahael: Radar: I'm not sure you *want* the Real CodeTM (involving ShellExecute). ;)
[02:29:40] xathereal: Heya :D Could someone point me to the documentation for the functions on files are? i.e. The docs on the return type of `File.open(filename)`? Thank you in advance!
[02:30:04] Arahael: xathereal: https://ruby-doc.org/core-2.3.1/IO.html#method-c-open
[02:31:03] xathereal: So when the docs say `File.open() -> file`, that file is an IO type?
[02:31:52] Arahael: xathereal: Are you concerned that it isn't?
[02:32:03] Arahael: xathereal: I mean, what would you do if it isn't?
[02:32:07] xathereal: I'm just trying to connect the dots :)
[02:33:10] xathereal: I'm new, just trying to work out how file and IO are connected.
[02:33:49] matthewd: >> File.superclass
[02:33:50] ruby[bot]: matthewd: # => IO (https://eval.in/835445)
[02:34:05] xathereal: matthewd: Thank you!!
[02:34:57] robouk: has joined #ruby
[02:35:32] Arahael: Hmm, seems that is_done = lambda {true} does not mean that is_done is a block
[02:44:46] gusrub: has joined #ruby
[02:51:01] Jameser: has joined #ruby
[02:52:33] bronson: has joined #ruby
[02:53:01] Arahael: In ruby on windows, how do I capture *all* stdout?
[02:53:09] Arahael: Even those from sub processes.
[02:53:35] smulverine: has joined #ruby
[02:55:21] ElFerna: has joined #ruby
[02:58:25] __Yiota: has joined #ruby
[03:00:47] charliesome: has joined #ruby
[03:01:15] mim1k: has joined #ruby
[03:05:49] Arahael: I need the output from a system(cmd) call, if I use Peopen, I need to provide an array as imput which worries me (as that will change the arguments)
[03:06:27] Arahael: Oh, popen does allow just a string, neat.
[03:07:12] dcunit3d: has joined #ruby
[03:09:07] hutch34_: has joined #ruby
[03:11:03] __Yiota: has joined #ruby
[03:15:41] emers2n: has joined #ruby
[03:21:07] TvL2386_: has joined #ruby
[03:22:08] __Yiota: has joined #ruby
[03:22:26] petto: has joined #ruby
[03:22:48] Arahael: How do I ensure that IO.popen results in the process's stderr and stdout to be readable?
[03:22:52] Arahael: They don't seem to be redirected.
[03:24:19] Arahael: The docs say that they can be read using the io object that's returned, but the io docs don't seem tod istinguish between regular read, and reading error streams.
[03:24:22] Arahael: It's only input, and output.
[03:24:56] jenrzzz: has joined #ruby
[03:25:45] Arahael: Ah, documented in Kernel#spawn
[03:31:41] Arahael: I've tried: IO.popen(cmd, :err=>:out) {|f| f.each_line {|line| puts line} }
[03:31:49] Arahael: But it's not correctly getting the output.
[03:38:56] theunraveler: has joined #ruby
[03:39:37] milardovich: has joined #ruby
[03:41:37] pwned: has joined #ruby
[03:42:35] dcunit3d: has joined #ruby
[03:43:36] duderonomy: has joined #ruby
[03:44:48] Arahael: Hmm, not a ruby issue, as it turns out - the command I'm running seems to have it's own, entirely distinct, idea of stdout and stderr.
[03:47:34] gix: has joined #ruby
[03:48:02] Ropeney: has joined #ruby
[03:49:21] ecuanaso: has joined #ruby
[03:51:15] rundor: has joined #ruby
[03:51:47] minimalism: has joined #ruby
[03:53:29] bronson: has joined #ruby
[03:54:39] jackjackdripper: has joined #ruby
[03:56:50] Moosashi: has joined #ruby
[03:58:34] Ropeney: has joined #ruby
[03:59:54] mim1k: has joined #ruby
[04:02:28] jenrzzz: has joined #ruby
[04:02:28] jenrzzz: has joined #ruby
[04:07:11] bambanx: has joined #ruby
[04:13:20] gulp-gulp: has joined #ruby
[04:14:18] baweaver: gulp-gulp: .: not enough arguments
[04:17:17] renchan: has joined #ruby
[04:17:48] Rodya_: has joined #ruby
[04:18:04] TinkerTyper: has joined #ruby
[04:19:11] milardovich: has joined #ruby
[04:22:57] gothicsouth: has joined #ruby
[04:26:21] uZiel: has joined #ruby
[04:27:41] renchan_: has joined #ruby
[04:27:56] jackjackdripper: has joined #ruby
[04:29:11] renchan__: has joined #ruby
[04:30:13] renchan__: has joined #ruby
[04:32:43] renchan: has joined #ruby
[04:33:07] cherry-pick-2: has joined #ruby
[04:36:26] rundor: has joined #ruby
[04:38:57] kies: has joined #ruby
[04:39:51] djbkd: has joined #ruby
[04:41:36] growp: has joined #ruby
[04:41:40] growp: has left #ruby: ()
[04:43:31] Arahael: I want to change the console output color fairly explicitly, but the 'ansi' gem seems out of date.
[04:43:37] growp: has joined #ruby
[04:43:39] growp: has left #ruby: ()
[04:43:45] Arahael: Is the 'ansi' gem still the best gem?
[04:44:51] matthewd: arahael: I don't know anything about it, but what makes you think it's out of date?
[04:45:34] Arahael: matthewd: Whenever I use it, it tells me to 'gem install win32console', though it still works regardless, despite that somewhat irritating message.
[04:46:30] Arahael: win32console, incidentially, is obsolete, as I understand it.
[04:49:17] matthewd: Hmm... maybe look through https://www.ruby-toolbox.com/categories/terminal_coloring
[04:50:10] Arahael: paint looks promising, thanks for that tip.
[04:50:50] matthewd: Note that they're in "popularity" order, for some value of popularity
[04:54:19] bronson: has joined #ruby
[04:56:54] Arahael: I need to avoid those that try to print directly to the console - I want my resulting strings themselves to have the ansi escape.
[04:57:02] Arahael: And I don't particularly like extension methods!
[04:57:13] Arahael: (Am I wierd like that?)
[04:59:14] dminuoso: Weird is what you would call me.
[04:59:34] Arahael: ACTION awaits the clarification.
[05:00:02] Radar: there's also the rainbow gem
[05:00:16] Radar: and maybe ansi is just done and not out of date?
[05:00:22] matthewd: Rainbow and colorize both seem to meet both of those criteria, and sound more widely used
[05:00:26] dminuoso: Radar, you didn't just.
[05:00:53] mjolnird: has joined #ruby
[05:01:10] Radar: dminuoso: oh yes he did
[05:01:22] matthewd: Radar: It's out of date because it's producing a warning that only applied before ruby 2.0
[05:03:29] andrzejku: has joined #ruby
[05:04:35] dminuoso: has left #ruby: ("Leaving")
[05:06:32] brent__: has joined #ruby
[05:11:41] grant: has joined #ruby
[05:13:03] guardianx: has joined #ruby
[05:18:45] Rodya_: has joined #ruby
[05:19:00] emers2n: has joined #ruby
[05:20:57] guardianxx: has joined #ruby
[05:21:51] high_fiver: has joined #ruby
[05:32:09] enterprisey: has joined #ruby
[05:35:15] high_fiver: has joined #ruby
[05:35:47] SeepingN: has joined #ruby
[05:38:37] kaizoku: has joined #ruby
[05:38:59] kaizoku: is ruby expected to use many levels of indentation? I often seem to end up with 5 or more when i write ruby
[05:39:05] kaizoku: this example code has 4 levels for instance: https://docs.ruby-lang.org/en/2.0.0/Net/HTTP.html#class-Net::HTTP-label-Streaming+Response+Bodies
[05:39:21] Radar: kaizoku: yes that is normal.
[05:39:36] Radar: It helps indicate that the code is inside of a block.
[05:40:10] hutch34_: has joined #ruby
[05:40:20] kaizoku: hmm, right, I'm used to writing C or python, where if there are so many levels of indentation, it indicates an issue with my program structure
[05:40:47] minimalism: has joined #ruby
[05:40:53] cam27: anyone know if doing brew upgrade in two seperate sessions will create duplicate files? cuase that’s what’s up right now...
[05:41:32] elomatreb: kaizoku: That many nested blocks like that probably are a codesmell, but in this specific circumstance there's probably little you can do about it
[05:42:00] matthewd: kaizoku: Deeply nested conditionals would still likely be worth closer investigation.. but ruby uses blocks for other things too (though there's still a point where you probably want to introduce a new method, say)
[05:42:02] elomatreb: Often you can extract stuff into methods, to avoid the indentation
[05:42:47] kaizoku: right matthewd , usually with C or python I end up adding more methods to alleviate excessive indentation, but in this case the blocks are so small that doesn't really make sense
[05:43:13] elomatreb: Another thing are module/class definitions, if you follow some styleguides that recommend not using the compact module/class style you can easily end up with a mess of indentation
[05:43:34] kaizoku: but I have to add custom headers to my requests in this case, so i need to use HTTP.start and Net::HTTP::Get objects
[05:43:41] anisha: has joined #ruby
[05:44:04] kaizoku: hmm, okay. thanks all
[05:44:11] elomatreb: You could have a write_file(response) method for example, to handle the open ... block
[05:44:29] stoffus: has joined #ruby
[05:46:50] andikr: has joined #ruby
[05:49:04] aufi: has joined #ruby
[05:55:09] bronson: has joined #ruby
[05:55:14] xuanrui: has joined #ruby
[05:59:05] sarmiena_: has joined #ruby
[05:59:22] Xiti: has joined #ruby
[06:00:37] Radar: kaizoku: You might want to look at using another gem for that, in particular rest-client and typhoeus are my two favourites
[06:01:15] kaizoku: Ah, thanks Radar
[06:04:49] Jameser`: has joined #ruby
[06:12:59] SuperL4g: has joined #ruby
[06:14:40] Administrator: has joined #ruby
[06:16:58] jenrzzz: has joined #ruby
[06:16:59] jenrzzz: has joined #ruby
[06:19:18] Rodya_: has joined #ruby
[06:20:28] dcunit3d: has joined #ruby
[06:28:44] KeyJoo: has joined #ruby
[06:29:07] claw: has joined #ruby
[06:32:15] gulp-gulp: has joined #ruby
[06:34:40] ramfjord: has joined #ruby
[06:36:09] digitalnomad: has joined #ruby
[06:45:22] charliesome: has joined #ruby
[06:46:00] anisha: has joined #ruby
[06:47:05] high_fiver: has joined #ruby
[06:56:00] bronson: has joined #ruby
[06:56:41] TomyWork: has joined #ruby
[06:56:50] RahulT: has joined #ruby
[07:01:59] uZiel: has joined #ruby
[07:07:11] sysvalve: has joined #ruby
[07:08:11] simmaniac: has joined #ruby
[07:11:38] hahuang61: has joined #ruby
[07:13:14] Arahael: Where's rubyforge?
[07:13:20] Arahael: Trying to find the docs for log4r. :(
[07:13:35] matthewd: The great big bit bucket in the sky
[07:13:48] Arahael: matthewd: The empty one?
[07:14:54] Arahael: There must be a lot of broken links, then. :(
[07:16:05] Arahael: Ok, I'm going to keep looking at the code then - somehow, my logs are being written to the file *twice*.
[07:16:13] Arahael: (And I have only the one logger)
[07:16:40] Arahael: Two outputters, but only one outputter thta goes to the actual log file (the other outputter goes to the console)
[07:20:01] Rodya_: has joined #ruby
[07:21:14] loveablelobster: has joined #ruby
[07:21:49] netglider: has joined #ruby
[07:22:06] mark_66: has joined #ruby
[07:23:25] yogg-saron: has joined #ruby
[07:30:34] Silthias1: has joined #ruby
[07:31:03] Arahael: Hmm... So pry is broken in msysgit.
[07:35:02] gulp-gulp: has joined #ruby
[07:37:11] BTRE: has joined #ruby
[07:37:45] dminuoso: has joined #ruby
[07:39:40] Arahael: How do I single-step using pry?
[07:39:53] Arahael: (Seems to work much better in cmd.exe, but even so)
[07:42:15] Arahael: I mean, if I type "step", I Just get a NameError
[07:45:54] zenspider: arahael: pry doesn't single-step. it isn't a debugger.
[07:46:17] zenspider: there are pry addons that do some things like that tho
[07:46:40] Arahael: That'll teach me to trust stackoverflow. What's a good debugger for ruby?
[07:47:01] zenspider: you can use pry to figure out what you need... you just need the plugins
[07:47:19] zenspider: there's a straight up debugger that ships with ruby that works fine too... not all the bells and whistles that pry has
[07:47:32] zenspider: `ruby -rdebug -e 0`
[07:47:51] zenspider: hah. it warns that you're using callcc... that's funny
[07:48:06] Arahael: And apparently is "rubish" and "unmaintained" (according to stackoverflow)
[07:48:37] zenspider: fuck stackoverflow
[07:48:40] charliesome: has joined #ruby
[07:49:04] Arahael: Indeed, but ruby isn't my best language, yet I must struggle to determine why my logger is logging twice.
[07:49:15] aclark: has joined #ruby
[07:49:48] zenspider: might have 2 of them. might be calling it twice. should be pretty easy to figure out which is which
[07:49:51] antgel: has joined #ruby
[07:49:52] Arahael: Thought it'd be easy: STick a breakpoint in, and observe it getting hit.
[07:50:09] Arahael: As best as I can tell, Pry's merely telling me that it's indeed hitting it many times.
[07:50:13] zenspider: def logger.some_logging_method_you_use(*args); p :bang! => args; super; end
[07:50:39] zenspider: sorry... after bang... add `p caller.first(5)`
[07:50:46] zenspider: that way you can see where from
[07:50:58] zenspider: then aggregate and look at the different entrypoints
[07:51:08] Arahael: Entry points are identical. :/
[07:51:23] zenspider: that's fine. identical but multiple.
[07:51:28] Arahael: I suspect pry itself is getting in the way, though - the stack backtrace otherwise looks identical.
[07:51:41] zenspider: so you need to figure out if there are multiple or not.
[07:51:51] Arahael: Well, the log file has double the lines.
[07:51:55] Arahael: (Each line is doubled)
[07:53:04] zenspider: class File; alias oldwrite write; def write(*args); p :bang! => args; p caller.first 5; oldwrite(*args); end
[07:53:06] zenspider: or something...
[07:53:15] zenspider: it might not be write. go look at the logger to see
[07:53:37] andikr: has joined #ruby
[07:53:48] Arahael: So far I've determined that log4r/outputter/outputter.rb:111 is being hit many, many times.
[07:54:02] ltem: has joined #ruby
[07:55:22] mim1k: has joined #ruby
[07:55:54] ahrs: has joined #ruby
[07:56:51] bronson: has joined #ruby
[07:59:17] Arahael: Well, that was stupid - found the issue, but used ordinary printf-style debugging.
[07:59:25] mikecmpbll: has joined #ruby
[07:59:55] dminuoso: arahael: pry-byebug
[08:00:50] Arahael: dminuoso: Where do you hear about that?
[08:00:58] dminuoso: arahael: I use it every day.
[08:01:23] Arahael: dminuoso: That's great, but in the spirit of teaching a man to fish... How do I fish for this info? :)
[08:01:57] Silthias: has joined #ruby
[08:02:38] dminuoso: arahael: You just asked for single-stepping using pry, just thought I'd toss the obvious approach into the bowl.
[08:02:48] dminuoso: It's basically byebug rigged into pry.
[08:03:52] Arahael: dminuoso: Well, here's my thinking process. "My logging system is stuffed." - "google 'how do I debug in ruby'" --> stackoverflow --> -rdebug is rubbish --> pry --> irc --> pry is apparently not a debugger.
[08:04:30] Arahael: dminuoso: I'm not a ruby developer. (C++, sure. Python? Sure. Swift? Sure. C#? Sure... Delphi? Sure... But Ruby is weird to me.
[08:04:39] roshanavand: has joined #ruby
[08:05:21] dminuoso: arahael: `byebug` is the popular debugger in the Ruby world. pry is just a better irb.
[08:05:29] dminuoso: https://github.com/deivid-rodriguez/byebug
[08:05:33] Beams: has joined #ruby
[08:09:19] dminuoso: Often you can debug issues with `pry` if all you just want to examine the environment and try out methods or inspect objects interactively. So I guess you could view it as a tool suitable for `some debugging`
[08:09:42] Arahael: I guess what I'm trying to say is, "How should I be learning ruby?"
[08:09:51] Arahael: I don't really want to beg on #ruby for every little issue.
[08:10:02] dminuoso: ACTION pokes apeiros
[08:10:09] ruby[bot]: You can find a list of recommended books at http://ruby-community.com/pages/links
[08:10:38] Arahael: So it's like C++ in that sense, in that books are the best way to discover it?
[08:10:44] someuser: has joined #ruby
[08:11:28] dminuoso: arahael: I found most Ruby books to be very lacking when compared to the quality C++ books.
[08:12:03] Arahael: That's my worry - I'm worried that if I get a book, it'll just try to teach me some bits of the standard library and the syntax.
[08:12:07] Arahael: The syntax is the _easy_ bit. :(
[08:13:49] Arahael: I do have the O'reilly book "Ruby Best Practices", but the only thing that it mentions about debuggers is that they aren't needed.
[08:14:14] dminuoso: arahael: The two top book recommendations in here are `The Well Grounded Rubyist` and `Eloquent Ruby`, the latter of which being the advancd book focusing mostly on idiomatic ruby style
[08:14:22] dminuoso: Though both dont really cover debugging...
[08:14:41] Arahael: Yeah, again - "idiomatic" is a syntx thing.
[08:14:42] dminuoso: But then again, I don't remember reading any books about valgrind, lldb or gdb either...
[08:14:51] dminuoso: arahael: No it's more. It's about patterns.
[08:14:57] Arahael: Right, and patterns, sure.
[08:15:20] Arahael: I'm trying to get insight into it's _ecosystem_.
[08:18:31] quaristice: has joined #ruby
[08:18:33] dminuoso: arahael: Normally ruby-toolbox is the best resource to get in touch with that, but they got hit by a meteor.
[08:19:23] Arahael: I think int he past I saw rubyforge, but I'm irritated with the broken links to it I have today. :(
[08:19:42] hutch34_: has joined #ruby
[08:20:29] jaruga: has joined #ruby
[08:20:47] Rodya_: has joined #ruby
[08:23:44] Arahael: Anyway, thanks for your patience - I'm a difficult dev. (The sort who writes something, and then expects it to continue working as-is and with new changes _years_ later)
[08:25:29] marr: has joined #ruby
[08:26:46] ur5us: has joined #ruby
[08:27:21] zenspider: jesus no... the syntax is not easy
[08:27:58] Arahael: zenspider: It is - comparatively.
[08:28:49] zenspider: cool... study this and get back to me https://github.com/seattlerb/ruby_parser/blob/master/lib/ruby_parser.yy
[08:29:02] zenspider: pick any random issue and fix it
[08:29:25] zenspider: and comparatively only perl is worse
[08:29:46] dionysus69: has joined #ruby
[08:30:35] zenspider: that said... pry + thinking can solve most bugs. if you want a quick and dirty debugger. `-rdebug` works fine. if you need more sophistication? ... you're gonna have to study the ecosystem and choose one that works for you
[08:31:00] Arahael: zenspider: That looks like a fairly simple minilanguage. Have you tried Haskell?
[08:31:40] zenspider: thus far my experiments with haskell have been unsuccessful and unrewarding so I haven't had much reason to continue further
[08:32:07] zenspider: I am not a fan of typing. I prefer scheme
[08:32:20] petto: has joined #ruby
[08:32:36] Arahael: That's fine, my point is that the _syntax_ - the mere syntax - is generally teh simplest big.
[08:32:40] Arahael: *simplest bit.
[08:33:27] zenspider: sure... if you're coming from the ML family, it really is. compare ML/Haskell/Scheme to ruby's grammar and you'll soon learn there is a very wide spectrum of grammar complexity
[08:33:30] Arahael: You seem to have a bigger issue with the typing system, which isn't a syntax issue.
[08:33:41] Arahael: Well, yes.
[08:33:55] Arahael: But consider this, do you consider yourself an expert rubist?
[08:34:31] Arahael: Assuming you say yes... Would you be able to swap to a different implementation of ruby - with the same syntax (say, macruby), and agree that it's an identical language?
[08:34:54] zenspider: no, because none of them are. :)
[08:34:56] lxsameer: has joined #ruby
[08:35:13] Arahael: zenspider: Right - there are difficulties that lie beyond the mere sytnax!
[08:37:24] zenspider: arahael: you fail to make your point time and again and just seem to want to say "Mere syntax" for fun. I don't see the point you're trying to make. Diversions to haskell and whatever don't seem to have any relevance. sooooo... I'm done here.
[08:37:53] zenspider: I'm glad you got your logger bug fixed up. Even without a proper debugger.
[08:38:13] Arahael: zenspider: I trued to use the difference between cruby and macruby as an example.
[08:38:54] Arahael: But I'm tired, and there's a chance we're talking at cross purposes anyway - if you're heading off, heave a great night. :)
[08:42:34] jenrzzz: has joined #ruby
[08:42:35] jenrzzz: has joined #ruby
[08:43:54] pandaant: has joined #ruby
[08:48:27] aupadhye: has joined #ruby
[08:57:42] bronson: has joined #ruby
[09:00:38] tvw: has joined #ruby
[09:06:26] aupadhye: has joined #ruby
[09:06:59] brent__: has joined #ruby
[09:17:06] mtkd: has joined #ruby
[09:19:47] stoffus1: has joined #ruby
[09:21:06] ferr: has joined #ruby
[09:21:35] Rodya_: has joined #ruby
[09:25:00] ur5us_: has joined #ruby
[09:25:25] bigkevmcd: has joined #ruby
[09:25:48] ur5us: has joined #ruby
[09:28:38] my123: has joined #ruby
[09:28:39] my123: has joined #ruby
[09:30:39] bkxd: has joined #ruby
[09:30:41] bkxd_: has joined #ruby
[09:32:50] anuxivm: has joined #ruby
[09:34:05] anuxivm: has left #ruby: ()
[09:34:52] ayonkhan: has joined #ruby
[09:34:57] zenspider: Finished in 0.029733s, 9215.3500 runs/s, 16849.9647 assertions/s.
[09:35:12] zenspider: damn I love that
[09:35:31] darix: moin zenspider. more releases incoming?
[09:36:10] zenspider: none planned. I just fired off ruby_parser and minitest
[09:36:33] zenspider: but... I'm trying to improve backtrace filtering w/ custom assertions in minitest to be more useful
[09:36:46] zenspider: need to isolate a good example first so I can make a test from it
[09:37:10] renchan_: has joined #ruby
[09:39:00] RahulT: has joined #ruby
[09:39:27] workmad3: has joined #ruby
[09:39:29] nowhere_man: has joined #ruby
[09:45:39] ur5us_: has joined #ruby
[09:50:57] zenspider: this is hard
[09:53:03] dminuoso: 10:28:49 zenspider | cool... study this and get back to me https://github.com/seattlerb/ruby_parser/blob/master/lib/ruby_parser.yy
[09:53:13] zenguy_pc: has joined #ruby
[09:53:23] dminuoso: The grammar is extremely simple. It's just that LALR(1) sucks.
[09:53:47] dminuoso: Is Ruby LL parseable?
[09:53:49] zenspider: you're wrong on the first part
[09:55:29] dminuoso: zenspider: JRuby uses ANTLR right?
[09:58:56] bronson: has joined #ruby
[10:00:29] zenguy_pc: has joined #ruby
[10:01:34] hutch34_: has joined #ruby
[10:01:46] anisha: has joined #ruby
[10:03:43] frmendes: has joined #ruby
[10:08:09] zenguy_pc: has joined #ruby
[10:08:30] guardianx: has joined #ruby
[10:08:34] bkxd__: has joined #ruby
[10:11:04] bkxd: has joined #ruby
[10:13:06] ocn: has joined #ruby
[10:13:35] Serpent7776: has joined #ruby
[10:13:54] ocn: has left #ruby: ()
[10:14:47] __RonaldMcDonald: has joined #ruby
[10:18:00] tvw: has joined #ruby
[10:22:21] guardianx: has left #ruby: ()
[10:27:53] zenspider: darix: (or anyone) can I get some eyeballs on this? https://gist.github.com/zenspider/35ba11c9da460a042de76f831989f22d
[10:28:36] zenspider: I'm trying to improve the backtrace filter when you have an error AND a custom assertion... it needs to not just stop at the assertion and instead go back to the test body involved.
[10:29:00] zenspider: I might need more/better tests around errors in teardown... I have one but I'm not sure I agree with it
[10:29:22] zenspider: also I prefer the dynamic class versions of the tests but they're so much harder to write / maintain
[10:29:32] zenspider: so just filtering backtraces can be nice
[10:31:42] rgtk: has joined #ruby
[10:33:09] bigkevmcd: has joined #ruby
[10:40:03] im0nde: has joined #ruby
[10:40:40] stoffus: has joined #ruby
[10:43:35] uZiel: has joined #ruby
[10:43:48] jenrzzz: has joined #ruby
[10:49:08] ramadoka: has joined #ruby
[10:49:57] ramadoka: hi guys, is it a bad idea to create a class for each endpoint on your API?
[10:51:09] ramadoka: like for example /user/register is handled by UserRegister.new(request: self).run!
[10:51:45] mim1k: has joined #ruby
[10:51:48] Arahael: Not if they're unique and distinct - ie, you can't easily share the implementaiton.
[10:52:19] ramadoka: not a bad idea?
[10:52:40] Arahael: Well, not sure of the idiomatic ruby appraoch, but I'd probably use a function/method for each endpoint, not a whole class.
[10:53:09] ramadoka: yeah, most implementation seems to prefer a function approach.
[10:53:23] ur5us: has joined #ruby
[10:54:14] Arahael: You could even have an EndPoint class that's used for all the methods. (With different instnatiations for each one)
[10:57:19] Mark-6ma: has joined #ruby
[10:59:44] bronson: has joined #ruby
[11:00:02] romankapitonov: has joined #ruby
[11:02:46] someuser_: has joined #ruby
[11:10:57] ur5us: has joined #ruby
[11:11:13] uZiel: has joined #ruby
[11:12:55] mesamoo: has joined #ruby
[11:13:11] frmendes: has joined #ruby
[11:13:44] ramadoka: has joined #ruby
[11:13:53] anisha_: has joined #ruby
[11:14:07] nowhereman: has joined #ruby
[11:16:26] nfsnobody: has joined #ruby
[11:21:23] cadillac_: has joined #ruby
[11:34:23] milardovich: has joined #ruby
[11:35:38] dminuoso: arahael: This outside the scope of idiomatic Ruby.
[11:36:00] bkxd: has joined #ruby
[11:36:00] dminuoso: arahael: Web development is domain specific, as such the question of idiomacy depends on the framework you are employing.
[11:36:14] dminuoso: Or what pattern you are using.
[11:38:46] bkxd_: has joined #ruby
[11:39:53] mim1k_: has joined #ruby
[11:44:57] __Yiota: has joined #ruby
[11:47:21] shiranuidong: has joined #ruby
[11:47:59] shiranuidong: has joined #ruby
[11:50:45] troulouliou_dev: has joined #ruby
[11:56:08] Jameser: has joined #ruby
[11:59:05] troulouliou_dev: has joined #ruby
[11:59:44] ldnunes: has joined #ruby
[12:00:34] bronson: has joined #ruby
[12:01:36] synthroid: has joined #ruby
[12:02:56] hutch34_: has joined #ruby
[12:06:58] brent__: has joined #ruby
[12:09:24] synthroid: has joined #ruby
[12:12:31] ElFerna: has joined #ruby
[12:12:38] __Yiota: has joined #ruby
[12:16:54] bkxd__: has joined #ruby
[12:17:02] netglider: has joined #ruby
[12:17:16] bkxd___: has joined #ruby
[12:18:00] GodFather: has joined #ruby
[12:18:12] netglider: has joined #ruby
[12:18:48] pandaant: has joined #ruby
[12:22:51] ledestin: has joined #ruby
[12:23:34] flyhigh: has joined #ruby
[12:28:13] apparition: has joined #ruby
[12:28:26] stoffus1: has joined #ruby
[12:30:13] mark_66: has joined #ruby
[12:32:34] flyhigh: has joined #ruby
[12:32:40] sepp2k: has joined #ruby
[12:33:10] flyhigh: has joined #ruby
[12:34:00] flyhigh: has joined #ruby
[12:35:33] cagomez: has joined #ruby
[12:36:31] anisha: has joined #ruby
[12:37:25] monument: has joined #ruby
[12:37:45] flyhigh: has joined #ruby
[12:38:06] rgtk: has joined #ruby
[12:38:27] hogetaro: has joined #ruby
[12:39:25] flyhigh: has joined #ruby
[12:40:02] FastJack: has joined #ruby
[12:42:51] flyhigh: has joined #ruby
[12:44:10] dviola: has joined #ruby
[12:45:46] jenrzzz: has joined #ruby
[12:47:24] oleo: has joined #ruby
[12:48:02] tacoboy: has joined #ruby
[12:49:57] anisha: has joined #ruby
[12:53:34] uZiel: has joined #ruby
[12:56:06] mim1k: has joined #ruby
[12:59:47] sekmo: has joined #ruby
[13:01:43] bronson: has joined #ruby
[13:03:56] bkxd: has joined #ruby
[13:06:35] ayonkhan_: has joined #ruby
[13:06:55] InfinityFye: has joined #ruby
[13:07:06] bkxd_: has joined #ruby
[13:07:45] frmendes: has joined #ruby
[13:08:22] mikecmpbll: this is probably going to be a dumb question, but what's the possible range of Digest::SHA1 hashes?
[13:08:37] mikecmpbll: it says it's a 20 byte hash
[13:08:47] frmendes: has joined #ruby
[13:08:51] Papierkorb: mikecmpbll: the whole 8**20 thing
[13:08:54] pabs: mikecmpbll: that's the output size, not the amout of data that can be hashed
[13:09:05] mikecmpbll: pabs : ya i know
[13:09:37] pabs: mikecmpbll: then i guess i don't understand your question, what do you mean by range?
[13:09:43] mikecmpbll: i mean, the range of possible values
[13:09:53] jphase: has joined #ruby
[13:09:57] Papierkorb: mikecmpbll: Without using the whole range, its effective range would be smaller, hence, its range wouldn't be 20 Bytes.
[13:10:04] mikecmpbll: some hashes range into negative
[13:11:21] Papierkorb: For most hashes, not really. Hashes have no sign - Or none that I know of. You can interpret the highest bit as sign bit, but that's representation, but not the correct data interpretation.
[13:11:35] apparition47: has joined #ruby
[13:11:48] pabs: the "output range" if you want to call it that, is 0 to 2^20 - 1
[13:12:20] pabs: yeah, than kyou
[13:12:28] pabs: 0 to 2^160 - 1
[13:13:34] alexday: has joined #ruby
[13:15:03] anisha: has joined #ruby
[13:15:15] frmendes: has joined #ruby
[13:15:27] RahulT: has joined #ruby
[13:15:46] frmendes: has joined #ruby
[13:17:04] alexday: is it possible to create a blank Net::HTTPResponse.new object. what I am trying is, I have this http_req = Net::Http::Get.new(url), http_req.start do |h| h.request(req) end; but if there is a trouble connecting I want to rescue the exception, so that application doesn't exit. but in doing that the other code that uses it will do a response.code == "403", so I was thinking if I can create a response object with
[13:17:28] alexday: is that approach ok
[13:17:34] dminuoso: alexday: ?xy
[13:17:39] dminuoso: ?xy alexday
[13:17:39] ruby[bot]: alexday: 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
[13:18:16] dminuoso: alexday: Don't rescue in a spot when you cant completely handle the error.
[13:18:23] alexday: the problem is what do I do when I get a connection timeout exception
[13:19:14] dminuoso: alexday: catching an exception means being able to recover. returning a fake object is essentially ying.
[13:19:22] dminuoso: let the exception propagate and catch it at some higher layer
[13:20:05] alexday: ok, and after catching it returning a 500 was, what I was thinking
[13:20:12] t-recx: has joined #ruby
[13:20:20] yqt: has joined #ruby
[13:20:23] alexday: like return Net::HTTPResponse.new('1.1', '500', 'Connection Error')
[13:22:47] dminuoso: alexday: No that would be another lie.
[13:22:52] uZiel: has joined #ruby
[13:22:59] dminuoso: alexday: 500 implies internal server error.
[13:23:19] dminuoso: alexday: just let the exception propagate.
[13:23:56] alexday: but after catching the exception, for the api to work I have to return something, right?
[13:24:08] ElFerna: has joined #ruby
[13:24:42] dminuoso: alexday: That depends on whether you can recover sensibly or not. If not, just let the exception propagate further.
[13:24:53] milardovich: has joined #ruby
[13:27:32] veex: has joined #ruby
[13:29:37] DLSteve: has joined #ruby
[13:29:43] nacsurte: has joined #ruby
[13:30:34] __Yiota: has joined #ruby
[13:31:16] Rodya_: has joined #ruby
[13:32:30] enodata: has joined #ruby
[13:32:38] high_fiver: has joined #ruby
[13:35:24] guidos: has left #ruby: ()
[13:40:58] mikecmpbll: phone call, but thanks pabs & Papierkorb ;) that's what I was after.
[13:45:11] bkxd__: has joined #ruby
[13:46:05] bkxd___: has joined #ruby
[13:51:54] rundor: has joined #ruby
[14:01:37] Emmanuel_Chanel: has joined #ruby
[14:02:14] bronson: has joined #ruby
[14:03:45] Rapture: has joined #ruby
[14:09:25] RahulT: has joined #ruby
[14:10:19] ElFerna: has joined #ruby
[14:11:18] hutch34_: has joined #ruby
[14:11:54] mmarconm: has joined #ruby
[14:11:56] mmarconm: has left #ruby: ()
[14:16:39] anisha_: has joined #ruby
[14:17:40] Dbugger: has joined #ruby
[14:17:43] Dbugger: Hello everyone
[14:18:08] Dbugger: I am trying to install json 1.8.3, but I get this error output when i do (https://hastebin.com/kemiqutaju.sql). Does anyone know what is it that I could be missing?
[14:19:39] bruno-: has joined #ruby
[14:20:49] Mark-6ma: has joined #ruby
[14:24:06] troulouliou_dev: has joined #ruby
[14:25:08] dminuoso: dbugger: Ruby 2.4 has received some internal changes with the unification of Fixnum and Bignum under Integer. That JSON gem version is not compatible with the newer Ruby.
[14:25:54] dminuoso: dbugger: Note that Ruby comes with json out of the box, you should not need to install this in the first place.
[14:26:32] Dbugger: dminuoso, oh ok... thanks
[14:27:11] Dbugger: another question then... when I try to use "rbenv local "2.3.4", I get this: "/home/dbugger/.rbenv/libexec/rbenv-version-file-write: line 19: .ruby-version: Permission denied"
[14:27:19] Dbugger: What is going on here?? I dont have permissions now??
[14:29:07] dionysus69: has joined #ruby
[14:31:54] __RonaldMcDonald: dbugger: you don't have permission to write to the current working directory in order to create a .ruby-version file.
[14:32:29] Dbugger: __RonaldMcDonald, yeah, but how could that happen...? Or more important, how can I fix it?
[14:33:02] __RonaldMcDonald: don't know. try `pwd` to see what current working directory is.
[14:33:49] Dbugger: pwd? Doesnt that show me the current directory where I am located now?
[14:33:54] __RonaldMcDonald: if you're somewhere like /etc or /root then there's nothing to fix. change directory. otherwise, check permissions.
[14:33:55] Dbugger: I am in my project's directory
[14:34:04] __RonaldMcDonald: but rbenv cannot write to that directory.
[14:34:08] Dbugger: I am in "/home/dbugger/projects/myproject"
[14:34:29] Lockpick: has joined #ruby
[14:34:33] Dbugger: but what are the right permissions then?
[14:34:33] __RonaldMcDonald: can you do `touch .ruby-version` from the same shell?
[14:34:38] Dbugger: let me try
[14:37:21] Dbugger: __RonaldMcDonald, I did a chmod 777 (I know... a little brute) and now I can touch .ruby-version
[14:37:48] __RonaldMcDonald: ok, then that's the issue, and yes 777 is prob not what you want.
[14:38:16] Dbugger: hehehe, thanks mate!
[14:38:20] bkxd: has joined #ruby
[14:39:03] chouhoulis: has joined #ruby
[14:39:03] brent__: has joined #ruby
[14:40:28] bkxd_: has joined #ruby
[14:41:29] Jalinaee: has joined #ruby
[14:43:28] bkxd__: has joined #ruby
[14:51:26] olivier__: has joined #ruby
[14:54:28] chouhoulis: has joined #ruby
[14:55:22] high_fiver: has joined #ruby
[14:57:12] rgtk: has joined #ruby
[14:59:20] high_fiver: has joined #ruby
[15:03:03] bronson: has joined #ruby
[15:06:55] high_fiver: has joined #ruby
[15:10:30] polishdub: has joined #ruby
[15:10:35] haylon: has joined #ruby
[15:12:05] nankyokusei: has joined #ruby
[15:13:20] high_fiver: has joined #ruby
[15:15:20] high_fiver: has joined #ruby
[15:17:15] high_fiver: has joined #ruby
[15:17:15] nankyokusei: has joined #ruby
[15:19:10] high_fiver: has joined #ruby
[15:19:22] imtar: has joined #ruby
[15:19:50] troulouliou_dev: has joined #ruby
[15:20:25] olivier__: has joined #ruby
[15:21:05] enterprisey: has joined #ruby
[15:22:06] bkxd: has joined #ruby
[15:23:04] brent__: has joined #ruby
[15:23:10] high_fiver: has joined #ruby
[15:23:40] imtar: has joined #ruby
[15:24:55] brent__: has joined #ruby
[15:25:09] torQue_: has joined #ruby
[15:27:05] bkxd_: has joined #ruby
[15:27:05] bruno-: has joined #ruby
[15:28:37] high_fiver: has joined #ruby
[15:29:54] kobain: has joined #ruby
[15:30:28] jenrzzz: has joined #ruby
[15:32:35] cagomez: has joined #ruby
[15:32:41] ar1a_: has joined #ruby
[15:33:02] cam27: has joined #ruby
[15:39:55] TomyLobo2: has joined #ruby
[15:40:18] bruno-: has joined #ruby
[15:42:35] imtar: has joined #ruby
[15:46:28] imtar: has joined #ruby
[15:47:07] anisha_: has joined #ruby
[15:47:17] knight33: has joined #ruby
[15:47:51] imtar: has joined #ruby
[15:55:13] dionysus69: has joined #ruby
[15:57:04] cdg: has joined #ruby
[15:57:20] digitalnomad: has joined #ruby
[15:57:55] blackwind_123: has joined #ruby
[15:59:06] cdg_: has joined #ruby
[16:00:55] amclain: has joined #ruby
[16:04:09] charliesome: has joined #ruby
[16:04:15] bronson: has joined #ruby
[16:04:39] psychicist__: has joined #ruby
[16:11:44] ElFerna: has joined #ruby
[16:12:14] gusrub: has joined #ruby
[16:19:08] rdsome: has joined #ruby
[16:20:57] olivier__: has joined #ruby
[16:21:52] psychicist__: has joined #ruby
[16:22:15] npgm: has joined #ruby
[16:22:32] nacsurte: has joined #ruby
[16:25:11] mikecmpbll: has joined #ruby
[16:26:52] rgtk: has joined #ruby
[16:32:04] jenrzzz: has joined #ruby
[16:32:04] jenrzzz: has joined #ruby
[16:35:54] rundor: has joined #ruby
[16:37:04] jackjackdripper: has joined #ruby
[16:37:20] ColeHub: has joined #ruby
[16:37:34] psychicist__: has joined #ruby
[16:40:16] t-recx: has joined #ruby
[16:47:24] AX31_A13X: has joined #ruby
[16:47:55] compost_: has joined #ruby
[16:48:53] eckhardt: has joined #ruby
[16:49:21] pugbreaker: has joined #ruby
[16:49:47] yeticry: has joined #ruby
[16:58:29] rundor: has joined #ruby
[17:04:03] olivier__: has joined #ruby
[17:04:09] cagomez: has joined #ruby
[17:05:04] bronson: has joined #ruby
[17:10:23] gusrub: has joined #ruby
[17:14:37] ltem: has joined #ruby
[17:18:40] gusrub: has joined #ruby
[17:18:49] Alina-malina: has joined #ruby
[17:19:00] vuoto: has joined #ruby
[17:22:16] machinewar: has joined #ruby
[17:23:05] Alina-malina: has joined #ruby
[17:23:13] yqt: has joined #ruby
[17:23:33] workmad3_: has joined #ruby
[17:24:37] sleepee: has joined #ruby
[17:26:30] mim1k: has joined #ruby
[17:28:06] duderonomy: has joined #ruby
[17:30:37] anisha_: has joined #ruby
[17:32:24] haylon: has joined #ruby
[17:33:23] jenrzzz: has joined #ruby
[17:33:23] jenrzzz: has joined #ruby
[17:33:51] GodFather: has joined #ruby
[17:34:45] high_fiver: has joined #ruby
[17:35:19] enterprisey: has joined #ruby
[17:36:58] kies: has joined #ruby
[17:38:51] apparition: has joined #ruby
[17:39:11] digitalnomad: has joined #ruby
[17:39:50] KeyJoo: has joined #ruby
[17:45:46] RahulT: has joined #ruby
[17:48:14] high_fiver: has joined #ruby
[17:49:54] mhib: has joined #ruby
[17:52:06] RedWar: has joined #ruby
[17:52:51] marr: has joined #ruby
[17:53:19] high_fiver: has joined #ruby
[17:56:13] xuanrui: has joined #ruby
[17:57:51] cam27: has joined #ruby
[17:58:31] AX31_A13X: has joined #ruby
[17:58:39] nankyokusei: has joined #ruby
[18:01:06] jackjackdripper1: has joined #ruby
[18:04:52] rgtk: has joined #ruby
[18:05:55] bronson: has joined #ruby
[18:09:58] roshanavand: has joined #ruby
[18:10:17] ozcanesen: has joined #ruby
[18:18:55] workmad3: has joined #ruby
[18:21:59] AxelAlex: has joined #ruby
[18:23:47] chouhoul_: has joined #ruby
[18:28:28] sepp2k1: has joined #ruby
[18:28:40] _Bin4ry: has joined #ruby
[18:28:45] rgtk: has joined #ruby
[18:29:52] mwlang: has joined #ruby
[18:34:23] chouhoulis: has joined #ruby
[18:38:54] jenrzzz: has joined #ruby
[18:45:03] d5sx43: has joined #ruby
[18:47:37] cagomez: has joined #ruby
[18:49:05] alex``: has joined #ruby
[18:49:40] ninetyninewilldi: has joined #ruby
[18:49:41] imtar: has joined #ruby
[18:49:49] olivier__: has joined #ruby
[18:50:05] olivier__: has joined #ruby
[18:52:39] Eiam: has joined #ruby
[18:53:13] ninetyninewilldi: is there a method to convert a string like 'x89' into the ascii char represented by that hex value?
[18:57:19] imtar: has joined #ruby
[19:03:05] sarmiena_: has joined #ruby
[19:05:22] chouhoul_: has joined #ruby
[19:06:44] bronson: has joined #ruby
[19:06:45] Rodya_: has joined #ruby
[19:09:52] jenrzzz: has joined #ruby
[19:22:20] gothicsouth: has joined #ruby
[19:23:37] chouhoulis: has joined #ruby
[19:24:07] ldnunes: has joined #ruby
[19:24:24] swills: has joined #ruby
[19:24:24] swills: has joined #ruby
[19:25:38] eightlimbed: has joined #ruby
[19:27:07] roshanavand: has joined #ruby
[19:27:20] zanshin: Something like this? https://stackoverflow.com/questions/5772875/converting-hexadecimal-decimal-octal-and-ascii#5773273
[19:27:27] jackjackdripper: has joined #ruby
[19:28:11] norm: has joined #ruby
[19:28:38] norm: I love Grape for writing REST APIs, but am looking to write a server that handles requests coming in over WebSocket instead of HTTP
[19:28:49] norm: Anyone know if Grape can be adapted to accept requests from something other than HTTP?
[19:28:59] norm: Or is there a good framework for RPC-over-WebSocket? I haven’t found one
[19:30:09] ramfjord: has joined #ruby
[19:33:43] milardovich: has joined #ruby
[19:34:00] lxsameer: has joined #ruby
[19:37:03] antgel: has joined #ruby
[19:41:25] postmodern: has joined #ruby
[19:46:52] digitalnomad: has joined #ruby
[19:47:18] growp: has joined #ruby
[19:47:32] growp: how do you load files from a path
[19:48:45] mtkd: has joined #ruby
[19:51:17] ElFerna: has joined #ruby
[19:51:37] gheegh: has joined #ruby
[19:53:49] enodata: has joined #ruby
[19:53:50] gheegh: Anyone familiar with concurrent-ruby? I used a Promise to do some parallel URL retrieval.. and it seems that it just does them 1 after the other, not saving any time.. i'm trying to retrieve in parallel. Should I switch to a threadpool, or have I done something wrong?
[20:00:55] havenwood: gheegh: Which Ruby engine are you using, CRuby?
[20:01:05] gheegh: havenwood: yes, cruby
[20:02:52] milardovich: has joined #ruby
[20:03:11] havenwood: gheegh: CRuby threads currently acquire the Global VM Lock (GVL, also called GIL) for a bunch of stuff. So they often don't run in parallel for stuff like computation. They do run in parallel with IO or other stuff that doesn't get GVLed.
[20:03:29] gheegh: yea, this is maily to handle IO stuff
[20:03:53] havenwood: gheegh: I'd suggest using an HTTP gem that has a solid parallelism strategy, like Typhoeus.
[20:03:54] gheegh: so in theory they should retrieve in parallel.. but it doesn't seem to be doing that.. it seems to be running them serially...
[20:04:27] gheegh: yeah, we use Typhoeus other places, but his is a gem that we're trying to wrap its calls to speed up its performance
[20:04:30] havenwood: https://github.com/typhoeus/typhoeus#making-parallel-requests
[20:04:39] gheegh: yeah, i've done a TON of taht.. :-)
[20:04:58] havenwood: gheegh: aha. i'm curious why your concurrent-ruby promises are blocking
[20:05:39] Xentil: has joined #ruby
[20:05:46] havenwood: gheegh: can you show the promises code?
[20:06:09] Xentil: has left #ruby: ("http://quassel-irc.org - Chat comfortably. Anywhere.")
[20:07:10] gheegh: https://github.com/omalab/virility/blob/master/lib/virility/excitation.rb#L30
[20:07:32] gheegh: https://github.com/omalab/virility/blob/master/lib/virility/promises.rb
[20:07:40] gheegh: the second is the mixin that is mixed into the class..
[20:07:44] havenwood: gheegh: execute promises is inside the loop?
[20:10:00] gheegh: always nice to have another set of eyes.. thanks.
[20:10:29] havenwood: you're welcome
[20:10:44] ResidentBiscuit: has joined #ruby
[20:11:47] gheegh: havenwood: yes, that fixed it.
[20:13:24] growp: i have a variable with a path stored, how do i load files?
[20:13:45] ljarvis: growp: what have you tried?
[20:13:56] growp: i don't know what to try
[20:14:14] ljarvis: are you using some resources for learning Ruby?
[20:14:18] growp: i tried to google but it's telling me to use a global variable and i was told to never use global variables unless i know what i'm doing
[20:14:34] apeiros: good advice
[20:14:35] growp: and that i will never use global variables in ruby
[20:14:44] growp: so that's why i'm asking you
[20:14:46] ljarvis: you may use them, but yes that is good advice
[20:15:55] apeiros: growp: how do you load files if you don't use a variable?
[20:16:02] growp: i don't know
[20:16:20] eckhardt: has joined #ruby
[20:16:24] apeiros: ok… so your actual question is "how do I load files, at all"?
[20:16:51] apeiros: depends a bit on what you want to do, but it's probably one of these:
[20:16:58] apeiros: &ri Kernel#require growp
[20:16:58] `derpy: growp: http://ruby-doc.org/stdlib-2.4.1/libdoc/rubygems/rdoc/Kernel.html#method-i-require
[20:17:02] apeiros: &ri Kernel#load growp
[20:17:02] `derpy: growp: http://ruby-doc.org/core-2.4.1/Kernel.html#method-i-load
[20:17:27] apeiros: and you probably should use some tutorial or other resource to learn ruby
[20:17:39] growp: basically i have /random/path/to/files and i want to load all the files from that files directory
[20:17:42] ljarvis: ah I read it as reading files
[20:18:00] growp: load them and store them in a variable
[20:18:11] apeiros: ljarvis: might be possible. they're new so anything they say is ambiguous :)
[20:18:26] apeiros: growp: oh well, yeah, that's reading.
[20:18:36] apeiros: loading is usually understood as "read and interpret as code"
[20:18:45] ljarvis: or.. it's requiring all files inside a directory :D
[20:18:58] ljarvis: we need more info, growp
[20:19:03] raspado: has joined #ruby
[20:19:06] apeiros: well, "store them in a variable" sounds more like reading. but lets see.
[20:19:40] apeiros: reading a file is File.read
[20:21:30] eightlimbed: has joined #ruby
[20:21:58] phinxy: has joined #ruby
[20:23:18] vuoto: has joined #ruby
[20:28:10] nowhereman: has joined #ruby
[20:30:02] tAn: has joined #ruby
[20:31:05] jackjackdripper1: has joined #ruby
[20:32:51] Rodya_: has joined #ruby
[20:35:17] joelwallis: has joined #ruby
[20:40:48] jenrzzz: has joined #ruby
[20:40:48] jenrzzz: has joined #ruby
[20:45:18] joast: has joined #ruby
[20:46:09] antgel: has joined #ruby
[20:48:19] alan_w: has joined #ruby
[20:52:04] t-recx: has joined #ruby
[20:55:06] gizmore: what is a good render/response time for a rails app?
[20:55:18] gizmore: 50ms is fine?
[20:55:43] mudri: has joined #ruby
[20:56:02] DukeDave: has joined #ruby
[20:56:05] gizmore: 50ms rendering, that is... not pingpong
[20:56:13] gizmore: so serverside generation time
[21:00:29] nacsurte: has joined #ruby
[21:03:09] cam27: has joined #ruby
[21:05:49] ldnunes: has joined #ruby
[21:07:40] bronson: has joined #ruby
[21:08:51] gusrub: has joined #ruby
[21:09:30] ColeHub: has joined #ruby
[21:13:41] gothicsouth: has joined #ruby
[21:15:19] jenrzzz_: has joined #ruby
[21:22:06] RahulT: has joined #ruby
[21:24:38] GodFather: has joined #ruby
[21:27:28] joelwallis: has joined #ruby
[21:29:18] joelwall_: has joined #ruby
[21:30:54] cagomez: has joined #ruby
[21:31:18] jackjackdripper: has joined #ruby
[21:31:24] cagomez: has joined #ruby
[21:33:37] ledestin: has joined #ruby
[21:35:04] mim1k: has joined #ruby
[21:36:18] imtar: has joined #ruby
[21:36:22] jenrzzz: has joined #ruby
[21:36:22] jenrzzz: has joined #ruby
[21:41:56] SeepingN: has joined #ruby
[21:43:11] digitalnomad: has joined #ruby
[21:46:25] sarmiena_: has joined #ruby
[21:47:35] gusrub: has joined #ruby
[21:48:01] spider-mario: has joined #ruby
[22:02:18] imtar: has joined #ruby
[22:03:58] workmad3: has joined #ruby
[22:04:58] SteenJobs_: has joined #ruby
[22:05:04] jackjackdripper1: has joined #ruby
[22:07:43] knight33: has joined #ruby
[22:07:45] sarmiena_: has joined #ruby
[22:08:57] bronson: has joined #ruby
[22:26:07] AndBobsYourUncle: has joined #ruby
[22:35:06] Rodya_: has joined #ruby
[22:37:10] ecuanaso: has joined #ruby
[22:42:49] brent__: has joined #ruby
[22:46:16] norm: has joined #ruby
[22:47:02] enodata_: has joined #ruby
[22:56:06] eckhardt: has joined #ruby
[23:05:56] veex: has left #ruby: ("WeeChat 1.9")
[23:06:11] veex: has joined #ruby
[23:06:36] usuario: has joined #ruby
[23:08:02] ar1a: has joined #ruby
[23:09:27] gothicsouth: has joined #ruby
[23:09:46] bronson: has joined #ruby
[23:11:55] hutch34_: has joined #ruby
[23:12:09] nofxx: has joined #ruby
[23:16:17] imtar: has joined #ruby
[23:18:57] cadillac__: has joined #ruby
[23:19:08] cdg: has joined #ruby
[23:24:09] cdg: has joined #ruby
[23:24:11] AxelAlex: has joined #ruby
[23:25:27] cagomez_: has joined #ruby
[23:28:11] Jayson_Virissimo: has joined #ruby
[23:33:05] alveric3: has joined #ruby
[23:35:30] mim1k: has joined #ruby
[23:35:44] frmendes: has joined #ruby
[23:36:39] frmendes: has joined #ruby
[23:38:20] frmendes: has joined #ruby
[23:39:55] brent__: has joined #ruby
[23:40:14] SteenJobs_: has joined #ruby
[23:42:09] Moosashi: has joined #ruby
[23:50:09] frmendes: has joined #ruby
[23:50:40] digitalnomad: has joined #ruby