« Back to channel list

#ruby - 04 February 2014

« Back 1 day Forward 1 day »
[00:00:16] buff3r: hi all, im looking at dependencies list with the 'gem spec -r <rubygem_name>' command
[00:00:21] buff3r: sometimes there's a dependency listed that can't be retrieved with the same command, am i doing something wrong?
[00:00:24] buff3r: any idea why gem spec is so referentially inconsistent?
[00:07:08] RubyPanther: buff3r: because rubygems was an addon, and there isn't a consistent tool used to manage gem specs
[00:07:44] RubyPanther: it gets better every year, but a lot of specs are klunky/incomplete
[00:08:29] RubyPanther: it ain't no cpan ;)
[00:13:13] buff3r: RubyPanther: thanks for the response
[00:20:27] blitz: is there a way to conditionally created a new instance of a subclass, determining the name of subclass in the super and then calling a function on that name
[00:33:36] bricker: blitz: sure
[00:34:54] blitz: I'm using Kernel.const_get
[00:34:55] blitz: found some info
[00:46:06] itadder: http://www.rubybacon.com/wp-content/uploads/2012/10/Vim.png <--
[00:46:13] itadder: how do I make vim and ruby look like that
[00:46:51] mib_mib: hi all - i'm using the aws-sdk gem to download large files from s3 - is there any way to speed this up? I'm using the streaming download - for instance, can i somehow increase the chunk size of Net HTTP?
[00:52:37] itadder: is it good idea to code ruby on a hosted platform or on my laptop
[00:52:44] itadder: what the disadvatnge
[00:55:29] centrx: itadder, Uh, both?
[00:55:46] itadder: were do you run yoru ruby project
[00:55:51] itadder: at least for learning
[00:56:14] itadder: I guess on my laptop it just fine
[00:56:54] dseitz: Can't help much with the look
[00:57:04] dseitz: but the thing on the left is NERDtree
[00:58:59] itadder: do yo use vimruby
[00:59:03] dseitz: These are the plugins I typically use: https://github.com/s3itz/vimrc/tree/master/bundle
[00:59:27] dseitz: I had to remove YCM because brew's system-level changes are making it too painful to setup
[00:59:41] itadder: is thier a automated script to add al that to my vim
[00:59:59] dseitz: Vundle is an optional thing
[01:00:27] itadder: what is tabular it adds tab to vim
[01:00:43] dseitz: It creates a tag view
[01:01:25] dseitz: oops, wrong
[01:01:30] dseitz: That's for aligning text
[01:01:31] itadder: I think I will stick with textmate
[01:01:35] itadder: dseitz: oh
[01:01:38] AlexRussia: shevy: HeLLo!
[01:01:49] itadder: my brain for someone reason can't handle complex concept
[01:01:50] dseitz: It's pretty cool; you can use regex and block selections
[01:01:52] itadder: I get a huge brain fart
[01:02:17] dseitz: http://vimcasts.org/episodes/aligning-text-with-tabular-vim/ shows how you'd use it
[01:02:59] dseitz: I'd probably consider almost anything from tpope's repo as well :)
[01:04:29] itadder: wow $255 for his class
[01:05:03] itadder: oh wow neat it align text
[01:05:28] itadder: wow he uses macvim
[01:05:51] bklane: I am learning procs now and wondering at one point you should use a proc over a regular iteration? On codecademy it uses a proc for a single method call which I assume you would just use in a map or collect block no?
[01:07:22] itadder: wow this guy is a genius dseitz
[01:07:56] bklane: this is the codecademy example: https://gist.github.com/eb52c9bbbf9aebeb9989.git
[01:10:40] dseitz: itadder: Vim has a lot of amazing stuff to learn about; I wouldn't necessary pay for an instruction unless you want to get up and running with a lot of the advanced stuff very quickly. There is enough free material out there that this doesn't make much sense to me.
[01:11:09] itadder: first I am trying to learn ruby
[01:11:13] dseitz: Also, Vim is not the only productive editor out there; so if you're comfortable with one environment and it serves you well, stick ot it
[01:11:23] itadder: dseitz: any reason why my brain can't focus on ruby for more then 20 minuutes
[01:11:46] itadder: I have not decided on what to use hence I am not a expert on any
[01:11:54] itadder: right now I am using textmate on the maac
[01:12:54] itadder: I tried for three weeks but my brain focused on someting for 20 minutes and then gave up
[01:12:58] dseitz: I see. Well as much as I appear to be promoting Vim, I actually use, primarily, ST3 w/ an open Terminal instance.
[01:13:12] dseitz: As for Ruby, depends on what experience you have in your background.
[01:14:53] itadder: I have basic
[01:15:11] itadder: I only been doing it for three weeks and it seems I am about to give up
[01:15:20] dseitz: To give you an example, I'm learning JS right now, which is similar to languages I have used in the past, but in other ways, nothing like any of them. So I've had a few parts that I've moved through very very slowly.
[01:16:20] itadder: the basic stuff I did okay and got bored
[01:16:25] itadder: but the more advance stuff
[01:17:07] itadder: my brain got a brain fart
[01:17:48] dseitz: Well that's okay. If it's boring; you should not really be reading alone.
[01:18:22] itadder: I have major problem with focus
[01:18:29] dseitz: You need to code out and do some exercises to built your knowledge. I think a lot of books fail to provide these because they are intended for instruction to suppliment a course or something.
[01:18:38] itadder: I can hyper focus for a while, but doing the first part of code acamedy just bore me
[01:18:51] itadder: ahh dseitz yea
[01:19:01] itadder: I just want to learn to jump in to automatation
[01:19:43] itadder: I mean learn at the same time, but getting bored
[01:19:54] itadder: on how you add numbers or print stuff
[01:19:58] itadder: altough important
[01:21:13] george2: I'm given this unit test file http://paste.kde.org/p90dd09c8 , and expected to write "RegExpProcessor". With this in my RegExpProcessor.rb http://paste.chakra-project.org/6369 , I get this error. http://paste.kde.org/p217d4d31 . What do I need to do to get the tests to recognize my class?
[01:22:02] dseitz: itadder: Take a break when the book gets old; https://www.bloc.io/ruby-warrior/#/ might be interesting for you since its interactive and challenging at times
[01:22:25] dseitz: what are you learning from, btw?
[01:24:34] itadder: code acamedy
[01:24:52] itadder: oh wow a ruby video game
[01:24:56] dseitz: Yeah that is boring; even PickAxe has you do more exciting stuff than that website
[01:25:20] dseitz: Jump into these two options, they don'y make you feel like a moron by spending 12 hours printing stuff to the console :)
[01:26:24] itadder: wow the ruby community has a lot of neat tuts
[01:35:22] agent_wh1te: Ello everyone
[01:38:06] dseitz: itadder: Free material to read and practice with are Learn Ruby the Hard Way [aka, by completing exercises], Learn Programming by Chris Pine, free, bit old but good book. Programming Ruby [aka the PickAxe book] was is a great read. RubyMonk and RubyWarrior give you an opportunity to test your ability to code interactively and continue learning
[01:38:32] dseitz: If I'm not mistaken, most of these are recommended on the website
[01:38:46] itadder: dseitz: ahh i see and I won't get bored
[01:38:58] dachi_: pognant guide ...
[01:39:20] itadder: I would realy like to apply as a ruby puppet consultant in the future and ruby programmer
[01:39:27] itadder: not today but say in one year
[01:40:25] dseitz: Oh yes, I didn't mention Why's poignant guide to Ruby
[01:40:45] dseitz: People say great things about it, I've never read it so I cannot offer an opinion
[01:40:58] agent_white: I have read it and it is amazing.
[01:42:20] dachi_: "Them What Make the Rules and Them What Live the Dream"???
[01:43:48] agent_white: i love the next chapter
[01:44:26] agent_white: "Yes i think your city is _freaky_. There's animals everywhere. -- You have a right to your opinion!"
[01:44:32] agent_white: aye! It's on metaprogramming.
[01:44:46] dachi_: yea regexps too
[01:45:00] dachi_: i got to go people, thanks for helping me all the time.
[01:45:02] dachi_: good night!
[01:50:11] mib_mib: i have a few jobs that download s3 files in the background using resque - how would i go about scheduling a job to run AFTER all of these jobs have finished?
[01:58:25] snkcld_: what is <=> ?
[02:01:40] pravinmishra249: Best tool to debug ruby script? 'rdebug' OR 'pry'
[02:01:59] Xuisce: hi pravinmishra249
[02:02:12] dachi_: snkcld_: it's called combined comparison operator
[02:02:36] dachi_: can return 1, -1 and 0
[02:02:53] dachi_: used with Comparable mixing often
[02:03:54] dachi_: snkcld_ it's also called spaceship operator
[02:05:05] dachi_: snkcld_ here's a nice page http://stackoverflow.com/questions/827649/what-is-the-ruby-spaceship-operator
[02:09:39] RubyPanther: The soundtrack for Downtown is freaky, too
[02:10:33] agent_white: I haven't heard it yet...
[02:10:48] agent_white: I think I may exchange it for Pendleton Ward's music for Adventure Time
[02:11:45] RubyPanther: agent_white: http://mislav.uniqpath.com/poignant-guide/soundtrack/
[02:12:19] smtp_: With RSPec, any ideas how I can stub out the file data with a File.open(file, "r") do |f| end block?
[02:12:31] RubyPanther: If you think the book is weird and awesome, check out the music! There is also a live bootleg of the band doing some other music at a Ruby convention
[02:36:50] mjc_: smtp_: what're you reading from the file that you actually want to use it that way
[02:37:20] mjc_: I mean usually you want to use like CSV or some other method of abstracting the file access away
[02:37:36] mjc_: so you would stub the output from the csv module or something
[02:43:41] Xuisce: ex1.rb:6: syntax error, unexpected tCONSTANT, expecting end-of-input
[02:43:41] Xuisce: puts "I'd much rather you 'not'."
[02:43:44] Xuisce: What does this mean ?
[02:44:31] Xuisce: puts "I'd much rather you 'not'."
[02:44:35] Xuisce: Not sure how this line is wrong
[02:45:05] viki: I think you need escapes
[02:45:41] Xuisce: escapes ?
[02:45:43] Xuisce: what do you mean viki ?
[02:45:54] Xuisce: im a total newbie to programming
[02:46:02] Xuisce: and ruby is what my irc client is based odd of
[02:46:07] viki: me too, i'm going to fail if i explain it, so i'm going to find a link XD
[02:46:19] Xuisce: ex1.rb:6: syntax error, unexpected tIDENTIFIER, expecting end-of-input
[02:46:19] Xuisce: puts 'I "said" do not touch this.'
[02:46:22] Xuisce: viki: ^ got this
[02:46:27] snkcld: what is <=> ?
[02:46:28] Xuisce: what did I do wrong
[02:46:34] Xuisce: http://ruby.learncodethehardway.org/book/ex1.html
[02:46:37] Xuisce: I'm following this
[02:46:52] Xuisce: puts 'I "said" do not touch this.'
[02:46:54] Xuisce: its this line
[02:47:50] Xuisce: bah never mind viki
[02:48:09] viki: ok no, you're not to the lesson where you need escapes yet, i'm not usre
[02:49:06] viki: are you sure you typed it exactly and didn't mix up your ' and " ?
[02:49:24] echosystm: is there any default names for block arguments?
[02:49:56] echosystm: eg. { |language_construct_for_this_variable| ... }
[02:50:06] centrx: Uh, what?
[02:50:17] echosystm: in groovy there is an implicit variable called "it" which is the first argument to a block
[02:50:43] echosystm: so { |a| a.do_stuff } would be { it.do_stuff }
[02:52:19] centrx: echosystm, There is not
[02:53:00] echosystm: thats all i needed to know :)
[03:32:21] lagweezle: Oh. Well that is awesome. I'm now realizing that the Daemons gem is pretty much dead and hasn't been touched in two years. -.-
[03:33:07] centrx: lagweezle, Always check that first :)
[03:33:19] lagweezle: Any suggestions for alternatives? >.<
[03:35:21] centrx: lagweezle, https://www.ruby-toolbox.com/categories/daemonizing
[03:40:27] lagweezle: centrx: Just to make sure, am I missing a means to sort the listing?
[03:41:13] centrx: lagweezle, I think it is sorted by popularity and that is it
[03:43:47] centrx: lagweezle, daemon-kit, dante, daemons-rails
[03:43:53] centrx: lagweezle, Those are your only real options
[03:44:09] lagweezle: yah, looking at those
[03:44:10] lagweezle: daemon-kit appears to be a non-option for what I'm after.
[03:48:20] skyjumper: anyone have some ruby code for comparing the distance/similarity of 2 colors?
[03:48:45] skyjumper: i'm doing a simple average of the means of the RGB components, and its not really that good
[03:48:56] skyjumper: er, average of the differences
[03:49:38] centrx: Is comparing the distance of colors like finding the area of an idea?
[03:49:51] skyjumper: distance of color codes, obviously
[03:50:12] skyjumper: in all seriousness, "how much do these two colors look alike"
[03:52:02] centrx: skyjumper, Not sure, it should probably involve a square root though
[03:52:31] centrx: Square root of the sum of the squares
[03:52:35] centrx: That is the distance formula
[03:52:36] skyjumper: this is way more complicated than i thought it'd be
[03:53:52] Tai: what are you using for the value of the colors? HTML, CMYK, Panatone?
[03:54:01] skyjumper: html so far
[03:54:20] skyjumper: the 'color' gem can do CMYK, HSL,
[03:54:38] skyjumper: people say LAB is the best for comparing but this is already too muchw ork
[03:55:22] Tai: couldn't you just add up the sum of the differences in R, G, and B?
[03:55:32] skyjumper: thats what i was doing
[03:55:44] skyjumper: but it keeps finding 66ff99 as similar to 999999
[03:55:50] skyjumper: for example
[03:56:38] skyjumper: maybe compare HSL values and weight the hue higher ors omething
[03:57:01] Tai: I think centrx is right
[03:57:37] yoshie902a: I am using a require_relative and need to go 3 folders up and then get into another folder called config. I thought ../../../config/config.rb would do it, but I'm getting an error, what's the best war to trouble shoot this issue
[03:57:39] skyjumper: tried that too, it's even further off (visually) from the avg of sums
[03:58:02] Tai: if you take the square of the distances of the three values, and then add them together, and the get the sq root, that should give you the distance, and then you can compare that to get the more similar color
[03:58:07] centrx: http://mathworld.wolfram.com/Distance.html
[03:58:29] skyjumper: the point is pure mathetmatical distance isn't going to work
[03:59:17] Tai: why not?
[03:59:45] skyjumper: in this case shades of gray are screwing it up
[04:00:14] centrx: Have you tried that mathematical distance? It sounds like you are using the concept of mathematical distance - incorrectly.
[04:00:27] skyjumper: 66ff99 (light greenish) is showing as closer to 999999 than it is to 00f800 (saturated green)
[04:00:32] centrx: The sum of the differences is simply nothing, why would you do it
[04:00:33] Tai: I think it sounds like skyjumper wants it so that it biases towards hue
[04:03:05] Tai: if you wnat it to find colors that are the most similar hue, you need to find a metric that sees which ratio of colors is more similar
[04:03:44] Tai: so something that is yellow will be high in green and blue and low in red
[04:04:01] Tai: and be more unlike gray which is flat
[04:04:06] Tai: even if the gray is closer in value
[04:04:44] Tai: er, two yellows will be more unlike gray
[04:08:40] Tai: actually, i think the best way would be to plot the points on something like this and then get the distance
[04:08:56] Tai: https://en.wikipedia.org/wiki/File:Color_map_fs.png
[04:09:03] Tai: but you'd have to widen the center by a lot
[04:09:36] skyjumper: really i'm just looking for code snippets
[04:09:42] skyjumper: this is hardly even an important thing
[04:09:52] Tai: what's it for?
[04:10:32] skyjumper: converting old hand-written html color codes to a smaller palette
[04:10:49] skyjumper: without making things visually weird
[04:11:29] Tai: that makes sense then that you'd be more concerned about hue than value
[04:11:36] skyjumper: that's what i was thinking
[04:11:42] skyjumper: hoping i don't have to put a lot of thought into it
[04:11:46] skyjumper: enough time's already been wasted
[04:15:13] Tai: so try this, you already have the distance, right?
[04:15:20] skyjumper: which isn't too useful
[04:15:30] skyjumper: i've got HSL
[04:15:42] Tai: before you do the distance, broadly divide into color groups
[04:15:42] skyjumper: hue saturation value
[04:15:57] Tai: so if blue is 70% of the total, you call the color blue, same with red and green
[04:16:23] Tai: if red and blue are between 60 and 40%, you call it purple
[04:16:30] Tai: that way, it will only look for distance within a color gropu
[04:16:39] AlexRussia: hm, if you say about graphic, you dont know good libray for parse bmp?
[04:16:40] skyjumper: then i have to come up with gruops
[04:16:45] skyjumper: i already have a palette
[04:17:33] centrx: Have you considered switching to black and white?
[04:17:51] Tai: oh, then you can compare hue really easily
[04:19:22] towskidistress: does anyone know why in my tests, Signal.trap('EXIT') gets called before the test is even run?
[04:24:08] centrx: towskidistress, Sounds like no
[04:24:37] centrx: towskidistress, Maybe the person who made the tests accidentally killed his processes a lot
[04:57:46] centrx: Quack quack
[04:58:24] Xuisce: centrx: roar
[05:35:09] centrx: WHO DARES ASKS ME A QUESTION!?
[05:35:37] havenwood: centrx: who do you suspect might?
[05:48:27] RubyPanther: centrx: Quack! What music video does this image spoof? http://stuff.rubypanther.com/images/ducktyping.png
[05:48:52] centrx: centrx.acts_like_duck?
[05:49:01] centrx: Looks like the PINK PANTHER
[05:49:37] RubyPanther: Nope, not a music video. Though I do have a punk rock version of the pink panther music in there too
[06:04:10] jacky_: Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. /Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/ar.c.rl:199:29: error: the comparison will always evaluate as ???true??? for the address of ???raise_lexer_error??? will never be NULL [-Werror=address]
[06:04:20] jacky_: what is the problem
[06:05:21] jacky_: An error occurred while installing gherkin (2.2.9), and Bundler cannot continue. Make sure that `gem install gherkin -v '2.2.9'` succeeds before bundling.
[06:05:48] centrx: Paste full stack trace?
[06:06:10] jacky_: sorry, help me out
[06:06:12] centrx: That last message you posted should only be a Warning, not a show-stopping Error
[06:06:34] centrx: jacky_, Paste the full log at http://pastie.org/
[06:10:37] jacky__: see http://pastie.org/8696648
[06:10:51] jacky__: http://pastie.org/8696648
[06:12:02] jacky__: failed to install gherkin 2.2.9
[06:12:49] havenwood: jacky__: You need to be able to build gems with C-extensions: sudo apt-get install -y ruby1.9.1-full
[06:13:34] centrx: jacky__, I would just stick with gems, once you have the Debian package of Ruby installed, just use gem directly
[06:13:49] centrx: and of course installing the Debian packages of any dev/header libraries you need
[06:14:36] jacky__: thanks, i'll try it
[06:15:30] amh345: havenwood: i forgot to mention. that read and rewriting the file thing worked for Open3 and gpg . thanks for the suggestion.
[06:15:50] havenwood: amh345: oh good, no prob ;)
[06:16:37] amh345: one day things will get big enough where these companies change to fit what i need. not the other way around. .. oh wishful thinking.
[09:04:38] apeiros: (where 7of9 electrocutes that hirogen)
[09:09:16] GreatSUN: I have a problem with ssl socket/client
[09:09:31] GreatSUN: server is closing connection, but client doesn't react
[09:09:46] GreatSUN: I am pretty sure I am missing something on client side...
[09:09:53] joaobatalha: hey guys, I am doing a for loop, and I want to skip to the next element of the array I am looping thru if I have been processing the current element for longer than 30 seconds. What is an easy way to do this?
[09:10:01] GreatSUN: https://gist.github.com/GreatSUN/8800342 <-- client and server code
[09:11:09] GreatSUN: joaobatalha: implement a timer with a thread and check the timer after the element is processed
[09:11:18] GreatSUN: if timer is above whatever time
[09:11:39] GreatSUN: might be this is not supported in your version of ruby
[09:12:19] GreatSUN: if that is the point, change the loop to work with a variable as index/key and just change this variable according then
[09:13:13] railsmagnet: hey how do i pass a Handler Module to EventMachine::Websocket.start ..... instead of putting everying inside the block
[09:13:32] sino__: i am the first to use irssi
[09:13:58] railsmagnet: use weechat i hear its good too
[09:14:01] GreatSUN: how old are you guys?
[09:14:10] sino__: i am just 23
[09:14:33] sino__: GreatSUN and how about u?
[09:14:53] sino__: oh so older than me
[09:15:39] sino__: how long u learn ruby GraetSUN
[09:15:39] workmad3: joaobatalha: use the Timeout class in ruby stdlib
[09:16:12] GreatSUN: <--- has been using irssi since around 1999/2000
[09:16:27] GreatSUN: sino__: little more than one year
[09:16:59] GreatSUN: workmad3: wouldn't timeout stop the current element processing?
[09:17:14] GreatSUN: workmad3: thats why I didn't say it ;-)
[09:17:41] GreatSUN: workmad3: btw. any idea on my gist / client-server problem?
[09:18:51] workmad3: GreatSUN: no
[09:19:30] workmad3: GreatSUN: Timeout.timeout(1) {foobar} will let the block process for 1 time unit before throwing a timeout exception
[09:19:48] workmad3: (would need to check the docs to see if the time units are seconds or millis :) )
[09:20:26] GreatSUN: workmad3: exactly, but he wanted a block to execute and after the processing of the block the next one should be skipped, if the last was processing more than 30sec
[09:20:40] railsmagnet: doesn't 1 mean it'll wait 1 sec and it the process doesn't end within that, it'll throw an exception ?
[09:20:53] atmosx: is Open3.capture3('uname -a') insecure?
[09:21:03] GreatSUN: workmad3: at least if I understood it properly, this would eliminate timeout
[09:21:15] atmosx: I'm calling this through a lambda.call
[09:21:21] workmad3: GreatSUN: 'skip to the next element if have been processing the current one for longer than 30s'
[09:21:26] workmad3: GreatSUN: that says 'timeout' to me
[09:21:48] GreatSUN: workmad3: yes, you are right
[09:22:01] GreatSUN: workmad3: sorry. I didn't get the to :-(
[09:22:21] workmad3: heh :) that's the joy of text communications
[09:23:10] atmosx: ah no it's not apparently
[09:24:13] railsmagnet: workmad3: are you familiar with eventmachine websocket ... I had a question
[09:25:20] workmad3: railsmagnet: and if I'd had a response, I'd have said something
[09:32:06] squarechan: just putting this out there. I'll buy your ruby centric stackoverflow account if you have a solid amount of reputation points for $2500
[09:32:50] apeiros: ACTION conflicted on whether that's ban-worthy
[09:33:22] GreatSUN: apeiros: banfun
[09:33:25] squarechan: it's actually a deep question you should think about. our industry values SO accounts so much
[09:33:28] squarechan: that $2500 is a steal
[09:34:20] squarechan: go to apply to any tech company and they want two things: link to your github and a link to your SO
[09:35:11] glebe: join /##ruby
[09:36:16] apeiros: fun. for me it's usually the other way round.
[09:36:39] olivier_bK: i try to replace this ( <?$licenceData = array ) by nothing with gsub but i get some problem because of ?
[09:36:43] tobiasvl: squarechan: maybe you should try forumkorner
[09:36:50] olivier_bK: do you know how i can replace it ?
[09:37:02] squarechan: tob, what's that?
[09:37:05] tobiasvl: olivier_bK: escape the ? like so: \?
[09:37:05] GreatSUN: apeiros: that matters on what happens after
[09:37:13] apeiros: olivier_bK: show your code please
[09:37:16] mikecmpbll: i'll sell mine for one beer per rep point.
[09:37:23] GreatSUN: noone of you guys aware of client/socket ?
[09:37:31] apeiros: mikecmpbll: so little rep points or want to drown? :D
[09:37:36] squarechan: mike, depends how many rep points you have :)
[09:38:00] mikecmpbll: just like the idea that i've been earning beers everytime i answer a question on SO.
[09:38:11] mikecmpbll: ACTION starts up BeerOverflow
[09:38:13] workmad3: I'll do the same
[09:38:23] workmad3: then I'll sell the beer for $1.50 a pop...
[09:38:34] olivier_bK: apeiros, r= readfile.gsub(/("<?$licenceData = array")/,('') }
[09:38:39] olivier_bK: readfile is an array
[09:38:48] apeiros: olivier_bK: a) use a string instead of a regex
[09:38:50] GreatSUN: I don't have a clue what SO is
[09:39:00] GreatSUN: do I have to care?
[09:39:02] apeiros: olivier_bK: b) escape regex special chars (? is a special char in regex)
[09:39:15] apeiros: escape char in regex is \, like elsewhere in ruby
[09:39:19] GreatSUN: Oreo... hmmm I like those cakes
[09:39:31] apeiros: olivier_bK: note that ( and ) are special chars too
[09:39:34] workmad3: GreatSUN: not if you enjoy getting your answers from expert sex change
[09:39:40] apeiros: olivier_bK: and $, o fcourse
[09:39:43] workmad3: GreatSUN: also, oreos are cookies, iirc, not cakes
[09:39:48] olivier_bK: $ i know for it
[09:40:03] GreatSUN: workmad3: whoohooo never will work with sex change
[09:40:26] workmad3: GreatSUN: expertsexchange.com ;)
[09:40:26] GreatSUN: workmad3: SO url?
[09:40:39] workmad3: GreatSUN: stackoverflow.com
[09:40:47] GreatSUN: workmad3: ahhhh stackoverflow :D
[09:40:53] GreatSUN: my all day website
[09:41:13] workmad3: GreatSUN: heh :) you didn't twig that SO == StackOverflow? :)
[09:41:16] GreatSUN: so this is SO here... good to know
[09:41:35] GreatSUN: nope, didn't get around this till today
[09:41:50] workmad3: mmm, I've gotten another 146 beers since I last went to SO
[09:41:54] GreatSUN: but SO doesn't solve my client socket problem atm :-(
[09:42:31] GreatSUN: workmad3: you can earn a lot of money with sex
[09:42:57] workmad3: I've not answered a question on SO since 2010...
[09:43:22] GreatSUN: workmad3: bad guy :D
[09:45:01] workmad3: GreatSUN: and yet I've gained 130 rep already this year ;)
[09:45:04] apeiros: squarechan: you know, my nick alone is probably worth more to me than your 2.5k offer
[09:45:25] squarechan: you can change your nick?
[09:45:35] squarechan: I wouldn't want to be apeiros. that would be silly
[09:45:54] apeiros: SO allows nick change? nice.
[09:46:06] apeiros: ACTION not often enough on SO obviously
[09:46:58] tobiasvl: this reminds me
[09:47:06] tobiasvl: I tried to rename my twitter account
[09:47:13] tobiasvl: to a short and sweet handle I had
[09:47:38] tobiasvl: but it was "turboed", i.e. a bot snapped up the handle in the short time the handle was in limbo
[09:47:44] tobiasvl: still beating myself up over that.
[09:48:32] workmad3: I don't use twitter enough to care about having a short handle
[09:49:37] Cork: apeiros: been digging until i'm about to be crazy; it looks like thin doesn't supports sending 100 headers for the Expect request
[09:49:38] workmad3: tbh, I don't see why bots care either... the main reason to have a short handle, afaict, is to allow people to @target you without wasting too much space... but who wants to respond to a bot?
[09:49:46] workmad3: or is it for selling on?
[09:49:50] tobiasvl: workmad3: yeah, selling
[09:49:51] Cork: apeiros: it isn't a limitation in rack as it seams to work in webrick
[09:50:16] tobiasvl: anyway, i lost a three letter handle but still have a four letter one, so i'm not that beat up
[09:50:28] workmad3: tobiasvl: secured it? :)
[09:50:43] tobiasvl: absolutely ;)
[09:50:47] workmad3: tobiasvl: and you're not using godaddy for domains? :)
[09:50:52] tobiasvl: nooooo no no.
[09:51:18] tobiasvl: i actually used them some years ago, but even then there were so many horror stories
[10:03:29] Cork: ok, lets try asking this again.
[10:03:54] Cork: anyone know of a way to access the headers for a request before .call is ran in thin?
[10:04:14] Cork: curl is sending Expect: 100-continue, and i can't find a way to respond to it in thin
[10:53:45] AxonetBE: If this is my array ["F", "AMY GEE", "Ceinture"]=>[#<StockTransaction >, #<StockTransaction >, #<StockTransaction >] and the first StockTransaction contains stock, second sales, ... How can I convert this to something like ["F", "AMY GEE", "Ceinture"] => [stock => 1>, sales => 2, stock_end => 3]
[11:03:25] krz: you all use %() or %[]?
[11:04:24] bleak: i use %{}...
[11:38:33] apeiros: krz: %{}, %Q{}, %q{}, %W[], %w[], %r{}, %i[], %I[]
[12:37:40] d-snp: hey guys, I'm thinking of moving my models to a separate gems, since we have multiple apps that use the same databases, anyone have experience with this?
[12:38:08] d-snp: I'm mostly concerned about keeping the development process nice and fluid
[12:39:11] d-snp: so in development mode, the apps should use a local checkout
[12:42:22] apeiros: d-snp: with Gemfile no problem
[12:42:46] waxjar: d-snp: if you're using git you could maybe use a submodule. that kinda sucks if you package it like a gem, though.
[12:43:04] apeiros: d-snp: just use gem 'models', path: 'vendor/models' and check your git repo out there. don't forget to add /vendor/ to gitignore.
[12:43:18] apeiros: waxjar: git submodule IME --
[12:43:29] apeiros: we moved away from that.
[12:44:35] waxjar: too much hassle?
[12:44:54] apeiros: yes, and issues. people can't handle it well.
[12:45:13] apeiros: (me included)
[12:45:25] d-snp: alright, and then our deployment process must be sure to deploy the gem as well
[12:45:51] d-snp: sounds like it could be good
[12:47:50] apeiros: d-snp: bundler deals with that
[12:48:17] apeiros: you can change the dependency to the git repo for deployment. haven't yet tried that properly, but should be possible via bundle groups.
[12:48:23] d-snp: ah right ofcourse
[12:48:59] apeiros: so locally it uses development group, which points to the locally checkout out path, and on deploy it uses the non-development group, which points to the git repo.
[12:49:18] apeiros: issue I see is that you have to generate a proper Gemfile before deploy
[12:56:53] MJBrune: Hey so I am using ruby on windows. Using the GoogleVoiceAPI gem. When I do a simple api.index_xml() command it has an SSL_connect error.
[13:09:56] boboc: guys anyone knows where tcp method is declared? I saw 2 examples used with Socket class where tcp method tool 2 arguments (host + port) or a block where the connected socket is available but in the ruby docs i can't find the tcp method, only in the Addrinfo class...
[13:10:26] TheLarkInn: Are you in the Core Lib docs?
[13:10:41] TheLarkInn: http://ruby-doc.org/stdlib-2.1.0/libdoc/socket/rdoc/TCPSocket.html
[13:10:43] boboc: TheLarkInn: yes
[13:10:59] TheLarkInn: Theres docs from the StdLib, if that is what you are looking for
[13:11:39] boboc: i've looked here because i saw the Socket.tcp('host',80) method call works but here is no tcp class method: http://ruby-doc.org/stdlib-2.1.0/libdoc/socket/rdoc/Socket.html
[13:12:42] TheLarkInn: well what exactly are you trying to accomplish
[13:12:48] TheLarkInn: setup a server or client socket?
[13:13:39] boboc: TheLarkInn: i'm learning from a book, the same solution is to use TCPSocket class, i'm just trying to understand where is this tcp method declared to look at it and i can't find it anywhere
[13:14:55] Butcho: what book?
[13:17:14] TheLarkInn: you can use TCPSocke.new (arg1,arg2,???)
[13:17:14] boboc: Butcho: Working with TCP Sockets
[13:17:19] TheLarkInn: instead of Socket.tcp
[13:18:02] boboc: TheLarkInn: yes in the book that is explained, as i said all i wanted was to find the tcp method declaration and it doesn't seems to be anywhere :)
[13:18:05] boboc: that's it
[13:19:06] TheLarkInn: http://www.ruby-doc.org/stdlib-1.9.3/libdoc/socket/rdoc/Socket.html#class-Socket-label-Convenient+methods
[13:19:11] TheLarkInn: shows the syntax you are using
[13:20:10] workmad3: TheLarkInn: quick thing - don't put a space before the opening ( if you're using brackets around parameters
[13:20:26] TheLarkInn: sorry it was just sloppy typing, I typically don't do that
[13:20:38] workmad3: TheLarkInn: it changes the meaning of the statement (frequently into a syntax error :) )
[13:20:44] TheLarkInn: lol indeed it does
[13:20:51] workmad3: TheLarkInn: it used to be valid ;)
[13:21:18] AxonetBE: Can somebody help me with this array that I want to convert to become the expected result? https://gist.github.com/bigbentobox/8803433, I now I can use group by, but I don't know how I can get the additional attributes in the same hash
[13:21:36] workmad3: but it causes confusion when you do something like 'some_method (x + y) * z'
[13:23:57] jeanlinux: AxonetBE: Your question is not that clear.. be precise
[13:25:27] TheLarkInn: AxonetBE, always if the first 3 match but the last is different then combine into one hash?
[13:25:34] TheLarkInn: for both sets of hashes
[13:26:04] AxonetBE: jeanlinux: My array array_of_stats ( https://gist.github.com/bigbentobox/8803433 ) is a combination of my 2 arrays ( 1 with the sales, 1 with the stock )
[13:26:09] havenwood: AxonetBE: array_of_stats.group_by { |hash| hash['brand_name'] }.map { |k, v| v.inject(&:merge) }
[13:26:39] AxonetBE: jeanlinux: but now I want to group them by brand_name, product_type_name and gender_name
[13:29:08] AxonetBE: TheLarkInn: yes that it is, but can I also group by on 3 fields?
[13:29:30] TheLarkInn: not sure about that but lets work with that concept
[13:30:03] TheLarkInn: combine hashes that share brand_name, prodduct_type_name, and gender_name right?
[13:34:51] havenwood: AxonetBE: the code above produces your wanted_array
[13:36:06] AxonetBE: TheLarkInn : but I have some strange results when I combine my 2 arrays ( with active record results ), I get this structure after my group by on 3 fields without the map https://gist.github.com/bigbentobox/9c0b3a0ef865dcf61bd8
[13:36:18] TheLarkInn: havenwood, I think it has to be more than just brand_name
[13:37:30] AxonetBE: havenwood: https://gist.github.com/bigbentobox/9c0b3a0ef865dcf61bd8
[13:38:04] havenwood: TheLarkInn: aha, more to the question than the expected input and desired output!
[13:38:41] lpvn: AxonetBE: I think you could refactor that find_by_sql in a prettier rails query
[13:39:30] AxonetBE: lpvn: yes indeed but for the moment it is easier to debug and develop with the full quert
[13:42:01] havenwood: AxonetBE: array_of_stats.group_by { |hash| hash.values_at 'brand_name', 'product_name', 'gender_name' }.values.map { |hashes| hashes.inject(&:merge) }
[13:42:48] TheLarkInn: that should be exactly what Axonet is wanting
[13:42:50] TheLarkInn: I waould assume
[13:44:32] AxonetBE: havenwood: have to debug a little because I get TypeError Exception: can't convert String into Integer
[13:46:21] havenwood: AxonetBE: The values of 'brand_name', 'product_name', and 'gender_name' need to be Comparable
[13:46:47] AxonetBE: it is all strings
[13:47:08] AxonetBE: they are all strings
[13:50:14] havenwood: AxonetBE: Works given inputs like your expected inputs: https://gist.github.com/havenwood/8803831
[13:50:26] AxonetBE: havenwood: works:)
[13:50:51] AxonetBE: I had to do sales.collect(&:attributes) on my active record results before putting the arrays together
[13:53:40] AxonetBE: havenwood: thanks!
[13:53:58] havenwood: AxonetBE: no prob, happy hacking!
[13:57:57] olivier_bK: how i can replace this <?$licenceData = array by nothing ?
[13:58:14] tobiasvl: is that the string olivier_bK ?
[13:58:19] tobiasvl: '<?$licenceData = array'
[13:58:37] tobiasvl: just do a gsub and escape the proper chars?
[14:01:20] apeiros: olivier_bK: you asked earlier already and got a reply - what didn't work?
[14:01:49] apeiros: olivier_bK: also, by now you should know to paste the code you're currently using???
[14:03:07] olivier_bK: give me one minute i have a problem
[14:05:42] olivier_bK: it s okai sorry
[14:12:29] olivier_bK: apeiros, i try that del = readfile.gsub('/^\<?$licenceData=array/', "her")
[14:15:08] apeiros: olivier_bK: I told you that `?` is a special char in regex.
[14:15:31] apeiros: < on the other hand is not.
[14:15:41] tobiasvl: (not on its own at least)
[14:15:47] apeiros: olivier_bK: I also told you that $ is *also* a special char.
[14:16:07] apeiros: olivier_bK: maybe pay attention to the reply you get this time?
[14:16:34] apeiros: >> Regex.escape('<?$licenceData=array')
[14:16:34] eval-in: apeiros => uninitialized constant Regex (NameError) ... (https://eval.in/97873)
[14:16:39] apeiros: >> Regexp.escape('<?$licenceData=array')
[14:16:39] eval-in: apeiros => "<\\?\\$licenceData=array" (https://eval.in/97874)
[14:51:33] olivier_bK: how i can use Regex.escape on my array ?
[14:51:58] tobiasvl: an array of strings? each?
[14:52:15] tobiasvl: how would you do anything on all entries of an array?
[14:54:21] apeiros: olivier_bK: you can't.
[14:54:26] apeiros: olivier_bK: but you can map your array.
[15:00:32] slowcon: morning guys
[15:27:55] lpvn: Satya Nadella Named Microsoft CEO
[16:10:22] olivier_bK: i have a question
[16:13:37] DouweM: olivier_bK: do tell
[16:14:14] platzhirsch: olivier_bK: This is awesome!
[16:15:01] olivier_bK: give me one minute i have a problem to resolv before
[16:15:05] tobiasvl: is the question how to replace the string '<?$licenceData = array' with nothing?
[16:15:42] platzhirsch: tobiasvl: You randomness hit me critically
[16:17:41] platzhirsch: I am looking for a channel where I can moan about interview questions. Most current: Find overlapping intervals
[16:20:51] lpvn: platzhirsch: I love interview questions, what's this one about finding overlapping intervals?
[16:21:28] platzhirsch: lpvn: Example: [(1,5), (10,15), (20,25)] inserting (12,27) => [(1,5), (10, 27)]
[16:21:38] platzhirsch: so, given, ordered intervalls, insert new one, merge if necessary
[16:22:22] platzhirsch: since it's already ordered O(n) shouldn't be hard
[16:24:08] BrixSat: is rubygems the same as gems?
[16:24:45] BrixSat: how do i install it in ubuntu? any easy step?
[16:26:43] MrZYX: iirc you want to install the ruby-full package
[16:27:16] BrixSat: do i really need to?
[16:27:48] BrixSat: I just wanto to run fluent-plugin-elasticsearch wich is a plugin to fluent/td-agent
[16:28:09] platzhirsch: oh yeah, just go with MrZYX's advice
[16:28:36] BrixSat: full package?
[16:28:53] popl: http://packages.ubuntu.com/search?keywords=rubygems&searchon=names&suite=saucy&section=all
[16:29:03] popl: oh look, a rubygems package
[16:30:04] platzhirsch: Don't separate the calf from his mother
[16:30:35] bubu: Hey guys, what ruby library do I need to use to generate a date timestamp like "2011-04-06T21:09:12Z" ?
[16:31:05] bubu: Time.now.xmlschema gets me almost there
[16:31:20] YOURBESTFRIEND: >> Time.now.to_s
[16:31:20] eval-in: YOURBESTFRIEND => "2014-02-04 17:43:10 +0100" (https://eval.in/97922)
[16:31:33] platzhirsch: YOURBESTFRIEND: it's you again
[16:31:56] platzhirsch: Don't mind me
[16:32:31] bubu: YOURBESTFRIEND: not quite what I'm after ^^
[16:32:52] tobiasvl: >> Time.now.xmlschema
[16:32:52] eval-in: tobiasvl => undefined method `xmlschema' for 2014-02-04 17:44:42 +0100:Time (NoMethodError) ... (https://eval.in/97924)
[16:33:33] YOURBESTFRIEND: isn't it a rails thing anyway?
[16:34:05] eval-in: YOURBESTFRIEND => 2014-02-04 17:45:54 +0100 ... (https://eval.in/97925)
[16:34:34] eval-in: YOURBESTFRIEND => undefined method `now' for Date:Class (NoMethodError) ... (https://eval.in/97926)
[16:36:51] MrZYX: >> Time.now.iso8601
[16:36:51] eval-in: MrZYX => undefined method `iso8601' for 2014-02-04 17:48:41 +0100:Time (NoMethodError) ... (https://eval.in/97928)
[16:36:57] bubu: hmm, it is a rails thing
[16:37:00] MrZYX: >> require 'time'; Time.now.iso8601
[16:37:00] eval-in: MrZYX => "2014-02-04T17:48:50+01:00" (https://eval.in/97929)
[16:37:38] bubu: MrZYX: Hmm, but is that the same as "2011-04-06T21:09:12Z" ?
[16:37:51] bubu: >> Time.now.xmlschema
[16:37:52] eval-in: bubu => undefined method `xmlschema' for 2014-02-04 17:49:41 +0100:Time (NoMethodError) ... (https://eval.in/97930)
[16:38:04] MrZYX: >> require 'time'; Time.now.utc.iso8601
[16:38:04] eval-in: MrZYX => "2014-02-04T16:49:54Z" (https://eval.in/97931)
[16:39:21] platzhirsch: shevy: https://www.dropbox.com/s/9b9q4g0nx1dc04n/C55018A5-25C0-472C-9BBB-654DDC1F3566.jpg
[16:40:49] MrZYX: bubu: 2min with pry btw
[16:40:59] MrZYX: just trying all the methods
[16:41:18] bubu: MrZYX: Aye, using pry for 10 mins now, had tried Time.now.iso8601.utc
[16:41:45] MrZYX: you get a string back, how should that have an #utc method
[16:41:58] tobiasvl: you never know in rails???
[16:43:08] bubu: same as Time.now.utc.xmlschema too btw
[16:44:16] shevy: I had severe internet problems
[16:44:26] shevy: I feel worse without internet :(
[16:49:30] platzhirsch: shevy: https://www.dropbox.com/s/9b9q4g0nx1dc04n/C55018A5-25C0-472C-9BBB-654DDC1F3566.jpg
[16:49:46] platzhirsch: then look at that Pud?? baby deer and feel better
[16:51:01] shevy: platzhirsch is that your girl?
[16:51:11] Xuisce1: yo chrisja
[16:51:25] platzhirsch: shevy: lol, my baby daughter or what
[16:51:25] shevy: that looks heavily photoshopped btw
[16:51:28] Xuisce1: I finished a ruby project
[16:51:28] Xuisce1: its very basic
[16:51:44] shevy: good Xuisce
[16:51:46] shevy: now write more
[16:51:46] platzhirsch: shevy: They just look a bit different. South American deers
[16:51:49] shevy: and kill your other nick
[16:51:57] shevy: platzhirsch really?
[16:51:58] shevy: they look like tiny deers
[16:52:08] platzhirsch: they don't get very big, so the babys look a bit Pok??mon like
[16:53:24] shevy: awful creatures
[16:53:26] shevy: let's kill them
[16:53:49] platzhirsch: They are already endangered
[16:54:04] shevy: then it will be easy to do away with them :)
[16:54:14] platzhirsch: yeah just wait
[16:54:17] shevy: I was really worried for a moment that there are many of them :P
[16:54:49] shevy: Xuisce1 write write write
[16:54:53] platzhirsch: ACTION blisters Xuisce
[16:55:07] Xuisce1: I'll upload it to github
[16:55:09] shevy: Xuisce1 make mistakes and learn
[16:55:09] shevy: Xuisce1 improve and repeat
[16:55:09] shevy: Xuisce1 where are you on rubygems.org btw?
[16:55:10] Xuisce1: IM learning that now
[16:55:21] Xuisce1: im not there shevy
[16:56:05] shevy: Xuisce1 yes, you should register at rubygems.org
[16:56:35] Xuisce1: shevy: whys that?
[16:56:39] Xuisce1: and i will
[16:56:43] Xuisce1: whats its purpose ?
[16:57:58] shevy: Xuisce1 so that "gem install name" works from the commandline
[16:59:17] Xuisce1: shevy: im confused
[16:59:24] Xuisce1: why would I need it for now :p since I'm a beginner
[16:59:47] shevy: Xuisce1 because that way people can distribute and make use of code
[16:59:59] Xuisce1: shevy: still a bit confused
[17:00:02] shevy: Xuisce there is no beginner. there is only lazy people and people who are not lazy
[17:00:23] Xuisce1: shevy: what do you mean about make use of the code?
[17:00:31] Xuisce1: sorry I'm totally new to programming
[17:00:39] shevy: Xuisce1 as you write code that does something useful, it can be useful not only to you but to others as well
[17:00:59] Xuisce1: well shevy the only project that I've done is a simple few lines
[17:01:07] Xuisce1: and why cant I use github for that?
[17:02:10] shevy: Xuisce1 github is useless
[17:02:19] shevy: I cant easily do "gem install bla" if bla is on github
[17:02:22] Xuisce1: shevy: intersting
[17:02:29] Xuisce1: well its the biggest I think..
[17:02:36] Xuisce1: thats why I signed up for it
[17:02:50] MrZYX: Xuisce1: shevy is a bit... conservative. don't take everything he says for the general truth ;)
[17:03:05] shevy: what is conservative about my statements?
[17:03:27] MrZYX: let's say very opinionated then
[17:03:35] Xuisce1: Github has most things ..
[17:03:41] Xuisce1: like my IRC client's repository
[17:03:46] shevy: people who don't have an opinion are just by-standers
[17:03:49] Xuisce1: and well most programs you'd except that are open source
[17:03:59] Xuisce1: so its handy for me
[17:04:05] shevy: MrZYX are you very opinionated? :)
[17:04:07] Xuisce1: and its what most programmer use
[17:04:23] MrZYX: shevy: yes, but I don't communicate by opinions as the universal truth
[17:04:38] shevy: but you did when it was about rack!
[17:05:07] MrZYX: because there were you at the same time showing that there's more than one standpoint
[17:05:40] shevy: yes, that is my standpoint and you communicated another standpoint :)
[17:05:58] MrZYX: you didn't know that I'll respond when you did
[17:06:26] shevy: you never did before as far as I can remember either :)
[17:07:31] shevy: Xuisce1 what is your IRC client?
[17:08:32] platzhirsch: phansch: You can code at meetups
[17:09:09] terrellt: You can code whenever you want! Free countries. Usually.
[17:09:25] phansch: Think I'm gonna do just that :D
[17:10:00] olivier_bK: i try to read a file and redirect the content in csv file https://gist.github.com/zyriuse75/051ac3a38707f8c8987a
[17:10:24] olivier_bK: i can print it but i cant send the content to the csv file
[17:10:24] shevy: olivier_bK are you sure you did that
[17:10:37] shevy: because your code starts with CSV.open()
[17:10:57] shevy: btw, where from does array come?
[17:13:00] MrZYX: olivier_bK: "I can't" is not an adequate problem description
[17:13:02] olivier_bK: shevy, array it's a variable with a lot of thing
[17:13:27] shevy: olivier_bK, ok but how can we reproduce
[17:13:40] olivier_bK: MrZYX, i can print it but i dont know how to send it to the csv file :)
[17:13:51] Xuisce1: github is hard
[17:13:54] shevy: olivier_bK can't you just save as 'foo.csv' anyway?
[17:14:11] MrZYX: olivier_bK: what's wrong with your current approach?
[17:14:37] MrZYX: Xuisce1: not any harder than any other SCM in the long term
[17:15:05] olivier_bK: i dont know how to send the resultat in the csv file
[17:15:25] MrZYX: so what happens with your current approach?
[17:15:36] Xuisce1: MrZYX: well I'm learning it kinda
[17:15:46] MrZYX: give it some time ;)
[17:15:47] Xuisce1: http://lifehacker.com/5983680/how-the-heck-do-i-use-github
[17:15:49] shevy: olivier_bK are you saving the file?
[17:15:54] Xuisce1: is this ok MrZYX ^
[17:16:38] BrixSat: how do i manual install a plugin? like fluent-plugin-elasticsearch-0.2.0
[17:16:44] MrZYX: Xuisce1: sure
[17:17:04] centrx: BrixSat, Use gem or bundler
[17:17:05] platzhirsch: I need to name one of my projects pud??, now I have to find a purpose for this application
[17:17:25] BrixSat: centrx: i dont have it installed in the production server :/
[17:18:27] BrixSat: centrx: what would gem install do?
[17:18:33] havenwood: BrixSat: gem install fluent-plugin-elasticsearch -v 0.2.0
[17:18:46] havenwood: BrixSat: It would install the gem.
[17:18:52] Xuisce1: I'm reading it
[17:19:01] BrixSat: havenwood: i dont have gem......
[17:19:21] havenwood: BrixSat: Are you using an ancient Ruby?: ruby -v
[17:19:38] havenwood: BrixSat: Do you have Ruby installed? :P
[17:20:05] havenwood: BrixSat: RubyGems comes with Ruby these days.
[17:20:46] BrixSat: havenwood: ruby command not found
[17:20:58] BrixSat: havenwood: i dont have ruby but im running a rubby app called fluentd
[17:21:11] BrixSat: i believe ruby is only availiable to that app
[17:22:31] shevy: BrixSat did you try to look at and in the install path of that app?
[17:22:51] MrZYX: BrixSat: I think you should seek support by whoever set that up or whoever wrote the tutorial you followed
[17:22:57] BrixSat: yes the install has ruby folders inside it
[17:23:11] shevy: BrixSat nono that alone is not enough, try to find bin/ directories there
[17:23:17] BrixSat: /usr/lib/fluent/ruby/lib/ruby/gems/1.9.1/
[17:23:20] MrZYX: BrixSat: from the information you give we can only hope and make assumptions because we neither know the system nor your setup
[17:23:28] shevy: that is a very unusual, messy path
[17:23:50] shevy: Here is my path: /usr/lib/ruby/gems/1.9.1/
[17:24:15] shevy: so your --prefix is: "/usr/lib/fluent/ruby", mine is "/usr"
[17:24:45] shevy: BrixSat does this work: stat /usr/lib/fluent/ruby/bin/ruby
[17:25:25] shevy: if you find the guy in reallife, tie him up and lock him away :P
[17:25:30] BrixSat: shevy: yes
[17:25:43] BrixSat: ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]
[17:26:01] Guest33330: Oh god, what is this directory layout?
[17:26:03] shevy: so there he is hiding it!
[17:26:10] lessless: what do [1..10] mean??
[17:26:14] shevy: lessless a range
[17:26:17] Morrolan: ACTION stabs BrixSat with the FHS
[17:26:20] shevy: Morrolan it's a path from hell
[17:26:21] MrZYX: lessless: depends on the context
[17:26:31] shevy: >> [1..10].to_a
[17:26:31] eval-in: shevy => [1..10] (https://eval.in/97937)
[17:26:33] Morrolan: Sounds like it, shevy. :P
[17:26:54] MrZYX: lessless: but that alone is a range in an array
[17:27:06] shevy: that got me
[17:27:08] shevy: >> (1..10).to_a
[17:27:18] shevy: where is the bot
[17:27:27] MrZYX: he doesn't like you anymore
[17:27:37] lessless: square brackets confused me a bit :)
[17:27:43] shevy: me as well
[17:28:11] shevy: >> [1..10][0].to_a
[17:28:11] eval-in: shevy => [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] (https://eval.in/97939)
[17:28:18] shevy: the bot works every 2nd try
[17:28:39] MrZYX: >> "foooobaaarrr"[1..10]
[17:28:56] centrx: >> puts "I am a lazy bot"
[17:28:57] eval-in: centrx => I am a lazy bot ... (https://eval.in/97940)
[17:29:01] Rylee: >> "foooobaaarrr"[1..10]
[17:29:01] eval-in: Rylee => "oooobaaarr" (https://eval.in/97941)
[17:29:47] sdelmore1: I'm stumped on the worlds simplest code, wanted to run it by someone else in case I am suffering brain freeze. In my intializer I set a variable, freeze it, and then set it again and can't get it to raise an error.
[17:29:48] shevy: perhaps he keeps a counter
[17:29:55] shevy: those who used the bot too often, will be ignored
[17:30:09] shevy: sdelmore1 can you upload code to pastie pls
[17:30:10] sdelmore1: @faulty = nil
[17:30:10] sdelmore1: @fault.freeze
[17:30:10] sdelmore1: @fault = true
[17:30:17] shevy: no please the whole code?
[17:30:23] shevy: is that the same var
[17:30:37] MrZYX: sdelmore1: the frozen state is a property of the object assigned to the variable, not the variable itself
[17:30:41] sdelmore1: I typoed it, but that is the whole code. I am just trying to verify freezing works.
[17:30:58] centrx: sdelmore1, Verify it with an Array or a Hash
[17:31:04] MrZYX: sdelmore1: you may want a CONSTANT instead
[17:31:31] centrx: << fault = [].freeze; fault << 1
[17:31:35] sdelmore1: Ahhh???..any way to prevent something from being modified? I am backing into this through missing a watch feature of a debugger. I have a variable faulty getting set to true, then later at some point it gets set again to false but I can't figure out where.
[17:31:42] havenwood: sdelmore1: Freezing doesn't prevent you from reassigning the variable.
[17:31:53] sdelmore1: Just thought freeze would help but clearly that isn't the right approach.
[17:32:11] Morrolan: It prevents mutable objects from getting modified.
[17:32:16] shevy: freeze sucks in general
[17:32:20] Morrolan: It doesn't do anything to the variable, i.e. the name you assign the object to.
[17:32:28] shevy: especially in reallife
[17:32:45] sdelmore1: What is a good ruby way to track down what is toggling this variable?
[17:32:59] daju: Someone have a sec to help me?
[17:33:14] MrZYX: daju: not if you ask ;)
[17:33:14] Morrolan: Err, make a method out of it, I'd assume.
[17:33:17] centrx: I have ten seconds, go!
[17:33:19] shevy: sdelmore1 if it is a global var you can use set_trace_var
[17:33:23] Morrolan: (And log something when it's called)
[17:33:27] Morrolan: shevy: Huh?
[17:33:29] sdelmore1: It is an instance variable.
[17:33:32] Morrolan: Such a thing exists? :o
[17:33:55] shevy: Morrolan I actually meant http://ruby-doc.org/core-1.9.3/Kernel.html#method-i-set_trace_func :P
[17:34:21] centrx: sdelmore1, grep the code for the variable name...
[17:34:22] shevy: ruby documentation still is awful :(
[17:34:42] centrx: shevy, You fool! Ruby documentation is excellent
[17:35:03] daju: okey MrZYX :) Trying to do a $ git reset XXX Byt the files in my project map dosen't change to the prior version.. How do I do this right?
[17:35:23] MrZYX: interesting #ruby question...
[17:35:35] sdelmore1: That is the issue, I already grepped it and can't find anything that is changing it's value. Not sure if there is some metaprogramming or something going on.
[17:35:40] havenwood: sdelmore1: Checkout the adamantium gem: https://github.com/dkubb/adamantium
[17:35:42] MrZYX: daju: sure this isn't a #git one? ;)
[17:36:19] centrx: I take it all back
[17:37:28] centrx: sdelmore1, attr_writer, attr_accessor, method definitions, instance_variable_set
[17:37:53] centrx: instance_eval :(
[17:39:50] Rylee: daju, fwiw: `$ git reset` will only undo commits made but not pushed. You want `$ git reset --hard` if you want to reset the tree to the HEAD before you committed anything.
[17:40:27] MrZYX: git reset doesn't care whether commits are pushed or not
[17:40:48] Rylee: Maybe my headcanon is wrong then :p
[17:41:40] tobiasvl: be very careful with `$ git reset --hard`
[17:41:48] Rylee: definitely, yes
[17:42:39] daju: Rylee: nopp the files dosen't change
[17:42:55] platzhirsch: Picking the right tool for your task is an awful metaphor for picking a language, isn't it?
[17:43:12] workmad3: Rylee: git reset affects the uncommited index
[17:43:12] daju: *doesn't
[17:43:14] platzhirsch: As if it is better to pick Python, Ruby or Java to implement some generic web application
[17:43:19] workmad3: Rylee: which git reset --hard also affects the working tree
[17:44:06] Rylee: ahh, yes, tahnks
[17:44:17] workmad3: platzhirsch: how about picking the right philosophy for yourself and your goals? :)
[17:44:52] platzhirsch: workmad3: Yep, that sounds appropriate. I thought it comes down to the language's ecosystem
[17:45:26] workmad3: platzhirsch: ecosystem, ethos, developers levels of knowledge, comfort and development practices...
[17:45:34] platzhirsch: now I need to craft this gem of a thought into a tweet.
[17:45:58] workmad3: platzhirsch: so it's kinda a tool, but only if you extend 'tool' to mean an entire mode of thinking :)
[17:46:25] workmad3: platzhirsch: or maybe you just go for the simpler metaphor - pick the right toolbox for your task
[17:47:35] workmad3: or hell... prepare the right toolbox for your task...
[17:48:22] platzhirsch: no, the toolbox doesn't exist. It means "The coding is the toolbox"
[17:48:42] platzhirsch: Like, The Journey is the destination
[17:49:25] workmad3: platzhirsch: I was more getting at the metaphor that the toolbox is language + ecosystem + knowledge/practices etc
[17:49:43] platzhirsch: workmad3: ^^ of course, just wanted to derail the discussion
[17:50:01] workmad3: platzhirsch: also, wasn't The Journey an 80's pop band?
[17:50:29] workmad3: platzhirsch: heh :) you were trying to get all zen on me? :P
[17:52:12] workmad3: platzhirsch: mu you :P
[17:52:43] platzhirsch: Tweet has been crafted and published to the internet. Sorry. no character's left for attribution workmad3 ... :[
[17:52:57] olivier_bK: how cna i do in ruby for read file send data to csv file ?
[17:53:25] workmad3: platzhirsch: link? :)
[17:53:42] platzhirsch: https://twitter.com/platzhirsch122/status/430760703696203776
[17:58:39] platzhirsch: who is Austen Gary, I reckon not workmad3 :P
[18:01:29] platzhirsch: well I guess this was random
[18:07:49] platzhirsch: The engineering manager at Groupon favourited this tweet. He should hire me
[18:08:03] platzhirsch: Job interviews obsolete, obviously
[18:13:36] workmad3: platzhirsch: a world where people are hired from tweets? sounds scary (I don't tweet much)
[18:15:31] platzhirsch: Unfortunately, you are right. Ok then, back to my coding interview questions
[18:16:59] atmosx: the RPi is awesome, I mean ti's a art... but when compiling shit on it, I wanna break it into pieces
[18:17:03] atmosx: it takes forever
[18:17:26] atmosx: and now I need to wait for sequel to finnish and THEN install sqlite3 ... which will compile (argh!)
[18:22:53] platzhirsch: atmosx: Hah, yeah when compiling something on it, the RPi is really is a time machine
[18:23:10] platzhirsch: I installed GNU Screen for compiling something on it, because I didn't want to keep the SSH connection up
[18:24:28] atmosx: platzhirsch: yeah makes sense. I use tmux... I should install tmux come to think of it
[18:26:14] atmosx: nginx now support spdy
[18:26:17] Uranio: hi, for devel ruby: emacs or vim?
[18:26:32] MrZYX: Uranio: what you like best
[18:26:47] atmosx: I don't get it https://put.io/#learn
[18:26:53] atmosx: Uranio: vim for the win
[18:27:00] platzhirsch: ACTION parries Uranio's troll attempt
[18:27:07] atmosx: Uranio: can you use emacs?
[18:27:18] atmosx: Uranio: I mean like *Really use it*
[18:27:21] Uranio: MrZYX: I just used until today Vim, but many people tell that emcas would be better for me
[18:27:31] MrZYX: ignore them
[18:27:42] Uranio: atmosx: define really
[18:27:47] platzhirsch: Uranio: come on man :P
[18:28:18] atmosx: Uranio: http://www.youtube.com/watch?v=EQAd41VAXWo
[18:28:25] platzhirsch: That's like drinking coffee and people come to tell you drink tea, it's better for you.
[18:28:33] Uranio: platzhirsch: please, people, where could I ask a question like this
[18:29:00] platzhirsch: Uranio: You can google for Vim vs. Emacs, advantages, disadvantages
[18:29:09] tobiasvl: but when it comes down to it
[18:29:13] Uranio: platzhirsch: I beng using mcedit for a lon time, until somebody suggest me use Vim, due the syntax
[18:29:15] tobiasvl: it's a religion
[18:29:16] atmosx: platzhirsch: vim doesn't have disadvantages (c)
[18:29:28] Uranio: the better for me would be the best for ruby syntax
[18:29:42] platzhirsch: I reckon that Vim is favored in the Ruby community, so maybe the plugin support is better
[18:30:01] Uranio: platzhirsch: THATS is a good answer
[18:30:13] Uranio: vim is in the ruby side, more than emacs
[18:30:15] platzhirsch: I don't know if it's true
[18:30:17] Uranio: it is correct?
[18:30:19] MrZYX: Uranio: again, there isn't the objectively best editor, this has been proven by the tons of debate around that topic. There only is the best editor for you
[18:30:54] atmosx: objectively, vim and emacs are superior to anything else.
[18:30:58] Uranio: MrZYX: thinking like that I would be writing a ton of code using mcedit with only one buffer
[18:31:01] platzhirsch: The question is really just a specialized formulation of the problem "What is the meaning of life"
[18:31:15] atmosx: platzhirsch: 42?
[18:31:18] tobiasvl: atmosx: on that, if nothing else, all emacs and vim users can agree
[18:31:28] atmosx: tobiasvl: word
[18:31:30] platzhirsch: No, to find the meaning for your life yourself. Tailored :P
[18:31:35] atmosx: Uranio: http://www.youtube.com/watch?v=9jzWDr24UHQ
[18:31:55] MrZYX: Uranio: you change and the market changes, so of course try something new every couple of years. Doesn't change the fact that there's not the perfect fit for everybody
[18:32:19] MrZYX: there's only the perfect fit for you
[18:32:26] MrZYX: if anything
[18:33:00] platzhirsch: now I wonder whether I should use tmux over GNU Screen
[18:33:15] Uranio: platzhirsch: I agree
[18:33:38] Uranio: [0] 0:#ruby* 1:vim- 3:irb
[18:33:51] platzhirsch: I use terminator
[18:33:59] platzhirsch: pew pew --o ---o
[18:34:14] havenwood: If you use vim, emacs is better. If you use emacs, vim is better. Nothing wrong with Sublime, TextMate or LightTable when you're not playing golf.
[18:35:12] Uranio: havenwood: or genay, but prefer the console
[18:46:18] platzhirsch: How would you check if two intervals overlap? I have on that uses an ordered series of if's but I don't like it. Is it possible with min and max?
[18:47:06] aces1up9939: can someone help me with this regex? http://rubular.com/r/Ge4vhr8S7i
[18:47:18] aces1up9939: i'm trying to get it so just the first </B> is captured.
[18:47:30] aces1up9939: the text between ex I don't want it to be greedy somehow.
[18:47:57] MrZYX: aces1up9939: .*?
[18:48:21] momomomomo: aces1up9939: So, you want to collect between <li> all the way up to, but not including </b>?
[18:48:59] momomomomo: aces1up9939: just wrap the first part in parentheses and use the first/second match groups
[18:49:45] aces1up9939: momomomomo hrmm thought thats what i was doing.
[18:50:07] MrZYX: aces1up9939: my answer wasn't a question: (.*?)
[18:50:20] aces1up9939: <li><B>(.*?)<\/B>
[18:50:25] aces1up9939: yes that worked, thanks.
[18:50:33] Guest6005: installed ruby as root on ubuntu, get access errors for others - how can i change access perms without reinstalling?
[18:50:43] aces1up9939: so the greedy as to come before the match you want?
[18:50:49] aces1up9939: ok i thought it was supposed to come after.
[18:50:57] mjc_: Guest6005: you should use something like chruby or rbenv or rvm
[18:51:15] mjc_: I'm personally fond of chruby but any of them will do
[18:51:23] MrZYX: aces1up9939: adding ? after + or * makes that operators non-greedy
[18:52:27] aces1up9939: MrZYX thanks.
[18:53:16] aces1up9939: MrZYX what string match would i use to loop through those matches? str.match?
[18:53:40] MrZYX: I'd use scan
[18:53:46] Guest6005: mjc_ rvm installed as root too :/
[18:54:00] mjc_: Guest6005: doesn't rvm explicitly say not to do that?
[18:54:13] karl___: what is the best way to test if a string contains any of several other strings? I'm currently using a bunch of || conditionals in a row, e.g. if stringVariable =~ /foo/ || stringVariable =~ /bar/ ||
[18:54:15] MrZYX: aces1up9939: http://rubydoc.info/stdlib/core/String#scan-instance_method
[18:54:30] tobiasvl: karl___: (foo|bar) ?
[18:56:14] karl___: tobiasvl: could you give an example?
[18:57:58] karl___: thank you :)
[19:07:56] platzhirsch: lpvn: so where is the solution to my interview question I have requested
[19:08:28] axsuul: someone please recommend me a gem to build a CLI tool with ruby
[19:08:30] havenwood: platzhirsch: gem install job_interview
[19:08:43] platzhirsch: nevermind, did it myself https://gist.github.com/platzhirsch/689f0e8a4ba2f0fb7ae1
[19:08:53] platzhirsch: axsuul: trollopt
[19:09:01] platzhirsch: ah CLI, nevermind
[19:09:34] platzhirsch: well, do it yourself. Because writing a repl in Ruby is awfully easy, isn't it
[19:12:44] platzhirsch: axsuul: http://citizen428.net/blog/2010/05/12/a-poor-mans-repl-in-ruby
[19:15:09] aloitius1: Hey, all. I'm tearing my hair out trying to figure out why I'm getting a "cannot load such file -- mygem" where "mygem" is a gem I have on a local gitlab repo. The gem is installed. From RubyMine (though it fails both in RM and on the commandline) I can ctrl+click the "require mygem" and see the source code in my ~/.rvm/gems/ruby-2.1.0 directory. The only thing I see that's different from other gems I'm able to 'require' successfully is that the other gems
[19:15:09] aloitius1: are in the 2.1.0/gems or 2.1.0/lib directory, but my gem is in the 2.1.0/bundler/gems.
[19:15:56] lpvn: platzhirsch: lol will you hire me?
[19:16:18] MrZYX: aloitius1: so you added your gem to your Gemfile?
[19:16:37] aloitius1: Yep. Added, bundle-installed...
[19:16:44] platzhirsch: lpvn: What? Why? ^^
[19:17:07] MrZYX: aloitius1: so make sure you have required bundler/setup first or to run your commands with bundle exec
[19:18:05] aloitius1: MrZYX: Crap. That's it. I forget that way more often than I should. Thanks.
[19:33:01] starfox21: sorry about that :)
[19:35:11] platzhirsch: lpvn: ah ok, because I said requested the answer to the question
[19:36:36] lpvn: platzhirsch: I'll try to solve it, I'm a bit rusty in the algorithm department though hahaha
[19:36:51] Sc0rp10n: can anyone give me a good resource to start TDD with rails?
[19:37:16] Sc0rp10n: I've been developing apps in rails for a while but never looked into TDD
[19:37:24] starfox21: hey guys, I have a csv with about 500k sites. I want to fetch the homepage of those 500k sites and grep for certain keywords. I was thinking of building a multithreaded script to do this. What are some ruby libraries that I could be useful for doing this?
[19:40:48] platzhirsch: lpvn: well I have a reference solution if you want :P it's really not a hard problem, but what interview question really is
[19:41:17] MJBrune: please give me your years of experience in windows s-kill.
[19:41:43] MJBrune: "umm windows as skill?"
[19:41:54] MJBrune: "yes windows skl"
[19:42:05] MJBrune: OOOH MS SQL?
[19:42:12] lpvn: platzhirsch: yeah, it's easy to see a solution to that challenge but writing code to solve it is something that takes some time if you're not used to it
[19:42:21] MJBrune: god recruiters are horrid
[19:42:31] centrx: stay away
[19:42:50] MJBrune: from recruiters?
[19:43:23] centrx: From that one
[19:43:33] platzhirsch: lpvn: yeah, took me now some hours to finish the code. It was a question in a phone interview
[19:43:41] platzhirsch: at least I am killing the ghost from the past
[19:43:47] MJBrune: I'd like to but sometimes you have to go through off-shore recruiters to get good local jobs
[19:44:53] lpvn: platzhirsch: did it really take some hours for you to finish the code or you're being sarcastic?
[19:45:27] platzhirsch: lpvn: no really. I started at 13.00 o'clock. I haven't worked all the time and pursued a stupid solution while doing so
[19:45:39] platzhirsch: 13.00 o'clock is thick. so at 13.00
[19:46:07] shevy: yeah we git it
[19:46:09] platzhirsch: I would say 2h of working straight
[19:46:14] shevy: that's your time to shine
[19:46:38] shevy: hey pontiki, ponbiki is still in the house!
[19:46:53] pontiki: i have no idea who ponbiki is
[19:47:26] MJBrune: platzhirsch: the most important thing in phone interviews is that you want to explain your thought process. Even if you are wrong or don't know exactly how from the very second it's asked if you figure it out or get the solution mostly done on the spot then the rest can be written off as nerves and the fact you aren't a computer.
[19:47:28] shevy: b for brother brogrammer!!!
[19:47:29] platzhirsch: pontiki: she's a relative of you
[19:48:18] shevy: that makes pontiki happy to know
[19:48:27] shevy: relatives all of the world
[19:48:33] shevy: over, rather
[19:48:53] platzhirsch: MJBrune: good advice, I have learned that. It's not only important to communicate your thought process, but it's also a necessity to shift your problem solving mode from silently thinking and doodling to talking out loud
[19:49:56] platzhirsch: I had a interview witha Microsoft recruiter, he gave me two brain teaser and in one he really got me through the question to the final solution with small bits of help.. That was the first time
[19:51:08] MJBrune: platzhirsch: shouldn't be a big issue as long as you don't stumble over a ton of stuff :)
[19:51:32] platzhirsch: MJBrune: well the good thing is, you can get better at those things.
[19:52:02] MJBrune: yeah. A lot of technical interviews are simply personality under stress.
[19:52:42] platzhirsch: so far at least the most were really nice chats, I enjoyed them. But I never excelled in the coding stuff at the end, so it really never came to a second Skype interview
[19:53:20] platzhirsch: so more practice, maybe 50-100 question practicing :P
[19:54:00] platzhirsch: These were always jobs abroad, so naturally they put the bar higher
[19:55:03] momomomomo: the toughest part of technical interviews for me is if they have you hop into a random (usually sloppy/ugly) code base, and try to solve some made up problems; helping people on here / SO / reading through other people's source code helps quite a bit platzhirsch
[19:55:33] Tai: This is good advice.
[19:55:37] Tai: ACTION starts taking notes.
[19:55:54] platzhirsch: momomomomo: Wow, I have heard of that, but never occurred to me. I read that some do it to get some work done for free
[19:56:38] platzhirsch: Tai: If you know stuff about a language's core library, like implementation of data structures, utility functions, sorting, etc. and you can communicate that knowlegde in an interview,.. absolute burner, they will love you :P
[19:56:54] momomomomo: platzhirsch: I had one with a company that had some old, ugly, code which solved a made-up problem; then they'll throw a wrench in the code and have you fix various aspects of it
[19:57:24] MJBrune: that seems kind of a good system
[19:57:35] platzhirsch: Does it? Sounds awful ^^
[19:58:38] platzhirsch: At a friend's company they let you implement a small application during the day
[19:58:55] dorei: is stdlib's dbm the only option for handling berkley db files?
[19:59:34] MJBrune: platzhirsch: eh I mean its moer realistic of what you will be doing
[19:59:46] MJBrune: working with outdated code bases to implement new fixes/features
[20:00:33] d00n: the best ones : here solve this problem. Here is a white board, and a marker. Pick a language you like. You have 15 minutes. go??? Fun Fun Fun.
[20:00:40] platzhirsch: Yeah, but it's the same problem, you have to act directly :)
[20:00:56] MJBrune: d00n: yeah those are simple.
[20:01:16] d00n: yeah when it is fizz buzz ;)
[20:01:34] MJBrune: fizzbuzz is so easy
[20:01:53] momomomomo: but can you do it??? in brain fuck?
[20:02:10] momomomomo: http://www.muppetlabs.com/~breadbox/bf/
[20:02:30] Tai: hey, since we're talking about jobs, i'm kinda new to ruby and trying to learn it so i can get away from IT into doing like web development
[20:02:34] Tai: anyone have any advice?
[20:02:40] centrx: Learn Ruby
[20:02:55] centrx: ON Rails!
[20:03:00] platzhirsch: IT is not Web Development?
[20:03:02] MJBrune: ruby, C++, Javascript and everything else.
[20:03:20] d00n: Tai: scotch?
[20:03:22] Tai: well, I'd like to spend less time repairing printers
[20:03:23] platzhirsch: Web Development is not a subset of IT?
[20:03:32] Tai: that's where i was going with that
[20:03:40] momomomomo: platzhirsch: not typically when talking in terms of what people think of when you say 'IT'
[20:03:48] momomomomo: platzhirsch: Usually, IT is synonymous with 'help desk'
[20:03:49] Tai: right now I do like, mostly freelance jobs for offices that have shit break
[20:03:53] wmoxam: Tai: do you have sys admin/network admin experience?
[20:04:10] Tai: not a lot wmoxam
[20:04:13] wmoxam: Tai: if so you should look into puppet/chef
[20:04:18] platzhirsch: Tai: shit man, yeah buy a draisine, and pick a laptop and some nice rails
[20:04:35] d00n: yeah was going to say devops could be a good path in from traditional "IT"
[20:05:14] MJBrune: let me ask this, is it stupid that I know ruby but in interviews I ask to use C++ as its my core language. Unless something is ruby specific.
[20:05:35] maasha: What is the story of autoload. smart -> dead -> ?
[20:05:44] wmoxam: MJBrune: depends on the context :p
[20:05:44] Tai: I'll look into it d00n
[20:05:51] centrx: maasha, The objection to it was fixed. That was my conclusion
[20:06:07] Tai: but yeah, right now I'm just spending all my free time doing ruby and ruby on rails and github
[20:06:13] maasha: centrx: and that was thread-unsafe?
[20:06:43] centrx: maasha, Right
[20:06:53] d00n: Tai: if you don't have lots of sysadmin experience, Devops might be rough as there are couple different disciplines there.
[20:07:02] platzhirsch: MJBrune: I nearly always got the choice to pick my own language. I think its important to know language details when you write them as your strengths on the resume
[20:07:50] d00n: MJBrune: yeah depends on context and what I need to. Depending upon problem I'll fall back to perl if I need to (Shudder). Unless of course the job is specifically looking for Ruby programmers ..
[20:07:56] MJBrune: platzhirsch: right, I know ruby well enough to do almost anything but C++ is my core and my default when I get nervous
[20:08:21] platzhirsch: MJBrune: I only was asked to do something in C for pointer stuff, well..
[20:08:30] platzhirsch: third and last interview at MongoDB *sob*
[20:08:34] Tai: I guess I just wanted to know I wasn't wasting my time. Like, if I worked hard and learned the stuff, I could actually get a job with it, even though I don't have a CS degree.
[20:08:45] MJBrune: is mongo bad?
[20:08:59] d00n: working hard and learning stuff is never a waste of time.
[20:09:11] maasha: centrx: thing is, that if I google "ruby autoload" I get some hits on articles from 2009 and then the 2011 story saying that autoload will be dead. Nothing tells me to autoload or not.
[20:09:25] shevy: maasha matz does not approve of autoload
[20:09:37] platzhirsch: MJBrune: Bad? Bad how
[20:09:39] maasha: shevy: why?
[20:09:44] platzhirsch: d00n: HUSTLING
[20:09:53] shevy: maasha dunno
[20:10:08] maasha: shevy: and when was that?
[20:10:34] centrx: maasha, The bug was closed
[20:10:56] centrx: That autoload deprecated is old news, not
[20:10:59] shevy: maasha, https://www.ruby-forum.com/topic/3036681
[20:11:05] centrx: There have been two ruby release since then
[20:11:11] shevy: "But autoload itself has fundamental flaw under multi-thread environment."
[20:11:12] Tai: okay, thanks d00n
[20:11:12] MJBrune: platzhirsch: you said third and last interview was with mongodb sob. Is mongo bad?
[20:11:20] centrx: shevy, That was fixed
[20:11:20] maasha: shevy: yup, that is the 2011 story I mentioned.
[20:11:26] platzhirsch: MJBrune: no, I was bad
[20:11:33] shevy: yep, gone for good it is
[20:12:16] maasha: centrx: shevy I find it strange that there is not a ton of recent google hits ruby and autoload.
[20:12:29] shevy: why would there be? I never needed it in all my years
[20:12:54] MJBrune: platzhirsch: oh yeah I don't use mongo but its cool
[20:12:55] maasha: shevy: ah, I see. me bad :o)
[20:13:04] shevy: I am trying to split up my requires into sub-functionality
[20:13:17] shevy: require 'foo/module' <--- fetch standalone stuff into a proper module
[20:13:27] shevy: require 'foo/autoinclude' <--- autoinclusion
[20:13:36] shevy: or just plain require 'foo' for the default (most oftenly used way)
[20:13:40] d00n: Tai: But to answer your question there seems to be lots of places looking for coders . and the learning to code/script wont hurt in other aspects of IT,. So win/win in my book
[20:13:52] platzhirsch: MJBrune: so how do you know it's cool? :P
[20:13:59] Tai: ACTION nods
[20:14:22] Tai: i was looking at a few of the like, become a ruby programmer in 12 weeks schools. what do you think of those?
[20:14:26] MJBrune: platzhirsch: lol because I know basics of it
[20:14:31] momomomomo: Tai: I'm not a fan
[20:14:38] MJBrune: Tai: typically they are bad
[20:14:52] platzhirsch: MJBrune: no it's written in C++ and JavaScript, not Basic
[20:14:52] centrx: maasha, It is not deprecated in 2.1.0, it is still used in Rails, the bug for it is closed as fixed (https://bugs.ruby-lang.org/issues/921), and there is another forum thread from a bigwig later saying "Matz changes his mind sometimes, and the autoload thread-safe thing is fixed"
[20:15:01] Tai: well that answers my question then = )
[20:15:13] momomomomo: Tai: I think they can teach you a framework, somewhat, in 12 weeks, but don't think they'll be everything they promise
[20:15:21] Tai: it would be better just to learn on my own and save the $10k?
[20:15:26] MJBrune: platzhirsch: lol
[20:15:29] momomomomo: Tai: I'd recommend reading http://www.manning.com/black2/
[20:15:30] maasha: centrx: right. thanks.
[20:15:41] momomomomo: Tai: and then going through http://ruby.railstutorial.org/
[20:15:47] MJBrune: platzhirsch: I have a lot of experience with json and was told at an interview that mongo is like parsing json
[20:16:05] d00n: Tai: mixed feelings. bootcamps can help, but all depends on how you are and your learning style. but I've been less than impressed with lots of them.
[20:16:21] Tai: i just started that ruby.railstutorial.org yesterday
[20:16:23] platzhirsch: That does only make an ass tiny bit sense
[20:16:51] Tai: good to know it's worth it
[20:17:42] momomomomo: Tai: it's free, and what I started with when looking at Rails
[20:22:26] platzhirsch: Tai left, that was rude
[20:22:48] shevy: just an IRC noob
[20:23:00] shevy: not everyone understands that on IRC we all idle to power
[20:23:00] platzhirsch: Just sucked all our knowledge down his/her throat and we got nothing
[20:23:18] shevy: what would you have liked in exchange
[20:23:28] apeiros: ACTION must not make inappropriate joke???
[20:24:19] platzhirsch: Speaking of the devil
[20:24:30] MJBrune: so I use C++ mainly for my interviews so std:: comes up a lot
[20:25:10] centrx: MJBrune, You should choose which language to use based on the interviewer. C++ may either be impressive or too old-fashioned.
[20:25:23] centrx: Ruby is impressive either way :)
[20:25:29] lpvn: platzhirsch: https://gist.github.com/anonymous/8811629
[20:25:34] platzhirsch: Exactly, depends on the job
[20:25:35] MJBrune: centrx: well like my last interview was for a Ruby centric position
[20:25:36] shevy: matz disapproves of C++
[20:25:42] MJBrune: centrx: and Iused C++ and Ruby
[20:25:42] platzhirsch: Torvalds, too
[20:25:45] centrx: C++ autoloading is not thread-safe
[20:25:54] shevy: name someone who approves of C++
[20:26:06] centrx: Bjarne Stewstop
[20:26:12] MJBrune: most people like C++
[20:26:22] shevy: other than your cat
[20:26:26] MJBrune: it has a lot of improvements from "the old fashion days"
[20:26:27] platzhirsch: lpvn: "Function that solves an interview question commonly known as platzhirsch's problem." LOL
[20:26:34] lpvn: platzhirsch: naive beyound belief but it's the first thing I could come with lol
[20:26:37] Nilium: ACTION likes C++.
[20:26:48] Nilium: C++11, anyway.
[20:26:53] MJBrune: C++11 is great.
[20:26:58] MJBrune: there is no other C++
[20:27:00] shevy: the higher the number the better
[20:27:03] platzhirsch: looks fucking impressive
[20:27:11] Nilium: I'll be pretty happy if I don't have to use C++98 again.
[20:27:12] shevy: has C++11 finally removed the need for boost?
[20:27:34] havenwood: should do interview questions in blockly
[20:27:50] platzhirsch: Hanmac is a C++ cat
[20:27:52] MJBrune: shevy: basically
[20:27:55] shevy: havenwood no, in MMA fights
[20:27:59] shevy: winners are in, losers out
[20:28:07] Hanmac: ACTION thought he was a fox
[20:28:25] havenwood: shevy: blockly's dart output runs pretty fast
[20:28:27] shevy: platzhirsch but Hanmac is also insane :)
[20:28:40] Hanmac: shevy: yeah but only 50%
[20:28:41] shevy: dart? the language?
[20:28:51] Nilium: shevy: Depends on why you think you need boost, seeing as I never needed it
[20:29:03] havenwood: shevy: yeah, kinda fun to go through the project euler questions in blockly, running the code in dart
[20:29:03] shevy: Nilium you dont play wesnoth! :(
[20:29:38] shevy: Nilium or glob2 http://globulation2.org/wiki/Download_and_Install#downloadlink_source
[20:30:07] shevy: povray wants boost as well
[20:30:14] havenwood: shevy: easier for non-programmers to visualize what is happening, tried the blockly maze?: https://blockly-demo.appspot.com/static/apps/maze/index.html?lang=en&level=10
[20:30:49] Hanmac: shevy WHY??? wesnoth is a funny game
[20:30:59] shevy: Hanmac it was
[20:31:03] shevy: now it is just a behemoth
[20:31:19] shevy: Source (393.4MB)
[20:31:23] platzhirsch: lpvn: removes all the overlapping elements and inserts a new one, so pretty
[20:31:37] havenwood: shevy: like here's a simple euler, you can compile to JavaScript, Python or Dart: https://blockly-demo.appspot.com/static/apps/code/index.html#h9t87u
[20:31:46] havenwood: shevy: and make your own blocks
[20:31:56] Hanmac: shevy i have seen bigger stuff ;P
[20:31:58] jsilver: Rooby: Gives programmers a funny little feeling inside
[20:32:04] shevy: cool, I can drag that stuff
[20:32:25] Nilium: No, I definitely don't play either of those things
[20:32:26] shevy: Hanmac you need to include something like that for designing GUI elements in rxw
[20:32:34] shevy: Nilium :(
[20:32:37] havenwood: shevy: ya, they click in place
[20:32:41] shevy: Nilium are you playing any games?
[20:32:51] Nilium: Not at the moment.
[20:33:13] shevy: all those C++ coders have no more time for games
[20:33:15] Hanmac: shevy look at the size of the ns3-doc package ... "downloaded size: 1018MB, installed size: 1532MB"
[20:33:15] shevy: right Hanmac
[20:33:17] Nilium: I'm playing Disgaea 3 on and off, but that's about it
[20:33:18] Nilium: Mostly just building a compiler for a lisp-like language for my VM.
[20:33:28] shevy: doc package
[20:33:29] shevy: how can you have 1 gig of doc
[20:33:51] Nilium: If wxWidgets is anything to go by, you totally can
[20:34:04] platzhirsch: lpvn: though it spends a bit of time with selecting and subtracting, but it's still O(n) and super readable
[20:34:04] Nilium: Also: lots of ascii art
[20:35:40] shevy: Hanmac will show that
[20:35:40] shevy: once his bindings are complete
[20:35:40] shevy: (and documented)
[20:35:40] shevy: ((perhaps))
[20:35:42] Hanmac: shevy i should not need to worry about designing gui in rwx ... because rwx can use the xrc files from other editors just fine (its xml ;P )
[20:35:45] lpvn: platzhirsch: thanks (:
[20:36:11] platzhirsch: I thank you, at least I write the theoretically solution down into my Knowledge Book
[20:36:15] shevy: (((but I am unsure)))
[20:36:21] lpvn: now I can join google lol
[20:36:36] Hanmac: my binding might be compete before usa gets full democatic ,P
[20:37:02] centrx: You mean like Athens
[20:37:04] Hanmac: Nilium: when you play games like that, do you like mangas?
[20:37:31] shevy: I never even heard of Disgaea 3, shows you how much I know these days
[20:37:43] Nilium: I like anime and manga, but that's not the reason I got into Disgaea
[20:38:07] shevy: the girls are sexy
[20:38:18] Nilium: I started playing Disgaea because I wanted a game like Final Fantasy Tactics and there's a shortage of tactical/strategy RPGs.
[20:38:49] Hanmac: Yeah! there need to be a new FFT game (for 3DS maybe)
[20:38:52] Nilium: Bearing in mind that I'm the sort of obsessive nutjob that beat the original FF Tactics and unlocked all the secret thingies
[20:38:58] Nilium: I was apparently much more motivated to do stuff like that when I was a kid.
[20:40:07] Nilium: The Gameboy Advance FFT games were good. Surprised there weren't more in the same line, but I guess they probably only sold well to people who already like the series.
[20:40:09] Hanmac: i stopped playing video games after i began to DREAM in games ... just image how freaky it would be if your dream has a F10-MainMenu ...
[20:40:34] Nilium: Only video game dreams I had were when I was little and playing Resident Evil 2
[20:41:01] Nilium: The dream for some reason involved cupboards full of zombie cubes that would come out if opened and turn into normal zombies
[20:41:18] Hanmac: other video game dreams include inventary and skill tree ... i think i played to much Diablo2 and Torchlight ...
[20:42:06] Hanmac: Nilium: another game you NEED to play (depending on your outside temperature) is "Little Inferno" ;P
[20:42:46] Nilium: Played it, "beat" it for lack of a better word
[20:43:40] Hanmac: Nilium: what was your reaction when your neigbor in the game uses the 4-key-combo on her game? ;P
[20:45:12] Nilium: I don't remember. It's been a while, and I wasn't particularly into the game until it turned into a bad point and click adventure.
[20:45:24] Hanmac: Nilium: did you know what happend when you delete save game from it? you hear a tiny little scream :P
[20:45:42] Nilium: Never tried that, actually
[20:45:56] platzhirsch: Does someone know someone at Twitter? I need to acquire a suspended Twitter nickname
[20:46:07] Nilium: I beat the thing in one sitting, so I didn
[20:46:07] Nilium: *didn't even know there were save games
[20:49:14] Hanmac: Nilium: you are looking like someone who likes TerryPratchett ... look at this image: http://animagess.deviantart.com/art/Good-Omens-The-Other-Guys-200108974
[20:50:10] Nilium: I only like Pratchett as far as the Discworld games are concerned
[20:54:57] saltsa: have you any recommendations for database usage in ruby? I'm planning to implement some postgres functionality.
[20:55:09] saltsa: useful librarires or something
[20:56:03] apeiros: with or without ORM - whatever you prefer
[20:56:12] saltsa: well, i think without orm
[20:56:28] s2013: [101,102,103,104,105.reject! { |id| id == 102 || id == 101 }
[20:56:32] s2013: how can i make that shorter
[20:56:51] apeiros: >> [101,102,103,104,105] - [101,102]
[20:56:51] eval-in: apeiros => [103, 104, 105] (https://eval.in/97960)
[20:57:06] apeiros: note, Array#- will also uniq the items
[20:57:20] s2013: yeah thats fine
[20:57:37] agent_white: Good afternoon all
[20:57:44] s2013: >> [101,101,101,102,102,102,104,104,105,105,105,106] - [101, 105]
[20:57:44] eval-in: s2013 => [102, 102, 102, 104, 104, 106] (https://eval.in/97961)
[20:58:00] s2013: cool. thanks
[20:59:39] momomomomo: s2013: or...
[20:59:54] saltsa: apeiros: so definetly Sequel even when no need for orm?
[21:00:01] momomomomo: >> [101,102,103,104,105].reject { |k| k.in? [102, 103] }
[21:00:01] eval-in: momomomomo => undefined method `in?' for 101:Fixnum (NoMethodError) ... (https://eval.in/97964)
[21:00:08] apeiros: saltsa: yes, it does both. its ORM part is optional.
[21:00:12] momomomomo: ah, in? is a rails method
[21:00:17] apeiros: I use sequel only without ORM myself
[21:00:25] apeiros: momomomomo: .in? is a stupidity.
[21:00:44] s2013: fight fight
[21:00:45] apeiros: it reverses knowledge of structure
[21:00:55] momomomomo: >> [101,102,103,104,105].reject { |k| [102, 103].include? k }
[21:00:55] eval-in: momomomomo => [101, 104, 105] (https://eval.in/97965)
[21:01:17] s2013: apeiros' method is shorter and easier to understand ig uess
[21:01:39] momomomomo: apeiros: s2013 no fight here, and I agree that the structure makes more hierarchical sense with the include? method, but in? can make things easy to read
[21:01:56] Hanmac1: >> a=[101,101,101,102,102,102,104,104,105,105,105,106];b=[101, 105]; b.each {|o| (i = a.index(o)) ? a.delete_at(i) : nil}; a
[21:01:56] eval-in: Hanmac1 => [101, 101, 102, 102, 102, 104, 104, 105, 105, 106] (https://eval.in/97966)
[21:03:10] glen: hey. i have hash: params={:param1=>2,:param2=>3}, and second such (params2={:param3=>3,param4=>5}, i want to merge them, how?
[21:03:33] glen: no duplicates, but ok to overwrite if they exist
[21:03:43] lpvn: glen: params.merge(params2)
[21:03:55] glen: thx for quick answer!
[21:04:50] Hanmac1: >> b=[101, 105];[101,101,101,102,102,102,104,104,105,105,105,106].select{|o| !b.delete_at(b.index(o)) rescue true }
[21:04:50] eval-in: Hanmac1 => [101, 101, 102, 102, 102, 104, 104, 105, 105, 106] (https://eval.in/97968)
[21:05:01] Hanmac1: apeiros: how do you like that?
[21:05:26] apeiros: Hanmac: horrible, truly horrible :)
[21:05:34] apeiros: but you knew that before you asked :-p
[21:06:20] Hanmac: hm yeah but there is no nicer way for doing it
[21:08:05] lpvn: glen: http://www.ruby-doc.org/core-2.1.0/Hash.html there you can find, in the left column, all methods implemented by the hash class
[21:09:40] glen: lpvn: i think i need merge!
[21:11:44] glen: oh.yeah!
[21:19:43] Jdubs: Hey guys im looking for someone experienced using karma + instanbul
[21:19:49] Jdubs: oops wrong channel
[21:36:02] MJBrune: worst recruiter ever. Interviewed last tuesday. They said they would let me know near the end of the week that week. Called my Recruiter on Friday and asked whats going on. He said he would contact them and told me check in monday. Called Monday he said still nothing. Called back today and he said "well I haven't actually sent an email yet but I guess we should."
[21:36:36] MJBrune: arg seriously?! why lie. Why not express that I am interested. The interview went perfect and they seemed to have really liked me.
[21:36:48] MJBrune: dude is just a lazy recruiter.
[21:36:55] platzhirsch: Yeah I think it's okay to catch up then so uptightly.
[21:37:15] platzhirsch: 2 weeks is a typical time span, but since they have gave you pretty exact dates that should be perfectly fine
[21:38:22] MJBrune: yeah I would say 48 hours after the furthest time for them to decide that they gave me is kind of lame
[21:39:26] platzhirsch: and this is over an external recruiter?
[21:41:50] lpvn: MJBrune: are you currently employed?
[21:46:13] platzhirsch: MJBrune: so stressed to find a job?
[21:46:35] lpvn: it should be easy for him to understand your anxiety
[21:50:27] dangerousdave: just installed ruby 2.1.0 with rvm, and it also installed ruby-2.1.0-preview1. Whats that all about?
[21:51:18] mjc_: dangerousdave: did you forget to upgrade rvm first?
[21:52:12] apeiros: dangerousdave: why -preview1?
[21:52:16] MJBrune: platzhirsch: a tad
[21:52:25] MJBrune: lpvn: yeah I would think so.
[21:52:28] dangerousdave: I installed it first, and there was an error, so i updated rvm and tried again
[21:52:36] dangerousdave: apeiros, indeed
[21:52:51] platzhirsch: MJBrune: give us his home address. #ruby will take care of this
[21:52:59] dangerousdave: apeiros, thats my question
[21:53:14] platzhirsch: we will dent his mailbox then he knows this is serious
[21:53:18] MJBrune: platzhirsch: lol I'd rather just spend time getting my next job.
[21:54:00] lpvn: MJBrune: what position did you apply for?
[21:55:16] platzhirsch: He will scream in pain, when his mailbox is so dented, the mail carrier cannot put his shoe order into the box
[21:55:26] dangerousdave: mjc_, apeiros can i delete it?
[21:55:41] dangerousdave: ruby-2.1.0-preview1 i mean
[21:55:57] MJBrune: lpvn: Ruby development position. It's called "Product engineer in product realization"
[21:56:05] apeiros: dangerousdave: sure
[21:56:10] apeiros: 2.1.0 is all you need
[21:56:19] apeiros: -preview1 is a pre-release of it
[21:56:24] apeiros: i.e., it's older, not final
[21:56:37] platzhirsch: MJBrune: Cool and is it a local job or somewhere else
[21:56:48] MJBrune: The entire interview and company is great. I can't say who they are but their entire campus lights up in magenta.
[21:56:55] MJBrune: platzhirsch: local for me, bellevue.
[21:57:20] platzhirsch: and how does that go? How many phone interviews, before on-side?
[21:58:23] MJBrune: 1 phone 1 in person. Everyone seemed excited and happy during the interview. I nailed like 95-99% of the questions asked and had a really open connection with the interview board.
[22:00:20] platzhirsch: Reasonable. I am sure it will go well, just kick that recruiter in the ass
[22:02:33] MJBrune: so many parts and joins
[22:03:31] platzhirsch: MJBrune: try to hide them in your IRC client
[22:03:51] platzhirsch: since I did, I have found inner joy and my horrible fantasies don't derail as often as they used to do
[22:06:57] centrx: I've done it!
[22:09:54] centrx: Without the Join/Part messages, it almost seems like time is not passing
[22:10:14] platzhirsch: Isn't it beautiful
[22:10:42] centrx: It is timeless...
[22:11:17] centrx: I am not sure I like it
[22:11:33] platzhirsch: Don't touch the setting again
[22:11:38] centrx: There is no separation between old conversation and new conversation
[22:11:49] platzhirsch: It's really just spam
[22:12:09] platzhirsch: That's like saying "There is no separation between new and old emails if I filter spam mails"
[22:12:27] centrx: Now all the spam is from users
[22:12:40] centrx: How will I know when to announce "Welcome to #rails, the only channel on Freenode devoted to TRAINS! For Ruby on Rails, visit #RubyOnRails"
[22:14:01] platzhirsch: I can't believe there is a #rails channel with 100+ user. Why is the Ruby community so fragmented
[22:15:34] centrx: Freenode refuses to do anything about it
[22:15:42] centrx: That channel is totally dead
[22:16:03] platzhirsch: #freenode has gone wild again, too
[22:16:13] platzhirsch: all the mentals from #defocus have overun the channel
[22:16:37] platzhirsch: centrx: it is against the rules to do mass mentioning, isn't it
[22:17:53] centrx: What do you mean?
[22:18:16] centrx: It is a public service announcement. People wander into #rails and ask questions.
[22:18:50] platzhirsch: well you could mention all the idlers
[22:18:57] jsilver: Rooby: Gives programmers a funny little feeling inside
[22:18:59] platzhirsch: if the channel is empty they will leave
[22:19:12] platzhirsch: jsilver: you literally just said that earlier
[22:19:12] jsilver: "if you build it, they will all leave"
[22:19:23] jsilver: platzhirsch: hasn't gotten old yet
[22:19:36] platzhirsch: I cannot judge
[22:19:50] jsilver: Ribby: How programmers fall in love
[22:20:00] jsilver: lacks the unf of the original
[22:20:30] jsilver: I'm glad the creators of PHP don't rename it "Roby" and confuse the hell out of us all
[22:21:00] centrx: PHP is an abomination and a scourge on the face of the earth.
[22:22:33] centrx: platzhirsch, Maybe you're right. This is a good strategy. Interrogating the idlers.
[22:25:14] jsilver: centrx: aww, she ain't so bad. we all came from there
[22:25:26] jsilver: centrx: sure, it's no ruby, but it's a turing complete language
[22:26:00] jsilver: trolling status: not trolling
[22:26:16] centrx: A piece of string and a pen is a turing complete language
[22:27:51] jsilver: It's also some sort of string-attached launchable writing device, though I imagine writing actual characters mid-flight would be hard, if not impossible
[22:28:17] jsilver: you have baked in support for writing in libballpointpen though
[22:28:18] platzhirsch: I won't interrogate with #ruby-lang, people have a pretty strong oppinion
[22:28:38] jsilver: interrogate? you mean argue?
[22:29:00] centrx: #ruby-lang is fairly active
[22:29:49] jsilver: if I was a wrestler named Jake, my stage name would be "Jakesaster"
[22:29:56] jsilver: but I'm neither a wrestler nor named Jake
[22:30:27] platzhirsch: jsilver: are you a chat bot?
[22:30:30] platzhirsch: reminds me of them
[22:30:36] jsilver: Do you want me to be a chat bot?
[22:31:43] platzhirsch: no, but the phrases you produce sound heavily concatenated from random stuff
[22:32:01] jsilver: ...they are...
[22:32:07] jsilver: crap I write in my test strings
[22:32:54] jsilver: I just wrote
[22:33:00] jsilver: name_of_disaster: "Justin Bieber"
[22:33:01] centrx: platzhirsch, I missed the joins in #RubyOnRails now!
[22:33:03] jsilver: tell me thats not hilarious
[22:33:07] jsilver: I'm doing emergency management
[22:33:13] centrx: jsilver.acts_like_duck?
[22:33:34] jsilver: it "should be able to destroy a disaster" do # and so should you!
[22:33:42] jsilver: that's my favorite comment I've ever done of all time
[22:34:51] platzhirsch: jsilver: There are irritating JavaSilver
[22:35:21] jsilver: the j is for Jonathan not Java
[22:35:35] jsilver: ACTION fucking GLARES at u
[22:35:44] centrx: Java S. Silver
[22:35:53] platzhirsch: Why so biblic jsilver?
[22:35:54] jsilver: where did the S come from!?!?!?
[22:36:09] centrx: Java Script
[22:36:20] jsilver: cause my middle initial really is S
[22:36:26] centrx: Java Script
[22:36:40] jsilver: no seriously
[22:36:46] jsilver: Jonathan Samuel
[22:36:52] jsilver: silver....something or another...
[22:36:52] platzhirsch: Jonathan is a cooking apple of a red-skinned variety first grown in the US.
[22:37:06] platzhirsch: Jonathan Silver. An apple with silver?
[22:37:24] jsilver: yes I'm rotten
[22:37:54] platzhirsch: You are the son of Saul and friend of David
[22:38:02] platzhirsch: but you died battling the Philistines
[22:38:32] jsilver: fuck the Philistines
[22:38:36] jsilver: they're haters
[22:38:38] jsilver: PHP using scum
[22:52:40] platzhirsch: jsilver: Today I joined #php and asked when the latest point is to refactor my application to another language :P
[22:52:57] jsilver: the latest point? what?
[22:54:41] jsilver: one time I tried to code in PHP and then I had to shout in my computer monitor's face, "YOU'RE HURTING ME!!!!"
[22:55:34] terrellt: Best online interactive ruby REPL?
[22:55:45] xybre: terrellt: try ruby?
[22:55:48] terrellt: tryruby.org's kinda clunky, repl.it is closer, but it's 1.8.7
[22:56:28] jsilver: Solution: Install Ruby, run IRB
[22:56:54] terrellt: Probably gonna do that for the presentation, but if they want to follow along without ruby installed it helps.
[22:57:13] jsilver: who you teachin Ruby?
[22:57:37] terrellt: It's a guest lecture for a bunch of CS undergrads.
[22:57:42] jsilver: cool cool man
[22:57:47] jsilver: teach hard!!
[22:58:51] slowcon: any of you guys use jetbrains IDEA?
[22:59:12] jsilver: no, and I'm happier for it
[23:00:32] platzhirsch: ACTION puts jsilver to sleep.
[23:00:33] slowcon: thinking about getting it with the ruby extension
[23:00:47] jsilver: ACTION has a nightmare about php
[23:01:00] platzhirsch: No, putting to sleep. Like a pet
[23:01:02] bricker`LA: In your opinion, when creating an "interface" in ruby (methods that are meant to be overridden, possibly enforced by NotImplementedError), is it bad practice to make some of the methods private?
[23:01:38] terrellt: That seems fine.
[23:03:55] jsilver: ACTION wakes up anyhow
[23:06:37] jsilver: how come europeans pronounce rspec "errspec" ?
[23:06:50] jsilver: its Arr not Ere you fucking idiots
[23:06:56] jsilver: also V is not W!!!!!!!
[23:08:33] tobiasvl: because english is not our first language maybe
[23:08:49] waxjar: a w is also not a double u
[23:09:07] terrellt: jsilver: You just wait until you find out how to say "Z"
[23:09:07] jsilver: it's a Double Ve
[23:09:15] jsilver: ITS NOT ZED!!!!!!
[23:09:31] tobiasvl: what about ??
[23:09:34] jsilver: "Zee" is correct
[23:09:41] jsilver: tobiasvl: no fucking clue, we don't use em
[23:10:13] jsilver: I am thinking I will pronounce ?? "Magstrom" because that sounds like a good way to say it to me
[23:10:21] tobiasvl: and we don't use w
[23:10:23] jsilver: an ?? is a Magstromm
[23:10:32] jsilver: you mean *ve don't use w
[23:10:42] tobiasvl: that is, we pronounce v and w the same
[23:10:54] jsilver: I called Austria today
[23:10:56] jsilver: if you must know
[23:11:05] tobiasvl: it's in our alphabet for backwards compatibility ;)
[23:11:58] tobiasvl: oh they're even funnier. w is pronounced like v and v is pronounced like f
[23:12:23] tobiasvl: volkswagen = folksvagen
[23:12:24] jsilver: I'm like.. I just want to hear a german say "WUH" one time !!!
[23:12:38] jsilver: we say VOLKS WAGON
[23:13:27] tobiasvl: so don't complain when we pronounce rspec wrong ;) that's not even a real word
[23:13:37] tobiasvl: volkswagen is!
[23:15:02] jsilver: I was just teasing. Never heard an European say Rspec.
[23:15:05] platzhirsch: jsilver: Are you German?
[23:15:17] jsilver: no, I'm American
[23:15:55] platzhirsch: South American? Today I learned about Pud??s, the world's smallest deer
[23:17:40] workmad3: platzhirsch: how about the pygmy jerboa, the worlds smallest rodent?
[23:17:59] workmad3: http://www.bizarbin.com/wp-content/uploads/2012/12/smallest-rodent1.jpg
[23:18:06] platzhirsch: I often pronounce English words in a German context, German, too. Though I also feel pretty dump for fellow Germans when they do that
[23:18:37] platzhirsch: workmad3: that is horrifying
[23:18:54] platzhirsch: I don't do mice. I just need to look out for my fellow deers
[23:19:53] workmad3: platzhirsch: or the sand cat: http://en.wikipedia.org/wiki/Sand_cat
[23:20:12] workmad3: platzhirsch: which doesn't need to drink water, it can survive on the water intake in its prey...
[23:20:14] platzhirsch: workmad3: ADOPTED
[23:20:32] platzhirsch: well, wild animal. I am against taking pets anyway
[23:21:03] workmad3: platzhirsch: micro-chameleon? http://news.bbcimg.co.uk/media/images/58514000/jpg/_58514405_tiny_chameleons_photo1_brookesia_micra_juvenile_on_match_joern_koehler.jpg
[23:21:08] waxjar: ha, clever
[23:22:20] workmad3: and even tinier (although only by a few millimeters) geckos... http://www.hghstrip.com/wp-content/uploads/2011/12/Smallest-animal-Sphaerodactylus-ariasae-lizard.jpg
[23:23:08] workmad3: tiny animals are cute :)
[23:23:15] platzhirsch: sorry workmad3, it was really about Hirsch
[23:24:37] jsilver: how come most huge football linebacker biker dudes break down and cry when you make fun of them?
[23:25:02] olivier_bK: i have a file start with <?$licenceData = array ( i try to remove it with sub but i cant find how
[23:25:16] olivier_bK: i try read= file.read.sub(/<\/?\/$\/licenceData = array/, '')
[23:25:27] olivier_bK: but i get nothing :(
[23:25:36] lpvn: platzhirsch: I was talking to on #rails but you weren't there anymore haha
[23:25:58] platzhirsch: lpvn: Sorry mate, but I clearly LEFT.
[23:25:59] shevy: olivier_bK, $ is a special char inside a regex
[23:26:07] platzhirsch: I even made a big speech for storming out
[23:26:14] platzhirsch: lpvn: can you copy me the content?
[23:26:39] workmad3: olivier_bK: ? is too
[23:27:16] lpvn: platzhirsch: yeah I realized you had left a long time after you left lol
[23:27:17] workmad3: olivier_bK: what you've said there is 'substitute / or // on a line and then /licenceData = array on the next line with an empty string'
[23:27:21] olivier_bK: that's the original <?$licenceData = array (
[23:27:33] shevy: olivier_bK, you must escape all special characters!
[23:27:42] shevy: >> " <?$licenceData = array (".sub(/\<\?\$licenceData = array \(/,'')
[23:27:42] eval-in: shevy => " " (https://eval.in/97995)
[23:29:06] olivier_bK: shevy, i dont understand something
[23:29:33] olivier_bK: why \ after array and why (/, '' )
[23:29:50] olivier_bK: and thanks for your help sorry
[23:29:58] workmad3: olivier_bK: because ( is a special character in a regex
[23:30:13] workmad3: olivier_bK: so to match a literal ( in a string, you need to use \( in the regex
[23:30:26] workmad3: olivier_bK: the same is true for ? and $
[23:32:04] jsilver: I wanna get gangbanged in the brain by science
[23:33:59] shevy: olivier_bK you need to get a cheat sheet man what are special characters
[23:34:05] shevy: olivier_bK I will give you that list now
[23:34:09] olivier_bK: workmad3, thanks for your explication i going to try now why i dont understand that
[23:34:20] shevy: olivier_bK keep it close to your heart: . * + ? ^ $ { } [ ] ( ) \ |
[23:34:54] workmad3: olivier_bK: also rubular.com
[23:34:54] olivier_bK: i keep it in my heart my brain and in my USB key :)
[23:34:56] workmad3: olivier_bK: bookmark it
[23:35:10] workmad3: olivier_bK: and use it for your regexs until you grok them better ;)
[23:42:22] rjbs: Given a method foo(x=10), is there a way to determine whether, in a given call, x is 10 because it was explicitly passed, rather than because of the default? I realize that this is generally not something one should investigate, but am curious.
[23:43:10] workmad3: rjbs: I can think of *a* way, but it's not a pleasant one ;)
[23:43:24] rjbs: I've got a strong stomach, I write perl. ;)
[23:43:51] jsilver: I have a stronger stomach. I write APL and Ada.
[23:43:57] workmad3: rjbs: use something like binding_of_caller to be able to pull out where the method was called from... then slurp in the contents of that file and grep out the method call
[23:44:03] rjbs: jsilver: I have no desire to top that. ;)
[23:44:05] jsilver: when my stomach demands more, though, I switch to ASM
[23:44:27] workmad3: jsilver: pfft, ASM is lightweight after APL
[23:44:27] jsilver: and no, I don't type in Assembler. I type raw bytecode.
[23:44:31] lpvn: jsilver: APL? I can't believe
[23:44:35] rjbs: workmad3: Heh, but I'm filing that under "no." :)
[23:44:42] jsilver: good, lpvn, don't believe. I am jesting
[23:44:58] workmad3: jsilver: if you want a bit more of a challenge after APL, maybe try some malbolge
[23:45:11] jsilver: Brainfuck fo' lyfe.
[23:46:13] rjbs: Perl 5 is in the process of adding named parameter, and due to its language idioms, it's important to be able to make that distinction. I realized as we did this that I didn't think it was possible in Ruby or Python.
[23:46:27] jsilver: http://esolangs.org/wiki/Malbolge wow theres an esolangs.org
[23:49:17] olivier_bK: i have a question about yaml file
[23:50:04] olivier_bK: when i make a vim in my yml file i see that
[23:50:05] olivier_bK: 'startDate' => '2013-09-26',
[23:50:05] olivier_bK: 'endDate' => '2015-10-18',
[23:50:30] olivier_bK: my question is that's a good yml syntaxe or not ?
[23:50:50] olivier_bK: i know it's a hash
[23:52:42] rjbs: No, that's not valid YAML.
[23:53:29] rjbs: YAML doesn't use rockets, but colons.
[23:53:39] rjbs: startDate: '2013-09-26'
[23:54:00] rjbs: Also, when giving a mapping (YAML's Hash-like type) on multiple lines, you don't use commas to separate pairs.
[23:54:00] olivier_bK: okai you confirm what i think
[23:54:21] rjbs: Each of your two lines included a comma at the end.