« Back to channel list

#ruby - 12 December 2017

« Back 1 day Forward 1 day »
[00:00:16] |ifei5g00d: has joined #ruby
[00:02:04] Dark_Arc: has joined #ruby
[00:02:14] bokayio: has joined #ruby
[00:02:18] Nilium: has joined #ruby
[00:02:26] EvilJStoker: has joined #ruby
[00:02:26] Evesy: has joined #ruby
[00:02:26] Zimsky: has joined #ruby
[00:02:29] rideh: has joined #ruby
[00:02:32] cochi: has joined #ruby
[00:02:33] cochi: has joined #ruby
[00:02:33] canton7: has joined #ruby
[00:02:38] jsrn: has joined #ruby
[00:03:37] cdg: has joined #ruby
[00:03:40] astronavt: has joined #ruby
[00:06:08] Puffball: has joined #ruby
[00:06:45] bmurt: has joined #ruby
[00:07:40] ramfjord: has joined #ruby
[00:08:40] hsiktas: has joined #ruby
[00:09:13] rrutkowski_: has joined #ruby
[00:09:58] QualityAddict: has joined #ruby
[00:10:52] AJA4350: has joined #ruby
[00:11:23] sparr: has joined #ruby
[00:11:24] sorah___: has joined #ruby
[00:12:44] guille-moe: has joined #ruby
[00:12:54] naprimer: has joined #ruby
[00:13:10] banisterfiend: has joined #ruby
[00:15:03] shtirlic: has joined #ruby
[00:16:02] enterprisey: has joined #ruby
[00:16:47] QualityAddict: has joined #ruby
[00:23:56] veeti: has joined #ruby
[00:28:43] rrutkowski: has joined #ruby
[00:32:07] cdg: has joined #ruby
[00:37:59] yeticry: has joined #ruby
[00:40:21] nogic: has joined #ruby
[00:45:50] AJA4350: has joined #ruby
[00:46:29] llua: has joined #ruby
[00:47:40] Emmanuel_Chanel: has joined #ruby
[00:48:13] meesles: has joined #ruby
[00:48:56] AJA4350: has joined #ruby
[00:50:16] uZiel: has joined #ruby
[00:51:52] mtkd: has joined #ruby
[00:54:28] guille-moe: has joined #ruby
[00:58:33] ramfjord: has joined #ruby
[01:01:25] yeticry: has joined #ruby
[01:01:48] jnollette: has joined #ruby
[01:03:40] soulisson_: has joined #ruby
[01:04:01] elphe: has joined #ruby
[01:06:44] eckhardt: has joined #ruby
[01:08:35] rrutkowski: has joined #ruby
[01:09:00] orbyt_: has joined #ruby
[01:09:06] c0ncealed: has joined #ruby
[01:10:53] friday: has joined #ruby
[01:12:10] paulrf: has joined #ruby
[01:12:57] milardovich: has joined #ruby
[01:16:53] woodruffw: has joined #ruby
[01:16:54] woodruffw: has joined #ruby
[01:19:58] rrutkowski: has joined #ruby
[01:21:04] darix: has joined #ruby
[01:21:15] Rooten9: has joined #ruby
[01:21:27] cdg: has joined #ruby
[01:22:57] ramfjord: has joined #ruby
[01:25:53] bradleyprice: has joined #ruby
[01:28:17] cdg: has joined #ruby
[01:29:54] pilne: has joined #ruby
[01:30:31] soulisson_: has joined #ruby
[01:33:21] rrutkowski: has joined #ruby
[01:33:32] shadeslayer: has joined #ruby
[01:37:02] mim1k: has joined #ruby
[01:39:01] skweek: has joined #ruby
[01:41:18] ramfjord: has joined #ruby
[01:44:16] Dimik: has joined #ruby
[01:59:27] d^sh: has joined #ruby
[02:00:34] cdg: has joined #ruby
[02:00:58] cloaked1: has joined #ruby
[02:00:58] cloaked1: has joined #ruby
[02:05:52] JusticeFries: has joined #ruby
[02:06:33] meinside: has joined #ruby
[02:06:53] jackjackdripper: has joined #ruby
[02:07:00] bradleyprice: has joined #ruby
[02:11:15] rrutkowski: has joined #ruby
[02:18:00] krawchyk: has joined #ruby
[02:22:09] houhoulis: has joined #ruby
[02:22:28] mniip: has joined #ruby
[02:26:19] skweek: has joined #ruby
[02:27:54] maum: has joined #ruby
[02:29:52] cdg: has joined #ruby
[02:30:38] gizmore|2: has joined #ruby
[02:31:35] wilbert: has joined #ruby
[02:36:29] milardovich: has joined #ruby
[02:39:52] krawchyk: has joined #ruby
[02:40:22] oetjenj: has joined #ruby
[02:41:50] elphe: has joined #ruby
[02:47:11] helpa: has joined #ruby
[02:50:17] lupine_: has joined #ruby
[02:52:08] ResidentBiscuit: has joined #ruby
[02:53:41] cdg: has joined #ruby
[02:58:29] jenrzzz: has joined #ruby
[02:58:29] jenrzzz: has joined #ruby
[02:59:56] elphe: has joined #ruby
[03:00:49] postmodern: has joined #ruby
[03:22:24] minimalism: has joined #ruby
[03:23:27] uZiel: has joined #ruby
[03:27:02] nfsnobody: has joined #ruby
[03:28:40] eckhardt: has joined #ruby
[03:30:13] astronavt: has joined #ruby
[03:36:26] jackjackdripper1: has joined #ruby
[03:37:24] DmitryBochkarev: has joined #ruby
[03:37:26] mim1k: has joined #ruby
[03:37:33] jamesaxl: has joined #ruby
[03:37:46] oetjenj: has joined #ruby
[03:38:32] oetjenj: has joined #ruby
[03:46:03] bradleyprice: has joined #ruby
[03:48:40] bradleyprice: has joined #ruby
[03:49:55] jamesaxl: has joined #ruby
[03:50:00] woodruffw: has joined #ruby
[03:50:35] woodruffw: has joined #ruby
[03:54:59] elphe: has joined #ruby
[03:56:28] nofxx__: has joined #ruby
[04:07:38] dinfuehr: has joined #ruby
[04:09:00] drowze: has joined #ruby
[04:09:25] eckhardt: has joined #ruby
[04:09:33] houhoulis: has joined #ruby
[04:27:08] gix-: has joined #ruby
[04:37:51] johnzorn: has joined #ruby
[04:43:58] techn1cs: has joined #ruby
[04:43:58] techn1cs: has joined #ruby
[04:46:54] woodruffw: has joined #ruby
[04:46:55] woodruffw: has joined #ruby
[04:56:27] mtkd: has joined #ruby
[04:58:51] chiggins: has joined #ruby
[04:59:16] chiggins: Say I want to open a file, gsub some content, and write the changes back to that file, would I use 'w+' when I open the file?
[05:01:26] cloaked1: has joined #ruby
[05:01:26] cloaked1: has joined #ruby
[05:02:49] xavrix: has joined #ruby
[05:04:31] anisha: has joined #ruby
[05:06:48] Exhiled: has joined #ruby
[05:14:21] elomatreb: As opposed to just w? Unless you want to read back from it again after you have written I don't see why
[05:17:37] meesles: has joined #ruby
[05:18:17] xavrix: has joined #ruby
[05:19:57] spectrum: has joined #ruby
[05:22:33] ppm_floss: has joined #ruby
[05:23:16] ppm_floss: I am trying to use rbenv on my Ubuntu 16.x
[05:24:00] ppm_floss: How can I change the default install path of ruby from ~/.rbenv to something else like ~/my/local/rbenv
[05:24:56] chiggins: elomatreb: I was able to figure it out. Turns out I had to read and then open for write
[05:24:57] chiggins: ¯\_(ツ)_/¯
[05:26:08] elomatreb: Oh, I just realized what you were asking me. Sorry, yeah, w/w+ truncate the file
[05:26:54] ur5us: has joined #ruby
[05:28:11] iamarun: has joined #ruby
[05:29:09] bosma: has joined #ruby
[05:29:54] rhebz916: has joined #ruby
[05:31:33] uZiel: has joined #ruby
[05:32:52] pabs: has joined #ruby
[05:33:00] xavrix: has joined #ruby
[05:33:02] xavrix|2: has joined #ruby
[05:33:56] pb122: has joined #ruby
[05:35:10] xavrix: has joined #ruby
[05:35:52] xavrix: has joined #ruby
[05:36:02] xavrix: has joined #ruby
[05:37:39] Exhiled: has joined #ruby
[05:37:51] mim1k: has joined #ruby
[05:47:24] paranoicsan: has joined #ruby
[05:50:55] iamarun: has joined #ruby
[05:52:04] elphe: has joined #ruby
[05:55:23] uZiel: has joined #ruby
[05:55:59] jenrzzz: has joined #ruby
[05:56:00] jenrzzz: has joined #ruby
[05:56:32] aupadhye: has joined #ruby
[05:57:39] chiggins: has left #ruby: ("WeeChat 1.7.1")
[06:04:14] KeyJoo: has joined #ruby
[06:05:53] brandthdl: has joined #ruby
[06:08:37] cdg: has joined #ruby
[06:08:56] guardianx: has joined #ruby
[06:10:23] yeticry: has joined #ruby
[06:15:18] puppet645: has joined #ruby
[06:20:47] SuperLag: has joined #ruby
[06:26:00] rabajaj: has joined #ruby
[06:30:21] jenrzzz: has joined #ruby
[06:30:22] jenrzzz: has joined #ruby
[06:36:03] mikhael_k33hl: has joined #ruby
[06:36:50] mim1k: has joined #ruby
[06:38:52] dinfuehr: has joined #ruby
[06:40:26] jxv: has joined #ruby
[06:41:16] Xiti: has joined #ruby
[06:41:36] havenwood: ppm_floss: rbenv itself doesn't provide an option but the tool it uses to install Rubies (ruby-build) does
[06:42:08] mikhael_k33hl: I have a class that has a constant that I would like to change during unit test, how do I go about that?
[06:42:19] havenwood: ppm_floss: ruby-build 2.4.2 ~/blarg/ruby-2.4.2
[06:42:28] mikhael_k33hl: It'd be better if I could do it temporarily as it is just a test
[06:42:31] baweaver: Why do you want to change it?
[06:42:35] havenwood: ppm_floss: then you can set the RBENV_ROOT env var
[06:42:43] baweaver: kinda defeats the point of the entire constant thing
[06:42:57] baweaver: actually, what is the constant?
[06:43:02] havenwood: ppm_floss: or symlink
[06:43:11] baweaver: have any example code you could put up in a gist?
[06:44:19] evenix: has joined #ruby
[06:45:43] mikhael_k33hl: baweaver: https://gist.github.com/marzdgzmn/7e96cbdcda6fc52fe559026cbc2b4cc8
[06:47:09] baweaver: keyword arguments are pretty useful for defaults: def initialize(database_file: DATABASE_FILE)
[06:47:45] baweaver: Line 12 doesn't make much sense there considering you're just outputting the value of that constant
[06:48:47] baweaver: Now then, what exactly are you trying to set and why do you need to modify a constant?
[06:50:16] yeticry: has joined #ruby
[06:50:17] mikhael_k33hl: baweaver: during test, I just want to change the location to the current testing directory. Tried initializing it on my spec file with let(:database) { MirrorDatabase.new(:database_file => TEST_DATABASE_FILE) } but it doesn't seem to work
[06:51:50] baweaver: define doesn't seem to
[06:52:57] alfiemax: has joined #ruby
[06:52:58] mikhael_k33hl: baweaver: oh what's the best way of defining relative path?
[06:53:36] baweaver: that's not what I asked.
[06:54:14] mikhael_k33hl: baweaver: like the spec file is inside the spec/unit/lib directory . . . but my overriding value is TEST_DATABASE_FILE = 'spec/unit/test_data_dir/mirror_test.db'. Oh sorry about that, what I meant was it doesn't seem to be able to find the file
[06:54:37] evenix: has joined #ruby
[06:55:36] baweaver: so your path ends up being spec/unit/lib/spec/unit/test_data_dir/mirror_test.db
[06:55:37] baweaver: and your debugging statement won't do anything
[06:57:42] plexigras: has joined #ruby
[06:58:00] mikhael_k33hl: baweaver: hmmm, I think the root cause is with my module. I've created a common.rb containing a module: https://gist.github.com/marzdgzmn/7c4a1e51a7be9a208acc3d3af5e34f2e
[06:58:12] mikhael_k33hl: and that's what I was using on line 13
[06:59:20] johnzorn: has joined #ruby
[06:59:36] baweaver: you should really use consistent indentation
[07:00:28] mark-6: has joined #ruby
[07:01:08] baweaver: and that won't matter
[07:01:08] mikhael_k33hl: baweaver: oh yeah, hehe, just want to make it work not minding the indentation, good thing it's not python lol
[07:01:22] mikhael_k33hl: baweaver: am I using modules right though?
[07:01:40] baweaver: If you pass in a database file it won't matter
[07:01:50] baweaver: the issue is exactly what I mentioned above.
[07:02:44] mikhael_k33hl: baweaver: but the file isn't created yet. Indentation?
[07:03:13] baweaver: the directory
[07:03:39] mikhael_k33hl: baweaver: it get's overridden, tried to output it
[07:03:52] mikhael_k33hl: DATABASE_FILE : spec/unit/test_data_dir/mirror_test.db
[07:04:31] baweaver: "<baweaver> so your path ends up being spec/unit/lib/spec/unit/test_data_dir/mirror_test.db"
[07:04:38] aupadhye: has joined #ruby
[07:05:08] webguynow: has joined #ruby
[07:05:30] mikhael_k33hl: oh wait, it's spec/unit/test_data_dir/mirror_test.db
[07:07:22] jxv: has joined #ruby
[07:10:52] brandthdl: has joined #ruby
[07:14:30] jnollette: has joined #ruby
[07:20:16] elphe: has joined #ruby
[07:20:50] ppm_floss: havenwood: thanks. but i think its better to clone the git repo and build it manually
[07:23:37] bradleyprice: has joined #ruby
[07:25:19] workmad3: has joined #ruby
[07:42:32] Dimik: has joined #ruby
[07:47:48] RevanOne: has joined #ruby
[07:49:48] andikr: has joined #ruby
[07:54:12] anisha: has joined #ruby
[07:54:35] TomyWork: has joined #ruby
[07:54:55] Mon_Ouie: has joined #ruby
[07:55:10] brandthdl: has joined #ruby
[07:55:14] ur5us: has joined #ruby
[07:56:03] alfiemax: has joined #ruby
[08:06:11] mtkd: has joined #ruby
[08:09:28] reber: has joined #ruby
[08:15:11] guille-moe: has joined #ruby
[08:15:12] uZiel: has joined #ruby
[08:16:08] sepp2k: has joined #ruby
[08:19:04] guille-moe: has joined #ruby
[08:21:27] dionysus69: has joined #ruby
[08:22:50] aufi: has joined #ruby
[08:24:46] claudiuinberlin: has joined #ruby
[08:24:59] uZiel: has joined #ruby
[08:28:18] yeticry: has joined #ruby
[08:29:44] Sparda: has joined #ruby
[08:29:56] Sparda: hello is anyone online?
[08:30:39] mark_66: has joined #ruby
[08:31:06] Sparda: Hello? i am looking for help. that i am trying to understand the error message i am getting from Sketchup's Console
[08:32:02] burgestrand: has joined #ruby
[08:33:21] Sparda: hello Burgestrand
[08:33:30] burgestrand: Good mornin' Sparda
[08:33:33] Sparda: i would like your help with understanding the message.
[08:33:40] Sparda: is that okay with you?
[08:34:17] im0nde: has joined #ruby
[08:34:37] Sparda: okay. i am guessing no, then.
[08:34:41] burgestrand: Sparda that you would like it is entirely okay, but you must remember I might not be able to help you :)
[08:35:29] Sparda: yes i am aware of the possibility that you may not able to help me depending on my issue
[08:35:34] Sparda: but the issue is very basic .
[08:35:44] burgestrand: Customs are to free-form ask into the void of the channel, and with some luck somebody can help you with… The Message
[08:37:54] Sparda: the error message are: Error: #<NameError: uninitialized constant Sparda::StarterKit::Ext> C:/Users/Sparda/AppData/Roaming/SketchUp/SketchUp 2017/SketchUp/Plugins/Example.rb:15:in `<module:StarterKit>' C:/Users/Sparda/AppData/Roaming/SketchUp/SketchUp 2017/SketchUp/Plugins/Example.rb:13:in `<module:Sparda>' C:/Users/Sparda/AppData/Roaming/SketchUp/SketchUp 2017/SketchUp/Plugins/Example.rb:12:in `<top (required)>'
[08:38:09] Sparda: i can't figure it out what is the problem.
[08:38:57] burgestrand: Sparda a first note of etiquette, it's also customary to paste longer lines of text into a web based service suitable for such a task, and then sending a link to the result, as opposed to into the channel; don't worry about it for now, but remember it for the next time :)
[08:39:17] burgestrand: Sparda (an example of such a service could be e.g. https://gist.github.com)
[08:39:20] Sparda: ah yes. i will use pastebin next time.
[08:40:06] Sparda: ok.. that's an good example.
[08:40:10] burgestrand: Sparda the message you're receiving is typically due to a dependency that is expected to be around has not yet been pulled in, typically through e.g. `require 'thedependency'`
[08:40:28] burgestrand: Sparda it could also be an order-of-operations problem, in that the dependency is pulled in too late
[08:40:50] burgestrand: Sparda _and_ it could simply be a logical error of the developer, there are probably more causes but it's hard to tell without the source code at hand
[08:40:54] Sparda: they should be in the correct order as i see it.
[08:41:03] aupadhye: has joined #ruby
[08:41:06] burgestrand: Sparda unfortunately the computer says no!
[08:42:20] Sparda: https://pastebin.com/UWN8mUzg
[08:42:22] ruby[bot]: Sparda: we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/44e6d83966d18f44dc5e9c53fdb4131f
[08:42:24] ruby[bot]: Sparda: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[08:42:41] Sparda: i see that it doesn't work. that's unfortunately
[08:43:52] Sparda: i'll use gist.github from now. i'll wait for your response after you take a look at the basic structure.
[08:44:31] Travis-42: has joined #ruby
[08:44:33] lipoqil: has joined #ruby
[08:45:28] burgestrand: Sparda I can understand the error, and I believe your expectation is that `Ext` should be available, but for some reason neither 'sketchup.rb' nor 'extensions.rb' define it, which is your problem
[08:45:56] Sparda: yeah what you said made me realize it.
[08:46:09] Sparda: i check the folder which happened to missing the two files: Sketchup.rb and Extension.rb
[08:46:27] micalexander: has joined #ruby
[08:46:31] Sparda: i will need to get the files. so hold on.
[08:48:58] marr: has joined #ruby
[08:49:07] burgestrand: Sparda ruby works in such a way that not all dependencies need to be located in the same folder, there's a package/dependency management system called rubygems, which most likely has the files you're requiring
[08:49:18] burgestrand: Sparda otherwise you'd get an error that the required files are not available
[08:50:44] Sparda: oh i dont know about the rubygems, i am an idiot.
[08:51:04] Sparda: but somehow, my instinct knew the real reason why i am getting these error message is due to 2 missing files.
[08:51:06] guille-moe: has joined #ruby
[08:51:51] gone_haywire: has joined #ruby
[08:51:54] burgestrand: Sparda inexperience is not idiocy, you can't know the unknown :)
[08:52:37] miky_: has joined #ruby
[08:52:50] miky_: hello, I need a bit of help regarding some arrays
[08:52:52] burgestrand: Sparda and once again, I'm not convinced the files are missing, because if they were _really_ missing then you'd get an error about the files missing
[08:53:10] burgestrand: miky_ don't ask to ask, just ask, it's not impolite
[08:53:24] Sparda: well i can tell you that i am a beginner.
[08:53:34] spastorino: has joined #ruby
[08:53:37] miky_: i have an array and all their items are like: [#<User nick="NICKNAME">, ["o"]
[08:53:42] burgestrand: Sparda everybody was once :) do you have some kind of documentation or example that you're trying to follow?
[08:53:43] Sparda: of course i am studying on how to programming because i have good idea of a plugin that could be useful
[08:53:52] milardovich: has joined #ruby
[08:53:55] miky_: i need to get the nickname out or this, but is it an array or something?
[08:53:55] Sparda: yes i have followed a book.
[08:54:09] Sparda: i have been reading a useful book recommended by someone. via Sketchup Community
[08:54:10] ppm_floss: has joined #ruby
[08:54:12] burgestrand: Sparda ah, paper, is it possible that your book is a few years out of date?
[08:54:34] burgestrand: Sparda software moves fast, what was once the truth might now be The Wrong Way (tm)
[08:54:40] Sparda: well. let me get you the name of that book: The 4th Pragmatic Programmer, Programming Ruby 1.9&2.0” by Dave Thomas with Chad Fowler and Andy Hunt
[08:55:01] Sparda: yes.. that's why i asked someone in Sketchup Community to ensure that i do not have an outdated book.
[08:55:15] burgestrand: Sparda it sounds general enough, is the Sketchup code samples you've provided really from the book, or from somewhere else?
[08:55:51] Sparda: well i have been looking at the documents provided by other users in sketchup community.. these documents are good example via Github
[08:56:07] Sparda: of how to build a plugin and other stuff.
[08:56:17] burgestrand: miky_ You can use a method called #map, see e.g. https://ruby-doc.org/core-2.4.2/Enumerable.html#method-i-map
[08:56:40] miky_: thank you!
[08:56:43] burgestrand: >> ["hello", "world", "example"].map(&:upcase)
[08:56:44] ruby[bot]: Burgestrand: # => ["HELLO", "WORLD", "EXAMPLE"] (https://eval.in/917340)
[08:57:01] burgestrand: (but instead of upcasing the text, you could grab the name from your user)
[08:58:45] burgestrand: Sparda unfortunately I have no experience with sketchup specifically, but I can tell you that there are two likely culprits to your problem
[08:59:02] burgestrand: Sparda 1) you need to require some other dependency that has the `Ext` thing you're adding properties to
[08:59:02] Sparda: again, the examples is not from the book.. it came from many examples via website called "github"
[08:59:40] burgestrand: Sparda 2) Ext is not the name you're supposed to be using, maybe it was the old way, and you should be using something else
[08:59:53] burgestrand: Sparda and actually 3) you should be the one creating Ext, which is also a possibility
[09:00:32] burgestrand: Sparda indeed, github is a popular and well-known website, but like any community-like site some content is old, some is new, and some is cutting edge
[09:01:15] Sparda: just a question if you can answer.
[09:01:31] Sparda: does "Ext" has to do with the fact it require a file such as extension.rb?
[09:02:40] burgestrand: Sparda `Ext` is an arbitrary name, likely for a Module (or class), that your code as written expects to be available, and _if_ it would have been available one could have assumed that it would be located in `extension.rb`
[09:03:10] burgestrand: Sparda but while there are idioms, customs, and good practice, you can never know for sure without looking, assumptions are not facts or rules :)
[09:03:38] burgestrand: Sparda I'd suggest you start with sketchups own example code and go from there, look at e.g. https://github.com/SketchUp/sketchup-ruby-api-tutorials/tree/master/tutorials/01_hello_cube and try to copy the code and then make changes
[09:04:10] Sparda: i can tell you i have seen that example before.
[09:04:24] Sparda: 01 hello cube, i have used it before.
[09:04:37] burgestrand: Sparda in the example code I linked you, it appears they do not use `Ext`, but instead create something that looks to be a substitute/the new way in `ext = SketchupExtension.new(…)`
[09:04:59] burgestrand: Sparda with what I've seen so far, it's reasonable to assume _that_ is what you should do, instead of using `Ext`
[09:05:21] burgestrand: Sparda I'm talking specifically about this line: https://github.com/SketchUp/sketchup-ruby-api-tutorials/blob/master/tutorials/01_hello_cube/tut_hello_cube.rb#L65
[09:06:02] Sparda: i see. hmmm
[09:09:04] agent_white: has joined #ruby
[09:09:38] mochiyoda_: has joined #ruby
[09:10:03] Sparda: alright thank you for helping me out. it will take some times for me to think about everything you have told me so far.
[09:10:16] Riddell: has joined #ruby
[09:16:25] mikhael_k33hl: What libraries are you using when unit testing functions that works with files?
[09:17:15] guille-moe: has joined #ruby
[09:21:22] loveablelobster: has joined #ruby
[09:23:27] loveablelobster: has joined #ruby
[09:24:01] InfinityFye: has joined #ruby
[09:24:05] InfinityFye: has left #ruby: ()
[09:29:09] huyderman: has joined #ruby
[09:31:26] tomphp: has joined #ruby
[09:34:30] sheva2nd: has joined #ruby
[09:34:39] sheva2nd: anyone's here
[09:34:40] madhatter: has joined #ruby
[09:34:57] anas: has joined #ruby
[09:35:07] yeticry: has joined #ruby
[09:35:33] DmitryBochkarev: has joined #ruby
[09:36:43] jenrzzz: has joined #ruby
[09:36:44] jenrzzz: has joined #ruby
[09:36:56] sheva2nd: https://stackoverflow.com/questions/47748566/limit-pp-pp-recursion-level-depth need help
[09:42:43] milardovich: has joined #ruby
[09:45:24] aupadhye: has joined #ruby
[09:46:01] rrutkowski: has joined #ruby
[09:50:31] im0nde: has joined #ruby
[09:55:29] rrutkowski: has joined #ruby
[09:58:02] csk157: has joined #ruby
[10:02:55] ur5us: has joined #ruby
[10:04:55] nofxx1: has joined #ruby
[10:06:06] yeticry: has joined #ruby
[10:07:07] Cavallari: has joined #ruby
[10:08:26] alfiemax: has joined #ruby
[10:08:40] jottr: has joined #ruby
[10:13:17] elphe: has joined #ruby
[10:13:50] anisha: has joined #ruby
[10:22:06] tAn: has joined #ruby
[10:22:20] loveablelobster: Hi there, anybody with experience with the sequel gem and inflections? I am having a strange issue where my custom inflections are being ignored
[10:24:47] bmarkons: has joined #ruby
[10:25:45] bmarkons: Is it possible to dynamically intercept each statement within a Ruby block?
[10:26:35] nofxx: has joined #ruby
[10:29:03] bmarkons: has left #ruby: ()
[10:31:21] qba73: has joined #ruby
[10:31:29] kke: has joined #ruby
[10:32:00] kke: has joined #ruby
[10:33:21] kke: any ideas how you can order by a composite column in sequel? like Items.order("version.major")
[10:36:21] qba73: has joined #ruby
[10:38:43] ferr: has left #ruby: ("WeeChat 2.0")
[10:38:56] rbo: has joined #ruby
[10:39:01] qba73: has joined #ruby
[10:40:31] ldnunes: has joined #ruby
[10:43:15] zipkid: has joined #ruby
[10:54:39] mikecmpbll: has joined #ruby
[10:54:58] kke: Items.order("(version).major") does not work either
[10:55:58] kke: Sequel::DatabaseError: PG::SyntaxError: ERROR: non-integer constant in ORDER BY "ORDER BY '(version)..."
[10:56:09] guardianx: has joined #ruby
[10:56:19] pifon: has joined #ruby
[10:56:32] raynold: has joined #ruby
[11:05:54] yeticry: has joined #ruby
[11:13:56] shinnya: has joined #ruby
[11:18:14] RougeT430: has joined #ruby
[11:18:27] alex``: has joined #ruby
[11:19:45] jaruga: has joined #ruby
[11:22:45] jottr_: has joined #ruby
[11:24:07] alfiemax: has joined #ruby
[11:24:43] Beams: has joined #ruby
[11:26:21] guardianx: has joined #ruby
[11:27:39] friday: has joined #ruby
[11:27:51] elphe: has joined #ruby
[11:28:56] yeticry: has joined #ruby
[11:29:51] qba73: has joined #ruby
[11:31:24] alfiemax: has joined #ruby
[11:32:27] sammi`: has joined #ruby
[11:32:39] Beams: has joined #ruby
[11:32:47] Serpent7776: has joined #ruby
[11:37:35] bmarkons: has joined #ruby
[11:37:48] bmarkons: has left #ruby: ()
[11:43:09] hfp_work: has joined #ruby
[11:44:11] alfiemax: has joined #ruby
[11:46:27] elphe: has joined #ruby
[11:46:46] jottr_: has joined #ruby
[11:48:56] cagmez__: has joined #ruby
[11:49:57] PaulCapestany: has joined #ruby
[11:53:52] rrutkowski: has joined #ruby
[11:57:29] cdg: has joined #ruby
[11:59:51] crova: has joined #ruby
[12:01:37] alex``: has joined #ruby
[12:03:56] ur5us: has joined #ruby
[12:06:33] marahin: has joined #ruby
[12:07:35] elsevero: has joined #ruby
[12:13:37] drowze: has joined #ruby
[12:15:01] mistnim: has joined #ruby
[12:15:33] mistnim: how do I rename Digest::MD5.hexdigest(astr) to md5(astr)?
[12:18:01] tcopeland: has joined #ruby
[12:19:50] cdg: has joined #ruby
[12:20:32] yeticry: has joined #ruby
[12:24:11] havenwood: mistnim: module Kernel; def md5(astr); Digest::MD5.hexdigest(astr) end end
[12:25:29] mistnim: havenwood: really? isn't there something like "require as"?
[12:26:38] banisterfiend: has joined #ruby
[12:30:39] cdg: has joined #ruby
[12:33:20] aScottishBoat: has joined #ruby
[12:36:45] alfiemax: has joined #ruby
[12:41:41] apparition: has joined #ruby
[12:41:52] Psybur: has joined #ruby
[12:42:23] brandthdl: has joined #ruby
[12:43:38] uZiel: has joined #ruby
[12:47:26] yeticry: has joined #ruby
[12:55:18] webguynow: has joined #ruby
[12:55:29] cdg: has joined #ruby
[12:56:04] selim: has joined #ruby
[12:57:41] AJA4350: has joined #ruby
[12:58:00] mtkd: has joined #ruby
[13:01:00] havenwood: mistnim: nope, there's no `as`
[13:04:15] kith: has joined #ruby
[13:08:20] bradleyprice: has joined #ruby
[13:09:05] alfiemax: has joined #ruby
[13:09:36] charliesome: has joined #ruby
[13:12:48] Riddell: has joined #ruby
[13:13:02] cdg: has joined #ruby
[13:17:53] bkxd: has joined #ruby
[13:18:54] bkxd_: has joined #ruby
[13:19:05] alfiemax: has joined #ruby
[13:22:39] nofxx: has joined #ruby
[13:23:14] nofxx: has joined #ruby
[13:23:16] bkxd: has joined #ruby
[13:23:44] tvw: has joined #ruby
[13:24:24] Beams: has joined #ruby
[13:24:32] KeyJoo: has joined #ruby
[13:30:38] minimalism: has joined #ruby
[13:31:04] alfiemax: has joined #ruby
[13:32:04] bmurt: has joined #ruby
[13:32:25] tcopeland: has joined #ruby
[13:33:31] tsglove: has joined #ruby
[13:35:11] brandthdl: has joined #ruby
[13:36:31] tsglove: has joined #ruby
[13:37:59] tsglove: has joined #ruby
[13:40:56] tcopeland: has joined #ruby
[13:45:52] qba73: has joined #ruby
[13:47:16] quobo: has joined #ruby
[13:53:08] cdg: has joined #ruby
[13:53:12] elphe: has joined #ruby
[13:57:52] RougeT430: can someone take a moment to see if they can spot where im missing an 'end',
[13:57:56] RougeT430: https://gist.github.com/CodePint/5a6d8ef5ef09085ac0d71a5c79eea19e
[13:59:54] charliesome: has joined #ruby
[14:04:11] burgestrand: RougeT430 method on line #59
[14:04:28] burgestrand: RougeT430 indent the loop do, should help you spot it
[14:04:39] ur5us: has joined #ruby
[14:04:58] burgestrand: RougeT430 your indentation is all over the place, don't be sloppy
[14:05:29] polishdub: has joined #ruby
[14:06:20] RougeT430: Burgestrand: ill look at tthat now and try fixing indent too
[14:07:50] RougeT430: yeah, that was it ugh. and yes indenting it properly did make it more visible
[14:08:32] Beams: has joined #ruby
[14:08:45] RougeT430: is there a good guide on ruby indentation?
[14:09:05] cdg: has joined #ruby
[14:09:42] burgestrand: RougeT430 style doesn't matter too much (in my opinion), but consistency does, but I guess this guide is as good as any: https://github.com/bbatsov/ruby-style-guide
[14:09:47] JaccoP: has joined #ruby
[14:09:57] aScottishBoat: it's near line 70
[14:10:10] burgestrand: RougeT430 github links to this: https://github.com/github/rubocop-github/blob/master/STYLEGUIDE.md
[14:10:42] aScottishBoat: https://gist.github.com/naltun/675a3ce90b46ba4f3f0a7eb8e3b74e4d
[14:10:48] aScottishBoat: I forked your gist Rouge
[14:11:10] aScottishBoat: without making any additional changes, I indented properly for you. So you can see the difference.
[14:12:53] aScottishBoat: I'm making some edits*** RougeT430
[14:13:20] RougeT430: aScottishBoat: oh thankyou, i was just reading that style guide. but it wil be useful to see your indents
[14:13:21] brandthdl: has joined #ruby
[14:13:26] RougeT430: let me have a look at the fork
[14:13:30] aScottishBoat: https://gist.github.com/naltun/675a3ce90b46ba4f3f0a7eb8e3b74e4d
[14:13:41] aScottishBoat: attack_hashes, heal_func
[14:15:04] RougeT430: yeah that does look a lot nicer and readable. im going to have a compare now between mine and yours to see how to improve
[14:15:42] burgestrand: aScottishBoat changing the attacks_hashes to a local variable makes it unreachable inside string_hash, which'll cause a runtime error when attempting to read it
[14:16:11] burgestrand: aScottishBoat talking about this line: https://gist.github.com/naltun/675a3ce90b46ba4f3f0a7eb8e3b74e4d/revisions#diff-da87c755a1e2974c804560b03783b84eL45
[14:16:46] aScottishBoat: $attack_hashes then?
[14:17:12] aScottishBoat: I mean, there was a function that had an unassigned hash. Should it have stayed like that?
[14:17:14] RougeT430: isnt using global variables frowned upon unless truly neccessary
[14:17:16] burgestrand: aScottishBoat that makes it global, which I'd recommend against as well, I'd just keep it as a method, at most make it a constant (first letter of the variable name turned capital)
[14:17:25] burgestrand: aScottishBoat it wasn't unassigned, it was the return value
[14:17:43] aScottishBoat: I got that, but it seemed odd to me.
[14:17:48] aScottishBoat: I trust you two, cool
[14:17:55] RougeT430: im not sure of the best way to do it tbh
[14:18:16] burgestrand: aScottishBoat if you want, you could name it `Attacks_hashes = { … }` instead, that'll do what you intended
[14:18:30] aScottishBoat: what's the scope of a constant?
[14:18:51] RougeT430: that would give it the scope for that class no?
[14:19:04] burgestrand: It'd be Super_calc::Attacks_hashes
[14:19:10] burgestrand: or whatever the name of that class was :)
[14:19:33] aScottishBoat: Ooo cool. Ugh I need to get back into using Ruby. I've forgotten loads.
[14:19:36] krawchyk: has joined #ruby
[14:19:53] RougeT430: better than me aScottishBoat ;) ive yet to learn loads to forget
[14:19:55] aScottishBoat: Don't shun me but I've been working on a side project using PHP... And yes, I'm utilizing the ncurses library that PHP provides haha
[14:20:27] aScottishBoat: RougeT430, well the community is fantastic (I mentioned that yesterday when you were around). Please feel free to stick around.
[14:20:29] burgestrand: Also, in line with the majority* of style guides, Ruby tend to use CamelCasing instead of Snake_Case for constants/modules/classes, i.e. SuperChar and AttacksHashes
[14:20:54] burgestrand: That's purely stylistic though, but generally recommended to avoid that popping up in every discussion when posting code ;)
[14:21:00] aScottishBoat: If I'm not mistaken I think I've always seen Ruby constants in all uppercase
[14:21:10] ledestin: has joined #ruby
[14:21:13] burgestrand: You're definitely mistaken
[14:21:23] burgestrand: I can't decide your facts
[14:21:28] burgestrand: But I can tell you that it's not always so :)
[14:21:40] aScottishBoat: Then some people on exercism give non-community styled feedback
[14:22:07] elphe: has joined #ruby
[14:22:12] charliesome: has joined #ruby
[14:22:15] burgestrand: Community-style is whatever you perceive to be the majority, all-uppercase constants is not necessarily frowned upon
[14:22:26] burgestrand: Keep in mind class names and module names are also constants, and they're not all-uppercase
[14:23:07] aScottishBoat: That is true, err but using a constant as a variable
[14:23:28] aScottishBoat: I just like doing what the majority of the language community agrees on... Saves me headaches
[14:23:35] burgestrand: I agree with that
[14:24:55] gnufied: has joined #ruby
[14:26:37] DLSteve_: has joined #ruby
[14:27:49] RougeT430: is there a way of converting symbols to strings in ruby (not rails)
[14:28:02] RougeT430: was finding methods for rails
[14:28:33] RougeT430: ill just make them strings for now, but look for a way to do it later
[14:31:58] bruce_lee: has joined #ruby
[14:31:58] bruce_lee: has joined #ruby
[14:32:11] aScottishBoat: hmm well this is a good time to acquaint yourself with the ruby docs
[14:33:35] aScottishBoat: Core in the navbar (Core API are classes/methods/etc. that you have access to without having to import any additional libraries -- for importable libraries you can work with, that ship with a standard Ruby install, check out Std-Lib)
[14:34:18] aScottishBoat: You'll get two searchable fields, one for Classes and one for Methods. You can type in "Symbol" into the Classes searchbar, and click on C Symbol to learn more about that class.
[14:35:18] aScottishBoat: All pages have a "Methods" section. You'll notice that some methods have :: and some have #. For example. Symbol::all_symbols is a class method. You can execute it directly from the class name (Symbol)
[14:36:15] aScottishBoat: Symbol#capitalize on the otherhand is executed on an object of a symbol. :my_symbol.capitalize
[14:36:35] aScottishBoat: It just so happens there is a Symbol#to_s function.
[14:37:42] qba73: has joined #ruby
[14:38:26] aScottishBoat: Also, I didn't know you could turn off GC in Ruby. IS there any point to that?
[14:39:38] qba73: has joined #ruby
[14:40:42] petervbeck: has joined #ruby
[14:40:53] iloveitaly: has joined #ruby
[14:43:48] petervbeck: has joined #ruby
[14:44:31] Bish: has joined #ruby
[14:44:43] Bish: if i want to distribute something fairly
[14:44:58] Neptu: has joined #ruby
[14:45:01] Bish: how do you go around
[14:45:09] Bish: >> 49.fdiv(49)*49
[14:45:11] ruby[bot]: Bish: # => 49.0 (https://eval.in/917707)
[14:45:17] Bish: >> 1.fdiv(49)*49
[14:45:18] ruby[bot]: Bish: # => 0.9999999999999999 (https://eval.in/917708)
[14:46:44] Bish: i have a weighted random function which recures the probabilities to add up to 1
[14:46:57] Bish: requires*
[14:47:18] alfiemax: has joined #ruby
[14:48:36] Bish: and that would make it crash
[14:49:23] guille-moe: has joined #ruby
[14:56:01] pastorinni: has joined #ruby
[14:56:05] jnollette: has joined #ruby
[14:56:18] kspencer: this may sound a bit weird, but if I create a file that i 'require' that has classes like Sequel Models, and require them into Cinch plugins, that's completely fine and valid use of them right?
[14:56:23] AndreiZ: has left #ruby: ("hold my beer and watch this!")
[14:57:29] polishdub: should work, but whether it's the ruby way, I cannot say :/
[14:59:27] kspencer: yeah, its more because I want to have valid paths from each class or constant and not have to use $vars in all my code :|
[15:00:47] oleo2: has joined #ruby
[15:01:45] yeticry: has joined #ruby
[15:02:11] oleo: has joined #ruby
[15:03:15] mtkd: has joined #ruby
[15:09:21] jnollette: has joined #ruby
[15:10:40] safetypin: has joined #ruby
[15:10:55] qba73: has joined #ruby
[15:12:59] guille-moe: has joined #ruby
[15:13:26] aScottishBoat: has joined #ruby
[15:15:54] eckhardt: has joined #ruby
[15:16:52] Rapture: has joined #ruby
[15:16:55] JaccoP: has joined #ruby
[15:18:05] burgestrand: Bish depending on use-case you might want to take a look at Rational
[15:18:22] oleo2: has joined #ruby
[15:18:58] petervbeck: has joined #ruby
[15:19:02] Bish: Burgestrand: i already figured that would help
[15:19:05] Bish: how do rationals work
[15:19:08] Bish: are they just 2 integers?
[15:19:56] burgestrand: Bish a numerator and denominator
[15:20:10] Bish: yeah but what are they?
[15:20:26] burgestrand: >> Rational("1.5/3.7")
[15:20:27] ruby[bot]: Burgestrand: # => invalid value for convert(): "1.5/3.7" (ArgumentError) ...check link for more (https://eval.in/917729)
[15:20:36] burgestrand: >> Rational("1.5/5")
[15:20:42] ruby[bot]: Burgestrand: # => (3/10) (https://eval.in/917730)
[15:20:47] Bish: >> 1.fdiv(3).to_r
[15:20:48] ruby[bot]: Bish: # => (6004799503160661/18014398509481984) (https://eval.in/917731)
[15:20:57] burgestrand: >> Rational("1/3")
[15:20:59] ruby[bot]: Burgestrand: # => (1/3) (https://eval.in/917732)
[15:21:00] Bish: >> 1.fdiv(3).to_r.to_f
[15:21:01] ruby[bot]: Bish: # => 0.3333333333333333 (https://eval.in/917733)
[15:21:10] Bish: oh that's why u do it that ugly way
[15:21:14] burgestrand: >> 1/3r + 1/3r + 1/3r
[15:21:39] burgestrand: ACTION kicks @ruby[bot] 
[15:21:43] burgestrand: >> 1/3r + 1/3r + 1/3r
[15:21:44] ruby[bot]: Burgestrand: # => (1/1) (https://eval.in/917734)
[15:21:56] Bish: thanks, i think ill do that
[15:22:04] burgestrand: As long as you're dealing with rational numbers they'll stay accurate, AFAIK
[15:22:19] burgestrand: If you want to play around with π you've got problems though
[15:24:24] qba73: has joined #ruby
[15:26:50] Puffball: has joined #ruby
[15:29:05] RougeT430: ahh thats useful ascottishboat ill try that shortly
[15:29:21] aScottishBoat: has joined #ruby
[15:29:30] RougeT430: also. im now stuck on trying to call a class method recursively i think
[15:29:32] RougeT430: https://gist.github.com/CodePint/1c5523b724e96148e49cc9e565c46a9a
[15:30:00] RougeT430: line 75/78 give no method error
[15:30:27] RougeT430: i know the scope is wrong but im not sure how to fix it. not sure if its a class/instance method thing
[15:32:08] dinfuehr: has joined #ruby
[15:35:02] Asher1: has joined #ruby
[15:35:18] mikecmpb_: has joined #ruby
[15:43:03] guille-moe: has joined #ruby
[15:43:30] ghoti: has joined #ruby
[15:46:30] chocoelho: has joined #ruby
[15:48:53] Cavallari: has joined #ruby
[15:52:57] Sylario: has joined #ruby
[15:59:58] aScottishBoat: RougeT430, how's it going
[16:01:09] jaruga: has joined #ruby
[16:01:27] qba73: has joined #ruby
[16:02:23] cagomez: has joined #ruby
[16:03:52] banisterfiend: has joined #ruby
[16:05:09] ur5us: has joined #ruby
[16:09:09] troys: has joined #ruby
[16:10:04] ledestin: has joined #ruby
[16:10:59] mostlybadfly: has joined #ruby
[16:12:55] DmitryBochkarev: has joined #ruby
[16:15:46] nankyokusei: has joined #ruby
[16:16:21] loveablelobster: has joined #ruby
[16:22:34] EXCHGR: has joined #ruby
[16:24:40] alfiemax: has joined #ruby
[16:26:28] PaulCapestany: has joined #ruby
[16:29:21] cognoscente: has joined #ruby
[16:30:43] qba73: has joined #ruby
[16:30:57] nankyokusei: has joined #ruby
[16:32:14] alfiemax: has joined #ruby
[16:35:58] despai: has joined #ruby
[16:37:03] kapil___: has joined #ruby
[16:37:16] despai: has joined #ruby
[16:37:17] rippa: has joined #ruby
[16:46:07] sanscoeur: has joined #ruby
[16:51:26] cagomez: has joined #ruby
[16:52:57] RougeT430: has joined #ruby
[16:54:21] nogic: has joined #ruby
[16:56:49] s3nd1v0g1us: has joined #ruby
[16:57:27] JaccoP: has joined #ruby
[16:59:47] chocoelho: has joined #ruby
[17:01:08] dionysus69: has joined #ruby
[17:03:08] mikecmpbll: has joined #ruby
[17:03:42] mikecmpbll: for what possible reason could i the following two be the case at the same time: hash.key?(foo) => false; hash.keys.first == foo => true
[17:03:45] mikecmpbll: and ofc hash[foo] => nil
[17:05:51] mikecmpbll: excuse the notation, i was using => to denote the return value.
[17:06:12] rm8: has joined #ruby
[17:08:13] pifon: has joined #ruby
[17:11:21] mim1k: has joined #ruby
[17:15:45] vdl: has joined #ruby
[17:18:34] nhs: has joined #ruby
[17:23:29] havenwood: >> class Foo; def hash; rand.hash end end; foo = Foo.new; hash = {foo => true}; [hash.key?(foo), hash.keys.first == foo, hash[foo]]
[17:23:30] ruby[bot]: havenwood: # => [false, true, nil] (https://eval.in/917907)
[17:23:34] havenwood: mikecmpbll: ^
[17:24:20] plexigras: has joined #ruby
[17:25:10] mikecmpbll: havenwood : nicee ..
[17:25:22] mikecmpbll: and in the case where foo.hash == hash.keys.first.hash? :'<
[17:25:51] mikecmpbll: foo is an activerecord, for what it's worth .. i think i need to look at this with a fresh head. i'm probably doing something retarded.
[17:25:54] ramfjord: has joined #ruby
[17:26:39] nadir: has joined #ruby
[17:29:40] jud^: has joined #ruby
[17:30:16] funburn: has joined #ruby
[17:32:10] lupine: has joined #ruby
[17:33:51] Terens: has joined #ruby
[17:35:27] aspiers: has joined #ruby
[17:37:26] bmurt: has joined #ruby
[17:39:22] bradleyprice: has joined #ruby
[17:39:22] houhoulis: has joined #ruby
[17:41:37] dviola: has joined #ruby
[17:41:49] Terens: Hello. Which is the best way to communicate between a webserver and 10.000 devices ? Send configuration/ updates/ and receive statistics / live tools etc ?
[17:42:05] jxv: has joined #ruby
[17:42:46] alfiemax: has joined #ruby
[17:44:07] oleo2: has joined #ruby
[17:45:54] havenwood: terens: DRb! ;-)
[17:47:37] Exhiled: has joined #ruby
[17:47:56] KeyJoo: has joined #ruby
[17:50:39] marr: has joined #ruby
[17:51:12] orbyt_: has joined #ruby
[17:55:53] guille-moe1: has joined #ruby
[17:57:47] RickHull: terens: is HTTP an option?
[18:00:37] mikecmpbll: has joined #ruby
[18:01:06] AJA4350: has joined #ruby
[18:01:08] MrSparkle: has joined #ruby
[18:02:55] RickHull: thinking broadly: you would have to maintain your "cloud webserver server" pretty tightly -- DNS, SSL, etc.
[18:03:06] RickHull: s/server server/server/ :)
[18:03:32] RickHull: and the device would have to be preconfigured with the DNS and certs, etc.
[18:03:47] alfiemax: has joined #ruby
[18:04:00] RickHull: then it can check in, download new configs and updates
[18:04:48] graft: has joined #ruby
[18:05:10] RickHull: you'll have to be careful about DoS on the webserver. probably want to authenticate critical requests
[18:05:44] RickHull: is this what you have in mind? it's not trivial to do it right
[18:07:12] RickHull: you will want to make sure your IoT devices can update their network stack in response to CVEs etc
[18:09:19] hahuang65: has joined #ruby
[18:09:32] allcentury: has joined #ruby
[18:11:42] conta2: has joined #ruby
[18:12:10] zautomata1: has joined #ruby
[18:16:33] guille-moe: has joined #ruby
[18:16:49] banisterfiend: has joined #ruby
[18:18:50] rm8: has left #ruby: ("i quit")
[18:20:22] RickHull: definitely consider validating downloads with checksums
[18:21:33] RickHull: for uploading stats etc. PUT and POST should be fine
[18:21:57] RickHull: make sure whatever update loop the device is running can cope with downtime
[18:23:39] Terens: I see but I want some realtime shit
[18:24:02] mcr1: has joined #ruby
[18:24:08] Terens: Initially i tried with websockets/actioncable
[18:24:27] Terens: but ssl with event machine is not secure
[18:24:46] Terens: and actioncable isn't enough mature
[18:25:23] Terens: doing http requests polling would ruin my server
[18:25:45] Terens: Also I tried a bit mqtt but have other issues
[18:25:53] Terens: scaling etc
[18:27:03] uZiel: has joined #ruby
[18:29:15] elphe: has joined #ruby
[18:30:10] hahuang65: has joined #ruby
[18:31:10] despai: has joined #ruby
[18:33:58] Technodrome: has joined #ruby
[18:35:10] ogres: has joined #ruby
[18:36:55] johnpaul: has joined #ruby
[18:37:57] sameerynho: has joined #ruby
[18:37:58] despai_: has joined #ruby
[18:38:00] bmurt: has joined #ruby
[18:38:57] tomphp: has joined #ruby
[18:40:13] havenwood: terens: Is Elixir with Phoenix Channels an option?
[18:41:26] havenwood: 10k would be no problem with a BEAM process per WebSocket.
[18:42:16] funburn: has joined #ruby
[18:42:21] veeti: has joined #ruby
[18:42:42] havenwood: terens: How about H2? There're good Ruby libraries on that front.
[18:43:10] havenwood: https://github.com/igrigorik/http-2
[18:44:48] mtkd: has joined #ruby
[18:45:05] Terens: seems insecure but could be fixed https://github.com/igrigorik/http-2/blob/7cee6a37677945ef20398f476da75e7dd3525c01/example/client.rb#L18
[18:46:51] lytol_: has joined #ruby
[18:48:24] elphe: has joined #ruby
[18:53:09] ramfjord: has joined #ruby
[18:59:35] bmurt: has joined #ruby
[19:00:23] jackjackdripper: has joined #ruby
[19:03:00] zesadf324as: has joined #ruby
[19:04:07] tabula_0x00: has joined #ruby
[19:05:47] veeti: has joined #ruby
[19:06:28] cdg: has joined #ruby
[19:13:01] tristanp: has joined #ruby
[19:13:28] im0nde: has joined #ruby
[19:20:12] jottr: has joined #ruby
[19:20:31] alfiemax: has joined #ruby
[19:22:14] yeticry: has joined #ruby
[19:22:24] chocoelho: has joined #ruby
[19:23:04] tomphp: has joined #ruby
[19:24:20] TomyLobo: has joined #ruby
[19:27:54] tomphp: has joined #ruby
[19:29:22] Dimik: has joined #ruby
[19:31:26] rrutkowski: has joined #ruby
[19:34:40] claudiuinberlin: has joined #ruby
[19:35:02] rrutkowski: has joined #ruby
[19:35:37] shtirlic: has joined #ruby
[19:37:21] mostlybadfly: has joined #ruby
[19:37:30] dionysus69: has joined #ruby
[19:38:12] rrutkowski: has joined #ruby
[19:38:34] shtirlic: has joined #ruby
[19:38:35] RougeT430: has joined #ruby
[19:40:39] tomphp: has joined #ruby
[19:42:58] rrutkowski: has joined #ruby
[19:45:57] loveablelobster: has joined #ruby
[19:48:00] unreal: has joined #ruby
[19:48:18] rrutkowski: has joined #ruby
[19:51:05] csk157: has joined #ruby
[19:51:15] klaas: has joined #ruby
[19:52:53] csk157_1: has joined #ruby
[19:53:01] rrutkowski: has joined #ruby
[20:01:36] cdg: has joined #ruby
[20:03:11] yeticry: has joined #ruby
[20:04:37] ur5us: has joined #ruby
[20:05:39] mtkd: has joined #ruby
[20:06:26] hahuang65: has joined #ruby
[20:08:14] bmurt: has joined #ruby
[20:08:15] cdg: has joined #ruby
[20:08:27] alfiemax: has joined #ruby
[20:10:01] shtirlic: has joined #ruby
[20:11:33] elphe: has joined #ruby
[20:14:44] ohcibi: has joined #ruby
[20:17:49] SeepingN: has joined #ruby
[20:20:17] shtirlic: has joined #ruby
[20:32:35] tabula_rax_a: has joined #ruby
[20:32:37] allcentury: has joined #ruby
[20:32:38] SeepingN_: has joined #ruby
[20:32:55] nofxx1: has joined #ruby
[20:33:17] Norm_: has joined #ruby
[20:33:36] br0d1n: has joined #ruby
[20:33:47] alfiemax: has joined #ruby
[20:34:00] Asher: has joined #ruby
[20:34:24] Azure|dc: has joined #ruby
[20:35:07] ur5us_: has joined #ruby
[20:35:26] ski4x7: has joined #ruby
[20:35:55] _whitelogger_: has joined #ruby
[20:36:15] knight_: has joined #ruby
[20:36:19] ahrs: has joined #ruby
[20:36:21] faces: has joined #ruby
[20:36:32] Puffball: has joined #ruby
[20:36:37] hays: has joined #ruby
[20:36:38] hays: has joined #ruby
[20:36:39] marr: has joined #ruby
[20:36:42] Fraeon: has joined #ruby
[20:36:50] pabs: has joined #ruby
[20:36:55] pecan: has joined #ruby
[20:37:01] lacour: has joined #ruby
[20:37:02] jsaak: has joined #ruby
[20:37:08] flori: has joined #ruby
[20:37:09] cout: has joined #ruby
[20:37:20] jenrzzz: has joined #ruby
[20:37:21] jenrzzz: has joined #ruby
[20:37:27] planigan: has joined #ruby
[20:37:31] waveprop: has joined #ruby
[20:37:45] VladGh: has joined #ruby
[20:37:54] enterprisey: has joined #ruby
[20:37:54] ohcibi: has joined #ruby
[20:39:25] fury: has joined #ruby
[20:39:36] syndikate: has joined #ruby
[20:39:42] nikivi: has joined #ruby
[20:39:59] endemic: has joined #ruby
[20:40:00] halt: has joined #ruby
[20:40:08] selim: has joined #ruby
[20:40:15] Tharbakim: has joined #ruby
[20:40:15] Tharbakim: has joined #ruby
[20:40:41] Liothen: has joined #ruby
[20:40:42] shortdudey123: has joined #ruby
[20:40:45] coderphive: has joined #ruby
[20:40:48] daemonwrangler_: has joined #ruby
[20:40:50] russt: has joined #ruby
[20:40:58] Swat2: has joined #ruby
[20:41:03] Voxxit: has joined #ruby
[20:41:41] spider-mario: has joined #ruby
[20:41:46] simonizor: has joined #ruby
[20:41:47] haylon: has joined #ruby
[20:43:09] ltem: has joined #ruby
[20:43:41] shortdudey123: has joined #ruby
[20:44:16] hurricanehrndz: has joined #ruby
[20:44:29] miah: has joined #ruby
[20:44:55] G: has joined #ruby
[20:45:22] claw: has joined #ruby
[20:45:22] brodul: has joined #ruby
[20:45:28] heftig: has joined #ruby
[20:45:45] nickjj: has joined #ruby
[20:45:53] mr_rich101: has joined #ruby
[20:46:30] linduxed: has joined #ruby
[20:47:23] aef: has joined #ruby
[20:47:24] cosimo_: has joined #ruby
[20:48:03] hahuang65: has joined #ruby
[20:49:01] fury: anyone familiar with the ruby alpine docker image? i can't seem to enter the rails console, it says it can't find rake in any of the sources... the app itself works fine, i can even pull it up in my web browser, or start up another console and say "rails server" and it's aware enough that a server is already running...but "rails console" seems to have no clue
[20:50:14] bokayio: has joined #ruby
[20:50:23] fmccann: has joined #ruby
[20:51:01] cdg: has joined #ruby
[20:54:59] eblip: has joined #ruby
[20:55:26] charliesome: has joined #ruby
[20:56:03] chmurifree: has joined #ruby
[20:56:37] CrazyEddy: has joined #ruby
[20:58:23] RickHull: try `gem env`
[20:58:57] RickHull: wherever the ruby binary lives, there should be a rake binary as well, as ruby still comes packaged with rake IIRC
[20:59:06] RickHull: that said, there is a rake gem to get a newer rake
[20:59:37] RickHull: paste the error message you're getting -- use a paste site
[20:59:54] RickHull: also include the output from `gem env` as well as `which ruby` and `which rake`
[21:01:18] cdg: has joined #ruby
[21:01:24] jamiejackson: has joined #ruby
[21:02:49] rhyselsmore: has joined #ruby
[21:08:38] my123_: has joined #ruby
[21:08:39] my123_: has joined #ruby
[21:08:39] despai: has joined #ruby
[21:09:28] Klumben: has joined #ruby
[21:10:08] petervbeck: has joined #ruby
[21:12:07] cognoscente_: has joined #ruby
[21:12:43] chocoelho1: has joined #ruby
[21:15:21] chromis: has joined #ruby
[21:16:42] fury: RickHull: https://gist.github.com/ftab/d9e40e4994e22b182e0e1c26ada9d0f9 - includes the dockerfile and gemfile, hope that helps narrow down what i'm doing wrong
[21:17:22] fury: scroll to the bottom for terminal where i did gem env / rails console / which ruby / which rake
[21:18:20] RickHull: ok, I think you need to do `bundle install` first
[21:18:32] RickHull: it looks like rake 12.3 is a transitive dependency of something in the Gemfile
[21:18:44] fury: in the terminal? says everything's already installed
[21:18:48] RickHull: are you following any instructions or a tutorial?
[21:19:04] RickHull: it says: Could not find rake-12.3.0 in any of the sources Run `bundle install` to install missing gems.
[21:19:54] RickHull: I see here https://gist.github.com/ftab/d9e40e4994e22b182e0e1c26ada9d0f9#file-dockerfile-L22
[21:20:05] RickHull: it looks like `bundle install` would be run -- but I'm not sure
[21:20:27] fury: yeah, it does run it, and when i do that in the terminal it just gives me the green light right away, says 19 gemfile dependencies, 74 gems installed
[21:20:50] fury: my init.sh is pretty simple, just bundle exec rake db:create db:migrate then bundle exec rails server -p 80 -b 0.0.0.0
[21:21:01] dtzuzu: has joined #ruby
[21:21:12] RickHull: after running `bundle install`
[21:21:14] fury: so that's what it runs on container startup, and that does work, cause the app server works - i can access port 80 of the container and run the app, it talks to my database, etc
[21:21:26] RickHull: can you `grep -i rake Gemfile.lock` ?
[21:21:37] alfiemax_: has joined #ruby
[21:21:52] fury: two lines, rake (>= 0.8.7) and rake (12.3.0)
[21:22:06] RickHull: you should have a Gemfile.lock somewhere
[21:22:17] fury: should i delete it and run bundle install again?
[21:23:05] fury: matter of fact Gemfile.lock is in my git repo, not sure if that should be the case or what
[21:23:17] RickHull: find that 12.3.0 line in the Gemfile, and see who needs it
[21:23:35] RickHull: (I'm sure there is a quicker way to resolve this, but we can work through it naively)
[21:23:48] RickHull: sorry, in the Gemfile.lock
[21:24:10] fury: 12.3.0 is in the top level under specs:
[21:24:34] fury: the >= 0.8.7 is under railties (5.1.4)
[21:24:41] nogic: has joined #ruby
[21:24:49] RickHull: i don't know what specs means in the Gemfile.lock -- I haven't used bundler in a while
[21:25:01] RickHull: it sounds like bundler itself depends on rake 12.3
[21:25:25] fury: sounds about right, i never defined it in the gemfile so i'd think it comes with the thing
[21:25:34] RickHull: just for fun, what do you get for `rake --version` ?
[21:26:06] RickHull: ok -- you need to do `bundle exec rails console` maybe
[21:26:15] fury: same error
[21:26:25] RickHull: `bundle exec rake --version` ?
[21:26:37] fury: 12.3.0 there as well
[21:26:45] RickHull: sounds FUBAR to me
[21:26:53] fury: this is starting to weird me out... how can it find rake but not be able to find rake :P
[21:27:00] Xeago: has joined #ruby
[21:27:38] RickHull: anyways, try #bundler maybe, unless someone else can chime in
[21:27:43] fury: everything else works, literally all i was going to use the rails console for was to create a user so i didn't need to add a user signup page to my one-off app for which i reeeeeeally don't want a user signup page (only want a username and password to lock down a database view/edit)
[21:28:07] RickHull: well -- this is something I would want to fix. this is FUBAR IMHO and I wouldn't want to proceed without fixing/understanding
[21:28:46] RickHull: whatever this mystery is, it's likely to cause more pain and mystery later
[21:29:43] redondos: has joined #ruby
[21:29:50] sammi`_: has joined #ruby
[21:32:34] Ouchy: has joined #ruby
[21:32:35] Ouchy: has joined #ruby
[21:33:02] fury: think it has something to do with that path. i was trying to get it to where i could cache the gem building output between builds so my gitlab CI could go a little faster between commits (i tend to do those rapid-fire "maybe this'll work?" "nope, try this" commits when i don't have the environment set up on my local machine)
[21:37:08] pastorinni: has joined #ruby
[21:39:06] rrutkowski: has joined #ruby
[21:40:22] silverdu1t: has joined #ruby
[21:41:30] fury: well, that wasn't it, and it put it in the same folder anyway, so dunno
[21:41:33] im0nde: has joined #ruby
[21:44:10] fury: so when i say gem uninstall rake, that tells me rake is not installed in GEM_HOME
[21:44:41] fury: thinking i told bundle to install to the wrong location
[21:45:33] cdg_: has joined #ruby
[21:45:53] eblip: has joined #ruby
[21:46:38] halt: has joined #ruby
[21:47:32] jordanm: has joined #ruby
[21:54:15] funburn: has joined #ruby
[21:57:28] miskatonic: has joined #ruby
[22:00:35] garyserj: has joined #ruby
[22:03:43] Exhiled: has joined #ruby
[22:07:43] RickHull: fury: yeah, bundler and rubygems have some overlap and can disagree about things. in general, rubygems will put gems in the configured location, and they are "globally" available (not per-project)
[22:07:57] RickHull: this can be in a system location (via sudo) or in a user location
[22:08:32] RickHull: bundler is about installing gems to a per-project location, to avoid incompatibilities (particularly with versioning) against previously installed gems
[22:08:55] RickHull: and this is why `bundle exec` is used -- to make sure only per-project gems are considered
[22:09:38] allcentury: has joined #ruby
[22:09:50] bmurt: has joined #ruby
[22:10:07] RickHull: if you are using bundler, then you should probably *NOT* try to fix things with `gem`
[22:10:24] RickHull: i.e. `gem install` and `gem uninstall` will not affect projects using bundler
[22:10:49] RickHull: as to what's going on with bundler and rake in your situation, I'm not sure
[22:16:48] mim1k: has joined #ruby
[22:17:08] garyserj: why does this code give an error https://repl.it/repls/GreedyCurlyAsianwaterbuffalo I am trying code for writing a file , it tells me "syntax error, unexpected '|', expecting '}' But i'm using code I saw here https://stackoverflow.com/questions/2777802/how-to-write-to-file-in-ruby
[22:18:47] bmurt: has joined #ruby
[22:19:53] apeiros: garyserj: ruby doesn't like your { being on a new line
[22:20:14] friday: has joined #ruby
[22:21:51] camilasan: has joined #ruby
[22:22:32] baweaver: .NET left-braces won't work in Ruby.
[22:23:07] meesles: has joined #ruby
[22:23:28] jenrzzz: has joined #ruby
[22:23:28] jenrzzz: has joined #ruby
[22:25:31] mtkd: has joined #ruby
[22:26:04] tomphp: has joined #ruby
[22:33:37] bmurt: has joined #ruby
[22:33:47] cagomez: has joined #ruby
[22:33:49] funkytwig: has joined #ruby
[22:36:00] Exagone313: has joined #ruby
[22:36:15] funkytwig: has joined #ruby
[22:39:31] funburn: has joined #ruby
[22:40:30] Exagone313: has joined #ruby
[22:43:42] chrisgopher: has joined #ruby
[22:46:16] Dykam: has joined #ruby
[22:50:12] alfiemax: has joined #ruby
[22:50:31] Xiti: has joined #ruby
[22:53:55] Azure: has joined #ruby
[22:56:24] garyserj: thanks.. What is the difference between opening a file for writing with "w" and opening it for writing in binary mode "wb" ?
[22:58:07] meesles: One part is depends on the file. Binary files are useless when opened as text-only, and vice-versa
[22:58:59] meesles: Here's the spec: http://pubs.opengroup.org/onlinepubs/009695399/functions/fopen.html
[22:59:08] meesles: (not ruby-specific)
[23:00:05] garyserj: what encoding would ruby use to read a file if no encoding is specified?
[23:00:12] garyserj: if it's just "r"?
[23:00:19] meesles: Text is default I believe
[23:00:31] meesles: That's why there's an explicit *b version of all the file modes
[23:00:33] garyserj: what does text mean.. could be utf8 utf16LE utf16BE
[23:00:58] meesles: Sure, you can specify additional encoding if needed. I'm just explaining the primary difference between the two modes you asked about
[23:01:15] garyserj: I mean what will it do if no encoding is specified?
[23:01:20] garyserj: will it do utf8? utf16be?
[23:02:05] meesles: Doing the same googling you could be doing
[23:02:08] meesles: Look slike utf8 is default
[23:03:06] meesles: But I would just specify if you're concerned about it
[23:07:07] yeticry: has joined #ruby
[23:07:11] alfiemax: has joined #ruby
[23:08:29] pabs: has joined #ruby
[23:08:42] minimalism: has joined #ruby
[23:12:08] Dykam: has joined #ruby
[23:13:59] guille-moe: has joined #ruby
[23:19:20] funburn: has joined #ruby
[23:21:03] tcopeland: has joined #ruby
[23:22:54] funburn: has joined #ruby
[23:23:39] funburn: has joined #ruby
[23:24:27] funburn: has joined #ruby
[23:25:20] funburn: has joined #ruby
[23:25:58] ramfjord: has joined #ruby
[23:26:05] funburn: has joined #ruby
[23:27:25] Cohedrin: has joined #ruby
[23:31:57] gbailey: has joined #ruby
[23:34:41] Cohedrin: has joined #ruby
[23:35:00] knight33: has joined #ruby
[23:42:13] veeti: has joined #ruby
[23:43:07] zenspider: garyserj: Try running `ri File.open` and `ri IO.new`
[23:45:24] funburn: has joined #ruby
[23:45:27] hahuang65: has joined #ruby
[23:47:14] baweaver: ohai zenspider
[23:47:17] baweaver: How's things?
[23:47:50] zenspider: not bad! I'm actually plugging away on minitest... trying to get some stuff finalized for the last(?) 5 release
[23:47:55] zenspider: (I hope the last)
[23:48:29] baweaver: (It won't be :P)
[23:50:18] zenspider: well I HOPE it will be
[23:50:41] zenspider: need to fix up serialization to be a bit more solid so we can use that as the precursor for a new minitest-server architecture
[23:59:55] banisterfiend: has joined #ruby