« Back to channel list

#ruby - 31 January 2019

« Back 1 day Forward 1 day »
[00:07:04] AJA4350: has joined #ruby
[00:09:37] rkazak: has joined #ruby
[00:13:11] orbyt_: has joined #ruby
[00:16:53] Swyper: has joined #ruby
[00:43:20] Swyper: has joined #ruby
[00:46:18] Azure: has joined #ruby
[00:48:28] mkroman: is puma still the ducks guts when it comes to web servers?
[00:48:51] houhoulis: has joined #ruby
[00:50:46] havenwood: mkroman: Puma is the standard. Falcon is a new contender.
[00:50:47] havenwood: https://github.com/socketry/falcon#readme
[00:52:34] mkroman: I see… thanks.
[00:54:25] mat_bug: has joined #ruby
[00:55:19] Swyper: has joined #ruby
[01:00:44] Swyper: has joined #ruby
[01:04:42] hahuang6-: has joined #ruby
[01:06:52] Xiti: has joined #ruby
[01:18:18] blackmesa1: has joined #ruby
[01:25:35] kristofferR: has joined #ruby
[01:43:55] tdy: has joined #ruby
[01:55:29] n13z_: has joined #ruby
[02:08:53] TvL2386: has joined #ruby
[02:15:07] akemot: has joined #ruby
[02:24:06] mat_bug: has joined #ruby
[02:26:56] Radar: TIL falcon
[02:33:13] blackmesa1: has joined #ruby
[02:53:29] xlegoman: has joined #ruby
[03:10:00] gf3: has joined #ruby
[03:25:47] gf3: has joined #ruby
[03:33:58] tdy: has joined #ruby
[03:34:27] gf3: has joined #ruby
[03:36:26] yoshie902a: has left #ruby: ()
[03:40:29] scottj: has joined #ruby
[03:46:45] xlegoman: has joined #ruby
[03:47:40] blackmesa: has joined #ruby
[04:05:47] blackmesa1: has joined #ruby
[04:08:57] braincrash: has joined #ruby
[04:21:11] LenPayne: has joined #ruby
[04:25:23] Nicmavr: has joined #ruby
[04:40:29] ramfjord: has joined #ruby
[04:46:11] dellavg_: has joined #ruby
[04:50:39] ramfjord: has joined #ruby
[04:51:32] tdy: has joined #ruby
[04:56:57] mat_bug: has joined #ruby
[04:58:28] blackmesa: has joined #ruby
[05:01:05] esrse: has joined #ruby
[05:04:20] RiPuk: has joined #ruby
[05:24:33] Swyper: has joined #ruby
[05:25:19] blackmesa: has joined #ruby
[05:35:24] \void: has joined #ruby
[05:43:31] mat_bug: has joined #ruby
[05:44:44] ramfjord: has joined #ruby
[05:52:36] DTZUZO: has joined #ruby
[06:00:51] cnsvc: has joined #ruby
[06:15:11] akemot: has joined #ruby
[06:21:30] conta: has joined #ruby
[06:25:22] tdy: has joined #ruby
[06:41:07] ItsAVortex: has joined #ruby
[06:41:30] baweaver: Going to be experimenting with S-Expressions and ASTs with some code modification thrown in this weekend: https://www.twitch.tv/events/xRFGM18bTUy2jBOIro5YZg
[06:46:28] mat_bug: has joined #ruby
[07:05:46] Xiti: has joined #ruby
[07:10:34] johnny56: has joined #ruby
[07:12:07] jokester: has joined #ruby
[07:40:56] aupadhye: has joined #ruby
[07:41:28] clemens3: has joined #ruby
[07:43:20] Mortomes|Work: has joined #ruby
[07:48:29] kristofferR: has joined #ruby
[08:01:22] kristoff_: has joined #ruby
[08:04:53] aufi: has joined #ruby
[08:15:37] mat_bug: has joined #ruby
[08:21:01] dinfuehr: has joined #ruby
[08:21:41] APK: has joined #ruby
[08:23:33] ericboehs: has joined #ruby
[08:28:52] jebix666: has joined #ruby
[08:29:13] tuor: has joined #ruby
[08:32:26] KevinSjoberg: has joined #ruby
[08:33:14] BH23: has joined #ruby
[08:34:26] meinside: has joined #ruby
[08:36:13] jebix666: Hello, trying to get a grasp of the queuing functionality of Ruby. I looked at this example(https://ruby-doc.org/stdlib-2.0.0/libdoc/thread/rdoc/Queue.html) and it works, but I do not understand how. Does the last line “consumer.join” also triggers the producer or what does cause it to ingest into the queue. Sorry in advance for the dumb question.
[08:42:01] clemens3_: has joined #ruby
[08:43:33] dinfuehr: has joined #ruby
[08:44:55] tbuehlmann: the producer threads puts items in the queue and the consumer threads takes items out of the queue. if a program reaches the end of the file, the program will exit and the threads will be killed, even if they are still doing their things. if you want to wait for the threads to finish their things, you can call .join on them, that's what it's for
[08:47:44] kristofferR: has joined #ruby
[08:48:16] jebix666: Thanks, so without the join at the end, they are esentially background processes and the script exits immediately but those threads continue working?
[08:49:55] tbuehlmann: right, threads run concurrently to your main thread. they will be killed when the program is exited, though, they don't continue
[08:54:26] jebix666: Ah okay, that makes sense
[08:57:58] liya: has joined #ruby
[08:58:28] bruce_lee: has joined #ruby
[08:59:25] karochMyaso: has joined #ruby
[09:03:35] dinfuehr: has joined #ruby
[09:06:40] mikecmpbll: has joined #ruby
[09:22:12] ramfjord: has joined #ruby
[09:22:45] armyriad: has joined #ruby
[09:28:24] ramfjord: has joined #ruby
[10:01:25] dhollin3: has joined #ruby
[10:07:08] Xeago_: has joined #ruby
[10:12:05] za1b1tsu: has joined #ruby
[10:16:54] ramfjord: has joined #ruby
[10:18:33] blackmesa: has joined #ruby
[10:23:29] Fusl: has joined #ruby
[10:28:24] paranoicsan: has joined #ruby
[10:34:38] scottj: has left #ruby: ()
[10:37:32] Guest16678: has joined #ruby
[10:42:23] cow[moo]: has joined #ruby
[10:49:38] blackmesa: has joined #ruby
[10:56:35] ramfjord: has joined #ruby
[11:02:55] blackmesa: has joined #ruby
[11:10:07] arekushi: has joined #ruby
[11:18:09] conta: has joined #ruby
[11:26:45] ramfjord: has joined #ruby
[11:37:40] spiette: has joined #ruby
[11:44:20] snk: has joined #ruby
[11:52:25] paranoicsan: has joined #ruby
[12:01:50] AJA4350: has joined #ruby
[12:22:12] ellcs: has joined #ruby
[12:31:18] danst: has joined #ruby
[12:31:56] danst: hi, is it possible to ask "TCPSocket.available?" or similar before reading TCPSocket.gets ?
[12:32:22] danst: I'm trying to avoid threading, so I just do small things in a loop and then read string when done
[12:32:30] danst: then when nothing available I continue do small things
[12:32:33] danst: possible with ruby?
[12:32:52] danst: I think it should be possible to do similar as on arduino with Serial.available?
[12:35:18] danst: I just want to omit lock on gets
[12:35:32] danst: so it doesn't wait for input but does something else
[12:35:40] danst: and reads input only if there's something available on the socket
[12:36:05] danst: since it's simple irc bot, whenever > 0 bytes available, I can gets
[12:36:23] danst: the goal of this is to add a timer
[12:37:21] danst: and I can't really check for elapsed time while gets is hanging the process
[12:37:29] danst: while channel is idle
[12:38:12] Leifr: has joined #ruby
[12:40:16] bhaak: possibly IO.select
[12:40:55] bhaak: but for a simple IRC bot I wouldn't do any lowlevel network stuff myself but just use cinch
[12:46:33] danst: bhaal: I've tried ready = IO.select([@socket]); and do @socket.gets if ready[0]
[12:46:55] danst: but it works same as without it, ready[0] returns [#<TCPSocket:fd 10, AF_INET, 192.168.70.187, 55003>] always
[12:47:47] danst: it still locks ;s
[12:48:56] bhaak: have you opened the connection with connect_nonblock?
[12:49:11] danst: maybe I have to timeout socketwaiting for 0.5 seconds
[12:53:00] al2o3-cr: danst: what about Socket#nread
[12:53:38] al2o3-cr: returns the amount of bytes that can be read without blocking
[12:54:04] danst: I think I'm using TCPSocket
[12:54:18] danst: found nonblock_read for it
[12:57:54] paranoicsan: has joined #ruby
[13:01:52] ramfjord: has joined #ruby
[13:01:53] fritzroy15: has joined #ruby
[13:02:20] fritzroy15: hello, I'm having a hard time installing ruby with rvm on docker, has anyone else gone down that rabbit hole?
[13:02:50] akem: has joined #ruby
[13:04:50] danst: oh no it's so bad.... just found it as accepted on stackoverflow: Timeout::timeout(1) { line=io.gets }
[13:04:54] nowhereman: has joined #ruby
[13:05:16] danst: well if it works I'm ok with it
[13:07:17] bruce_lee: fritzroy15:
[13:07:19] bruce_lee: maybe "chruby" and "ruby-install" are working...
[13:07:20] bruce_lee: https://github.com/postmodern/chruby/
[13:07:22] bruce_lee: https://github.com/postmodern/ruby-install/
[13:12:56] danst: yay timeout did it
[13:22:25] AJA4350: has joined #ruby
[13:25:04] ramfjord: has joined #ruby
[13:30:08] ramfjord: has joined #ruby
[13:30:45] blackmesa: has joined #ruby
[13:42:05] ellcs: has joined #ruby
[13:42:49] blackmesa: has joined #ruby
[13:44:11] nowhereman: has joined #ruby
[13:53:17] cd: has joined #ruby
[13:59:04] ramfjord: has joined #ruby
[14:07:54] paranoicsan: has joined #ruby
[14:10:51] connor_goodwolf: has joined #ruby
[14:22:16] connor_goodwolf: has joined #ruby
[14:23:09] connor_goodwolf: has joined #ruby
[14:23:58] JamieD: has joined #ruby
[14:28:09] ramfjord: has joined #ruby
[14:28:52] AJA4351: has joined #ruby
[14:38:33] krawchyk: has joined #ruby
[14:40:04] danst: yay timeout did it should be this channel meme
[14:40:31] Rapture: has joined #ruby
[14:41:09] priodev: has joined #ruby
[14:47:32] ellcs: has joined #ruby
[14:52:35] CrazyEddy: has joined #ruby
[15:04:10] AJA4351: has joined #ruby
[15:05:38] Nicmavr: has joined #ruby
[15:07:02] cubillosxy_py: has joined #ruby
[15:09:09] planigan: has joined #ruby
[15:11:18] krawchyk: has joined #ruby
[15:22:16] Renich: has joined #ruby
[15:22:28] rippa: has joined #ruby
[15:23:59] blackmesa: has joined #ruby
[15:28:30] blackmesa1: has joined #ruby
[15:31:39] nowhereman: has joined #ruby
[15:35:11] gnufied: has joined #ruby
[15:37:51] Dbugger: has joined #ruby
[15:38:31] AJA4351: has joined #ruby
[15:39:07] polishdub: has joined #ruby
[15:44:06] nowhereman: has joined #ruby
[15:44:39] r29v: has joined #ruby
[15:44:49] stryek: has joined #ruby
[15:53:04] alfiemax: has joined #ruby
[16:01:56] davidw: has joined #ruby
[16:09:12] segy: has joined #ruby
[16:11:22] JamieD: has joined #ruby
[16:17:39] DTZUZO: has joined #ruby
[16:22:46] za1b1tsu: has joined #ruby
[16:24:07] Renich_: has joined #ruby
[16:28:54] AJA4350: has joined #ruby
[16:29:37] alfiemax_: has joined #ruby
[16:31:17] houhoulis: has joined #ruby
[16:33:05] bathtub_shark: has joined #ruby
[16:41:40] Xeago: has joined #ruby
[16:43:41] duderonomy: has joined #ruby
[16:43:59] Xeago_: has joined #ruby
[16:47:54] code_zombie: has joined #ruby
[16:48:53] alfiemax: has joined #ruby
[16:50:09] orbyt_: has joined #ruby
[16:50:45] Inline: has joined #ruby
[16:53:45] Renich: has joined #ruby
[16:55:44] AJA4350: has joined #ruby
[16:56:11] Renich: has joined #ruby
[16:56:56] orbyt_: has joined #ruby
[17:07:01] krawchyk: has joined #ruby
[17:08:22] jcarl43: has joined #ruby
[17:19:15] AJA4351: has joined #ruby
[17:21:05] \void: has joined #ruby
[17:22:34] sagax: has joined #ruby
[17:23:41] salasrod: has joined #ruby
[17:26:38] millerti: has joined #ruby
[17:31:57] za1b1tsu: has joined #ruby
[17:33:42] krawchyk: has joined #ruby
[17:37:07] tdy: has joined #ruby
[17:46:22] orbyt_: has joined #ruby
[17:53:31] AJA4351: has joined #ruby
[17:56:23] ellcs: has joined #ruby
[18:00:39] troulouliou_div2: has joined #ruby
[18:01:16] AJA4350: has joined #ruby
[18:18:54] reber: has joined #ruby
[18:22:43] lxsameer: has joined #ruby
[18:29:28] AJA4351: has joined #ruby
[18:31:42] BTRE: has joined #ruby
[18:46:02] Renich_: has joined #ruby
[18:47:10] JamieD: has joined #ruby
[18:47:35] ravenousmoose: has joined #ruby
[18:55:20] conta: has joined #ruby
[18:59:47] aufi: has joined #ruby
[19:03:01] krawchyk: has joined #ruby
[19:04:35] AJA4351: has joined #ruby
[19:08:41] blackmesa1: has joined #ruby
[19:10:59] cnsvc: has joined #ruby
[19:16:55] tankf33der: has joined #ruby
[19:22:11] tarptaeya: has joined #ruby
[19:35:24] gix: has joined #ruby
[19:38:09] AJA4351: has joined #ruby
[19:44:35] baweaver: ACTION will never beat havenwood to updating a Ruby version
[19:44:49] havenwood: baweaver: I swear, you did once!
[19:44:57] BTRE: has joined #ruby
[19:55:42] solocshaw: has joined #ruby
[19:56:32] marmotini_: has joined #ruby
[19:58:50] Fernando-Basso: has joined #ruby
[20:01:57] KevinSjoberg: Is it possible to retrieve the available `public_methods` in the order they were defined?
[20:02:44] KevinSjoberg: I'm writing a step based library and would like to use a class instead of a custom DSL to define my steps. But this all come down crashing unless i can retrieve the methods in their defined order.
[20:03:20] tpanarch1st: has joined #ruby
[20:05:24] phaul: even if there was a way, it just feels error prone
[20:05:41] phaul: making the code dependent on require order and such
[20:06:02] KevinSjoberg: phaul: you're right, I'll just stick to a DSL then.
[20:09:48] phaul: baweaver: I tried to find AST mathing stuff on reddit yesterday for you. I couldn't find it, because that's not where I had seen it. Guess what, it was your github activity :D
[20:13:05] AJA4351: has joined #ruby
[20:14:36] marmotini_: has joined #ruby
[20:18:33] tarptaeya: has left #ruby: ("Konversation terminated!")
[20:24:09] nchambers: has joined #ruby
[20:27:02] alfiemax: has joined #ruby
[20:29:14] mikecmpbll: has joined #ruby
[20:31:52] krawchyk: has joined #ruby
[20:32:51] alfiemax: has joined #ruby
[20:38:59] alfiemax: has joined #ruby
[20:44:25] conta: has joined #ruby
[20:48:09] AJA4351: has joined #ruby
[21:22:41] jgpawletko: has joined #ruby
[21:27:17] SeepingN: has joined #ruby
[21:28:45] Swyper: has joined #ruby
[21:29:04] krawchyk: has joined #ruby
[21:29:34] AJA4350: has joined #ruby
[21:34:59] knueppelspass: has joined #ruby
[21:42:07] spacesuitdiver: has joined #ruby
[21:50:08] houhoulis: has joined #ruby
[21:55:48] AJA4351: has joined #ruby
[22:01:09] jinie: has joined #ruby
[22:07:23] ellcs: has joined #ruby
[22:14:31] blackmesa1: has joined #ruby
[22:21:16] krawchyk: has joined #ruby
[22:33:02] agent_white: has joined #ruby
[22:33:29] AJA4350: has joined #ruby
[22:40:38] gigetoo: has joined #ruby
[22:49:31] duderonomy: has joined #ruby
[22:51:25] agent_white: has joined #ruby
[22:55:30] ravenousmoose: has joined #ruby
[22:58:18] Xiti: has joined #ruby
[22:59:26] cthulchu_: has joined #ruby
[23:02:12] BH23: has joined #ruby
[23:05:37] AJA4351: has joined #ruby
[23:11:29] phaul: oh boy.. TDD ftw. Im just skimming through the solutions of https://www.codewars.com/kata/59dd3ccdded72fc78b000b25 and it's amazing how many ways ppl can fluke it with completely broken code and still pass the tests
[23:14:06] nchambers: reminds me of a story I heard about a student who submitted his assignment right at midnight so his hardcoded timestamps passed all of the professors tests
[23:18:01] orbyt_: has joined #ruby
[23:18:26] cats: has joined #ruby
[23:30:46] lxsameer: has joined #ruby
[23:34:44] blackmesa1: has joined #ruby
[23:37:54] cagmz: has joined #ruby
[23:39:30] AJA4351: has joined #ruby
[23:42:24] cnsvc: has joined #ruby
[23:45:15] cagmz: How do I "undo" a module `prepend` dynamically at runtime?
[23:45:45] cagmz: it overrides a method, and then calls `super`, but I only want to cal `super` with the args
[23:47:07] Pistos: has joined #ruby
[23:47:15] phaul: I don't think you can undo, or remove stuff of ancestry. You can only add more to it. But what do you mean by "I only want to cal `super` with the args" ?
[23:48:07] Pistos: How can I take a string "\"<div id=\\\"receipt\\\">\\n\\n" and turn it into "<div id=\"receipt\">\n\n" ?
[23:49:35] phaul: cagmz: you mean the overriden method would be just def f(*args, &block); super ; end ?
[23:51:12] Pistos: String#undump did it...