« Back to channel list

#ruby - 02 August 2019

« Back 1 day Forward 1 day »
[00:03:02] fphilipe_: has joined #ruby
[00:04:31] drincruz_: has joined #ruby
[00:05:37] qbrd[m]: @apotheon or something right!
[00:24:34] Swyper: has joined #ruby
[00:35:55] orbyt_: has joined #ruby
[00:36:16] Swyper: has joined #ruby
[00:41:50] stooj: has joined #ruby
[00:43:02] bitwinery: has joined #ruby
[00:48:36] CCDelivery: has joined #ruby
[00:53:11] cagomez: has joined #ruby
[00:53:57] cagomez: what does the <= operator do in `rescue Exception => e`?
[00:54:21] cagomez: also, how does ruby match against the exception type? it's not done using the => operator, right?
[00:54:37] dtzuzu: has joined #ruby
[00:59:27] drincruz_: has joined #ruby
[01:02:43] ramfjord_: has joined #ruby
[01:04:42] leftylink: then, once an exception has been rescued, one is able to refer to it using tne name `e`
[01:04:48] leftylink: &>> begin 1/0; rescue Exception => e; puts "hello. #{e.class} - #{e.message}" end
[01:04:50] rubydoc: # => hello. ZeroDivisionError - divided by 0 (https://carc.in/#/r/7c71)
[01:05:42] orbyt_: has joined #ruby
[01:07:01] ur5us: has joined #ruby
[01:07:52] fphilipe_: has joined #ruby
[01:09:30] oetjenj: has joined #ruby
[01:10:48] ur5us_: has joined #ruby
[01:10:54] jenrzzz: has joined #ruby
[01:11:15] ur5us_: has joined #ruby
[01:14:34] Fusl: has joined #ruby
[01:27:27] brool: has joined #ruby
[01:33:57] jinie: has joined #ruby
[01:41:30] ur5us: has joined #ruby
[01:59:36] ramfjord: has joined #ruby
[01:59:38] brool: using sinatra, how do i send a message from one route to another? e.g. my "post /thing" route sets a var @msg, and my view in "get /" should <%= @msg %> but since "get /" is another route @msg isn't saved from "post /thing" to "get /"
[02:00:12] brool: and "post /thing" sets @msg then immediatley reroutes to /
[02:00:18] brool: which i hoped would allow me to save a @msg
[02:10:50] duderonomy: has joined #ruby
[02:12:26] mozzarella: I think you're looking for a session store
[02:15:45] brool: oh that makes sense
[02:16:10] brool: here's stupid me trying to treat a web app like a procedural program
[02:17:09] mozzarella: that's a common mistake/misunderstanding I think
[02:34:01] cagomez: has joined #ruby
[02:47:55] englishm: has joined #ruby
[02:48:44] englishm: has joined #ruby
[02:49:46] englishm: has joined #ruby
[02:50:36] englishm: has joined #ruby
[02:58:18] jenrzzz: has joined #ruby
[02:58:19] jinie: has joined #ruby
[03:04:07] drincruz_: has joined #ruby
[03:12:10] _whitelogger: has joined #ruby
[03:14:58] cthulchu_: has joined #ruby
[03:16:47] matheusmoreira: has joined #ruby
[03:18:52] rippa: has joined #ruby
[03:19:18] duderonomy: has joined #ruby
[03:26:06] ur5us: has joined #ruby
[03:38:26] fphilipe_: has joined #ruby
[03:43:01] ur5us: has joined #ruby
[03:44:16] tdy: has joined #ruby
[03:47:21] gix-: has joined #ruby
[03:56:17] gabschem_: has joined #ruby
[03:58:02] podlech: has joined #ruby
[04:00:47] jenrzzz: has joined #ruby
[04:05:49] howdoi: has joined #ruby
[04:25:30] orbyt_: has joined #ruby
[04:26:37] matheusmoreira: has joined #ruby
[04:41:30] lesha: has joined #ruby
[05:00:20] fphilipe_: has joined #ruby
[05:01:35] oetjenj: has joined #ruby
[05:05:10] drincruz_: has joined #ruby
[05:05:45] kyrylo: has joined #ruby
[05:08:07] Stan: has joined #ruby
[05:16:38] sandstrom: has joined #ruby
[05:19:42] chunkypuffs: has joined #ruby
[05:20:07] tdy: has joined #ruby
[05:22:34] ur5us: has joined #ruby
[05:23:23] jinie: has joined #ruby
[05:25:41] sauvin: has joined #ruby
[05:39:34] qbrd[m]: hey so I'm about to crash, so should probably not ask this now... lol
[05:39:35] Stan: has joined #ruby
[05:40:11] qbrd[m]: but anyone know how to style a jekyll blog using the "gist" plugin, so that the gists match the general style of the blog.
[05:40:26] qbrd[m]: I'd settle for just "night mode"... lol
[06:09:47] jenrzzz: has joined #ruby
[06:11:23] apotheon: qbrd[m]: Thanks for the vote of confidence.
[06:12:18] qbrd[m]: por que no los dos.
[06:12:43] qbrd[m]: but to be honest, I just always hear my mothers voice in my head going "well what about this positive spin on things"
[06:13:06] qbrd[m]: I ❤️ my mommy. lol
[06:13:24] qbrd[m]: she has been a pain in my ass like ALL Of my life.
[06:13:28] apotheon: My font evidently doesn't have a heart glyph (or whatever that was supposed to be).
[06:13:46] apotheon: (copied to a non-console app)
[06:13:49] qbrd[m]: I mean, less than three
[06:14:03] qbrd[m]: pretty sure is universal heart. lawl.
[06:14:26] qbrd[m]: apotheon: are you in IRC or matrix?
[06:14:43] apotheon: Oh, you have that telltale [m] in your nick.
[06:14:47] apotheon: I should've noticed.
[06:14:49] qbrd[m]: OMG so dope!
[06:15:12] qbrd[m]: (I just built my matrix server... )
[06:15:25] qbrd[m]: I mean, I grew up around IRC
[06:15:30] qbrd[m]: I lived in IRC
[06:15:38] qbrd[m]: I got all my torrents in IRC
[06:15:54] qbrd[m]: I mean, what are torrents?
[06:16:13] qbrd[m]: but it's just such a PITA to have like 50 clients.
[06:16:18] apotheon: Torrents are those things you use to download open source OS installer images to save the project's bandwidth.
[06:16:29] qbrd[m]: between slck, discord, irc, glitter, uhhh
[06:16:38] qbrd[m]: webex teams
[06:16:50] qbrd[m]: %$!%$@^%@%$ webex teams btw
[06:17:01] qbrd[m]: rocket chat.
[06:17:16] apotheon: Yeah, that "yikes" was all about webex.
[06:17:18] qbrd[m]: I run a rocket chat server for a WoW clan. lawl.
[06:18:05] qbrd[m]: nojoke, I think there are as many "chat programs" as there are people in the company I work for.
[06:18:28] qbrd[m]: (>10k ppl)
[06:18:38] apotheon: It's past my bedtime -- and I think you said something about going to bed half an hour ago.
[06:18:57] qbrd[m]: good idea.
[06:19:50] qbrd[m]: https://www.youtube.com/watch?v=kn-AB78kvvE
[06:20:11] qbrd[m]: this is what just came on.
[06:20:23] qbrd[m]: must be bed time.
[06:22:38] corellian: has joined #ruby
[06:24:06] corellian: has joined #ruby
[06:50:58] andikr: has joined #ruby
[06:51:09] rorochan: has joined #ruby
[06:51:34] lxsameer: has joined #ruby
[07:05:03] suukim: has joined #ruby
[07:05:53] drincruz_: has joined #ruby
[07:07:48] TomyWork: has joined #ruby
[07:12:47] prestorium: has joined #ruby
[07:30:36] schne1der: has joined #ruby
[07:40:39] jenrzzz: has joined #ruby
[07:43:18] deepredsky: has joined #ruby
[07:48:47] h3ll0w0rld: has joined #ruby
[07:49:22] cthulchu_: has joined #ruby
[07:57:11] _whitelogger: has joined #ruby
[07:59:53] sandstrom: has joined #ruby
[08:01:49] jenrzzz: has joined #ruby
[08:01:53] mikecmpbll: has joined #ruby
[08:02:39] fphilipe_: has joined #ruby
[08:08:07] Dbugger: has joined #ruby
[08:39:03] User458764: has joined #ruby
[08:39:07] User4587_: has joined #ruby
[08:45:42] Sylario: has joined #ruby
[09:01:47] fphilipe_: has joined #ruby
[09:02:12] jenrzzz: has joined #ruby
[09:06:56] drincruz_: has joined #ruby
[09:11:21] drnerdius: has joined #ruby
[09:16:14] glosoli: has joined #ruby
[09:21:19] ramfjord: has joined #ruby
[09:25:29] chalkmonster: has joined #ruby
[09:39:46] ellcs: has joined #ruby
[10:00:14] Rudd0: has joined #ruby
[10:13:35] rorochan: has joined #ruby
[10:16:25] jenrzzz: has joined #ruby
[10:16:59] tim17d: has joined #ruby
[10:30:09] TvL2386_: has joined #ruby
[10:30:36] drincruz_: has joined #ruby
[10:41:20] tim17d: Hello everyone :) I have a question
[10:41:42] tim17d: is .unpack('C*') same as .bytes ?
[10:42:21] tim17d: I've noticed that the later is slightly more efficient and I was wondering if there's any reason to use the former on a String
[10:43:41] gregf_: has joined #ruby
[11:01:06] ytti: i assume them to be same
[11:01:27] ytti: but i wouldn't be terribly surprised if i was wrong, particularly relating i8n stuff
[11:01:39] ytti: that some corner case would exist
[11:01:56] AJA4350: has joined #ruby
[11:06:49] jenrzzz: has joined #ruby
[11:25:42] drnerdius: has joined #ruby
[11:32:22] fphilipe_: has joined #ruby
[11:36:08] sh7d: has joined #ruby
[11:42:36] conta: has joined #ruby
[11:46:07] nerdius: has joined #ruby
[11:52:13] kyrylo: has joined #ruby
[11:56:50] sandstrom: has joined #ruby
[12:00:22] deepredsky: has joined #ruby
[12:05:34] drincruz_: has joined #ruby
[12:07:50] jenrzzz: has joined #ruby
[12:16:20] drnerdius: has joined #ruby
[12:22:22] drnerdius: has joined #ruby
[12:22:35] cd: has joined #ruby
[12:23:33] kapilp: has joined #ruby
[12:31:23] conta: has joined #ruby
[12:31:50] cd: has joined #ruby
[12:35:33] drnerdius: has joined #ruby
[12:44:06] drnerdius: has joined #ruby
[12:45:27] Inline: has joined #ruby
[12:48:13] Nicmavr: has joined #ruby
[12:49:28] tdy: has joined #ruby
[12:51:27] za1b1tsu: has joined #ruby
[12:56:26] bmurt: has joined #ruby
[12:58:16] drnerdius: has joined #ruby
[13:00:37] ramfjord: has joined #ruby
[13:01:07] chalkmonster: has joined #ruby
[13:07:03] jcalla: has joined #ruby
[13:12:24] TomyWork: I'm looking for something that is roughly equivalent to backticks or IO.popen(...).read but that will throw an exception or something when the exit status is nonzero
[13:14:47] BTRE: has joined #ruby
[13:22:30] TomyWork: >> IO.popen('false') { |io| x = io.read; io.close; throw 'nonzero!' unless $?.success?; x } # this works, but it's kinda verbose. any idea how to shorten it significantly?
[13:22:36] ruby[bot]: TomyWork: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
[13:23:01] TomyWork: works on my machine *shrug*
[13:25:26] rippa: has joined #ruby
[13:27:52] TomyWork: >> IO.popen('echo foo') { |io| begin io.read; ensure io.close; throw 'Fehler!' unless $?.success?; end } # Got it a little shorter using an "ensure" for the error handling
[13:27:58] ruby[bot]: TomyWork: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
[13:28:24] TomyWork: actually it's longer, drat
[13:28:33] phaul: TomyWork: ruby[bot] evaluation is broken, use rubydoc with &>> prefix
[13:29:51] TomyWork: is there some kind of "assert" function?
[13:31:14] tuor: has joined #ruby
[13:32:44] ascarter: has joined #ruby
[13:40:00] TomyWork: &>> IO.popen('echo foo; exit 1') { |io| x = io.read; io.close; $?==0?x:fail }
[13:40:04] rubydoc: stderr: -e:2:in `block in <main>': unhandled exception (https://carc.in/#/r/7cam)
[13:40:12] TomyWork: &>> IO.popen('echo foo; exit 0') { |io| x = io.read; io.close; $?==0?x:fail }
[13:40:15] rubydoc: stderr: -e:2:in `block in <main>': unhandled exception (https://carc.in/#/r/7can)
[13:42:58] rubydoc: # => 1 (https://carc.in/#/r/7caq)
[13:43:04] TomyWork: ok at least this works
[13:43:27] ruby[bot]: TomyWork: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
[13:43:53] phaul: I am guessing the previous didn't work because the eval service runs inside jail for security reasons. So you can't access external shell
[13:45:26] TomyWork: i don't see that being a very effective security measure though
[13:45:44] phaul: &>> `ls -a /`
[13:45:45] rubydoc: # =>... check link for more (https://carc.in/#/r/7cau)
[13:46:12] TomyWork: a bit like blocking the context menu in windows explorer :)
[13:46:35] phaul: &>> `ls -a /home/`
[13:46:36] rubydoc: # => ".\n..\nruby\n" (https://carc.in/#/r/7cav)
[13:46:56] phaul: &>> `ls -a /home/ruby`
[13:46:56] rubydoc: # => ".\n..\n" (https://carc.in/#/r/7caw)
[13:46:59] reber: has joined #ruby
[13:47:06] TomyWork: &>> `echo $$`
[13:47:07] rubydoc: # => "" (https://carc.in/#/r/7cax)
[13:47:18] TomyWork: &>> `echo \$\$`
[13:47:18] rubydoc: # => "" (https://carc.in/#/r/7cay)
[13:47:41] TomyWork: oh well enough hacking the bot :)
[13:48:37] ta: has joined #ruby
[13:48:50] tuor: Hi, I would like to list all objects in a running ruby programm. How can I do that?
[13:49:07] phaul: ObjectSpace.each
[13:50:05] phaul: actually it's each_object
[13:50:05] tuor: I get a 'NoMethodError'
[13:50:23] phaul: sorry I didn'tremember the correct name ^
[13:51:21] bmurt: has joined #ruby
[13:51:36] phaul: there are quirks though, read the docs..
[13:51:45] phaul: &ri ObjectSpace.each_object
[13:51:46] rubydoc: https://ruby-doc.org/core-2.6.3/ObjectSpace.html#method-c-each_object
[13:51:50] TomyWork: http://ideone.com/WSSVPk this one works
[13:52:20] chalkmonster: has joined #ruby
[13:52:29] ta: has joined #ruby
[13:53:22] drincruz_: has joined #ruby
[13:54:26] deathwishdave: has joined #ruby
[13:54:37] tuor: I'm close: `ObjectSpace.each_object { |o| pp o } ` but it prints the complete objects, I only want the object names...
[13:55:56] tuor: like: `a = [ 'q', 'w' ]` should be rpinted as just 'a' or even 'a => String'
[13:59:57] lucasb: has joined #ruby
[14:01:17] tuor: OK. How can I print all variables?
[14:02:54] fphilipe_: has joined #ruby
[14:05:09] phaul: &>> Kernel.methods.grep(/variables/)
[14:05:11] rubydoc: # => [:local_variables, :global_variables, :class_variables, :instance_variables] (https://carc.in/#/r/7cb8)
[14:07:42] sagax: has joined #ruby
[14:10:09] x86sk: has joined #ruby
[14:14:14] greengriminal: has joined #ruby
[14:14:33] TomyWork: anyone wanna play code-golf? :) IO.popen('echo foo; exit 0/1'){|p|x=p.read.chomp;p.close;$?==0?x:My_Error_Message_Here} # conditions are: 1. if the command exits with status zero, return the result as a string, minus the newline at the end. 2. if the command exits with a nonzero status, abort the program with a somewhat identifiable message containing "My Error Message Here" or something close.
[14:21:19] TomyWork: IO.popen('echo foo; exit 0/1').readlines[0].chop # this works if we assume that the command outputs nothing if it fails and a single terminated by a newline if it succeeds.
[14:21:31] dhollinger: has joined #ruby
[14:27:47] k13nox: has joined #ruby
[14:38:03] jenrzzz: has joined #ruby
[14:41:38] tuor: phaul: ah thx!
[14:42:01] tuor: `self.instance_variables` is good. :)
[14:42:08] tuor: got what I needed.
[14:43:31] tuor: can I shorten? `"asdfqwerzxcv".gsub(/^a/, '').gsub(/qwer/, '').gsub(/v$/, '')`
[14:44:38] jenrzzz: has joined #ruby
[14:45:55] phaul: &>> "asdfqwerzxcv".sub(/^a(.*)qwer(.*)v$/, '\1\2')
[14:45:55] rubydoc: # => "sdfzxc" (https://carc.in/#/r/7cbd)
[14:46:59] rushsteve1: has joined #ruby
[14:50:21] galaxie: has joined #ruby
[14:54:03] jottr: has joined #ruby
[14:54:17] lord4163: has joined #ruby
[15:02:01] drincruz: has joined #ruby
[15:06:33] sriehl: has joined #ruby
[15:08:48] Ryctolagus: has joined #ruby
[15:09:03] fphilipe_: has joined #ruby
[15:10:04] rushsteve1: Hi I was wondering if I could get someone to review a patch I submitted last week? It's very simple, only 2 lines. https://bugs.ruby-lang.org/issues/15244#note-10
[15:10:31] rushsteve1: If this is the wrong place to be asking this, please let me know. This is my first submission so I'm still a bit confused on the workflow.
[15:10:57] involans: has joined #ruby
[15:12:18] canton7: rushsteve1, haven't you lost the "if (*p)" case?
[15:13:25] rushsteve1: Hmm yes I guess that could cause an issue if p is null
[15:13:35] kyrylo: has joined #ruby
[15:14:18] canton7: rushsteve1, well if p is null, *p is already a problem. I assume there's a check for that above. The while loop seems to be looping over \0 bytes?
[15:16:35] rushsteve1: Ah I see it's stopping at the 0 byte to account for string termination.
[15:17:15] canton7: d'oh, yes, I had it backwards
[15:17:52] canton7: it does seem redundant...
[15:18:32] rushsteve1: Yes but it might handle an obscure edge case
[15:18:39] rushsteve1: I updated the patch on the issue
[15:23:25] ramfjord: has joined #ruby
[15:27:28] deathwishdave: has joined #ruby
[15:31:15] orbyt_: has joined #ruby
[15:34:22] AJA4351: has joined #ruby
[15:37:02] AJA4350: has joined #ruby
[15:37:04] jenrzzz: has joined #ruby
[15:38:36] AJA4350: has joined #ruby
[15:39:04] cyclonis_: has joined #ruby
[15:43:31] rushsteve1: Anyone else have any feedback on the patch I submitted?
[15:43:41] rushsteve1: Link again: https://bugs.ruby-lang.org/issues/15244#note-10
[15:45:04] cyclonis: has joined #ruby
[15:47:18] davor: has joined #ruby
[15:47:48] cagomez: has joined #ruby
[15:47:50] Ryctolagus: has joined #ruby
[15:48:23] oetjenj: has joined #ruby
[15:49:31] orbyt_: has joined #ruby
[15:51:04] cyclonis: has joined #ruby
[15:51:36] jottr: has joined #ruby
[15:52:56] chalkmonster: has joined #ruby
[15:57:22] cyclonis: has joined #ruby
[16:01:35] jenrzzz: has joined #ruby
[16:01:55] ramfjord: has joined #ruby
[16:02:00] Ryctolagus: has joined #ruby
[16:03:21] cyclonis: has joined #ruby
[16:04:29] jottr: has joined #ruby
[16:08:29] involans: has joined #ruby
[16:09:21] cyclonis: has joined #ruby
[16:09:44] involans: has joined #ruby
[16:11:50] jenrzzz: has joined #ruby
[16:15:22] cyclonis: has joined #ruby
[16:21:22] cyclonis: has joined #ruby
[16:22:21] Ryctolagus: has joined #ruby
[16:27:22] cyclonis: has joined #ruby
[16:33:22] cyclonis: has joined #ruby
[16:35:48] ascarter: has joined #ruby
[16:36:54] Guest79914: has joined #ruby
[16:38:07] ascarter: has joined #ruby
[16:39:23] cyclonis: has joined #ruby
[16:42:12] ramfjord: has joined #ruby
[16:45:23] cyclonis: has joined #ruby
[16:46:13] sh7d: has joined #ruby
[16:48:56] involans: has joined #ruby
[16:50:40] jottr: has joined #ruby
[16:51:23] cyclonis: has joined #ruby
[16:52:40] pwnd_nsfw: has joined #ruby
[16:54:25] UserOO7: has joined #ruby
[16:57:23] cyclonis: has joined #ruby
[16:57:27] ramfjord: has joined #ruby
[17:00:31] jenrzzz: has joined #ruby
[17:03:23] cyclonis: has joined #ruby
[17:09:23] cyclonis: has joined #ruby
[17:09:31] tf2ftw: has joined #ruby
[17:10:21] jenrzzz: has joined #ruby
[17:13:55] za1b1tsu: has joined #ruby
[17:15:23] cyclonis: has joined #ruby
[17:21:24] cyclonis: has joined #ruby
[17:21:26] jottr: has joined #ruby
[17:27:23] cyclonis: has joined #ruby
[17:30:39] cliluw: has joined #ruby
[17:31:04] jenrzzz: has joined #ruby
[17:33:24] cyclonis: has joined #ruby
[17:38:42] cliluw: has joined #ruby
[17:39:37] fphilipe_: has joined #ruby
[17:41:09] Ryctolagus: has joined #ruby
[17:41:11] faces: has joined #ruby
[17:49:54] CrazyEddy: has joined #ruby
[17:58:07] jottr: has joined #ruby
[18:02:11] chalkmonster: has joined #ruby
[18:06:40] leitz: has joined #ruby
[18:07:19] duderonomy: has joined #ruby
[18:08:06] orbyt_: has joined #ruby
[18:17:13] orbyt_: has joined #ruby
[18:18:10] jottr: has joined #ruby
[18:31:04] jmcgnh: has joined #ruby
[18:40:55] oetjenj: has joined #ruby
[18:42:04] sameerynho: has joined #ruby
[18:43:45] Inline__: has joined #ruby
[18:45:14] hiroaki: has joined #ruby
[18:46:40] fphilipe_: has joined #ruby
[18:47:47] morenoh149: has joined #ruby
[18:53:52] leitz: Almost back in Ruby land...
[18:55:58] Inline: has joined #ruby
[18:57:43] havenwood: leitz: Welcome almost back!
[18:57:58] ramfjord: has joined #ruby
[19:06:30] leitz: havenwood, present thanks for an almost event! I was out of country, and chose to be totally off-line, for a week. Came back with a bad cold and had to work long days all week. In a few hours I'm back on to a normal schedule. Still dealing with the cold, though.
[19:07:35] leitz: I have another person who may contribute some code to my crewgen project. He needs/wants to learn Ruby and I'm happy to encourage that.
[19:09:29] teardown: has joined #ruby
[19:17:16] apotheon: I've become a Ruby mentor in the last week as well.
[19:17:21] gix: has joined #ruby
[19:18:11] leitz: apotheon, great job!
[19:21:01] leitz: Not sure if it would help, but here are my notes on mentoring an on-line group. https://github.com/LeamHall/90DW_mentoring
[19:21:24] apotheon: cool, I'll check it out
[19:21:33] leitz: The project was to spend 90 days learning C, with weekly chats via IRC.
[19:21:58] leitz: I keep thinking about doing the same thing with Ruby, or a facet of Ruby like RSpec.
[19:22:32] leitz: Let me know if you see any way to improve the process.
[19:26:36] apotheon: In my particular case, I'm just mentoring one person who's already in the same channel as me pretty much every day. I recommended a book, and he immediately started enjoying himself. I answer questions, offer advice on progress, help with debugging in a way that explains "why" . . . and when he's done with the book, I've got another suggestion to boost his game.
[19:27:21] apotheon: I find that, often, the hardest parts are getting people to click with the productive idioms of a language and helping figure out good projects to use for practical . . . practice.
[19:27:30] apotheon: (because good projects can be a very individualistic thing)
[19:27:45] leitz: I found choosing a book to be a great start. It saved me the trouble of explaining stuff that others have explained very well, and if someone isn't committed enough to get a book then are they really committed to learning?
[19:28:43] leitz: I'm at the "do a project" stage myself. Feeling the pressure to produce quickly versus the pressure to do things very well. :)
[19:30:37] apotheon: While it's pretty old, I find that Russ Olsen's Eloquent Ruby is the best practical intro to a programming language I've ever encountered.
[19:31:07] apotheon: It's close enough to current Ruby that, for a beginner level, I can shore up the age-related weaknesses just by being available to answer questions.
[19:31:51] apotheon: Before ER got published, Everyday Scripting With Ruby was my favorite Ruby beginner book.
[19:33:38] leitz: I spent the off-line week reading "The Well Grounded Rubyist". Pretty good, but not for a non-programmer. I've asked Dave Thomas if he's going to update "Programming Ruby". Hopefully one day.
[19:35:05] leitz: "Head First Ruby" was what I used when getting back into the swing of things.
[19:39:15] apotheon: I think Eloquent Ruby requires at least as much background in programming as for a sysadmin with a couple years of experience, or an experienced hobby Unix-like OS user who isn't afraid of the command line at minimum.
[19:41:52] morenoh149: has joined #ruby
[19:43:20] jenrzzz: has joined #ruby
[19:45:42] morenoh149: has joined #ruby
[19:48:56] jenrzzz_: has joined #ruby
[19:53:06] stooj: has joined #ruby
[19:54:09] glosoli: has joined #ruby
[20:10:38] Swyper: has joined #ruby
[20:16:02] nowhere_man: has joined #ruby
[20:18:34] Swyper: has joined #ruby
[20:19:36] morenoh149: anyone use asdf to install ruby? getting error "asdf: No version set for command bundle" when trying to run bundle
[20:20:44] Swyper: has joined #ruby
[20:25:19] orbyt_: has joined #ruby
[20:31:00] oetjenj: has joined #ruby
[20:32:33] greengriminal: has joined #ruby
[20:39:08] bmurt: has joined #ruby
[20:41:46] Swyper: has joined #ruby
[21:00:24] conta1: has joined #ruby
[21:04:25] havenwood: morenoh149: What version of Ruby are you installing? Bundler only ships with very recent. Otherwise: gem install bundler
[21:04:45] havenwood: morenoh149: https://github.com/asdf-vm/asdf-ruby
[21:04:49] morenoh149: ah, I was using ruby 2.1
[21:05:10] havenwood: morenoh149: Ah, yeah, Bundler does not ship with Ruby 2.1. RubyGems does, so you can: gem install bundler
[21:05:32] morenoh149: interesting thanks
[21:09:37] havenwood: morenoh149: If you *must* use a Ruby that old, make sure to use one that maintains back-ported security patches.
[21:10:02] havenwood: morenoh149: Why do you need to use an ancient Ruby? I'm curious.
[21:10:12] morenoh149: has joined #ruby
[21:10:20] apotheon: I just rbenv the hell out of everything. 1. install system Ruby; 2. install rbenv; 3. install other Rubies; 4. . . .; 5. Profit!
[21:10:49] apotheon: I should probably stop supporting 1.9.3 for my gem that still supports that version.
[21:11:07] _dbugger: has joined #ruby
[21:15:45] havenwood: 2.6.3 ftw ;)
[21:15:58] Ryctolagus: Any suggestions for a good editor/IDE for working in JRuby on windows7?
[21:16:13] havenwood: Ryctolagus: VS Code
[21:16:49] havenwood: Ryctolagus: https://www.hanselman.com/blog/RubyOnRailsOnWindowsIsNotJustPossibleItsFabulousUsingWSL2AndVSCode.aspx
[21:16:55] hiroaki: has joined #ruby
[21:17:10] havenwood: Ryctolagus: https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.vscode-remote-extensionpack&WT.mc_id=-blog-scottha
[21:17:20] fphilipe_: has joined #ruby
[21:18:04] Ryctolagus: havenwood:That looks awesome, sadly they are not on win 10 yet :(
[21:18:16] havenwood: Ryctolagus: Sorry, you said 7 and I missed it.
[21:18:40] havenwood: Ryctolagus: Isn't Windows 7... past EoL?
[21:19:00] havenwood: "extended support won't end until January 14, 2020"
[21:19:03] havenwood: I guess not!
[21:19:09] Ryctolagus: havenwood:VERY soon it will be
[21:19:31] Ryctolagus: currently looking at Rubymine :/
[21:19:39] havenwood: Ryctolagus: They have a lovely WSL2 future to look forward to!
[21:20:32] Ryctolagus: havenwood: Truth! Then I won't have to build a weird bobcat/tomcat server behind IIS to deploy these too <face to desk>
[21:20:40] apotheon: I've never worked with JRuby, but if I was stuck on Windows I'd probably just use Vim for Ruby dev.
[21:20:56] havenwood: Ryctolagus: VS Code or Atom should do nicely. I've noticed some newer Rubyists and Railists prefer RubyMine in particular. At RubyKaigi the VS Code board had the most stars.
[21:21:32] apotheon: I've heard good things about VS Code, and Atom is pretty tolerable too, so those might be fine options.
[21:21:36] havenwood: Ryctolagus: VS Code has nice Ruby integrations. Tons of nice options, but that makes sense to me on Win.
[21:21:43] apotheon: (if you're into that kind of editor)
[21:21:44] Ryctolagus: apotheon: That is my typical setup, vim WTF!
[21:21:56] apotheon: Ryctolagus: s/WTF/FTW/ ?
[21:22:32] apotheon: I sometimes use interactive_ruby to turn Vim into a kind of inside-out IDE.
[21:22:32] Ryctolagus: apotheon: yep brain moving faster then fingers
[21:22:38] havenwood: Ryctolagus: The base VS Code Ruby package has a number of integrations available out of the box to help it act more like an IDE.
[21:22:51] havenwood: And add linting, etc.
[21:23:25] Ryctolagus: I will try out both VS code and Rubymine. Thank you both.
[21:23:30] havenwood: I'd suggest taking a few minutes to setup a good configuration, then proliferate that, if you're setting up multiple Win 7 workstations.
[21:23:32] apotheon: I haven't used interactive_ruby for a while. I should start using that again. It's pretty handy.
[21:24:09] havenwood: apotheon: You mean IRB? Or is interactive_ruby a thing?
[21:24:15] Ryctolagus: apotheon: was was recently (yesterday) made aware of Pry.
[21:24:36] apotheon: havenwood: There's a thing called interactive_ruby that integrates Vim and IRB.
[21:24:58] havenwood: apotheon: Ahhhh, right!
[21:25:06] apotheon: havenwood: I've used Pry when Rails dev was my everday professional task.
[21:25:38] Ryctolagus: apotheon: Thats where I now sit.
[21:25:46] havenwood: The IRB in Ruby trunk has gotten some nice improvements, like syntax highlighting.
[21:26:11] havenwood: And we already have: binding.irb
[21:26:23] apotheon: havenwood: I could open a file in Vim from within IRB, then when I closed Vim I'd be back in IRB and have the context of it available, and so on. It was a REPL with an editor in it, instead of the usual IDE approach of an editor with a REPL inside it.
[21:26:23] havenwood: It's nice to see IRB move towards parity with Pry.
[21:27:02] havenwood: apotheon: That's funny, I do the same interaction but between Pry and Atom/Vim/editor-of-the-week.
[21:27:13] apotheon: I'd take another Rails job, I guess. It's better than having to write Python. The only Python dev I ever enjoyed was using Flask.
[21:27:44] havenwood: https://youtu.be/D9j_Mf91M0I
[21:27:50] Ryctolagus: I kind of stumbled into this one.
[21:27:51] apotheon: I dream of getting a C job, though.
[21:28:23] Ryctolagus: Common Lisp would be my cloud 9
[21:28:39] Ryctolagus: apotheon: have you tried Rust at all?
[21:28:49] apotheon: briefly, slightly
[21:29:16] Ryctolagus: apotheon: I played with it a bit, got the book, made it 60% through before determining it was not applicable to my day to day.
[21:29:29] oetjenj: has joined #ruby
[21:30:26] oetjenj: has joined #ruby
[21:30:56] Ryctolagus: the concept of ownership are very intriguing.
[21:31:04] oetjenj: has joined #ruby
[21:31:27] apotheon: Yeah, I didn't get far into Rust because I haven't found a use for it, basically.
[21:31:29] havenwood: this discussion reminds me of Artichoke Ruby
[21:31:30] havenwood: https://github.com/artichoke/artichoke
[21:31:45] oetjenj: has joined #ruby
[21:31:53] havenwood: https://github.com/wasmerio/ruby-ext-wasm
[21:31:55] apotheon: I hadn't heard of Artichoke Ruby.
[21:32:14] havenwood: You can try it in the browser: https://artichoke.github.io/artichoke/
[21:32:24] jottr: has joined #ruby
[21:32:36] oetjenj: has joined #ruby
[21:33:33] oetjenj: has joined #ruby
[21:33:35] Ryctolagus: Oh man! That would be the bees knees!
[21:33:42] apotheon: I can't wait for a second attempt to create something like WASM, learning from the mistakes of the first.
[21:33:51] apotheon: I should get going.
[21:34:04] oetjenj: has joined #ruby
[21:34:32] Ryctolagus: apotheon:Thank you for your advice and have a pleasant weekend.
[21:34:45] apotheon: You're welcome. Have a good'un.
[21:34:52] oetjenj: has joined #ruby
[21:35:37] oetjenj: has joined #ruby
[21:36:16] Ryctolagus: havenwood: I may need to pick my Rust book up again, this project would be worth contributing to.
[21:36:27] oetjenj: has joined #ruby
[21:37:12] oetjenj: has joined #ruby
[21:37:57] oetjenj: has joined #ruby
[21:38:50] oetjenj: has joined #ruby
[21:39:33] oetjenj: has joined #ruby
[21:40:20] oetjenj: has joined #ruby
[21:41:12] oetjenj: has joined #ruby
[21:41:53] oetjenj: has joined #ruby
[21:42:37] oetjenj: has joined #ruby
[21:43:17] oetjenj: has joined #ruby
[21:43:31] hiroaki: has joined #ruby
[21:44:05] oetjenj: has joined #ruby
[21:45:05] oetjenj: has joined #ruby
[21:45:50] oetjenj: has joined #ruby
[21:49:36] Swyper: has joined #ruby
[21:58:01] Intelo: has joined #ruby
[21:58:21] Intelo: Whats the difference between ruby 4 and 5/6?
[21:58:27] Intelo: Is it major difference?
[22:00:20] havenwood: Intelo: Ruby 3 isn't out yet!
[22:01:15] havenwood: Intelo: This Christmas, Ruby 2.7 will be released. The current Ruby is Ruby 2.6.3.
[22:01:38] havenwood: Intelo: Do you mean Rails 4-6?
[22:01:45] havenwood: Intelo: Or something else?
[22:02:16] morenoh149: has joined #ruby
[22:02:55] Intelo: sorry. I meant 2.3 2.4. 2.5
[22:03:13] Intelo: oh sorry....
[22:03:17] Intelo: sory sory
[22:03:30] Intelo: I meant rails.
[22:04:24] jottr: has joined #ruby
[22:04:47] havenwood: Intelo: Yes, there are fairly substantial improvements and additions. Rails 5 introduced Action Cable and Rails API mode and Rails 6 introduces things including Action Mailbox and Active Text.
[22:04:59] Intelo: havenwood,
[22:05:29] Ryctolagus: havenwood: rubymine with Jruby is s.l.o.w. rubocop takes about 5-6 seconds to notice a change in the file.
[22:06:27] havenwood: Ryctolagus: Are you using the --dev flag?
[22:07:01] Intelo: havenwood, ok
[22:07:06] Intelo: havenwood, difference between 3 and 4?
[22:07:07] havenwood: Ryctolagus: Let's talk in #jruby!
[22:13:04] ramfjord_: has joined #ruby
[22:15:44] chalkmonster: has joined #ruby
[22:15:55] Swyper: has joined #ruby
[22:17:01] havenwood: Intelo: https://guides.rubyonrails.org/images/rails4_features.png
[22:18:13] fphilipe_: has joined #ruby
[22:21:58] Fernando-Basso: has joined #ruby
[22:22:40] orbyt_: has joined #ruby
[22:22:46] jenrzzz: has joined #ruby
[22:27:45] admin123: has joined #ruby
[22:29:32] ellcs: has joined #ruby
[22:33:44] jenrzzz: has joined #ruby
[22:51:48] jenrzzz: has joined #ruby
[23:01:44] Intelo: havenwood, any good video free tutorial for ruby?
[23:05:03] havenwood: Intelo: There are a number. Ruby Tapas are quite nice and a number are few, afair.
[23:05:14] havenwood: a number are free*
[23:05:26] Intelo: havenwood, some any?
[23:05:33] Intelo: link* any havenwood
[23:08:19] havenwood: Intelo: https://www.rubytapas.com/
[23:11:11] henninb: has joined #ruby
[23:12:46] Intelo: havenwood, I meant video tutorials
[23:13:01] havenwood: Those are videos.
[23:13:03] adam12: Intelo: driftingruby.com maybe?
[23:13:18] havenwood: Intelo: You want to generally learn Ruby? Any area of interest?
[23:13:23] jenrzzz: has joined #ruby
[23:14:53] Intelo: havenwood, just new to ruby. want to know its syntax
[23:15:07] Intelo: havenwood, all of it. As I have a big project in RoR
[23:15:25] Intelo: I have tutorial in RoR but cannot find of rub
[23:23:25] Nicmavr: has joined #ruby
[23:25:51] DaRock: has joined #ruby
[23:27:43] tim17d: has joined #ruby
[23:28:59] havenwood: Intelo: What gems are involved. Do you have experience in other programming langs?
[23:29:08] havenwood: Intelo: Which langs?
[23:29:29] havenwood: Intelo: I find Ruby REPLs incredibly helpful for exploring the lang.
[23:29:32] havenwood: ?irb Intelo
[23:29:32] ruby[bot]: Intelo: irb is "interactive ruby", it is part of ruby. You can run ruby code and see results immediately. it's useful for testing code. Also see ?pry, a gem which is a popular alternative to irb.
[23:29:34] havenwood: ?pry Intelo
[23:29:34] ruby[bot]: Intelo: Pry, the better IRB, provides easy object inspection `ls`, `history`, viewing docs `?`, viewing source `$`, syntax highlighting and other features (see `help` for more). Put `binding.pry` in your source code for easy debugging. Install Pry (https://pryrepl.org/): gem install pry pry-doc
[23:36:35] Intelo: havenwood, I did java and javascript
[23:37:06] havenwood: Intelo: https://www.ruby-lang.org/en/documentation/ruby-from-other-languages/to-ruby-from-java/
[23:37:09] Intelo: looking for videos
[23:37:41] havenwood: Intelo: https://ruby.github.io/TryRuby/
[23:37:53] havenwood: It's not a video, but it's interactive.
[23:38:17] Intelo: I am thankful but looking for professional videos like lynd
[23:38:48] havenwood: Intelo: I don't know of high quality, free videos to learn Ruby.
[23:39:05] Intelo: ok.. thanks
[23:39:08] Intelo: got to go for now
[23:39:12] havenwood: Intelo: There are tons of free Ruby resources. I learned Ruby for free.
[23:42:26] Intelo_: has joined #ruby
[23:57:50] admin123: has joined #ruby