[00:52:03]
jfarmer:
I'm generally good at imagining "alternate universes" where someone's code makes sense, and I don't really see it here. If every character has the same set of possible stats, plain ol' inheritance from a +Character+ base class makes the most sense.

[01:09:29]
govt:
ive done something similar, but for whatever reason, the instance variable im defining in the base class is nil whenever i use it in the child class

[01:09:51]
jfarmer:
If you puzzle out what each bit is doing, your +[nil, nil].min+ example will eventually result in +min_i+ getting called, which is here: https://github.com/ruby/ruby/blob/ruby_2_2/enum.c#L1370-L1388

[01:17:27]
jfarmer:
I don't know that it implements it itself; for all I know there's a base <=> defined on every object.

[01:17:37]
govt:
if I have to go and set each subclass' instance variables to the parent class' by hand each time then there is really no point in bothering making a base class if I'm going to have boilerplate

[06:29:06]
Radar:
baweaver: Someone with only a couple of months Ruby experience. They've written a basic Rails application and can demonstrate that they know at least how to write Ruby without syntax erroring all over the place.

[06:29:24]
Radar:
Essentially: someone who's made it all the way through TWGR and Rails 4 in Action :P

[09:05:40]
Eddieh_:
I have a Ruby gem that provides a binary that can be run from the terminal. How do I go about overriding a specific method in that binary? I already have the code that overrides the method in the library (works if I want to use the override inside my own code), but can't seem to figure out where to put it to make the binary load it :/

[10:03:56]
jhass:
zotherstupidguy: Crystal, how about this one that builds a Crystal class and a corresponding Ruby extension? https://github.com/manastech/crystal_ruby/blob/master/sample/test_ruby.cr :P

[10:08:52]
zotherstupidguy:
if someone said SOA to me i would say a program talking to another program via a protocol, but now i think that a browser is also a program so a webservice talking to a browser negates the original definition

[11:26:08]
apeiros:
!fact add xy You are asking for a specific solution to a problem, instead of asking about your problem. This will lead to bad solutions. Also see http://meta.stackexchange.com/a/66378

[11:26:09]
ruboto:
apeiros, I will remember that xy is You are asking for a specific solution to a problem, instead of asking about your problem. This will lead to bad solutions. Also see http://meta.stackexchange.com/a/66378

[12:15:59]
wasamasa:
"Unluckily, the hardware bug that prompted Intel to disable hardware transactional memory (TSX) in August 2014 is still there, and very few new models are available without the bug. So for the moment STMX will be software-only on many CPUs."

[12:16:04]
apeiros:
jhass: I remember looking into hardware concurrency primitives ~10y ago and being surprised how f'ing little there was. I was left with the impression that software defined concurrency was more or less russian roulette with very good survival chances???

[12:16:09]
exadeci:
jhass: you made me notice that I should have added those in params and not path ... thanks

[12:16:14]
catphish:
i saw the atomic gem, though that still just uses a retry model of doing things

[13:08:44]
ljarvis:
wow I have the weirdest issue. I have a Dir glob with a sort and an assignment, ie: foo = Dir[...].sort; the specs fail due to some kind of sorting issue; however, when i add a line below with the variable in void context it works fine :|

[14:24:26]
zotherstupidguy:
i like backend more, but UI guys maybe a bit scared of most server-side technologies, so if it is just UI project, the UI might have a lot of good contributions, just saying! overall i think its a great movement!!!

[15:50:54]
dvxam:
Hi everyone! I'm having a little problem right using mkmf for a home-made c++ extension. How is it possible to use two different directory : one for headers and one for implementions? If yes, how to tell mkmf#create_makefile method?

[15:51:23]
sorbo_:
dudedudeman I've heard good things about the clover machine but never experienced one

[15:54:12]
dudedudeman:
sorbo_: if you can find one, definitely check it out. it retains so much of the flavor of the original roast. starbucks actually now owns the clover company, so you can find them in some of their locations, or in coffee shops that owned them before starbucks bought them

[17:34:35]
finisherr:
Hello Folks. I???m having some issues with the Proxy object ruby koan. I???m not sure how to intercept the method calls. Do I override the send method and wrap it so I can add each method call to a message_log array or something?

[17:54:43]
centrx:
"Test::Unit is an implementation of the xUnit testing framework for Ruby. \ If you are writing new test code, please use MiniTest instead of Test::Unit. \ Test::Unit has been left in the standard library to support legacy test suites."

