« Back to channel list

#ruby - 19 August 2018

« Back 1 day Forward 1 day »
[00:07:28] sauvin: has joined #ruby
[00:09:59] s2013: has joined #ruby
[00:10:00] za1b1tsu: has joined #ruby
[00:10:19] apeiros: has joined #ruby
[00:11:25] cyberzeus: has joined #ruby
[00:14:00] modin: has joined #ruby
[00:14:38] c0san0stra: has joined #ruby
[00:17:43] RedNifre: has joined #ruby
[00:21:57] apeiros: has joined #ruby
[00:22:17] arescorpio: has joined #ruby
[00:37:03] apeiros: has joined #ruby
[00:43:56] Tempesta: has joined #ruby
[00:43:57] vonfry: has joined #ruby
[00:46:38] cyberzeus: has left #ruby: ("ciao edie")
[00:48:22] apeiros: has joined #ruby
[00:49:32] DTZUZO: has joined #ruby
[00:59:23] duderonomy: has joined #ruby
[00:59:44] apeiros: has joined #ruby
[01:02:41] s2013: has joined #ruby
[01:11:08] t0x: has joined #ruby
[01:15:49] apeiros: has joined #ruby
[01:26:42] jottr: has joined #ruby
[01:30:32] apeiros: has joined #ruby
[01:38:30] arescorpio: has joined #ruby
[01:45:12] graphene: has joined #ruby
[01:46:37] apeiros: has joined #ruby
[01:46:44] jdawgaz: has joined #ruby
[01:49:32] faitswulff: has joined #ruby
[01:52:04] za1b1tsu: has joined #ruby
[01:55:20] apeiros: has joined #ruby
[01:55:37] clorisu: has joined #ruby
[01:56:22] clorisu: hi, can anyone tell me what the difference is between the to_s method and join("\n")
[02:03:43] mozzarella: clorisu: they do different things…
[02:04:41] apeiros: has joined #ruby
[02:09:24] Hobbyboy: has joined #ruby
[02:12:52] clorisu: hi mozzarella , im just following along this tutorial https://gyazo.com/3ef4da86b4053107c8a31c8d818e8dd5 and the highlighted output says the join put the lines into strings, isnt that what to_s does?
[02:55:53] cadillac_: has joined #ruby
[02:56:32] faitswulff: has joined #ruby
[03:00:32] cadillac_: has joined #ruby
[03:02:53] za1b1tsu: has joined #ruby
[03:05:15] sspreitz: has joined #ruby
[03:10:32] gaara4896: has joined #ruby
[03:11:32] braincrash: has joined #ruby
[03:13:46] gaara4896: Hi, I am running 2 Jekyll locally. When I serve the second jekyll project, it show the head, css and other element from the first jekyll project. Any potential issue?
[03:14:07] gaara4896: I do `bundle install` in the first project system wide
[03:24:12] _whitelogger: has joined #ruby
[03:24:49] faitswulff: has joined #ruby
[03:27:31] jottr: has joined #ruby
[03:34:32] Nicmavr: has joined #ruby
[03:45:13] akaiiro: has joined #ruby
[04:01:37] kapil___: has joined #ruby
[04:03:04] jdawgaz: has joined #ruby
[04:37:44] faitswulff: has joined #ruby
[04:50:51] za1b1tsu: has joined #ruby
[05:01:04] faitswulff: has joined #ruby
[05:18:38] salasrod: has joined #ruby
[05:28:22] jottr: has joined #ruby
[05:31:52] segy: has joined #ruby
[05:34:12] patr0clus: has joined #ruby
[05:37:42] faitswulff: has joined #ruby
[05:48:44] clorisu: has joined #ruby
[05:50:33] nowhereman_: has joined #ruby
[06:09:08] apparition: has joined #ruby
[06:19:16] duderono_: has joined #ruby
[06:20:01] Freshnuts: has joined #ruby
[06:26:16] cadillac_: has joined #ruby
[06:38:48] za1b1tsu: has joined #ruby
[06:40:49] jottr: has joined #ruby
[06:41:46] reber: has joined #ruby
[07:05:49] tdy1: has joined #ruby
[07:08:56] doubledup: has joined #ruby
[07:09:27] doubledup: has joined #ruby
[07:11:44] graphene: has joined #ruby
[07:26:41] faitswulff: has joined #ruby
[07:33:29] rippa: has joined #ruby
[07:46:12] graphene: has joined #ruby
[08:06:39] za1b1tsu: has joined #ruby
[08:22:09] clemens3: has joined #ruby
[08:25:54] apeiros: has joined #ruby
[08:27:17] thebigj: has joined #ruby
[08:27:22] thebigj: I am trying to solve Ruby issue. This is my Ruby version https://dpaste.de/LcyC/raw Before few months (almost 6 months) I installed Jekyll and I was able to make the build of my website. Few days back I am trying to build using "jekyll build" and it is giving me this error https://dpaste.de/A4bb/raw
[08:27:28] thebigj: But I am unable to overcome the error
[08:27:31] thebigj: and then again performed "gem install bundler jekyll"
[08:27:41] thebigj: Can anyone help?
[08:30:58] apeiros: thebigj: apparently you installed a ruby22, installed jekyll with and and then deinstalled ruby22 but kept jekyll. and now your jekyll can't find ruby22 anymore.
[08:31:20] apeiros: so 2 options I'd say: a) reinstall jekyll with your current ruby, b) reinstall ruby22
[08:31:47] thebigj: apeiros: How can I unsintall jekyll?
[08:32:00] apeiros: how did you install it?
[08:32:29] thebigj: apeiros: I already treid 'gem cleanup jekyll' and 'gem uninstall jekyll'
[08:32:45] sameerynho: has joined #ruby
[08:32:58] apeiros: if you installed it via `gem install jekyll`, then `gem uninstall jekyll` should have worked.
[08:35:21] thebigj: apeiros: What are other ways to install jekyll?
[08:35:47] apeiros: some package managers can also install gems
[08:35:55] thebigj: apeiros: okay.
[08:36:19] apeiros: worst case you delete the files by hand. it's rather ugly and possible that you miss files.
[08:38:12] thebigj: apeiros: When I try to install jekyll using the package manager of my distribution, It is not re-installing
[08:38:33] thebigj: apeiros: So, I can confirm that the previous installation insn't installed by it
[08:38:47] thebigj: apeiros: Will output of "gem env" help?
[08:47:00] graphene: has joined #ruby
[08:47:59] apeiros: it might. also post `cat /usr/local/bin/jekyll` and `echo $PATH`
[08:50:21] RedNifre: has joined #ruby
[08:54:47] graphene: has joined #ruby
[09:03:56] lupine: has joined #ruby
[09:13:55] Dbugger: has joined #ruby
[09:25:58] Zaab1t: has joined #ruby
[09:43:04] wildermind: has joined #ruby
[09:46:06] dellavg: has joined #ruby
[09:48:20] snuz: has joined #ruby
[09:59:32] fyrekitty: has joined #ruby
[10:00:13] venmx: has joined #ruby
[10:01:15] tristanp: has joined #ruby
[10:20:20] Mike11: has joined #ruby
[10:21:35] guardian: has joined #ruby
[10:45:43] conta: has joined #ruby
[10:50:08] alex``: has joined #ruby
[11:02:04] faitswulff: has joined #ruby
[11:29:48] CaptainAmari: has joined #ruby
[11:31:31] CaptainAmari: Hi guys, hope it's okay to ask here. I'm trying to to develop a ruby gem with a C extension. I've never developed a gem before so I am not sure what I want. I saw hoe and rake and other tools but I want the bare minimum... is this wrong? im thinking of just having a gemspec file and a rakefile and thats it.
[11:36:04] apeiros: the bare minimum is a gemspec
[11:36:48] apeiros: but be sure to check out https://guides.rubygems.org
[11:38:56] CaptainAmari: apeiros, yes thank you, I am. Is it okay to include the gemspec inside my rakefile?
[11:39:06] CaptainAmari: or is it considered bad practice
[11:39:16] apeiros: not quite sure what you mean by that
[11:39:31] apeiros: the gemspec is a separate file, named yourgemsname.gemspec
[11:45:13] redlegion: has joined #ruby
[11:54:55] jottr: has joined #ruby
[11:59:20] Zaab1t: has joined #ruby
[12:00:36] jdawgaz: has joined #ruby
[12:11:46] Xiti: has joined #ruby
[12:12:24] AJA4350: has joined #ruby
[12:21:52] fyrekitty: has joined #ruby
[12:23:14] nowhereman_: has joined #ruby
[12:26:35] DTZUZO: has joined #ruby
[12:27:18] thy0: has joined #ruby
[12:34:43] jdawgaz: has joined #ruby
[12:54:43] gr33n7007h: has joined #ruby
[13:02:52] faitswulff: has joined #ruby
[13:03:33] duderonomy: has joined #ruby
[13:03:57] jottr: has joined #ruby
[13:04:01] venmx: has joined #ruby
[13:12:36] naftilos76_: has joined #ruby
[13:13:57] DLSteve: has joined #ruby
[13:24:19] jackrandom: has joined #ruby
[13:31:28] kapil___: has joined #ruby
[13:32:38] konsolebox: has joined #ruby
[13:33:34] faitswulff: has joined #ruby
[13:36:31] naftilos76_: Hi i am using a ruby script as a daemon to implement a ruby server over ssl. The thing is that when i try to do "ruby script_name.rb stop" i have to wait until ruby decides to kill it (forcefully). Trying to stop another ruby daemon that is not a server works fine. Any ideas why the ruby server does not stop?
[13:48:03] konsolebox: maybe show your daemon script
[13:51:57] DarthGandalf: has joined #ruby
[13:52:53] xlegoman: has joined #ruby
[14:02:57] faitswulff: has joined #ruby
[14:14:47] Nicmavr: has joined #ruby
[14:26:44] Inline: has joined #ruby
[14:32:48] faitswulff: has joined #ruby
[14:33:37] nikivi: can someone help with a script I am writing
[14:33:38] nikivi: https://github.com/nikitavoloboev/karabiner-generator/blob/master/config.rb
[14:34:03] nikivi: it is basically generating JSON however the issue I have is that it doesn't generate commas after the blocks
[14:34:22] nikivi: so I am forced to add those print(',') statements in the def main
[14:34:55] Inline: has joined #ruby
[14:42:52] konsolebox: nikivi: i believe { ... },{ ... } is not JSON
[14:43:09] konsolebox: nikivi: [{ ... },{ ... }] is
[14:43:21] Inline: has joined #ruby
[14:43:52] nikivi: yeah you are right konsolebox
[14:43:55] konsolebox: nikivi: and if you want to do it right, i suggest pretty_generate-ing them all at once as a single array
[14:44:00] nikivi: it generates {}
[14:44:11] nikivi: I just want it to generate {},
[14:44:24] nikivi: and then I will add final print(',') in the end of def main
[14:44:45] faitswulff: has joined #ruby
[14:45:04] nikivi: konsolebox not sure how I can refactor is so I do it all in one pretty_generate
[14:45:51] Zarthus: nikivi: Why does your script `puts` them?
[14:46:29] dellavg: has joined #ruby
[14:46:34] nikivi: Zarthus not sure
[14:46:42] Zarthus: if you were to just return ruby hashes in all of them you could combine it no issue and json.pretty_generate it only once
[14:46:46] nikivi: it is modification of a script done by another person
[14:46:49] nikivi: it works though
[14:47:06] nikivi: Zarthus I also split it up into methods
[14:47:07] Zarthus: i don't think so, looks like it generates invalid json
[14:47:11] wyoung: Hi I'm Principal Vagina, the name's real possibly Scandinavian. The name's Principal Vagina, no relation. Principle Vagina here, don't let the name fool ya, I'm still in charge.
[14:47:15] Zarthus: they should puts [, puts ] at the begin/end
[14:47:29] wyoung: ooops, wrong channel.
[14:47:42] nikivi: the generated code is not valid JSON in that it goes inside [] of JSON structure
[14:47:48] nikivi: it goes inside an array
[14:47:50] houhoulis: has joined #ruby
[14:47:58] Zarthus: nikivi, yes, but the current code does not do that
[14:48:16] nikivi: https://github.com/nikitavoloboev/karabiner-generator#readme
[14:48:21] nikivi: gives description
[14:48:27] Zarthus: either way, my suggestion is to ditch the `puts`, ditch the `json.pretty_generate`, return the value as-is, and then combine them all in the main()
[14:48:37] nikivi: basically I generate the code and paste it inside rules [] block
[14:48:54] konsolebox: nikivi: if you're combining raw JSON strings, i suggest that you convert them to ruby objects first
[14:49:31] apeiros: !troll wyoung
[14:49:37] ruby[bot]: +bbb $a:wyoung$#ruby-banned wyoung!*@*$#ruby-banned *!*@wesleyy.com$#ruby-banned
[14:49:37] ruby[bot]: ruby[bot] kicked wyoung: is a bannable offense, see http://ruby-community.com/pages/user_rules
[14:49:38] nikivi: konsolebox can you give an example of how that will look please?
[14:52:19] konsolebox: >> a = []; a << JSON.parse('{ "abc": "xyz" }'); a << JSON.parse('{ "xyz": "abc" }'); a.to_json
[14:52:25] ruby[bot]: konsolebox: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
[14:52:32] konsolebox: >> [JSON.parse('{ "abc": "xyz" }'), JSON.parse('{ "xyz": "abc" }')].to_json
[14:52:38] ruby[bot]: konsolebox: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
[14:52:53] konsolebox: >> require 'json'; a = []; a << JSON.parse('{ "abc": "xyz" }'); a << JSON.parse('{ "xyz": "abc" }'); a.to_json
[14:52:59] ruby[bot]: konsolebox: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
[14:53:28] konsolebox: bot still broken?
[14:53:43] MuffinPimp: has joined #ruby
[14:53:59] konsolebox: anyway you get the concept
[14:55:27] nikivi: but I am still dealing with raw JSON
[14:55:35] nikivi: dont see why that is differt to what I am doing now
[14:55:50] Zarthus: you're not.. it's the functions that use json.pretty_generate
[14:56:54] konsolebox: maybe it's no different, but that's one of the ways you can use to avoid print(,)
[14:57:45] cadillac_: has joined #ruby
[14:59:54] konsolebox: nikivi: maybe you can use this hack: "[" + [swapkeys, simkeys, wkey, ekey, rkey, ikey, okey, akey, skey, dkey, fkey, zkey].join(',') + "]"
[15:00:47] nikivi: konsolebox I can just put that now in my code?
[15:00:50] nikivi: or I have to make some changes
[15:01:06] mitescugd: has joined #ruby
[15:02:05] konsolebox: nikivi: i believe that's easy to understand
[15:06:56] nikivi: I am a bit confused by what you meant there
[15:13:29] apeiros: whois wyoung
[15:17:18] faitswulff: has joined #ruby
[15:18:04] konsolebox: nikivi: try to understand the code. if you need reference, see https://ruby-doc.com/.
[15:22:10] fmcgeough: has joined #ruby
[15:26:28] IanMalcolm: has joined #ruby
[15:26:29] jdawgaz: has joined #ruby
[15:32:17] za1b1tsu: has joined #ruby
[15:33:17] coffeecupp__: has joined #ruby
[15:45:57] pistachio: has joined #ruby
[15:55:25] raz: has joined #ruby
[15:56:14] raz: hmm. i'd like to monkey-patch Class, so that AnyClass.path returns the filesystem location to the source code (__FILE__). any ideas anyone?
[15:58:31] jdawgaz: has joined #ruby
[16:02:42] faitswulff: has joined #ruby
[16:03:46] thebigj: has left #ruby: ()
[16:13:19] cadillac_: has joined #ruby
[16:13:21] orbyt_: has joined #ruby
[16:15:43] mitescugd: has joined #ruby
[16:16:19] patr0clus: has joined #ruby
[16:19:50] apeiros: raz: what if your class is opened in more than one file?
[16:20:07] mitescugd: has joined #ruby
[16:20:28] raz: apeiros: good question. for starters i'd be fine to get any (or all) of the paths in that case
[16:21:24] raz: so far i found it impossible to dynamically get at the path at all (both __FILE__ and caller_locations let me down)
[16:21:54] raz: i.e. it's trivial do hardcode this into _one_ class. i'd like a solution that gives me the method for all classes
[16:23:15] wstlr: has joined #ruby
[16:23:15] jdawgaz: has joined #ruby
[16:23:47] apeiros: you can only really get the information for methods. https://gist.github.com/apeiros/cd6b5b9861998c6b247c82e53dfc7d59 is something I gave somebody else a short while ago.
[16:23:59] apeiros: you can improve it with private & protected methods
[16:25:52] Siarkowy: has joined #ruby
[16:27:56] Scient: has joined #ruby
[16:28:07] mitescugd: has joined #ruby
[16:28:18] arthurnn: has joined #ruby
[16:28:37] _habnabit: has joined #ruby
[16:29:00] justinmrkva: has joined #ruby
[16:29:25] raz: hmm yap, it's tricky
[16:29:47] d^sh: has joined #ruby
[16:30:12] sspreitz: has joined #ruby
[16:33:36] kloeri: has joined #ruby
[16:38:45] beefjoe: has joined #ruby
[16:39:57] Nicmavr: has joined #ruby
[16:43:25] faitswulff: has joined #ruby
[16:48:25] Nicmavr: has joined #ruby
[16:51:25] blackbaba: has joined #ruby
[17:02:07] mroutis: has joined #ruby
[17:05:41] s2013: has joined #ruby
[17:06:05] jdawgaz: has joined #ruby
[17:11:26] faitswulff: has joined #ruby
[17:19:13] duderonomy: has joined #ruby
[17:21:28] jdawgaz: has joined #ruby
[17:22:03] faitswulff: has joined #ruby
[17:24:40] RedNifre_: has joined #ruby
[17:29:36] mitescugd: has joined #ruby
[17:37:02] mroutis: has left #ruby: ()
[17:38:02] IanMalcolm: has joined #ruby
[17:40:52] mroutis: has joined #ruby
[17:43:12] mroutis: has joined #ruby
[17:43:14] yxhuvud: has joined #ruby
[17:45:36] mroutis: has joined #ruby
[17:46:25] faitswulff: has joined #ruby
[17:47:11] wstlr: has joined #ruby
[17:48:34] jdawgaz: has joined #ruby
[17:48:43] faitswul_: has joined #ruby
[17:53:17] s2013: has joined #ruby
[17:53:32] alex``: has joined #ruby
[17:54:35] za1b1tsu: has joined #ruby
[17:58:24] KadotyGamer: has joined #ruby
[18:01:46] orbyt_: has joined #ruby
[18:04:44] KadotyGamer: has joined #ruby
[18:09:00] faitswulff: has joined #ruby
[18:15:59] KadotyGamer: has joined #ruby
[18:16:27] impermanence: has joined #ruby
[18:18:24] jdawgaz: has joined #ruby
[18:23:07] KevinSjoberg: has joined #ruby
[18:24:10] Freshnuts: has joined #ruby
[18:24:16] mroutis: has joined #ruby
[18:26:36] Freshnuts: has joined #ruby
[18:27:03] SCHAPiE: has joined #ruby
[18:28:38] \void: has joined #ruby
[18:30:05] nickjj: has joined #ruby
[18:32:16] herbmillerjr: has joined #ruby
[18:32:28] cadillac_: has joined #ruby
[18:34:04] jdawgaz: has joined #ruby
[18:35:17] dionysus69: has joined #ruby
[18:44:33] nielsk: has joined #ruby
[18:53:10] s2013: has joined #ruby
[19:06:13] za1b1tsu: has joined #ruby
[19:06:28] dellavg: has joined #ruby
[19:12:29] DLSteve: has joined #ruby
[19:13:37] za1b1tsu: has joined #ruby
[19:15:25] wstlr: has joined #ruby
[19:20:34] dviola: has joined #ruby
[19:30:22] nofxx: has joined #ruby
[19:30:30] kapil___: has joined #ruby
[19:32:37] nofxx: Need a name for a gem, it's yet another PID lib, but YAPID too cliché heh, also it does proportional on measure...
[19:33:58] drale2k_: has joined #ruby
[19:40:57] mitescugd: has joined #ruby
[19:44:22] apeiros: what's a PID lib?
[19:44:48] apeiros: ACTION thinks piddy
[19:52:22] nofxx: apeiros, proportional integral derivative... in a few words "smooths" movements
[19:52:47] apeiros: and there I was wondering what a library for process IDs would do 😂
[19:52:50] nofxx: movement can be mechanic or heat/cold for instance
[19:52:51] apeiros: thanks for the explanation
[19:53:14] apeiros: smoothymovy
[19:53:27] apeiros: (yeah, sorry, only stupid names from me, don't mind me :D)
[19:56:24] IanMalcolm: has joined #ruby
[19:56:37] nofxx: apeiros, heeh it does actually say a lot...smoothymovy
[19:57:23] LiftLeft2: has joined #ruby
[20:01:05] mroutis: has joined #ruby
[20:16:38] LiftLeft2: has joined #ruby
[20:24:32] venmx: has joined #ruby
[20:40:40] t0xik: has joined #ruby
[20:43:13] jasmith: has joined #ruby
[20:43:48] nowhereman_: has joined #ruby
[20:56:46] Cthulu201: has joined #ruby
[20:58:26] KipperedSnack: has joined #ruby
[20:59:48] weaksauce: what does your lib do that a few basic functions wouldn't do nofxx
[21:00:08] weaksauce: i've done some industrial process engineering and it's a pretty simple algorithm
[21:12:06] houhoulis: has joined #ruby
[21:16:45] nofxx: weaksauce, I'm just the translator: http://brettbeauregard.com/blog/category/pid/
[21:17:34] nofxx: will test soon if it's indeed better for my needs, but any case, I wanted to change a lil the PID lib I was using. And albeit simple I think it's a good practice to have it in a gem to reuse.
[21:18:42] nofxx: allegedly, PonM works better for temperature control
[21:19:13] jshjsh: has joined #ruby
[21:23:41] jshjsh: has joined #ruby
[21:34:03] weaksauce: i'd end up using no derivative term a lot of the time
[21:36:58] s2013: has joined #ruby
[21:37:31] weaksauce: nofxx you just translating that cpp code into ruby?
[21:37:41] weaksauce: any anti-windup features?
[21:44:41] weaksauce: there are a few other forms that you can use too instead of the naive variant
[21:45:15] weaksauce: the velocity method is nicer to tweak and tune
[21:45:19] desku: has joined #ruby
[21:45:20] weaksauce: http://www.infoplc.net/files/descargas/rockwell/infoplc_net_logix_wp008_en_p_.pdf
[21:45:27] weaksauce: there are a few different equations in there
[22:00:02] IanMalcolm: has joined #ruby
[22:04:45] sticaz: has joined #ruby
[22:06:43] duderonomy: has joined #ruby
[22:07:10] Azure: has joined #ruby
[22:08:10] graphene: has joined #ruby
[22:21:16] venmx: has joined #ruby
[22:28:48] jdawgaz: has joined #ruby
[22:46:18] faitswulff: has joined #ruby
[22:54:43] mitescugd: has joined #ruby
[22:59:41] jordanm: has joined #ruby
[23:02:20] orbyt_: has joined #ruby
[23:08:12] mitescugd: has joined #ruby
[23:12:40] jshjsh: has joined #ruby
[23:29:25] kspencer: has anyone ever messed around with talkd and using ruby to interface with it, because I'm getting the urge to and I want to know if any has aver thought of it
[23:57:59] marvin2: has joined #ruby