« Back to channel list

#ruby - 12 February 2019

« Back 1 day Forward 1 day »
[00:05:04] heyimwill: has joined #ruby
[00:06:40] conta: has joined #ruby
[00:07:18] nirix: has joined #ruby
[00:09:40] infernix: has joined #ruby
[00:18:55] Dbugger: has joined #ruby
[00:30:40] elcontrastador: has joined #ruby
[00:36:45] themsay: has joined #ruby
[00:44:13] dbugger_: has joined #ruby
[00:59:33] peteretep: has joined #ruby
[00:59:46] Pillus: has joined #ruby
[00:59:47] manveru: has joined #ruby
[00:59:51] rann: has joined #ruby
[00:59:53] Fenhl: has joined #ruby
[01:00:23] discopatrick: has joined #ruby
[01:10:33] cd: has joined #ruby
[01:11:54] mozzarella: has joined #ruby
[01:15:41] bmurt: has joined #ruby
[01:25:01] blackswan: has joined #ruby
[01:25:54] al2o3-cr: has joined #ruby
[01:26:09] blackswan: i am trying to use perl's Inline::Ruby and it seems to be dying from a NoMethodError because the Ruby module IO::generic_writable doesn't have instance_methods defined
[01:26:37] jokester: has joined #ruby
[01:26:37] blackswan: this makes me sad.
[01:26:38] JoL1hAHN: has joined #ruby
[01:26:53] mikker: has joined #ruby
[01:30:40] dviola: has joined #ruby
[01:32:22] onawebuc: has joined #ruby
[01:36:36] markoong: has joined #ruby
[01:59:28] orbyt_: has joined #ruby
[02:00:15] spacesuitdiver: has joined #ruby
[02:08:36] cnsvc: has joined #ruby
[02:09:44] eblip: has joined #ruby
[02:10:55] v01d4lph4: has joined #ruby
[02:12:16] havenwood: al2o3-cr: ?
[02:14:57] octos: has joined #ruby
[02:26:22] Renich: has joined #ruby
[02:37:19] solocshaw: has joined #ruby
[02:37:23] onawebuc: has left #ruby: ("ERC (IRC client for Emacs 25.1.1)")
[02:37:45] postmodern: has joined #ruby
[02:45:22] dbugger__: has joined #ruby
[02:48:57] salasrod: has joined #ruby
[02:51:10] tdy: has joined #ruby
[02:52:55] \void: has joined #ruby
[03:03:50] bmurt: has joined #ruby
[03:10:30] elcontrastador: Any expert ruby sockets developers online?
[03:10:43] elcontrastador: I'd like to hire for a pair programming session
[03:13:08] segy: has joined #ruby
[03:19:37] wolfshappen: has joined #ruby
[03:33:32] Azure: has joined #ruby
[03:48:43] Renich_: has joined #ruby
[03:49:58] sgen: has joined #ruby
[04:10:31] braincrash: has joined #ruby
[04:15:01] v01d4lph4: has joined #ruby
[04:25:23] Nicmavr: has joined #ruby
[04:32:23] ogres: has joined #ruby
[04:32:33] esrse: has joined #ruby
[05:09:48] Emmanuel_Chanel: has joined #ruby
[05:27:35] tdy: has joined #ruby
[05:28:21] cruzo66342: has joined #ruby
[05:39:23] arescorpio: has joined #ruby
[05:40:12] wilbert: has joined #ruby
[05:48:40] maryo: has joined #ruby
[06:04:07] dellavg__: has joined #ruby
[06:08:27] jcarl43: has joined #ruby
[06:10:14] johnny56_: has joined #ruby
[06:11:07] maryo: has joined #ruby
[06:16:34] elcontrastador: has joined #ruby
[06:18:15] conta: has joined #ruby
[06:29:07] aupadhye: has joined #ruby
[06:34:06] dinfuehr: has joined #ruby
[06:39:57] elcontrastador: has joined #ruby
[06:41:33] FrankD: has joined #ruby
[06:44:06] arup_r: has joined #ruby
[06:47:12] paranoicsan: has joined #ruby
[06:53:44] danst: do I look like I know what jpeg is
[07:00:34] conta1: has joined #ruby
[07:11:48] tankf33der: has left #ruby: ()
[07:16:30] aufi: has joined #ruby
[07:40:59] KevinSjoberg: elcontrastador: What do you want to acheieve?
[07:42:22] elcontrastador: kevinsjoberg: Proprietary paging to polycom phones...via multicast. Polycom has this documented for 3rd party integrations...
[07:44:48] KevinSjoberg: I see. Socket isn't my day-to-day work so I think this might be a bit out of my comfort zone.
[07:45:26] elcontrastador: https://supportdocs.polycom.com/PolycomService/support/global/documents/support/technical/products/voice/Audio_Packet_Format.pdf
[07:45:33] elcontrastador: seems pretty simple...
[07:48:10] KevinSjoberg: elcontrastador: Pretty good docs I must say.
[07:48:11] elcontrastador: the signaling to the phones for them to accept/unacccept a stream...the subsequent stream, I believe, could be streamed by ffmpeg to the configured mcast addr
[07:49:18] elcontrastador: I have Cisco phones working tits...but they use an xml rpc for setup and tear down of their listening...much more open (go figure)
[08:00:23] sauvin: has joined #ruby
[08:07:46] paranoicsan: has joined #ruby
[08:14:10] clemens3_: has joined #ruby
[08:15:24] BH23: has joined #ruby
[08:17:12] nowhere_man: has joined #ruby
[08:18:36] LightStalker: has joined #ruby
[08:19:04] ellcs: has joined #ruby
[08:19:50] powerbit: has joined #ruby
[08:28:54] helpa-bot: has joined #ruby
[08:31:24] helpa: has joined #ruby
[08:35:49] dionysus69: how do I write this consicely destination_address = operation["to"] || operation["account"], if one is nil the other value should be used and vice-versa
[08:35:57] dionysus69: this doesn't work
[08:42:01] baweaver: destination_address = [operation['to'], operation['from']].find(&:itself)
[08:47:48] LightStalker: has joined #ruby
[08:55:57] dionysus69: baweaver: thanks!
[09:00:38] mikecmpbll: has joined #ruby
[09:16:16] LightStalker: has joined #ruby
[09:39:05] chichou: has joined #ruby
[09:42:07] lxsameer: has joined #ruby
[09:50:23] prestorium: has joined #ruby
[10:06:30] paranoicsan: has joined #ruby
[10:10:45] ellcs: has joined #ruby
[10:12:11] v01d4lph4: has joined #ruby
[10:57:46] paulca: has joined #ruby
[10:58:24] paulca: hello guys
[10:58:38] paulca: can i use attr_accessor with module ?
[11:06:09] kapil____: has joined #ruby
[11:08:48] paulca: can i use attr_accessor with module ?
[11:10:51] segy: has joined #ruby
[11:11:16] cd: has joined #ruby
[11:11:35] al2o3-cr: &>> ["c1fd6c34"].pack('H8').unpack('C4').join ?.
[11:11:39] rubydoc: # => "" (https://carc.in/#/r/68d6)
[11:14:27] al2o3-cr: &>> Module.new { attr_accessor :foo, :bar }.instance_methods
[11:14:31] rubydoc: # => [:foo=, :foo, :bar, :bar=] (https://carc.in/#/r/68d7)
[11:14:36] ongo: has joined #ruby
[11:17:38] al2o3-cr: paul__: why do you ask?
[11:19:16] paulca: i wish to use it with a module
[11:20:21] al2o3-cr: all attr_accessor does is create 2 instance methods for getting and setting attributes.
[11:21:31] markoong: has joined #ruby
[11:21:43] mikecmpb_: has joined #ruby
[11:21:49] paulca: for example : module Craft ; attr_accessor :ben ; end
[11:22:07] paulca: how can i access ben in this way ?
[11:23:01] al2o3-cr: paul__: you can't unless you include it in a class. (instance level)
[11:23:31] paulca: ok, thank you al2o3-cr
[11:23:38] lupine: there's also the dirty `extend self` tricfk
[11:23:39] lupine: I wouldn't
[11:25:09] paulca: hum, this works : module Craft ; extend self ; attr_accessor :ben ; end
[11:25:15] paulca: and Craft.ben
[11:25:24] paulca: thank you so much lupine
[11:26:00] lupine: I really wouldn't :D
[11:26:43] al2o3-cr: &>> module Craft class << self; attr_accessor :ben end end; Craft.ben = 42
[11:26:44] paulca: lupine: can you explain me why you wouldn't ? :)
[11:26:44] rubydoc: # => 42 (https://carc.in/#/r/68d8)
[11:27:03] lupine: it will lead to bad code
[11:27:29] lupine: class-level attributes invariably do, no matter how you implement them
[11:27:31] al2o3-cr: paul__: don't get into bad habits :)
[11:27:54] lupine: `extend self` is particularly bad because you'll invariably find that someone eventually includes the module elsewhere, and then you'll have two conflicting contexts for the same methods
[11:27:59] paulca: both does the same ? i mean 'extend self' and 'class << self'
[11:28:11] lupine: no, they're quite different
[11:28:43] paulca: what' s about the class<<self usage ? is it better in my case ?
[11:29:22] al2o3-cr: depends on you use case.
[11:29:26] lupine: class << self is better, in that it's more focused and the created methods won't be shared with anything you later include the module into, but I'd still generally avoid it
[11:38:06] conta: has joined #ruby
[11:39:46] al2o3-cr: paul__: consider using a struct if attributes only e.g
[11:39:55] al2o3-cr: &>> Target = Struct.new(:x, :y, :z); T = Target.new(1,2,3); * = T.x, T.y, T.z
[11:39:56] rubydoc: # => [1, 2, 3] (https://carc.in/#/r/68d9)
[11:40:25] al2o3-cr: i generally use somthing like this.
[11:40:42] paulca: thank's al2o3-cr
[11:42:05] al2o3-cr: or make it anonymous if needs be.
[11:42:27] conta: has joined #ruby
[11:42:58] al2o3-cr: &>> Struct.new("Target", :x, :y, :z); Struct::Target.new(1,2,3); * = T.x, T.y, T.z
[11:42:59] rubydoc: # => uninitialized constant T (NameError) (https://carc.in/#/r/68da)
[11:43:40] al2o3-cr: &>> Struct.new("Target", :x, :y, :z); Struct::Target.new(1,2,3).x
[11:43:41] rubydoc: # => 1 (https://carc.in/#/r/68db)
[11:43:56] al2o3-cr: you get the idea :)
[11:47:06] paulca: awesome al2o3-cr
[11:49:13] blackswan: has joined #ruby
[11:49:47] al2o3-cr: emoji tuesday!
[11:51:48] paulca: al2o3-cr: can i post my project here to get feedback, advices ?
[11:52:15] paulca: i'm novice, i'm learning Ruby, trying to make a gem for my favorite OS named OpenBSD
[11:54:21] al2o3-cr: paul__: sure, use a paste service though.
[11:57:34] al2o3-cr: paul__: if you've got an account on github use gist.guthub.com || dpaste.de
[11:58:02] paulca: al2o3-cr: ok, tks, one moment
[12:02:29] al2o3-cr: paul__: have to go for 1/2 hour, but i'm sure someone here will aquaint your needs ;)
[12:03:01] paulca: al2o3-cr: can you review that when you re back ?
[12:03:05] al2o3-cr: if not, i'll get back you
[12:03:12] al2o3-cr: paul__: sure, np.
[12:03:21] paulca: wait 2min :)
[12:03:36] al2o3-cr: be quick though.
[12:05:38] al2o3-cr: gotta go, i'll be bk after.
[12:08:04] paulca: Here it is : https://gist.github.com/wesley974/ca930061307f730177ea5f8007e705dd if someone can review, give me some feedback, advices, thank you very much for your comments
[12:11:05] clemens3: has joined #ruby
[12:16:19] phaul: I wouldn't write class methods for everything. Feels like elixir program in ruby :)
[12:19:32] phaul: i would use objects, like why not class FS and move methods to instance side? then fs = OpenBSD::FS.new; fs.backup_location( ... etc
[12:20:33] phaul: when you set backup_location, consider calling the instance variable @backup_location, and using attr_writer :backup_location
[12:21:52] phaul: but given that only one method uses the instance var, consider moving it into the arguments of that method instead of instance state
[12:22:01] paulca: phaul: great idea about the Fs class
[12:23:28] AJA4350: has joined #ruby
[12:25:32] phaul: typo ^ s/consider calling the/consider calling it/
[12:29:35] paulca: phaul: by looking at all, globally, it is bad ? useless ? seems to you ok?
[12:30:31] paulca: i mean writing a gem for this case* of course there's a part missing rcctl.rb (manage OpenBSD daemons)
[12:30:56] conta1: has joined #ruby
[12:31:51] phaul: paul__: it's not bad. And even if it was it didn't matter as that's not what's important. Imoprtant is: having fun, and learning on the way :D
[12:32:27] paulca: It is the case, i'm learning and trying to apply what i learnt :)
[12:33:46] phaul: idea: give OO interface to sysctl / pfctl ;)
[12:36:11] phaul: pf.tables['badhost'] << ''
[12:36:26] paulca: phaul: sysctl yep, but pfctl too keywords :D
[12:37:02] paulca: phaul: if you re interested i published a doc about OpenBSD online : http://www.openbsdjumpstart.org sorry for the noise*
[12:38:30] phaul: I used openbsd for about 10 years.. started almost at the beginings of the OS :)
[12:41:50] TheBrayn: has joined #ruby
[12:44:40] clemens3: has joined #ruby
[12:45:21] blackswan: i'm having a weird problem with a Module that doesn't appear to have the instance_methods method defined.
[12:45:42] blackswan: two, actually. IO::generic_readable and IO::generic_writable.
[12:45:52] phaul: blackswan: please paste your code
[12:46:20] phaul: a minimal example that reproduces the issue you are experiencing. Without code, there is too much second guessing
[12:46:34] blackswan: i'm still trying to get it simplified enough to paste. i'm using ruby embedded in perl with the Inline::Ruby perl module.
[12:46:46] blackswan: needless to say, this is tricksy.
[12:47:50] stryek: has joined #ruby
[12:48:03] phaul: &>> IO.instance_methods.grep /generic_/
[12:48:05] rubydoc: # => [] (https://carc.in/#/r/68dd)
[12:48:32] phaul: &list generic_
[12:48:32] rubydoc: Found no entry that matches method generic_
[12:48:44] phaul: where are those methods coming from?
[12:49:04] phaul: &list generic_%
[12:49:04] rubydoc: Found no entry that matches method generic_%
[12:49:26] blackswan: and now you see why i have a problem...
[12:50:11] phaul: not really. I don't see any stdlib defining those methods? so I don't know why you expect them being defined
[12:50:32] blackswan: https://pastebin.com/BVLz6PSG
[12:50:46] blackswan: *i* don't. i'm trying to debug the Perl Inline::Ruby code.
[12:51:21] blackswan: it is getting this from a list of modules that get defined, and then it is trying to call methods and instance_methods on those modules
[12:51:56] blackswan: it fails on IO::generic_writeable and IO::generic_readable, which are magic methods from ext/stringio/stringio.c in the ruby source.
[12:52:30] blackswan: so i can't tell if this is a bug in ruby or in the Inline::Ruby module or something else because i am unfamiliar with the code.
[12:53:57] phaul: they are not methods
[12:54:00] phaul: they are modules
[12:54:04] blackswan: oh. i'm a little confused in the pastebin.
[12:54:15] blackswan: sorry, magic modules.
[12:54:23] blackswan: not enough caffeine yet today.
[12:57:46] phaul: their name is hacked lowercase which means you can't use them by name.
[12:57:56] phaul: this errors:
[12:58:27] phaul: &>> IO::generic_writabe.class
[12:58:28] rubydoc: # => undefined method `generic_writabe' for IO:Class (NoMethodError) (https://carc.in/#/r/68de)
[12:58:52] blackswan: that's what Inline::Ruby is getting when it tries to call instance_methods.
[12:59:00] phaul: &>> IO::included_modules.first.name
[12:59:01] blackswan: but not, for some reason, methods. i think.
[12:59:02] rubydoc: # => "File::Constants" (https://carc.in/#/r/68df)
[12:59:20] phaul: &>> IO::included_modules
[12:59:20] rubydoc: # => [File::Constants, Enumerable, Kernel] (https://carc.in/#/r/68dg)
[12:59:36] phaul: &>> StringIO::included_modules
[12:59:37] rubydoc: # => [IO::generic_writable, IO::generic_readable, Enumerable, Kernel] (https://carc.in/#/r/68dh)
[12:59:41] phaul: &>> StringIO::included_modules.first.name
[12:59:42] rubydoc: # => "IO::generic_writable" (https://carc.in/#/r/68di)
[13:00:22] phaul: so you can't call it by name, but if you get to it by other means you can use it
[13:01:28] blackswan: it's setting k to "IO::generic_writable" and doing eval "#{k}.instance_methods"
[13:02:00] lucasb: has joined #ruby
[13:02:01] phaul: yes that would fail
[13:02:04] blackswan: yes, when i access it from StringIO::included_modules i get an instance_methods method, that's what is confusing.
[13:02:11] RougeR: has joined #ruby
[13:02:21] blackswan: but no, it works when it calls "methods". i thought.
[13:02:44] blackswan: i added puts statements to see what is going on
[13:02:44] phaul: I don't think so
[13:03:07] blackswan: let me do a bigger pastebin with more info.
[13:03:07] phaul: &>> StringIO::generic_writable.methods
[13:03:09] rubydoc: # => undefined method `generic_writable' for StringIO:Class (NoMethodError) (https://carc.in/#/r/68dj)
[13:03:36] blackswan: and maybe i will find out i am stating the problem incorrectly.
[13:04:14] phaul: what is the code that fills k with value "StringIO::generic_writable" ?
[13:04:53] phaul: all it needs is not stringifying the method and sending the method to the module object ratherthan evalling a string
[13:05:15] phaul: s/stringifying the method/stringifying the module/
[13:06:10] phaul: &>> k = StringIO.included_modules.first; k.class
[13:06:11] rubydoc: # => Module (https://carc.in/#/r/68dk)
[13:06:18] phaul: &>> k = StringIO.included_modules.first; k.name
[13:06:19] rubydoc: # => "IO::generic_writable" (https://carc.in/#/r/68dl)
[13:06:59] themsay: has joined #ruby
[13:07:19] blackswan: i'm not sure if it can do that.
[13:07:59] paulca: Thank you everyone, see you later :)
[13:08:16] blackswan: what it's doing is it's trying to figure out what ruby objects were created after running a chunk of ruby code so that those objects can be made visible to Perl.
[13:08:47] phaul: paste the code that fills in the variable k
[13:12:37] blackswan: https://pastebin.com/LT0m01Kn
[13:13:06] blackswan: it's failing in build
[13:13:44] blackswan: search for modules_arg
[13:14:52] blackswan: maybe i didn't see what i thought i saw. it's possible it was always failing on calling methods. i'm not sure any more.
[13:16:23] BH23: has joined #ruby
[13:17:36] wildermind: has joined #ruby
[13:18:42] phaul: insert a bit of guard code in: if k == 'StringIO::generic_writable; then k = StringIO.included_modules[0]; ns[k]['methods'] = k.methods; else ... normal path...
[13:21:14] blackswan: that's so ugly.
[13:21:36] blackswan: that's giving up and not understanding the problem.
[13:21:55] blackswan: which i might do, but not yet.
[13:22:10] phaul: oh I thought we just wanted to make it run.
[13:26:47] blackswan: but not *just* that.
[13:29:24] blackswan: ok. i've come to the tentative conclusion that the NoMethodError is misleading. it's a NoMethodError because there's no method, but there's no method because it can't access IO::generic_readable or IO::generic_writable by their names for some reason, and it's throwing NoMethodError instead of NameError because reasons.
[13:30:05] blackswan: possible because rb_eval is not in ruby but is in the xs for Inline::Ruby
[13:30:34] phaul: it's just the ruby parser parsing lowecase name as method name
[13:30:45] bmurt: has joined #ruby
[13:30:56] phaul: as was demonstrated by the channel bot, which does the exact same behaviour
[13:31:17] blackswan: oh. it should be called IO::Generic_readable and IO::Generic_writable?
[13:31:34] blackswan: that makes sense.
[13:32:55] phaul: lower case module name is an internal hack. they shouldn't do it, and given they did it they shouldn't leak it out. There was an attempt by nobu to remove it from the list of constants, but seems it still leaks https://bugs.ruby-lang.org/issues/12389
[13:35:12] conta1: has joined #ruby
[13:42:49] DTZUZO: has joined #ruby
[13:43:50] paranoicsan: has joined #ruby
[13:44:26] AJA4350: has joined #ruby
[13:45:17] EminenceHC: has joined #ruby
[14:00:35] catbusters: has joined #ruby
[14:06:00] phaul: &fake Hacker.say_something_smart
[14:06:01] rubydoc: I'll generate the digital PNG capacitor, that should transmitter the FTP card!
[14:24:08] ogres: has joined #ruby
[14:29:50] blackswan: has left #ruby: ()
[14:48:53] eblip: has joined #ruby
[14:50:44] Rapture: has joined #ruby
[14:50:58] eblip: has joined #ruby
[14:53:09] akosednar: has joined #ruby
[14:55:13] Paraxial: has joined #ruby
[14:59:50] rippa: has joined #ruby
[15:04:24] Rapture: has joined #ruby
[15:04:35] Xiti`: has joined #ruby
[15:05:08] Nicmavr: has joined #ruby
[15:08:14] yitsushi: has joined #ruby
[15:13:10] Inline: has joined #ruby
[15:18:09] roshanavand__: has joined #ruby
[15:24:24] awkwords: has joined #ruby
[15:54:53] cruzo66342: has joined #ruby
[15:56:10] snk: has joined #ruby
[15:58:36] snk: has joined #ruby
[16:00:16] zapata: has joined #ruby
[16:10:14] cruzo66342: has joined #ruby
[16:12:33] elcontrastador: has joined #ruby
[16:16:10] VladGh: has joined #ruby
[16:22:40] jcarl43: has joined #ruby
[16:27:47] agent_white: has joined #ruby
[16:34:21] cthulchu: has joined #ruby
[16:36:31] EminenceHC: has joined #ruby
[16:48:50] \void: has joined #ruby
[16:54:33] conta1: has joined #ruby
[17:01:48] nowhere_man: has joined #ruby
[17:01:50] sgen: has joined #ruby
[17:02:35] nowhere_man: has joined #ruby
[17:06:22] paulca: has joined #ruby
[17:07:52] paulca: i have a main class named Car (1 file) with an other class named Colors, if i use class Car < Colors ; inheritance works
[17:08:13] paulca: but what happen i have a third file with a new class Model
[17:08:34] paulca: can i use class < Car < Model ?
[17:09:55] polishdub: has joined #ruby
[17:10:42] tdy: has joined #ruby
[17:12:20] gregf_: has joined #ruby
[17:15:27] havenwood: paul__: No, there's no multiple inheritance. You can only inherit from one Class. On the other hand, you can mixin many Modules.
[17:15:55] paulca: what s about class A , B and C
[17:16:27] octos: has joined #ruby
[17:16:33] paulca: can i do this => class C ; end ; class B < C ; end ; class A < B ; end
[17:16:38] havenwood: Try to not lean on inheritance unless it's dead obvious that's the way to go. You'll probably find that often mixins work very well.
[17:17:14] havenwood: paul__: Make B and C modules, and: class A; include B; include C; end
[17:17:52] havenwood: paul__: You can include as many modules as you want in a class.
[17:18:27] paulca: just tried, works like a charm ! thank's havenwood
[17:18:34] havenwood: paul__: no prob!
[17:18:54] paulca: i have second question for you, of course i can submit it to you :)
[17:20:06] paulca: i have a cmd line that report exit code always zero ; that said, when the cmd line is OK, we have a stdout, and when the cmd is wrong we get a stderr
[17:20:58] paulca: how can i run this cmd line in Ruby showing stdout, stderr and return true or false ?
[17:21:17] paulca: i tried system, %x doesn't work for me
[17:21:27] paulca: any idea ?
[17:22:28] havenwood: paul__: Open3 gives a lot more options for handling stderr: https://docs.ruby-lang.org/en/2.6.0/Open3.html
[17:23:00] paulca: i also tried stdout, stderr, status = Open3.capture3('cmd line')
[17:23:12] paulca: i can't see the stdout
[17:23:33] paulca: i can test if stderr is empty then choose between true/false, see stderr
[17:23:38] paulca: but no way to get the stdout
[17:23:47] paulca: strange behavior
[17:24:22] EminenceHC: has joined #ruby
[17:25:09] havenwood: paul__: `stdout` is an empty string unexpectedly?
[17:26:41] paulca: when i try a puts method on stdout : empty string
[17:26:52] havenwood: paul__: and `status.success? #=> true`?
[17:26:58] paulca: if i type the cmd line in shell, i can see something in stdout
[17:27:02] p47r30n: has joined #ruby
[17:27:05] paulca: always true
[17:27:35] paulca: status is false when stderr.empty is false
[17:27:48] paulca: the remaining issue i get is : i can't see the stdout
[17:28:26] havenwood: paul__: What's the command you're shelling out to run?
[17:29:03] paulca: it is an OpenBSD system with korn shell ; the command line is pkg_add
[17:29:17] paulca: it always return zero
[17:29:21] p47r30n: has joined #ruby
[17:29:29] paulca: i test the cmd in shell, stdout and stderr works
[17:29:44] paulca: but using the ruby code, no way to get stdout
[17:30:55] AJA4350: has joined #ruby
[17:32:27] valadares: has joined #ruby
[17:32:45] paulca: The test i done in shell :
[17:32:48] havenwood: paul__: Are you separating the command from it's arguments? Like: capture3('ls', '-l')
[17:32:52] paulca: doas pkg_add sl (package sl exist) => stdout ok
[17:32:58] paulca: doas pkg_add sli (package sli doesn't exist) => stderr ok
[17:33:04] paulca: I tested in shell at the end of each command : 2>/dev/null to be sure it is stderr
[17:33:09] paulca: I tested in shell at the end of each command : 1>/dev/null to be sure it is stdout
[17:33:15] paulca: i also check with $? to get the exit code : always zero
[17:34:15] jane_booty_doe: has joined #ruby
[17:34:45] paulca: the code is here :
[17:35:17] paulca: https://gist.github.com/wesley974/858fc7e1eaa22ae791b1679fce2f46a5
[17:35:28] chihhsin: has joined #ruby
[17:35:43] paulca: and yes i didn't separate
[17:36:09] [Butch]: has joined #ruby
[17:36:13] paulca: here 'doas' is like 'sudo'
[17:36:54] millerti: has joined #ruby
[17:37:42] jane_booty_doe: has joined #ruby
[17:39:03] havenwood: paul__: Just curious, but same result if you capture3 with `Shellwords.split(command)` instead of just `command`?
[17:42:05] paulca: i tried : stdout, stderr, status = Open3.capture3('pkg_add', 'sl' )
[17:42:25] paulca: lib $ doas ruby demo.rb
[17:42:30] paulca: i have an empty line
[17:42:33] paulca: same issue
[17:45:21] Xiti: has joined #ruby
[17:46:32] paulca: if i use the Shellwords.split(cmd) , i get error message : kg_add: Missing pkgname (RuntimeError)
[17:46:42] paulca: typo pkg_add
[17:48:21] awkwords: has joined #ruby
[17:48:44] paulca: i updated the gist
[17:48:45] paulca: https://gist.github.com/wesley974/858fc7e1eaa22ae791b1679fce2f46a5
[17:49:21] Eindoofus: has joined #ruby
[17:49:32] paulca: any idea guys ? :)
[17:49:47] v01d4lph4: has joined #ruby
[17:50:32] Eindoofus: can someone please explain what "yielder" is in this example:
[17:50:34] Eindoofus: https://repl.it/repls/VividRudeByte
[17:51:29] Eindoofus: is it something that the enumerator passes in on each "next"
[17:51:44] phaul: it's an object Enumerator passes into the block that was given to new.
[17:51:48] skyikot: has joined #ruby
[17:52:04] havenwood: paul__: How about?: capture3(*Shellwords.split(command))
[17:52:41] paulca: havenwood: see the result at https://gist.github.com/wesley974/858fc7e1eaa22ae791b1679fce2f46a5 i just updated
[17:53:00] paulca: i get an error message from the command pkg_add
[17:54:10] phaul: eindoofus: essentially yes, it's the values enumerator gives you on each next
[17:54:23] hiroaki: has joined #ruby
[17:59:01] maryo: has joined #ruby
[18:00:33] tdy1: has joined #ruby
[18:01:31] Cthulu201: has joined #ruby
[18:02:17] paulca: Anyone can help me with my issue (no stdout from Open3.capture3) ? see the updated gist : https://gist.github.com/wesley974/858fc7e1eaa22ae791b1679fce2f46a5 ; thank's! :)
[18:02:33] orbyt_: has joined #ruby
[18:08:17] reber: has joined #ruby
[18:09:52] phaul: do you mean that the stdout does not appear on the console any more? That's because it's captured into stdout variable.
[18:11:19] phaul: ah, nm I see you actually do a puts stdout at the end
[18:11:37] phaul: try puts stdout.inspect and see if that changes anything
[18:14:11] valadares: has joined #ruby
[18:15:45] awkwords_: has joined #ruby
[18:19:35] TomyWork: has joined #ruby
[18:22:25] v01d4lph4: has joined #ruby
[18:24:24] paulca: i get : ""
[18:24:38] code_zombie: has joined #ruby
[18:24:53] phaul: try puts stderr.inspect
[18:25:07] paulca: regarding stderr, it works
[18:25:14] paulca: i can get stderr
[18:25:23] paulca: but no way to print stdout
[18:25:37] phaul: I mean check if it's outputting to stderr when you think it should output to stdout
[18:25:52] phaul: in case of no error
[18:26:57] paulca: but look the code : https://gist.github.com/wesley974/858fc7e1eaa22ae791b1679fce2f46a5
[18:27:09] paulca: stderr.empty? works
[18:27:38] paulca: when stderr is empty, stdout is also empty
[18:27:46] phaul: ah. it was status == 0 when I looked at it ;)
[18:27:58] phaul: nm. I donno then
[18:28:02] paulca: just updated from my original file
[18:28:44] RougeR: soo. developing ruby on windows
[18:28:46] RougeR: opinions.
[18:28:53] Rapture: has joined #ruby
[18:28:56] TomyWork: WSL or bust
[18:29:02] RougeR: yeah ill be using WSL
[18:29:12] RougeR: my work is making me swap to windows....i currently use ubuntu
[18:29:20] RougeR: i still cant get a straight answer out of them why
[18:29:44] RougeR: ill likely just spend all my time in virtualbox with ubuntu and full guest additions...
[18:29:45] TomyWork: make your windows look and feel like ubuntu :)
[18:29:49] wilbert: has joined #ruby
[18:29:55] RougeR: TomyWork, all gems are going to have issues
[18:30:02] RougeR: currently half my unit tests fail out the box
[18:30:17] RougeR: im waiting to get WSL installed. but i need to install a windows update
[18:30:24] RougeR: im curious if they pass with WSL
[18:30:44] TomyWork: but question: what is the target environment?
[18:30:48] RougeR: fucking linux
[18:30:50] RougeR: all linux
[18:30:50] TomyWork: likely not a windows with wsl, right?
[18:30:58] RougeR: ubuntu18.10
[18:31:01] RougeR: the same os i was running
[18:31:08] TomyWork: so basically you're developing on the wrong os now
[18:31:20] RougeR: but im being treated like a stupid child for trying to say this
[18:31:25] TomyWork: offer them to run windows in a VM instead
[18:31:27] RougeR: i had a few issues with rdp and other linux qualms
[18:31:30] RougeR: TomyWork, i did
[18:31:36] TomyWork: KRDC is nice
[18:31:43] RougeR: i also offered full dualboot
[18:31:55] RougeR: laptop has an ssd so 10s reboot times
[18:32:05] RougeR: but nope. windows or bust
[18:32:11] TomyWork: they likely want some corporate crap in there
[18:32:19] TomyWork: or maybe antivirus
[18:32:32] RougeR: I think that and no one else in the company uses linux
[18:32:42] TomyWork: or maybe they just don't wanna deal with linux
[18:32:48] RougeR: TomyWork, i deal with it lol
[18:32:54] TomyWork: offer them to admin the system yourself
[18:33:01] RougeR: i have been for 6 months
[18:33:27] RougeR: honestly. im just going to go the malicious complicance route
[18:33:29] TomyWork: is there anything you can't do on linux that you would be able to do on windows that is relevant to your work?
[18:33:49] RougeR: TomyWork, i bet im going to have a lot of issues with gems natively
[18:34:03] TomyWork: no the other way round
[18:34:31] RougeR: RDP....and 1 or two piece of propietary remote access software
[18:34:34] TomyWork: in my company, it's legacy crap like notes and old vsphere
[18:34:34] RougeR: which i can run in a vm
[18:34:44] Dbugger: has joined #ruby
[18:34:56] RougeR: i always had issues with rdp on my ubuntu install...but i used it so infrequently i never bothered to fix it
[18:35:03] RougeR: it was okay. just issues with guest additions
[18:35:33] RougeR: ill see how the malicious complicance route goes. but currently im trying to mirror my enviroment in a ubuntu vm and windows
[18:35:45] RougeR: giving it a 100GB+ dynamic drive and 8GB RAM to the VM
[18:36:04] mikecmpbll: has joined #ruby
[18:36:16] Dbugger: has joined #ruby
[18:36:27] RougeR: i dont know, needed to rant
[18:37:39] TomyWork: just install a windows 10 theme on ubuntu
[18:37:57] TomyWork: http://www.linuxandubuntu.com/home/transform-your-ubuntu-into-windows-10-look-with-these-gtk-themes
[18:38:35] TomyWork: probably best to use kde for this, it's more customizable
[18:38:44] RougeR: haha. TomyWork i could do that on the VM
[18:38:47] RougeR: more meta
[18:38:50] TomyWork: https://store.kde.org/p/998654/
[18:38:53] AJA4351: has joined #ruby
[18:39:02] RougeR: on the best OS for ruby dev
[18:39:05] RougeR: "Ubuntu. I don't care how you use ubuntu. You can install it to free room on your hdd, install it to a second hdd, or you can overwrite your windows install. But, Ubuntu is what you want. Bash shell, and relative ease installing rails. Idk how you personally install rails on a mac, but I use RVM, and it's not bad. Whatever method you use to get it up and running, will probably be done identically on Ubuntu. Or any linux distro. But Ubuntu is a nice
[18:39:05] RougeR: starter distro.
[18:39:05] RougeR: You can also use elementaryOS, which is built of ubuntu, but borrows heavily from macOS UI design. Or Linux Mint, also built of Ubuntu, but UI looks a bit more like windows (windows 7 era)"
[18:39:41] TomyWork: can you request a 2nd comp?
[18:39:52] RougeR: nahh no chance
[18:39:52] TomyWork: maybe they just want you to have one with windows
[18:40:04] RougeR: i honestly dont know. im going to dig deeper
[18:40:12] RougeR: any time i put up any kind of questioning or resistance
[18:40:25] RougeR: i get treated like an ignorant 5 year old....because im the only guy who runs nix
[18:40:34] RougeR: lot of .net guys in the company
[18:40:36] TomyWork: return the favor then?
[18:40:48] RougeR: TomyWork, yeah i dont wana get sacked
[18:41:28] TomyWork: and your team is the only one working on ruby stuff?
[18:41:34] RougeR: and they all use macbooks
[18:41:41] TomyWork: what does your team lead say?
[18:41:46] TomyWork: macbooks with windows?
[18:41:48] RougeR: hes the one forcing it on me
[18:41:52] RougeR: macbooks with osx
[18:42:01] RougeR: and i think occasional use of parralels
[18:42:15] TomyWork: and you can't get the same deal because?
[18:42:35] RougeR: well originally i didnt want a mac. and they let me use linux on some crappy windows pc
[18:42:40] RougeR: which i was okay with
[18:43:07] RougeR: i really dont like osx, but id rather run it than windows i think.
[18:43:19] RougeR: with a bit of work, would be fine
[18:44:57] TomyWork: brew sounds better than windows :)
[18:45:06] TomyWork: and a lot of ruby devs use macs
[18:45:11] TomyWork: so you get good support
[18:45:37] RougeR: ive never google a ruby question and been given a windows based answer
[18:48:59] prestorium: has joined #ruby
[18:50:29] Eiam: has joined #ruby
[18:55:11] miah: windows has chocolatey, which is like brew
[18:55:23] TomyWork: except it's still not a unix
[18:55:42] TomyWork: not posix compliant, backslash paths and all that stupidity
[18:56:01] miah: eh, i'd rather not get into OS Holy War in this channel, take it to #ruby-offtopic please
[18:56:46] RougeR: i agree miah. and i have no issue with windows or osx being used to their strengths
[18:56:52] RougeR: if im developing .net ill use windows
[18:56:59] RougeR: if im developing ruby...linux or osx
[18:57:12] miah: ive done ruby dev on windows even, it works
[18:57:21] RougeR: what tools did you use
[18:57:29] RougeR: works? or works without lots of annoying bugs?
[18:57:32] phaul: paul__: I have an idea!
[18:57:47] miah: i used https://rubyinstaller.org/ and vim for windows
[18:58:36] miah: but often, because of work i use chefdk + my product which is all bundled together https://downloads.chef.io/inspec/stable/3.6.6#windows
[18:58:39] phaul: paul__: try redirecting the command output into a file from the shell and check the output. Some programs check if their output is tty and if not then they behave differently
[18:59:07] RougeR: interesting miah
[18:59:17] RougeR: yeah ive been thinking of using something like vagrant
[18:59:23] miah: ya vagrant is solid
[18:59:26] phaul: paul__: ls is an example. If outputting to tty it prints a comapct list if output is not tty it outputs an entry per line
[18:59:32] miah: i use that a lot for integration testing
[18:59:55] RougeR: nice. yeah all of our stuff runs dockerized. its just building it from local and running tests
[19:00:00] miah: https://kitchen.ci/ that
[19:00:10] miah: and i use a plugin to run it all through docker (kitchen-dokken)
[19:00:24] miah: but often i'll use virtualbox integration because i want to test on like BSD
[19:00:42] RougeR: miah, honestly its just the way that ive been treated through the whole thing, like a naughty child for running what im comfortable and used too.
[19:01:01] RougeR: integrates with vb?
[19:01:26] miah: test-kitchen works with a bunch of different backends
[19:01:56] miah: like you can spin up nodes in aws/azure/docker/etc
[19:02:08] miah: https://kitchen.ci/docs/drivers/
[19:02:19] sgen_: has joined #ruby
[19:03:02] Xeago_: has joined #ruby
[19:03:15] RougeR: having a shifty now
[19:03:20] elcontrastador: has joined #ruby
[19:03:21] cnsvc: has joined #ruby
[19:03:41] jetpack_joe_: has joined #ruby
[19:03:42] canton7_: has joined #ruby
[19:04:17] m27frogy_: has joined #ruby
[19:04:18] elcontrastador: Any ruby sockets programming experts here willing to do some pair programming contract work?
[19:04:27] Eiam_: has joined #ruby
[19:04:35] lunarkitty7: has joined #ruby
[19:04:40] dostoyev1ky: has joined #ruby
[19:04:48] mikkelb: has joined #ruby
[19:04:58] SuperLag: has joined #ruby
[19:04:59] gnufied: has joined #ruby
[19:05:31] universa1: has joined #ruby
[19:05:55] r3m: has joined #ruby
[19:06:05] Nilium: has joined #ruby
[19:06:06] bougyman: has joined #ruby
[19:06:47] leah2: has joined #ruby
[19:06:59] cipheralpha: has joined #ruby
[19:08:38] kitikonti: has joined #ruby
[19:08:48] havenwood: paul__: Based on phaul's theory, which seems like a good bet, try faking a tty: capture3('script', -q /dev/null
[19:09:01] havenwood: paul__: hit enter early
[19:09:20] havenwood: pesky broken thumb...
[19:09:25] SCHAPiE: has joined #ruby
[19:09:29] paulca: havenwood: phaul i tried with ls, it works :)
[19:09:51] paulca: doas ruby demo.rb => "demo.rb\nopenbsd_helper\nopenbsd_helper.rb\n"
[19:10:02] orbyt_: has joined #ruby
[19:10:27] havenwood: paul__: capture3('script', '-q', '/dev/null ', *Shellwords.split(command))
[19:10:42] havenwood: minus the extra space in /dev/null >.>
[19:11:05] paulca: what is 'script' ?
[19:12:12] lxsameer: has joined #ruby
[19:12:24] paulca: the script syntax : usage: script [-a] [-c command] [file]
[19:13:45] queip: has joined #ruby
[19:14:43] havenwood: paul__: ah, I thought bsd flags would be q
[19:15:07] havenwood: paul__: script -e -c
[19:15:18] paulca: phaul: using shell doas pkg_add sl > myfile.stdout ; nothing in myfile.stdout
[19:15:19] havenwood: paul__: err, no -e --return either
[19:15:39] havenwood: paul__: it's a little tool that lets you record the console
[19:15:45] paulca: ok got it
[19:16:00] havenwood: paul__: script -c command /dev/null
[19:16:04] spectra: has joined #ruby
[19:16:10] phaul: reading the man page https://man.openbsd.org/pkg_add I bet it's going to be that. I distinguishes between interative vs non interactive mode based on whether output is tty
[19:16:12] darix: has joined #ruby
[19:16:47] paulca: i tried redirecting to a file, nothing in the file
[19:16:59] paulca: what does this mean?
[19:17:09] paulca: pkg_add has no stdout ?
[19:17:17] phaul: with -i it will behave like invoking it normally
[19:17:19] paulca: but use directly tty ?
[19:18:52] phaul: programs always have stdout. it's a file descriptor and there is a is_tty() function in C that tells programs if their output is a terminal. They can act differently based on that
[19:19:18] phaul: http://man7.org/linux/man-pages/man3/isatty.3.html
[19:19:19] paulca: stdout, stderr, status = Open3.capture3('pkg_add -i sl') i see now the "" but an empty stdout ""
[19:19:42] havenwood: elcontrastador: Jesse Storimer has a great, approachable book on Sockets in Ruby: https://www.jstorimer.com/products/working-with-tcp-sockets
[19:19:58] havenwood: elcontrastador: (It covers UDP, etc too - not just TCP.)
[19:20:27] phaul: paul__: try splitting the args
[19:20:31] elcontrastador: I was googling my ass off and all thru safari site too...didnt see this
[19:20:40] elcontrastador: havenwood: thank you!
[19:20:44] havenwood: elcontrastador: It's a great book. You're welcome!
[19:21:13] havenwood: elcontrastador: Do you have any code yet or working on a first spike?
[19:21:35] paulca: phaul: separating => ""
[19:21:38] paulca: empty string
[19:21:56] elcontrastador: havenwood: Just kicking off...
[19:22:08] elcontrastador: havenwood: Should be a fun project, actually...
[19:22:55] paulca: using -I Force non-interactive mode = same issue empty string
[19:23:05] elcontrastador: havenwood: The timeline is tight tho...that's why I was trying to pair program...I normally enjoy the challenge of learning 1000 things along the way
[19:23:18] paulca: -i Force interactive mode => same issue empty string
[19:24:10] havenwood: elcontrastador: Ruby has a nice, high level UDPSocket class. (Assuming you found that already.)
[19:24:30] elcontrastador: Yeah...writing some last night...
[19:26:39] havenwood: elcontrastador: I'd suggest posting the Polycom spec when you ask for someone to pair. You'll probably nerd snipe somebody.
[19:26:46] paulca: phaul: havenwood using 'doas irb' : Open3.capture3('pkg_add', '-I', 'sl') ==>["", "", #<Process::Status: pid 19320 exit 0>]
[19:26:51] orbyt_: has joined #ruby
[19:26:53] paulca: there's no stdout
[19:27:13] paulca: even using with/out -i/-I
[19:27:25] paulca: i really don't understand
[19:27:29] themsay: has joined #ruby
[19:27:32] elcontrastador: havenwood: True...always nice to see good docs and know you can jump right into something
[19:27:51] paulca: using shell i can see the output : sl-5.02: ok
[19:28:02] liya: has joined #ruby
[19:29:25] paulca: using shell : pkg_add sl > myfile.stdout ; nothing in myfile.stfout
[19:29:31] paulca: typo stdout
[19:29:50] havenwood: paul__: How about?: Open3.capture3('script', '-c', 'pkg_add -I sl', File::NULL)
[19:31:07] havenwood: https://github.com/JoshCheek/dotfiles/compare/84a7b01c58aa3ee3ba8a93f9199c1375e3671894...10f801b1e82205dcffd40a4f5c9402b857368929
[19:31:48] paulca: havenwood: using your code i get : "Script started, output file is /dev/null\nScript done, output file is /dev/null\nScript started, output file is /dev/null\n"
[19:32:53] themsay: has joined #ruby
[19:35:15] orbyt_: has joined #ruby
[19:35:19] havenwood: paul__: bah, the option flags are borking me
[19:35:31] havenwood: paul__: i'll have to try on OpenBSD but too busy atm
[19:35:49] havenwood: paul__: i'd say find a way to fake you're a tty
[19:35:55] paulca: havenwood: i can give u a ssh access
[19:37:10] wilbert: has joined #ruby
[19:39:04] valadares: has joined #ruby
[19:42:42] bmurt: has joined #ruby
[19:45:12] roshanavand: has joined #ruby
[19:51:28] Swyper: has joined #ruby
[20:02:28] havenwood: I'd suggest the tty-command gem but it looks like paul left.
[20:02:35] wilbert: has joined #ruby
[20:04:00] clemens3: has joined #ruby
[20:04:45] segy: has joined #ruby
[20:17:59] [Butch]: has joined #ruby
[20:21:00] Swyper: has joined #ruby
[20:25:13] lytol_: has joined #ruby
[20:27:30] wilbert: has joined #ruby
[20:32:59] ellcs: has joined #ruby
[20:34:32] SeepingN: has joined #ruby
[20:35:32] jtdowney: has joined #ruby
[20:38:00] jordanm: has joined #ruby
[20:42:45] r29v: has joined #ruby
[20:48:39] gix: has joined #ruby
[20:53:46] opya: has joined #ruby
[20:56:00] conta: has joined #ruby
[21:05:22] maxmanders_: has joined #ruby
[21:05:47] roshanavand1: has joined #ruby
[21:06:11] _whitelogger: has joined #ruby
[21:06:31] clemens3_: has joined #ruby
[21:07:35] ellcs: has joined #ruby
[21:08:37] mim7: has joined #ruby
[21:11:46] actuallybatman: has joined #ruby
[21:12:09] govg: has joined #ruby
[21:28:30] dostoyevsky: has joined #ruby
[21:30:14] jwr_: has joined #ruby
[21:39:32] actuallybatman: has left #ruby: ("ERC (IRC client for Emacs 27.0.50)")
[21:40:18] bmurt: has joined #ruby
[21:52:24] orbyt_: has joined #ruby
[21:53:53] ellcs: has left #ruby: ()
[21:55:27] AJA4350: has joined #ruby
[22:02:28] cow[moo]: has joined #ruby
[22:03:33] phaul: &>> [*?!..??]*??
[22:03:35] rubydoc: # => "!?\"?#?$?%?&?'?(?)?*?+?,?-?.?/?0?1?2?3?4?5?6?7?8?9?:?;?<?=?>??" (https://carc.in/#/r/68ij)
[22:07:16] bmurt: has joined #ruby
[22:14:49] r29v: has joined #ruby
[22:28:15] leftylink: remember that sudoku bug... there was a small subproblem of "make a public statement that makes it likely I know the answer, but doesn't give too much away"
[22:28:31] sgen_: has joined #ruby
[22:32:18] awkwords: has joined #ruby
[22:32:24] phaul: it's a problem of making puzzles, not an easy one
[22:34:07] phaul: I was thinking about it a bit after the fact myself too. The thing was it would have been largely unfair to give any less information, as then I would have just pointed to a code of ~300 dense lines of code.Without familiarity to the code I would say it becomes impossible
[22:38:55] conta1: has joined #ruby
[22:41:06] leftylink: o. yeah if it had just been a "find the unspecified bug in these 300 lines" I probably wouldn't have bothered
[22:45:50] phaul: I played a bit more with that code base, and managed to gain 3x speedup with two optimizations steps. I was thinking about doing a write up, kinda like a blog post. atm I don't have a ruby blog
[22:46:45] SeepingN: but you do have a blog?
[22:46:59] SeepingN: add tag: ruby and viola! you have started a ruby blog
[22:49:44] phaul: replacing this https://gist.github.com/phaul/1df66c1ebc27e6b8a6868af96cdf440f#file-sudoku-rb-L136 with https://gist.github.com/phaul/360ab45f715c66242edd4885d38ce435#file-sudoku-rb-L103 almost halved the time
[22:50:32] phaul: sorry wrong position
[22:50:58] phaul: replaced this https://gist.github.com/phaul/1df66c1ebc27e6b8a6868af96cdf440f#file-sudoku-rb-L109
[22:52:19] bambanx: has joined #ruby
[22:53:18] awkwords: has joined #ruby
[23:01:12] ruby[bot]: has joined #ruby
[23:01:12] ChanServ: +o ruby[bot]
[23:10:40] chichou: has joined #ruby
[23:11:17] marius: has joined #ruby
[23:22:37] bmurt: has joined #ruby
[23:29:24] Inline: has joined #ruby
[23:36:57] cruzo66342: has joined #ruby
[23:37:44] Swyper: has joined #ruby