[19:11:45]
derekv:
feeling dumb here, with rvm I followed the instructions here https://rvm.io/integration/jenkins but my build fails, it seems to be looking for the ruby specified in the .rvmrc and then failing because it tries to install it with sudo (jenkins doesn't have sudo)

[19:13:59]
ruboto:
derekv, Please do not crosspost without at least telling so and mentioning provided suggestions and their outcome in all channels. Experience shows that people don't do either, and not doing so is considered rude.

[20:07:31]
ruby_nuby:
Is anyone using Neo4J.rb and ActiveRel? I'm trying to work out how 'find_or_create_by' a relationship so I can increment its weight rather than create a second, third etc relationship

[20:14:24]
nobitanobi:
If I want to check the boolean value of a hash (:success) I am doing this @my_hash.present && @my_hash[:success] - I do the .present?, because that hash can be nil. Any cleaner way of doing that?

[20:51:15]
dreinull75:
is this a good idea? class A; def foo; A.new; end; end; I'm returning an instance of A inside A because I need a modified version of A. But is this a good idea? Possibly deeply nested objects et al?

[20:53:23]
dreinull75:
I'm using a Sequel dataset and my method returns a modified dataset. Unless I create a new instance of it it's returned as a Dataset without all the bells and whistles I've added before.

[20:57:58]
ljarvis:
I've done lots of stuff like this before: https://gist.github.com/leejarvis/65889996aa3237c2d28d when you can't mutate or dont have a dataset. Can't speak about your exact example but it's fine

[20:58:14]
ljarvis:
dreinull75: mostly, just makes more sense to refer to the current class as self.class

[21:03:24]
dreinull75:
ljarvis there's more than one of those extra filters so this just makes it easier for me to continue working with the data as expected. Without creating the Presenter again outside.

[21:03:57]
ljarvis:
dreinull75: so it re-uses the existing query and builds upon it? (i.e AND query)

[21:09:18]
merqlove:
Hello guys. I need help me with such trouble. Singletones like rails model classes save his state between http requests? Trying to fix multi tenant app. Every part of my app have access to model Tenant, which has Tenant.subdomain methods for read/write. Also I use middleware who starts before rails cache/session middlewares and save subdomain with this

[21:09:18]
merqlove:
method. This is wrong way? I need to create something which will have call to .new every request?

[21:14:50]
merqlove:
Primary question is about Ruby classes with class << self do ... end constructions. This object have to reset its state between requests or not. Seems that not, as i see in Rubymine debugger.

[21:48:33]
dudedudeman:
so i have three databases in my database.yml(test, development, production), and when i do rake db:create, or rake db:setup, it sets up two out of the three. It leaves out production for some reason. am i missing something important?

[21:50:05]
dudedudeman:
so i can set my environment variable in Puma to development or test and it works great, but setting it to production fails, because obviously a production database doesn't exist yet

[22:24:20]
jhass:
mc_fail: because there are no more security updates, if somebody finds a major security issue in 1.8 (a minor one is already known), you'll have to backport a patch for 1.8 on your own or do the update to a major Ruby version as a security patch

[22:25:37]
shevy:
mc_fail not sure. There are probably not many people who need it, so you may have a niche there. Basically, if the error is really only about :foo => 'bar' versus foo: 'bar' then writing the code that does such a change back should not be impossible to write

[22:26:49]
mc_fail:
jhass i'm using ruby only with chef\puppet, i don't think security in code there is really important, also i have fedora16 with an old kernel on thousland of servers, and update ruby means update fedora, which is impossible

[22:29:40]
baweaver:
As a DevOps / Infrastructure Automation / Security person, I have to say that's a horrible mindframe to have mc_fail

[22:29:42]
shevy:
mc_fail when you have the .gemspec file of a gem, you can unpack the gem via "gem unpack *.gem", or the name, then change the necessary files in question, and then rebuild the gem: "gem build *.gemspec". if the gem is https://rubygems.org/gems/filesize then it is so tiny, 6 KB, that you can finish in like 5 minutes or so :P note that the gem has not been updated in 6 years

[22:49:09]
zenspider:
the fact that 1.9.0 & 1.9.1 were never really production ready (yet, people tried) and 1.9.2 was buggy as fuck and hard to build... encodings were just awful and not nearly as transparent as they are in 2.x... lots. really. I would like that era to be dead and gone