« Back to channel list

#ruby - 20 May 2015

« Back 1 day Forward 1 day »
[00:06:25] Aeyrix: jhass: What plugin syntax?
[00:06:29] Aeyrix: Do you have any form of dox?
[00:06:41] shevy: hmm how to best check for "if this target date is within the next coming +10 days"
[00:06:50] jhass: Aeyrix: currently it's a cinch bot
[00:07:09] jhass: https://github.com/cinchrb/cinch
[00:07:25] Aeyrix: shevy: Convert to unix time
[00:07:40] Aeyrix: I mean I'm sure there's probably some syntactical sugar around it, but
[00:07:51] jhass: shevy: (Date.today..Date.today+10).cover? x
[00:08:08] Aeyrix: Okay yeah completely disregard me.
[00:08:57] shevy: hmm .cover? is a special method somewhere?
[00:09:09] Aeyrix: ActiveSupport, probably.
[00:09:13] jhass: no, Range
[00:10:05] Aeyrix: jhass: Three join/leaves = ban or?
[00:10:09] jhass: it's essentially x >= range.start && x <= range.end
[00:10:40] Aeyrix: How many?
[00:10:56] Aeyrix: x in y seconds, i guess.
[00:11:15] jhass: I'd say about 5-10 in 5-10 minutes, depending on how it feels
[00:11:23] jhass: also what kind, MaxSendQ get earlier
[00:12:10] Aeyrix: variable hell here we come.
[00:12:34] jhass: it's a "looks bad"/"somebody is annoyed by it" thing for me really
[00:12:47] jhass: no strict rules
[00:14:39] Aeyrix: jhass: Yeah I get ya.
[00:14:51] Aeyrix: Also is cinch uh
[00:14:54] Aeyrix: can it dynamically reload plugins?
[00:15:06] Aeyrix: I've been trying to find functionality for that in Ruby for like a year now.
[00:15:13] Aeyrix: It's so easy in Python, but Ruby has a small cow every time you try.
[00:15:40] zenspider: just warnings... which you can squelch
[00:15:53] jhass: I wrote https://github.com/jhass/DeBot/blob/ruby/lib/plugin_manager.rb a long time ago, never worked really well
[00:16:41] Aeyrix: zenspider: ?
[00:16:48] Aeyrix: jhass: Yeah it seems to be real difficult.
[00:17:00] Aeyrix: I can understand why - the functionality just kind of isn't there, but I really wish it was.
[00:17:03] jhass: Aeyrix: http://rkh.im/code-reloading good read
[00:17:15] zenspider: load "blah.rb"; load "blah.rb" will warn about redefined methods and the like... but you can shut that up by turning off $-w and/or redirecting $stderr temporarily
[00:18:04] zenspider: see Minitest::Assertions#capture_io for an example
[00:18:13] vikaton: >> ["KALA","POP","BLERP"],map &:capitalize
[00:18:14] ruboto: vikaton # => /tmp/execpad-0a92ea4e4fde/source-0a92ea4e4fde:2: syntax error, unexpected ',', expecting keyword_end ...check link for more (https://eval.in/367434)
[00:18:21] vikaton: >> ["KALA","POP","BLERP"].map &:capitalize
[00:18:22] ruboto: vikaton # => ["Kala", "Pop", "Blerp"] (https://eval.in/367435)
[00:18:32] vikaton: why is that so e-z !
[00:18:40] sevenseacat: because Ruby.
[00:18:58] zenspider: easy until the last name starts with "mc"
[00:19:13] Aeyrix: zenspider: Yeah but will that work in the way I'm thinking?
[00:19:15] zenspider: or... any other number of human oddities.
[00:19:17] Aeyrix: Like, plugins for IRC bots?
[00:19:31] Aeyrix: If you instantiate the classes, and then reload and re-instantiate, will that work?
[00:19:45] vikaton: dont ya think C++ programmers would think thats fai?
[00:19:54] zenspider: reload. you shouldn't have to reinstantiate because it still has the same class
[00:19:57] zenspider: just with new methods
[00:20:02] Aeyrix: zenspider: ... wow
[00:20:06] Aeyrix: And it's taken me this damn long.
[00:20:07] Aeyrix: Thank you. :)
[00:20:11] Aeyrix: I'll save this for later.
[00:20:17] Aeyrix: I had to put a project on hold due to this. <_<
[00:20:33] zenspider: it's also just noise. you can always start the bot with 2> /dev/null
[00:20:42] jhass: Aeyrix: they are some more cavehats, read the article I linked, it's good
[00:20:42] Aeyrix: That feels like a hack though.
[00:20:47] zenspider: that might shut up legit problems tho
[00:20:49] Aeyrix: jhass: rkh.im?
[00:20:51] zenspider: tho, that's what tests are for
[00:20:59] Aeyrix: >cavehats
[00:21:03] Aeyrix: What like mining lights or? ;)
[00:22:11] Aeyrix: zenspider: 2>&1 > /dev/null
[00:22:14] Aeyrix: Everyone's favourite silencer.
[00:22:20] Aeyrix: But it makes me so upset. ;-;
[00:22:35] zenspider: I have an alias `stfu`
[00:22:52] zenspider: stfu () {eval $* 2> /dev/null}
[00:22:56] Aeyrix: I genuinely have trouble getting into the testing habit,.
[00:23:28] Aeyrix: jhass: this person is being rude
[00:23:34] Aeyrix: not conducive to conversation
[00:24:10] jhass: stop trolling
[00:24:13] zenspider: rude? fine. we're done.
[00:25:00] Aeyrix: But seriously though, idk why I can't get into the whole TDD jam.
[00:25:26] Aeyrix: Probably because I read DHH's essay on it.
[00:25:35] Aeyrix: IIRC he likened it to abstinence-only sex education.
[00:26:29] bootstrappm: send link if you have it, i'm curious
[00:26:37] Aeyrix: http://david.heinemeierhansson.com/2014/tdd-is-dead-long-live-testing.html
[00:26:54] bootstrappm: i've never been good w/ consistently writing tests either, usually starts happening when too many preventable bugs are popping up on my team
[00:27:20] Aeyrix: zenspider: Have you read that? ^
[00:27:22] Aeyrix: Also jhass
[00:27:23] zenspider: bootstrappm: that's certainly a good time to start if you haven't already... add a test per regression so they can't come back
[00:27:31] Aeyrix: this is an IRC channel about an open source programming language
[00:27:34] Aeyrix: not about the Dow Jones
[00:27:37] Aeyrix: jokes are okay.
[00:28:05] bootstrappm: you speak truth zenspider
[00:28:09] zenspider: bootstrappm: but I find that my designs are stronger if I start with tests and figure out from there how I want the code to work
[00:28:32] Aeyrix: zenspider: What do you use for projects not involving Rails?
[00:28:41] zenspider: not just more testable, but more solid in general, because I've isolated each piece and worked on the edge cases until the thing is done.
[00:28:55] al2o3-cr: Aeyrix: bots ;p
[00:29:18] zenspider: al2o3... thermite?
[00:29:58] Aeyrix: I think zs has ignored me or something for making a joke about general channel saltiness.
[00:30:36] zenspider: ah. no. end of thermite: Fe2O3 + 2 Al ??? 2 Fe + Al2O3
[00:30:57] zenspider: I knew I recognized it, somewhat...
[00:30:59] bootstrappm: i miss hard sciences
[00:31:27] zenspider: ok. study group for reasoned schemer... yay for computing backwards
[00:32:39] bootstrappm: lost me on that last comment zs
[00:33:35] Aeyrix: Yeah same.
[00:33:48] zenspider: book called "reasoned schemer"... implementing a logic programming system on top of scheme. (depending on how you code in it) it allows you to give an answer, and it'll spit out the questions
[00:34:25] Aeyrix: Wait what
[00:34:35] Aeyrix: So like a programming language version of Jeapordy?
[00:34:52] sevenseacat: i like jeopardy.
[00:35:00] Aeyrix: It's pretty good sometimes.
[00:35:08] Aeyrix: Can we get it on Foxtel?
[00:35:13] sevenseacat: yes. on arena.
[00:35:15] Aeyrix: I don't actually have a TV that I use for TV.
[00:35:40] sevenseacat: its on at like 7pm EST every day.
[00:35:55] Aeyrix: shevy: Can't youtube.
[00:35:58] Aeyrix: I'm currently without Internet.
[00:36:05] Aeyrix: (At home)
[00:36:44] Verelia: How can I really understand blocks in Ruby, it seems a bit weird to me coming from another language.
[00:36:57] eam: Verelia: what other language?
[00:38:13] shevy: Verelia think of them as (optional) extra arguments passed to the specific method at hand; they help run stuff automatically too, such as the block form of File.open {} <-- will close the file handle for you
[00:38:13] zenspider: Verelia: any language with a lambda?
[00:38:30] zenspider: (ie anonymous functions)
[00:38:40] Verelia: A C guru..no lambdas :/
[00:39:45] zenspider: well... you can think of it (sorta) like passing a function pointer to another function. that 2nd function can yield (dereference and call) data to the FP
[00:39:50] Aeyrix: Verelia: http://www.reactive.io/tips/2008/12/21/understanding-ruby-blocks-procs-and-lambdas/
[00:40:02] Aeyrix: It's a nice article explaining blocks and lambdas.
[00:40:39] Aeyrix: Old, but the fundamental concepts haven't changed.
[00:40:51] Aeyrix: Unless someone can chime in and tell me I'm a moron, before you waste your time.
[00:40:52] zenspider: Verelia: the main difference is that an FP is _just_ an FP. a block has a closure attached to it as well. a closure is a copy of the variable scopes at the time the block was created that travels around with it.
[00:41:02] Verelia: For example, array.collect! do |n| I mean where did that n come from?
[00:41:42] al2o3-cr: Verelia: than n is each element in the array
[00:41:44] shevy: you gave it a name there
[00:41:47] Aeyrix: Verelia: for x in y
[00:41:52] eam: Verelia: in the C world, it's just a parameter from the call stack stack
[00:41:56] Aeyrix: for n in array
[00:42:34] zenspider: Verelia: that n gets yielded into the block by the calling method (collect)
[00:42:57] zenspider: think of (*fp)(42)
[00:43:24] eam: Verelia: you're familiar with the quicksort function from libc?
[00:43:56] zenspider: rough impl: module Enumerable; def collect; r = []; each do |obj| r << obj if yield obj; end; end; end
[00:44:02] zenspider: that's the non-bang version
[00:44:04] zenspider: oops. return r
[00:44:15] eam: Verelia: well, the {} block is like passing in a *compar pointer to a function
[00:44:24] zenspider: module Enumerable; def collect; r = []; each do |obj| r << obj if yield obj; end; r; end; end
[00:44:34] eam: and the |args| are analagous to the calling convention of that function
[00:45:19] eam: so with qsort(int(*compar)(const void *, const void *)) it's very much like obj.qsort { |arg1, arg2| }
[00:45:31] Verelia: I see, I will read more about it. Also, some say that {} should be avoided and go with do/end despite of the block size.
[00:45:38] Verelia: For not confusing {} with hashes.
[00:45:50] zenspider: Verelia: I like the weirich method. {} to be used for functional blocks, do/end to be used for imperative
[00:45:55] zenspider: Verelia: http://devblog.avdi.org/2011/07/26/the-procedurefunction-block-convention-in-ruby/
[00:45:58] Aeyrix: I use {} for one liners.
[00:46:44] Verelia: Yes I know, I said some say to avoid {} even if the block is one line.
[00:46:52] zenspider: Verelia: the rationale for it is that you can look at the delimiters and know what sort of block it is... one where you're calculating a value vs running for side-effects
[00:47:31] zenspider: Verelia: meh. I'd discount that opinion. If you're getting confused with hashes, you're doing it wrong.
[00:47:34] Verelia: Is this similar to lambdas? Because I have an article on lambdas also.
[00:47:59] jhass: for those interested: the original proposal: https://web.archive.org/web/20140221124509/http://onestepback.org/index.cgi/Tech/Ruby/BraceVsDoEnd.rdoc
[00:49:11] Verelia: zenspider, Doing it wrong? Professionals said that not me.
[00:49:59] Verelia: I have this Eloquent Ruby book I'm reading, I can keep going but sometimes I stop and Google for things since it's not for beginners. Should I keep going or get another book?
[00:50:17] jhass: "professionals" is like "experts". You always have to ask "professional/export what for? What makes them one?"
[00:50:23] Aeyrix: Verelia: Nope.
[00:50:40] Aeyrix: Verelia: Oh, sorry, that was one or the other.
[00:50:47] Aeyrix: If you understand after Googling, keep going.
[00:50:59] Verelia: Yea I do, also asking here so I get the answers.
[00:51:04] Verelia: Alright, it's a nice book.
[00:51:11] Aeyrix: Yeah keep reading yo.
[00:51:21] Aeyrix: If you are understanding what you're reading after looking / asking, then you're doing it right.
[00:51:28] jhass: Verelia: when you say "like lambdas", talking about Ruby lambdas (the special type of proc) or anonymous functions?
[00:51:42] Verelia: jhass, Anonymous functions.
[00:52:13] jhass: then I'd say you can view blocks as lambdas that have access to the scope they were defined in. Often also called closures
[00:52:28] Aeyrix: Closures is the "proper name".
[00:52:35] Verelia: Yea, as in CS.
[00:52:40] Verelia: I will check it out more later.
[00:53:15] zenspider: Verelia: I've heard good things about that book... but yeah, you might want something to read alongside
[00:54:13] Verelia: zenspider, Yea.
[00:54:25] zenspider: jhass: I'm a bit confused by your statement... blocks and procs are both closures.
[00:55:00] jhass: zenspider: I asked whether we're talking about Ruby lambdas or the general thing (anonymous functions)
[00:55:10] jhass: they said the latter, so I based my statement on that
[01:08:45] bootstrappm: just FYI formal closures bind the variables outside them as well, not sure if procs / lambda's do that
[01:08:54] bootstrappm: anonymous functions != closures
[01:09:18] bootstrappm: http://stackoverflow.com/questions/4912116/closure-vs-anonymous-function-difference
[01:11:08] echosystm: i have a threading question
[01:11:10] echosystm: http://pastebin.com/hqY3cYa4
[01:11:11] ruboto: echosystm, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/d94b16177eb14b93f3db
[01:11:11] ruboto: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[01:11:32] echosystm: why do the two runs not compelte in the same time, assuming a 4 core machine?
[01:11:52] echosystm: the threads seem to offer no benefit
[01:12:04] echosystm: it seems like openssl blocks the whole thread?
[01:12:35] echosystm: i get that there is GVL/GIL in ruby, but i would have thought the openssl library would effectively sleep the thread
[01:12:48] echosystm: can someone explain this to me?
[01:14:58] bootstrappm: echosystm we're here but I have no experience w/ threading
[01:15:05] bootstrappm: hopefully somebody else can help ya
[01:15:32] echosystm: apeiros: are you around?
[01:19:31] bigsky: it's really painful to use ror on win7 x64
[01:19:51] shevy: it's pontiki! \o/
[01:21:18] diegoviola: I still don't understand the differences between lambda and Proc, I know a lambda is a special Proc
[01:25:00] zenspider: bootstrappm: ruby procs/lambdas/blocks are all closures. they capture the outer scopes where they were defined.
[01:25:10] zenspider: sorry... still in study group, so I'm behind
[01:25:11] bootstrappm: cool, just checking (y)
[01:25:47] bootstrappm: no need to be glued to IRC zs haha, enjoy your study group
[03:15:17] xxneolithicxx: echosystm: timing like that is absolutely useless because the time it takes that to finish does not take into account context switching between threads and delays for when they were blocked from
[03:15:24] xxneolithicxx: running by other processes
[03:40:01] mallu: can someone please tell me what I am doing wrong? https://dpaste.de/GcpD
[03:41:32] zenspider: coding on a tuesday night?
[03:41:43] zenspider: ew. worse. devopsing on a tuesday night.
[03:42:04] zenspider: mallu: node['emailbridgebubscriber'] is nil
[03:42:14] xxneolithicxx: mallu: node probably doesnt have the key 'emailbridgebubscriber'
[03:42:31] xxneolithicxx: lol and zenspider caught the duhh
[03:42:50] zenspider: reminds me of homestarrunner
[03:53:31] mallu: zenspider: thanks that was it
[03:58:52] Radar: mallu: If you want to make sure the keys are actually present at the same time as retrieving their values, use .fetch('key')
[03:59:03] Radar: That'll help protect against typos like that one.
[04:02:00] echosystm: xxneolithicxx: i dont see the problem
[04:02:13] echosystm: given 4 cpu cores, i thought they would run at the same speed
[04:02:48] echosystm: unless the actual ruby code itself is the part that is taking most of the time
[04:03:50] echosystm: basically what i wanted to know is... when openssl is doing the actual cipher operations, do the threads sleep?
[04:04:24] echosystm: eg. does a thread sleep on "cipher.final" or "cipher.update"?
[04:06:04] xxneolithicxx: i have no idea if those calls sleep
[04:13:45] baweaver: Look up green threading
[05:17:14] echosystm: can anyone tell me what happens if you .run a thread that is already running?
[05:22:03] Brozo: how do yall use rake?
[05:22:38] jamesfordummies: can you be more specific?
[05:25:48] Aeyrix: Generally from the terminal.
[05:25:54] Aeyrix: `rake db:migrate`.
[05:26:38] Brozo: are there any good sources for learning how to use rake? I've only been able to finde very basic tutorials that either don't explain basic components or tutorials that go over my head?
[05:27:30] jamesfordummies: Brozo: what would you like to use rake for, specifically? rails? or to create your own rake tasks?
[05:27:46] sevenseacat: rake field manual?
[05:29:22] Brozo: I'm building a project in ruby and want to simplify running it to a single rake command
[05:57:56] Sirilia: Can someone confirm if this is a good read for ruby blocks? http://robsobers.com/struggle-ruby-blocks/
[05:59:04] spicymagpie: Sirilia: reading
[05:59:28] Radar: Brozo:https://gist.github.com/radar/7fe9be28037c0ce56df7
[06:02:16] Sirilia: spicymagpie, Aight.
[06:02:48] spicymagpie: what are you doing, trying to understand blocks?
[06:02:57] spicymagpie: or a more advanced thing about it?
[06:03:29] spicymagpie: for the first one, it's good.
[06:04:35] Sirilia: I see, btw the & operator is for passing blocks?
[06:05:13] Radar: Sirilia: block arguments are yielded from inside the method, which is something I don't think you cover: https://gist.github.com/radar/43ca3497548dafefab0a
[06:05:29] Radar: You have some mentions of yield without any arguments
[06:06:09] spicymagpie: Sirilia: once you understand blocks, I recommend you to read this one: http://awaxman11.github.io/blog/2013/08/05/what-is-the-difference-between-a-block/
[06:06:25] Sirilia: Radar, So in your example, moo takes a block and sets a to 1. What does the yield a do after?
[06:06:37] Sirilia: spicymagpie, Yea thank you :)
[06:06:42] spicymagpie: but not for *now*, because things may get confusing.
[06:06:48] Radar: Sirilia: It yields the variable to the block
[06:07:00] Sirilia: Radar, What does that mean?
[06:07:09] Radar: Sirilia: I'll show you with a non-contrived example.
[06:08:02] Radar: Sirilia: https://gist.github.com/radar/43ca3497548dafefab0a
[06:08:18] Radar: Sirilia: So I'm calling configure on the Rails module there, which yields an instance of the Configuration class.
[06:08:27] Radar: That instance is then available inside the block
[06:08:33] Radar: Down here: https://gist.github.com/radar/43ca3497548dafefab0a#file-config-rb-L16-L18
[06:08:47] Radar: That config object is the same config object as what's yielded here: https://gist.github.com/radar/43ca3497548dafefab0a#file-config-rb-L10-L12
[06:08:57] Radar: And Rails.config is also the same object
[06:09:20] Hanmac1: Radar: you dont need &block when you are using yield
[06:09:30] Radar: hanmac1: oh nice :)
[06:09:34] Radar: old habit
[06:09:57] spicymagpie: yep, I don't get used to not use &block either.
[06:12:50] Sirilia: Radar, And what about |config|, why can you do that really and what is it really in-depth? is it possible to pass more such as |config, settings| ?
[06:13:03] echosystm: def x(y); puts y; end; x { a: 1, b: { c: 3 }};
[06:13:07] echosystm: why does this not run?
[06:13:30] echosystm: it runs if i put the call to x in parentheses x({ a: 1, b: { c: 3}})
[06:13:44] echosystm: but i get a syntax error if i dont do that
[06:14:07] Radar: https://gist.github.com/radar/43ca3497548dafefab0a
[06:14:12] Radar: Sirilia: Yes you can do that ^
[06:14:25] Radar: the do |config, settings|... the things in the "pipes" are called block arguments
[06:14:32] Radar: You can think of them the same as method arguments.
[06:14:38] Radar: or at least, I do :)
[06:14:46] spicymagpie: echosystm: what is the error it gives to you?
[06:15:56] echosystm: sorry i've figured it out
[06:16:01] Aeyrix: SyntaxError: (irb):10: syntax error, unexpected ':', expecting '}'
[06:16:03] echosystm: its the nested hash that causes problem
[06:16:05] Aeyrix: That'd have been the error.
[06:16:25] echosystm: it should be "x a: 1, b: { c: 3 }"
[06:16:33] echosystm: not "x { a: 1, b: { c: 3 }}"
[06:16:51] Aeyrix: That's really unreadable.
[06:16:54] Aeyrix: The former, that is.
[06:16:55] Sirilia: Radar, Ok so when you do yield , you also say how many block arguments are accepted? For example, yield a,b,c then I can do ... do |foo, boo, roo| .. end ?
[06:16:59] Aeyrix: The latter, with braces, is far cleaner.
[06:17:04] Aeyrix: You should use parentheses imo.
[06:17:13] Radar: echosystm: Ruby is interpreting you're passing a block to the method, not an argument
[06:17:22] Radar: Sirilia: yes htat's right
[06:18:14] Sirilia: Radar, Oh I see :), so the .each method yields one argument?
[06:18:38] Radar: Sirilia: one object, yes
[06:18:52] Sirilia: Radar, Ahh I see thank you :D
[06:20:26] Sirilia: Radar, We will have a long talk when I get your book and start reading it :)
[06:20:57] Sirilia: Radar, I hope it's suited for beginners?
[06:21:08] Radar: Rails 4 in Action? yes.
[06:21:21] Hanmac1: Sirilia: i dont think you can say that ... Hash#each for sample has two block arguments
[06:21:50] Sirilia: hanmac1, I guess it then yields something like *args ?
[06:22:34] Sirilia: hanmac1, Or at least checks how many block arguments are passed and yields it/them?
[06:22:39] Sirilia: Radar, Great!
[06:23:30] Sirilia: Radar, Is the book aimed to give the reader the fundamentals only or does it go more in-depth also?
[06:23:53] Radar: Sirilia: Mainly the fundamentals with Rails, but there are some parts in the later chapters we go more in-depth.
[06:25:25] Sirilia: Radar, Great I can't wait :D
[06:37:54] Sirilia: What file includes the method each?
[06:40:23] Hanmac1: Sirilia: depends on the class, Array and Hash have their own each methods, also checkout the Enumerable module which does depend on the each method
[06:41:14] Sirilia: hanmac1, Alright I will thank you.
[06:44:36] Sirilia: hanmac1, I guess those classes are built-in so we can't access them?
[06:44:55] Radar: Access them how?
[06:45:08] Sirilia: As I can open and read the set.rb file
[06:45:16] sevenseacat: if its part of the stdlib, you can
[06:45:23] sevenseacat: core is written in c, so not as nice
[06:45:25] Radar: They're written in C.
[06:45:41] Sirilia: Great where can I find it? :D
[06:45:41] Hanmac1: Sirilia: http://ruby-doc.org/core-2.2.2/Array.html#method-i-each there is the source but like said its in C
[06:45:44] Radar: Turns out Set is in Ruby: https://github.com/ruby/ruby/blob/trunk/lib/set.rb
[06:46:01] Radar: https://github.com/ruby/ruby/blob/trunk/array.c
[06:46:03] Radar: Almost 6,000 lines.
[06:46:19] Nilium: You can also just use arrays as sets, if you feel like it.
[06:46:40] Hanmac1: http://ruby-doc.org/stdlib-2.2.2/libdoc/set/rdoc/Set.html#method-i-each there you can toogle the source too
[06:46:58] Radar: Sirilia: Are you sure Set is the thing you want?
[06:47:19] Sirilia: Radar, No, Array was. But I thought Array was a file like set.rb is.
[06:57:52] Sirilia: Is the pickaxe book relevant anymore? For Ruby 1.9 and 2.0
[06:59:15] pontiki: do you mean the free online version?
[07:00:00] Hanmac1: shevy: http://imgur.com/gallery/wIwzA
[07:00:20] Sirilia: No, the book.
[07:02:22] Hanmac1: sevenseacat: imo the most interesting part is that printer ink cost more than human blood ;P
[07:02:37] sevenseacat: yeah I've heard that printer ink is the most expensive fluid on the planet
[07:02:46] pontiki: Sirilia: opinions vary. i still find it useful, but not as useful as the online documentation
[07:02:55] Radar: Solution: print using human blood
[07:03:09] Radar: Would be hard to stop it coagulating.
[07:03:10] Sirilia: How come Eloquent Ruby is still relevant it's from 2011.
[07:03:20] mozzarella: how print using water
[07:03:31] Radar: Sirilia: because Ruby hasn't changed that much since thne.
[07:03:52] pontiki: Sirilia: because eloquent ruby is not about the specifics of language syntax and much much more about the idea of proper coding
[07:04:33] pontiki: you can take the concepts presented in Eloquent Ruby and apply them to other languages as well, though not as well, and with having to dig more out of that other language
[07:06:18] Hanmac1: there are new features in syntax like key arguments in ruby 2.0+ but the core stuff of ruby might be ok in the books
[07:07:04] pontiki: i don't believe there's been any breaking syntax in 2.1 and beyond, has there?
[07:07:36] sevenseacat: i think 2.1 was mostly optimizations and new features
[07:07:36] Radar: when were kwargs added?
[07:07:45] sevenseacat: like refinements or whatever theyre called
[07:08:01] Radar: I thought refinements were in ruby 2.2.
[07:08:09] Radar: Ruby 2.0 was kwargs
[07:08:24] sevenseacat: ACTION has never used kwargs
[07:08:45] Hanmac1: Radar: and 2.1 was non-optional kwargs
[07:10:21] Hanmac1: there is the list of all possible argument types i know:
[07:10:21] Hanmac1: >> method(def abc(a, b = 1, *c, d:, e: 2, **f, &g); end).parameters
[07:10:22] ruboto: hanmac1 # => [[:req, :a], [:opt, :b], [:rest, :c], [:keyreq, :d], [:key, :e], [:keyrest, :f], [:block, :g]] (https://eval.in/367497)
[07:11:28] sevenseacat: i've used a, b, c and g :)
[07:12:27] pontiki: i started using keyword args in one project based on sandi metz's recommendation
[07:13:10] pontiki: later on, someone changed everything back to positional args
[07:13:58] pontiki: naturally, no documentation was changed
[07:16:05] Hanmac1: i also uses f as keyrest, even when i am not using key arguments to catch the option hash
[07:26:47] Hanmac1: shevy checkout what i did with wxwidgets ... (its not for rwx itself yet, but might added later): http://i.imgur.com/C1OsdEu.png
[08:19:49] shevy: hanmac1 cool, that is a special widget?
[08:21:52] Hanmac1: shevy i made it myself the other diagram types will be added later
[08:33:13] ton31337: hi, anyone is using rbenv and systemtap?
[08:37:41] wasamasa: ACTION gasps as ton31337 leetness
[09:04:49] negev: how do you reference global variables with the name of the variable in another variable? eg a = "foo" ; b = get_global[a] === $foo
[09:08:18] apeiros: negev: I think at the moment there's only eval for that.
[09:09:11] apeiros: negev: sounds like you're having a strong smell in your code there, though.
[09:09:32] apeiros: a) using globals is a smell on its own, b) variable variables is a smell too
[09:14:07] shevy: awww negev got scared away
[09:15:33] adaedra: stop scaring people away, shevy
[09:15:58] zotherstupidguy: ACTION goes down the rabbit hole . . .
[09:17:01] shevy: adaedra it was you
[09:17:57] flughafen: shevy: who stole the cookie from the cookie jar?
[09:20:23] zotherstupidguy: i think global variables got their place
[09:21:10] shevy: sort of moot to argue because ruby uses them a lot
[09:21:26] zotherstupidguy: shevy you mean stdlib?
[09:22:31] apeiros: shevy: almost all uses of globals in ruby could easily be replaced by non-globals.
[09:22:45] apeiros: also many global variables in ruby are not really variables
[09:23:35] zotherstupidguy: apeiros ya, i use global constants not variables
[09:23:54] apeiros: zotherstupidguy: please, don't confound terminology
[09:24:06] apeiros: a constant is a constant, a global is a global. there's no such thing as a global constant.
[09:26:12] shevy: as the name applies, a constant is unchangable :)
[09:26:14] zotherstupidguy: apeiros showed me that i am an idiot, true
[09:26:32] apeiros: not my words???
[09:26:58] zotherstupidguy: yeah, but i think i did a mistake in the past :)
[09:27:55] shevy: this is the second time that I now noticed someone changing from http to https
[09:29:13] shevy: well it was not just that guy, I think 2 days ago I also noticed a http-to-https change, and before that, I read this... let me fetch the blog post...
[09:29:22] zotherstupidguy: the heartbleed fix was for what?
[09:29:55] shevy: https://blog.mozilla.org/security/2015/04/30/deprecating-non-secure-http/
[09:30:14] shevy: zotherstupidguy to show how awesome openssl and https is?
[09:30:24] shevy: "Today we are announcing our intent to phase out non-secure HTTP."
[09:30:29] shevy: I feel much more secure now
[09:32:06] zotherstupidguy: shevy security is like buyin expensive stuff to your wife so that you "think" she wouldnt cheat on you. don't bother :P
[09:33:01] shevy: well there is still a difference
[09:33:06] adaedra: Forcing people to move to HTTPS is a bit hard imo
[09:33:18] shevy: in your case I'd make a decision (to buy something); in the second case, someone else (developers) decide onto me how I should use something
[09:34:57] zotherstupidguy: whats the diff between http and https?
[09:35:23] flughafen: zotherstupidguy: google ssl
[09:35:28] exons: talking about https -> https://weakdh.org/
[09:36:32] zotherstupidguy: ok, so man-in-the-middle doesnt work with ssl?
[09:37:24] zotherstupidguy: i think it does
[09:37:39] adaedra: you get encrypted data in that case
[09:37:49] shevy: zotherstupidguy to me it seems a lot as if the firefox team got completely stunned by the chrome browser; it's as if their "innovation" is largerly driven to look at what chrome has got, and adjust to that as a default. For example, the menu bar on top is hidden by default when I download a new firefox version; I have to specifically click on enabling this hidden widget. In the past, it was always there. I a
[09:37:49] shevy: m scared to see that the menu bar will be removed altogether one day, in which case I will dump firefox altogether (but I have no other browser, so that sucks too)
[09:38:23] adaedra: I don't think the menu bar will disappear soon
[09:38:46] rdark: zotherstupidguy: you can decrypt the data if you have access to the keys, or can control DNS and present a 'valid' certificate to clients
[09:39:08] zotherstupidguy: i think chrome google account is the killer feature, as it stores your history and passes and provide it back to you after a new installation, talkin about hacking stuff, right?
[09:39:14] shevy: adaedra I just anticipate the worst to come ;)
[09:39:38] zotherstupidguy: rdark i think if the attacker captures the session or rest it to get the first handshak, it is all the same
[09:39:48] adaedra: they have to keep the menu bar for OS X anyway, so removing it doesn't seems smart...
[09:39:49] shevy: zotherstupidguy dunno. the less I depend on google, the better
[09:39:54] exons: zotherstupidguy: it's a trust issue in this case (regarding google)
[09:40:09] zotherstupidguy: privacy is dead, lets move on
[09:40:15] rdark: I use vimperator/pentadactyl anyway so no menu bars for me
[09:40:26] shevy: you can move on though :)
[09:40:48] shevy: vimperator is that vim-keybindings thingy?
[09:41:01] zotherstupidguy: all our data is stored today to be analyzed by young digital anthropology researchers in the future :)
[09:41:11] zotherstupidguy: its kinda cool!
[09:41:24] shevy: zotherstupidguy not cool when others make money with my data without paying me!
[09:41:34] exons: zotherstupidguy: I don't think than the next generation will be interested in the past
[09:41:46] zotherstupidguy: we all be dead, our data will not
[09:42:00] zotherstupidguy: i think as always the past is important
[09:42:17] exons: but people care less and less about the past
[09:43:04] zotherstupidguy: exons thats saying we don't care who enisten discovered emc2, we just gonna use it anyway
[09:43:17] zotherstupidguy: the story matters dude
[09:43:20] shevy: exons your nick is a strange one
[09:44:26] exons: shevy: yeah I joined #ruby this morning
[09:44:41] shevy: reminds me of molecular biology
[09:44:52] exons: It's the goal :)
[09:50:19] platzhirsch: Is this Latin or what
[09:50:24] platzhirsch: ACTION pokes exons
[09:52:43] helpa: has joined
[09:52:56] helpa: has joined
[09:53:32] exons: platzhirsch: http://en.wikipedia.org/wiki/Exon
[09:54:04] helpa: has joined
[09:54:15] exons: What's the difference between #ruby and #ruby-lang ?
[09:54:48] helpa: has joined
[09:54:56] platzhirsch: one is inferior, one isn't
[09:55:37] senayar: has joined
[09:55:37] senayar: has joined
[09:56:44] anisha: has joined
[09:58:09] alex88: has joined
[09:59:57] ChampS_: Could not find json-1.8.2 in any of the sources (Bundler::GemNotFound)
[10:00:00] ChampS_: anyone an idea?
[10:00:04] ChampS_: ive installe json 1.8.2
[10:00:08] ChampS_: its in the gems list
[10:00:17] gregf_: >> ("ruby-lang".split(//) - "ruby".split(//)).join()
[10:00:18] ruboto: gregf_ # => "-lang" (https://eval.in/367629)
[10:00:33] adaedra: you did bundle install, ChampS_ ?
[10:01:05] ChampS_: all dependencies were installed, json 1.8.2 too
[10:01:06] adaedra: how did you require the gem in your Gemfile?
[10:01:23] ChampS_: I dont know, its a redmine 3 I try to install
[10:01:48] ChampS_: It's not my own application
[10:01:55] adaedra: because the way it's written seems weird
[10:02:17] ChampS_: one moment i take a look
[10:03:21] shevy: exons historically #ruby was here first; the guy who registered it or something, vanished, and so people started #ruby-lang
[10:03:54] ChampS_: there is no json dependency in Gemfile but maybe another dependency needs json to worok
[10:04:05] brandon: has joined
[10:04:17] jimms: has joined
[10:04:22] taiansu: has joined
[10:06:22] adaedra: no other guess
[10:06:37] adaedra: the way bunder responds seems to indicate you required 'json-1.8.2' gem
[10:06:58] adaedra: but I'm not sure where this could come from
[10:07:07] ChampS_: but if I use "gem list" there is json 1.8.1 and 1.8.2 listed
[10:07:58] adaedra: yes, so 'json' gem
[10:09:22] ChampS_: yes but when load the redmine page there will be this error "Could not find json-1.8.2 in any of the sources (Bundler::GemNotFound)"
[10:10:25] adaedra: What did you change in your redmine install? What did you do exactly?
[10:10:53] ChampS_: I copied the redmine folder to /usr/share/
[10:11:06] ChampS_: and typed "bundle install"
[10:11:24] adaedra: and it's where the error happens?
[10:11:47] ChampS_: noo the error happens when I go to localhost to get the redmine mainpage
[10:11:56] mhib: has joined
[10:13:24] helpa: has joined
[10:13:41] helpa: has joined
[10:13:47] ChampS_: first i thought its a problem with permissions
[10:13:51] adaedra: Is the use you run `bundle install` with the same user you run passenger?
[10:14:15] ChampS_: sigh I dont know xD
[10:14:32] ChampS_: how can I check which user started passenger
[10:14:58] adaedra: look with ps
[10:16:01] dc: has joined
[10:19:28] ChampS_: so yes its the same user
[10:19:53] ChampS_: passenger is running under "Ben" and as Ben I used "bundle install" in my /usr/share/redmine
[10:23:25] ChampS_: another idea adaedra?
[10:23:47] adaedra: I'm not used to passenger
[10:24:06] airdisa: has joined
[10:24:39] adaedra: bundle install runs without errors?
[10:25:17] ChampS_: bundle show json show me this "/usr/share/redmine/vendor/bundle/ruby/2.2.0/gems/json-1.8.2"
[10:25:58] ChampS_: but now i can try to find the problem using google searching for passenger cant find json, thx!
[10:26:11] Igorshp: has joined
[10:30:54] Igorshp: has joined
[10:31:55] yaw: has joined
[10:33:19] jhass: ChampS_: what ruby version is the PassengerRuby directive pointing at?
[10:34:00] helpa: has joined #ruby
[10:34:26] helpa: has joined #ruby
[10:35:22] reinaldob: has left #ruby: ()
[10:36:27] Rollabunna: has joined #ruby
[10:37:53] thatslifeson: has joined #ruby
[10:38:01] fabrice31: has joined #ruby
[10:42:01] brandon: has joined #ruby
[10:43:29] charliesome: has joined #ruby
[10:45:37] clauswitt: has joined #ruby
[10:46:49] echosystm: has joined #ruby
[10:46:52] RegulationD: has joined #ruby
[10:46:59] blueOxigen: has joined #ruby
[10:47:29] cajone: has joined #ruby
[10:47:48] zotherstupidguy: has joined #ruby
[10:48:58] juanpaucar: has joined #ruby
[10:50:34] surs: what parameter to String.unpack decodes a binary string holding UTF 16 encoded text?
[10:50:41] haxrbyte: has joined #ruby
[10:50:53] leafybas_: has joined #ruby
[10:51:06] doodlehaus: has joined #ruby
[10:51:20] stoffus: has joined #ruby
[10:51:23] bruno-: has joined #ruby
[10:51:54] surs: and how could I tell from the documentation at http://ruby-doc.org/core-1.9.3/String.html#method-i-unpack ?
[10:52:56] mathie: has joined #ruby
[10:53:46] jhass: surs: .force_encoding('UTF-16LE') (BE) ?
[10:54:26] arup_r: has joined #ruby
[10:55:20] einarj: has joined #ruby
[10:56:30] rippa: has joined #ruby
[10:56:59] Oog: has joined #ruby
[10:57:11] phizzbuzz: has joined #ruby
[10:58:04] Oog: has joined #ruby
[11:00:29] Igorshp: has joined #ruby
[11:04:45] cajone: has joined #ruby
[11:04:54] taiansu: has joined #ruby
[11:05:25] Papierkorb: has joined #ruby
[11:05:55] flughafen: can i call features or scenarios from steps or just other steps
[11:07:14] flughafen: with cucumber
[11:07:35] sgambino: has joined #ruby
[11:10:32] jespada: has joined #ruby
[11:12:37] charliesome: has joined #ruby
[11:14:02] sent1nel: has joined #ruby
[11:15:47] leafybasil: has joined #ruby
[11:16:53] haxrbyte: has joined #ruby
[11:17:22] DaniG2k: has joined #ruby
[11:18:33] mengu: has joined #ruby
[11:18:38] mengu: has joined #ruby
[11:23:36] arup_r: has joined #ruby
[11:25:21] nfk|laptop: has joined #ruby
[11:26:35] maasha: has joined #ruby
[11:26:51] gizless: has joined #ruby
[11:27:16] mikecmpb_: has joined #ruby
[11:27:24] maasha: Is there a more clever way to do this?: value = value.to_sym if value.is_a? String
[11:28:18] adaedra: >> :symbol.to_sym
[11:28:19] ruboto: adaedra # => :symbol (https://eval.in/367662)
[11:28:35] adaedra: so, if your data can only be Symbol or String, you can just do .to_sym
[11:29:53] abuzze: has joined #ruby
[11:31:12] ldnunes: has joined #ruby
[11:32:11] shevy: we should write a pseudo language
[11:32:14] shevy: that generates ruby code
[11:32:53] Darkwater: call it sapphire
[11:33:07] Kedare: has joined #ruby
[11:33:08] Darkwater: but how about a preprocessor for sapphire
[11:33:17] adaedra: this is getting too meta
[11:33:20] jmignault: has joined #ruby
[11:33:34] adaedra: sometimes, you don't need to go deeper
[11:34:51] shevy: well we have all sort of language generators
[11:34:53] shevy: coffeescript!
[11:35:08] adaedra: I don't like coffee
[11:35:13] adaedra: I'll make teascript
[11:35:30] Darkwater: IcedCoffeeScript
[11:35:38] adaedra: That's cold
[11:35:58] shuber_: has joined #ruby
[11:37:03] Zai00: has joined #ruby
[11:37:09] camonz: has joined #ruby
[11:37:21] rodfersou: has joined #ruby
[11:37:44] DigitalDayTrader: has joined #ruby
[11:38:02] maasha: adaedra: but if the value is nil or Fixnum ...
[11:38:23] adaedra: In that case no.
[11:39:16] einarj_: has joined #ruby
[11:46:55] chinmay_dd: has joined #ruby
[11:46:59] ravenreborn: has joined #ruby
[11:47:45] shevy: something where you can omit "end" :)
[11:47:58] ponga: shevy: is your first language german
[11:48:17] edwinvdgraaf: has joined #ruby
[11:48:46] shevy: ponga yeah
[11:48:59] shevy: ponga your first language is korean?
[11:49:08] ponga: are you more confident with english?
[11:49:21] ponga: iirc you said somthing like that
[11:49:38] shevy: nah, I am more confident with german... my brain has it easier to "think" in german, just as I guess matz has it easier to think in japanese as he is talking in english
[11:49:53] shevy: english sort of has more words though
[11:50:19] ponga: but i don't think you would have any delay thinking in English to use it
[11:50:21] shevy: Like you know, when you try to express something, and you have a similar word in your native tongue, but it is not 100% the same as in english (or another language)
[11:50:44] shazaum: has joined #ruby
[11:50:48] shevy: I dunno... take the japanese word kaizen
[11:51:00] hoov: has joined #ruby
[11:51:03] ponga: what, improve?
[11:51:08] shevy: yeah precisely
[11:51:19] shevy: continuous improvement
[11:51:20] shazaum: has joined #ruby
[11:52:00] shevy: it's like a different philosophy... take the samurai. they would want to perfect the drawing of the sword alone... nobody in europe could have had such a high dedication towards optimizing that (I dunno the word... iaiutsu or what was the name...)
[11:52:17] ita-ness: has joined #ruby
[11:53:32] ponga: shevy: just to add, kaizen is preferred to be used onto non material improvement, and kairyou is used for materialistic one
[11:53:35] ponga: just to add
[11:53:40] ponga: teaching you japanese!
[11:53:46] hectortrope: has joined #ruby
[11:56:32] sigurding: has joined #ruby
[11:57:44] gizmore: has joined #ruby
[12:00:56] trampi: has joined #ruby
[12:02:41] chinmay_dd: has joined #ruby
[12:03:25] keen________: has joined #ruby
[12:05:52] einarj: has joined #ruby
[12:07:17] mengu: has joined #ruby
[12:07:18] mengu: has joined #ruby
[12:08:41] thatslifeson: has joined #ruby
[12:08:54] shevy: ponga cool
[12:09:04] shevy: so they even have separate words for rather similar concepts :)
[12:09:24] senayar: has joined #ruby
[12:09:24] shevy: kaizen as word is known here but kairyou ... never heard that one before
[12:09:26] ponga: shevy: its because kor/jap rely heavily on chinese characters for nouns
[12:09:38] ponga: nearly every one of them is compound word
[12:09:51] HotCoder: has joined #ruby
[12:09:56] michaelreid: has joined #ruby
[12:09:58] qwertme: has joined #ruby
[12:10:01] einarj_: has joined #ruby
[12:10:59] ponga: btw, for example, kairyou is more likely to be used for stuff like electronics, car, etc where kaizen its more about 'he is better treated now'
[12:11:55] Xoro: has joined #ruby
[12:12:00] ponga: however even japanese public don't often use two words distinctively
[12:12:52] airdisa: has joined #ruby
[12:12:58] gizless: has joined #ruby
[12:12:59] RahulT: has joined #ruby
[12:13:20] tubuliferous_: has joined #ruby
[12:13:57] but3k4: has joined #ruby
[12:14:33] shevy: there is some chinese word... molue or so
[12:14:53] shevy: it means something like "super-strategeme"... like to not just have a longer strategy, but a strategy of strategies
[12:14:58] chinmay_dd: has joined #ruby
[12:15:01] senayar: has joined #ruby
[12:15:45] shevy: hard to describe a symbol with characters :\
[12:16:14] ponga: i'd have no idea of chinese word until i see the actual words.. the reading is different among chn/kor/jap
[12:16:22] flughafen: an ya ha se yo
[12:16:31] ponga: like euro has different readings of latin adopted words
[12:16:41] ponga: hi flughafen
[12:16:59] ponga: impressive korean btw
[12:17:14] SouL_|_: has joined #ruby
[12:17:14] flughafen: i did't know korean used chinese characters too?
[12:17:16] flughafen: i've never seen it
[12:17:25] ponga: flughafen: its only got readings left
[12:17:36] ponga: they ditched it around 40 yrs ago
[12:18:08] ponga: chinese for korean is more of latin to English now
[12:18:17] ponga: just adopted words of origin
[12:18:22] flughafen: i'm familiar with japanase and chinese and korean. http://www.koreatimes.co.kr/www/index_kr.asp i uess it looks like there are soe characters in there
[12:19:32] ponga: flughafen: japanese can also throw away using chinese , but kana system is kinda fucked up for readability without chinese
[12:19:47] flughafen: i've studied a little japanese
[12:20:09] lidenskap: has joined #ruby
[12:20:16] ponga: whereas korean alphabet can handle it alone, hence removal of chinese in kor
[12:20:43] einarj: has joined #ruby
[12:20:52] ponga: flughafen: trust me ,japanese does not even use whitespace, japanese without chinese & whitespace is like reading java code
[12:21:24] ponga: that's why japanese pokemon game only uses kana with whitespace(its very rare!) cos its for kids
[12:21:35] Hanmac1: ACTION likes the korean alphabet because the letters does look so SYFY like, like from aliens ;P
[12:21:37] mrdmi_: has joined #ruby
[12:21:44] edwinvdg_: has joined #ruby
[12:21:51] ponga: really? does it look syfy to euros?
[12:22:51] ebbflowgo: has joined #ruby
[12:23:03] n008f4g_: has joined #ruby
[12:23:06] Papierkorb: It does look quite distinct
[12:23:06] Hanmac1: hm or was it the thai one? hm i need to look at my charmap
[12:23:07] flughafen: ponga: do you live in korea?
[12:23:16] metadave__: has joined #ruby
[12:23:22] ponga: flughafen: yeah at the moment, im returning to NZ next month
[12:23:27] ebbflowgo: has left #ruby: ()
[12:23:29] shevy: ponga yeah that was cool that the korean managed to simplify; I suppose written chinese is the most complicated written language
[12:23:31] flughafen: ponga: why korea?
[12:23:39] ponga: flughafen: cos im korean ser
[12:23:49] nfk|laptop: has joined #ruby
[12:24:08] flughafen: i figured since it's your first language.
[12:24:10] Papierkorb: hanmac1: thai letters look like a rain forest with chimps hanging from trees
[12:24:11] ponga: shevy: i still believe that if japanese adopted using whitespace, they could ditch chinese too
[12:24:28] flughafen: ponga: have they said why thye don't want to?
[12:24:31] ponga: flughafen: i can't understand 'why korea?' did you mean 'why nz?'
[12:24:32] rodferso1: has joined #ruby
[12:24:38] ahmetkapikiran: has joined #ruby
[12:25:07] ponga: flughafen: 1) consensus that teaching chinese is a root of being japanese and SOPHISTICATED
[12:25:23] flughafen: ponga: oh, i just mean, i thought you would have lived in korea, but since you are returning to nz, are but you live in korea now. it's weird.
[12:25:27] ponga: 2) even if with Kana system and whitespace, readability is fucked up
[12:25:48] ponga: flughafen: staying with family sir
[12:25:57] ponga: but i miss my friends in NZ too
[12:26:10] flughafen: ponga: so just a vacation?
[12:26:16] HotCoder: has joined #ruby
[12:26:31] ponga: dunno, a long one tho, i will get a job and stay for couple of years
[12:26:33] fmcgeough: has joined #ruby
[12:26:38] ponga: then i think i'd move to japan too
[12:27:00] Hanmac1: ponga: i didnt know if i find them again, but i once found letters in my charmap that does look similar to that one: http://www.sos-brigade.de/wordpress/wp-content/uploads/2009/07/Haruhi-08-Signs-300x168.jpg ;ppp
[12:27:08] flughafen: i'd love to stay in japan for a little bit
[12:27:20] airdisa_: has joined #ruby
[12:27:39] flughafen: i just looked at a trip to japan next january. i'd like to go to a car show
[12:27:50] ponga: hanmac1: but korean letters consist more of straight lines! haha i see what you see there too
[12:28:17] flughafen: ponga: it could have easily replaced the writing from the predator
[12:28:57] metadave_: has joined #ruby
[12:29:11] livathinos: has joined #ruby
[12:29:36] ponga: speaking of japanese, i believe using chinese letters is what blocks many westerners to learn japanese
[12:29:47] flughafen: ponga: it's not so bad.
[12:29:51] fabrice31: has joined #ruby
[12:29:59] ponga: japanese language is too minor considering its nation's popularity
[12:30:39] flughafen: ponga: it's more of a mental block
[12:30:53] sandelius: is autoload deprecated, or will be, or not?
[12:30:56] ponga: flughafen:yes i agree
[12:31:05] ponga: i was only speaking of linguistic barrier
[12:31:18] ponga: autoload?
[12:31:21] flughafen: i thought it would be hard learning the writing just because it looks so weird, bu i elarned the hirigana and katakana in an hour or something, then it was easy.
[12:31:25] flughafen: i mean, kanji is more difficult
[12:31:40] flughafen: obviously but once you learn the radicals, ... have you seen that chineasy? thing
[12:31:50] flughafen: http://chineasy.org/
[12:31:54] sandelius: ponga http://ruby-doc.org/core-2.2.2/Kernel.html#method-i-autoload
[12:32:10] nfk|laptop: has joined #ruby
[12:32:47] tacotaco_: that's basically noobified "remembering the kanji"
[12:33:05] ponga: i still hate kanji
[12:33:06] flughafen: tacotaco_: yeah, but it's cool
[12:33:11] flughafen: ponga: how many do you know?
[12:33:30] ponga: flughafen: as good as japanese adults do
[12:33:45] ahmetkapikiran: has joined #ruby
[12:33:48] ponga: learning japanese for korean is like learning portugueses for spanish flughafen
[12:33:57] ponga: it took me 5 months to make subtitles for anime
[12:34:09] flughafen: i took tae kwon do for a little while so i learned some korean words.
[12:34:32] ponga: flughafen: ironically, kanji serves superbly well for NLP purposes
[12:34:42] ponga: if you think of homonym issues!
[12:34:53] ponga: korean NLP is nightmare for that
[12:35:15] ponga: and tell you what flughafen , nobody on earth is compelety sure about korean grammar anyway
[12:35:17] ponga: its too fucked up
[12:35:20] Chicken_John1: has joined #ruby
[12:35:25] ebbflowgo: has joined #ruby
[12:35:32] echosystm: has joined #ruby
[12:35:34] Squarepy: has joined #ruby
[12:35:45] RegulationD: has joined #ruby
[12:36:02] ponga: chief headmaster of korean national language centre said in interview that even he's not confident of using korean 100% accurate
[12:36:06] ponga: me niether
[12:36:46] ponga: that's why my ruby chatbot is based on japanese, not korean ;p
[12:37:02] flughafen: ponga: which chat bot?
[12:37:11] Chicken_John1: has left #ruby: ()
[12:37:20] Rollabunna: has joined #ruby
[12:37:23] ponga: flughafen: its my personal project, a chatbot that could serve as waifu
[12:37:26] tacotaco_: I still struggle with kanji (readings) and I've been on/off studying Japanese for 10 years now
[12:37:29] Squarepy_: has joined #ruby
[12:37:35] tacotaco_: but that's because I'm lazy..
[12:37:47] ponga: "occasionally giving consolation and comfort communication"
[12:37:51] juanpaucar: has joined #ruby
[12:37:54] ponga: what i said to shevy
[12:38:46] jottr: has joined #ruby
[12:40:00] sepp2k: has joined #ruby
[12:40:23] Axy: has joined #ruby
[12:40:54] lordkryss: has joined #ruby
[12:43:04] phutchins: has joined #ruby
[12:44:28] shevy: ponga lol
[12:44:57] shevy: robots are cool, but I will never be able to understand the japanese fascination there
[12:45:55] shevy: flughafen yeah I can count from 1 to 10 in korean too because of taekwondo... we had to do pushups, but strangely enough, we only counted from 1 to 10, then started at 1 again... we never counted to 20 :P
[12:45:58] ponga: shevy: to give you a hint, men are ravaged by feminism in japan
[12:47:13] fabrice31: has joined #ruby
[12:47:29] thatslifeson: has joined #ruby
[12:47:35] dstarh: has joined #ruby
[12:48:35] Hanmac1: ponga: apropos "waifu" checkout the cartoon: "GravityFalls" specially Season2 Episode: "a Girl for Soos" ;P
[12:48:57] yh: has joined #ruby
[12:49:29] ponga: hanmac1: im watching it
[12:50:08] krz: has joined #ruby
[12:51:13] bmurt: has joined #ruby
[12:54:03] andrew-l: has joined #ruby
[12:54:33] agent_white: has joined #ruby
[12:55:17] quimrstorres: has joined #ruby
[12:55:52] lektrik: has joined #ruby
[12:56:10] Hanmac1: ponga: hm you can also watch the other episodes before it (so you might watch the season before to understand what the cartoon is about)
[12:56:18] ponga: hanmac1: omg im gonna destroy japan lol
[12:56:25] ponga: that's exactly what im creating!
[12:56:58] clauswitt: has joined #ruby
[12:57:01] Hanmac1: ponga: its a american cartoon, not a japanise anime ;P
[12:57:17] ponga: i know but they kinda nailed the point
[12:57:29] AxonetBE: has joined #ruby
[12:57:30] anaeem1__: has joined #ruby
[12:57:41] einarj_: has joined #ruby
[12:57:55] AxonetBE: How can I sort an array to specific order? I want to have NO always at the end https://gist.github.com/DriesS/ef0593d46a7fcfa827b2
[12:58:39] ponga: let me try
[12:58:43] griffindy: has joined #ruby
[12:58:46] hoelzro: AxonetBE: you can provide a comparison block to sort
[12:59:07] ponga: AxonetBE: i did arr.sort
[12:59:11] ponga: and No came at the end
[12:59:37] agent_white: has joined #ruby
[12:59:38] AxonetBE: ponga: lucky then, because values are dynamic
[13:00:51] ponga: hanmac1: am i too japanese to have found this scene charming? lol http://i.imgur.com/C2im7bD.png
[13:01:12] tvw: has joined #ruby
[13:01:16] sankaber: has joined #ruby
[13:01:21] Hanmac1: ponga yeah gifferny is cool ;P
[13:01:32] pwattstbd: has joined #ruby
[13:01:40] hoelzro: arra.sort { |a, b| if a == 'NO' 1 elsif b == 'NO' -1 else a <=> b end }
[13:01:45] hoelzro: AxonetBE: I *think* that should do it
[13:01:58] agent_white: has joined #ruby
[13:02:43] downwithbender: has joined #ruby
[13:02:47] sent1nel: has joined #ruby
[13:03:17] ponga: i can see that working
[13:03:25] norc: has joined #ruby
[13:03:26] flughafen: hanmac1: are you japanese?
[13:03:47] bluOxigen: has joined #ruby
[13:03:52] norc: Hi. Given the following string, what kind of encoding am I probably looking at? 9<255><225>P<13>\<21><133> .<206><239><162><133>Q<182>
[13:03:58] bluOxigen: has left #ruby: ()
[13:04:15] fabrice31: has joined #ruby
[13:04:16] ponga: i don't think so flughafen
[13:04:17] jottr: has joined #ruby
[13:04:34] agent_white: has joined #ruby
[13:04:34] flughafen: i think i'm turning germanese i'm turning germanese i really think so
[13:05:59] Hanmac1: flughafen: nope
[13:06:09] flughafen: hanmac1: are you hanmacanese?
[13:06:15] djbkd: has joined #ruby
[13:06:17] bruno-: has joined #ruby
[13:06:19] Hanmac1: AxonetBE: hm i did: that:
[13:06:20] Hanmac1: >> data =["Metal", "NO", "lionel"]; data.sort; data << "NO" if data.delete("NO"); data
[13:06:21] ruboto: hanmac1 # => ["Metal", "lionel", "NO"] (https://eval.in/367753)
[13:06:24] gaboesquivel: has joined #ruby
[13:07:25] fabrice31_: has joined #ruby
[13:07:27] agent_white: has joined #ruby
[13:07:36] Hanmac1: norc hm looks like a binary string printed with less
[13:08:27] haxrbyte: has joined #ruby
[13:08:34] [k-: has joined #ruby
[13:09:11] JDiPierro: has joined #ruby
[13:09:23] xxtjaxx: has joined #ruby
[13:10:15] xxtjaxx: Hi! I'm playing around with a local copy of discourse, however the javascript when fetched from the server by the browser is packed in eval()'s how can I disable this?
[13:11:59] joast: has joined #ruby
[13:12:08] Hanmac1: xxtjaxx: are you sure you are in the right channel? this is #ruby and not javascript, or you might want #rubyonrails
[13:12:11] dblessing: has joined #ruby
[13:12:42] jpstokes: has joined #ruby
[13:13:48] fabrice31: has joined #ruby
[13:13:56] agent_white: has joined #ruby
[13:14:18] freerobby: has joined #ruby
[13:14:22] cosmicexplorer: has joined #ruby
[13:16:04] idafyaid: has joined #ruby
[13:16:44] xxtjaxx: hanmac1: it's a ruby on rails application and the source scripts in the tree are not wrapped in eval(). Equally when I added a new script that got turned into an eval() call
[13:17:38] allenn: has joined #ruby
[13:17:53] jerius: has joined #ruby
[13:18:37] Hanmac1: xxtjaxx: yes for ruby on rails please use this channel #rubyonrails we are mosty not qualified enough to answer rails questions
[13:19:20] xxtjaxx: ah my bad then cheers!
[13:19:32] rodfersou: has joined #ruby
[13:20:08] Rapier-: has joined #ruby
[13:20:29] Stalkr_: has joined #ruby
[13:20:37] sgambino: has joined #ruby
[13:21:40] kaspernj: has joined #ruby
[13:21:50] unshadow: has joined #ruby
[13:23:30] allenn: has joined #ruby
[13:24:41] abuzze: has joined #ruby
[13:24:42] tier: has joined #ruby
[13:25:18] einarj: has joined #ruby
[13:25:58] User458764: has joined #ruby
[13:28:54] gizmore: has joined #ruby
[13:29:39] mary5030: has joined #ruby
[13:29:45] CloCkWeRX: has joined #ruby
[13:30:21] kies: has joined #ruby
[13:30:35] enebo: has joined #ruby
[13:30:36] doodlehaus: has joined #ruby
[13:31:01] diegoviola: has joined #ruby
[13:31:44] hfp: Hi all, this is my Rakefile: https://gist.github.com/anonymous/82a1fdf94724cfd111f7. When I run `rake spec`, it says there are 0 tests to be run. But if I do `rspec spec/call_controllers/outbound_controller.rb` then it finds 2 tests to run. Why is my rake task not seeing them?
[13:32:52] ismaelga: has joined #ruby
[13:33:10] TinkerTyper: has joined #ruby
[13:34:53] fabrice31: has joined #ruby
[13:35:52] sent1nel: has joined #ruby
[13:36:37] RegulationD: has joined #ruby
[13:37:37] sevenseacat: hfp: because your spec file doesnt have the suffix _spec.rb
[13:37:52] hfp: sevenseacat: oh I see
[13:38:12] fabrice31_: has joined #ruby
[13:38:16] User458764: has joined #ruby
[13:38:24] hfp: that was it... Thanks!
[13:40:14] taiansu: has joined #ruby
[13:40:59] yh__: has joined #ruby
[13:42:08] arup_r: has joined #ruby
[13:42:09] umgrosscol: has joined #ruby
[13:42:42] shadeslayer: has joined #ruby
[13:43:56] arup_r1: has joined #ruby
[13:44:06] fmcgeough: new to Ruby. using Postgres pg gem. Is it possible to use parameter for IN criteria in SELECT? I can???t seem to get it to be happy with what I???m passing.
[13:44:40] tier: has joined #ruby
[13:45:23] qwertme: has joined #ruby
[13:45:29] platzhirsch: has left #ruby: ()
[13:45:41] JDiPierro: has joined #ruby
[13:48:07] fella5s: has joined #ruby
[13:48:45] fmcgeough: I was hoping it???d expand out what I pass??? so in ($1) gets replaced by a first element of array that is also an array. but that obviously is wrong.
[13:50:00] einarj: has joined #ruby
[13:52:33] Ropeney: has joined #ruby
[13:54:00] psye: has joined #ruby
[13:54:49] fabrice31: has joined #ruby
[13:55:42] mengu: has joined #ruby
[13:55:42] metadave: has left #ruby: ()
[13:55:50] jerius: has joined #ruby
[13:56:16] mikecmpbll: fmcgeough: your code, please?
[13:56:49] werelivinginthef: has joined #ruby
[13:56:53] RegulationD: has joined #ruby
[13:57:02] shuber_: has joined #ruby
[13:58:33] ahmetkapikiran: has joined #ruby
[13:59:03] fmcgeough: https://gist.github.com/fmcgeough/cbb777816d951bf46b45 here???s a couple of obviously wrong approaches
[13:59:59] kies: has joined #ruby
[14:00:55] gambl0re: has joined #ruby
[14:02:08] tubuliferous_: has joined #ruby
[14:02:44] enebo: has joined #ruby
[14:02:56] anaeem1_: has joined #ruby
[14:03:02] yh__: has joined #ruby
[14:05:48] antgel: has joined #ruby
[14:06:40] fmcgeough: it appears you just have to build the SQL dynamically so that it matches the number of params you want to use for the IN
[14:06:44] havenwood: has joined #ruby
[14:06:57] paulcsmith: has joined #ruby
[14:08:48] haxrbyte: has joined #ruby
[14:09:32] tjbiddle: has joined #ruby
[14:10:18] bronson: has joined #ruby
[14:10:21] lavros: has joined #ruby
[14:10:41] B1n4r10: has joined #ruby
[14:10:42] slash_nick: has joined #ruby
[14:10:42] slash_nick: has joined #ruby
[14:13:10] senayar: has joined #ruby
[14:14:51] mikecmpbll: fmcgeough: probably you need to use params = ["1,2"]
[14:15:46] gizless: has joined #ruby
[14:17:01] einarj_: has joined #ruby
[14:18:44] antgel: has joined #ruby
[14:20:04] Jagan: has joined #ruby
[14:20:10] kobain: has joined #ruby
[14:20:43] Jagan: how to select random values in drop down list using ruby automations using POM method
[14:20:49] Jagan: Can you help me
[14:21:36] orionstein: has joined #ruby
[14:22:20] Jagan: I have 12 values in my drop down list
[14:22:41] Darkwater: pom method?
[14:22:42] Jagan: Randomly select one value every time
[14:22:54] Jagan: Page object model
[14:23:23] Jagan: Using automation for web application
[14:23:32] Darkwater: don't know, sorry
[14:24:13] Jagan: Can you tel me, in Ruby
[14:24:20] Jagan: Generally
[14:24:26] wasamasa: is that selenium-related?
[14:24:30] echosystm: has joined #ruby
[14:24:38] adaedra: Jagan: what, pick a random value in a list?
[14:24:48] hectortrope: has joined #ruby
[14:24:49] Jagan: yes exactly
[14:25:10] adaedra: >>> [1, 2, 3, 4, 5].sample
[14:25:10] mikecmpbll: Jagan: rand*11+1 :d
[14:25:11] ruboto: adaedra # => /tmp/execpad-49f37b27b34e/source-49f37b27b34e:2: syntax error, unexpected '>' ...check link for more (https://eval.in/367773)
[14:25:26] adaedra: >> [1, 2, 3, 4, 5].sample
[14:25:27] ruboto: adaedra # => 5 (https://eval.in/367774)
[14:25:40] adaedra: >> [1, 2, 3, 4, 5].sample
[14:25:41] ruboto: adaedra # => 4 (https://eval.in/367775)
[14:25:41] Jagan: okay i will try
[14:26:05] Jagan: Actually I take xpath for this drop down list
[14:26:36] Jagan: list = sel_composite_type
[14:26:47] juanpaucar: has joined #ruby
[14:27:07] bkxd: has joined #ruby
[14:27:11] Jagan: random_pick = listItem[rand(listItem.length)]
[14:27:18] Jagan: this is correct one
[14:27:23] gsd: has joined #ruby
[14:27:49] Jagan: but its not working
[14:27:57] adaedra: Jagan: #sample does the same thing
[14:28:08] mikecmpbll: indeed, if you already have the array just use sample
[14:28:49] mikecmpbll: i thought you might want to use nth-child selector or something
[14:28:51] einarj: has joined #ruby
[14:29:09] Jagan: list = [sel_composite_type].sample
[14:29:15] Jagan: this is correct one
[14:29:32] adaedra: remove the []
[14:29:32] mikecmpbll: what class is sel_composite_type?
[14:29:46] Jagan: no class for this one
[14:29:58] mikecmpbll: ACTION doesn't know what's going on anymore :d
[14:30:14] adaedra: sel_composite_type has a class.
[14:30:24] mikecmpbll: ruby class, not css
[14:30:30] yh__: has joined #ruby
[14:31:09] podman: has joined #ruby
[14:31:41] michael_mbp: has joined #ruby
[14:36:24] ciopte7: has joined #ruby
[14:38:14] Rollabunna: has joined #ruby
[14:38:18] jottr: has joined #ruby
[14:39:32] kinduff: has joined #ruby
[14:39:33] einarj: has joined #ruby
[14:41:47] tjbiddle: has joined #ruby
[14:43:16] klue: has joined #ruby
[14:43:25] apeiros: yay, just wasted half an hour to figure that I forgot to remove the "https://" in the host part of Net::HTTP#start(host, ???)
[14:43:37] macmartine: has joined #ruby
[14:43:58] klue: has left #ruby: ()
[14:44:22] speakingcode: has joined #ruby
[14:45:57] jimms: has joined #ruby
[14:46:34] sent1nel: has joined #ruby
[14:47:09] shevy: secure http biting you in the butt as well!
[14:47:42] apeiros: shevy: no. same thing happens if you'd leave "http://" in
[14:47:49] freerobby: has joined #ruby
[14:47:50] apeiros: the host is supposed to be there without the protocol.
[14:48:36] adaedra: time to find a bug seems to be proportional to how stupid it is.
[14:49:04] unshadow: has joined #ruby
[14:49:42] xjstin: has joined #ruby
[14:50:29] mistermo_: has joined #ruby
[14:50:57] ta: has joined #ruby
[14:51:11] shevy: very true
[14:51:15] shevy: def intialize took me also half an hour
[14:51:41] shevy: I think it also has to do with how inconspicuous some bugs appear
[14:52:21] Spami: has joined #ruby
[14:53:28] elfuego: has joined #ruby
[14:53:43] elfuego: is it possible to change memory allocated to ruby on windows?
[14:57:41] davedev24_: has joined #ruby
[14:58:09] mengu: has joined #ruby
[14:58:13] momomomomo: has joined #ruby
[14:58:35] senayar: has joined #ruby
[14:59:45] chinmay_dd: has joined #ruby
[15:00:31] allenn: has joined #ruby
[15:00:45] ChampS_: mh "Could not start the spawn server: /home/Ben/.rvm/wrappers/ruby-2.2.1/: Permission denied (13)" <<< anyone an idea why passenger could not be started?
[15:00:51] haxrbyte_: has joined #ruby
[15:00:56] bkxd: has joined #ruby
[15:01:27] adaedra: check permissions on this folder and folders above.
[15:01:48] edwinvdgraaf: has joined #ruby
[15:02:19] leafybas_: has joined #ruby
[15:02:25] allenn: has joined #ruby
[15:02:33] einarj: has joined #ruby
[15:02:40] shevy: folder? :D
[15:02:42] ChampS_: all folders have 755
[15:03:51] mrchris: has joined #ruby
[15:04:13] crack_user: has joined #ruby
[15:04:17] mrchris: Is it bad practice to use 'MethodNotImplemented' exceptions when creating a base class for duck typing?
[15:04:22] poguez_: has joined #ruby
[15:04:39] shevy: adaedra directory!!!
[15:04:44] jhass: yes, you just duplicate NoMethodError
[15:04:50] selu: has joined #ruby
[15:04:59] adaedra: shevy: same f(beep)g thing
[15:05:17] mrchris: so is a base class even needed? I mean, /something/ should define the methods right?
[15:05:21] Schwarzbaer: has joined #ruby
[15:05:28] casadei: has joined #ruby
[15:05:51] ChampS_: folder/directory all the same :P
[15:06:12] ChampS_: adaedra all dirs have 755 so i think apache could read
[15:06:24] Mon_Ouie: A base class (or a module to be included) is only needed if there are method implementations that need to be inherited
[15:06:27] adaedra: yeah I read that
[15:06:36] ahmetkapikiran: has joined #ruby
[15:06:52] jimms_: has joined #ruby
[15:07:29] edwinvdg_: has joined #ruby
[15:07:35] shevy: ohhhh nobu is on github too https://github.com/nobu
[15:08:06] mrchris: Mon_Ouie, that makes sense to me. However, I'm not sure if those method bodies should just be a "# implement this method" or if they should return expected types as reponses etc..
[15:08:21] [k-: there is a NotImplementedError i think
[15:09:24] Kricir: has joined #ruby
[15:09:42] Mon_Ouie: If there's no sensible default implementation for a method, just let the subclasses implement it (and if there is, just use that)
[15:09:43] lidenskap: has joined #ruby
[15:11:34] mrchris: Mon_Ouie, my situation is I'm writing an API wrapper using the strategy pattern. Whats best practice to define the required methods for a strategy?
[15:11:58] thatslifeson: has joined #ruby
[15:11:59] tubuliferous: has joined #ruby
[15:12:58] that1guy: has joined #ruby
[15:13:09] shevy: hidden = STDIN.noecho(&:gets)
[15:13:10] Mon_Ouie: Just document them where they can be used, just like Enumerable documents how #each should be implemented in a class where you want to include Enumerable
[15:13:14] shevy: hmm what is this wicked magic
[15:14:05] Soda: has joined #ruby
[15:14:26] Mon_Ouie: shevy: noecho from io/console runs a block during which, as the name implies, you can't see what is being typed on the terminal
[15:15:04] crack_user: has joined #ruby
[15:15:26] shevy: now I see... STDIN.noecho is not there by default but added by io/console
[15:19:04] ebonics: has joined #ruby
[15:20:35] User458764: has joined #ruby
[15:21:04] icebourg: has joined #ruby
[15:21:05] Squarepy: has joined #ruby
[15:21:20] LiquidInsect: has joined #ruby
[15:21:55] icebourg: has joined #ruby
[15:21:55] CorySimmons: has joined #ruby
[15:26:13] sigurding: has joined #ruby
[15:26:53] fabrice31: has joined #ruby
[15:30:09] aryaching: has joined #ruby
[15:30:42] paulcsmith: has joined #ruby
[15:30:56] f3lp: has joined #ruby
[15:31:50] pokui: has joined #ruby
[15:32:09] lemur: has joined #ruby
[15:32:37] alphaatom: has joined #ruby
[15:33:15] konsolebox: has joined #ruby
[15:33:50] alphaatom: has joined #ruby
[15:33:58] osieln: has joined #ruby
[15:34:32] phutchins: has joined #ruby
[15:37:44] wookiehangover: has joined #ruby
[15:39:13] mary5030: has joined #ruby
[15:41:30] taiansu: has joined #ruby
[15:41:51] segfalt: has joined #ruby
[15:43:25] DerisiveLogic: has joined #ruby
[15:44:46] MatthewsFace: has joined #ruby
[15:47:12] einarj: has joined #ruby
[15:48:56] AlexRussia: has joined #ruby
[15:49:58] failshell: has joined #ruby
[15:50:34] failshell: how do i access all elements of an array after index n? i can't seem to figure this one out this morning
[15:50:46] konsolebox: has joined #ruby
[15:50:47] ebbflowgo: has left #ruby: ()
[15:51:08] snockerton: has joined #ruby
[15:51:46] goodcodeguy: has joined #ruby
[15:52:21] MasterPiece: has joined #ruby
[15:52:22] apeiros: failshell: ary[n..-1]
[15:52:47] apeiros: actually (n+1)..-1
[15:53:37] airdisa: has joined #ruby
[15:53:58] jackjackdripper: has joined #ruby
[15:55:04] failshell: apeiros: thanks that works
[15:55:34] shevy: that is quite uniform across Ruby; you can access String objects also the same way; Range objects also same/similar through []
[15:55:46] ponga: shevy: thanks
[15:55:50] ponga: ACTION takes note
[15:55:56] ScriptGeek: how does that work?
[15:56:14] ScriptGeek: I mean, what range is that?
[15:56:28] ravenreborn: has joined #ruby
[15:56:40] taiansu: has joined #ruby
[15:57:23] TheNet: has joined #ruby
[15:57:26] shevy: actually I did not know that Range had [] hahaha :D
[15:57:40] shevy: oh no wait
[15:57:42] shevy: it does not :(
[15:57:57] wookiehangover: has joined #ruby
[15:58:00] shevy: I was using [11..22] rather than (11..22)
[15:58:01] apeiros: ScriptGeek: negative index in array access is interpreted as size+index
[15:58:22] shevy: but you can convert into Array, and then it would work (11..22).to_a
[15:58:41] apeiros: i.e. ary[1..-1] is computed as ary[1..(ary.size-1)]
[15:59:07] ponga: i was gonna tell the same thing but apeiros was still active
[15:59:08] ScriptGeek: apeiros: that's a nice trick
[15:59:11] Darkwater: what's the most ruby way to get [1,2,3,4,5,6,7,8,9,0]?
[15:59:35] apeiros: Darkwater: put it into your code literally
[15:59:47] apeiros: if you want to be clever: [*1..9, 0]
[16:00:01] shevy: he wants to be clever
[16:00:02] havenwood: Or if you want to be silly.
[16:00:02] havenwood: >> 10.times.to_a.rotate
[16:00:03] ruboto: havenwood # => [1, 2, 3, 4, 5, 6, 7, 8, 9, 0] (https://eval.in/367796)
[16:00:03] shevy: I can see it
[16:00:24] shevy: I have not seen .rotate before
[16:00:38] shevy: how do you know these things havenwood?
[16:00:46] ponga: wow what is .rotate
[16:00:48] havenwood: shevy: I read code!
[16:00:55] ponga: damn it havenwood the secret!
[16:00:58] st1gma: he is lonely?
[16:01:12] luckyme: has joined #ruby
[16:01:14] ponga: i was gonna use 10.times too but didn't think of rotate
[16:01:34] ravenreborn_: has joined #ruby
[16:01:53] havenwood: St1gma: That too!
[16:02:03] shevy: [ "a", "b", "c", "d" ].rotate # => ["b", "c", "d", "a"]
[16:03:10] luckyme: has joined #ruby
[16:03:14] shevy: is .rotate a new method though?
[16:03:23] havenwood: shevy: nope
[16:03:50] djbkd: has joined #ruby
[16:03:50] ScriptGeek: looks like a shift and then a push
[16:04:01] havenwood: shevy: well, relatively new i guess
[16:04:12] havenwood: shevy: introduced in 1.9 i guess
[16:04:17] macmartine: has joined #ruby
[16:04:44] lemur: has joined #ruby
[16:04:51] tejasmanohar: has joined #ruby
[16:04:59] towski_: has joined #ruby
[16:05:04] shevy: ScriptGeek yeah
[16:05:05] SouL_|_: has joined #ruby
[16:05:07] ponga: >> 10.times.to_a
[16:05:07] ruboto: ponga # => [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] (https://eval.in/367803)
[16:05:09] tejasmanohar: is HTTP.post("http://atol.to/rpc/setLink", :body => "originalURL=https://google.com/") the same as curl -d "originalURL=https://google.com" http://atol.to/rpc/setLink
[16:05:30] ponga: so .roate is .push(.shift) ?
[16:05:51] Darkwater: except it also takes an atg
[16:06:04] adaedra: no, it's a series a shuffles until it looks like it
[16:06:35] havenwood: >> 'ponga'.chars.rotate(-1).join
[16:06:36] ruboto: havenwood # => "apong" (https://eval.in/367804)
[16:06:48] havenwood: adaedra: hehe
[16:06:49] ponga: so its a.push(a.shift)
[16:06:55] shevy: here is the .rotate() code: https://gist.github.com/shevegen/1714d12d173c9546ba49
[16:07:06] djbkd: has joined #ruby
[16:07:34] taiansu: has joined #ruby
[16:07:43] tejasmanohar: anyone here use cloudflare and know how to turn this off?
[16:07:44] tejasmanohar: https://gist.github.com/tejasmanohar/ada1f69dc1055d4ea79a
[16:07:50] konsolebox: has joined #ruby
[16:08:32] havenwood: shevy: Or Rubinius for a Ruby implementation: https://github.com/rubinius/rubinius/blob/fce598288cc7cdff9de6542bd0723027cfa70eac/kernel/common/array.rb#L1288-L1297
[16:08:53] pandaant: has joined #ruby
[16:08:58] devoldmx: has joined #ruby
[16:09:15] wallerdev: has joined #ruby
[16:09:36] crack_user: has joined #ruby
[16:10:38] shevy: havenwood well that is much cleaner
[16:11:10] tejasmanohar: curl -d "originalURL=http://kishcom.com" http://atol.to/rpc/setLink is this sending plain body ?
[16:11:24] tejasmanohar: trying to do it with https://github.com/httprb/http.rb#post-requests
[16:11:55] adaedra: Stop shouting
[16:12:14] shevy: adaedra do you have good weather
[16:12:18] havenwood: Yeah, HTTP, quit yelling "verbs" at us!
[16:12:32] adaedra: shevy: not too bad currently.
[16:12:48] shevy: it's raining here right now :(
[16:13:11] adaedra: Know that somewhere in Australia, it's literally raining spiders.
[16:13:23] echosystm: has joined #ruby
[16:13:47] shevy: raining spiders?
[16:14:00] riotjones: has joined #ruby
[16:14:01] shevy: shame that sevenseacat is not connected right now
[16:14:20] xxtjaxx: has joined #ruby
[16:14:39] tejasmanohar: HTTP.post("http://atol.to/rpc/setLink", :body => "originalURL=https://google.com/") - anyhow this is not hitting the right endpoint but the curl -d request is . if anyone knows why please let me know thanks
[16:14:40] adaedra: We got hail yesterday, maybe it crossed germany and got to you, shevy
[16:15:10] shevy: then I should be safe since I am not in Germany \o/
[16:15:26] adaedra: no, you're at the other side of it.
[16:15:56] juanpaucar: has joined #ruby
[16:16:00] shevy: to the west of here are the Alps, they are fairly big. I guess that influences bad weather to the west... but here in the east it's all superflat
[16:16:04] einarj: has joined #ruby
[16:16:50] adaedra: Actually, I don't know how weather works over Europe.
[16:17:05] adaedra: All I know is that radioactive clouds stops at the French boundaries. :x
[16:17:19] cyrus_mc: has left #ruby: ()
[16:17:28] mjmac: has joined #ruby
[16:19:24] shevy: that is very kind of you guys
[16:19:37] taiansu: has joined #ruby
[16:19:44] shevy: that you don't send radioactive clouds over a border :)
[16:19:56] adaedra: no, the other way around.
[16:20:04] adaedra: let me provide context.
[16:20:42] adaedra: http://www.expatica.com/fr/news/country-news/France-hid-info-on-effects-of-Chernobyl-cloud_134486.html
[16:21:09] shevy: oh you mean officials that don't tell the truth
[16:21:15] shevy: I guess that happens in most countries anyway
[16:21:52] shevy: austria is closer to the ukraine than france though, we got a higher dose :D
[16:22:00] adaedra: WE GOT NOTHING.
[16:22:19] wookiehangover: has joined #ruby
[16:22:20] shevy: Fukushima was pretty amazing too
[16:22:31] shevy: like first a tsunami hits, then a nuclear meltdown happens
[16:22:38] shevy: now I see why godzilla became famous there
[16:22:55] adaedra: I'm not even sure you got so much more, as the cloud went north to Sweden first
[16:22:56] shevy: because reality can be worse than godzilla!
[16:23:08] shevy: adaedra yeah probably
[16:23:11] jimms: has joined #ruby
[16:23:18] havenwood: tejasmanohar: Try?: HTTP.post 'http://atol.to/rpc/setLink', form: {originalURL: 'https://google.com'}
[16:24:40] antgel: has joined #ruby
[16:25:02] havenwood: tejasmanohar: Or: HTTP.post 'http://atol.to/rpc/setLink', json: {originalURL: 'https://google.com'}
[16:27:48] The_Phoenix: has joined #ruby
[16:27:59] shuber_: has joined #ruby
[16:32:14] Rarikon: has joined #ruby
[16:34:03] werelivi_: has joined #ruby
[16:35:03] x1337807x: has joined #ruby
[16:35:44] parduse: has joined #ruby
[16:37:17] pusewicz: has joined #ruby
[16:38:34] ghostmoth: has joined #ruby
[16:38:49] enebo: has joined #ruby
[16:38:49] sigurding: has joined #ruby
[16:39:03] alexherbo2: has joined #ruby
[16:39:07] Rollabunna: has joined #ruby
[16:39:48] yaw: has joined #ruby
[16:40:34] SouL_|_: has joined #ruby
[16:40:37] casadei: has joined #ruby
[16:40:39] CorySimmons: has joined #ruby
[16:41:55] shevy: this is kind of strange... programs such as zlib-1.2.8
[16:42:08] shevy: they come both with a cmake-based way to compile, but also with GNU configure
[16:42:09] Spami: has joined #ruby
[16:44:03] bruno-: has joined #ruby
[16:44:42] alnklkn: has joined #ruby
[16:45:05] alnklkn: Is it possible to have two functions with the same name, but different args?
[16:45:07] ki0_: has joined #ruby
[16:45:22] alnklkn: def foo(a) and def foo(a, b)?
[16:45:33] cjim_: has joined #ruby
[16:45:36] phutchins: has joined #ruby
[16:45:39] alnklkn: I'm trying, but keep getting E, [2015-05-20T16:43:27.576683 #22533] ERROR -- : ArgumentError: wrong number of arguments (1 for 2)
[16:45:49] _blizzy_: has joined #ruby
[16:45:59] kinduff: >> [{c: [1,2,3]},{a: [1,2,3]}, {c: [1,2,3]}].group_by{|r| r.keys}
[16:46:00] ruboto: kinduff # => {[:c]=>[{:c=>[1, 2, 3]}, {:c=>[1, 2, 3]}], [:a]=>[{:a=>[1, 2, 3]}]} (https://eval.in/367807)
[16:46:00] bigsky_: has joined #ruby
[16:46:10] shevy: alnklkn didn't you ask this question before?
[16:46:11] kinduff: how can I sort alphabetically?
[16:46:24] bootstrappm: has joined #ruby
[16:46:28] alnklkn: shevy: no, but I imagine this is a commong question for people coming from the c/java world
[16:46:29] einarj: has joined #ruby
[16:46:34] [k-: alnklkn: no, but you can use optional args
[16:46:37] shevy: yeah, I think the last guy was from C++
[16:46:43] shevy: best you can do is make the arguments optional
[16:46:49] michaeldeol: has joined #ruby
[16:46:51] shevy: and then handle the way you called them inside the method
[16:47:14] shevy: e. g. def foo(first_arg, *all_other_args_go_in_here)
[16:47:17] paulcsmith: has joined #ruby
[16:47:22] kinduff: >> [{c: [1,2,3]},{a: [1,2,3]}, {b: [1,2,3]}].group_by{|r| r.keys}.sort_by{|a,b| a.first <=> b.first }
[16:47:24] shevy: def foo(first_arg = 'some default', *all_other_args_go_in_here)
[16:47:24] ruboto: kinduff # => [[[:c], [{:c=>[1, 2, 3]}]], [[:a], [{:a=>[1, 2, 3]}]], [[:b], [{:b=>[1, 2, 3]}]]] (https://eval.in/367808)
[16:49:01] alnklkn: shevy: ok, so foo(a, *b), and then check if *b was given inside the method?
[16:50:51] GaryOak_: has joined #ruby
[16:51:02] shevy: alnklkn yeah, b should be an Array by default
[16:51:06] shevy: so you can do b.empty?
[16:51:06] bigsky: has joined #ruby
[16:51:11] shevy: if it is empty, no arg was passed extra
[16:51:20] shevy: otherwise, you passed at least one argument
[16:51:22] leafybasil: has joined #ruby
[16:51:44] shevy: you could also use a hash, for something similar
[16:51:46] alnklkn: shevy: perfect, that will do. Also seeing "if b" also can be used
[16:52:19] shevy: let me try with a hash example
[16:52:42] alnklkn: shevy: oops, sorry that will only work if b is defaulted to true in the method definition
[16:52:47] _blizzy_: has joined #ruby
[16:52:52] alnklkn: your way should work. trying it now.
[16:53:39] Soda: has joined #ruby
[16:53:59] shevy: >> def foo(i, hash = {}); puts "hi "+i; puts 'you feel well, yup' if hash[:feeling] == :feeling_well; end; foo('joe', feeling: :feeling_well)
[16:54:00] ruboto: shevy # => hi joe ...check link for more (https://eval.in/367809)
[16:54:15] jbomo: has joined #ruby
[16:54:23] deric_skibotn: has joined #ruby
[16:54:27] lotherk: has joined #ruby
[16:54:34] cirn0: has joined #ruby
[16:54:36] bootstrappm: is Aeyrix around? One of our AWS servers ran out of space this morning and we're running high on costs ... re-reconsidering DigitalOcean again :$
[16:54:44] shevy: ruboto's output is a bit confusing
[16:54:53] Hanmac: has left #ruby: ()
[16:54:59] shevy: I think the first part, hi joe, should instead become "hi joe"
[16:55:08] shevy: that was the old way with eval-in, wasn't it?
[16:55:17] lotherk: has joined #ruby
[16:55:21] harleypig: has joined #ruby
[16:55:23] anaeem1_: has joined #ruby
[16:55:28] shevy: Aeyrix is sleeping like a baby!
[16:55:38] shevy: send a SWAT team over to wake him up
[16:55:58] bootstrappm: haha shame. I'll just read reviews online
[16:56:08] bigsky: has joined #ruby
[16:57:38] dudedudeman: ACTION is awake
[16:57:49] dudedudeman: ACTION knows that doesn't help
[16:57:51] shevy: dudedudeman you may be awake but what is this good for
[16:57:54] shevy: go back to sleep
[16:58:06] dudedudeman: ACTION mumbles 
[16:58:25] dudedudeman: ACTION goes back to attempting write test
[16:58:56] towski_: has joined #ruby
[16:59:25] eam: poll: raise on missing entry? or how else to communicate back record not found when querying a k/v store?
[17:00:07] yh__: has joined #ruby
[17:00:18] eam: should I just emulate Hash with [] vs fetch()?
[17:00:29] bootstrappm: depends if mission critical or not. If mission critical and user facing output error message and exit immediately. If not user facing, raise error. If not mission critical, existence check in code and carry on
[17:00:47] vickleton: has joined #ruby
[17:01:18] vcoinminer: has joined #ruby
[17:01:43] shevy: bootstrappm talks in working pseudo-code
[17:02:01] ravenreborn: has joined #ruby
[17:03:29] konsolebox: has joined #ruby
[17:04:10] mikecmpbll: has joined #ruby
[17:04:11] eam: pretty sure that's legal ruby syntax
[17:04:20] baroquebobcat: has joined #ruby
[17:04:35] iliketurtles: has joined #ruby
[17:04:39] eam: bootstrappm: this would be implementing the db interface
[17:04:47] eam: as in, I'm writing Hash
[17:05:14] eam: what I'm hearing is, supply both interfaces
[17:05:36] bootstrappm: ahh, I see. IMO then [] should raise, fetch should return false
[17:05:48] bootstrappm: [] to me implies get something thats there, fetch implies go see if its there
[17:05:49] eam: bootstrappm: that's opposite what Hash does, though?
[17:05:57] tejasmanohar: has joined #ruby
[17:06:09] eam: >> {}[:missing]
[17:06:10] ruboto: eam # => nil (https://eval.in/367810)
[17:06:14] iliketurtles: has joined #ruby
[17:06:18] arietis: has joined #ruby
[17:06:20] eam: >> {}.fetch :missing
[17:06:21] ruboto: eam # => key not found: :missing (KeyError) ...check link for more (https://eval.in/367811)
[17:06:38] wallerdev: has joined #ruby
[17:06:46] wildroman2: has joined #ruby
[17:07:23] eam: the other complication is that this k/v store allows various behaviors for storing and fetching keys
[17:07:40] eam: like dup entries (allow, overwrite, fail)
[17:07:54] bootstrappm: I see. Then it's your call. I think my opinions come from some other ORMS / db interfaces I've used. I'd compare it w/ other db interfaces instead of native hashes.
[17:08:06] bootstrappm: what does the k/v store do when you fetch something thats not there?
[17:08:19] shuber_: has joined #ruby
[17:08:38] eam: it returns an indicator saying "nothing there"
[17:08:52] eam: C doesn't have exceptions so there's no design issue
[17:09:04] eam: everything is call, check returned value
[17:09:27] tejasmanohar: if i just want to separaate out some code thats going to be used in a bunch of parts of my project
[17:09:31] tejasmanohar: module is the best way?
[17:09:41] eam: I'm gonna just supply two methods, one for sloppy "nil on failure" and one that raises
[17:09:47] ixti: has joined #ruby
[17:09:52] einarj: has joined #ruby
[17:10:53] paulcsmith: has joined #ruby
[17:11:21] Eiam_: has joined #ruby
[17:12:15] Hanmac: has joined #ruby
[17:13:26] DanKnox: has joined #ruby
[17:14:46] bootstrappm: eam good plan. Is the whole thing in C or is this some native extension for ruby? if so the ! comes to mind as a way to differentiate nil on failure vs raise on failure
[17:15:58] tejasmanohar: like if i want to shorten urls in my app in many places https://gist.github.com/tejasmanohar/9b8711ef1eb4958edaf5 this would be ideal
[17:16:03] tejasmanohar: and then load this module all over
[17:16:29] bootstrappm: yeah, a mixin tejasmanohar
[17:16:32] Jackneill: has joined #ruby
[17:16:41] bootstrappm: sounds like a good way to do it. Are you using a framework or just plain ruby?
[17:16:51] tejasmanohar: so its autoloaded since its in lib/
[17:17:00] tejasmanohar: but i asked here since its about modules itself not rails
[17:17:24] tejasmanohar: bootstrappm: now do i call Atol#shorten when i want it?
[17:17:33] DexterLB: has joined #ruby
[17:17:44] shevy: eam the difficulties of having to make a choice isn't it!
[17:18:05] bootstrappm: Yeah, I haven't used rails 4 extensively but they likely still have the helpers module right tejasmanohar?
[17:18:08] bootstrappm: Put shorten in there
[17:18:18] bootstrappm: it'll be available in all your controllers and views I'm pretty sure
[17:18:27] tejasmanohar: Helpers module ? like app/helpers no thats a view helper
[17:18:31] tejasmanohar: thats for view helpers i thought
[17:19:03] tejasmanohar: http://mixandgo.com/blog/the-beginner-s-guide-to-rails-helpers
[17:19:06] tejasmanohar: i COULD but its for views
[17:19:11] JDiPierro: has joined #ruby
[17:19:15] tejasmanohar: i need it in models too, i need shorten everywhere hehe
[17:19:27] eam: bootstrappm: making a native extension for ruby
[17:19:43] eam: I'll link it in a bit, would love to avoid making idiomatic errors
[17:19:59] bootstrappm: IIRC in rails3 if it was loaded as a helper it was included by default in the controllers as well. Could be wrong about that though, its been years
[17:20:06] bootstrappm: tejasmanohar from your article " So basically you define a helper module (or let Rails generators define it for you) which will be auto-magically included in the controller and available to both the controller and the view."
[17:20:18] tejasmanohar: yeah but its for view helpers
[17:20:23] tejasmanohar: like im not going to ever use this in the view
[17:20:30] tejasmanohar: only controller...
[17:20:39] tejasmanohar: also, i need it in the models so scratch that ;)
[17:20:43] tejasmanohar: models + controllers
[17:20:56] tejasmanohar: i think this lib/atol.rb is my best bet. right bootstrappm ?
[17:21:32] jeregrine: has joined #ruby
[17:21:42] bootstrappm: one way to do it, sure. Going back to logistics, put "include Atol" in your model, making sure the file is required
[17:21:47] bootstrappm: that's how you have #shorten in your model
[17:22:19] tejasmanohar: in controller i dont need to tho?
[17:22:34] tejasmanohar: bootstrappm: does that go above or below class User < ActiveRecord::Base
[17:23:57] bootstrappm: goes below but the require should go at the top of the file
[17:24:13] bootstrappm: in controller you wouldn't need to if you put that method in helpers.rb, but since you're putting it in lib you need to also
[17:25:03] arietis: has joined #ruby
[17:25:12] freerobby: has joined #ruby
[17:25:31] tejasmanohar: bootstrappm: and then can i call shorten at the top level or is it Atol.shorten?
[17:25:44] cosmicexplorer: has joined #ruby
[17:25:48] bootstrappm: nope, if you use 'include' that method becomes a part of the class you've included it into
[17:25:53] bootstrappm: it would be Model#short
[17:26:08] alol___: has joined #ruby
[17:26:14] tejasmanohar: wait, it becomes User.shorten weirdd
[17:26:35] tejasmanohar: i was gonna run shorten on this link - https://gist.github.com/tejasmanohar/463943e47f3db7507391#file-gistfile1-rb-L39
[17:26:43] thomcom: has joined #ruby
[17:27:00] tejasmanohar: can i import it in a way that its separate
[17:27:03] tejasmanohar: `import Atol` ?
[17:27:05] tejasmanohar: bootstrappm: ^
[17:27:06] jespada: has joined #ruby
[17:27:21] bootstrappm: separate how? and its not import its include
[17:27:37] bootstrappm: and it shouldn't become User.shorten unless you define the method as 'def self.shorten'
[17:27:46] bootstrappm: it should exist on an instance of user
[17:27:59] tejasmanohar: hm i dont understand.
[17:28:11] tejasmanohar: with self.shorten it'd be Atol.shorten right?
[17:28:24] tejasmanohar: or no it'd be User.shorten if i had def self.shorten as the method header
[17:29:01] tejasmanohar: what does it become in the controllre? UsersController.shorten ?
[17:29:20] longfeet: has joined #ruby
[17:31:08] ramfjord: has joined #ruby
[17:31:13] Kricir: has joined #ruby
[17:31:15] jottr: has joined #ruby
[17:32:11] bootstrappm: the last things you said, correct
[17:34:09] bronson: has joined #ruby
[17:36:27] einarj: has joined #ruby
[17:36:58] imkmf: has joined #ruby
[17:38:16] MasterPiece: has joined #ruby
[17:39:47] kinduff: has joined #ruby
[17:40:15] sandelius: has joined #ruby
[17:41:05] shuber_: has joined #ruby
[17:41:23] quimrstorres: has joined #ruby
[17:41:59] thatslifeson: has joined #ruby
[17:42:58] postmodern: has joined #ruby
[17:45:00] bruno-: has joined #ruby
[17:45:49] dorei: has joined #ruby
[17:45:54] ciopte7: has joined #ruby
[17:46:34] DanKnox_: has joined #ruby
[17:46:39] ravenreborn: has joined #ruby
[17:47:06] Igorshp: has joined #ruby
[17:47:13] pardusf: has joined #ruby
[17:47:14] iliketurtles: has joined #ruby
[17:48:42] einarj: has joined #ruby
[17:49:28] crack_user: has joined #ruby
[17:50:04] mrchris: is it just overhead to make internal libraries for a single project into gems?
[17:50:21] mrchris: * unnecessary overhead
[17:50:57] GaryOak_: __chris: if you are going to use them in multiple places or want to distribute them between servers easily it might be a good idea
[17:50:59] tautvydas: has joined #ruby
[17:51:01] TheNet: has joined #ruby
[17:51:28] GaryOak_: But then you have to reupload everything to rubygems when you make changes
[17:51:53] mrchris: Hmm. ok. thanks for your opinion,
[17:53:13] vt102: has joined #ruby
[17:54:13] GaryOak_: __chris: It might also encourage better dev practices since other people would have access to it
[17:55:30] inspiron: has joined #ruby
[17:56:06] inspiron: i'm on a system that doesn't have a ~/.gemrc but the proxy settings are working. i'm not sure where they have it or what their doing. is there a way to find out where .gemrc is from the commandline ?
[17:56:18] inspiron: like ruby --get-config-path or something
[17:57:03] yh__: has joined #ruby
[17:57:04] A205B064: has joined #ruby
[17:57:29] jimms_: has joined #ruby
[17:57:39] gusrub: has joined #ruby
[17:57:48] mtakkman: has joined #ruby
[17:58:48] lxsameer: has joined #ruby
[17:58:49] tjbiddle: has joined #ruby
[17:59:04] choke: has joined #ruby
[18:01:07] einarj: has joined #ruby
[18:02:17] echosystm: has joined #ruby
[18:03:04] thatslifeson: has joined #ruby
[18:03:16] mary5030: has joined #ruby
[18:03:57] RegulationD: has joined #ruby
[18:04:37] juanpaucar: has joined #ruby
[18:05:30] woodruffw: has joined #ruby
[18:07:03] wildroman2: has joined #ruby
[18:07:11] adaedra: ~/.gemrc is user rc file, there may be one in /etc/gemrc
[18:07:45] chrisja: has joined #ruby
[18:08:57] iliketurtles: has joined #ruby
[18:09:16] n008f4g_: has joined #ruby
[18:10:08] zotherstupidguy: has joined #ruby
[18:10:08] adaedra: proxy settings can also be set from environment for some programs
[18:10:53] RegulationD: has joined #ruby
[18:11:03] lidenskap: has joined #ruby
[18:11:07] casadei_: has joined #ruby
[18:11:30] commondream: has joined #ruby
[18:11:39] lidenskap: has joined #ruby
[18:11:49] arup_r: has joined #ruby
[18:12:14] ciopte7: has joined #ruby
[18:13:49] endash: has joined #ruby
[18:14:45] ramfjord: has joined #ruby
[18:14:52] lidenskap: has joined #ruby
[18:15:05] irc2samus: has joined #ruby
[18:15:32] freerobby: has joined #ruby
[18:16:32] devoldmx: has joined #ruby
[18:17:25] irc2samus: hello guys, I'm trying to run some tests for a gem but I'm getting `require': cannot load such file -- boss_struct (LoadError) and I don't know which gem has that file, I have boss 0.4 installed and `gem install boss_struct` does not find anything
[18:17:39] irc2samus: also tried `gem install boss-struct` same
[18:17:54] bjeanes: has joined #ruby
[18:18:20] kirun: has joined #ruby
[18:18:42] TheNet: has joined #ruby
[18:21:09] mjuszczak: has joined #ruby
[18:22:22] havenwood: irc2samus: That's an ancient gem... What are you doing to get that LoadError? There's no `require 'boss_struct'` in boss 0.4 so, something is amiss.
[18:23:13] bigsky: has joined #ruby
[18:24:24] irc2samus: yeahh everything is a bit out of date in this project at the moment, I'll check with some coworkers to see how they run these then, thought it might be some common error. thanks havenwood
[18:24:55] droidburgundy: has joined #ruby
[18:25:52] havenwood: irc2samus: It looks like there are newer gems that are maintained and have stuff like tests and ci. If you can swap it out I would.
[18:26:58] havenwood: irc2samus: Using a gem with no updates since 2008 with no tests is generally irksome. Flee!
[18:27:07] irc2samus: I'll make the recommendation, they should update Rails and even Ruby as well
[18:27:27] irc2samus: not bad people honestly just a bit understaffed atm
[18:27:35] havenwood: irc2samus: yboss or bossman-gem maybe, the former looks pretty good but i've not used it
[18:27:50] qwertme: has joined #ruby
[18:28:41] havenwood: irc2samus: yeah, seems easier to keep rails updated incrementally than letting it fall behind. i don't know if the total time of incremental upgrade is actually less but it sure feels like it compared to having things get dated and having to upgrade multiple generations at once.
[18:29:09] havenwood: irc2samus: good luck!
[18:29:41] featheryahn_: has joined #ruby
[18:30:20] creakybones: has joined #ruby
[18:32:13] jottr: has joined #ruby
[18:33:00] cmckee: has joined #ruby
[18:35:32] hellschreiber: has joined #ruby
[18:36:25] joonty: has joined #ruby
[18:38:13] doodlehaus: has joined #ruby
[18:39:06] Adran: has joined #ruby
[18:40:01] Rollabunna: has joined #ruby
[18:40:48] livathinos: has joined #ruby
[18:42:20] dseitz: has joined #ruby
[18:42:39] mase-chatter: has joined #ruby
[18:45:45] bruno-: has joined #ruby
[18:45:58] haxrbyte: has joined #ruby
[18:46:39] baweaver: has joined #ruby
[18:48:45] ismaelga: has joined #ruby
[18:50:38] yh__: has joined #ruby
[18:56:06] baweaver: has joined #ruby
[18:57:43] Agoldfish: has joined #ruby
[18:58:22] shuber_: has joined #ruby
[19:00:54] turtil: has joined #ruby
[19:01:01] jerius: has joined #ruby
[19:01:11] tejasmanohar: has joined #ruby
[19:02:12] DerisiveLogic: has joined #ruby
[19:04:16] airdisa: has joined #ruby
[19:04:48] haxrbyte_: has joined #ruby
[19:05:29] debajit: has joined #ruby
[19:06:38] elfuego: has joined #ruby
[19:07:11] kenneth: has joined #ruby
[19:07:31] wildroman2: has joined #ruby
[19:07:40] roshanavand: has joined #ruby
[19:08:07] jenrzzz: has joined #ruby
[19:09:39] juanpaucar: has joined #ruby
[19:09:55] einarj: has joined #ruby
[19:11:10] woodruffw: has joined #ruby
[19:12:58] haxrbyte: has joined #ruby
[19:14:30] haxrbyte_: has joined #ruby
[19:15:40] jenrzzz: has joined #ruby
[19:15:43] sigurding: has joined #ruby
[19:15:49] jespada: has joined #ruby
[19:17:06] Igorshp: has joined #ruby
[19:17:38] tercenya: has joined #ruby
[19:17:40] Igorshp: has joined #ruby
[19:18:12] adambeynon: has joined #ruby
[19:19:20] haxrbyte: has joined #ruby
[19:20:32] michaeldeol: has joined #ruby
[19:20:53] cranq: has joined #ruby
[19:23:06] P1RATEZ: has joined #ruby
[19:25:19] einarj_: has joined #ruby
[19:25:35] thiagovsk: has joined #ruby
[19:25:59] aspiers: has joined #ruby
[19:26:30] ki0: has joined #ruby
[19:26:34] baweaver: Curious if anyone has a thought on this. How can you zip one set with a single element?
[19:26:36] cranq: has joined #ruby
[19:26:39] platzhirsch: has joined #ruby
[19:27:12] baweaver: [1,2,3].zip(1) returns [[1,1],[2,1],[3,1]]
[19:27:35] havenwood: >> [1, 2, 3].zip [1].cycle
[19:27:36] ruboto: havenwood # => [[1, 1], [2, 1], [3, 1]] (https://eval.in/367848)
[19:27:39] pokui: has joined #ruby
[19:27:53] baweaver: ah so I had it backwards
[19:27:55] vikaton: has joined #ruby
[19:27:57] baweaver: that'd do it
[19:28:02] adaedra: I'd have gone with map :x
[19:28:23] havenwood: >> [1, 2, 3].each_with_object(1).to_a
[19:28:24] ruboto: havenwood # => [[1, 1], [2, 1], [3, 1]] (https://eval.in/367849)
[19:28:35] pokui: hi all, is there a way to tell attr_accessor :foo that it should raise an error if it's set to the wrong kind of value? (or doesn't have responds_to?)
[19:28:48] adaedra: havenwood: are u a wizard
[19:29:06] adaedra: pokui: just implement foo= yourself
[19:29:19] jottr: has joined #ruby
[19:29:20] pokui: adaedra: ok. was being lazy :)
[19:30:05] kappy: has joined #ruby
[19:30:13] adaedra: Mh, general question
[19:30:31] adaedra: How do we protect e-mails on webpages from being crawled by evil bots in 2015?
[19:31:21] baweaver: gets most of them at least
[19:31:33] bootstrappm: in my experience doing something like email (at) domain (dot) com still works pretty well adaedra
[19:32:07] adaedra: images - 1, (at) (dot) - 1
[19:32:38] baweaver: Problem is that a clever bot is going to find both
[19:33:20] adaedra: image of (at) (dot)?
[19:33:34] baweaver: security through obscurity
[19:34:08] bootstrappm: def, image of (at) (dot) hahaha
[19:34:33] xxtjaxx: has joined #ruby
[19:34:54] einarj: has joined #ruby
[19:37:03] mengu: has joined #ruby
[19:38:23] devoldmx: has joined #ruby
[19:38:34] hostess: has joined #ruby
[19:39:04] epochwolf: has joined #ruby
[19:40:12] michael_mbp: has joined #ruby
[19:41:27] iamninja_: has joined #ruby
[19:41:44] Kricir: has joined #ruby
[19:43:10] kenneth: has joined #ruby
[19:43:41] sent1nel: has joined #ruby
[19:43:51] lidenskap: has joined #ruby
[19:44:21] jottr: has joined #ruby
[19:45:35] lkb: has joined #ruby
[19:45:53] cirn0: has joined #ruby
[19:46:13] enebo: has joined #ruby
[19:46:28] bruno-: has joined #ruby
[19:46:42] jokke: has joined #ruby
[19:46:47] bb010g: has joined #ruby
[19:49:29] Beoran: has joined #ruby
[19:50:55] iamninja: has joined #ruby
[19:51:00] lkba: has joined #ruby
[19:51:10] echosystm: has joined #ruby
[19:54:50] redondo: has joined #ruby
[19:54:52] einarj: has joined #ruby
[19:55:17] redondo: hi all, what does mean when the irb shows '?' in the prompt?
[19:55:30] xxneolithicxx: has joined #ruby
[19:55:57] bootstrappm: need to replace the hard drive redondo
[19:56:09] bootstrappm: (that's a joke ;) )
[19:56:16] bootstrappm: did you just start irb up or did you do something?
[19:56:50] redondo: I did something
[19:57:00] redondo: I tried to do a for loop
[19:57:50] bootstrappm: put the code you tried in a gist and send it
[19:59:16] rocknrollMarc: has joined #ruby
[19:59:42] redondo: http://pastie.org/10199264
[19:59:48] platzhirsch: has joined #ruby
[19:59:50] luckyme: has joined #ruby
[20:01:30] redondo: bootstrappm: ^^^
[20:01:34] x1337807x: has joined #ruby
[20:01:38] that1guy: I'm a little lost on what's going on, I have an error bundler: command not found: rspec
[20:01:38] that1guy: Install missing gem executables with `bundle install`
[20:01:41] bashusr: has joined #ruby
[20:01:45] shuber_: has joined #ruby
[20:02:04] bootstrappm: yeah redondo so that looks to be happening because you have the syntax wrong
[20:02:09] bootstrappm: for isn't used much in ruby and its not used like that
[20:02:12] yh__: has joined #ruby
[20:02:24] that1guy: https://github.com/Willardgmoore/coding-test-2/tree/master/practice-problems
[20:03:00] bootstrappm: That1Guy bundler is a gem manager. When you run `bundle install` it install the gems specified in your current directory's Gemfile
[20:03:17] bootstrappm: `bundle exec` executes a command using your current gemset
[20:03:35] bootstrappm: right there bundler is trying to execute the command 'rspec', a command that is installed with the rspec gem
[20:03:42] bootstrappm: but it doesn't exist because you haven't installed the rspec gem
[20:03:54] bootstrappm: so its telling you to run `bundle install` to install the gems that you're supposed to have
[20:04:28] redondo: bootstrappm: so what should be the right syntax in that case?
[20:05:17] bootstrappm: eliminate the for and put '.each' after the people_in_aspects method call redondo
[20:05:21] that1guy: That fixed part of it, I think. Thanks bootstrap:
[20:05:23] bootstrappm: google ruby iterators
[20:05:31] einarj: has joined #ruby
[20:05:39] redondo: bootstrappm: thanks
[20:05:59] that1guy: It's throwing so many other errors now, I've got to figure out what it means now.
[20:07:02] bootstrappm: That1Guy understand bundler and gems first or you're gonna get very frustrated very fast
[20:07:40] wildroman2: has joined #ruby
[20:07:48] bootstrappm: http://guides.rubygems.org/what-is-a-gem/ http://bundler.io/
[20:09:24] yh__: has joined #ruby
[20:09:39] Beoran: has joined #ruby
[20:10:01] Prysm: has joined #ruby
[20:10:23] that1guy: My understanding is that I shouldn't really have to know what those are yet for this part of the class. They said it should all be set up for me to download and I just need to make a method that follows their instructions and then paste their short thing into terminal to see if it worked.
[20:10:46] bootstrappm: yeah ... how's that working out for you?
[20:10:55] that1guy: I just want to make sure that I'm not too in over my head.
[20:11:01] bootstrappm: that may have been good advice if, as they said, you copied and pasted and it worked
[20:11:05] bootstrappm: but it didn't
[20:11:20] bootstrappm: so now as the learner you have more to do :)
[20:11:37] bootstrappm: at the very least bundle install should have worked
[20:11:40] bootstrappm: what did it tell you?
[20:12:15] umgrosscol: That1Guy: Are you on a windows machine?
[20:12:16] that1guy: bundle install said that it complete
[20:12:30] that1guy: osx umgrosscoi:
[20:12:52] that1guy: then I tried to run the thing they told me to paste again and I got
[20:13:08] that1guy: ration.rb:896:in `load': cannot load such file -- /Users/TheMoores/Documents/Work/Ruby/Repos/prep-work-master/coding-test-2/practice-problems/spec/spec/00_nearest_larger_spec.rb (LoadError)
[20:13:08] that1guy: from /Users/TheMoores/.rvm/gems/ruby-2.1.3/gems/rspec-core-2.14.7/lib/rspec/core/configuration.rb:896:in `block in load_spec_files'
[20:13:08] that1guy: from /Users/TheMoores/.rvm/gems/ruby-2.1.3/gems/rspec-core-2.14.7/lib/rspec/core/configuration.rb:896:in `each'
[20:13:09] that1guy: from /Users/TheMoores/.rvm/gems/ruby-2.1.3/gems/rspec-core-2.14.7/lib/rspec/core/configuration.rb:896:in `load_spec_files'
[20:13:10] that1guy: from /Users/TheMoores/.rvm/gems/ruby-2.1.3/gems/rspec-core-2.14.7/lib/rspec/core/command_line.rb:22:in `run'
[20:13:10] that1guy: from /Users/TheMoores/.rvm/gems/ruby-2.1.3/gems/rspec-core-2.14.7/lib/rspec/core/runner.rb:80:in `run'
[20:13:12] that1guy: from /Users/TheMoores/.rvm/gems/ruby-2.1.3/gems/rspec-core-2.14.7/lib/rspec/core/runner.rb:17:in `block in autorun'
[20:13:13] umgrosscol: bootstrappm: Odd that they threw the gemfile lock in there.
[20:13:41] umgrosscol: That1Guy: Use a paste bin like service or gist if you want to copy in code or outputs
[20:13:53] qwertme: has joined #ruby
[20:14:11] bootstrappm: I always include my Gemfile.lock too :), IIRC Heroku makes you do it too
[20:14:27] umgrosscol: That1Guy: What directory are you in when you try to run the rspec command?
[20:14:39] that1guy: I've tried it from a few of them
[20:14:43] that1guy: I tried lib
[20:15:06] umgrosscol: can you stat or ls that file? does it actually exist?
[20:15:34] umgrosscol: It's looking in spec/spec/ which is not right.
[20:15:52] umgrosscol: run the command from the practice-problems/ dir
[20:15:53] that1guy: I've also tried it from the parent dir
[20:16:04] bootstrappm: do it from the root directory That1Guy
[20:16:06] that1guy: I'm going to do that again
[20:16:09] jerius: has joined #ruby
[20:16:10] bootstrappm: the one above spec
[20:16:27] treehug88: has joined #ruby
[20:16:35] umgrosscol: The project root directory. Should be coding-test-2/practice-problems/
[20:16:42] that1guy: I got a different error this time
[20:16:53] umgrosscol: Gist your new error.
[20:16:55] that1guy: This looks right
[20:16:56] einarj: has joined #ruby
[20:17:08] Spami: has joined #ruby
[20:17:12] umgrosscol: or it's rspec output about failed tests?
[20:17:53] that1guy: https://eval.in/367853
[20:18:01] that1guy: I don't know how to gist yet,
[20:18:16] dudedudeman: gist.github.com
[20:18:23] that1guy: I know how to just put it on github though. Just haven't done gist yet.
[20:18:35] umgrosscol: That1Guy: That looks like rspec output telling you tests failed.
[20:18:41] dudedudeman: do it anonymously if you don't want us all peeping your github profile. lol
[20:18:44] lidenskap: has joined #ruby
[20:18:46] wallerdev: has joined #ruby
[20:18:51] umgrosscol: That1Guy: As per instructions, you now have to fill in the function stubs to make the tests pass.
[20:19:06] that1guy: Peep on my github profile all you want. :D I'm just a student learning.
[20:19:10] bootstrappm: ^ yep, looks like you're good to go
[20:19:26] that1guy: I am good to go. Thanks guys!!
[20:19:39] bootstrappm: your rspec tests are failing, the course is probably telling you to make them work to learn
[20:19:40] umgrosscol: That1Guy: Being a student is tough. Just getting hello world to work these days can be.... involved.
[20:19:52] bootstrappm: >> puts 'hello world'
[20:19:53] ruboto: bootstrappm # => hello world ...check link for more (https://eval.in/367856)
[20:19:59] iliketurtles: has joined #ruby
[20:20:08] that1guy: I quit my job to study full time while my wife works. It's pretty tough.
[20:20:17] lidenskap: has joined #ruby
[20:20:25] bootstrappm: uff That1Guy! That IS tough
[20:20:31] that1guy: IRC has been my best friend since I found out about that last week. :D
[20:20:35] bootstrappm: you have my help when you need it, just ping me
[20:20:51] that1guy: Thank you all !!!
[20:20:56] dudedudeman: That1Guy: IRC has been great for me over the past couple weeks. asking the right questions is key
[20:21:00] dudedudeman: i'm still learning that part. :)
[20:21:31] bootstrappm: I go through phases where i'm really active or non-existent
[20:21:33] bootstrappm: this is one of the former
[20:21:34] umgrosscol: That1Guy: Well, keep at it. Just need to fill in the contents of the rb files in practice-problems/lib/ now.
[20:22:31] failshell: has joined #ruby
[20:23:03] iamninja: has joined #ruby
[20:25:29] einarj: has joined #ruby
[20:25:46] djellemah: has joined #ruby
[20:26:41] michael_mbp: has joined #ruby
[20:27:41] Kricir: has joined #ruby
[20:27:43] DerisiveLogic_: has joined #ruby
[20:28:16] jtdowney: has joined #ruby
[20:30:50] sandelius: has joined #ruby
[20:31:03] turtil: has joined #ruby
[20:31:27] TheHodge: has joined #ruby
[20:31:46] mwlang: has joined #ruby
[20:32:26] mwlang: How can I rescue more than one kind of exception (but not all) in one rescue?
[20:33:05] jespada: has joined #ruby
[20:33:15] zotherstupidguy: /join #archlinux
[20:33:32] rocknrollMarc: has joined #ruby
[20:33:54] mwlang: https://gist.github.com/mwlang/d4e7e44a71af2ad1fb83
[20:34:21] that1guy: has joined #ruby
[20:34:32] adaedra: mmh, code duplication
[20:34:41] apeiros: mwlang: rescue A, B, C => ex
[20:35:19] sumark: has joined #ruby
[20:35:34] einarj_: has joined #ruby
[20:35:37] mozzarella: mwlang: did you know that you don't need the begin block in that case? it's implicit inside a function
[20:35:37] mwlang: aperios, and with that, all specs pass! thanks. I was doing A => ex, B => ex, C => ex
[20:35:48] mwlang: mozzarella: yeah, I know.
[20:35:59] apeiros: mwlang: tab completion for nicks
[20:36:53] mwlang: apeiros: heh, I thought the tab was broke, but I was just plain misspelling
[20:37:06] adaedra: It's ok, mlwang.
[20:37:34] adaedra: mh, maybe I shouldn't have swapped these two :x
[20:37:44] mwlang: adaedra: :-) I???ve been programmin??? since 4am. about to wrap this thing up because I ain???t exactly thinking straight any more.
[20:37:46] Zai00: has joined #ruby
[20:38:00] adaedra: get this man a bed
[20:38:21] haxrbyte: has joined #ruby
[20:39:46] devoldmx: has joined #ruby
[20:40:32] baroquebobcat: has joined #ruby
[20:40:48] lidenskap: has joined #ruby
[20:40:52] Rollabunna: has joined #ruby
[20:41:26] failshell: has joined #ruby
[20:41:33] mwlang: if there???s one thing to be said about TDD???when you???re bone-frickin-tired and you complete a feature and get specs passing, you can *still* deploy with confidence that the whole website ain???t gonna stop workin???.
[20:41:48] WildBamboo-Josh: has joined #ruby
[20:41:56] tvw: has joined #ruby
[20:42:01] xxneolithicxx: its pfchangs, what
[20:42:17] dudedudeman: mwlang: please teach me the ways of the test
[20:42:23] GaryOak_: mwlang: unless of course you don't have confidence in your tests
[20:42:26] dudedudeman: but not today. tomorrow, when you're not sleeping. :P
[20:42:29] pizzaops: has joined #ruby
[20:42:44] bashusr: has joined #ruby
[20:43:12] mwlang: dudedudeman: there???s already a nice website for all that: http://betterspecs.org/
[20:43:19] adaedra: mwlang: now that you broke everything, go to sleep, before you break yourself.
[20:43:31] dudedudeman: mwlang: ugh, spec style. :(
[20:43:46] baweaver: has joined #ruby
[20:44:26] dudedudeman: is there something like this for test unit style?
[20:44:59] mwlang: dudedudeman: No idea. I left unit test behind years ago. I only do unit test when contributing on other people???s gems
[20:45:46] mwlang: dudedudeman: even so, the principals should be roughly the same.
[20:45:59] mwlang: structure and naming and so on.
[20:46:12] mwlang: The best tests tell the user stories.
[20:46:23] einarj: has joined #ruby
[20:46:26] dudedudeman: i guess, since i"m just wading in to the realm of testing, and actually caring about it, i'm looking for rich guides or thought processes to go with it
[20:46:49] mwlang: dudedudeman: Probably a good book on the Pragmatic bookshelf for that.
[20:47:00] dudedudeman: i'm actually on the website now. lol
[20:47:09] bruno-: has joined #ruby
[20:48:12] eam: I stick with test/unit because it matches well with every other language environment I also use
[20:48:18] eam: I really don't understand spec
[20:48:32] djbkd: has joined #ruby
[20:48:34] aspiers: has joined #ruby
[20:48:54] mwlang: eam: I guess to be fair, it is more BDD than TDD.
[20:49:31] dudedudeman: i don't know if it's just me, but i kind of want ot start with unit testing before trying to grasp and effectively use spec style?
[20:50:32] eam: ruby's test/unit is just like python's unittest is just like perl's Test::More is just like ...
[20:50:42] mwlang: At the end of the day,there???s really no difference between the two other than vocabulary.
[20:51:01] dudedudeman: ah yes, pragprg ftw: http://www.amazon.com/exec/obidos/ASIN/1934356700/?tag=iserializable-20
[20:51:51] JoshGlzBrk: has joined #ruby
[20:52:23] danman: has joined #ruby
[20:52:42] adaedra: tests are for the weak who can't code right the first time. :x
[20:53:11] eam: adaedra: or the second time, or who share work with others who ... :D
[20:53:27] eam: how will you know which you are without tests? ;)
[20:53:44] mwlang: heh???problem is, those who can???t code right the first time often can???t code tests, either. :-)
[20:54:17] adaedra: is this why I don't do tests? :x
[20:54:30] eam: mwlang: but people who can code right and who get pull requests ...
[20:55:28] kenneth: has joined #ruby
[20:56:29] einarj: has joined #ruby
[20:57:06] kenneth: has joined #ruby
[20:57:20] multi_io: has joined #ruby
[20:57:33] blacky: has joined #ruby
[20:57:58] mwlang: personally, I???m glad to see that the dogma has largely disappeared (I don???t see ppl running around yellin??? ???TATFT???) and everyone collectively glaring down the newbies with ???why aren???t you testing???? bullying glares.
[20:59:37] mjuszczak: has joined #ruby
[20:59:38] mwlang: its just another tool in the tool box of the well-balanced developer???s repertoire
[20:59:47] eam: absolutely
[21:01:40] io_syl: has joined #ruby
[21:02:39] adaedra: but it's sooo boring to do :'(
[21:03:07] sdothum: has joined #ruby
[21:03:16] bashusr: has joined #ruby
[21:03:21] IrcDroidClient: has joined #ruby
[21:03:37] bootstrappm: don't do 'em much
[21:03:51] bootstrappm: but like when i do them. its like a level of satisfaction and peace of mind that you don't get when you just write something
[21:03:57] dudedudeman: our office has about a 1:2 ratio of code to tests
[21:04:05] dudedudeman: 1 line of code for every 2 lines of testing
[21:04:06] TheNet: has joined #ruby
[21:05:10] CaptainCibai: has joined #ruby
[21:05:38] einarj: has joined #ruby
[21:05:56] adaedra: that's good
[21:06:14] adaedra: I've been taught that it's coverage the metric to look at, though.
[21:07:50] roshanavand: has joined #ruby
[21:07:59] wildroman2: has joined #ruby
[21:09:41] eam: there isn't really a meaningful metric
[21:10:01] eam: eg what's "coverage" on a method called add(i,j)
[21:11:06] eam: if I'm implementing an add method I'm going to need tests for all the tricky corner cases, there's no generic metric to tell me if I've enumerated them
[21:11:13] n1ftyn8: has joined #ruby
[21:11:48] adaedra: there's also rules for that, but not really measurable
[21:12:05] adaedra: At least coverage is measurable
[21:12:32] Pumukel: has joined #ruby
[21:12:39] leafybasil: has joined #ruby
[21:12:45] eam: yeah it's an ok minimal check "you didn't even try over here"
[21:13:08] kenneth: has joined #ruby
[21:13:51] iliketurtles: has joined #ruby
[21:14:24] einarj: has joined #ruby
[21:14:25] vikaton: has joined #ruby
[21:15:42] julieeharshaw: has joined #ruby
[21:17:51] CaptainCibai: has joined #ruby
[21:21:39] dudedudeman: meh. puma is freaking out on me when i try to start my app... tells me my connection_adapter isn't set? but... i'd like to argue with the computer and say that it is...
[21:22:15] Jarboe: has joined #ruby
[21:22:36] ismaelga: has joined #ruby
[21:23:16] adaedra: You can yell at it
[21:23:49] kobain: has joined #ruby
[21:25:26] einarj: has joined #ruby
[21:26:13] julieeharshaw: has joined #ruby
[21:28:46] mrchris: has joined #ruby
[21:30:45] RegulationD: has joined #ruby
[21:31:00] kenneth: has joined #ruby
[21:31:24] ProLoser: has joined #ruby
[21:31:30] dudedudeman: no, still not working
[21:31:31] ProLoser: any idea why i'm getting this error? http://hastebin.com/pevopesuki
[21:31:33] crdpink: has joined #ruby
[21:31:45] EagleDelta: has joined #ruby
[21:32:11] baweaver: has joined #ruby
[21:35:14] adaedra: because require() requires a simple symbol
[21:35:27] einarj: has joined #ruby
[21:36:05] adaedra: isn't what you want require(:conversation).permit(:users) ?
[21:36:52] ProLoser: what about nested stuff?
[21:37:06] ProLoser: like i don't want an empty conversation object payload
[21:37:09] ProLoser: it MUST contain a users key
[21:37:14] ProLoser: is that not feasible
[21:37:42] inspiron: has joined #ruby
[21:37:45] banister: has joined #ruby
[21:37:49] mrchris: has joined #ruby
[21:38:07] adaedra: you should be able to require twice then, I think
[21:38:17] adaedra: but require doesn't seems to allow multiple keys
[21:38:32] bruno-: has joined #ruby
[21:38:38] mrchris: has joined #ruby
[21:38:48] adaedra: go see with #RubyOnRails, they should know better
[21:38:48] ProLoser: when you do permit() is that fall inside of the key of require()?
[21:39:36] waseem_: has joined #ruby
[21:39:44] kadoppe: has joined #ruby
[21:40:09] echosystm: has joined #ruby
[21:40:27] icebourg: has joined #ruby
[21:41:32] ravenreborn: has joined #ruby
[21:42:37] rbennacer: has joined #ruby
[21:42:47] platzhirsch: has left #ruby: ()
[21:43:24] icebourg: has joined #ruby
[21:44:13] icebourg: has joined #ruby
[21:44:20] einarj: has joined #ruby
[21:44:59] icebourg: has joined #ruby
[21:46:41] FernandoBasso: has joined #ruby
[21:46:53] that1guy: has joined #ruby
[21:47:31] bigsky: has joined #ruby
[21:50:09] aswen: has joined #ruby
[21:51:04] cirn0: has joined #ruby
[21:52:40] Azure: has joined #ruby
[21:52:57] Igorshp: has joined #ruby
[21:53:32] JoshGlzBrk: has joined #ruby
[21:54:02] einarj_: has joined #ruby
[21:54:45] C1V0: has joined #ruby
[21:57:07] x1337807x: has joined #ruby
[21:57:09] phutchins: has joined #ruby
[21:57:25] arietis: has joined #ruby
[21:58:01] rodferso1: has joined #ruby
[21:58:16] shock_one: has joined #ruby
[21:59:29] blackmesa: has joined #ruby
[22:03:33] that1guy: has joined #ruby
[22:03:51] yaw: has joined #ruby
[22:04:21] havenwood: has joined #ruby
[22:05:02] einarj: has joined #ruby
[22:05:17] SouL_|_: has joined #ruby
[22:07:28] fibbel: has joined #ruby
[22:09:12] rawrmonstar: has joined #ruby
[22:09:32] shock_one: has joined #ruby
[22:09:45] ereslibre: has joined #ruby
[22:09:45] ereslibre: has joined #ruby
[22:11:24] ciopte7: has joined #ruby
[22:11:32] jenrzzz: has joined #ruby
[22:12:01] reinaldob: has joined #ruby
[22:13:54] bashusr: has joined #ruby
[22:14:42] s2013: has joined #ruby
[22:14:48] einarj: has joined #ruby
[22:16:28] ravenreborn: has joined #ruby
[22:16:46] reinaldob: has joined #ruby
[22:16:47] sent1nel: has joined #ruby
[22:17:25] reinaldob: has joined #ruby
[22:18:14] matchaw: has joined #ruby
[22:18:18] xxneolithicxx: does anyone use rbenv-usergems?
[22:19:11] xxneolithicxx: I followed the guide (am running it on Linux) and I get 'rbenv: no such command 'usergems-init''
[22:19:28] jenrzzz: has joined #ruby
[22:20:07] reinaldob: has joined #ruby
[22:20:44] xxneolithicxx: im good, looks like it didnt like ~ for home
[22:20:50] reinaldob: has joined #ruby
[22:20:55] bb010g: has joined #ruby
[22:22:11] baweaver: has joined #ruby
[22:22:34] ravenreborn_: has joined #ruby
[22:22:55] bashusr: has joined #ruby
[22:23:15] reinaldob: has joined #ruby
[22:23:37] haroldwu: has joined #ruby
[22:24:42] haroldwu: has joined #ruby
[22:24:54] bashusr: has joined #ruby
[22:25:43] cirn0: has joined #ruby
[22:27:42] GaryOak_: does anyone know a good phonetic string matching/scoring gem?
[22:28:39] Soda: has joined #ruby
[22:30:08] havenwood: GaryOak_: Something along the lines of a Levenshtein distance or different?
[22:30:55] GaryOak_: Yeah, it would be nice if it had metaphone functions as well as Jaro distance, like the Python Jellyfish lib
[22:31:16] dseitz: has joined #ruby
[22:31:17] havenwood: GaryOak_: https://github.com/diasks2/ruby-nlp#text-similarity
[22:31:29] GaryOak_: havenwood: thanks :)
[22:31:34] havenwood: GaryOak_: no prob
[22:33:55] einarj: has joined #ruby
[22:36:20] havenwood: xxneolithicxx: The whole of chruby is less code than the plugin. I'd use chruby with --user-install gems for what I consider a much simpler setup. But for your issue, have you tried $HOME instead of ~?
[22:37:19] havenwood: xxneolithicxx: oh, you were saying that fixed it, nevermind me. just reread and it clicked.
[22:37:39] reinaldob: has joined #ruby
[22:39:35] ravenreborn: has joined #ruby
[22:39:57] casadei: has joined #ruby
[22:41:42] khebbie: has joined #ruby
[22:41:44] qwertme: has joined #ruby
[22:41:46] Rollabunna: has joined #ruby
[22:42:47] casadei: has joined #ruby
[22:42:55] bashusr: has joined #ruby
[22:43:05] freerobby: has joined #ruby
[22:44:01] jespada: has joined #ruby
[22:44:26] einarj: has joined #ruby
[22:44:49] weaksauce: ProLoser you do validation with validations not through strong_params
[22:44:53] reinaldob: has joined #ruby
[22:45:01] cmckee: has joined #ruby
[22:45:11] KasMage: has joined #ruby
[22:45:35] DigitalDayTrader: has joined #ruby
[22:48:56] bashusr: has joined #ruby
[22:50:53] ravenreborn: has joined #ruby
[22:51:00] that1guy: has joined #ruby
[22:51:19] maZtah: has joined #ruby
[22:52:44] ciopte7: has joined #ruby
[22:52:47] cirn0: has joined #ruby
[22:53:04] zenspider: xxneolithicxx: I use my 'ohmygems' lib for private gem repos (current: `omg bisectbug`), but it really is just a matter of setting GEM_HOME and extending your path.
[22:53:53] elfuego: has joined #ruby
[22:54:08] einarj: has joined #ruby
[22:54:56] bashusr: has joined #ruby
[22:55:19] jenrzzz: has joined #ruby
[22:56:01] ravenreborn_: has joined #ruby
[22:56:52] shevy: has joined #ruby
[22:57:43] shevy: has joined #ruby
[22:58:16] ravenreborn: has joined #ruby
[22:58:47] Hijiri: has joined #ruby
[22:58:49] reinaldob: has joined #ruby
[22:58:54] xxneolithicxx: poor souls, this rbenv install is using stuff still managed in subversion
[22:59:14] xxneolithicxx: ACTION forces self to install subversion for first time ever
[23:00:23] airdisa_: has joined #ruby
[23:01:07] baweaver: has joined #ruby
[23:01:24] creakybones: has joined #ruby
[23:01:24] creakybones: has joined #ruby
[23:01:24] renier: has joined #ruby
[23:01:57] x1337807x: has joined #ruby
[23:02:46] iliketurtles: has joined #ruby
[23:03:48] einarj: has joined #ruby
[23:05:15] kenneth__: has joined #ruby
[23:06:14] crack_user: has joined #ruby
[23:06:31] Aeyrix: Gross, no.
[23:06:35] Aeyrix: Use Mercurial.
[23:07:35] kenneth: has joined #ruby
[23:08:25] cirn0: has joined #ruby
[23:10:01] luckyme: has joined #ruby
[23:12:23] xxneolithicxx: :-) i love my old git
[23:12:32] reinaldob: has joined #ruby
[23:12:57] kenneth: has joined #ruby
[23:13:09] reinaldob: has joined #ruby
[23:13:24] xxneolithicxx: so what he learned today folks
[23:13:49] Aeyrix: The fact that some of Git is in C, some in Python, some in Tcl irks me.
[23:13:53] xxneolithicxx: hit me wit some knowledges, johnny 5 needs input
[23:14:04] Aeyrix: I have no actual reasonable justification for being irked by it, but I am.
[23:14:04] Vile`: has joined #ruby
[23:14:18] einarj: has joined #ruby
[23:15:09] xxneolithicxx: christ that reminds me of a very particular airplane engine manufacturing company that used Tcl/Tk for just about all their tools
[23:15:27] xxneolithicxx: love motif anyone?
[23:15:41] shevy: I thought Git is in perl
[23:15:55] xxneolithicxx: no, i think its a mix of bash and C
[23:15:57] ciopte7: has joined #ruby
[23:16:02] elfuego: has joined #ruby
[23:16:10] xxneolithicxx: or at least gitweb was when i compiled it months ago
[23:16:19] shevy: look at what I found just now:
[23:16:29] shevy: git-2.3.5/t/gitweb-lib.sh:
[23:16:34] shevy: an innocent .sh script
[23:16:38] shevy: and here comes the big one
[23:16:43] shevy: t/gitweb-lib.sh:#!/usr/bin/perl
[23:16:47] shevy: IT GENERATES SOME PERL CODE!!!
[23:17:01] shevy: is this madness?
[23:17:15] xxneolithicxx: why even call it .sh then
[23:17:27] xxneolithicxx: not that it matters
[23:18:11] xxneolithicxx: i distinctly remember compiling gitweb, did they change it
[23:18:40] kenneth: has joined #ruby
[23:18:46] shevy: it generates some perl code
[23:18:51] shevy: perhaps it bootstraps or something
[23:19:12] xxneolithicxx: kernel hacker level
[23:19:15] shevy: it's the linux tradition xxneolithicxx
[23:19:18] shevy: it's all shit
[23:19:20] shevy: but it works
[23:19:49] xxneolithicxx: ill take that shit over Windows any day buddy
[23:20:47] bogdanteleaga: has joined #ruby
[23:21:13] shevy: windows is just worse shit
[23:22:09] eam: shevy: at least it's not generating ruby eh
[23:22:25] shevy: eam oh but there is!
[23:22:47] eam: I know you think perl is ugly but everyone knows true beauty is on the inside
[23:23:05] shevy: git-instaweb.sh:#!/usr/bin/env ruby
[23:23:27] shevy: here is the line preceding that
[23:23:29] shevy: cat >"$fqgitdir/gitweb/$httpd.rb" <<EOF
[23:23:56] shevy: Aeyrix so now you see, we also have perl and ruby there!
[23:24:35] xxneolithicxx: eam: is that the line you give your friend when talking about your fat girl Perl?
[23:24:50] nso95: has joined #ruby
[23:25:01] eam: ok so it's a HEREDOC? ruby supports heredoc too
[23:25:16] eam: xxneolithicxx: more cushin' for the pushin'
[23:25:16] kenneth: has joined #ruby
[23:25:20] thatslifeson: has joined #ruby
[23:25:23] TigerWolf: has joined #ruby
[23:25:49] xxneolithicxx: i have to say its a hell of a creative mix
[23:25:54] havenwood: has joined #ruby
[23:26:17] eam: here's the same line in ruby, you tell me what's more ugly: print "#{$fqgitdir}/gitweb/#{$httpd}.rb" <<EOF
[23:26:42] shevy: this is ugly
[23:26:48] shevy: why don't you write beautiful ruby code eam
[23:27:02] eam: I do :(
[23:27:14] shevy: the wicked perl is still ingrained in your brain
[23:27:23] danman: has joined #ruby
[23:27:29] eam: well, duh
[23:27:29] xxneolithicxx: its beautiful like Perl? lol
[23:27:43] eam: shevy: http://www.antipope.org/charlie/old/attic/perl/lurker.html
[23:27:56] Ropeney: has joined #ruby
[23:28:31] shevy: that one lost his mind
[23:28:34] shevy: to Cthulhu
[23:28:46] zzing: has joined #ruby
[23:28:47] shevy: $foo = \@{ qw(hacker perl another just) };
[23:28:57] echosystm: has joined #ruby
[23:29:02] shevy: $bar = map { print $_, " "} reverse @$foo;
[23:29:05] shevy: well it reminds me of ruby
[23:29:12] shevy: with more line noise in between
[23:29:28] xxneolithicxx: i hate those perl special variables
[23:29:49] xxneolithicxx: pisses me off when they are used all over the place and u have to read someone elses code
[23:29:49] eam: well, he wrote it wrong it should just be $foo = [ qw(hacker perl another just) ]
[23:29:50] shevy: ruby got $_ too
[23:30:08] shevy: nobody can tell eam!!!!
[23:30:09] eam: which is the same syntax as in ruby, except ruby uses %w() instead of qw()
[23:30:11] shevy: that's the whole point of perl
[23:30:17] eam: shevy: it's the same syntax as ruby!
[23:30:23] shevy: the () part yeah
[23:30:31] shevy: that's the thing I recognize too :)
[23:30:33] eam: >> $foo = [ %w(hacker perl another just) ]
[23:30:34] ruboto: eam # => [["hacker", "perl", "another", "just"]] (https://eval.in/367880)
[23:30:37] shevy: and the "reverse"
[23:30:38] eam: shevy: the entire thing is
[23:30:49] shevy: you skipped the \@ !
[23:30:56] eam: like I said he wrote it wrong
[23:31:00] eam: \@{} is []
[23:31:05] eam: in perl and ruby both
[23:31:21] shevy: he lost knowledge to Yog-Sothoth
[23:32:00] eam: \@[] is like saying [*[%w(a b c)]]
[23:32:23] eam: (kinda, ruby lacks the same kind of reference semantics)
[23:34:18] arescorpio: has joined #ruby
[23:34:19] DerisiveLogic: has joined #ruby
[23:35:32] Xoro: has joined #ruby
[23:35:36] n_blownapart: has joined #ruby
[23:36:32] shevy: [*[%w(a b c)]]
[23:36:35] shevy: what are you doing eam
[23:36:42] Aeyrix: their best.
[23:36:43] shevy: you add snoopy characters into ruby
[23:36:48] eam: it's silly right? that's what \@{} is though
[23:37:03] shevy: now I understand how people lose their mind with perl
[23:37:08] eam: but that's ruby
[23:37:31] eam: pretty sure ruby is even more crazy than perl
[23:38:25] eam: >> % %%%%%%% %%%% % %%%%% %%%% # ruby is crazy
[23:38:26] ruboto: eam # => "%" (https://eval.in/367881)
[23:38:34] redondo: has joined #ruby
[23:39:14] shevy: underneath it's beauty
[23:39:18] shevy: it has some strange things
[23:39:29] luckyme: has joined #ruby
[23:39:35] tubuliferous_: has joined #ruby
[23:39:41] eam: at least in perl, sprintf is actually sprintf, and there's a clear "q" around stringy quote with variable delimiters
[23:41:11] Blizzy: has joined #ruby
[23:42:20] eam: anyone here good with ruby c extensions? my extension isn't building
[23:42:33] saadq: has joined #ruby
[23:42:48] eam: works fine with `rake compile` but for some reason the gem "extensions" field is not actually driving a build at install time
[23:43:44] shevy: I realized that in order to write ruby c extensions
[23:43:48] shevy: one should first get to understand C
[23:43:51] ebonics: you know when you leave a codebase for a couple months then get back and expect your task to be the worst thing in your life
[23:44:10] saadq: hey guys, i just installed ruby and rails, and my terminal has become weird. It shows the current version of Ruby instead of my name and it switched to zsh I think it used to be bash before http://i.imgur.com/Y5ZzvpP.png
[23:44:11] ebonics: then you come back and realise past you accounted for the possibility of that happening and implemented code to ease the pain
[23:44:15] ebonics: i actually love past me
[23:44:21] saadq: any help would be appreciated
[23:44:33] shevy: ebonics I feel like that ALL the time
[23:44:41] shevy: my code has a life on its own
[23:44:43] ebonics: shevy, same lol
[23:44:47] ebonics: it feels so good
[23:44:50] ebonics: you're like FML
[23:44:50] shevy: I hate this
[23:44:53] ebonics: then you're like :))))))))))))))
[23:45:00] shevy: I am like :((((
[23:47:01] einarj: has joined #ruby
[23:47:06] shevy: because it's like stealing time
[23:47:11] shevy: I don't want to spend time creating things
[23:47:16] shevy: I want to create things
[23:48:15] kenneth: has joined #ruby
[23:49:09] veduardo: has joined #ruby
[23:50:51] Agoldfish: has joined #ruby
[23:53:29] kenneth: has joined #ruby
[23:53:59] cirn0: has joined #ruby
[23:54:23] casadei: has joined #ruby
[23:55:43] jespada: has joined #ruby
[23:56:01] Ortuna: has joined #ruby
[23:56:17] bootstrappm: ebonics past you sounds like a cool dude / dudette
[23:56:38] luckyme: has joined #ruby
[23:56:46] bootstrappm: I tend to leave behind comments like "You know this shouldn't work like this"
[23:56:56] bootstrappm: then I come back and re-read the code and I'm like oh yeah, whoa, definitely shouldn't work like that
[23:57:29] einarj: has joined #ruby
[23:57:30] havenwood: saadq: How would installing Rails switch your shell? Did you just have some shell plugin you were already using that changes your prompt when Rails is detected?
[23:58:05] saadq: havenwood: I'm not sure I just followed the instructions from here tbh http://railsapps.github.io/installrubyonrails-mac.html
[23:58:15] saadq: this is what my terminal looks like now http://i.imgur.com/MelkB7g.png
[23:58:17] kenneth: has joined #ruby
[23:58:52] ebonics: lmfao bootstrappm
[23:59:02] ebonics: that's hilarious
[23:59:13] ebonics: like.. @todo: make this work
[23:59:20] bootstrappm: hahahah yep pretty much