« Back to channel list

#ruby - 08 November 2018

« Back 1 day Forward 1 day »
[00:00:35] sanscoeur: has joined #ruby
[00:01:38] sanscoeur: has joined #ruby
[00:02:12] jesfre: has joined #ruby
[00:02:18] al2o3-cr: PaulePanter: np & good luck.
[00:04:02] al2o3-cr: PaulePanter: to me though, that looks like two separate calls to zdns.
[00:14:14] TheBloke: has joined #ruby
[00:19:03] roshanavand: has joined #ruby
[00:22:38] gigetoo: has joined #ruby
[00:24:25] phaul: has joined #ruby
[00:25:22] asphyxia: has joined #ruby
[00:37:25] anyoen: has joined #ruby
[00:37:38] anyoen: https://github.com/sdalu/ruby-ble/blob/master/lib/ble/notifications.rb
[00:37:53] anyoen: I'm trying to read notifications from ble HM-10 module
[00:39:02] anyoen: but notifications appear only when I access the module like that @module[@service, @characteristic]
[00:39:50] anyoen: I want to read those notifications in a rails app and send them to browser with action cable
[00:40:05] anyoen: would node.js fit more to this problem
[00:40:43] BTRE: has joined #ruby
[00:46:07] jesfre: has joined #ruby
[00:46:32] za1b1tsu: has joined #ruby
[00:46:54] raulp: has joined #ruby
[00:55:05] Nicmavr: has joined #ruby
[00:58:31] eddof13: has joined #ruby
[01:00:23] mr_rich101: has joined #ruby
[01:01:10] bmurt: has joined #ruby
[01:03:08] Sembei: has joined #ruby
[01:07:13] blackmesa: has joined #ruby
[01:08:59] havenwood: anyoen: No, I don't think Node.js sounds like a much better fit from what you've said so far.
[01:09:07] ansraliant: has joined #ruby
[01:09:29] havenwood: anyoen: Are you running into scaling issues? Or what's the problem?
[01:10:16] havenwood: anyoen: Something like Phoenix with Channels might be a better fit, if you're running into scaling issues.
[01:11:27] havenwood: anyoen: https://hexdocs.pm/phoenix/channels.html
[01:11:40] havenwood: anyoen: Say more about the issues you're concerned with?
[01:15:29] havenwood: anyoen: I was working with Ruby and Node.js alongside BLE in 2014 - and I wish Elixir was around then :)
[01:16:34] havenwood: err, I mean Ruby and Python
[01:17:29] havenwood: (pre ActionCable days)
[01:22:58] Guest53511: has joined #ruby
[01:26:11] havenwood: WebSockets backed by Thread::Light might be a different story, soon... :)
[01:27:55] djellemah_: has joined #ruby
[01:28:30] havenwood: I spun up a million on my laptop before i got bored
[01:28:38] havenwood: it did take a while
[01:29:29] havenwood: (and nobody likes my Thread::Feather idea)
[01:31:47] havenwood: nchambers: a thread as light as a feather, right?! :)
[01:37:28] havenwood: https://bugs.ruby-lang.org/issues/13618
[01:37:38] havenwood: "Sorry, but no to "Feather". Again, I don't want to introduce new usage of words."
[02:07:42] houhoulis: has joined #ruby
[02:09:41] darkhanb: has joined #ruby
[02:22:42] themsay: has joined #ruby
[02:26:23] mroutis_: has joined #ruby
[02:28:57] esrse: has joined #ruby
[02:31:27] jetchisel: has joined #ruby
[02:34:34] za1b1tsu: has joined #ruby
[02:35:32] mangold: has joined #ruby
[02:43:27] za1b1tsu: has joined #ruby
[03:14:47] lukelukeluke: has joined #ruby
[03:21:53] mangold: has joined #ruby
[03:29:09] arescorpio: has joined #ruby
[03:46:10] mroutis: has joined #ruby
[03:58:35] sanscoeur: has joined #ruby
[03:59:29] c0ncealed4: has joined #ruby
[04:02:17] cthulchu: has joined #ruby
[04:09:35] braincrash: has joined #ruby
[04:18:42] EXCHGR: has joined #ruby
[04:24:01] eckhardt_: has joined #ruby
[04:26:16] mroutis: has joined #ruby
[04:37:04] patr0clus: has joined #ruby
[04:52:10] sauvin: has joined #ruby
[04:53:18] Guest53511: has joined #ruby
[04:58:10] nicesignal: has joined #ruby
[05:01:17] nicesignal: has joined #ruby
[05:04:47] SeepingN_: has joined #ruby
[05:20:57] marz_d`ghostman: has joined #ruby
[05:34:32] EXCHGR: has joined #ruby
[05:37:24] dtzuzu: has joined #ruby
[05:38:10] marz_d`ghostman: I have a test in rspec: https://gist.github.com/marzdgzmn/b3d8ec6e60bc700a5fd1c8b58247ff8d I'm just quite confused if I intentionally make the first expect to fail, it doesn't give me an error that that expects fails instead it gives me an error that the second expect failed.
[05:48:12] dellavg_: has joined #ruby
[05:53:13] dtzuzu: has joined #ruby
[06:05:43] apparition: has joined #ruby
[06:16:07] madhatter: has joined #ruby
[06:30:22] gigetoo: has joined #ruby
[06:41:07] helpa: has joined #ruby
[06:44:24] im0nde: has joined #ruby
[06:45:42] mangold: has joined #ruby
[07:22:15] prestorium: has joined #ruby
[07:30:18] conta: has joined #ruby
[07:54:58] Guest70792: has joined #ruby
[07:56:19] clemens3_: has joined #ruby
[07:58:54] prestorium: has joined #ruby
[08:03:17] venmx: has joined #ruby
[08:13:18] postmodern_: has joined #ruby
[08:15:47] Fernando-Basso: has joined #ruby
[08:20:29] postmodern: has joined #ruby
[08:24:09] phaul: has joined #ruby
[08:39:01] edwardly: has joined #ruby
[08:43:52] drale2k_: has joined #ruby
[08:47:47] aufi: has joined #ruby
[08:53:35] Guest70792: has joined #ruby
[08:53:44] drale2k_: has joined #ruby
[09:14:33] marz_d`ghostman: does system/backticks wait for the child process to finish or does it do it asynchronously?
[09:16:25] blackmesa1: has joined #ruby
[09:25:03] marz_d`ghostman: tbuehlmann: oh so the only additional feature Open3 gives is the capturing of stdout and stderr
[09:25:45] marz_d`ghostman: Is there a way I could capture stderr using plain old backticks though?
[09:36:53] tbuehlmann: I don't think so
[09:38:55] mangold: has joined #ruby
[09:39:23] burgestrand: has joined #ruby
[09:54:12] venmx: has joined #ruby
[09:55:45] Guest53511: has joined #ruby
[10:00:47] rubydoc: has joined #ruby
[10:01:50] rubydoc: # => 2 (https://carc.in/#/r/5gs0)
[10:02:52] aufi: has joined #ruby
[10:11:56] Cork: is it possible to pack to alphanumeric? [0, 10, "TI00021"] => "0010TI00021 "
[10:12:05] Cork: i know the last part pack("? ? A12") but what about the first two values?
[10:15:39] drbrain: has joined #ruby
[10:18:45] apparition: has joined #ruby
[10:29:15] JamieD: has joined #ruby
[10:32:08] dhollinger: has joined #ruby
[10:34:24] phaul: Cork: I'm no packspert, but I don't think so. You can't tel what to pack to, you can only tell what to pack from. (exceptions apply)
[10:35:35] Cork: hmm pitty; will have to mangle the array before hand then; thx!
[10:38:34] gix: has joined #ruby
[10:40:37] im0nde: has joined #ruby
[10:50:55] cd: has joined #ruby
[10:51:49] whysthatso: has joined #ruby
[11:03:35] drale2k_: has joined #ruby
[11:06:19] AJA4350: has joined #ruby
[11:09:54] supergeek: has joined #ruby
[11:10:47] venmx: has joined #ruby
[11:26:05] meinside: has joined #ruby
[11:34:15] GodFather: has joined #ruby
[11:35:18] Nicmavr: has joined #ruby
[11:36:15] marz_d`ghostman: Is it a good practice for a constructer of an object to assign the properties of an argument(object) as its own properties? Or will it be better to just immediately access the argument/object's properties?
[11:37:22] marz_d`ghostman: E.g. Job.new(name: 'job-name', type: 'job-type) then you pass this object to Task.new(name: Job.name, type: Job.type)? or just immediately use Job.name inside Task?
[11:38:08] phaul: I would store Job in Task
[11:39:13] marz_d`ghostman: phaul: so Task.new(job: Job)? WHy?
[11:39:27] phaul: then Job can implement Job things.. single responsibility principle
[11:40:47] phaul: Altough this is a bit vague at this moment to form a design, but that's my immediate first reaction
[11:42:28] phaul: on the other hand just for the sake of argument passing I wouldn't introduce new types. Only if they are actual proper types of the design
[11:43:33] phaul: so either 1. Task.new(name: name, type: type) or if Job exists anyway Task.new(job: job)
[11:44:16] cabotto: has joined #ruby
[11:48:28] marz_d`ghostman: job: job seems simple for me too. Perhaps I'll just put in the documentation what job properties is required before it gets passed in to task
[11:59:43] phaul: marz_d`ghostman: you need to think about whether you already have Job and Task class. what's the diffrence between them. Is Task an extended version of Job? => inheritance. Does Task contain Jobs => delegate. Is Job needed at all or always have Tasks. Is name & type the sole attributes of Job and if not is there an intersection between Tasks & Jobs that's yet to be discovered as a new type
[12:04:47] za1b1tsu: has joined #ruby
[12:07:46] cabotto: has joined #ruby
[12:09:38] elphe: has joined #ruby
[12:14:43] lukelukeluke: has joined #ruby
[12:14:50] GodFather: has joined #ruby
[12:21:37] za1b1tsu: has joined #ruby
[12:21:47] ua: has joined #ruby
[12:30:36] Guest70792: has joined #ruby
[12:35:38] dabedoc: has joined #ruby
[12:38:04] dabedoc: has left #ruby: ()
[12:40:03] roshanavand: has joined #ruby
[12:42:16] whysthatso: has joined #ruby
[13:00:26] marz_d`ghostman: phaul: Yeah, thanks for the suggestion. Guess tasks just executes job, so having job inside task makes sense.
[13:00:53] burgestrand: has joined #ruby
[13:04:14] Burgestr_: has joined #ruby
[13:43:14] burgestrand: has joined #ruby
[13:44:50] phaul: has joined #ruby
[13:44:56] blackmesa1: has joined #ruby
[13:50:43] phaul: has joined #ruby
[13:58:06] fluxAeon: has joined #ruby
[14:00:50] aufi: has joined #ruby
[14:02:51] Flonk: has joined #ruby
[14:03:03] dysfigured: has joined #ruby
[14:03:10] cranq: has joined #ruby
[14:03:48] Tempesta: has joined #ruby
[14:03:55] Sembei: has joined #ruby
[14:03:57] ohcibi: has joined #ruby
[14:04:00] jtdowney: has joined #ruby
[14:04:03] dachi: has joined #ruby
[14:04:04] BTRE: has joined #ruby
[14:04:12] livcd: has joined #ruby
[14:04:13] mr_rich101: has joined #ruby
[14:04:17] Cyrus: has joined #ruby
[14:04:22] cthulchu: has joined #ruby
[14:04:23] LightStalker: has joined #ruby
[14:04:24] cliluw: has joined #ruby
[14:04:26] Xeago: has joined #ruby
[14:04:27] dellavg_: has joined #ruby
[14:04:28] xuanrui: has joined #ruby
[14:04:30] stooj: has joined #ruby
[14:04:36] dionysus69: has joined #ruby
[14:04:37] nickjj: has joined #ruby
[14:05:16] Miron: has joined #ruby
[14:05:45] houhoulis: has joined #ruby
[14:06:00] edwardly: has joined #ruby
[14:06:07] cd: has joined #ruby
[14:06:15] c0ncealed4: has joined #ruby
[14:06:17] rokumatsumoto: has joined #ruby
[14:06:57] gsingh93: has joined #ruby
[14:07:19] venmx: has joined #ruby
[14:09:18] salasrod: has joined #ruby
[14:09:53] JamieD: has joined #ruby
[14:13:26] segy: has joined #ruby
[14:21:26] roshanavand: has joined #ruby
[14:25:21] phaul: has joined #ruby
[14:34:14] SeepingN: has joined #ruby
[14:34:15] Paraxial: has joined #ruby
[14:41:41] za1b1tsu: has joined #ruby
[14:50:49] jetchisel: has joined #ruby
[14:53:50] kaleido: has joined #ruby
[14:56:46] rippa: has joined #ruby
[15:03:25] rwb: has joined #ruby
[15:05:44] Rapture: has joined #ruby
[15:21:47] Inside: has joined #ruby
[15:45:07] jesfre: has joined #ruby
[15:50:16] cow[moo]: has joined #ruby
[15:57:46] orbyt_: has joined #ruby
[16:13:27] donofrio: has joined #ruby
[16:17:46] ged: has joined #ruby
[16:17:58] Sup3rLurk: has joined #ruby
[16:18:49] ellcs: has joined #ruby
[16:19:24] tpendragon: has joined #ruby
[16:20:38] mahlon: has joined #ruby
[16:29:35] irdr: has joined #ruby
[16:31:09] renlo: has joined #ruby
[16:35:22] irdr: has joined #ruby
[16:35:52] conta: has joined #ruby
[16:39:47] gigetoo: has joined #ruby
[16:41:35] jcarl43: has joined #ruby
[16:44:51] blackmesa1: has joined #ruby
[16:45:14] mangold: has joined #ruby
[16:49:40] whathappens: has joined #ruby
[16:59:07] ivanskie: has joined #ruby
[17:02:36] al2o3-cr: &>> ?\M-\cx
[17:02:38] rubydoc: # => "\x98" (https://carc.in/#/r/5gth)
[17:03:37] ivanskie: has joined #ruby
[17:04:52] jidar: has joined #ruby
[17:05:21] jidar: has joined #ruby
[17:07:49] havenwood: &>> ?\M-\cx.b.ord
[17:07:49] rubydoc: # => 152 (https://carc.in/#/r/5gti)
[17:08:01] havenwood: al2o3-cr: heh, yikes
[17:09:10] blackmesa: has joined #ruby
[17:10:09] alwyn: has joined #ruby
[17:13:04] Guest53511: has joined #ruby
[17:14:45] whysthatso: has joined #ruby
[17:15:58] eddof13: has joined #ruby
[17:17:25] al2o3-cr: we have a fully functioning eval bot, hallelujah. now i know how jesus felt when he met the disciples. =]
[17:21:04] darkhanb: has joined #ruby
[17:23:48] chouhoulis: has joined #ruby
[17:24:24] al2o3-cr: havenwood: ayy, meta-control-x
[17:25:58] blackmesa1: has joined #ruby
[17:32:16] JamieD: has joined #ruby
[17:38:23] al2o3-cr: ah, you can actually query rubydoc too.
[17:42:59] ivanskie: has joined #ruby
[17:44:15] eddof13: has joined #ruby
[17:46:36] orbyt_: has joined #ruby
[17:53:29] sanscoeur: has joined #ruby
[17:57:52] eckhardt_: has joined #ruby
[17:58:28] reber: has joined #ruby
[18:00:23] renlo: has joined #ruby
[18:00:59] blackmesa1: has joined #ruby
[18:07:28] al2o3-cr: has joined #ruby
[18:16:56] alem0lars: has joined #ruby
[18:19:48] venmx: has joined #ruby
[18:31:30] blackmesa1: has joined #ruby
[18:33:53] phaul: al2o3-cr: the code is from ruby[bot] so everything works the same way, ast>> asm>> tok>> and versions. 20>> 21>>. It's all a bit of a hack, and I had to hammer it into rubydoc, but it runs for now
[18:35:20] havenwood: phaul: nice!
[18:35:35] phaul: havenwood: thanks
[18:38:25] Rapture: has joined #ruby
[18:39:42] al2o3-cr: good work phaul =)
[18:54:03] blackmesa: has joined #ruby
[19:04:53] ivanskie: has joined #ruby
[19:18:33] wojnar: has joined #ruby
[19:25:13] ivanskie: has joined #ruby
[19:33:05] elphe: has joined #ruby
[19:44:07] za1b1tsu: has joined #ruby
[20:10:17] OrangeManBad: has joined #ruby
[20:14:39] bmurt: has joined #ruby
[20:16:57] joast: has joined #ruby
[20:24:21] ule: Do you guys, can I use merge() here:
[20:24:23] ule: {:filters=>[{"name"=>"foo", "value"=>"123"}, {"name"=>"Company", "value"=>"17"}, {"name"=>"bar", "value"=>"123"}], :foo_id=>"434"}
[20:25:07] ule: To override that {"name"=>"Company", "value"=>"17"} with {"name"=>"Company", "value"=>"111"} ?
[20:26:06] ule: or the best way is just iterating on each element of that hash and compare if name == Company && value == 17?
[20:28:02] za1b1tsu: has joined #ruby
[20:33:10] chouhoulis: has joined #ruby
[20:34:37] elphe: has joined #ruby
[20:37:58] za1b1tsu: has joined #ruby
[20:38:34] chouhoulis: has joined #ruby
[20:40:55] phaul: the value under :filters key is an Array. Arrays don't have a merge method
[20:41:06] phaul: &list merge
[20:41:06] rubydoc: Hash#merge, RDoc::ClassModule#merge, RDoc::Generator::POT::POEntry#merge, RDoc::Markup::Document#merge, RDoc::Markup::Raw#merge, Gem::Dependency#merge,...
[20:41:23] phaul: &list Array#merge
[20:41:24] rubydoc: Found no entry that matches instance method merge on Array
[20:42:46] phaul: but with this representation this becomes easier : { "Company" => 17 , "foo" => "123", "bar" => "123" }
[20:43:01] phaul: then it's a hash and you can merge
[20:43:32] orbyt_: has joined #ruby
[20:43:57] chouhoulis: has joined #ruby
[20:44:54] despai: has joined #ruby
[20:47:33] phaul: &>> { "Company" => "17", "foo" => "123", "bar" => "123" }.merge("Company" => "111")
[20:47:36] rubydoc: # => {"Company"=>"111", "foo"=>"123", "bar"=>"123"} (https://carc.in/#/r/5guc)
[20:49:01] Fernando-Basso: has joined #ruby
[20:55:48] chouhoulis: has joined #ruby
[20:56:28] za1b1tsu: has joined #ruby
[20:59:39] elphe: has joined #ruby
[20:59:55] ua: has joined #ruby
[21:01:19] chouhoulis: has joined #ruby
[21:03:54] eckhardt_: has joined #ruby
[21:06:39] chouhoulis: has joined #ruby
[21:12:04] chouhoulis: has joined #ruby
[21:20:37] OrangeManBad: has joined #ruby
[21:30:36] orbyt_: has joined #ruby
[21:33:00] whathappens: has joined #ruby
[21:36:35] GodFather: has joined #ruby
[21:39:33] mroutis: has joined #ruby
[21:40:30] asphyxia: has joined #ruby
[22:00:55] chouhoulis: has joined #ruby
[22:05:09] cow[moo]: has joined #ruby
[22:06:11] chouhoulis: has joined #ruby
[22:06:19] orbyt_: has joined #ruby
[22:10:03] Inside: &>> 10.times { puts "Around The World" }
[22:10:05] rubydoc: # => Around The World ...check link for more (https://carc.in/#/r/5guw)
[22:10:25] Inside: Daft punk should hire me
[22:10:26] fredolinhares: has joined #ruby
[22:10:35] chouhoulis: has joined #ruby
[22:10:37] rwb: has joined #ruby
[22:13:11] Radar: ule: did you see what phaul showed you?
[22:15:34] Nicmavr: has joined #ruby
[22:15:51] chouhoulis: has joined #ruby
[22:19:47] mroutis_: has joined #ruby
[22:21:18] chouhoulis: has joined #ruby
[22:21:52] ua: has joined #ruby
[22:26:38] chouhoulis: has joined #ruby
[22:32:03] chouhoulis: has joined #ruby
[22:37:33] chouhoulis: has joined #ruby
[22:42:48] chouhoulis: has joined #ruby
[22:45:15] ellcs: has joined #ruby
[22:47:01] SirFunk: has joined #ruby
[22:53:44] chouhoulis: has joined #ruby
[22:59:03] chouhoulis: has joined #ruby
[23:04:28] chouhoulis: has joined #ruby
[23:06:08] ss_much: has joined #ruby
[23:09:52] chouhoulis: has joined #ruby
[23:10:19] asphyxia: has joined #ruby
[23:12:28] WebDawg: has joined #ruby
[23:15:11] orbyt_: has joined #ruby
[23:15:54] venmx: has joined #ruby
[23:16:02] elphe: has joined #ruby
[23:18:17] mroutis: has joined #ruby
[23:19:23] nicesignal: has joined #ruby
[23:20:21] orbyt_: has joined #ruby
[23:20:40] chouhoulis: has joined #ruby
[23:25:31] nexraf1: has joined #ruby
[23:26:03] chouhoulis: has joined #ruby
[23:31:25] chouhoulis: has joined #ruby
[23:31:25] Guest53511: has joined #ruby
[23:35:01] themsay: has joined #ruby
[23:36:43] chouhoulis: has joined #ruby
[23:39:05] mroutis: has joined #ruby
[23:43:14] chouhoulis: has joined #ruby
[23:45:22] ftj: has joined #ruby
[23:46:15] ftj: has left #ruby: ()
[23:48:38] chouhoulis: has joined #ruby
[23:53:52] nicesignal: has joined #ruby
[23:54:00] chouhoulis: has joined #ruby
[23:57:09] renlo: has joined #ruby
[23:58:34] sanscoeur: has joined #ruby