« Back to channel list

#ruby - 24 November 2017

« Back 1 day Forward 1 day »
[00:00:40] RickHull: none of the generator methods require arguments (though roll should basically never be called without at least one); several generator methods allow you to pass in your own values
[00:03:36] leitz: So the generator extends class Character.
[00:04:00] RickHull: it's a distinct module. but it adds that single class method to Character
[00:04:26] alveric4: has joined #ruby
[00:05:28] RickHull: note that the character class can be used without requiring generator stuff
[00:06:06] RickHull: as the character class becomes more useful and fleshed out, it will start requiring stuff. but it stands on its own currently
[00:06:51] RickHull: i added data/names.txt because data/names.db is not immediately useful
[00:06:55] leitz: What happens if you provide limited data and then try to display it? Does the basic.fetch(:symbol) put in a default type?
[00:07:08] RickHull: no, an exception is raised
[00:07:19] leitz: Yeah, names db is a SQLIte thing.
[00:07:21] RickHull: this is a good thing. you cannot instantiate a character without full data
[00:07:24] tAn: has joined #ruby
[00:07:36] RickHull: if you have some partial data and don't care about the rest -- then generate a character
[00:08:00] tAn: has joined #ruby
[00:08:22] RickHull: i use Hash#fetch specifically to say: i expect data at this key, and if there is no key, then raise an exception
[00:08:31] RickHull: it's incredibly useful. errors on missing data is a very good thing
[00:08:42] RickHull: even if it seems annoying or restrictive at first
[00:09:03] leitz: Ah, that was part of the use case. "Character has a name and not much else. If the story or game need more, add it."
[00:09:30] RickHull: right -- i would put that at ring 1, and it is easily achievable
[00:09:43] RickHull: and already, i believe Character.generate handles that use case
[00:10:20] RickHull: Character.generate(name: 'Farley')
[00:10:33] drowze: has joined #ruby
[00:10:45] RickHull: Character.generate(name: 'Farley', gender: 'M', appearance: 'grizzled')
[00:11:45] RickHull: Character.generate(name: 'Farley', gender: 'M', appearance: 'grizzled', age: 72) # etc etc
[00:11:57] leitz: You just want more neck hair.
[00:12:09] RickHull: 'tis true, my kryptonite
[00:14:13] leitz: Okay, honestly, this will require some thought. It's already a little mind-bending for me but the Class extension bit is a whole new avenue of thought. I've read about it but never really caught on.
[00:14:38] RickHull: yeah -- that's known as "open classes"
[00:14:53] RickHull: even though character.rb "owns" class Character
[00:15:03] RickHull: generator.rb is free to open the class up and define new methods
[00:15:25] RickHull: it could do all sorts of other crazy stuff, but I wouldn't advocate that. defining a new method is fine
[00:15:44] leitz: Ah, but you miss the joy. This solves a related problem.
[00:15:50] RickHull: interestingly, generator.rb does not have to require 'character' to do this
[00:15:59] RickHull: though I do have it require 'character'
[00:16:24] RickHull: without that require, Character.generate could still be defined, but the call to Character.new wouldn't make sense
[00:16:42] RickHull: and would likely error unless something else requires character.rb
[00:17:03] RickHull: since generator.rb calls Character.new, I have generator.rb require 'character'
[00:17:34] leitz: So, a character's data will be stored in a database. Probably MongoDB as that's the class I'm taking. Something can pull out the data and then put it into an instance of Character.
[00:18:05] RickHull: sure -- but I would stick with .txt files for now
[00:18:14] RickHull: it's much easier to prototype without dealing with a db
[00:18:15] leitz: Or a Presenter can take the data and present it in some default way, like wiki, html, sql, etc.
[00:18:25] RickHull: IMHO, we are still in prototype / exploratory / "spike" mode
[00:18:32] RickHull: and adding DB stuff is like ring 2 or ring 3
[00:21:17] leitz: I use it as exploration; "does what I'm thinking even make sense if I'm going to do X". Not that my X is perfect, but keeping a minor test helps.
[00:21:32] RickHull: yes, for sure. keep in mind the future milestones
[00:21:54] RickHull: I am very confident we can swap out the textfile db for an RDBMS trivially
[00:22:00] leitz: Humorously, I just did this in Python.
[00:22:36] leitz: Hmm...keep in mind we're different. You are confident, I'm still learning what I can and can't do.
[00:22:58] leitz: There's a pretty large skill gap, I bet.
[00:23:01] RickHull: yep -- I'm just trying to lend my insight
[00:23:18] leitz: I appreciate it, thanks!
[00:23:40] RickHull: the takeaway -- in my mind -- is that we got a whole lot of functionality without a lot of code
[00:23:51] RickHull: and the code itself is nicely decoupled
[00:23:56] charliesome: has joined #ruby
[00:24:00] RickHull: meaning that we get flexibility / modularity / composability
[00:24:26] leitz: The big issue for me right now is going over your code and understanding it.
[00:24:34] milardovich: has joined #ruby
[00:24:45] RickHull: and we've completely separated character generation from having a fully realized character instance
[00:24:58] leitz: Not just the flow, but some of the basics like "::"
[00:24:59] RickHull: yet made it very nice to do character generation with partial data
[00:25:19] RickHull: sure, I'm glad to explain
[00:25:34] RickHull: let's start with generator.rb, Character.generate
[00:25:56] RickHull: the requires at the top should make sense enough. we are going to call Character.new so we need the Character class
[00:26:08] RickHull: we are going to sample data files so we need to require the Data module
[00:26:36] RickHull: since this project is structured like a gem, everything lives inside the TravellerChar module
[00:26:42] RickHull: i don't much care for this name particularly, but it's fine
[00:27:01] RickHull: define the TravellerChar module as an empty module in lib/traveller_char.rb
[00:27:27] RickHull: our Character class is inside the TravellerChar module, so we reference it fully with TravellerChar::Character
[00:27:41] johno84: has joined #ruby
[00:27:52] RickHull: likewise, the Character class itself is defined at lib/traveller_char/character.rb
[00:28:16] RickHull: it's nice to maintain a correspondence between nested classes / modules and nested files in dirs
[00:28:22] RickHull: but it's not a strict 1-1
[00:28:32] leitz: The -r is what tells it to use the module directory?
[00:28:34] RickHull: it's purely convention -- no enforcement
[00:28:35] dviola: has joined #ruby
[00:28:51] RickHull: irb -rpath/to/blah says: require 'path/to/blah'
[00:29:06] leitz: So why the empty module?
[00:29:09] RickHull: it's more of a shorthand than anything -- totally unnecessary
[00:29:30] RickHull: the empty module is there to satisfy structural expectations / conventions
[00:29:39] RickHull: if the gem is named 'traveller_char'
[00:29:44] Guest70176: has joined #ruby
[00:29:47] RickHull: then people expect to be able to require 'traveller_char'
[00:29:57] RickHull: also, you can stuff some utility things in there later
[00:30:14] RickHull: there is another convention which says: require-the-world inside lib/traveller_char.rb
[00:30:28] RickHull: i.e. require 'data'; require 'generator'; require 'this'; require 'that'
[00:30:44] RickHull: I think this convention is useful at times but I don't like it as a default
[00:30:52] RickHull: I like being able to require only the necessary portions
[00:30:56] paradisaeidae: has joined #ruby
[00:31:05] paradisaeidae_: has joined #ruby
[00:31:21] RickHull: so in my gems, generally lib/#{gem_name}.rb is an empty module
[00:31:45] RickHull: though sometimes it is a class, though usually that's for gems which only have that one file in lib
[00:32:03] RickHull: e.g. https://github.com/rickhull/loremarkov/tree/master/lib
[00:32:29] RickHull: since your project will obviously consist of several classes -- the toplevel structure should be a module
[00:32:49] RickHull: e.g. https://github.com/rickhull/compsci/tree/master/lib
[00:34:41] mim1k: has joined #ruby
[00:34:50] RickHull: so, proceeding (and please ask away anytime)
[00:34:53] leitz: ACTION is still going over the code.
[00:35:13] RickHull: line 6 of generator.rb, we define Character.generate
[00:35:45] RickHull: `def self.generate` says that the method is a "class method" -- it is defined on the class, not an instance of the class
[00:36:00] RickHull: are you familiar with this concept?
[00:36:01] cschneid_: has joined #ruby
[00:36:17] RickHull: I was ranting about it last night ;)
[00:36:21] leitz: The "self" determines that?
[00:36:36] leitz: That discussion went over my head early on. ;)
[00:36:45] RickHull: if it were just `def generate` inside `class Character` then it would be an "instance method"
[00:37:05] RickHull: Character.new.generate vs Character.generate
[00:37:10] leitz: I found issues that needed self in CharacterTools but didn't understand why some needed it and some didn't.
[00:37:38] RickHull: yeah -- I get the sense that you and a lot of newbies learn this stuff by trial and error
[00:37:46] RickHull: and sometimes learn the wrong thing :)
[00:38:31] leitz: That's why we set early milestones.
[00:38:41] RickHull: so we define Character.generate -- and it accepts a hash as an argument
[00:38:57] RickHull: the argument is named basic, and it has a default value of empty hash
[00:39:15] RickHull: the default value does not enforce the argument type
[00:39:24] RickHull: a caller could pass in an Array and weird stuff may happen
[00:39:27] qmr: has joined #ruby
[00:39:37] RickHull: in ruby, we generally accept that the caller needs to do something reasonable
[00:39:46] qmr: why does gem pristine rmagick take 30 minutes on a 40 core 80 thread CPU
[00:40:13] RickHull: rmagick is filled with magick
[00:40:29] RickHull: wingardium heat-my-housium
[00:40:35] leitz: I'm looking to understand the ":" after basic.
[00:40:59] RickHull: ok, so by naming the arg basic in the method signature, and giving it a default value (L6)
[00:41:16] RickHull: there will be a local variable named basic inside the method
[00:41:23] RickHull: (this is standard stuff)
[00:41:37] leitz: Hang on a sec.
[00:42:13] RickHull: in L7, we call Character.new (it could be written that way, but self.new (or even new) are more conventional)
[00:42:25] RickHull: self refers to Character
[00:42:41] leitz: Line 6 has basic which defaults to an empty hash if nothing provided. What has me at the moment is the first "basic" in L7.
[00:42:48] RickHull: yep, getting there :)
[00:43:04] leitz: Okay. And self makes me think Python. :P
[00:43:11] RickHull: before that, briefly -- recall that Character.new will call #initialize
[00:43:42] RickHull: i don't know quite how to explain it properly, but Character.new is a class method, while Character#initialize is an instance method
[00:44:05] leitz: I'm okay with that, at a newbie level of okay.
[00:44:13] RickHull: you generally don't define Character.new -- you define Character#initialize
[00:44:31] RickHull: but you can call Character.new which will give you a new BasicObject (I believe) and then #initialize runs
[00:44:53] RickHull: anyways, moving on :)
[00:45:08] RickHull: Character#initialize is defined in character.rb
[00:45:11] RickHull: so let's look at its signature
[00:45:26] RickHull: def initialize(basic: {}, upp: {}, skills: {}, careers: {}, stuff: {})
[00:45:40] RickHull: here we are using keyword arguments (rather than positional arguments)
[00:46:11] RickHull: with keyword arguments, I can call Character.new(upp: yours, basic: bitch, skills: nil)
[00:46:26] RickHull: the order of the arguments is not relevant
[00:47:09] leitz: And each one defaults to an empty hash.
[00:47:41] RickHull: so back to Character.generate
[00:48:08] RickHull: we leave skills, careers, stuff alone
[00:48:22] RickHull: but we provide values for basic and upp
[00:48:37] RickHull: the value for basic is Generator.basic.merge(basic)
[00:48:53] RickHull: Generator.basic returns a hash with populated values
[00:49:07] RickHull: but we merge in the basic hash that was passed in
[00:49:13] RickHull: hsh1.merge(hsh2)
[00:49:21] RickHull: the values from hsh2 will override the values from hsh1
[00:49:31] RickHull: hsh1 is typically your "defaults"
[00:49:37] RickHull: and hsh2 is the "user specifics"
[00:49:45] RickHull: if hsh2 is empty, then you just get the defaults
[00:49:54] nopolitica: has joined #ruby
[00:50:36] RickHull: this is what allows us to say Character.generate(name: 'Leitz')
[00:50:49] oetjenj: has joined #ruby
[00:50:49] RickHull: some other name will get generated, but name: 'Leitz' will override it
[00:50:55] danielpclark: has joined #ruby
[00:51:41] leitz: Hang on, I'm still mentally tracing that.
[00:54:38] leitz: Why use "basic = {}" in L6 and "basic: xxxx" in L7? Why two different assignment types?
[00:55:03] RickHull: i maybe could use different names to make it clearer
[00:55:18] RickHull: L6 basic is the arg to generate; it becomes a local var inside the method
[00:55:25] char_var[buffer]: has joined #ruby
[00:55:35] RickHull: the first basic on L7 is the keyword for the arg to Character.new
[00:55:55] RickHull: the second basic (Generator.basic) is a call the Generator.basic method
[00:56:09] RickHull: the third basic is the local var being passed to Generator.basic
[00:56:14] Cohedrin: has joined #ruby
[00:56:34] leitz: Ah, I followed the Generator.basic, just didn't get the "basic:" bit.
[00:56:52] RickHull: it's from the Character.new method signature
[00:57:00] leitz: I think I have it. *think* being the operative word. :)
[00:57:03] RickHull: you have to know the method signature before you can call it correctly
[00:59:39] RickHull: I would describe L7 as saying: we provide one hash named basic, filled from Generator.basic
[00:59:41] _aeris_: has joined #ruby
[00:59:49] RickHull: and we provide another hash named upp, filled from Generator.upp
[00:59:59] RickHull: we don't allow Generator.upp to be overridden
[01:00:17] RickHull: but we do allow a user to pass in a basic hash that will override (portions of) Generator.basic
[01:00:24] zanoni: i'm trying to create links in a page dynamically, one problem, is that if I do p <generated link> it inserts the p as a paragraph tag. Any ideas to get around that issue?
[01:00:46] RickHull: zanoni: rails?
[01:01:38] charliesome: has joined #ruby
[01:01:40] RickHull: what is `p` in this case? like the sibling of `puts` ?
[01:01:45] RickHull: what is the intention?
[01:02:02] RickHull: are you using haml?
[01:02:22] zanoni: well it generates pagination links , in li classes based on the total page count
[01:02:35] RickHull: in general, you probably don't want to generate html using `puts` and friends
[01:02:36] zanoni: slim, though i'm a butcher in it :)
[01:02:56] zanoni: no, so something else exists?
[01:03:10] RickHull: in general, html fragments are generated as strings
[01:03:18] RickHull: and then rendered to a larger document
[01:03:27] RickHull: and not using stuff targeted for STDOUT
[01:03:33] friday: has joined #ruby
[01:03:40] RickHull: do you have some example code to paste?
[01:04:02] zanoni: yep, but don't go blind :)
[01:05:03] RickHull: leitz: play around in irb too, to understand how some of this works
[01:05:18] RickHull: include TravellerChar # if you haven't already
[01:05:24] RickHull: then: Generator.basic
[01:05:37] leitz: RickHull, I'm at the end of my mental day; up since 0400 local.
[01:05:37] RickHull: Generator.basic.merge(whatever)
[01:05:53] milardov_: has joined #ruby
[01:06:06] leitz: Right now I think reading it one more time and then sleeping on it will let it soak in.
[01:06:24] leitz: Then back at it tomorrow. Might sleep in till 0500 though. :)
[01:06:26] zanoni: https://gist.github.com/stuartambient/b29dc1be1f7597e1eaaf3a1ad3d1a5e5
[01:06:28] RickHull: last thought: no need to run with my fork or whatever -- I just wanted to get you thinking about some alternatives
[01:07:01] leitz: I really want to spend some time thiking on this.
[01:07:46] RickHull: only 3 files, 2 of which are tiny :)
[01:07:47] leitz: I won't run with your fork because I don't understand it yet. Where's the fun in that? I need to really get it, and that means breaking it some.
[01:08:08] RickHull: yep, for sure
[01:08:46] RickHull: my only caution would be -- maybe don't get overinvested in your first design
[01:08:58] RickHull: treat it as a playground
[01:09:28] RickHull: your current design isn't something I would want to work on -- I would rewrite it -- surprise surprise ;)
[01:09:34] leitz: Hehe...This is the second time I've come at this with Ruby, and it started in PHP and took a while in Python. I'm all for re-engineering.
[01:10:01] leitz: See you tomorrow!
[01:10:16] PhoenixMage: Hi All, I am using bundle to install gitlab and I have a local version of a gem installed with the correct version (grpc-1.6.6) yet bundle insists on downloading and compiling the gem. Any idea why?
[01:10:23] zanoni: what do you think Doctor?
[01:10:48] RickHull: zanoni: is this haml?
[01:10:55] RickHull: or you said 'slim' ?
[01:11:18] RickHull: anywho, I'm sure slim has defined `p` as "inject a paragraph tag"
[01:11:36] RickHull: if you want to `p` something, you can just `puts something.inspect`
[01:11:37] zanoni: yeah, it does
[01:11:52] RickHull: but this would be like, logging to the console or something
[01:11:52] neo95: has joined #ruby
[01:12:05] RickHull: I don't think slim has you using puts and friends to generate the doc
[01:12:16] maum: has joined #ruby
[01:12:29] zanoni: well it comes out in the list, prints to the page but the link is broken
[01:12:46] zanoni: no, i'll have to dig through the Slim docs, maybe something in there
[01:13:11] RickHull: it looks like slim uses '-' to indicate code (but no output)
[01:13:31] RickHull: there is probably something similar that indicates code, and inject the output into the doc
[01:13:46] RickHull: er, inject the result of the code
[01:13:57] RickHull: i doubt it's `puts` and I'm sure it's not `p`
[01:14:10] oetjenj: has joined #ruby
[01:14:55] RickHull: like in erb, I think it's <% code here %> versus <%= inject this code result %>
[01:14:56] oetjenj: has joined #ruby
[01:15:44] oetjenj: has joined #ruby
[01:15:51] RickHull: PhoenixMage: bundle will prefer to manage the gems separate from what you have on the system
[01:16:01] hyperreal[m]: has joined #ruby
[01:16:02] weaksauce: yeah that is correct RickHull
[01:16:03] RickHull: PhoenixMage: bundler intends to create an isolated environment
[01:16:33] oetjenj: has joined #ruby
[01:16:37] zanoni: i'm not sure how erb would handle injecting the strings
[01:16:46] RickHull: zanoni: <% versus <%=
[01:17:00] RickHull: but slim surely has something similar
[01:17:17] oetjenj: has joined #ruby
[01:17:23] zanoni: yes, thanks Rick!
[01:17:38] RickHull: maybe - versus = ?
[01:18:27] weaksauce: the slim homepage goes over the basics of it
[01:18:35] weaksauce: but yeah - is control and = is output
[01:18:53] RickHull: sweet, do I get a turkey?
[01:18:55] weaksauce: == is html escaped output
[01:19:01] weaksauce: er without html*
[01:19:09] cdg: has joined #ruby
[01:19:26] weaksauce: are you american?
[01:19:57] PhoenixMage: RickHull: Can I manually install a gem into that isolated env? The grpc gem wont compile inside the env because gcc 7 + -Werror and the fallthrough warning.
[01:20:23] friday: has joined #ruby
[01:20:31] RickHull: PhoenixMage: not sure -- usually when bundler fails to install a gem, it says: try `gem install thingie -v $version`
[01:20:54] RickHull: so even though one time you were able to get grpc to install
[01:21:10] dinfuehr: has joined #ruby
[01:21:11] RickHull: are you able to install the specific version that bundler wants to use, doing it yourself with `gem install` ?
[01:21:32] zanoni: thanks guys, yes, Slim has the = , so closer , not there yet, but will i'm sure
[01:21:51] PhoenixMage: RickHull: Not without editing the Makefile to remove -Werror
[01:22:13] RickHull: PhoenixMage: ok -- what is the gcc 7 thing?
[01:22:29] RickHull: and do you think the errors are significant?
[01:22:38] RickHull: almost certainly editing the Makefile is the wrong thing to do
[01:22:42] ap4y: has joined #ruby
[01:23:13] PhoenixMage: RickHull: Added a warning for fall-through on case statements, the warnings arent significant, there are no errors but using -Werror will cause failures on warnings
[01:23:20] RickHull: please paste the error output
[01:23:32] zanoni: got it! , ==
[01:23:33] RickHull: use e.g. gist.github.com
[01:24:28] RickHull: PhoenixMage: ok, I think I get it. in the C, there are case fall-throughs, which throw warnings, which are escalated to errors
[01:24:46] bloodycock: has joined #ruby
[01:24:50] RickHull: my next question would be, why does the Makefile specify -Werror ?
[01:24:59] PhoenixMage: https://gist.github.com/PhoenixMage/9a011458edb40c52fdb3e74ab05838cb
[01:25:42] PhoenixMage: RickHull: No idea, thats the devs call, not necessarily a bad thing usually but its killing me atm
[01:25:54] RickHull: yeah... 1067 issues and counting: https://github.com/grpc/grpc/issues
[01:26:01] RickHull: have you gone through those?
[01:26:19] RickHull: almost certainly you're not the first to experience this
[01:26:35] RickHull: 275 open PRs
[01:26:46] RickHull: RED FLAG ALERT
[01:27:03] RickHull: if you find the issue, there is probably a documented workaround
[01:27:34] RickHull: you may need to stub in an older build tool environment maybe?
[01:27:42] RickHull: i'm guessing this Makefile was fine with older tools
[01:27:59] PhoenixMage: It is, the fall through warning was introduced in gcc 7
[01:28:39] RickHull: see if you can get an earlier gcc, possibly just built locally, and manipulate PATH or alias to make bundler use it
[01:28:40] PhoenixMage: If there was a way to stop bundler fetching the source every time it would be easy to fix :/
[01:28:49] RickHull: there probably is a way to do that
[01:29:05] RickHull: but I'm hardly a bundler expert. there are some in here
[01:29:07] RickHull: or maybe #bundler
[01:30:01] RickHull: in general, ruby tools want to build C stuff locally to ensure platform compatibility
[01:30:05] RickHull: but binary gems are a thing
[01:30:17] RickHull: and maybe you can make bundler use what you've already got
[01:30:29] Guest70176: has joined #ruby
[01:30:53] RickHull: alternatively, you can fork/clone the gem
[01:30:58] RickHull: edit the makefile or extconf.rb
[01:31:12] RickHull: build it, and let bundler source your forked/fixed gem
[01:31:56] RickHull: myself, I would look hard for an alternative to this unmaintained gem
[01:32:04] RickHull: or consider maintaining it ;)
[01:33:15] PhoenixMage: RickHull: I am compiling gitlab for Arm so not much chance of moving away from i
[01:33:31] RickHull: hm, so this is a gitlab dependency?
[01:33:40] PhoenixMage: The code that actually needs to be fixed is zlib
[01:33:43] RickHull: I would expect they would be on top of this, in some way
[01:34:04] RickHull: have you reached out to them? do they have issues related to their deps?
[01:34:11] RickHull: again, you're probably not the first to experience this
[01:34:57] RickHull: probably someone has forked the gem and added a workaround
[01:35:28] RickHull: and if gitlab is depending on an unmaintained gem... they probably have some level of awareness of current issues
[01:35:30] PhoenixMage: This is an edge case, most ppl dont run gitlab on arm, and even less want to do it on arch linux on arm
[01:35:35] RickHull: and maybe some measure of responsibility
[01:35:55] RickHull: is this error specific to arm?
[01:36:09] RickHull: would you expect to avoid this error on x86?
[01:36:37] PhoenixMage: No sure, havent tried to compile on other platforms but I think the error would be doing a source install on anything that uses gcc 7
[01:36:49] RickHull: yep -- so you're almost certainly not the first
[01:37:08] RickHull: I say unmaintained -- there is dev activity
[01:37:16] RickHull: so search the grpc issues
[01:37:39] RickHull: and in the meantime, see if there are bundler workarounds, or else fork, fix, and rebuild the gem
[01:37:48] PhoenixMage: I have searched the grpc issues, nothing specific to zlib and the work around that worked for boringssl doesnt work this time around
[01:38:07] PhoenixMage: I will see what I can do with the bundler ppl
[01:38:17] RickHull: did you check closed issues too?
[01:38:22] RickHull: this may be fixed on HEAD
[01:38:29] RickHull: but not in the gitlab bundler deps
[01:38:49] RickHull: if that's the case, you could specify a newer version in Gemfile or whatevewr
[01:39:37] RickHull: there must be a ticket for this somewhere, and presumably in Gitlab's infra, on top of grpc or somewhere else
[01:39:49] RickHull: so I would query gitlab for this too
[01:40:42] RickHull: or just build with gcc 6 ;)
[01:40:49] PhoenixMage: Thanks RickHull I will see what I can do
[01:42:32] RickHull: PhoenixMage: https://github.com/grpc/grpc/issues/11765
[01:42:45] RickHull: and there are other similar / dupes referenced in there as well
[01:43:17] xlegoman: has joined #ruby
[01:44:29] PhoenixMage: RickHull: Yeah that works for installed gems, I have grpc installed for my user but it doesnt work for bundler because you cant modify the Makefile to fix it
[01:44:52] PhoenixMage: Until I find a way to get bundler to use the local source rather then grabbing it again
[01:45:01] PhoenixMage: Which is what I am looking into now
[01:45:53] lexruee: has joined #ruby
[01:46:03] RickHull: I believe they are saying it's fixed on HEAD
[01:46:20] RickHull: some number of commits behind HEAD
[01:46:38] RickHull: whether the fix has been released as rubygems.org gem, not sure
[01:46:56] RickHull: but you can still build HEAD yourself, and make it available to bundler
[01:47:05] RickHull: or else fork / fix / build
[01:48:33] RickHull: eh, maybe not fixed in the grpc source yet
[01:48:47] RickHull: i say fork / fix / build and submit a PR :)
[01:49:23] RickHull: bundler won't be happy with an edited local Makefile, but bundler is happy to use a local .gem that contains an edited Makefile
[01:50:33] PhoenixMage: I think the better idea is to fix the zlib sources
[01:50:40] nopolitica: has joined #ruby
[01:51:14] RickHull: sure, but that's way upstream of bundler
[01:51:55] friday: has joined #ruby
[01:53:27] eightlimbed: has joined #ruby
[01:55:19] cdg: has joined #ruby
[01:57:12] astrobunny: has joined #ruby
[01:58:30] drowze: has joined #ruby
[02:00:58] astrobunny: has joined #ruby
[02:04:12] FastJack: has joined #ruby
[02:04:59] x77686d: has joined #ruby
[02:07:08] d^sh: has joined #ruby
[02:12:17] deepredsky: has joined #ruby
[02:13:58] danielpclark: has joined #ruby
[02:14:10] drowze: has joined #ruby
[02:17:17] PhoenixMage: I am thinking I will cheat and exploit the race condition between DLing and when it tries to compile and sed the -Werror out before it hits the issue
[02:17:29] PhoenixMage: I have raised an issue with zlib though
[02:18:14] kitsunenokenja: has joined #ruby
[02:24:53] FastJack: has joined #ruby
[02:26:05] RickHull: i dunno, i would just skip bundler if that's the approach
[02:26:09] jenrzzz: has joined #ruby
[02:26:09] jenrzzz: has joined #ruby
[02:26:34] RickHull: are you expecting this bundler install process to be repeatable?
[02:26:57] weaksauce: PhoenixMage https://railsguides.net/passing-build-options-to-bundler/
[02:27:06] weaksauce: you might find a way around it like that
[02:27:22] RickHull: forking grpc repo, editing Makefile -- trivial
[02:27:30] RickHull: building the .gem itself *should* be trivial
[02:27:44] RickHull: then just put the .gem on the local filesystem and tell bundler to use it
[02:28:23] RickHull: i would definitely try to build the fixed .gem first
[02:29:50] weaksauce: also bundle config local.GEM_NAME /path/to/local/git/repository
[02:29:56] weaksauce: if you modify it
[02:30:11] weaksauce: more info here http://bundler.io/v1.3/man/bundle-config.1.html
[02:30:13] garyserj: I see that with sinatra, doing haml :index it looks for views/index.haml I know a guy that used sinatra once and thought it was index.html.haml Has sinatra changed like was it ever index.html.haml?
[02:31:48] RickHull: garyserj: that sounds pretty weird to me
[02:31:57] RickHull: though I can easily imagine sinatra can be configured to do that
[02:32:00] Guest70176: has joined #ruby
[02:32:04] mim1k: has joined #ruby
[02:32:42] RickHull: in general, it's pretty hilarious that webservers still try to map URLs to filesystem dirs and use "
[02:32:53] RickHull: "file extensions" in URLs to negotiate content-type
[02:33:08] RickHull: there is absolutely no reason to put .html in your URL
[02:33:42] weaksauce: isn't .html the default and if something needs something else like json it would be that same url with .json
[02:33:48] weaksauce: that's at least the rails way
[02:33:54] RickHull: http://myserver/path/to/dest -- there need not be /path/to anywhere on the filesystem
[02:34:11] RickHull: and likewise, html is specified with Content-type: text/html
[02:34:15] plexigras: has joined #ruby
[02:34:38] RickHull: if a client wants json, they can say: Accept: application/json
[02:34:52] RickHull: (for the exact same URL)
[02:34:59] garyserj: well now it's just haml :index which reads views\index.haml it may have been different in the past.
[02:35:15] RickHull: garyserj: sure -- I'm sort of ranting on a tangential topic :)
[02:35:22] weaksauce: i am sure they can but having .json makes it easier for the dev to test against manually
[02:35:37] garyserj: i'd rather it didn't go to views though..
[02:35:41] RickHull: i dunno, sounds like "weaksauce" to me
[02:35:45] webguynow: has joined #ruby
[02:35:52] RickHull: is it that hard for a dev to specify an Accept header?
[02:35:53] weaksauce: more like "the rails way"
[02:35:57] RickHull: what kind of devs are these?
[02:36:01] RickHull: oh "rails devs"
[02:36:02] garyserj: i'd like to be able to specify the path like http://myserver/path/to/dest
[02:36:04] weaksauce: yeah it's much more inconvenient
[02:36:24] weaksauce: having to go in and tweak headers is inconvenient
[02:36:28] RickHull: weaksauce: really? https://github.com/rickhull/mudbug
[02:36:32] weaksauce: not insurmountable
[02:36:53] hndk: has joined #ruby
[02:36:56] RickHull: poke around, i'm curious what you think
[02:38:57] weaksauce: that looks useful for sure. still doesn't change the fact that if I am testing in a browser really quickly to see if there is an error of some sort it's a hell of a lot easier to just append a .json to see what's up at least for get requests
[02:39:20] weaksauce: now that lib is certainly useful if you want to do post or put or delete etc
[02:39:21] RickHull: i'm sure there's a browser extension for that
[02:39:30] RickHull: don't make the server act the fool because the client is foolish
[02:39:54] weaksauce: i agree it's cleaner to use the accept headers
[02:40:05] RickHull: it's not just cleaner, that's how the web is supposed to work
[02:40:09] RickHull: it's literally in the RFCs
[02:40:23] RickHull: check this out: https://github.com/rickhull/mudbug/blob/master/examples/accepts_and_methods.txt
[02:41:43] weaksauce: i do think that rails does the right thing too but adds a helper in addition for convenience
[02:41:54] weaksauce: for that .json
[02:42:06] weaksauce: i haven't really cared enough to test it though
[02:42:10] RickHull: it has given *so* many people, largely so-called devs, the exact wrong idea
[02:42:25] RickHull: i blame apache
[02:42:33] silvermine: has joined #ruby
[02:42:34] RickHull: like 20 years ago apache
[02:42:55] weaksauce: i blame microsoft too if we are throwing blame around
[02:43:01] weaksauce: not for this but they are not blameless
[02:43:11] RickHull: eh, IIS didn't infect the open source world with nonsense
[02:43:18] RickHull: but apache sure did
[02:43:49] RickHull: i mean, it's great technology -- but the vast bulk of the tutorials etc taught people that urls are like filesystem paths
[02:43:52] weaksauce: we spent a lot of os hours on the evils of IE doing whatever IE wanted to do
[02:44:23] RickHull: *so many tutorials* where you create index.php
[02:44:25] garyserj: hehe I only found out the nonsense of URLs being filesystem paths a few years ago
[02:44:58] garyserj: when I played with nodejs and found that when you go to a URL it can return any html , file or not, or any file.
[02:45:05] RickHull: it's ok to have some part of the URL space correspond to some kind of FTP equivalent
[02:45:24] RickHull: webDAV type stuff
[02:46:06] RickHull: I think my main complaint is with early versions of mod_php and mod_perl
[02:46:17] RickHull: along with the apache background context that birthed such
[02:46:43] RickHull: it cemented bad ideas in the minds of so many early web developers
[02:47:44] weaksauce: i am not sure i can really hate on them for not having 100% forethought
[02:48:29] gizmore|2: has joined #ruby
[02:48:30] Guest70176: has joined #ruby
[02:48:42] hyperreal[m]: has left #ruby: ("User left")
[02:48:43] RickHull: blame != hate
[02:48:50] garyserj: What bad repurcussions did the idea that URLs = filesystem paths, have?
[02:48:52] RickHull: i'm just pointing out the source of bad ideas
[02:49:03] weaksauce: garyserj some vulnerabilities
[02:49:14] weaksauce: s/some/probably many
[02:49:20] RickHull: it makes people ignore Accept and Content-type headers
[02:49:34] RickHull: servers ignore the RFCs and just do what feels good
[02:49:52] weaksauce: i blame php and a lot of shitty online tutorials for some of that
[02:50:06] garyserj: though if servers don't pretend that URLs=file system paths, then they can return absolutely anything
[02:50:09] RickHull: right -- that's why I mentioned mod_php and mod_perl
[02:50:11] garyserj: they can even mislead..
[02:50:30] weaksauce: they can do that either way though garyserj
[02:50:31] RickHull: garyserj: servers should not pretend that URLs = file system paths
[02:50:42] garyserj: I agree i'm not in favour of pretending!
[02:50:44] RickHull: it's just that early webservers thought they should
[02:50:53] RickHull: and so that idea got cemented in the web community
[02:51:04] RickHull: quite unfortunately
[02:51:17] weaksauce: the main reason it did that is that it was the easiest way to get up and running.
[02:51:26] weaksauce: no need for a router of any sort
[02:51:28] garyserj: maybe http://server/path/somepath
[02:51:35] RickHull: yes, CGI apps were the first web apps
[02:51:38] nopolitica: has joined #ruby
[02:51:41] garyserj: so then it's clear what it's doing if it's /path before any path.
[02:51:41] RickHull: and the CGI stuff lived on the filesystem
[02:51:50] RickHull: and was triggered by URLs that map to the filesystem
[02:52:22] RickHull: mod_php was an alternative to CGI stuff, but learned the wrong lessons from it
[02:53:18] weaksauce: it's not surprising to me that the php guys didn't do the right thing
[02:53:20] RickHull: eventually we got real app servers with routing layers
[02:53:33] RickHull: maybe tomcat was ahead of the curve, not sure
[02:53:56] MrBusiness: has joined #ruby
[02:54:13] weaksauce: that language has function names that have no rhyme or reason other than because the creator wanted to make the hash lookup table for function names roughly equally performant
[02:54:19] x77686d: has joined #ruby
[02:54:41] weaksauce: so if that was one of the design decisions he made for that it's not surprising he fucked up elsewhere
[02:55:10] RickHull: php's origins are similar in scope to js's
[02:55:18] RickHull: php stands for php home page IIRC
[02:55:27] RickHull: it was supposed to be a tiny templating language
[02:55:37] RickHull: where literally index.php is the template for index.html
[02:55:50] weaksauce: ah man js was made in 10 days and had so many awful choices
[02:56:00] weaksauce: it's better now but still
[02:56:18] mozzarella: 10 days? I thought it was a single weekend
[02:56:31] weaksauce: could be but i recall it being 10 days
[02:56:44] tAn: has joined #ruby
[02:57:10] RickHull: weaksauce: btw rails can't be doing the right thing if the browser sends Accept: text/html and rails returns json because the url ends in .json
[02:58:00] weaksauce: mozzarella from wikipedia it says 10 days
[02:58:24] Radar: RickHull: patches welcome ;)
[02:58:37] RickHull: Radar: heh, it's a "feature" at this poitn
[02:58:51] Radar: isn't everything in Rails a "feature"?
[02:58:55] weaksauce: RickHull does the browser do that? can you send multiple accept headers?
[02:59:08] RickHull: weaksauce: you can send multiple types in a single line
[02:59:13] RickHull: (see mudbug ;)
[02:59:24] weaksauce: does the browser only say accept html?
[02:59:25] RickHull: so you can set fallbacks
[02:59:33] RickHull: good question, i haven't looked in a long time
[02:59:53] RickHull: but i'm sure the browser doesn't accept application/json
[03:00:02] RickHull: though it's possible it's there in a long list
[03:00:14] cadillac_: has joined #ruby
[03:00:46] RickHull: mudbug's default is json, then html, then text
[03:01:14] RickHull: it makes sense that a browser doesn't accept json by default -- but a browser extension can and should easily trigger this
[03:01:35] RickHull: or, ya know, use the right tool for the right job
[03:02:00] RickHull: but hey, let's just break web RFCs for "convenience"
[03:02:04] ramfjord: has joined #ruby
[03:03:07] RickHull: wouldn't it be cool if webservers happily served up text/plain ?
[03:03:30] RickHull: i'm sure you can get rails etc to do it
[03:04:14] RickHull: if all I accept is text/plain, and the server only has text/html for that URL, then the server should reject my request
[03:04:31] RickHull: 406 Not Acceptable
[03:04:47] RickHull: but I suppose that ship has long sailed
[03:04:54] sspreitz: has joined #ruby
[03:07:09] cschneid_: has joined #ruby
[03:10:44] Technodrome: has joined #ruby
[03:12:34] konsolebox: has joined #ruby
[03:12:45] oleo: has joined #ruby
[03:13:04] RickHull: Radar: is there any reason Rails shouldn't act that way?
[03:13:39] RickHull: I mean, I get the argument for urls ending in .json -- it's a feature that is useful even if it breaks an RFC "should"
[03:13:44] RickHull: (not a "must")
[03:14:15] RickHull: maybe rails does act that way?
[03:15:00] RickHull: i don't know what my browser sends in its Accept header
[03:17:01] bronson: has joined #ruby
[03:17:24] eightlimbed: has joined #ruby
[03:17:39] RickHull: it looks like it doesn't send an Accept header -- in which case the server is free to send back whatever
[03:17:50] RickHull: so rails is doing fine by responding to .json urls with application/json
[03:18:44] tacoboy: has joined #ruby
[03:19:24] tacoboy: has joined #ruby
[03:19:26] RickHull: oops, that was for a js request -- no accept header
[03:19:37] RickHull: my Chrome sends: Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
[03:20:11] RickHull: any webserver that responds 200 with some other content-type is doing it wrong
[03:20:41] RickHull: */* says the server can send anything
[03:21:43] milardovich: has joined #ruby
[03:22:10] RickHull: which is pretty sensible for a browser
[03:22:38] Radar: RickHull: /shrug
[03:22:50] Radar: I gave up pretending why Rails acts certain ways a long time ago.
[03:22:58] RickHull: one problem is that many requests that a webserver sees have been mangled by middleboxes and accelerators / proxies / LBs / concentrators
[03:23:45] RickHull: it's all good -- I was wrong that rails shouldn't send application/json back to the browser -- the .json clue on the end of the url is perfectly fine for making that decision
[03:24:05] RickHull: i'm more curious what rails does with a limited Accept header
[03:24:09] RickHull: rails, or any popular webserver
[03:35:42] tAn: has joined #ruby
[03:41:01] jenrzzz: has joined #ruby
[03:42:35] dstrunk: has joined #ruby
[03:45:51] guardianx: has joined #ruby
[03:52:03] Guest70176: has joined #ruby
[03:52:28] nopolitica: has joined #ruby
[03:53:04] jenrzzz: has joined #ruby
[03:56:17] konsolebox: has joined #ruby
[03:57:11] hyperreal: has joined #ruby
[04:09:30] bloodycock: has joined #ruby
[04:16:01] tAn: has joined #ruby
[04:19:18] konsolebox: has joined #ruby
[04:30:21] truenito: has joined #ruby
[04:31:35] uZiel: has joined #ruby
[04:34:26] konsolebox: has joined #ruby
[04:35:07] _whitelogger: has joined #ruby
[04:46:17] bosma: has joined #ruby
[04:49:36] Jameser: has joined #ruby
[04:49:39] gix: has joined #ruby
[04:50:04] jackjackdripper: has joined #ruby
[04:50:46] Technodrome: has joined #ruby
[04:52:16] tAn: has joined #ruby
[04:52:33] Guest70176: has joined #ruby
[04:53:29] konsolebox: has joined #ruby
[04:54:04] guardianx: has joined #ruby
[04:55:35] hyperreal: has joined #ruby
[04:55:56] mjolnird: has joined #ruby
[05:01:28] tenderlove: has joined #ruby
[05:03:26] tenderlove: has joined #ruby
[05:08:08] bloodycock: has joined #ruby
[05:09:59] govg: has joined #ruby
[05:10:24] tAn: has joined #ruby
[05:10:27] milardovich: has joined #ruby
[05:16:42] konsolebox: has joined #ruby
[05:18:36] naprimer: has joined #ruby
[05:23:57] tenderlove: has joined #ruby
[05:32:14] konsolebox: has joined #ruby
[05:32:52] nofxx: has joined #ruby
[05:32:55] naprimer: has joined #ruby
[05:36:34] iamarun: has joined #ruby
[05:38:48] howdoi: has joined #ruby
[05:40:46] danielpclark: has joined #ruby
[05:51:40] milardov_: has joined #ruby
[05:54:02] Guest70176: has joined #ruby
[05:58:38] nofxx: has joined #ruby
[05:59:09] lexruee: has joined #ruby
[06:00:09] nopolitica: has joined #ruby
[06:00:13] bloodycock: has joined #ruby
[06:04:45] reber: has joined #ruby
[06:06:15] oetjenj: has joined #ruby
[06:06:17] ShekharReddy: has joined #ruby
[06:12:44] silvermine: has joined #ruby
[06:14:14] Jameser: has joined #ruby
[06:16:41] enterprisey: has joined #ruby
[06:20:21] konsolebox: has joined #ruby
[06:24:27] Jameser`: has joined #ruby
[06:34:43] anisha: has joined #ruby
[06:45:40] silvermine: has joined #ruby
[06:53:53] mim1k: has joined #ruby
[06:55:34] Guest70176: has joined #ruby
[06:57:50] bilal80: has joined #ruby
[07:01:02] nopolitica: has joined #ruby
[07:01:11] muelleme: has joined #ruby
[07:02:33] jamesaxl: has joined #ruby
[07:03:18] apeiros: has joined #ruby
[07:06:49] mson: has joined #ruby
[07:13:02] j0bk: has left #ruby: ("Textual IRC Client: www.textualapp.com")
[07:27:12] marr: has joined #ruby
[07:30:13] bigkevmcd: has joined #ruby
[07:34:51] apeiros: has joined #ruby
[07:47:12] Guest70176: has joined #ruby
[07:51:30] nopolitica: has joined #ruby
[07:54:37] Guest70176: has joined #ruby
[07:55:58] iamarun: has joined #ruby
[08:00:49] waveprop: has joined #ruby
[08:01:27] andikr: has joined #ruby
[08:01:30] Guest92925: has joined #ruby
[08:07:42] elcontrastador: has joined #ruby
[08:08:31] jaruga: has joined #ruby
[08:11:29] aufi: has joined #ruby
[08:13:23] anas: has joined #ruby
[08:13:45] burgestrand: has joined #ruby
[08:13:59] Revan007: has joined #ruby
[08:15:09] deepredsky: has joined #ruby
[08:19:12] TomyWork: has joined #ruby
[08:24:24] burgestrand: has joined #ruby
[08:27:36] waveprop: has joined #ruby
[08:28:13] silvermine: has joined #ruby
[08:29:37] mark_66: has joined #ruby
[08:35:12] claudiuinberlin: has joined #ruby
[08:35:27] k3rn31_: has joined #ruby
[08:37:58] Guest70176: has joined #ruby
[08:45:17] nopoliti1: has joined #ruby
[08:47:09] biberu: has joined #ruby
[08:47:36] claudiuinberlin: has joined #ruby
[08:59:14] Fire-Dragon-DoL: hello, is there any way to "alias a bunch of constants" in a class, so I don't have to write top level namespace? Like class Foo; include MyTopLevel; attribute :something, MyNestedLevel; end;
[09:00:00] rouge: has joined #ruby
[09:01:06] apeiros: >> module Foo; MyVal = 123; end; include Foo; MyVal
[09:01:08] ruby[bot]: apeiros: # => 123 (https://eval.in/906807)
[09:03:52] sammi`: has joined #ruby
[09:04:38] ams__: has joined #ruby
[09:07:27] ruby[bot]: dminuoso: I don't know anything about nesting
[09:10:07] konsolebox: has joined #ruby
[09:11:05] guille-moe: has joined #ruby
[09:12:00] qmr: getting lots of err 11 resource temporarily unavailable in nginx logs nginx <-> unicorn. any suggestions? servers do not seem overloaded
[09:12:00] apeiros: Fire-Dragon-DoL: what I said ^ was for ou
[09:12:12] apeiros: qmr: wrong channel?
[09:13:12] qmr: apeiros: no. maybe.
[09:13:29] tvw: has joined #ruby
[09:14:02] apeiros: ah, unicorn. I stopped reading at nginx logs. but you might still be better served in an nginx channel.
[09:14:40] apeiros: how do you figure load on the unicorns?
[09:15:05] iceden: has joined #ruby
[09:17:04] iceden: has joined #ruby
[09:19:28] mim1k: has joined #ruby
[09:21:30] _the_blackadder: has joined #ruby
[09:22:31] TvL: has joined #ruby
[09:23:20] mikecmpbll: has joined #ruby
[09:25:05] qmr: apeiros: idk it's thanksgiving and I'm half drunk
[09:30:32] iamarun: has joined #ruby
[09:38:30] Beams: has joined #ruby
[09:38:41] iceden: has joined #ruby
[09:41:56] anisha: has joined #ruby
[09:42:12] Bish: has joined #ruby
[09:54:14] Guest70176: has joined #ruby
[10:00:32] waveprop: has joined #ruby
[10:02:27] jaruga: has joined #ruby
[10:03:05] blackmesa1: has joined #ruby
[10:04:49] nowhere_man: has joined #ruby
[10:09:28] blackmesa1: has joined #ruby
[10:09:31] Siyfion: has joined #ruby
[10:13:48] zanoni: has joined #ruby
[10:14:23] rmhonji: has joined #ruby
[10:15:03] uZiel: has joined #ruby
[10:15:22] rmhonji: has joined #ruby
[10:15:26] miskatonic: has joined #ruby
[10:18:15] rmhonji: has joined #ruby
[10:21:27] leitz: has joined #ruby
[10:25:18] waveprop_: has joined #ruby
[10:26:34] deepredsky: has joined #ruby
[10:29:59] quobo: has joined #ruby
[10:34:12] deepredsky: has joined #ruby
[10:36:19] vondruch: has joined #ruby
[10:38:37] ur5us: has joined #ruby
[10:42:39] raul782: has joined #ruby
[10:44:11] ldnunes: has joined #ruby
[10:49:02] SirOliver: has joined #ruby
[11:02:22] Serpent7776: has joined #ruby
[11:02:25] drowze: has joined #ruby
[11:12:02] waveprop_: is Metaprogramming Ruby 2 the sequel to Metaprogramming ruby or just a second edition. should i buy both
[11:12:38] leitz: waveprop_, I think it's for Ruby 2. You can probably look at the table of contents on Amazon and compare.
[11:12:41] deepredsky: has joined #ruby
[11:13:23] waveprop_: thanks leitz. i just looked at both on amazon, good idea to compare the TOCs
[11:13:23] yeticry: has joined #ruby
[11:16:07] leitz: Yeah, looking at the text he says he updated for Ruby 2.x. I have the old one.
[11:16:17] leitz: Never read it, a bit above my head.
[11:16:37] waveprop_: cool. i want to read it after eloquent ruby
[11:16:43] leitz: Well, a large bit.
[11:17:04] leitz: Reading ER now. Great book!
[11:19:17] deepredsky: has joined #ruby
[11:19:19] waveprop_: leitz: nice! have you done the codecademy tutorial by any chance-- some of the amazon reviews on ER said it provided a grasp of the language equivalent to that tutorial
[11:20:10] leitz: Haven't. I started Ruby with the first edition of Pickaxe, because it was cheap (used on Amazon). I'm just now getting into Ruby 2.x
[11:20:25] leitz: I prefer books to websites.
[11:20:39] waveprop_: okay cool. i do also, very much prefer hard copy books
[11:20:52] leitz: But that's just personal preference. I'm going to hit codewars.com soon.
[11:21:04] waveprop_: but i was eager to get into ruby and the tutorial was pretty quick
[11:21:22] waveprop_: i've been meaning to look at that site myself
[11:22:04] leitz: FYI, Russ Olsen provided a nice response when I e-mailed him about his books. I'm impressed with both him and Hal Fulton of "The Ruby Way".
[11:22:35] leitz: You'll also see POODR recommended. Practical Object Oriented Design in Ruby, I think. Great book!
[11:23:04] leitz: https://gist.github.com/baweaver/57a7c8296ca2c03effbd8fac1e7f6b40
[11:23:25] leitz: baweaver's list, and a good one.
[11:23:27] uZiel: has joined #ruby
[11:23:28] waveprop_: Always good to see authors responding to the community. Yes i need to read POODR also because ruby is my first real use of OO
[11:24:36] leitz: POODR breaks it down nicely. Depending on how soon you plan on getting to it, a new one is due out mid-2018 I think.
[11:25:06] leitz: Ruby is the first language I've enjoyed reading the reference documentation for.
[11:25:34] waveprop_: I'll keep my eyes peeled for the new one, i want to read metaprogramming first
[11:26:02] leitz: Good, then you can explain it to me later. :)
[11:26:04] waveprop_: yeah, i use the docs all time. so much better than php's
[11:26:16] leitz: I'm refactoring some code and have a lot to do.
[11:26:33] leitz: PHP is fun but I never loved the language as much as I do Ruby.
[11:26:40] deepredsky: has joined #ruby
[11:28:39] eml_: has joined #ruby
[11:28:40] waveprop_: yeah they are all cool but ruby is a blast. Good luck with your refactoring and thanks for your thoughts on these books
[11:28:49] blackmesa1: has joined #ruby
[11:31:00] CrazyEddy: has joined #ruby
[11:31:16] leitz: Happy to help!
[11:32:53] drowze: has joined #ruby
[11:35:55] deepredsky: has joined #ruby
[11:40:20] jottr: has joined #ruby
[11:44:12] uZiel: has joined #ruby
[11:45:25] nowhere_man: has joined #ruby
[11:47:22] Vaanir: has left #ruby: ()
[11:51:28] deepredsky: has joined #ruby
[11:52:55] Cohedrin: has joined #ruby
[12:08:20] RevanOne: has joined #ruby
[12:12:23] apparition: has joined #ruby
[12:12:51] atmosx: Hi, I havea an ERB <%= e[:service %> on a 'chef' recipe. Now when I issue p e or p e.class I see a perfectly valid hash, but whenm I call the key to extract I'm getting a 'cannot convert integer to symbol' error. Any idea what could be happening?!
[12:13:24] konsolebox: has joined #ruby
[12:13:36] conta: has joined #ruby
[12:14:08] apeiros: you pass in a symbol and you get "can't convert *integer* to symbol"?
[12:14:37] apeiros: I think I'd look at the backtrace, because that makes it seem like you're looking in the wrong place
[12:14:59] atmosx: https://gist.github.com/atmosx/5015af9fc125f30d403661dad55bf738#file-prometheus-yml-erb-L3
[12:23:04] truenito: has joined #ruby
[12:26:54] konsolebox: has joined #ruby
[12:27:29] atmosx: apeiros: there was a string item added in the array a few lines down which I missed. That caused the error.
[12:28:49] apeiros: I don't even know where to start with the contradictions in all of this so far… but apparently you solved your problem now.
[12:31:20] apeiros: ok, deciphering your contradictions it starts to make sense. your code fails *before* it prints the class of the current object, and you just looked at the last output. and by "in the array" you mean @blackbox_endpoints, not the Hash you've been talking about before.
[12:31:25] yCrazyEdd: has joined #ruby
[12:31:51] apeiros: and the <%= e[:service %> (which additionally is a syntax error) is a bad transcript of <%= e[:endpoint] %>
[12:32:48] apeiros: all those ^ makes it rather painful to try to help you. the lack of the actual exception/backtrace with refs to what's which file doesn't help either.
[12:34:26] apeiros: >> "foo"[:bar]
[12:34:32] ruby[bot]: apeiros: # => no implicit conversion of Symbol into Integer (TypeError) ...check link for more (https://eval.in/906916)
[12:34:40] apeiros: add misquoting the exception to the list
[12:34:47] apeiros: I mean seriously
[12:53:18] deepredsky: has joined #ruby
[13:05:46] anisha: has joined #ruby
[13:07:34] Cohedrin: has joined #ruby
[13:08:04] rouge: has joined #ruby
[13:08:41] synthroid: has joined #ruby
[13:09:12] burgestrand: Is there still an off-topic channel related to this channel?
[13:09:16] burgestrand: … and if so, which is it?
[13:09:24] apeiros: #ruby-offtopoic
[13:09:28] apeiros: minus typo
[13:09:29] burgestrand: ACTION hat tip
[13:09:36] synthroid: has joined #ruby
[13:14:46] c0ncealed: has joined #ruby
[13:17:17] deepredsky: has joined #ruby
[13:20:28] kitsunenokenja: has joined #ruby
[13:22:17] ledestin: has joined #ruby
[13:22:51] jrafanie: has joined #ruby
[13:23:17] johno84: has joined #ruby
[13:23:42] deepredsky: has joined #ruby
[13:24:46] tlaxkit: has joined #ruby
[13:27:30] anisha: has joined #ruby
[13:28:27] morfin: has joined #ruby
[13:28:38] morfin: how can i wipe out all gems i have?
[13:28:47] apeiros: iirc gem pristine
[13:28:56] apeiros: but check that command's docs first ;-)
[13:29:04] morfin: is not pristine for restoring?
[13:29:17] apeiros: also depends a bit on what you consider "all" wrt having e.g. rvm + gemsets.
[13:29:25] morfin: as example when native extension was not built
[13:29:49] leitz: morfin: for gem in `gem list`; do gem uninstall -aI $gem; done
[13:29:53] apeiros: ah right. pristine is the wrong thing.
[13:29:54] rippa: has joined #ruby
[13:29:56] leitz: As root on linux, anyway.
[13:30:03] leitz: Ask me how I know. :)
[13:30:18] morfin: i used it today when something did not build and i had gem "installed" but not functional)
[13:30:30] leitz: I think there's an option to remove it without asking "y'.
[13:30:49] deepredsky: has joined #ruby
[13:30:56] morfin: yes | gem uninstall x
[13:31:16] leitz: Give it a shot. Mine are pretty much all gone.
[13:31:38] morfin: that's common practice to use yes and pass it's output to stdin
[13:31:46] morfin: because it just say "y"
[13:32:04] kith: has joined #ruby
[13:39:52] blackmesa1: has joined #ruby
[13:44:10] milardovich: has joined #ruby
[13:44:39] soc42: has joined #ruby
[13:46:15] x77686d: has joined #ruby
[13:46:23] burgestrand: Don't do that.
[13:46:28] burgestrand: I gave that as advice once as a joke.
[13:46:43] burgestrand: Two days later same dude posts another comment saying his server had been hacked because all files were gone.
[13:47:37] burgestrand: (re wipe out all gems)
[13:50:11] apeiros: that's the kind of people you don't want near your servers
[13:50:36] tobiasvl: also he must've been using an old "rm" if --preserve-root wasn't default
[13:50:54] apeiros: same level of stupidity like script kiddy on irc "I'll hack you! what's your IP? - 127.0.0.1 - OK! I'm watching your files as they…<disco>"
[13:51:46] leitz: Does ruby store files? I know it's an odd question, but it's complaining about a line that I've already removed.
[13:52:05] burgestrand: tobiasvl Yes, this was way back in 2011 I think
[13:52:44] apeiros: leitz: ruby itself no. only your code.
[13:53:04] apeiros: i.e. if you do File.write or similar. but I assume you meant ruby as in "ruby the process running my files"
[13:54:07] deepredsky: has joined #ruby
[13:54:16] tobiasvl: depends what you mean too… if you've required a file, it stays in memory, it's not re-required if it changes
[13:54:19] burgestrand: Oh, never mind, I found the old forum, it was way back in 2008.
[13:54:22] leitz: apeiros, just running tests and it fails for a phrase that's no longer there.
[13:54:51] apeiros: leitz: do you happen to be in rails? because that uses spring, which does some source caching
[13:55:31] apeiros: using another tool which should improve test speed? they tend to work with "start app and fork, reload parts on demand"
[13:56:03] apeiros: other than that I'm out of ideas other than "are you reeeally in the right directory?"
[13:56:29] leitz: Hehe...always possible. Poking around.
[13:56:36] guille-moe: has joined #ruby
[13:56:47] synthroid: has joined #ruby
[13:58:18] leitz: Made some progress, different error.
[13:58:51] tobiasvl: feel free to share code and errors in a gist
[13:59:08] maikowblue: has joined #ruby
[13:59:46] leitz: tobiasvl, I will. Part or my learning style requires banging my head against a problem for a while. :)
[14:02:10] leitz: Like, uh, ensuring if you change require statements you remember to require the main class...
[14:02:52] CrazyEddy: has joined #ruby
[14:03:11] ek926m: has joined #ruby
[14:06:45] apeiros: leitz: is that the "I learn through the blood of my forehead" style?
[14:07:23] leitz: A long and storied past...
[14:07:31] synthroid: has joined #ruby
[14:11:42] hightower2: has joined #ruby
[14:12:39] deepredsky: has joined #ruby
[14:13:22] milardovich: has joined #ruby
[14:13:34] AxelAlex: has joined #ruby
[14:21:10] oleo: has joined #ruby
[14:22:17] guille-moe: has joined #ruby
[14:23:36] mcr1: has joined #ruby
[14:24:37] konsolebox: has joined #ruby
[14:24:38] deepredsky: has joined #ruby
[14:28:30] DLSteve: has joined #ruby
[14:31:09] CrazyEddy: has joined #ruby
[14:34:05] bmurt: has joined #ruby
[14:35:59] deepredsky: has joined #ruby
[14:39:36] mcr1: has joined #ruby
[14:39:47] jamesaxl: has joined #ruby
[14:41:15] milardovich: has joined #ruby
[14:45:54] sepp2k: has joined #ruby
[14:46:19] quobo: has joined #ruby
[14:50:04] shinnya: has joined #ruby
[14:50:14] cdg: has joined #ruby
[14:51:10] iamarun: has joined #ruby
[14:52:40] nicesignal: has joined #ruby
[14:53:28] Technodrome: has joined #ruby
[14:53:49] claudiuinberlin: has joined #ruby
[14:54:20] video-girl-yutub: has joined #ruby
[14:55:57] TomyWork: has joined #ruby
[14:56:34] synthroid: has joined #ruby
[14:57:59] synthroid: has joined #ruby
[15:00:40] dviola: has joined #ruby
[15:01:25] iamarun: has joined #ruby
[15:04:56] darkness: has joined #ruby
[15:08:23] miskatonic: has joined #ruby
[15:10:45] tvw: has joined #ruby
[15:11:39] Technodrome: has joined #ruby
[15:12:44] deepredsky: has joined #ruby
[15:14:24] gizmore: has joined #ruby
[15:15:15] miskaton`: has joined #ruby
[15:17:20] guille-moe: has joined #ruby
[15:19:52] deepredsky: has joined #ruby
[15:20:58] helpa: has joined #ruby
[15:23:33] miskatonic: has joined #ruby
[15:26:16] johno84: has joined #ruby
[15:26:22] deepredsky: has joined #ruby
[15:27:36] AxelAlex: has joined #ruby
[15:28:13] michael1: has joined #ruby
[15:30:52] dminuoso: Burgestrand: This was a hilarious way to brick your hardware up until a year ago.
[15:31:02] dminuoso: Not just your files.
[15:31:43] dminuoso: efivars has some unintended side effects. :-)
[15:32:06] raul7821: has joined #ruby
[15:36:54] 07EAAIC8A: has joined #ruby
[15:39:05] Puffball: has joined #ruby
[15:39:21] duckpuppy: has joined #ruby
[15:46:31] Galaxor: has joined #ruby
[15:46:33] x77686d: has joined #ruby
[15:46:48] Galaxor: has left #ruby: ()
[15:47:08] xlegoman: has joined #ruby
[15:47:35] cdg: has joined #ruby
[15:48:42] sepp2k: has joined #ruby
[15:49:02] sepp2k: has joined #ruby
[15:50:17] deepredsky: has joined #ruby
[15:55:22] AxelAlex: has joined #ruby
[15:57:39] apeiros: has joined #ruby
[16:03:12] good-girl: has joined #ruby
[16:04:12] safetypin: has joined #ruby
[16:05:32] mtkd: has joined #ruby
[16:07:16] apeiros: has joined #ruby
[16:09:35] marr: has joined #ruby
[16:10:20] enterprisey: has joined #ruby
[16:10:39] apeiros: has joined #ruby
[16:11:16] x77686d: has joined #ruby
[16:12:27] deepredsky: has joined #ruby
[16:15:50] AlexRussia: has joined #ruby
[16:16:26] bloodycock: has joined #ruby
[16:16:40] conta: has joined #ruby
[16:18:18] safetypin: has joined #ruby
[16:20:33] deepredsky: has joined #ruby
[16:21:09] synthroid: has joined #ruby
[16:23:52] synthroid: has joined #ruby
[16:24:31] synthroid: has joined #ruby
[16:25:07] dionysus69: has joined #ruby
[16:25:40] deepredsky: has joined #ruby
[16:26:35] 07EAAIC8A: has left #ruby: ()
[16:30:09] nopoliti1: has joined #ruby
[16:30:31] nowhere_man: has joined #ruby
[16:31:02] johno84: has joined #ruby
[16:32:16] larcara: has joined #ruby
[16:33:17] antiswifty: has joined #ruby
[16:33:22] antiswifty: has left #ruby: ()
[16:37:26] raul782: has joined #ruby
[16:40:07] alan_w: has joined #ruby
[16:42:35] drowze: has joined #ruby
[16:46:45] safetypin: has joined #ruby
[16:47:16] deepredsky: has joined #ruby
[16:48:16] mim1k: has joined #ruby
[16:53:53] milardovich: has joined #ruby
[16:57:02] safetypin: has joined #ruby
[17:03:10] ur5us: has joined #ruby
[17:06:10] Technodrome: has joined #ruby
[17:07:48] johno84: has joined #ruby
[17:12:36] deepredsky: has joined #ruby
[17:13:29] tomphp: has joined #ruby
[17:13:38] safetypin: has joined #ruby
[17:13:49] armyriad: has joined #ruby
[17:15:54] mwlang: has joined #ruby
[17:18:04] guille-moe: has joined #ruby
[17:19:41] Emmanuel_Chanel: has joined #ruby
[17:21:23] deepredsky: has joined #ruby
[17:24:03] Sylario: Stupid question : i have "0" and "1" as inputs, I want false true as output, am I doomed to do a stupid test ?
[17:24:46] Immune: has joined #ruby
[17:25:21] Sylario: The background is AD virtual attribute getting data from a form checkbox. The cast/test/convert would take place in the model getter def blaaa=(val)
[17:25:41] Sylario: But it's more ruby than rails
[17:26:53] ldnunes: has joined #ruby
[17:28:40] danielpclark: has joined #ruby
[17:30:19] apeiros: sylario: yes, you're doomed to do a stupid test
[17:30:32] Sylario: nooooooooooo
[17:30:44] apeiros: if you want a check: {"0" => false, "1" => true}.fetch(value)
[17:30:58] apeiros: if you are sure it's either of those: value == "1"
[17:31:46] apeiros: if you want the fastest with a check: case value when "1" then true; when "0" then false; else raise; end # (not benchmarked, but I'd expect that to be the fastest code for this problem)
[17:33:02] Sylario: well, this is a boolean that will trigger a cavalcade of mails, so I'm not sure it's the best place to optimize ^^
[17:33:43] apeiros: personally I opt for asserts in all converting code.
[17:33:59] apeiros: too many "code should never reach this - in theory…" bugs
[17:35:40] milardov_: has joined #ruby
[17:35:45] ltem: has joined #ruby
[17:36:39] milardov_: has joined #ruby
[17:36:45] Lyubo1: has joined #ruby
[17:38:58] tcopeland: has joined #ruby
[17:40:48] zzla: has joined #ruby
[17:40:59] zzla: so, im trying to instal this thing: https://github.com/grobie/soundcloud2000
[17:41:11] zzla: and am getting stuck at the ruby1.9.1-dev part
[17:41:27] zzla: ive tried installing 1.9.1 using rv
[17:41:29] zzla: rvm, rather
[17:41:42] zzla: but when i do gem install soundcloud2000 , i get a no gem found message
[17:42:53] dviola: has joined #ruby
[17:44:35] darix: zzla: do you really need ruby 1.9 for it?
[17:44:47] darix: i am pretty sure he means 1.9+
[17:44:55] nadir: has joined #ruby
[17:45:10] zzla: i believe i do
[17:45:25] zzla: when i installed the most recent ruby, i received the same no gem found message
[17:46:38] zzla: https://pastebin.com/9eS4wpS5
[17:46:40] ruby[bot]: zzla: we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/c4a5cf7bbb5927dc90a1ba614a5ae7b6
[17:46:40] ruby[bot]: zzla: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[17:46:45] zzla: ah sorry
[17:46:54] zzla: agreed, pastebin kinda sucks
[17:47:14] zzla: anyways, i tried using rvm to install 1.9.1 just now, and that was the erro rmessage i got
[17:47:36] SirOliver: has joined #ruby
[17:47:47] Lyubo1: has joined #ruby
[17:48:38] dstrunk: has joined #ruby
[17:49:13] zzla: im also on debian 9
[17:49:19] zzla: not sure if that matters
[17:51:05] mson: has joined #ruby
[17:51:48] deepredsky: has joined #ruby
[17:53:41] darix: zzla: can you paste the error from gem install soundcloud2000 with your normal system ruby?
[17:53:47] darix: zzla: maybe we can focus on fixing that.
[17:54:20] zzla: so, i initially had that issue
[17:54:31] zzla: but now im stuck on an issue with installing 1.9.1
[17:54:45] darix: you dont want 1.9.1
[17:54:46] zzla: https://stackoverflow.com/a/8420523
[17:54:49] darix: it is not supported anymore
[17:54:49] zzla: going to give this a shot
[17:54:55] darix: it lacks tons of security fixes
[17:54:58] zzla: 1.9.1 is not?
[17:55:08] zzla: are gems specific to ruby versions?
[17:55:15] darix: give us the error from "gem install soundcloud2000"
[17:55:25] zzla: ok, ill get to that point
[17:55:38] zzla: but, in theory, shoudl i be able to isntall soundcloud2000 using the newest version of ruby?
[17:56:21] darix: that's why i want to see your error
[17:57:26] RickHull: zzla: gems can declare incompatibility with ruby versions -- typically they say I need ruby version at least X
[17:57:51] herbmillerjr: has joined #ruby
[17:58:02] craysiii: https://rubygems.org/gems/soundcloud2000/versions/0.1.0 doesn't look like it has one?
[17:58:27] claudiuinberlin: has joined #ruby
[17:58:32] darix: you might just miss things like libncurses-dev ruby-devel on your machine
[17:58:43] RickHull: zzla: it looks like you are getting 1.9.1 from: "apt-get install portaudio19-dev libmpg123-dev libncurses-dev ruby1.9.1-dev"
[17:58:56] zzla: initially, this is waht i had tried
[17:58:57] RickHull: zzla: those are just outdated debian/ubuntu install instructions
[17:59:09] zzla: but after some reading i found that rvm may be a better solution for installing that version of ruby
[17:59:13] RickHull: not tied to the gem -- just giving an outdated view of the prerequisites
[17:59:23] zzla: either way, ive removed 1.9.1 and am using rvm to install 2.4
[17:59:39] mikecmpbll: has joined #ruby
[17:59:50] zzla: or more specifically, rvm is a better solution for installing an outdated version of ruby
[18:00:05] zzla: once 2.4 is installed ill try gem install and give you guys the response
[18:00:59] zzla: compiling
[18:01:19] darix: zzla: why not just "apt install ruby"?
[18:01:25] darix: you are making it too complicated imho
[18:01:40] zzla: i mean, i suppose i could have done that
[18:01:47] zzla: is there any harm in using rvm?
[18:03:12] guille-moe: has joined #ruby
[18:03:21] morfin: i can't use Passenger because agent is not built
[18:04:44] morfin: but i can't build agent because autotools are older(1.13 and gem was configured with 1.15)
[18:05:16] darix: morfin: use unicorn or puma?:P
[18:06:54] morfin: i am deploying on webfaction
[18:07:11] morfin: this is my first time when i deploy something using Passenger
[18:07:39] zzla: https://gist.github.com/anonymous/5644ec84a0fc06d71521939951164254
[18:07:43] oetjenj: has joined #ruby
[18:08:08] deepredsky: has joined #ruby
[18:08:26] zzla: that is the output of terminal, as well as the contents of the log file
[18:09:04] craysiii: so did you install mpg123?
[18:09:47] tomphp: has joined #ruby
[18:10:41] mtkd: has joined #ruby
[18:10:52] darix: mpg123 devel package
[18:11:05] darix: then install that
[18:11:07] zzla: apt-get install mpg123-devel ?
[18:11:29] craysiii: you installed libmpg123-dev ?
[18:12:40] eightlimbed: has joined #ruby
[18:12:48] morfin: autotools is huge POS
[18:12:50] zzla: the libmpg123-dev
[18:13:45] zzla: is that the package you were referring to, darix ?
[18:13:52] darix: zzla: yes
[18:14:12] darix: morfin: why do you care about autotools at all? shouldnt it contain a configure script already?
[18:14:36] ledestin: has joined #ruby
[18:15:49] bilal80: has left #ruby: ()
[18:18:54] tomphp: has joined #ruby
[18:19:37] zzla: ok so i installed portaudio19-dev, and it seemed to install properly
[18:20:13] darix: zzla: next time read the actual error messages
[18:20:13] Guest90: has joined #ruby
[18:20:33] wald0: has joined #ruby
[18:20:35] zzla: now im here
[18:20:37] zzla: https://gist.github.com/anonymous/e43e04db352016296150bf866195d4f5
[18:20:43] zzla: after running the soundcloud2000 command, that is
[18:22:04] zzla: maybe curses is a gem
[18:22:35] darix: the soundcloud2000 gem depends on it
[18:22:40] darix: so gem install should have installed it
[18:22:48] zzla: yep, i used gem install curses
[18:22:51] darix: gem install it
[18:22:55] zzla: it worked
[18:22:58] zzla: thanks for you assistance, guys
[18:23:08] Dimik: has joined #ruby
[18:24:14] zzla: now its giving me another error
[18:24:30] zzla: https://gist.github.com/anonymous/680aa2601588ae9a56e7459350fd7d5c
[18:24:33] zzla: this is likely not a ruby error
[18:25:44] deepredsky: has joined #ruby
[18:28:51] jamesaxl: has joined #ruby
[18:29:01] lexruee: has joined #ruby
[18:32:12] neo95: has joined #ruby
[18:32:19] deepredsky: has joined #ruby
[18:32:32] blackmesa1: has joined #ruby
[18:40:31] cschneid_: has joined #ruby
[18:43:45] cdg: has joined #ruby
[18:44:02] David_H_Smith: has joined #ruby
[18:45:52] workmad3: has joined #ruby
[18:50:07] deepredsky: has joined #ruby
[18:52:16] oetjenj: has joined #ruby
[18:53:01] oetjenj: has joined #ruby
[18:57:52] mooe_: has joined #ruby
[19:01:16] Nicmavr: has joined #ruby
[19:01:37] RickHull: leitz: is there a reference for how careers work? it looks to me like it's much more complicated than what you have coded so far
[19:01:44] RickHull: https://forum.rpg.net/showthread.php?708298-Traveller-Classic-character-generation-compared-to-Mongoose
[19:02:04] RickHull: leitz: it looks like the mongoose SRD is an open reference, so much more amenable to programming against
[19:10:41] ur5us: has joined #ruby
[19:12:35] deepredsky: has joined #ruby
[19:13:17] leitz: RickHull, I'm moving to Cepheus Engine, which is mostly "pay what you want". However, to see the complexity of the tasks you can look at http://www.traveller-srd.com/high-guard/creating-a-navy-character/
[19:13:43] RickHull: ok, so the SRD is an acceptable reference?
[19:14:10] RickHull: e.g. http://www.traveller-srd.com/core-rules/careers/
[19:14:10] quobo: has joined #ruby
[19:14:12] leitz: I currently ignore a lot of this because I make up stuff story wise. Yup, that SRD will cover 90%+ of the challenges.
[19:14:15] tomphp: has joined #ruby
[19:14:35] RickHull: it looks like there are lots of rolls / checks to even enlist in a career, complete the term, etc
[19:14:46] RickHull: do you have functionality for this, that I'm not seeing?
[19:15:12] leitz: Yup. I skip a lot because if the character appears in the game or the story then the survived.
[19:15:48] leitz: Lemme give a high level thought process. If you don't "get it' holler; it's my inability to explain.
[19:15:56] RickHull: hm -- so are you trying to replicate the career progression in the character generation?
[19:16:13] RickHull: i.e. the mechanics? that's the interesting part to me :)
[19:17:14] leitz: I'll tell a story and include "Jane the Marine Commando" by reference. Did this with Kel, code name Psycho. The player decided the one off encounter was the love of his life so I started making back-story for her.
[19:17:27] leitz: I'm working on the second book.
[19:17:56] RickHull: so is this just a writing tool, not something that actually simulates the gameplay?
[19:18:26] leitz: Mechanics; I "roll" up a character with Name, UPP, Career, and skills. Later milestones: 1. Save data. 2. Web UI that can edit data.
[19:18:58] leitz: The task of replicating actual character creation is well beyond my current skill. I generalize.
[19:19:56] RickHull: it's not clear what you intend by giving a character a career -- if you're not doing the rolls for enlistment / commission / advancement
[19:20:03] leitz: In the game the character might get 1-9 or so skills per term or year, plus enemies, life-events, etc. I average 2 skills per year, promote based off time in service, and come up with life events as needed.
[19:20:03] RickHull: it looks like you want a small subset of the mechanics?
[19:20:11] ramfjord: has joined #ruby
[19:20:41] deepredsky: has joined #ruby
[19:20:52] leitz: Small subset, yet. In the SRD you run the character through a career and they are modified either in 4 or 1 year terms, depending on the version of the game. I just add stuff once.
[19:20:55] RickHull: so you have an alternate set of simplified mechanics?
[19:21:11] RickHull: how do you know if you're doing it right?
[19:21:16] RickHull: versus a programming bug?
[19:21:20] leitz: Yup, Career and Character tools.
[19:21:45] leitz: I've been playing this game since 1978. Have some of it figured out.
[19:22:19] leitz: Code bugs are more likely.
[19:22:19] RickHull: when you have a skill listed as "+1 dex" -- it looks like that will never be "applied" programmatically
[19:22:38] tomphp: has joined #ruby
[19:23:19] leitz: It will. Run ruby -Ilib bin/chargen.rb -t 300 and the UPP should have a lot of high Hex numbers. Anything above C has been modified.
[19:23:19] RickHull: in any case, I think I nailed down the character gen, short of the career
[19:23:34] leitz: Have you pulled this morning's code?
[19:23:42] RickHull: i've looked at some of it
[19:23:58] apeiros: RickHull: iirc there was code to apply "+1 dex"
[19:24:08] apeiros: but IMO that should just be a Stats struct with actual numbers
[19:24:09] leitz: Not a lot of deep change. More tests and some odds and ends.
[19:24:27] apeiros: and a career should have a stats_modifier which is also a stats struct
[19:24:28] leitz: apeiros, the UPP (stats) is already slated to become a hash.
[19:24:51] leitz: Issue #49.
[19:24:53] RickHull: i'm interested in replicating the career mechanics -- but I don't grok the simplified version
[19:24:54] apeiros: leitz: what are the 6 stats again?
[19:24:59] apeiros: the names I mean
[19:25:21] leitz: Strength Dexterity Endurance Intelligence Education Social Status.
[19:25:28] RickHull: apeiros: https://github.com/rickhull/CT_Character_Generator/blob/rickfactor/lib/traveller_char/character.rb#L11
[19:25:35] leitz: With a rare 7th Stat: Psionic skill rating.
[19:25:51] Violex: has joined #ruby
[19:26:33] apeiros: leitz: https://gist.github.com/apeiros/807be6640d3ea4af6607e367f17de3dc
[19:26:45] apeiros: whoops, forgot to finish the example
[19:26:46] leitz: RickHull, the simplified version takes a number of terms and does two basic things. For (terms / 2) +1 gives one each cash and stuff muster out benefit.
[19:27:52] leitz: Hang on, code directories changed. Let me post.
[19:27:55] RickHull: i think I prefer the real mechanics :)
[19:28:18] RickHull: i'm satisfied with the initial chargen and working on careers now :)
[19:28:25] leitz: RickHull, that's 'cause you can code them. :)
[19:29:45] neo95: has joined #ruby
[19:30:47] pwnd_nsfw: has joined #ruby
[19:30:48] leitz: Here's the core of the career mechanism. https://github.com/LeamHall/CT_Character_Generator/blob/master/lib/career.rb#L58-L80
[19:30:50] apeiros: leitz: https://gist.github.com/apeiros/807be6640d3ea4af6607e367f17de3dc updated and fixed mishap with social status
[19:31:10] leitz: Each career adds its own skill and muster out lists. Some careers have ranks, etc.
[19:31:37] RickHull: one thing that will help your effort is to think about the data model -- if strength stat is an integer, represent it with an integer. you can display it as a hex string as needed
[19:31:41] apeiros: that's what I'd do for the numeric stats. makes a lot of things easier than parsing strings.
[19:32:04] RickHull: particularly if you will do math against it
[19:32:28] leitz: apeiros, why a struct vice a hash? And yes, it's going to use int values underneath. The who back and forth with strings bothered me.
[19:32:52] apeiros: leitz: because stats.strength is IMO nicer than stats[:strength]
[19:33:04] apeiros: additionally stats[:strenght] can't accidentally happen (typo)
[19:33:21] RickHull: stats.fetch(:strength)
[19:33:24] apeiros: and stats[:strength], stats["strength"], stats[0] are all still possible too
[19:33:37] apeiros: RickHull: more work for no gain :-p
[19:33:45] apeiros: if you have fixed members -> Struct >>> Hash IMO.
[19:34:02] apeiros: also perf & mem, but those don't matter at all in this use-case.
[19:34:50] leitz: Okay, I need to look at that. Cleaner code is nicer code.
[19:35:07] leitz: And I like C structs, to the level that I understand them.
[19:35:09] tomphp: has joined #ruby
[19:35:40] apeiros: well, ruby structs are in a way simpler than C structs, as the members don't have a type. otoh you can also consider it as more complex because it means you have to know the type :)
[19:36:19] apeiros: and they're more complex than C structs in that they're actually classes which can have fully fledged methods (see ::random and #+ in the gist)
[19:36:26] leitz: In this case it will be itsy bitsy unsigned Int.
[19:37:58] apeiros: raaaah, new orville episode isn't out yet :<
[19:38:00] leitz: apeiros, I don't get lines 6-15.
[19:38:02] alan_w: has joined #ruby
[19:38:23] apeiros: leitz: what part of it?
[19:39:35] leitz: So, you're defining a + method inside the struct, and then a class inside that, and then manipulating the values (?)?
[19:39:52] apeiros: I don't define a class, no
[19:39:52] tAn: has joined #ruby
[19:40:01] leitz: self.class.new
[19:40:08] apeiros: I do Stats.new(self.strength+other.strength, …)
[19:40:21] apeiros: self.class within an instance method of Bar will evaluate as Bar
[19:40:28] apeiros: x = Bar.new; x.class # => Bar
[19:40:53] apeiros: and within an instance method, instead of x, we have self. self.class is the class from which the current object was constructed. in our case: Stats
[19:41:00] apeiros: so self.class.new -> Stats.new
[19:42:22] leitz: If we did "Jane" = Character.new and had the Stats struct as a part of initialize, could we set/get with Jane.Stats.strength ?
[19:42:30] goyox86_: has joined #ruby
[19:42:37] apeiros: leitz: yupp
[19:42:43] apeiros: though I'd call it stats, not Stats :)
[19:42:59] leitz: Acutally, "upp"
[19:43:01] apeiros: class Character; def initialize; @stats = Stats.random; end; attr_reader :stats; end
[19:43:09] apeiros: or short: yupp
[19:43:12] michael1: has joined #ruby
[19:44:06] leitz: Cool. Part of yesterday's discussion was that I separate initialize from generation. Not sure RickHull thinks that's the best idea but it works for the use cases I currently have.
[19:44:34] apeiros: I'd be strongly in favor of having generation separated from initialize
[19:44:36] leitz: With upp as a struct I don't see a big issue in keeping that. For the moment, anywya.
[19:44:48] apeiros: especially because it'll make loading from db a lot easier
[19:45:30] leitz: yupp. But I'm using the same Character class for both major characters (with more data points) and minor characters.
[19:45:34] apeiros: tho granted, deserialization should probably happen through allocate + instance_eval. as messy as it sounds.
[19:47:05] blackmesa: has joined #ruby
[19:47:09] leitz: Turning upp might be the next few hours. It'll be easier to do now than when more code is added for differnet bits.
[19:47:43] leitz: Although RickHull's comment about open classes got me thinking. Would this work as a process:
[19:48:52] tomphp: has joined #ruby
[19:49:17] tvw: has joined #ruby
[19:49:19] leitz: Dang, still can't explain it well.
[19:49:43] leitz: Needs more thinking.
[19:50:11] apeiros: open classes mostly just means "I can add methods to a class at any place in my code"
[19:50:31] leitz: The present case is that Noble < Career, such that most of the methods are common and Noble pulls unique skill and stuff lists.
[19:50:41] apeiros: and the corollary to that is "I can add methods to classes I didn't write myself (such as Array, Hash etc.)"
[19:51:04] deepredsky: has joined #ruby
[19:51:20] leitz: Trying to figure out if making a Noble just extend Character can work with being a sub-class of Career.
[19:52:06] leitz: Other class groups, like "Presenter", will take the character (data) and output it. Or input it into sql/json, etc.
[19:52:46] Cohedrin: has joined #ruby
[19:53:12] leitz: An issue has been "How to run a character through multiple careers?"
[19:54:06] x77686d: has joined #ruby
[19:56:26] leitz: That was the hope for yesterday's work. DIdn't quite pan out, but I'm still thinking on it.
[19:56:55] JBbanks: has joined #ruby
[19:58:34] enterprisey: has joined #ruby
[20:00:48] leitz: Okay, time for a walk, and then refactoring upp to a struct. Maybe not quite so fancy, but works and passes tests.
[20:01:14] zzla: has left #ruby: ()
[20:03:26] VeryBewitching: has joined #ruby
[20:05:07] apeiros: leitz: changes through multiple careers are cumulative?
[20:05:30] apeiros: also isn't there like a word for "run through a career"? :D
[20:06:09] dionysus69: has joined #ruby
[20:07:12] deepredsky: has joined #ruby
[20:10:19] emerson: has joined #ruby
[20:10:46] leitz: apeiros, all changes are cumulative. Later on there's an "aging" thing where us old folks lose stats.
[20:11:05] leitz: Hitting the road. rah...
[20:11:23] apeiros: leitz: then I'm not sure what's the problem :D
[20:12:19] ek926m: has joined #ruby
[20:12:41] someuser: has joined #ruby
[20:12:42] tomphp: has joined #ruby
[20:12:57] deepredsky: has joined #ruby
[20:14:32] miskatonic: has joined #ruby
[20:15:00] jamesaxl: has joined #ruby
[20:15:43] xlegoman: has joined #ruby
[20:21:26] deepredsky: has joined #ruby
[20:23:43] jottr: has joined #ruby
[20:27:28] AxelAlex: has joined #ruby
[20:28:08] cdg: has joined #ruby
[20:30:49] x77686d: has joined #ruby
[20:32:59] sammi`: has joined #ruby
[20:35:44] Cohedrin: has joined #ruby
[20:36:48] ur5us: has joined #ruby
[20:38:10] cadillac_: has joined #ruby
[20:38:14] minimalism: has joined #ruby
[20:39:02] ur5us: has joined #ruby
[20:39:27] rfoust: has joined #ruby
[20:40:07] lele: has joined #ruby
[20:40:17] nofxx: has joined #ruby
[20:42:40] deepredsky: has joined #ruby
[20:43:56] nchambers: has joined #ruby
[20:48:42] cadillac_: has joined #ruby
[20:50:17] lamduh: has joined #ruby
[20:51:02] burgestrand: has joined #ruby
[21:00:49] benlieb: has joined #ruby
[21:02:18] mim1k: has joined #ruby
[21:04:14] zapata: has joined #ruby
[21:04:42] morfin: hmm what a heck
[21:05:05] morfin: if i run /home/morfin/webapps/crm_openproject/gems/gems/passenger-5.1.12/bin/passenger-config compile-agent where does it compile?
[21:05:24] morfin: i thought there should be buildout dir with module
[21:12:07] nopolitica: has joined #ruby
[21:12:35] deepredsky: has joined #ruby
[21:13:18] ghormoon: has joined #ruby
[21:13:36] michael1: has joined #ruby
[21:16:35] eckhardt: has joined #ruby
[21:18:13] mim1k: has joined #ruby
[21:19:24] deepredsky: has joined #ruby
[21:25:08] Guest31287: has joined #ruby
[21:25:15] zapata: has joined #ruby
[21:26:46] leitz: apeiros, RickHull, one use case is providing data like this: http://reuel.net/game/tdw/marston_family.html
[21:27:24] leitz: Another would be a web URL to edit the datastore. That page is hand coded html. :)
[21:27:31] Guest31287: has joined #ruby
[21:28:12] apeiros: leitz: I guess you're really excited about those parametrized AI generated portraits? :D
[21:28:44] leitz: Those were hand done as well, I'm worse at graphics than coding. :)
[21:29:03] sklvch_: has joined #ruby
[21:30:41] zapata: has joined #ruby
[21:32:23] kitsunenokenja: has joined #ruby
[21:33:19] leitz: sklvch_, it is usually more useful to ask a question. Smart folks here, steward their time well.
[21:34:39] sklvch_: has left #ruby: ("WeeChat 1.9.1")
[21:35:58] nofxx: has joined #ruby
[21:36:15] leitz: Well, that was cool. I thought multiple careers might work some day. Looks like today is that day since it already works.
[21:39:02] cadillac_: has joined #ruby
[21:39:23] leitz: Time to bite the bullet and do the struct.
[21:39:51] conta2: has joined #ruby
[21:40:17] Technodrome: has joined #ruby
[21:40:55] zapata: has joined #ruby
[21:41:00] safetypin: has joined #ruby
[21:42:45] selim: has joined #ruby
[21:45:05] zapata: has joined #ruby
[21:48:22] sent-hil: has joined #ruby
[21:50:36] bloodycock: has joined #ruby
[21:51:29] muelleme: has joined #ruby
[21:52:43] ur5us: has joined #ruby
[21:53:03] Technodrome: has joined #ruby
[21:54:57] mooe_: has joined #ruby
[21:55:28] ElDoggo: has joined #ruby
[21:55:46] drowze: has joined #ruby
[21:57:31] quobo: has joined #ruby
[22:02:27] gr33n7007h: has joined #ruby
[22:06:23] eckhardt: has joined #ruby
[22:09:02] dstrunk: has joined #ruby
[22:11:56] code_zombie: has joined #ruby
[22:12:15] michael1: has joined #ruby
[22:14:32] goyox86_: has joined #ruby
[22:18:19] cdg: has joined #ruby
[22:18:48] mostlybadfly: has joined #ruby
[22:29:27] pilne: has joined #ruby
[22:30:35] jrafanie: has joined #ruby
[22:30:51] rainbowz: has joined #ruby
[22:33:13] morfin: i just wanted follow common practice on this host
[22:33:36] morfin: i can say "f**k this" in any moment and run Puma
[22:37:09] morfin: shared hosting is evil
[22:42:16] safetypin: has joined #ruby
[22:45:35] tomphp: has joined #ruby
[22:46:11] workmad3: has joined #ruby
[22:48:56] michael3: has joined #ruby
[22:51:25] goyox86_: has joined #ruby
[22:56:26] darix: morfin: you can run puma and bind it to a unix domain socket
[22:56:32] darix: and access that socket from apache or nginx
[23:00:46] Cohedrin: has joined #ruby
[23:05:31] thinkpad: has joined #ruby
[23:08:49] morfin: i am wondering which phusion-passenger works with Ruby 2.4.1?
[23:09:11] morfin: i tried passenger-5.1.12 but it seems to be broken for me
[23:10:51] DoubleMalt: has joined #ruby
[23:18:44] mim1k: has joined #ruby
[23:23:35] carp3120: has joined #ruby
[23:25:52] yabbes: has joined #ruby
[23:25:54] David_H__: has joined #ruby
[23:27:31] waveprop_: has left #ruby: ()
[23:28:20] lele: has joined #ruby
[23:28:48] bloodycock: has joined #ruby
[23:28:54] Antiarc: has joined #ruby
[23:29:27] bloodycock: has joined #ruby
[23:29:34] guardianx: has joined #ruby
[23:31:50] tpendragon: has joined #ruby
[23:33:08] waveprop: has joined #ruby
[23:33:49] blackmesa1: has joined #ruby
[23:46:05] workmad3: has joined #ruby
[23:51:39] tomphp: has joined #ruby
[23:52:09] mim1k: has joined #ruby
[23:53:40] darix: morfin: you want 5.1.12
[23:57:33] c0ncealed: has joined #ruby