« Back to channel list

#ruby - 30 March 2015

« Back 1 day Forward 1 day »
[00:11:46] bonhoeffer: anyone ever get we recommend using mac-brew-gcc.sh to install a more recent g++
[00:13:20] Nilium: I use clang.
[00:13:29] Nilium: Never felt compelled to reinstall gcc.
[00:14:36] jhass: sadly I still very rarely run into stuff that builds with gcc but not clang
[00:15:42] bonhoeffer: Nilium: i didn???t know clang was an alternative
[00:15:47] bonhoeffer: i???m trying to install gsl
[00:16:34] bonhoeffer: is there a cli way to upgrade xcode?
[00:18:31] havenwood: bonhoeffer: closest i can think of is: xcode-select --install
[00:18:47] bonhoeffer: yeah ??? xcode-select: error: command line tools are already installed, use "Software Update" to install updates
[00:18:54] bonhoeffer: not sure what ???Software Update??? is
[00:18:58] bonhoeffer: stupid message
[00:19:08] bonhoeffer: installing xcode from the app store
[00:19:12] jokester: mac app store?
[00:19:18] havenwood: bonhoeffer: run: softwareupdate
[00:20:27] bonhoeffer: not sure how to deal with: You need a version of g++ which supports -std=c++0x or -std=c++11. If you're on a Mac and using Homebrew, we recommend using mac-brew-gcc.sh to install a more recent g++
[00:20:38] bonhoeffer: what is: std=c++0x or -std=c++11
[00:21:19] ojacobson: Compiler flags for selecting what version of the C++ language is in use
[00:25:43] bonhoeffer: ojacobson: thanks, are there docs on what these are?
[00:26:15] bonhoeffer: wait ??? am i using clang? https://gist.github.com/tbbooher/6777de2c252ce4279b95
[00:26:40] nobitanobi: I want to iterate over an array of User objects, so that at the end I have an array with [{user.name, user.color}]. A user can have several colors. Here is what I have done: https://gist.github.com/novito/a74e528faa14b6dc72ed
[00:26:51] nobitanobi: Am I over complicating with the inner map + flatten?
[00:27:47] Nilium: bonhoeffer: You are using clang.
[00:27:51] Nilium: g++ on OS X is mapped to clang.
[00:28:29] Nilium: nobitanobi: Yes.
[00:28:39] nobitanobi: Nilium: any suggestion?
[00:28:48] nobitanobi: I basically need to iterate over users, but each user can have several colors
[00:28:53] bonhoeffer: do i have a version that should compile this: https://gist.github.com/tbbooher/6777de2c252ce4279b95
[00:29:02] Nilium: What data structure do you want?
[00:29:07] Nilium: Figure that out.
[00:29:26] baash05: Hey guys/girls
[00:29:52] baash05: I'm trying to figure out something about threading.
[00:29:56] baash05: t1 = Thread.new { d = 1 + 2; p d }
[00:30:09] Nilium: bonhoeffer: unless it needs gcc-only extensions, their build process is probably messed up.
[00:30:14] baash05: in the rails c.
[00:30:14] nobitanobi: Nilium, an array of hashes.
[00:30:29] baash05: that prints out right away.
[00:30:41] Nilium: nobitanobi: Then kill the flatten.
[00:30:49] baash05: pry(main)> t1 = Thread.new { d = 1 + 2; p d } 3
[00:30:55] c-c: baash05: do you have real life use case that needs threading?
[00:30:58] Nilium: Or at least put it on the outside as flatten(1) or something
[00:31:19] nobitanobi: Nilium: if I kill the flatten, I would get an array of arrays.
[00:31:20] Nilium: baash05: You should probably ask the Rails room.
[00:31:23] baash05: I am getting tokens for credit cards from 10 different providers.
[00:31:31] baash05: well it's not really a rails question.
[00:31:38] c-c: callback
[00:31:43] Nilium: nobitanobi: No, right now you'll get an array of arrays because flattening a hash turns it into an array of [key, value]
[00:31:59] Nilium: Your flatten is in the wrong place.
[00:32:01] baash05: Just happen to be using the rails c for some ruby code.
[00:32:27] baash05: Okay.. so I have to get 10 tokens.. and each one is a net call.
[00:32:29] nobitanobi: Nilium: I will try again. thanks
[00:32:43] Nilium: You just need to flatten the right thing and make sure you're flattening the right depth
[00:33:08] baash05: how would you do that with a call back?
[00:33:25] nobitanobi: Is there a cleaner way of doing this though? Like iterating over a data structure knowing that for each of those, you also want to iterate
[00:33:49] baash05: That seems like a large amount of overkill..
[00:34:05] work_op: .each {|x| x.each {|y| .call}} ?
[00:34:07] baash05: Just to avoid threading.
[00:34:14] c-c: action record call back?
[00:34:40] c-c: lol I always typo "action" == active
[00:34:48] nobitanobi: flat_map + map seems to do the work.
[00:35:02] baash05: c-c are you chatting at me?
[00:36:31] baash05: My question with respect to threads is.. given I've just new'ed the thread why does it look like the thread was run?
[00:36:45] c-c: well it ran
[00:36:48] baash05: I didn't want it started.
[00:36:56] baash05: right.. why did it run?
[00:37:09] baash05: thread.new runs?
[00:37:17] baash05: Thread.new
[00:38:00] c-c: are you saying you have no idea what you're doing? 8)
[00:38:02] baash05: I guess a better question would be how do I create a thread object without running right away.
[00:38:37] Nilium: By creating it later.
[00:38:54] baash05: No.. I a saying I didn't expect an object init to run the code.
[00:39:05] c-c: baash05: maybe you should use fibers
[00:39:15] jhass: you probably want a subclass that overrides run
[00:39:35] jhass: or am I confusing this with Java completely now? :P
[00:39:46] c-c: baash05: who knows, join andor fork
[00:39:52] baash05: I expected that ::start would start..
[00:40:11] baash05: and that new would.. well new
[00:40:23] baash05: is there a way to new without starting.
[00:41:33] jhass: or a wrapper class
[00:42:00] c-c: read harder!
[00:42:17] jhass: class StartableThread; def initialize(&code); @code = code; end; def start; @thread = Thread.new(&@code); end; end; 8)
[00:42:47] c-c: http://ruby-doc.org/core-2.2.0/Thread.html
[00:43:57] c-c: read join or run (alternatively, read stop and run)
[00:45:26] jhass: well, that method creates the underlying pthread on the .new call already
[00:45:34] jhass: which might or might not be wanted
[00:46:02] baash05: Yeah.. I'm taking a closer look at the docs, but it feels like new does a bit more than create the object. I suppose it's a "make it easy" thing.. but it feels wrong.
[00:47:52] c-c: https://github.com/ruby/ruby/blob/trunk/prelude.rb
[00:49:13] jhass: now that is something that really feels wrong
[00:51:20] c-c: baash05: anyway, you dont want threads
[00:52:15] baash05: so.. aside from subclassing there is no way to create the threads and start them later? I can sub class them fine, and I can just call the new when I really need them. Both with make my code bigger, but if that's my options. so be it.
[00:52:22] c-c: https://www.airpair.com/ruby-on-rails/posts/building-a-restful-api-in-a-rails-application
[00:52:32] baash05: I just want to do it the "right" way.. the DRY way.
[00:52:32] c-c: baash05: did you not read the documentation
[00:52:45] jhass: well, I gave you that handy wrapper there as another alternative
[00:52:53] c-c: there seems to be ways, for example stop it instantly
[00:53:02] jhass: and the third option is to use Thread.stop and Thread#run
[00:53:25] c-c: waiting for 3rd party to return tokens shouldn't happen in a thread loop
[00:53:44] baash05: I read it.. I googled around.. the question was framed not because it was running one way.. it was framed because I wanted to run later.. and nothing in the doc indicates how.
[00:54:33] baash05: How should 3rd parties return tokens.. assuming no server on the system running the code is present?
[00:54:45] bonhoeffer: any options here: https://gist.github.com/tbbooher/14f5157145fba6deb828
[00:54:46] c-c: well there is a way, and its documented in multiple examples, and I've pointed you to those examples multiple times, and pointed out that you are looking for the wrong solution
[00:54:54] c-c: so good luck!
[00:55:01] bonhoeffer: i???ve upgraded xcode and gcc
[00:55:27] baash05: cool c-c.. I see how to do it with threads now.
[00:55:57] baash05: but how best to get it done.. I'm hear to learn and share..
[00:56:41] c-c: bonhoeffer: are you on linux or osx?
[00:56:48] baash05: active record call backs are fine.. but these aren't for active record elements.. so not really handy.
[00:57:21] baash05: I also don't have (in this instance) the ability to serve up end points.
[00:58:00] c-c: bonhoeffer: 4th paragraph http://sciruby.com/blog/2015/02/14/nmatrix-beta-released-belated-announcement/
[00:59:21] c-c: bonhoeffer: also https://github.com/SciRuby/nmatrix/issues/290
[00:59:38] c-c: 4th post has solution
[01:00:18] c-c: potential one, anyway
[01:13:22] bonhoeffer: c-c: anything on this: https://gist.github.com/tbbooher/f22e104091c626714fae
[01:14:00] c-c: did you try the fix suggested in that last link
[01:14:54] c-c: https://github.com/SciRuby/nmatrix/issues/290#issuecomment-74343173
[01:15:11] bonhoeffer: no ??? but i just did
[01:15:56] bonhoeffer: and got the same error
[01:18:12] c-c: also http://math-atlas.sourceforge.net/atlas_install/atlas_install.html
[02:33:12] yh: How can I enable DateTime.now - 1.minute to work?
[02:33:54] yh: I required "active_support/core_ext/numeric/time"
[02:34:17] yh: but get: "TypeError: expected numeric". 1.minute.to_i there would have worked.
[02:41:24] havenwood: yh: require 'active_support/core_ext/date/acts_like'
[02:41:36] havenwood: yh: require 'active_support/core_ext/date/calculations'
[02:42:47] havenwood: yh: or just: require 'active_support/core_ext/date'
[04:58:36] DeathCode: whats popping?
[05:03:29] DeathCode: is learning ruby via netbeans a good idea?
[05:06:02] Radar: http://rubykoans.com/
[05:06:06] Radar: Learn Ruby using the koans ^
[05:06:10] helpa: Learn Ruby by reading this book - http://manning.com/black3 - The Well-Grounded Rubyist by David A. Black
[05:06:19] Radar: That is also a good book to learn Ruby from if you can afford it.
[05:07:42] DeathCode: i dled netbeans already
[05:07:43] DeathCode: and set it up
[05:08:16] Radar: Does Netbeans even have a Ruby tutorial?
[05:09:18] DeathCode: but some other dude is doing it on komodo
[05:09:29] DeathCode: and i'm typing and learning the same shit on netbeans
[05:09:31] DeathCode: is that ok to do?
[05:09:35] Radar: sure why not?
[05:09:59] mistergibson: NetBeans version 7.1.2 only is capable of using a Ruby coding module - that's what I use
[05:10:15] mistergibson: I love NetBeans
[05:10:16] DeathCode: whats that mean?
[05:10:37] DeathCode: i have netbeans 8.0.2
[05:11:08] DeathCode: mistergibson:does that mean, all features of ruby are not supported by netbeans?
[05:12:11] mistergibson: DeathCode: I have found that using the plugin works best. I does a great job of parsing Ruby
[05:14:57] DeathCode: i added all the plugins to ruby there is
[05:15:04] DeathCode: as per tutorial
[05:20:01] DeathCode: mistergibson:yes i just checked and i have all the ruby plugins on netbeans. what i wanted to ask was, does netbeans have a limitation? cause i want the full ruby experience
[05:22:01] mistergibson: DeathCode: not to my knowledge
[06:17:43] flughafen: moin certainty sevenseacat
[06:18:57] certainty: morning sir
[06:31:26] flughafen: how was your weekend certainty \
[06:49:19] flughafen: hallo sevenseacat wir war deine wochenende
[06:50:31] flughafen: was hast du gemacht
[06:53:10] flughafen: geschlafen * ;)
[06:54:02] flughafen: sevenseacat: why are they letting you write a book? you can't even speak german!
[06:54:17] sevenseacat: good thing the book is in english!
[06:54:33] flughafen: there is no english, only zuul
[06:57:43] flughafen: ACTION should have named my dog zuul
[07:35:51] flughafen: sevenseacat: how much more do you have to go?
[07:36:12] sevenseacat: just final review
[08:29:11] certainty: ist github still under attack?
[08:30:18] apeiros: I'm still impressed how little you notice about such a large scale attack
[08:30:23] apeiros: excellent ops team
[08:30:32] certainty: yeah they handle it well
[08:38:02] jokke: how can i include rake tasks from another gem?
[08:38:32] apeiros: jokke: just load the files defining the tasks
[08:38:45] jokke: ok. so it needs to be in lib
[08:40:51] flughafen: certainty: it seemed ok just now
[08:54:37] DeathCode: anybody here?
[08:55:26] Hanmac: ACTION currently are only answering machines online
[09:00:25] gregf_: docker exec -it I need to send the whole XML along with namespace to a rest service using PUT/POST operations of REST Client.
[09:00:36] gregf_: err, sorry :/ wrong chat
[09:01:48] DeathCode: how important is ruby in today's world?
[09:02:23] certainty: DeathCode: that's a very vague question. Maybe you can narrow your scope
[09:03:35] gregf_: DeathCode: it depends. most things i use nowadays need ruby in some form or the other ;). yet to write some death code tho' :/
[09:04:54] certainty: there are big parts of the world where ruby and any programming language for that matter is totally unimportant
[09:04:58] apeiros: DeathCode: it's one of the top10 programming languages. so important enough I'd say.
[09:06:28] sevenseacat: its about 71% important.
[09:06:31] sevenseacat: ACTION nods
[09:06:46] apeiros: [citation needed]
[09:07:48] certainty: it's certainly important enough that many many nerds do nothing but eat drink and breath ruby all day
[09:08:13] apeiros: if you eat ruby, do you become stoned?
[09:08:59] certainty: yeah you can tell because that person usally has little read diamonds in his eyes
[09:14:34] certainty: and there comes workmad
[09:19:21] apeiros: ok, there's 3 hard problems in IT: naming, cache invalidation, off-by-one errors and using the right one of those goddamn less-/greater-than comparison operators???
[09:19:37] ddv: yeah naming is hard
[09:20:47] jhass: isn't 3 a special case of 2?
[09:21:35] jhass: well, usually it's < vs <= and > vs >=
[09:21:47] jhass: not < vs > or >= vs <= or so
[09:22:02] apeiros: I tend to jumble < and >
[09:22:13] apeiros: and it's always super silly
[09:22:36] jhass: crystal has something neat, you can do a < x < b
[09:22:38] apeiros: reminds me of elementary school where I happened to accidentally transcribe +/- wrong.
[09:23:00] apeiros: jhass: syntax sugar which is transformed to something else?
[09:23:05] jhass: which helps me visualize the right one a lot
[09:23:21] jhass: a < x && x < b I think
[09:23:39] apeiros: I actually wondered whether I'd want to have that in ruby. I'm still not sure.
[09:24:02] apeiros: it breaks the expectation of (a < x) already being an expression and feeding into (a < x) < b
[09:24:26] apeiros: but it is a common source of confusion (and probably should be added to the FAQ)
[09:24:43] Hanmac: jhass: x.between?(a, b)
[09:24:49] jhass: hanmac: I know
[09:25:01] jhass: that requires more mental work though IMO
[09:25:13] jhass: you can continue to use it in crystal though ;)
[09:25:50] jhass: I think a < x < b is a common enough maths construct to be okay with breaking regular syntax rules
[09:26:50] DeathCode: guys i have a question
[09:26:58] ddv: don't ask to ask, DeathCode
[09:27:06] certainty: +1 for a < x < b
[09:27:09] DeathCode: i'm learning ruby on netbeans. is it the same thing as ruby on netbeans ?
[09:27:23] ddv: DeathCode: no idea
[09:27:33] DeathCode: i'm learning ruby on netbeans. is it the same thing as ruby on rails?
[09:27:35] jhass: mmmh, beans
[09:27:45] DeathCode: answer my question please
[09:27:49] canton7: netbeans is an IDE
[09:27:54] jhass: what's ruby on netbeans?
[09:27:54] canton7: rails is a web framework
[09:27:56] jhass: got a link?
[09:28:01] canton7: they're completely different things
[09:28:03] ddv: DeathCode: ruby on rails is a framework, ruby is programming language and neatbeans is a ide
[09:28:13] canton7: you can use netbeans to write code which uses rails
[09:28:19] canton7: or you can use notepad to write code which uses rails
[09:28:25] canton7: or you can use netbeans to write code which does not use rails
[09:28:39] ddv: I will shoot you if you use notepad
[09:28:45] DeathCode: how do i know which is ruby and which is ruby on rails?
[09:28:54] ddv: DeathCode: by using your brain
[09:29:05] canton7: DeathCode, are you using the 'rails' web framework?
[09:29:09] jhass: ugh, eleven.scot is still available :/
[09:29:11] canton7: if yes, you're using rails. if not, you're not
[09:29:13] DeathCode: you need to chill out. my "ex" dumped me today
[09:29:15] jhass: ACTION must resist
[09:29:17] certainty: that's a common source of confusion actually
[09:29:27] ddv: DeathCode: whoa? don't ask stupid questions
[09:29:27] DeathCode: i feel bad already
[09:29:36] DeathCode: well damn..
[09:29:44] ddv: DeathCode: sorry for the gf tho
[09:29:48] DeathCode: everybody hates me today
[09:30:08] DeathCode: ye well she didnt leave me for my brain she left me for my looks so fuck u
[09:30:09] canton7: <DeathCode> answer my question please <-- we just get defensive when people get uppity :P
[09:30:20] DeathCode: oh sorry about that
[09:30:35] DeathCode: ye im not uppity i'm super calm
[09:30:38] canton7: <DeathCode> so fuck u <-- and we really don't like it when people get abusive ;)
[09:30:47] DeathCode: oh ok sorry about that
[09:30:52] DeathCode: got a little bit weird there
[09:32:06] certainty: DeathCode: ok let's start all over. ruby is a programming language. ruby on rails is a framework/library for that programming language that is used to develop web applications
[09:32:22] DeathCode: ok hold on can i just show u something and u tell me whats up
[09:32:29] DeathCode: http://plugins.netbeans.org/plugin/38549/ruby-and-rails
[09:32:37] DeathCode: i downloaded all my plugins from here
[09:32:51] DeathCode: does it include the rails framework as well ?
[09:32:57] DeathCode: it says ruby and rails
[09:33:09] canton7: 'rails' is a web framework for ruby
[09:33:10] sevenseacat: added 2011? computer says no
[09:33:18] canton7: it's providing auto-completely, etc, for both the ruby stdlib and for rails
[09:33:20] sevenseacat: "It also provides support for Rails 2.3.x. " stop the presses
[09:33:21] canton7: *auto-completion
[09:33:34] workmad3: sevenseacat: last updated about a year ago though :P
[09:33:56] apeiros: "ruby and rails" is shorthand for "ruby and ruby on rails"
[09:33:58] workmad3: but yeah, I heard that netbeans had dropped their ruby and rails IDE plugin ages ago...
[09:34:05] DeathCode: so many opinions
[09:34:08] DeathCode: i'm a ruby noob
[09:34:28] sevenseacat: then learn ruby, before learning rails.
[09:34:28] DeathCode: i want to learn the advanced stuff of ruby on rails one day. so is netbeans a good idea to proceed with?
[09:34:32] apeiros: there are not many opinions. there are mostly a couple of facts.
[09:34:51] DeathCode: netbeans is not good?
[09:35:02] workmad3: DeathCode: you want to go from ruby newcomer to learning advanced ruby and ruby on rails in a single day?
[09:35:08] DeathCode: apeiros:i got u. please dont nitpick on like one word
[09:35:26] DeathCode: workmad3:no i didnt say in a single day. i said, one day. as in, i'm sharing my dreams with u
[09:35:44] DeathCode: like one day i wanna be the ruby on rails master
[09:35:55] DeathCode: gotta code em all. you know the works
[09:35:55] apeiros: DeathCode: have you used netbeans for other things before?
[09:36:15] DeathCode: no apeiros but i looked at the tutorials and i could work ruby
[09:36:29] apeiros: DeathCode: then I would definitively not start with ruby + rails + netbeans
[09:36:34] DeathCode: i just want to use netbeans to learn advanced stuff of ruby on rails in the future
[09:36:49] sevenseacat: get a text editor.
[09:36:54] DeathCode: i've already worked with ruby in netbeans tho. i'm working and practicing on it as we speak
[09:37:45] sevenseacat: that is my opinion, but its one based on nearly 5 years of working with ruby.
[09:37:48] apeiros: DeathCode: 3 strong reasons against: a) you'll get little support as only very very few people use that combination, b) as from your link, it seems netbeans' ruby/rails support is ages behind, c) you have to *also* learn an IDE
[09:38:14] DeathCode: i have worked with IDEs before. i learned a lot of java from eclipse
[09:38:18] sevenseacat: time flies when you're having fun. five years.
[09:38:22] workmad3: DeathCode: ah, good... that wasn't clear :P
[09:38:24] apeiros: most ruby programmers will tell you to use a good text editor, not an IDE
[09:38:31] DeathCode: good text editor
[09:38:37] DeathCode: what about komodo editor?
[09:38:38] workmad3: if they do recommend an IDE, it'll probably be rubymine
[09:38:48] apeiros: you're on windows?
[09:38:56] ddv: yeah intellij is the best polygot ruby ide
[09:39:06] sevenseacat: i've used komodo in the past for non-ruby stuff. it was okay.
[09:39:09] ddv: but it feels way out of place on my mac
[09:39:11] DeathCode: when i say ruby i want ruby on rails support too
[09:39:19] DeathCode: and can it be something free too ?
[09:39:19] sevenseacat: ddv: its also way out of place on most linuxes
[09:39:29] sevenseacat: not asking for much are you
[09:39:45] apeiros: DeathCode: going from "ruby" to "ruby on rails" is a single "gem install rails" command, once you have ruby installed.
[09:39:48] sevenseacat: if you're good with eclipse, isnt radrails based on eclipse?
[09:39:50] ddv: sevenseacat: yeah Java Swing UI is ugly as hell still
[09:40:07] sevenseacat: is radrails still a thing?
[09:40:09] workmad3: sevenseacat: wasn't radrails subsumed into aptana studio years ago?
[09:40:14] DeathCode: what is good for learning ruby on rails?
[09:40:20] sevenseacat: maybe. i dunno. like i said, i dont use IDEs :P
[09:40:30] DeathCode: i want to do web dev one day
[09:40:31] workmad3: sevenseacat: same :P
[09:40:34] sevenseacat: DeathCode: get a text editor with syntax highlighting. thats all you need.
[09:40:38] apeiros: DeathCode: sorry, not using windows, so don't know which editor is good there.
[09:40:47] DeathCode: for both ruby and rails sevenseacat
[09:40:57] DeathCode: awesome. thank u so much
[09:41:04] DeathCode: its gonna be a bitch to switch again from netbeans
[09:41:27] DeathCode: sevenseacat:do u have any in particular that u recommend?
[09:41:54] sevenseacat: i use sublime text 3, which is free to evaluate (read: use forever as long as you dont like the odd nagging message)
[09:41:55] jhass: DeathCode: go with sublime text 3
[09:42:13] sevenseacat: (though i did register mine because i am a good netizen)
[09:42:24] DeathCode: i cant afford to pay right now :(
[09:42:30] DeathCode: which is why i'm learning code
[09:42:38] canton7: "which is free to evaluate"
[09:42:42] canton7: " (read: use forever as long as you dont like the odd nagging message)"
[09:42:49] DeathCode: ye ye i wasnt talking about that
[09:42:56] DeathCode: i was talking about the register part
[09:42:56] workmad3: mmm... like the good old days of mIRC :)
[09:42:58] colorisco: who is deathcode
[09:43:01] DeathCode: if its not too much of a nag
[09:43:08] DeathCode: then i'd use it
[09:43:14] DeathCode: colorisco:what u mean?
[09:43:18] DeathCode: i'm new here :)
[09:43:26] workmad3: "You have used mIRC for 2136 days without purchase. Would you like to purchase?"
[09:43:37] certainty: nope thanks
[09:43:49] colorisco: show your cool apps that you wrote
[09:44:04] colorisco: seems you a skilled developer
[09:44:12] ddv: did you guys discover that easter egg in mIRC? when you click on the guys portrait in the about screen on his nose..
[09:44:21] DeathCode: colorisco:me? i'm alright
[09:44:34] DeathCode: i'm good at java tho
[09:44:40] DeathCode: i made bus app for my city
[09:44:44] ddv: DeathCode: for Java you need an IDE :P
[09:44:50] DeathCode: ye i use eclipse
[09:44:52] DeathCode: i already told u!
[09:45:11] DeathCode: but these people told me to get sublime text 3
[09:45:17] DeathCode: so i'm gonna do that now
[09:45:18] ddv: DeathCode: and a large display in vertical setting because of the many lines of code
[09:45:36] DeathCode: what are you trying to say
[09:45:53] sevenseacat: we're picking on java.
[09:46:06] DeathCode: meh i love java
[09:46:37] DeathCode: what is this? like a turf war or something
[09:46:38] canton7: tried C#? ;)
[09:46:41] DeathCode: blood and the crips
[09:46:45] DeathCode: ruby and java
[09:46:57] ddv: YouReallyLoveJavaBecauseTheyHaveCoolMethodsLikeThisOne(); ?
[09:46:57] sevenseacat: at least you didnt mention php.
[09:47:21] DeathCode: ddv shutUp()
[09:47:40] DeathCode: forgot the semicolon
[09:49:19] sevenseacat: public static void shutUp()
[09:50:13] apeiros: I think it's a good thing I have lunch break now :D
[09:50:22] jhass: you all forgot the wrapping into public class AbstractSingletionFactoryBean { }
[09:50:43] certainty: apeiros: is java code considered an insult here? xD
[09:51:00] apeiros: class SingletonLady { public static void putARingOnIt() {} }
[09:51:15] apeiros: certainty: ask the other ops. I'm on break :-p
[09:51:16] sevenseacat: when i think of java - https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpriseEdition
[09:51:17] apeiros: ACTION off
[09:51:57] ddv: well the JVM is pretty nice
[09:52:07] ddv: jruby is awesome
[09:52:42] ytti: i am gobsmacked fastest ruby is written in rpython
[09:53:19] ytti: too bad rubinious didn't choose same path as rpython
[09:53:23] ytti: rubinius
[09:53:30] DeathCode: damn u guys hate java too much
[09:55:45] sevenseacat: i dont hate anything. except mushrooms.
[09:55:50] sevenseacat: fucking mushrooms.
[09:56:00] sevenseacat: stnaky pieces of fungus
[09:56:43] DeathCode: mushrooms are cute
[09:56:54] DeathCode: i dont know what yall be sayin
[09:57:30] sevenseacat: who was the first person to sniff the unholy stench of a mushroom and go 'by golly im going to eat this
[10:00:21] DeathCode: how old are you sevenseacat
[10:00:34] DeathCode: then dont tell me
[10:02:16] ddv: this is not a dating channel, DeathCode
[10:02:23] kstuart: Shroom munching is for the Gods, not mere mortals!
[10:02:40] DeathCode: who was looking for dates
[10:02:48] DeathCode: is sevenseacat even a chick?
[10:03:02] DeathCode: oh i didnt know
[10:03:47] DeathCode: people here are super defensive
[10:04:02] DeathCode: and nitpicky
[10:04:05] canton7: you're just quite... abrasive
[10:04:10] sevenseacat: not really, but what does a person's age have to do with anything?
[10:04:20] sevenseacat: programmers are nitpicky. get used to it.
[10:04:31] DeathCode: sevenseacat:cause you sounded every young talking about the mushrooms and shit
[10:04:39] sevenseacat: whether i'm 12 or 50, what does that have to do with my programming ability?
[10:04:41] ddv: developers are like guitar players pretty arrogant :D
[10:04:47] DeathCode: canton7:i didnt know i came off that way
[10:04:59] DeathCode: sevenseacat:it doesnt. but it was just an observation
[10:05:05] certainty: ACTION is both a programmer and a guitarist
[10:05:11] certainty: i try not to be arrogant
[10:05:18] sevenseacat: try being the operative word >_>
[10:05:18] DeathCode: ironically certainty was the nicest one here
[10:05:32] jokke: is it possible to do something like array concatenation in yaml? i have a property that is an array with some default values. I'd try to avoid copy pasting them all over the place.
[10:05:56] canton7: DeathCode, mushrooms are a perfrectly normal part of diet. the 'magic' part is one which you introduced all on your own :)
[10:07:08] DeathCode: canton7:magic mushrooms?
[10:07:20] jhass: jokke: I think &foo only works for hashes/objects (what does yaml call them even?), do it in your code
[10:07:40] canton7: at least I assume that's what you were referring to. Not sure how talking about mushrooms makes you sound young otherwise :P
[10:14:33] DeathCode: i dont understand how to set up sublime text 3 with ruby on rails
[10:16:04] sevenseacat: theres nothing to set up
[10:16:12] sevenseacat: st3 is a text editor
[10:17:25] certainty: for some it's also $home
[10:17:29] jhass: DeathCode: you want something like http://railsinstaller.org/en on windows, if you don't already have it
[10:18:15] DeathCode: is there a site that shows me how to do this step by step
[10:18:28] DeathCode: i got st3 and got package installer
[10:18:43] certainty: sevenseacat: do you have cases like these covered in the new edition?
[10:18:51] DeathCode: can i just learn it on netbeans or eclipse?
[10:18:56] sevenseacat: we have a ruby and rails installation guide for windows, yes.
[10:19:47] sevenseacat: DeathCode: if you've already got netbeans configured, just use it.
[10:20:02] DeathCode: i got it configured
[10:20:05] sevenseacat: of course, if it doesnt work, no-one will have a clue what its doing
[10:20:22] DeathCode: but i'm afraid the ruby on rails package on it is older version
[10:20:37] sevenseacat: what version is it?
[10:20:54] Guest67179: Q - for production servers should we use any ruby manager (rvm, rbenv, etc) or its better to use/update system ruby or compile it from source?
[10:21:13] DeathCode: sevenseacat:here this link: http://plugins.netbeans.org/plugin/38549/ruby-and-rails
[10:21:32] sevenseacat: that doesnt tell me what version of ruby on rails its using
[10:21:32] DeathCode: It also provides support for Rails 2.3.x. With this support you can:
[10:21:32] DeathCode: Create a Rails application
[10:21:32] DeathCode: Invoke all the basic operations of Rails from IDE controls (migrations, generators, etc...)
[10:21:32] DeathCode: Basic support for deploying to glassfish web-server
[10:21:40] sevenseacat: i expect you to be able to figure that out, given you're using it
[10:21:41] DeathCode: rails 2.3.x
[10:21:49] sevenseacat: then yes, you're two major versions out of date
[10:22:08] DeathCode: i just want to program
[10:22:14] DeathCode: and i got used to netbeans too
[10:22:29] jhass: Guest67179: !best
[10:22:29] helpa: Guest67179: "Best" and "better" are subjective. Try to use a different term.
[10:22:51] sevenseacat: the instructions we gave people at railsgirls - http://guides.railsgirls.com/install/#setup-for-windows
[10:23:57] DeathCode: is that rails installer thing a text editor?
[10:24:07] sevenseacat: it installs rails, as the name suggests.
[10:24:08] DeathCode: then whats the point
[10:24:25] sevenseacat: so how do you want to use rails without installing it again?
[10:24:36] DeathCode: ok i'm very new at ruby obviously
[10:24:39] helpa: http://i.imgur.com/tyViD.gif
[10:24:42] DeathCode: hold on, let me explain
[10:24:48] sevenseacat: so learn ruby first. forget rails for now.
[10:24:58] DeathCode: ok so for java i just got eclipse and ran it
[10:25:23] sevenseacat: great. ruby isnt java.
[10:25:33] DeathCode: so can it be like where i install a next editor or IDE and play around with ruby?
[10:25:40] jhass: I know why I don't say "integrated" for the I in IDE :P
[10:25:40] DeathCode: like i'm doing it on netbeans
[10:25:58] sevenseacat: so for the third time, if youve got netbeans working, just use that
[10:26:04] sevenseacat: if you dont care about how things actually work
[10:26:07] DeathCode: but its not the latest
[10:26:09] workmad3: DeathCode: or use Aptana studio
[10:26:11] DeathCode: i want to use the latest
[10:26:15] workmad3: (which is eclipse based)
[10:26:20] DeathCode: what is aptana studio and is it the latest?
[10:26:28] sevenseacat: this is painful
[10:26:51] sevenseacat: all im hearing is 'WHY DOESNT RUBY WORK LIKE JAVA'
[10:26:52] DeathCode: ye im very noob sorry :(
[10:27:30] sevenseacat: if you were sorry, you wouldnt ask questions that can be answered with a simple google search
[10:28:09] stefannilsson: hi all! is there someone who can help me with the syntax of adding an item to a Hash object where the key is a variable?
[10:28:16] DeathCode: ok well damn..
[10:28:16] stefannilsson: myhash = Hash.new
[10:28:22] stefannilsson: myhash[mykey] = myval
[10:28:26] stefannilsson: does not seem to work
[10:28:31] sevenseacat: define 'doesnt work'
[10:28:36] canton7: stefannilsson, you're going to have to expand on "does not seem to work"
[10:28:39] stefannilsson: "undefined method `[]=' for nil:NilClass
[10:28:45] stefannilsson: was just about to ;)
[10:28:49] sevenseacat: so myhash isnt Hash.new
[10:28:50] canton7: stefannilsson, what you're actually doing is *not* what you pastied
[10:28:51] jhass: show your real code
[10:28:53] helpa: Please do not use fake values, as they can be confusing or misleading. Sometimes both.
[10:28:56] gregf_: DeathCode: to really learn something in any language try using vim/emacs or some other text editor like textpad.
[10:29:06] canton7: stefannilsson, if you actually tried what you told us you tried, it would work
[10:29:16] sevenseacat: gregf_: as much as i agree with you, thats only going to make the situation worse :P
[10:29:29] gregf_: DeathCode: else we'll end up going round and round in circles ;)
[10:30:03] workmad3: gregf_: have you not already seen that we're on a merry-go-round? :)
[10:30:21] gregf_: workmad3: its merry but it takes you round and round ;)
[10:33:57] gregf_: >> a = Hash.new; a["foo"]= "bar"; a
[10:33:57] eval-in_: gregf_ => {"foo"=>"bar"} (https://eval.in/306388)
[10:34:03] certainty: ACTION started to learn C with Emacs. 
[10:34:07] gregf_: stefannilsson: ^^
[10:34:09] certainty: suddenly i had two problems
[10:34:23] canton7: >> key = 'foo'; a = {}; a[key] = 'bar'; a
[10:34:23] eval-in_: canton7 => {"foo"=>"bar"} (https://eval.in/306389)
[10:34:28] canton7: (closer to his requirement)
[10:34:32] sevenseacat: certainty: lol
[10:34:42] DeathCode: good night guys
[10:35:00] jhass: nooo, I still have popcorn left!
[10:35:04] sevenseacat: well that was fun
[10:35:06] certainty: sevenseacat: :) i ditched C in the long run. I had to pick one problem that i was willing to solve xD
[10:35:07] workmad3: certainty: I think I started with QBASIC using 'edit' on DOS...
[10:35:19] workmad3: certainty: that was... 'fun'
[10:35:42] certainty: workmad3: that seems like a real starter drug. I never did basic. I feel like i've missed something
[10:36:06] certainty: edit is that cat equivalent?
[10:36:26] workmad3: certainty: it's like notepad, only a command-line version based in DOS
[10:36:42] workmad3: certainty: so imagine something much much worse than notepad... with a blue background
[10:36:44] certainty: workmad3: ah ok so not so much like cat
[10:37:11] certainty: workmad3: beautiful
[10:37:19] certainty: i like these vintage UXs
[10:37:59] workmad3: certainty: of course, I'm remembering right back to my childhood here, so my recollection is spotty :) and by 'started', I am of course meaning 'Tried to copy BASIC code listings out of a book that was meant to produce a text-based adventure game"
[10:38:18] wasamasa: apparently eval-in_ does not reply to private messages ._.
[10:38:29] workmad3: certainty: thinking back, I have a suspicion the book actually contained a listing for BASIC on an atari, and I was trying to get it to work on DOS :)
[10:38:38] certainty: workmad3: haha. Sounds familiar.
[10:38:42] workmad3: (it certainly never seemed to work quite correctly)
[10:39:37] certainty: my first program was a C monster telling you how long it would take to brute force a password of a given length.
[10:39:43] certainty: i was a mean hacker back then xD
[10:40:33] certainty: i wonder why it was so big. I know i wanted it to look pretty so i used ncurses
[10:40:39] workmad3: certainty: heh :) I think my first C program was a lottery number generator (so just 6 random numbers printed out on screen)
[10:40:39] canton7: did it brute-force it, then tell you how long it took? :P
[10:41:06] workmad3: certainty: my 8-year-old self wasn't very imaginative... or very good at coding :P
[10:41:13] certainty: canton7: haha, no. It really was most concerned about the UI and a bit about the math, which i had to wrap my head around at that time. It was a tough task for me
[10:41:22] certainty: workmad3: same here
[10:41:54] certainty: of course my next project was an addressbook
[10:42:44] certainty: workmad3: not being very good at coding, seems to have lasted for me.
[10:42:51] certainty: At least im a bit more imaginative these days
[10:43:02] Hanmac: workmad3: last Tuesday Antarctica has +17??C currently outside at my place are +5??C ... i think something is very wrong there ;p http://www.cnbc.com/id/102541217
[10:43:27] workmad3: certainty: I think from about age 10 to age 16, I mostly tinkered with VB and things like prolog/delphi/whatever else came free on CDs with PC Pro :)
[10:43:56] certainty: workmad3: you did prolog too? I've never seen that on cds. But i enjoyed it.
[10:44:23] workmad3: hanmac: hehe :) they seem to have lost all they '-' signs from throughout the article :P only one there is in the title
[10:44:31] certainty: i wanted to build an AI with an natural language interface that would control my computer on my behalt
[10:44:39] certainty: probably a bit ambitious :)
[10:44:50] certainty: behalf, even
[10:45:04] workmad3: certainty: yeah, I played a little when I was younger, and also one of my masters courses @ uni was on logic stuff and I built a simple propositional logic theorem prover in that
[10:45:56] certainty: workmad3: oh i actually did that for university too. Not that it was a task. It just helped with my exercises
[10:49:02] certainty: workmad3: i have not lost interest in logic programming. I've always kept an eye on prolog, mercury and oz
[10:49:27] certainty: i rarely have applications though :/
[10:50:18] Hanmac: very funny would be an AI which does believe thats a real person ;P
[10:50:19] workmad3: certainty: you'd probably like the formal methods group in my uni then :)
[10:51:01] certainty: hanmac: that's the ultimate goal xD
[10:51:04] wasamasa: is it possible to use a refinement on an entire ruby file without encapsulating it in a class?
[10:51:05] certainty: well maybe not
[10:51:06] shevy: hanmac, lookie - the great wall of africa http://www.atlasobscura.com/places/the-great-green-wall-of-africa
[10:51:14] workmad3: certainty: kinda is, especially with AGI
[10:51:20] certainty: workmad3: sounds like it
[10:52:00] wasamasa: "using Refinement; Foo.refined;" works, "using Refinement\nFoo.refined" doesn't
[10:52:04] Hanmac: shevy i already saw that too ... its very interesting, specially if they are pulling water from the oazeans to water that area extras => making more oasis
[10:52:31] wasamasa: at least not in pry
[10:54:05] shevy: are refinements final finally?
[10:54:14] wasamasa: weird, why does it work non-interactively
[10:54:15] workmad3: certainty: at least currently, we (as in humans) seem to associate the idea of 'general purpose intelligence' with a self-reflective capability that would most likely have something recognisable as a self-identity and something we'd recognise as consciounsess... and so by that view would 'believe it is a person' (or at least believe it is an intelligent being)
[10:54:41] wasamasa: if I put it into a file and execute that with `ruby` or `pry`, everything behaves as expected
[10:54:53] wasamasa: but defining the refinement interactively and using it only works as oneliner
[10:55:02] panga: >> puts "hey guys"
[10:55:02] eval-in_: panga => hey guys ... (https://eval.in/306394)
[10:55:08] certainty: workmad3: the question is if that's a worthy goal to achieve in programs
[10:55:46] shevy: I know a ponga and I know a panda, but not a panga
[10:56:00] wasamasa: ponga and panda did the fusion dance
[10:56:12] canton7: someone better explain reproduction to shevy
[10:56:22] ponga: it happens
[10:56:26] ponga: its my alt nick
[10:56:33] shevy: this is hilarious, let me make a screenshot :D
[10:56:50] wasamasa: when a ponga and a panda love each other much...
[10:57:22] wasamasa: a wild PANGA appears!
[10:57:24] shevy: http://shevegen.square7.ch/ponga.png - the colour of your nick even changed :D
[10:57:38] shevy: now it's better to read again, it's the old colour as well
[10:57:46] ponga: shevy: let me keep it too
[10:58:52] ponga: shevy: may i ask what irc client you are on
[10:58:57] ponga: that looks classy and simple
[11:01:08] wasamasa: I wonder whether the behaviour I have is a bug in pry
[11:05:35] hectortrope: Hi all I want to run few set of linux commands using a single script how is it possible in ruby?
[11:05:55] jhass: what did you try so far?
[11:10:06] shevy: ponga I still use xchat, probably one day I will use hexchat
[11:11:00] ponga: shevy: doesn't white background irritate your eyes
[11:11:11] ponga: i prefer black bg and wht fnt
[11:11:40] ddv: shevy: irssi/weechat if you're on linux
[11:11:52] jhass: woah, who kidnapped all your vocals
[11:12:39] ddv: you scare people jhass
[11:13:17] jhass: that's good
[11:13:41] jhass: another irrational fear they can get rid off and feel good about the achievement of doing so
[11:17:01] hectortrope: I usee weechat very colourful :-)
[11:17:24] colorisco: my color theme http://s30.postimg.org/aca8htssx/Screenshot_2015_03_30_14_16_43.png
[11:18:55] certainty: easy to the eys
[11:20:10] shevy: ponga dunno, I sort of got used to it, or perhaps I was just to lazy to switch
[11:21:09] jhass: shevy: doesn't xchat fail to do TLS and is stuck on SSLv3?
[11:21:49] shevy: dunno, do I need that for chatting?
[11:22:26] shevy: that reminds me... on my todo list is to learn C ...
[11:24:19] jhass: you might want it for not sending your password in clear text while connecting ;)
[11:24:57] shevy: what password
[11:25:15] jhass: the one that authenticates you to nickserv/saslserv
[11:25:20] shevy: I don't have that
[11:25:25] workmad3: shevy: for your freenode account, so that someone else can't steal your nick while you're not online :P
[11:25:39] shevy: yeah my nick can be stolen :(
[11:25:49] Mon_Ouie: Don't you guys know why he's no longer on #ruby-lang :p
[11:25:58] shevy: ah, they changed that on #ruby-lang though
[11:26:00] shevy: I can join again!
[11:26:16] shevy: but it's an enemy channel...
[11:26:27] shevy: they use the dark side of ruby
[11:26:33] certainty: Mon_Ouie: he told us that he was too ace for #ruby-lang and so he left xD
[11:26:37] jhass: I have an evil plan btw https://github.com/ruby/www.ruby-lang.org/pull/1039
[11:27:20] shevy: certainty well it kind of sucks that some people are on #ruby-lang, and some on #ruby but not both
[11:27:51] shevy: like hanmac
[11:27:53] shevy: he is only here :)
[11:28:03] shevy: or manveru... he is only on #ruby-lang
[11:29:15] workmad3: shevy: all I'm currently thinking is "mwahahaha, just need to wait for shevy to be offline, then steal his nick!"
[11:29:23] certainty: jhass: let's see how your evil plan goes :)
[11:29:37] jhass: yeah, no reaction yet :(
[11:29:38] shevy: workmad3 I see you need more work assignment
[11:29:47] jhass: I figured it'll at least give some popcorn :P
[11:29:50] workmad3: shevy: I'm waiting for tests to run :P
[11:30:24] certainty: workmad3: i always wondered if that said something, when i would look into irc because i'm waiting for my tests
[11:30:29] certainty: i haven't figured it out yet :p
[11:30:50] workmad3: certainty: probably says that my test runs could do with being faster
[11:30:53] shevy: jhass haha... ah well I guess people don't want to lose the way they are used to use things; like take those who are only on #ruby-lang but not here
[11:31:07] certainty: workmad3: that'd be too obvious
[11:31:11] shevy: they will be ANGRY at you for trying to obsolete them
[11:31:14] workmad3: certainty: or that I need more coffee
[11:31:17] sevenseacat: yeah this should be the official one, im not an op in the other one <_<
[11:31:23] jhass: shevy: note that PR is not closing #ruby-lang
[11:31:30] workmad3: sevenseacat: I'm not an op in either :(
[11:31:48] shevy: sevenseacat cats should be ops anyway
[11:32:16] wasamasa: https://github.com/pry/pry/issues/1402
[11:32:24] workmad3: sevenseacat: yeah, never bothered pushing for it (I think apeiros said I could have them if I asked at one point) :)
[11:32:26] certainty: then she can go to that conference... opsla *scnr*
[11:32:41] shevy: uppsala? isn't that in sweden?
[11:33:00] certainty: shevy: http://en.wikipedia.org/wiki/OOPSLA
[11:33:11] shevy: oh it's spelled differently anyway... http://en.wikipedia.org/wiki/Uppsala
[11:33:20] shevy: lol my eyes...
[11:33:28] shevy: I read "Upssala"...
[11:34:19] shevy: OOPSLA - Object-Oriented Programming
[11:34:24] shevy: they invented OOP?
[11:34:26] workmad3: shevy: just realised something though... "< shevy> certainty well it kind of sucks that some people are on #ruby-lang, and some on #ruby but not both" <-- you're one of the people not in both :P
[11:34:41] shevy: workmad3 yeah!
[11:34:47] shevy: I switched sides
[11:34:48] workmad3: shevy: by extension, you suck :P
[11:34:58] tobiasvl: I'm in both! this is the nicest place
[11:35:04] shevy: I see that you are in both workmad3
[11:35:20] shevy: can you handle the traffic of #ruby-lang?
[11:35:29] certainty: is that the same as the gender thing?
[11:35:33] shevy: hmm and probably you are in #rubyonrails too
[11:35:40] workmad3: shevy: yup... and #chef and #pry :P
[11:35:42] certainty: being #ruby or #ruby-lang or undecided?
[11:35:43] shevy: gender thing?
[11:35:52] shevy: well ok see
[11:35:57] shevy: #python #perl #lua
[11:36:06] shevy: so... #ruby or #ruby-lang! what should it be
[11:36:31] shevy: 1471 folks there, this is scary :\
[11:36:45] workmad3: hmm... #brainfuck or #bf-lang I wonder which one freenode would allow? :)
[11:37:00] shevy: when there are so many people then haskell must be good for something
[11:37:02] jhass: we would break the 1000 mark too if the pals only in #ruby-lang would join us ;)
[11:37:14] certainty: shevy: it's one of the most crowded channels here
[11:37:28] shevy: certainty that scares me even more... I'm gonna idle there now
[11:37:56] certainty: shevy: smart move. chances are that you learn interesting things
[11:38:03] shevy: that wikipedia page about OOP is cool:
[11:38:07] shevy: "Significant object-oriented languages include Python, C++, Objective-C, Smalltalk, Delphi, Java, C#, Perl, Ruby and PHP."
[11:38:25] shevy: you read it there first - php is a significant language. a significant OO language that is
[11:38:46] workmad3: shevy: just because it's on wikipedia doesn't make it true :P
[11:38:47] certainty: so is delphi
[11:38:53] apeiros: workmad3: well, the whole "you could have them" is a lot easier since last week (re ops)
[11:38:58] certainty: where i always thought delphi was the IDE for object pascal
[11:39:29] workmad3: apeiros: heh
[11:39:48] shevy: delphi is that environment for putting together GUI-elements or?
[11:41:07] workmad3: certainty: I thought that was visual-delphi, where delphi was an OO variant of pascal
[11:41:23] certainty: workmad3: i'm not sure. Let's find out
[11:41:43] workmad3: certainty: ok, go and find out ;)
[11:42:09] certainty: 'Embarcadero Delphi is an integrated development environment (IDE) for console, desktop graphical, web, and mobile applications.'
[11:42:12] shevy: workmad3 is very different when he is waiting for tests to finish
[11:42:27] shevy: Embarcadero? mexican delphi?
[11:42:51] certainty: "Delphi's compilers use their own Object Pascal dialect of Pascal and generate native code for several platforms ..."
[11:43:14] certainty: seems at least that article agrees with me. But who can trust wikipedia
[11:43:42] jhass: I trust only the wikipedia articles I wrote myself!
[11:48:55] apeiros: jhass: s/wrote/falsified/ ? :)
[11:49:23] flughafen: according to this, jhass is the rule of the mole people
[11:53:11] shevy: What is the best way to query whether some optional addon is available? Right now I use something like: if Object.const_defined? :MainNamespaceHere but that feels sort of ... hackish
[11:53:38] shevy: flughafen the mole people from the Simpsons?
[11:54:16] flughafen: shevy: http://syracuseguru.com/wp-content/uploads/2011/08/mole+people2.jpg
[11:54:47] jhass: shevy: seems fine, another approach is to define hooks your addon can register itself with
[11:54:48] certainty: funnily enough that's how i imagine shevy
[11:57:18] shevy: certainty kinda
[11:57:28] shevy: certainty but larger and heavier
[11:57:59] shevy: the fingers are rather short too though, I have longer claws and a longer base
[11:58:11] shevy: hmm the simpsons moles would have one finger less
[11:58:16] certainty: shevy: thanks i'm not going to sleep tonight
[11:59:05] flughafen: does shevy have antenna too? certainty ?
[11:59:15] shevy: simpsons molepeople reference: http://goo.gl/N4WjbI
[11:59:16] certainty: flughafen: in my imagination or in reality?
[11:59:24] flughafen: i think it's both
[11:59:41] shevy: but I hate how they changed the simpsons, the drawing/animation looks without love ever since like... season 8 or so
[12:00:21] gregf_: data = { "one" : 1, "two" : 2, "zero" : 0, "foo" : None };print {x : data[x] for x in data.keys() if data[x] == 0 or data[x] } <== in python
[12:00:31] gregf_: data = { "one" => 1, "two" => 2, "zero" => 0, "foo" => nil }; p data.select{ |_, v| v } <== in ruby
[12:00:44] gregf_: just tells you how mental a language the former is :/
[12:01:21] shevy: you can make it a bit shorter if you use symbols
[12:01:27] gregf_: a bug i took 2 hours to debug
[12:01:34] workmad3: gregf_: data = {"one": 1, "two": 2, "zero": 0, "foo": nil}; p data.keys.compact <== ruby 2.2+ ;)
[12:01:39] gregf_: shevy: i know , i know
[12:01:50] workmad3: s/keys/values (sorry)
[12:01:58] shevy: aaah he was working on non-nil entries there
[12:02:22] shevy: in ruby everything has been solved before - but you can not find the solution!!!
[12:03:13] shevy: well I guess all equivalent solutions are quite shortish
[12:03:18] shevy: I don't understand the python code
[12:03:35] shevy: don't they have some advanced select/reject filter?
[12:04:23] certainty: python accepts any small mammal, they reject fruit though
[12:05:20] gregf_: shevy: the problem is in Perl i can do defined $x, there's nothing in python for that. anyways :/
[12:05:34] gregf_: workmad3: thats nice ;)
[12:09:03] workmad3: gregf_: oh, there's a minor deviation in mine... it won't preserve the hash
[12:09:16] banister: workmad3 wassup
[12:09:22] workmad3: gregf_: so the select way is probably better... although you can do p data.select(&:last) if you wanted :)
[12:09:27] gregf_: ah - i needed it to be preserved ;)
[12:10:04] gregf_: workmad3: i know theres many ways :). what i got otoh
[12:10:05] workmad3: banister: not much... waiting for tests to pass, then deploying and having lunch
[12:10:52] certainty: workmad3 thinks the tests will pass. Of course they will fail when the're almost finished
[12:11:04] workmad3: certainty: nah, they just passed ;)
[12:11:15] certainty: have fun with your lunch then :)
[12:11:19] workmad3: certainty: or at least, the smoke tests did, which is all I care about for deploying to the dev server :)
[12:11:26] jhass: workmad3: gregf_ it's also different as in that compact only gets rid of nil, not false
[12:13:33] workmad3: jhass: true... I wondered if I should mention that :)
[12:13:50] workmad3: jhass: then realised my suggestion was wrong in more critical ways ;)
[12:13:56] banister: workmad3 sounds like a crib of lies to me
[12:14:26] workmad3: banister: the deploy is onto precompiling assets :P
[12:15:04] banister: workmad3 yeay work meeting is an hour later now
[12:15:24] workmad3: I hate 47 hour weekends :(
[12:16:15] certainty: workmad3: tweet that to the guys @github
[12:16:51] workmad3: certainty: I would... but my deploy just finished and I'm hungry :P and by the time I've eaten, I'll have forgotten ;)
[12:17:05] banister: github is still kinda laggy but they're doing a good job considering they have the might of china against them
[12:17:50] certainty: banister: btw. is that a fact? i read about china being the source but couldn't find anything substantial that supports that claim
[12:18:39] banister: certainty idk
[12:18:41] banister: just waht i read
[12:18:51] ddv: hi banister :)
[12:19:02] ddv: banisterfiend: still in the netherlands?
[12:19:12] certainty: banisterfiend: alright
[12:21:45] flughafen: one of our servers has 256gb of ram, that's not enough to run the rails app
[12:23:06] ddv: flughafen: scale out?
[12:23:34] flughafen: i'm just making a joke.
[12:24:28] ddv: is it april first?
[12:25:15] flughafen: i mean we do have a serve with 256gb of ram, but i don't have a rails app
[12:25:22] flughafen: ddv: i'm just warmin up
[12:26:27] jhass: oh nice, you can load the OSM data for germany into that, twice even!
[12:27:54] flughafen: ha. i got another with 512
[12:30:42] ddv: we just bought a new rack with 512gigs
[12:30:48] ddv: pretty impressive
[12:31:39] flughafen: ram drive all the things!
[12:35:18] avril14th: Where does the Marshal class name come from?
[12:36:07] jhass: avril14th: it's in core
[12:36:17] avril14th: yeah, butwhy is it call Marshal
[12:36:47] tobiasvl: http://en.wikipedia.org/wiki/Marshalling_%28computer_science%29
[12:37:05] tobiasvl: doesn't explain the etymology though
[12:37:18] tobiasvl: but it's a generic term used in other languages too
[12:38:32] avril14th: weird name indeed
[12:43:56] avril14th: I try to store an object to disk using marshaling
[12:44:09] avril14th: and I have a UndefinedConversion error
[12:44:27] avril14th: will encoding break the marshaling loading process?
[12:44:43] jhass: you need binary encoding
[12:44:59] avril14th: ok, so I need to specify that in the file, right?
[12:45:15] jhass: no, while reading and writing the file
[12:45:19] Trioxin: If I already know PHP inside and out is there any reason I would want to learn rails & ruby? Is it really that much faster development to be worth it if I already have my PHP?
[12:45:48] dorei: Trioxin: i'm pretty sure u'll find your programming nirvana with ruby :)
[12:47:11] jhass: Trioxin: wrong approach IMO. Learning a programming language is always worth it, even if you ain't gonna use it. It always introduces you to some new concepts and approaches and benefit your programming skills in general, regardless of language
[12:48:18] avril14th: jhass: I think I found it. file.binmode is the treat?
[12:48:27] Trioxin: whats the syntax based on?
[12:49:01] jhass: avril14th: you can just specify the encoding as binary really, just like you would set utf-8 or anything else
[12:49:45] jhass: Trioxin: it has some roots in perl and other stuff, but is quote unique and best approached as something on its own
[12:50:20] avril14th: hmm, found that
[12:50:24] avril14th: thanks a lot jhass
[12:50:25] Trioxin: are there good mobile compilers for droid and ios?
[12:51:02] Trioxin: well, any one good framework for that
[12:51:14] jhass: there's stuff like ruboto and rubymotion, though I'm not sure if Ruby is the best tool for that area
[12:51:26] jhass: after all programming languages are tools
[12:51:50] jhass: you can abuse a tool for pretty much any task, yet you perform better if you use the right tool for the right task
[12:53:18] Trioxin: heh i know. I abuse PHP sometimes. javascript is finally getting good mobile implements
[12:53:55] Trioxin: hopefully a full html5 implementation will happen (That works good)
[12:54:05] ddv: PHP is horrible, Trioxin
[12:54:05] certainty: everytime i have to use PHP i feel abused :(
[12:54:16] certainty: have to take long hot showers afterwards
[12:56:45] Trioxin: PHP is not horrible. I've made some wonderful things with it.
[12:57:53] jhass: what do you expect from mentioning PHP in #ruby though :P
[12:58:05] canton7: Trioxin, have you ever programmed in anything better than PHP?
[12:58:15] jhass: we only come up with lovely things like https://eval.in/108854
[13:00:42] Trioxin: that can be improved
[13:02:11] jhass: sure, the problem is that it can happen in the first place ;)
[13:02:53] Trioxin: im sure ruby isn't perfect
[13:02:55] chridal: Hello! What is that alternate synta in ruby for defining a class? I can't find it on google.
[13:03:01] chridal: It is someting like a = class { }
[13:03:02] Trioxin: anyway not really here to talk about php. I watched a video where a PHP coder moved to rails, weighing the pros and cons so figured I might want to know it
[13:03:35] chridal: It's something like defining the class as a proc, and then having the constant A pointing to it
[13:03:39] chridal: anyone know?
[13:04:27] jhass: chridal: well, I give you tip: a class is an instance of the class Class
[13:05:34] certainty: now we go meta
[13:05:53] chridal: B = Class.new {} ?
[13:06:55] helpa: Why don't you try it and find out for yourself?
[13:07:16] chridal: I'm in pry and trying it. Guess I was being to impatient.
[13:07:23] chridal: Thanks for not just telling me how to solve it.
[13:07:26] jhass: certainty: ok. Class is a specialization of Module. classes are modules that you can make instances of
[13:07:38] shevy: certainty you were talking about the snake
[13:08:26] certainty: jhass: i think i didn't know it was that way. thanks
[13:08:27] shevy: http://bash.org/?400459
[13:08:28] certainty: shevy: what snake?
[13:08:32] jhass: Module itself however is a Class
[13:08:37] shevy: <certainty> python accepts any small mammal, they reject fruit though
[13:09:08] certainty: shevy: ah yeah. yes i was :)
[13:10:38] chridal: Also, I am reading through the source of discourse, and I am a bit stuck at this method: https://gist.github.com/christiandalsvaag/960aff7363e638a78cf0
[13:10:43] jhass: >> Class.singleton_class.superclass.superclass.superclass.superclass
[13:10:43] eval-in_: jhass => Class (https://eval.in/306472)
[13:11:08] chridal: I can't understand why they would return true on line 4 there? It doesn't make any sense? Can someone please enlighten me, if you can.
[13:12:11] shevy: code like this is not simple to read
[13:12:42] shevy: for example, what does send(action_method, obj) return?
[13:12:43] jhass: chridal: if there's a method defined for the action, authorization is determined by the return value of calling that method, if there's none defined it defaults to true
[13:12:47] chridal: shevy: I would just believe that they should return false there...
[13:13:29] chridal: jhass: Yes. I just don't understand why it would return true, and not false.
[13:13:40] jhass: it's the default
[13:13:58] jhass: "if there's no special rule, default to granting it"
[13:14:37] chridal: Have you worked with discourse, or are you just inferring it?
[13:15:11] ddv: chridal: you can infer it
[13:15:36] jhass: yeah, inferred it
[13:15:46] jhass: although next time link it on github
[13:15:52] jhass: you can click on the line numbers
[13:15:58] ddv: and jhass probably looked it up on github
[13:16:05] jhass: to get an URL highlighting that line
[13:16:10] jhass: ddv: I didn't :P
[13:16:23] ddv: jhass: ok :-)
[13:16:58] chridal: Been learning so much just by looking through this source. It's an invaluable resource.
[13:17:11] chridal: To be able to look through the source of other projects, I mean.
[13:17:34] ddv: yes reading is harder than writing it
[13:17:54] jhass: hehe, try to read bundlers code
[13:17:57] jhass: (no, don't)
[13:18:02] chridal: is it that bad? :-)
[13:18:32] jhass: it could be better IMO
[13:18:37] ddv: this is why a lot programmers want to start new instead of using an existing codebase
[13:18:58] jhass: especially for being such an essential project
[13:20:21] ddv: provide a pull request. :)
[13:21:11] jhass: I would need a month to understand how the test suite works first...
[13:21:18] ddv: probably :)
[13:21:20] jhass: like it's not even green on my system but on travis
[13:34:08] nerium: Anyone knows a tool for rotating proxies?
[13:35:48] ddv: nerium: haproxy?
[13:36:07] ddv: or maybe I don't understand what you mean with rotating proxies...
[13:36:33] ddv: nice now I can't access github
[13:36:39] nerium: ddv: I was looking for something to handle proxies for me when makeing requests to other servers
[13:36:42] ddv: and back it is again
[13:37:07] nerium: If a proxiy is slow or dead it should be flagged or removed
[13:37:13] ddv: nerium: how are you making the request?
[13:37:20] ddv: nerium: with a browser?
[13:37:26] ddv: nerium: haproxy it is then
[13:37:28] nerium: ddv: Using Ruby, RestClient for example
[13:37:47] ddv: nerium: yeah ok
[13:39:05] nerium: I was thinking about building a database containting the proxies
[13:39:15] nerium: and then flagging them if needed
[13:39:30] ddv: nerium: I would use haproxy
[13:40:47] nerium: ddv: Isnt that suppose to handle ingoing request?
[13:40:50] nerium: Like a server
[13:41:13] ddv: nerium: you direct your ruby program to use the haproxy address
[13:41:32] bradland: haproxy is a monster
[13:41:35] bradland: it can do lots of stuff
[13:41:37] bradland: including HTTP proxy
[13:41:59] ddv: nerium: haproxy takes care of the rest (you need to configure haproxy of course)
[13:42:08] nerium: Aha, cool
[13:42:27] nerium: ddv: Do I provide HAProxy with a list of proxies then?
[13:42:41] bradland: are you proxying to proxies?
[13:43:02] ddv: :confused:
[13:43:18] nerium: I need to make a request to server A trough any proxy B..Z
[13:43:40] nerium: Any proxy in B..Z might be dead or slow
[13:43:44] ddv: nerium: you can do that with haproxy
[13:43:46] nerium: I need to handle this in some way
[13:44:08] nerium: ddv: So do I provide a list of proxies to HAProxy?
[13:44:10] ddv: nerium: haproxy has various scripts to determine the health of a backend server (proxy)
[13:44:14] ddv: nerium: yeah
[13:44:50] ddv: you could write in ruby too tho if you want
[13:45:16] ddv: you also need to make your haproxy redundant with something like vrrp
[13:46:33] certainty: jhass: i think i didn't know it was that way. thanks
[13:47:03] chridal: I'm in the discourse source again, now reading their specs. I can see that they are using 'xhr' to test everything in their controllers, instead of just using get, post etc. https://github.com/discourse/discourse/blob/master/spec/controllers/groups_controller_spec.rb
[13:47:14] chridal: Is there some reason I should be consdering the same thing?
[13:49:22] ddv: chridal: I guess it's just a method that is provided by some testing lib
[13:49:43] jhass: chridal: it's not the same thing
[13:50:01] jhass: http://api.rubyonrails.org/classes/ActionController/TestCase/Behavior.html#method-i-xhr
[13:50:05] jhass: look at the source of it
[13:51:16] chridal: Aha. So the reason they are doing it, is beause they are actually expecting the user to submit the request via Ajax.
[13:51:27] chridal: I thought they were just using Ajax because of speeding up the tests, or something like that...
[13:52:42] yh: Tangentially Ruby related - working with the Ruby SDK for AWS's DynamoDB at the moment. Any DynamoDB gurus around?
[13:53:09] yh: In the interests of disclosure, I asked in ##aws (it's a pretty tumbleweedy channel) - I won't elaborate on the full question here without invite as it's a slight tangent from Ruby itself :)
[13:53:39] gregf_: i've been warned about using that db :/
[13:54:26] yh: gregf_: I've enjoyed success with it. Why advised against it? It's pretty awesome in many ways
[13:55:00] yh: At the same time, my concern in this case is that I don't want to throw an inappropriate problem/workload at it :)
[13:55:18] gregf_: yh: dunno tbh. we've kinda found others better. like so, replacing sqs with rabbitmq too
[13:55:55] yh: gregf_: ah, why RabbitMQ over SQS?
[13:56:07] yh: I've used both. A previous project was RabbitMQ as it was so high-traffic, that SQS would have cost a bomb.
[13:56:08] ericwood: erlanggggggg
[13:56:16] yh: ericwood: details. :)
[13:56:56] ericwood: I wholeheartedly support anything that takes advantage of the erlang VM
[13:57:17] yh: I wholeheartedly support anything that negates that ancient need for a VM.
[13:57:22] yh: But erlang is pretty cool nonetheless
[13:57:39] ericwood: wait what's so bad about a language that uses a VM?
[13:57:49] ericwood: Ruby and most scripting languages run on one
[13:58:08] yh: You mean the JRuby implementation specifically, right?
[13:58:31] ericwood: no, Ruby itself
[13:58:49] ericwood: YARV, specifically
[13:59:14] yh: Perhaps I'm jaded by the JVM in particular
[13:59:16] ericwood: a VM is just an abstraction layer, not to be confused with what you're used to with the JVM stc
[13:59:39] ddv: yh: the jvm is actually pretty awesome, clojure, jruby all use it
[13:59:51] ericwood: yeah, the JVM is very kickass
[14:00:04] yh: I understand the JVM to be rather ugly on the lower-level
[14:00:06] ericwood: but when I say "erlang VM" I'm referring to something along the likes of YARV, not the JVM
[14:00:15] ericwood: no, JVM bytecode is fairly elegant, actually
[14:00:15] yh: But more importantly to me, it's slow as hell
[14:00:37] ericwood: the JVM performs exceptionally well, I don't know what you're talking about :o
[14:00:48] yh: More specifically: start-up time
[14:00:56] ericwood: neglegible for real-world usage
[14:01:06] ericwood: and there's tools like drip to fix that
[14:01:15] ddv: yh: it only becomes an issue if you're the next facebook or twitter
[14:01:46] yh: Colleagues of mine told me vaguely that there was some sort of problem (for them) in using drip
[14:02:12] yh: And what I'm talking about isn't negligible or niche - surely everyone likes a nice tight feedback loop
[14:05:05] ericwood: I did a ton of Rails work with JRuby, restart time was hardly an issue
[14:05:23] ericwood: and when it comes to actually using stuff on the JVM outside of dev you're rarely restarting it
[14:05:59] ericwood: honestly, even when doing Rails dev with it I was rarely restarting...only when doing routes work really
[14:06:17] ericwood: but anyways I don't think startup time is a good reason to avoid the JVM
[14:06:37] ericwood: I forget the name but there's another tool along the lines of drip that works really well
[14:06:44] yh: ericwood: it's on the tip of my tongue also
[14:07:14] yh: ericwood: were you not periodically running `bundle exec rspec` as a Rails dev (and thus wasting precious seconds waiting for JVM, when MRI would have already completed)?
[14:07:55] ericwood: I typically was running tests on our CI machines, so it wasn't a huge painpoint but it definitely wasn't the greatest for that
[14:08:05] ericwood: but the benefits of using it overshadowed any of those small gripes
[14:08:18] yh: If you're not running specs locally, I can see why the gripes would be small for you
[14:08:28] yh: Also: nailgun - was that what you were thinking of?
[14:08:36] ericwood: ah yeah that's it!
[14:09:00] yh: ericwood: were you not TDDing?
[14:09:08] ericwood: not strictly, no
[14:09:22] yh: Meh, I'm not strict either; but close enough to want to run specs locally periodically
[14:09:28] ericwood: I'd run tests locally when writing them, but for catching regressions it was all on the CI stuff
[14:09:34] yh: oh, totally
[14:09:39] ericwood: our test suite took a good 30-45 min to run, soooooo
[14:09:44] ericwood: gigantic crufy rails app
[14:09:51] ericwood: not one of those sleek brand new ones :\
[14:10:02] ericwood: ...I will not miss it
[14:10:06] yh: which brand new ones do you mean, framework-wise?
[14:10:37] ericwood: I just mean newer growth, like only being a few years old
[14:10:43] shevy: your beard?
[14:10:52] yh: ah, I see.
[14:10:55] ericwood: not a gigantic monolith written poorly and upgraded over the course of 7 years up from rails 1
[14:11:27] yh: I'm a Ruby dev at the moment - I write Rack/Sinatra apps. But I understand that to be a minority given Rails
[14:11:30] ddv: do you have a baby face, shevy?
[14:11:31] ericwood: a lot of early rails practices kinda encouraged bad stuffs
[14:11:36] yh: Not sure if I would hate going to a Rails place or not.
[14:11:43] ericwood: modern rails is great
[14:11:51] yh: That's promising
[14:11:58] workmad3: yh: would kinda depend what you spent a lot of time on in your sinatra apps
[14:12:07] ericwood: working on a two year old rails app right now, if you pay attention to code quality and structure things right it's wonderful
[14:12:11] shevy: ddv yeah, I don't have a fancy beard :(
[14:12:44] workmad3: yh: and what sort of activities you would dislike doing :)
[14:12:45] yh: ericwood: if I was looking at a couple of Rails jobs, are there any particular signs that'd highlight if it's a modern one or not, per se?
[14:12:46] ericwood: tl;dr use engines and try to break things out into services
[14:12:58] ericwood: yh: age of the company, competency of their devs :P
[14:13:10] ddv: microservices is all the rage these days
[14:13:11] workmad3: yh: whether they ask for rails 2 experience
[14:13:23] ericwood: I found that having code reviews and using a pull-request model of development keeps things sane
[14:13:29] yh: I loves me microservices.
[14:13:31] ericwood: old job you just throw stuff out willy-nilly
[14:13:46] ericwood: rails engines are great, though not exactly micro-services
[14:14:01] yh: yeah, I was about to inquire into that, never heard of a rails engine
[14:14:06] ericwood: but yeah rails these days is great
[14:14:11] yh: google results look satisfying
[14:15:26] yh: ericwood: job market for modern Rails looking pretty good at the moment, would ya say?
[14:15:39] yh: You bring me much promise
[14:15:48] ericwood: if you're in the NYC area we're hiring
[14:15:56] yh: London, myself
[14:16:11] ericwood: that's a bit of a commute
[14:16:22] workmad3: ericwood: you don't allow remote work? :P
[14:16:24] yh: My understanding of the Rails situation was: always monolithy, don't go near. I'm glad it sounds better now
[14:16:46] ericwood: workmad3: nope, although I know that's grounds for being hated on these days :\
[14:17:07] yh: In fact it's worried me, because I love Ruby - and if it was true that all the Ruby jobs were done in a framework that I hate, it'd force me to pick another language that I don't like so much :/
[14:17:11] yh: I'm very picky
[14:17:21] ericwood: we're still a fairly small team and don't really have the infrastructure in place to do it right
[14:17:35] ericwood: plus we like to all be together, there's seriously something to be said for that
[14:17:38] workmad3: yh: tbh, 'standard' rails approaches to problems do still tend towards large, monolithic apps... but the community is a lot better now at recognising that and breaking out of the standard mold when it makes sense
[14:18:03] yh: ericwood: shame you're so far. We clearly have that ideal in common
[14:18:16] workmad3: yh: so if you're in a team with decent devs, you can take advantage of a lot of niceness from rails and break out of the mold in the places you need to
[14:18:16] yh: It surprises me how little I see some dev teams communicating.
[14:18:19] jokke: hi, i need some help with rack-oauth2-server
[14:18:30] jokke: it seems like Server.options does not set defaults
[14:19:21] jokke: Server.options[:collection_prefix] for example is nil in client and so it tries to get a collection starting with a period
[14:20:12] workmad3: yh: as ericwood can attest though, there are still quite a lot of legacy apps out there that fell foul of older practices without spotting the danger signs ;)
[14:21:04] yh: workmad3: I don't think I could turn up for work if it was in an environment like that
[14:21:38] ddv: actually you want to be in a team where everyone is better than you
[14:21:43] yh: ddv: totally.
[14:21:50] yh: I'm just not a good enough developer to work in a bad codebase.
[14:22:35] workmad3: yh: it's actually quite surprising how quickly an observant coder committed to self-improvement becomes a good coder when you dump them into a bad codebase ;)
[14:22:51] ddv: yep people rather write new stuff instead of dealing with stuff written by others years ago
[14:23:07] yh: workmad3: I've been in a bad environment before, and came to a good one. That made me realise how large the spectrum between good & bad is - and that there's always better
[14:23:37] workmad3: yh: sure, a bad environment is very different from a bad codebase though
[14:23:54] yh: workmad3: well... there was a correlation in that instance
[14:24:32] ericwood: I will say, working on that app put hair on my chest and seriously improved the way I structure code
[14:24:45] ericwood: you catch yourself early on with bad habits
[14:25:12] ericwood: "oh yeah I'll just dump that here" wait a minute I remember what happened when that got out of hand, let's do it the right way early on
[14:25:26] ddv: there are lots of developer that don't even know if they are doing something wrong, if you work with b players all the time you start to think you're good
[14:25:52] ddv: but when you start to work with the a players you suddenly realize you have a lot to learn still
[14:25:56] ericwood: having others look at every single line of code I submit for a pull request has been amazing :D
[14:26:13] ericwood: we have some people that know rails waaaaaaaay better than me
[14:31:45] workmad3: ddv: yeah... I've been in the position of being the only dev on a team for quite some time... which means I've mostly been checking myself against people on IRC :P
[14:33:09] yh: ericwood: trouble is, I don't know Rails too well. But I'm pretty good with design
[14:33:24] yh: I see far too many listings asking for <x> experience in Rails, specifically
[14:36:00] Ove___: Can anyone recommend some good articles about tuning ruby's GC?
[14:36:14] Ove___: Which authours to believe and which not to listen too.
[14:36:45] yh: ericwood: my team is really meticulous with review just like yours. Our teams sound v similar. Even still, it seems quite hard to measure which level everyone is at against the wider world: as in, who/what *actually* consistitutes the A-players
[14:36:59] Ove___: Also, I am well aware of that no one setting fits all projects, but that they are uniqe in it's settings etc.
[14:37:19] yh: Maybe we are those people, maybe we're way off. I'd love a way to comparably assess
[14:37:26] ddv: workmad3: :)
[14:37:34] ddv: yh: fake it till you make it
[14:37:38] workmad3: Ove___: I'm currently chuckling over the fact that you're asking strangers on IRC who to trust on articles ;)
[14:38:22] Ove___: Well, someone ough to know more about gc tuning than the other etc.
[14:38:37] Ove___: I'm not a developer and thus knows nothing about Ruby. :P
[14:38:48] Ove___: Hence I need to learn which people are to be trusted.
[14:38:48] workmad3: Ove___: sure... but you're then trusting our view on that subject rather than your own... and you don't know if our view is trustworthy :P
[14:39:02] ddv: You can trust me. :)
[14:39:14] workmad3: ^^ anyone uttering that isn't trustworthy ;)
[14:39:52] Ove___: So no good reads etc?
[14:40:14] workmad3: Ove___: basically, I can understand why you're asking the question, but I'm chuckling because you're in no more of a position to rate *our* trustworthiness on the subject than you are to rate the original article authors ;)
[14:42:27] Ove___: I'll just go ahead and trusting everyone then.
[14:43:16] Ove___: BVut from what I've come to understand it might be a good idea to create a heap size big enough to host all of the initial objects.
[14:43:25] Ove___: Or have I misunderstood anything?
[14:57:48] Sweeper: hey when I raise inside a rescue, will that raise be caught by subsequent rescues at the same level?
[14:58:36] ddv: sweeper: hey have you tried?
[14:58:54] Sweeper: ddv: shhh >.>
[15:03:50] nerium: How did I talk with before about HAProxy? My laptop dies :(
[15:12:03] gregf_: >> def foo; begin begin; raise Exception, "Foo!"; rescue Exception => e; raise e;end; rescue Exception => e; e.message;end;end; foo();
[15:12:04] eval-in_: gregf_ => "Foo!" (https://eval.in/306524)
[15:12:29] gregf_: sweeper: ^^ looks far too ugly code tho :/
[15:14:59] Sweeper: >> def foo; being raise Exception, "foobar"; rescue Exception =>e; raise e; rescue Exception => e; puts 'got it';end; foo();
[15:14:59] eval-in_: sweeper => foobar (Exception) ... (https://eval.in/306525)
[15:17:14] gregf_: sweeper: if you;re going to rethrow the same exception why rethrow it? :/
[15:17:38] pagios: is there any element in ruby that allows me to store 100points and then start overwriting the old ones? like a series
[15:17:50] pagios: like fill 1..100 and then start again
[15:18:13] Sweeper: like a circular buffer? :3
[15:18:51] GaryOak_: pagios: an array would work to, just keep track of the index
[15:18:53] pagios: like you have this bugger filling all the time, and every now and then you return it you are sure the last 100 points are returned
[15:19:53] gregf_: sweeper: def foo; begin raise Exception, "foobar"; rescue Exception =>e; raise e; end; end; begin; foo(); rescue Exception => e; puts "got it";end
[15:20:48] jhass: gregf_: sweeper btw never rescue Exception, the default is RuntimeError for good reason
[15:21:30] gregf_: jhass: i know ;). that was a sample
[15:21:42] Sweeper: yea, been bitten by that far too many times :)
[15:22:11] jhass: pagios: not aware of anything inbuilt but, but writing a small wrapper around Array should be easy and fun
[15:22:44] jhass: I guess the term you're looking for is ring buffer
[15:28:14] pagios: i have an element being changed in ruby and being returned when requested by sinatra, is there any chance that sinatra returns the element when it is being "changed" like null? or that is considered an atomic operation so that it returns old or new value ?
[15:28:46] pagios: like when the request happens when the value is being changed
[15:29:33] jhass: too vague to yes or now that question
[15:29:43] jhass: er, "or no"
[15:30:19] pagios: thelement is an array being changed by ruby (replaced)
[15:31:47] jhass: in MRI Array operations can be considered atomic, if "change" however means a series of array operations (.pop + .shift for example), that change is not atomic
[15:32:46] pagios: so if it is in between the .pop and shift
[15:34:14] shevy: pop it, shift it, pop it, shift it
[15:34:43] jhass: now Array is shevy's new favorite class
[15:35:13] ericwood: yh: rails isn't too hard to learn if you're already into ruby; the only tricky part is figuring out all the conventions
[15:35:31] ericwood: yh: but if you're on a team that's doing code review it falls into place pretty quickly
[15:37:05] pagios: jhass: can i return the "last 100 points of an array" ?
[15:37:26] jhass: .last(100)
[15:37:35] pagios: the array is filling but sometimes i might be at length 80
[15:37:44] jhass: >> [1, 2].last(100)
[15:37:44] eval-in_: jhass => [1, 2] (https://eval.in/306534)
[15:37:50] pagios: perfect :)
[15:38:00] pagios: thats like a buffer series
[15:38:05] pagios: ring buffer
[15:38:10] jhass: not really
[15:38:29] pagios: except that the array is growing
[15:38:35] jhass: exactly ;)
[15:38:41] jhass: so it's not a ring buffer at all :P
[15:42:40] yh: ericwood: that's promising. I'm probably going to read The Rails 4 Way (don't know if that comes recommended)
[15:48:21] ericwood: I'm sure it couldn't hurt!
[15:48:55] kstuart: yh: there's also the ruby on rails tutorial, if no one's mentioned it already.
[15:49:04] kstuart: https://www.railstutorial.org
[15:49:16] ericwood: the railsguides are really well-written and I highly recommend reading every single one
[15:49:54] ericwood: the one on security is amazing, too, and one of the better introductions to general web security I've seen :D
[15:50:06] ericwood: they include examples of real-world stuff and it's fascinating
[15:56:00] yh: I'll no doubt read through those ericwood :)
[15:56:20] yh: Should I ever be applying to Rails jobs in future, I'll be reading the shit out of it before hand
[15:57:17] yh: A practice I've adopted which seems effective is: if there are any foreign technologies at a place I go to work, read (at least) a book on it
[15:57:52] jokester: yes that's a good idea
[16:11:52] pagios: is there a way to bind to a ruby program and issue realtime commands, like check the current values on an array and its length?
[16:11:59] pagios: like realtime querying a ruby program
[16:12:44] pagios: you have a ruby program running, you connect to it somehow and you issue realtime commands to check the current arrays etc
[16:12:54] pagios: like sql for example
[16:13:11] pagios: thinking out loud
[16:13:15] jhass: pagios: not unless the program is prepared for that
[16:14:13] jhass: pry-remote is one thing to look into
[16:14:48] pagios: SebastianThorn: yes irb on a ruby software
[16:14:52] pagios: application*
[16:18:08] SebastianThorn: pagios: pry, or thread your application and just it in tmux/screen
[16:18:20] SebastianThorn: the later might be a bad idea, not sure
[16:19:56] bingoDLA: hi all, i have a question about the whenever GEM, is there a way to run some job in schedule.rb and return that result to a variable to be used by myapp.rb?
[16:23:13] bingoDLA: yes no maybe ? :)
[16:23:30] centrx: bingoDLA, I would have the job store a value in the database to be read by the app, but that's when already using a database
[16:24:07] helpa: Describe your goal, not the solution you imagine.
[16:24:10] bingoDLA: centrx: i dont have a database, i just want to use that variable in my rb file :) cant i include the schedule.rb?
[16:25:01] bingoDLA: ok so i have a query happening every 1h and fetching data from some third party system, i would like to store that query in a variable and use it in my code
[16:25:27] jhass: I'm sorry but that doesn't make much sense
[16:25:41] romking: Can anyone point me in the right direction to parse this log file? http://pastebin.com/JAzjfdL9 I want to capture it by hash sequence type, where a sequqnce is ID-A-- through ID-Z--
[16:25:57] centrx: bingoDLA, If you're fetching data from a third-party system every hour, you probably do want to store that data in a database
[16:26:16] bingoDLA: centrx: not really the data is volatile
[16:26:19] jhass: bingoDLA: so you run some script with whenever that fetches something regularly and then want to do some processing to it. Why don't you just put the code for processing it after the fetching code?
[16:26:23] centrx: bingoDLA, If you want to run your code after the query, put the query in the code
[16:27:23] bingoDLA: jhass: centrx the whenever gem has a scheduler.rb file that can contain the at commands, can i use the at commands in my myapp.rb?
[16:28:09] jhass: you put the query and processing the result together
[16:28:22] jhass: I don't know how you imagine this to work
[16:28:27] centrx: bingoDLA, As I understand it, whenever deploys cron jobs, those cron jobs are run by the OS
[16:28:32] bingoDLA: exactly that s my problem, i want to use the code in my schedule.rb (my variable) in myapp.rb as a variable :)
[16:28:42] centrx: Why? That doesn't make sense.
[16:29:12] bingoDLA: centrx: you get data using cron and you store them in your app
[16:29:20] centrx: What kind of app is this?
[16:29:20] bingoDLA: thats the simplest example
[16:29:30] bingoDLA: i want to fetch data every 1h abd stre that data ub ny aoo
[16:29:33] centrx: Data is typically stored in a database or data store
[16:30:11] bingoDLA: lol why does it look so complicated :)
[16:30:45] bingoDLA: goal: fetch data every 1h and return in a variable to be used by ruby app
[16:31:10] centrx: Why can't you have your ruby app fetch the data and use it
[16:31:33] bingoDLA: centrx: coz i need to do this every 1h and i understand that i need a cronjob for this
[16:31:48] jhass: what is your app doing?
[16:31:58] bingoDLA: is there any .every hour in ruby other than this whenever
[16:31:58] jhass: you're still not describing your actual goal
[16:32:23] jhass: what is this data? what do you do with it?
[16:32:25] bingoDLA: every 1h i want to get data and when a client requests it i want to serve it from ruby
[16:32:45] bingoDLA: data is forex echange stuff
[16:32:48] centrx: bingoDLA, put it in a database
[16:32:48] jhass: then you need to save it somewhere
[16:32:58] jhass: preferably a database, yeah
[16:33:15] bingoDLA: i save it in a variable
[16:33:29] bingoDLA: its only 1 variable at the end
[16:33:38] bingoDLA: USD:5 for example
[16:34:12] bingoDLA: if ruby crashes no big deal, the app restarts and the value is fetched again
[16:34:16] bingoDLA: why do i need a DB
[16:34:37] bingoDLA: i am already fetching from a db
[16:35:24] centrx: It sounds like you have some data to store, that's all
[16:35:47] jhass: your cronjob and your webapp are separate processes
[16:35:54] centrx: You can pass data between processes by interprocess communication or files too
[16:35:58] jhass: that they both use Ruby doesn't matter
[16:38:59] bingoDLA: jhass: can i run something every 1h from inside my app?
[16:39:52] jhass: sure, for example you could store a timestamp of the last fetch and check whether to fetch the new value or return the cached one based on that
[16:44:12] bingoDLA: jhass: or i can use a sleep of 3600?
[16:44:45] jhass: if you run a background thread and properly synchronize the access to the shared data, sure
[16:47:46] bingoDLA: thanks jhass now i understand that the whenever is mainly a seperate thing, like a crontab for ruby with a scope being schedule.rb
[17:25:09] shevy: OptionParser will handle only arguments that have -- or - right?
[17:47:29] Senjai: Morning ruby
[17:52:19] GaryOak_: shevy: I think it's configurable
[17:56:09] shevy: I am scared by its docu
[17:56:15] shevy: I think it is time to use something else
[17:57:10] pipework: shevy: Try documentation.
[17:57:18] pipework: It's the more mature and fully-formed sibling of docu.
[17:57:46] jhass: no time, must ship code!
[17:57:49] GaryOak_: shevy: have you seen slop?
[17:58:16] path[l]: Hi. I???d like to get some help with handling concurrency in my app. Has anyone here used concurrent-ruby?
[17:58:57] pipework: path[l]: Have you also looked at celluloid?
[17:59:01] pipework: Or other ruby implementations?
[17:59:40] path[l]: pipework: I did, I have a feeling celluloid will not solve my problems (at least from a cursory reading), but I wonder I dont know about some of its abilities
[18:00:06] jhass: ask you actual question, maybe it can be answered without having any clue of the gem ;)
[18:00:11] path[l]: sounds good
[18:00:16] path[l]: Currently my system is a pretty simple one that spawns 3 threads which operate in a producer/consumer fashion. The first thread runs through a bunch of files on the filesystem and scans and hashes them, it puts the hashes into a queue, the second picks items from the queue and speaks to an external server on some custom protocol. That server only allows a single instance to be logged in at a time (hence I have this running on a single
[18:00:17] path[l]: queue), once it gets a response from the server it puts this in yet another queue which then picks up items from this and does some simple file system operations (such as renames and creating symlinks).
[18:01:09] jhass: aka pipeline ;)
[18:01:11] pipework: path[l]: Seems pretty sane and normal. I'd consider digging into celluloid for the actors on that then.
[18:01:34] path[l]: so let me talk about why I???m not sure how to solve my new problem with actors
[18:01:35] pipework: But I haven't looked at concurrent-ruby since the last time I recall seeing it on HN and wondering what people are doing.
[18:02:45] path[l]: I now have something new I???m trying to accomplish. The third thread, when its processing the final results, might discover that the file its trying to process (rename) is replacing another identical one. In which case it needs to scan the copy it found and speak to the external server. It can then resolve between the two files. The newly renamed one and the one that was originally provided to process
[18:03:01] path[l]: so I want to be able to submit a new job to the pipeline, but at a higher priority
[18:03:24] path[l]: I???ve not seen anything in the actor system that allows me to pre-empt existing messages with a high pri message
[18:04:03] GaryOak_: use a priority queue
[18:04:25] pipework: path[l]: That'd definitely be something you'd have to handle yourself.
[18:04:50] agarie: There's a priority queue implementation in https://github.com/kanwei/algorithms
[18:04:52] path[l]: yeah thats what I was thinking (there is one in the concurrent-ruby implementation). However, in my new requirement, the result from the process also goes to a different place. So I was thinking of making use of a priority queue and promises
[18:05:02] path[l]: both of which are present inside concurrent-ruby
[18:05:25] jhass: I don't think you need a promise
[18:05:31] pipework: Ah, whale I haven't looked much into concurrent-ruby myself. It might have what you need.
[18:05:43] pipework: The promises seem neither here nor there in this situation.
[18:05:49] jhass: you simply abort the job and queue a new one
[18:06:09] jhass: it's ruby, you can easily queue different types of jobs
[18:06:36] path[l]: hmm ok, let me think about that. Thanks :)
[18:55:12] shevy: guys, style question
[18:55:14] shevy: case variable
[18:55:20] shevy: when /a/,/b/,/c/
[18:55:24] shevy: when /a/, /b/, /c/
[18:55:27] shevy: which one to use?
[18:55:53] jhass: when /a|b|c/
[18:56:08] jhass: but to actually answer the second
[19:07:46] jhass: DeBot: !hangman ruby
[19:07:46] DeBot: ?????????????????????????????? [] 0/12
[19:07:54] havenwood: shevy: or live a little: Regexp.union(/a/, /b/, /c/)
[19:07:59] shevy: http://distrowatch.com/weekly.php?issue=20150330#community
[19:08:03] c_nick: in my ruby code i am getting an Application.Excel Object using Win32Ole.. but it crashes sometimes for Insufficient Memory not available
[19:08:16] shevy: it is 30.03.2015
[19:08:17] jhass: shevy: yeah, they're way too early :(
[19:08:18] shevy: so first april
[19:08:31] jhass: shevy: look into the issues list of the repo ;D
[19:08:37] shevy: but this makes me mad, now they want to EXTEND first april to OTHER DAYS
[19:09:14] shevy: I think I will file bogus reports to systemd just to keep them busy
[19:09:33] shevy: and boycott first april sites
[19:09:57] shevy: ok so you guys did not answer the style question
[19:10:01] shevy: I will go with ", "
[19:10:06] havenwood: shevy: i concur
[19:10:06] shevy: seems to be easier for my poor eyes
[19:10:12] havenwood: shevy: it's the right choice
[19:10:21] havenwood: shevy: jhass answered :P
[19:10:37] shevy: he did not even use a ,
[19:10:44] shevy: so he is right, that is actually the superior variant :)
[19:11:01] jhass: "but to actually answer the second"
[19:12:28] shevy: the bot talks gibberish
[19:12:50] jhass: the bot is not the issue
[19:12:54] jhass: DeBot: #:_
[19:12:54] DeBot: ?????????::??????_?????? [#] 1/12
[19:13:00] shevy: more gibberish
[19:13:27] DeBot: ?????????::??????_?????? [#v] 2/12
[19:13:37] DeBot: D??????::??????_???d [#v] 2/12
[19:13:40] jhass: DeBot: rb
[19:13:40] DeBot: DRb::??????_???d [#v] 2/12
[19:14:12] DeBot: DRb::??????_id [#v] 2/12
[19:14:36] shevy: http://shevegen.square7.ch/BOT.png
[19:15:11] jhass: shevy: http://cloud.aeshna.de/u/mrzyx/screenshots/screenshot_20150330_211456.png
[19:16:42] shevy: that's gibberish too!
[19:17:02] shevy: it looks arabic if you go away from the monitor
[19:17:42] jhass: well, suggest a better replacement character
[19:18:02] eam: snowman
[19:18:08] jhass: havenwood: you're the DRb expert here, no idea what kind of id that is :P
[19:18:27] jhass: eam: shevy can't see the snowman either
[19:19:01] eam: https://www.youtube.com/watch?v=5xGEMyn4DKY
[19:19:29] DeBot: DRb::to_id [#v] 2/12 You won!
[19:19:55] jhass: hah, that's to easy for me :P
[19:20:31] havenwood: jhass: i think http://ruby-doc.org/core-2.2.1/BasicObject.html#method-i-__id__
[19:21:04] havenwood: yeah, looks like it checks front for that object_id
[19:23:11] havenwood: jhass: i'm more of a DRb enthusiast than expert :P
[19:23:41] jhass: I think you're an enthusiasm expert actually :P
[19:24:03] jhass: yeah, totally a good thing!
[19:24:23] jhass: havenwood: Crystal is on /r/programming btw
[19:24:30] havenwood: jhass: i upvoted
[19:25:00] jhass: gotta love reddit how it instantly ended up in a fight with one party deleting their account :P
[19:26:08] jhass: shevy: http://www.reddit.com/user/shevegen is that you? :P
[19:26:14] eam: <angry reply based on a misunderstanding>
[19:27:00] ght: Question: Anyone using ActiveSupport::TimeZone objects familiar with trying to determine "every Monday"?
[19:27:12] ght: For example, we are building a product that is to pay people every monday.
[19:27:22] ght: We are trying to determine every Monday. Any thoughts on this?
[19:28:33] jhass: every monday in what time span?
[19:28:44] shevy: jhass yeah
[19:28:52] ght: Well, a given month really. We need to determine each monday in a month.
[19:29:01] ght: Basically write a "is today a monday" check
[19:29:21] jhass: Date.today.wday == 1 or whatever the value was
[19:29:35] momomomomo: >> Date.today.wday
[19:29:35] eval-in_: momomomomo => uninitialized constant Date (NameError) ... (https://eval.in/306617)
[19:29:43] momomomomo: ah right, active support
[19:29:52] momomomomo: then what the deuce
[19:29:56] jhass: >> require "date"; Date.today.wday
[19:29:56] eval-in_: jhass => 1 (https://eval.in/306618)
[19:30:06] momomomomo: >> RUBY_VERSION
[19:30:07] eval-in_: momomomomo => "2.2.0" (https://eval.in/306619)
[19:30:19] jhass: that's not new or changed ;)
[19:30:41] gr33n7007h: >> Time.now.monday?
[19:30:42] eval-in_: gr33n7007h => true (https://eval.in/306620)
[19:30:57] jhass: haha, just wanted to point out
[19:31:25] jhass: ght: so classic xy or is there another catch? ;)
[19:31:40] bradland: dats a fresh looking IRC setup you got there jhass
[19:31:49] bradland: is that a pimped out irssi session?
[19:32:05] ght: ahh, so date.today.wday == 1 always works?
[19:32:06] jhass: bradland: weechat with official "make it pretty guide" + color nicks script
[19:32:18] jhass: ght: yeah
[19:32:39] jhass: bradland: oh and a custom same_nick prefix thingy
[19:32:40] cr3: hi folks, is there a clean way to look for keys from keys from keys of a hash where the first might not be there, like foo['a']['b']['c'] where 'a' might not be in foo? in the end, I just want nil if 'c' is not there or the value if it's there.
[19:32:54] ght: Brilliant, thank you, must have missed the now.wday method in the documentation
[19:33:11] ght: or the wday method as it were.
[19:33:25] jhass: ght: also note there actually is a monday? as gr33n7007h pointed out
[19:34:28] ght: I love Ruby.
[19:34:33] ght: Thanks guys, appreciate the help.
[19:34:45] jhass: cr3: I'd just value = foo['a']['b']['c'] if foo.has_key? 'a' in that case
[19:35:15] cr3: jhass: what if 'b' is not there? in python, I might do foo.get('a', {}).get('b', {}).get('c')
[19:35:41] jhass: cr3: you didn't say so ;P
[19:35:54] jhass: Ruby has get too, it's called fetch
[19:36:13] jhass: replace get with fetch and what you wrote is valid ruby
[19:36:28] cr3: jhass: yeah, I couldn't come up with a clear way to ask but I think you hit the nail on the head :) I was looking at {}.methods and didn't notice fetch, thanks!
[19:40:06] naftilos76: Hi i am trying to use IPSocket.getaddress(domain) after doing require 'socket' in one of my controllers. It works fine in my home laptop. It also works in my vps if i try in IRB but it does not work in my rails website . That is weird. Can anybody have a guess?
[19:40:48] maasha: What does it take to ensure that a temp dir created with Dir.mktmpdir is removed?
[19:41:06] naftilos76: The same rails controller that does not work in my vps works fine in my home laptop
[19:41:16] jhass: naftilos76: no, nobody can help you with "does not work"
[19:41:39] havenwood: maasha: "If a block is given, it is yielded with the path of the directory. The directory and its contents are removed using FileUtils.remove_entry before ::mktmpdir returns. The value of the block is returned."
[19:41:41] jhass: maasha: you removing it
[19:41:57] jhass: oh, or block form apparently
[19:42:07] maasha: havenwood: so what happens if the app is interrupted or killed?
[19:42:24] maasha: jhass: ^^
[19:42:36] naftilos76: ok jhass, sorry. I get in my dev log this:
[19:42:38] naftilos76: SocketError (getaddrinfo: No address associated with hostname):
[19:42:38] naftilos76: app/controllers/virtual_domains_controller.rb:115:in `getaddress'
[19:42:38] naftilos76: app/controllers/virtual_domains_controller.rb:115:in `block in get_virtual_domains'
[19:42:38] naftilos76: app/controllers/virtual_domains_controller.rb:111:in `get_virtual_domains'
[19:42:38] naftilos76: app/controllers/virtual_domains_controller.rb:12:in `index'
[19:42:54] maasha: hurray! paste-beer for all!
[19:42:56] havenwood: naftilos76: Please paste >3 lines of text on https://gist.github.com
[19:44:23] jhass: maasha: hopefully the ensure block where the directory is deleted still gets run
[19:44:56] jhass: naftilos76: did you test with the same address/hostname in all places?
[19:45:11] jhass: because that error means the hostname can't be resolved
[19:45:26] naftilos76: https://gist.github.com/anonymous/a2c832a07b4cb3782a53
[19:45:55] maasha: jhass: we assume that the block form of Dir.mktmpdir have an ensure block that removes the dir at_exit?
[19:46:01] jhass: naftilos76: also watch out for invisible characters in the hostname, like trailing newlines and what not
[19:46:03] naftilos76: There is a list of about 6 domains and they all resolve (should) in an ip address
[19:46:21] jhass: maasha: at_exit is something different
[19:46:36] jhass: but it most certainly removes it in an ensure block, yeah
[19:46:38] naftilos76: As i said it works fine in the very same rails website when run locally
[19:46:53] naftilos76: but not in my vps
[19:46:59] maasha: jhass: well, yes, but ensure will queue up tasks right up to at_exit, IIRC?
[19:47:00] naftilos76: i actually tried 2 vps
[19:47:20] jhass: naftilos76: I bet the hostnames are different or mangled or have invalid/invisible characters
[19:47:31] maasha: hm, I need to revisit this chapter soon.
[19:47:40] jhass: maasha: no
[19:47:42] naftilos76: ok jhass thanks
[19:47:55] jhass: maasha: it's like rescue except also run if there was no exception
[19:48:06] maasha: jhass: anyhow, using kill -9 on an app can potentially leave a tmpdir with lots of redundant data.
[19:48:13] jhass: and not stopping the propagation of the exception of course
[19:48:27] jhass: maasha: yes, there's nothing you can do against that
[19:49:00] jhass: you just can't fix that, in any program
[19:49:14] maasha: jhass: except hope that the tmpdir is in your /tmp which is cleaned out regularly ...
[19:49:25] maasha: depending on OS and setup.
[19:49:56] Rubie: hi all: i'm wondering if there is a way to make a copy of an object, to mutate, leaving the original object untouched....here is an example https://gist.github.com/anonymous/0cffd249866e0407e4a1
[19:51:03] jhass: maasha: mmh, I guess you could use systemd-run and PrivateTemp=yes :P
[19:51:16] maasha: rubie: you can do a shallow copy with .dup or you can create a deep copy using Marshal.
[19:51:26] naftilos76: jhass, i just tried to count their characters and they all agree with the chars in the domains. No weirg chars or anything extraordinary in the domains strings. They are extracted from a db so they are not a result of a string manipilation or anything like that.
[19:51:31] agarie: rubie: array.dup is what you need
[19:51:48] Rubie: ok thanks ill look for that method... thanks!
[19:52:17] jhass: naftilos76: I don't think we can debug this remotely
[19:52:28] jhass: they don't resolve is all I can say
[19:52:33] naftilos76: neither do i :-)
[19:53:25] agarie: well, `clone` would be the same in this specific case :P
[19:55:25] neohunter: its possible to do something to alter the result that appear on console when returning an object
[19:55:35] neohunter: so to change this #<Nene:0x007f987c0fd810>
[19:56:06] neohunter: I thought that if I define to_s method i were able to change that, but aparently not?
[19:56:19] felltir: it's inspect, not to_s
[19:59:45] znst: Hello, our team was wondering about Ruby and HTTP 2 support. It seems Net::HTTP supports HTTP 1.1 . Is there any reading material or talk on the subject?
[20:00:56] havenwood: znst: Ruby has an absolutely terrific HTTP/2 gem: https://github.com/igrigorik/http-2#readme
[20:01:38] havenwood: anything igrigorik touches is golden
[20:01:48] crowell: hi, is it possible to do something with ruby like python's telnetlib interact?
[20:01:55] znst: havenwood: Thank you :)
[20:02:05] havenwood: znst: You're welcome.
[20:03:41] felltir: crowell: http://ruby-doc.org/stdlib-2.2.1/libdoc/net/telnet/rdoc/Net/Telnet.html like this?
[20:04:19] crowell: felltir: right, but it doesn't seem to have any way to map stdin/stdout in to it
[20:05:20] bradland: naftilos76: i'd start by logging the argument passed to getaddress using a call to .inspect
[20:05:30] bradland: super scrollback fail
[20:05:42] felltir: crowell: I meant, you could plug it straight into puts/gets
[20:06:11] crowell: felltir: fair enough
[20:06:14] havenwood: znst: Just an aside, but here's a talk by the author of the gem: http://www.heavybit.com/library/video/2013-08-27-ilya-grigorik
[20:08:08] znst: havenwood: cool, thanks for sharing
[20:08:31] bradland: crowell: if you need more explicit mappings of STDIN, STDOUT, etc, have a look at Open3 in Ruby's Std-lib
[20:09:01] bradland: you'd have to Net::Telnet using Open3
[20:11:40] naftilos76: bradland: if i do => IPSocket.getaddress("domain_name_string.tld") it works fine but if i let it take the domain as an argument then it does not. The weird thing is that it works fine in my laptop locally. This behavior is only encountered in my vps.
[20:12:52] bradland: naftilos76: can you gist the code nearby app/controllers/virtual_domains_controller.rb:115:in `getaddress'
[20:15:38] bradland: just a few lines of context would be enough
[20:15:47] bradland: i'm going to suggest some logging calls
[20:18:46] naftilos76: bradland: This is the def https://gist.github.com/anonymous/95e6cb2c510c5bc50281
[20:20:06] bradland: naftilos76: ok, just before the call to IPSocket.getaddress(vd.name), put this
[20:20:07] naftilos76: This is the view template https://gist.github.com/anonymous/9b078427d4dd01e41650
[20:20:16] bradland: logger.info vd.name.inspect
[20:21:03] bradland: note that your log level must be info in order to see log messages sent with loggerinfo
[20:21:09] bradland: *logger.info
[20:21:51] work_op: ok rubyists, I'm trying to parse documents of plaintext, and I want to have an heirarchy of words and structures, and be able to compose them
[20:22:03] bradland: logger.info "vd.name: #{vd.name.inspect}"
[20:22:09] work_op: lua has lpeg, what does ruby have for this?
[20:22:10] bradland: naftilos76: ^^ that's probably even better
[20:22:15] bradland: so you can find it in your log
[20:22:55] naftilos76: https://gist.github.com/anonymous/37bb189c6968fa5147bb
[20:23:50] naftilos76: the list of domains is similarly listed in my laptop's log but without any errors
[20:24:22] bradland: naftilos76: the domain poshlamp.com does not resolve for me
[20:24:39] bradland: you may have an entry in /etc/hosts locally
[20:24:54] bradland: on your VPS, try 'dig poshlamp.com' at a shell prompt
[20:25:50] naftilos76: no it doesn't
[20:25:56] bradland: or as jhass more succinctly put, "they don't resolve is all I can say"
[20:26:27] bradland: so what's the question?
[20:26:31] bradland: SocketError (getaddrinfo: No address associated with hostname):
[20:26:38] bradland: "No address associated with hostname"
[20:26:46] jhass: more specifically the domain seems delegated but has neither A nor AAAA attached
[20:26:46] bradland: literally means, does not resolve to an IP, so it can't connect to anything.
[20:27:00] bradland: fix yo DNS, brah
[20:28:03] naftilos76: bradland: i should have known better. That was the culprit. I did :
[20:28:06] naftilos76: data[:points_to_ip][vd.name] = IPSocket.getaddress(vd.name)
[20:28:06] naftilos76: data[:points_to_ip][vd.name] = "N/A"
[20:28:11] naftilos76: and it worked
[20:28:27] bradland: paste to the channel = bad
[20:28:44] naftilos76: thanks for your time
[20:28:44] bradland: glad to see that worked out though
[20:28:52] jhass: bradland: /nick broland
[20:28:58] jhass: you totally need to
[20:29:21] bradland: i would, but the conversation required with nickserv has killed my will to be witty
[20:29:37] jhass: heh, saslserv ftw :P
[20:31:26] naftilos76: What is the noun of resolve?
[20:31:33] Sweeper: resolution
[20:32:51] naftilos76: thanks, i thought it was resolvement
[20:33:12] jhass: does your dictionary have that?
[20:33:46] jhass: wait, that's a word?
[20:33:54] GaryOak_: slangy word
[20:34:00] naftilos76: why not? :-)
[20:34:22] GaryOak_: I think agreement describes the same situation
[20:34:33] jhass: yeah, urbandict has it, dict.cc doesn't
[20:35:23] naftilos76: I chose 'unresolved' after all !
[20:38:08] GaryOak_: what's the opposite of resolve
[20:38:55] jhass: cache invalidation?
[20:40:58] GaryOak_: what the heck c_ronaldo
[20:41:19] c_ronaldo: GaryOak_: keep calm, i am here!
[20:42:10] c_ronaldo: https://usercontent.irccloud-cdn.com/file/W2hiWEv2/c_ronaldo
[20:42:38] GaryOak_: if this was an irc bot, I would be impressed
[20:43:49] ght: Question: I have a datetime column in my profiles table named "testtime" I want to declare as a Ruby variable so I can use methods such as testtimevar.now.hour, testtimevar.now.monday?, etc.
[20:43:56] ght: Is that possible?
[20:44:15] jhass: ght: fully #RubyOnRails territory now ;)
[20:44:18] ght: I do that currently with an ActiveSupport::TimeZone value
[20:44:32] GaryOak_: what's a profiles table?
[20:44:41] ght: Well actually this is for a Ruby application I'm coding, but it uses Rails as a user front end for writing database values.
[20:44:56] ght: So yes, in a sesne, but the code utilizing it is straight Ruby.
[20:45:01] jhass: rails applications are ruby applications
[20:45:04] ght: The Rails piece is just used for allowing users to enter values.
[20:45:08] ght: Yes, I realize that.
[20:45:43] ght: Point being, this code is entirely separate from the Rails project, which is why I'm asking here.
[20:46:07] jhass: so that question isn't implying ActiveRecord? ;)
[20:46:45] ght: ActiveRecord, don't believe so, since I'm not asking how to pull the DB values, I'm asking how to declare a Ruby var of datetime type so I can use methods like .now, .now.hour, etc
[20:46:55] ght: as I do with an ActiveSupport::TimeZone object
[20:47:07] ght: Maybe it does involve ActiveRecord, if so I apologize.
[20:47:25] jhass: foo = Date ?
[20:47:31] jhass: not sure what you're getting at really
[20:48:02] ght: Can you declare a Date.new() with values formatted for datetiem?
[20:48:04] zenspider: ght: you're not asking any (sensible) question yet... maybe you could actually ask one that people could help you with.
[20:48:05] GaryOak_: ght: you should be able to use strptime
[20:48:06] ght: objects of type datetime
[20:48:29] GaryOak_: DateTime.strptime('mytimestring', 'mytimeformat')
[20:48:47] zenspider: not a question: "I want to declare as a Ruby variable so I can use methods such as testtimevar.now.hour, testtimevar.now.monday?"
[20:48:47] ght: lol zenspider, very sorry for wasting your time, I'll try harder to format the question.
[20:49:27] jhass: anyway, I think I'll leave that to others to decipher :P
[20:49:44] GaryOak_: I think that was what he was asking about *shrug*
[20:50:00] GaryOak_: I guess (he or she)
[20:50:09] ght: Let's try this. I have a variable that's of type string, such as "Central Time (US & Canada)", that I can create a var of ActiveSupport::TimeZone() type with, and once declared, I can utilize methods such as .now.hour, .now.day, etc.
[20:50:20] jhass: GaryOak_: http://en.wikipedia.org/wiki/Singular_they#Trend_to_gender-neutral_language_from_the_20th_centuryhttp://en.wikipedia.org/wiki/Singular_they#Trend_to_gender-neutral_language_from_the_20th_century ;)
[20:50:57] ght: I have a separate variable, stored of type datetime, and I would like to use that value to declare a variable with which I can use those same .now and .now.hour methods.
[20:51:15] jhass: >> datetime
[20:51:15] ght: Example of stored datetime value: 2015-03-30 20:42:19 +0000
[20:51:15] eval-in_: jhass => undefined local variable or method `datetime' for main:Object (NameError) ... (https://eval.in/306653)
[20:51:36] jhass: that's not a Ruby class, so be more precise
[20:51:54] zenspider: they still haven't gotten to a question... so I'm mentally checking out.
[20:52:07] GaryOak_: ght: Do you have a DateTime ruby object, or a datetime string?
[20:52:19] ght: jhass: When running a rails migration, you can specify a column to be of type "datetime", but let's forget that and just focus on the value itself: 2015-03-30 20:42:19 +0000
[20:52:23] zenspider: How do I X? What should I use to do Y? etc... not hard
[20:52:39] jhass: >> 2015-03-30 20:42:19 +0000
[20:52:39] eval-in_: jhass => /tmp/execpad-59d71faa72f6/source-59d71faa72f6:2: syntax error, unexpected tINTEGER, expecting keyword_end ... (https://eval.in/306654)
[20:52:44] jhass: nope, not a valid Ruby literal
[20:52:55] ght: How can I take the value "2015-03-30 20:42:19 +0000" and store it in a Ruby variable type that allows methods such as now.hour, now.day, etc?
[20:52:58] shevy: ght you could turn that into a time object
[20:53:01] zenspider: you're just dragging this out jhass :P
[20:53:26] ght: Shevy: is that the variable type I'm looking for? To use Time.new()?
[20:53:35] ght: That Time class contains the methods I'm referring to, such as .now?
[20:53:39] shevy: x = Time.parse "2015-03-30 20:42:19 +0000"
[20:53:50] helpa: Describe your goal, not the solution you imagine.
[20:53:51] shevy: there may be more parse-related methods like that
[20:53:52] ght: ahh, very nice, I'll try that.
[20:53:53] ght: Thank you.
[20:53:59] shevy: x.day # => 30
[20:54:30] GaryOak_: dang that was like walking into a biker bar
[20:54:32] mib_mib: hi all - how do i write a regex that matches all unicode spaces but NOT newlines? i want to do something like "my string".gsub(/[[:space:]]/, ' ') but not have it replace newlines...
[20:54:33] shevy: the time + date stuff in ruby is a bit chaotic, I always need to look things up
[20:54:47] ght: shevy: I gathered that myself. :)
[20:54:51] ght: That solution is perfect though, thank you.
[20:54:55] shevy: I usually look at my notes
[20:55:16] shevy: GaryOak_ have you walked into a biker bar?
[20:55:25] GaryOak_: I've seen it on TV
[20:55:27] zenspider: mib_mib: gah. not sure. you might want to .tr newlines to something unique, gsub on :space: and then tr the unique char back to newlines?
[20:55:28] shevy: I am scared by watching movies... the dudes there are big, heavy, have beards - and bikes
[20:56:07] shevy: GaryOak_ haha yeah exactly. and play pool billard sometimes... then they use the sticks to beat up steven seagal
[20:56:59] jhass: mib_mib: how big strings are we talking? might just .lines, .map and .join :/
[20:57:30] zenspider: oh. or that... tho that can get really costly over a single gsub
[20:57:54] zenspider: I was thinking str.tr("\n", 0.chr).gsub(...).tr(0.chr, "\n")
[20:58:14] zenspider: that assumes ahead of time that the string has no null bytes...
[20:58:39] Mon_Ouie: You can use negative lookahead to say "not \n" and (your regexp)
[20:58:56] Mon_Ouie: /(?!\n)???/
[20:59:14] zenspider: will that work in this scenario?
[20:59:21] jhass: thought about that but I don't think it works
[20:59:31] jhass: only for consecutive whitespace
[21:00:11] Mon_Ouie: >> "foo\n \t??bar".gsub(/(?!\n)[[:space:]]/, "")
[21:00:13] zenspider: >> "bl ah\n ".gsub(/(?!\n)[[:space:]]/, 'X')
[21:00:13] eval-in_: zenspider => "blXah\nXX" (https://eval.in/306665)
[21:00:26] Mon_Ouie: >> "foo\n \tbar".gsub(/(?!\n)[[:space:]]/, "")
[21:00:26] eval-in_: Mon_Ouie => "foo\nbar" (https://eval.in/306666)
[21:00:47] Mon_Ouie: (I guess it didn't like my non-ASCII spaces the first time :p)
[21:00:47] jhass: >> "foo bar\n \tbar".gsub(/(?!\n)[[:space:]]/, "")
[21:00:47] eval-in_: jhass => "foobar\nbar" (https://eval.in/306667)
[21:01:02] jhass: yeah, bot is still broken with unicode input :/
[21:01:42] jhass: I'm not sure I understand why that works :P
[21:02:14] jhass: ah, because the lookahead consumes it already
[21:03:30] Mon_Ouie: Hm? First it checks, without consuming any input, that the string doesn't match "\n", and if it doesn't match, it tries to see if the input matches against the same string??? not sure if that makes sense
[21:03:46] Mon_Ouie: \n and [[:space:]] are used to check the same character here
[21:04:29] jhass: yeah, I think that's what I meant by consume
[21:05:19] jhass: would be nice to have set operations on character groups though actually
[21:07:16] zenspider: jhass: well, with negative lookahead and character cases, you do
[21:07:48] zenspider: I hadn't thought about it that way before, but the above example is a pretty simple example of it
[21:07:48] jhass: not quite, lookarounds are fixed width
[21:08:15] zenspider: guess I don't know what you mean by character groups then
[21:08:35] jhass: I meant character classes, sorry
[21:09:17] zenspider: >> "bl ah\n ".gsub(/(?![\n])[[:space:]]/, 'X')
[21:09:18] eval-in_: zenspider => "blXah\nXX" (https://eval.in/306673)
[21:09:31] jhass: made up syntax: /<[[[:space:]]]-[\n]>+/ == one or more of any space but newlines
[21:09:37] zenspider: that's basically Set(:space:) - Set("\n")
[21:10:47] zenspider: >> "blah woot".gsub(/(?![a])[aeiou]/, 'X')
[21:10:48] eval-in_: zenspider => "blah wXXt" (https://eval.in/306674)
[21:10:57] zenspider: all vowels, except a
[21:11:02] zenspider: is that not what you mean?
[21:11:21] jhass: that works for single character matches only, no?
[21:12:17] zenspider: you were just talking about set operations on character classes... so, yes.
[21:12:19] zenspider: but it doesn't have to
[21:14:15] Mon_Ouie: e.g. your regexp is /((?!\n)[[:space:]])+/
[21:14:35] jhass: oh, yeah of course
[21:14:49] jhass: alright disregard me, not my best day :P
[21:14:50] eam: >> "abcde \nfg" =~ /([^[^[:space:]]\n]+)/; $1
[21:14:50] eval-in_: eam => " " (https://eval.in/306675)
[21:15:07] eam: you can nest, yeah?
[21:15:43] eam: I think that's more exactly what you're after
[21:16:58] eam: [^[^[:space:]]\n] is (not ((not (set of all spaces)) plus \n))
[21:17:28] eam: or all whitespace except \n
[21:17:35] jhass: oh, didn't know you can nest
[21:18:27] eam: \s should work inside a [] as well
[21:18:35] jhass: that i know
[21:18:46] jhass: [[:space:]] and \s are not equal though afaik
[21:19:14] eam: no clue there
[21:19:39] jhass: ascii vs unicode category I think?
[21:19:46] markoiskander: Hello, I was wondering if anyone has seen seg faults from ruby 2.1.2 when running cucumber? Or knows how to start troubleshooting them even
[21:19:54] eam: I wouldn't be surprised, but also wouldn't be surprised if they were aliases :)
[21:20:25] jhass: wow, such patience
[21:20:55] eam: markoiskander: do you have the segfault? Can you gist it?
[21:20:59] jhass: markoiskander: start with updating to .1.5, no reason to not run on the latest patches
[21:21:46] eam: markoiskander: first step is collect a corefile and use gdb to extract the backtrace
[21:30:27] totimkopf: can someone explain to me how SomeClass.instance_method(:some_method).bind(some_object).call can be useful?
[21:31:35] zenspider: totimkopf: if you have to ask, you won't understand. :P
[21:31:55] zenspider: tho, in this case, not entirely jest. try to avoid it if you can
[21:32:00] fakam: Good Afternoon Rubyland.
[21:32:27] totimkopf: zenspider: pfft :p
[21:32:44] fakam: Can someone suggest some good projects to do in Ruby? For an intermediate level?
[21:33:02] zenspider: totimkopf: in actuality, avoid overly clever code. this counts
[21:33:19] totimkopf: zenspider: you really can't give an example?
[21:33:26] postmodern: what is a good standalone file cache (a cache which stores data in a tempdir, and expires based on a files ctime)?
[21:33:38] zenspider: totimkopf: I can totally give examples. of code I try to avoid.
[21:34:05] totimkopf: zenspider: okay, so then you agree that it's not very useful?
[21:34:23] zenspider: it has its uses, but ruby is dynamic enough that there are generally better solutions available
[21:35:01] zenspider: postmodern: it's a 3-5 liner, so I usually just whip up my own
[21:35:43] postmodern: guess that's better than depping in ActiveSupport just for their 3-5 liner file cache
[21:36:17] totimkopf: the only case I've seen in TWGR is that you might want to access a method further up the method lookup chain from an instance, but why would you need that instance, but that purpose is a little fuzzy
[21:37:08] shevy: totimkopf I guess in ruby things are often just possible to do, whether they may then be useful is another issue. see whether @@class_vars are useful or not, some think yes, I on the other hand don't like them. I remember a bug I had years ago due, back then I realized I could have used a constant in that case anyway
[21:37:24] zenspider: postmodern: hah. yeah.
[21:37:39] zenspider: totimkopf: that's a design smell
[21:37:52] shevy: totimkopf like this one here http://ruby-doc.org/core-2.2.0/Method.html - I am sure it may be useful for someone, I haven't yet found a clear example of where I needed it
[21:37:55] totimkopf: @@class_vars, I can see their use, so that even the subclasses can keep track of state
[21:38:48] totimkopf: shevy: hehehe
[21:39:13] shevy: I dunno, I never really had required my subclasses to keep track of state through @@
[21:42:49] markoiskander: I can???t seem to find a core file where the script was running
[21:43:00] markoiskander: Any idea where it may be located?
[21:43:35] jhass: cat /proc/sys/kernel/core_pattern
[21:43:59] markoiskander: jhass: I did that and checked that directory no ruby dir with in it
[21:44:37] jhass: so how about sharing the full output at least
[21:45:45] zenspider: markoiskander: you might not have cores enabled
[21:45:55] zenspider: look at `ulimit -a`
[21:46:20] zenspider: tho it doesn't matter. you don't need a core
[21:46:30] zenspider: run ruby under gdb and repro and you can get the backtrace
[21:46:36] zenspider: gdb $(which ruby)
[21:46:39] zenspider: r script.rb
[21:47:35] markoiskander: Ah, I???ll give that a try. It seg faults randomly so will have to see if I an reproduce
[21:47:44] markoiskander: zenspider: looks core is not enabled as you suspected
[21:49:10] zenspider: markoiskander: you can certainly unlimit the core size and let it go about randomly reproducing
[21:49:50] zenspider: put it in your shell setup: ulimit -c $(ulimit -Hc)
[21:50:19] markoiskander: zenspider: thanks! Will hopefully have stack trace soon
[21:50:33] markoiskander: I guess once i get a stack trace what should I be looking for?
[21:50:54] markoiskander: Does the first line really indicate the cause or is it potentailly random based on some other variables?
[21:51:04] jhass: I would still be interested in the MRI segfault output btw, it can show an issue or two
[21:51:40] zenspider: markoiskander: once you get the core: gdb corefile $(which ruby)
[21:52:43] totimkopf: zenspider: could you provide me an example of how you wouldn't do something, with the instance_method thing we were discussing earlier, please?
[21:52:59] markoiskander: jhass: Output of the seg fault https://gist.github.com/miskander/dd11a2aac0041ec9a0d8
[21:53:26] jhass: markoiskander: that's all? I'm used to a lot more
[21:53:28] markoiskander: It happens after the cuc finishes and the output of the cuc summary is outputted
[21:53:44] markoiskander: jhass: yea at times I got a stack trace but the most recent ones don???t have anything else
[21:54:10] zenspider: wtf? that's... odd
[21:54:35] _akers: Hi! Junior Rails dev here. Looking for suggestions re: advanced Ruby? (more than what I can Google)
[21:54:37] zenspider: totimkopf: how I wouldn't do something?
[21:54:47] _akers: Books I mean
[21:55:04] zenspider: _akers: to begin with: you're gonna have to learn how to ask questions
[21:55:49] totimkopf: < zenspider> totimkopf: I can totally give examples. of code I try to avoid.
[21:55:59] totimkopf: that's what I meant :)
[21:56:06] totimkopf: but specifically with instance_method
[21:56:35] zenspider: you already gave an example. bypassing super and jumping an extra class.
[21:56:41] zenspider: it's a design smell and should be avoided
[22:08:49] ChanServ: +b *!*@149-210-139-141.colo.transip.net
[22:08:49] ChanServ: ChanServ kicked _688as: is banned from this channel
[22:23:35] kstuart: totimkopf: XClass.instance_method(:xmethod).bind(xobj) I don't think is particularly useful, but you could use instance_method and bind to wrap methods with, eg. aspects. For example performing authentication check before method; logging before/after/around method, etc... Is that what you mean?
[22:24:56] totimkopf: kstuart: yes, thank you
[22:26:14] totimkopf: kstuart: probably a lot of better ways to accomplish that, though
[22:29:25] shevy: why try simple when you can make it complicated
[22:30:14] shevy: jhass do the crystal guys have one of their goals to make crystal simpler than ruby?
[22:30:29] jhass: I don't think so
[22:30:50] jhass: I have trouble coming up with any real world examples for that statement though
[22:31:06] jhass: what in Ruby would you solve "simpler"/differently?
[22:31:32] jhass: writing library bindings is a lot simpler actually
[22:34:17] kstuart: hmm...what do you use instead of pastie?
[22:39:35] kstuart: totimkopf: a contrived example of how you might use them - https://gist.github.com/anonymous/58e3b20d9ad5d3ca9551
[22:40:03] kstuart: (contrived as I'm not to keen on the coupling)
[22:42:09] bradland: i think someone just let their dog take a dump right outside my window
[22:42:27] zenspider: thanks for sharing?
[22:42:29] bradland: film at eleven
[22:45:47] kstuart: is there something wrong with decorating methods like that?
[22:49:34] totimkopf: kstuart: that's interesting
[22:57:45] kstuart: totimkopf: saw other examples in a book on metaprogramming, or source code, don't recall. but google ruby metaprogramming should give other (probably better) examples, I think it's a common enough pattern/technique.
[22:59:15] totimkopf: kstuart: I have that pragmatic metaprogramming book but have yet to read it :)
[22:59:53] totimkopf: kstuart: but sure, I will search for more examples. thank you
[23:04:04] shevy: bradland kill this dog
[23:04:22] shevy: or perhaps the owner
[23:04:48] bradland: dogs poop where their owners walk them. the owner must die.
[23:05:08] shevy: grab the pile and give it to the dog owner
[23:05:49] dorei: tourists are really shocked when they realize there're stray dogs here in greece :D
[23:11:53] shevy: a pack of wild dogs can be quite dangerous
[23:12:07] shevy: I usually see group of cats
[23:12:17] shevy: like in italy, in rome, on the cemetary
[23:14:55] totimkopf: shevy: you're italian?
[23:18:24] work_op: can you carry a gun in italy?
[23:18:33] work_op: like a small handgun for safety?
[23:55:05] bradland: oh man. some dev just posted to HN asking if there is a "Github mirror", because his deploys were failing.
[23:55:42] bradland: if only they had a copy of their repo somewhere that could be pushed to another Git server.
[23:56:18] dorei: china proved that github is a single point for failure for the west :D