« Back to channel list

#ruby - 29 May 2015

« Back 1 day Forward 1 day »
[00:00:00] xybre: havenwood: One of the first distros I ever used was RedHat 6. It nearly scared me off from Linux forever. :D
[00:00:04] havenwood: For Ubuntu at least there are the Brightbox Ruby packages.
[00:00:27] ebonics: redhat is a pretty hard distro for noobs
[00:00:52] xybre: Some years later I ended up using slackware and was pretty okay with that.
[00:00:58] Yzguy: has joined #ruby
[00:01:19] ebonics: do you prefer slack over gentoo?
[00:01:36] bootstrappm: i think trusty is out now though, no ebonics?
[00:01:57] ebonics: bootstrappm, yeah but i just wanted to give precise32 a whirl cause a lot of vagrant articles talk about it
[00:02:01] xybre: Not anymore, Slckare's packages are so ancient they should be relegated to a museum.
[00:02:22] bootstrappm: my distro (elementaryOS Luna) is based on precise :(
[00:02:27] bootstrappm: i always install gvim anyway though
[00:02:47] ebonics: i guess you dont use vim on your deployed servers
[00:02:57] xybre: elementaryOS is nice looking, annoyingly not configurable for even basic things.
[00:03:44] bootstrappm: I do ebonics but haven't run into any missing features I'd need on there
[00:03:47] bootstrappm: what comes w/ 7.4?
[00:03:49] xybre: Our production servers are so old they're running vim 7.2 :D
[00:03:55] ebonics: YCM doesnt run on 7.3
[00:04:00] mgorbach: has joined #ruby
[00:04:01] _seanc_: has joined #ruby
[00:04:08] rickmasta: has joined #ruby
[00:04:31] xybre: VIM - Vi IMproved 7.2 (2008 Aug 9, compiled Jul 12 2010 12:49:33)
[00:04:31] bootstrappm: ooo just took a look, had never seen it before
[00:04:45] ebonics: you dont use YCM ;o?
[00:05:09] bootstrappm: nope I'm still on supertab
[00:05:16] ebonics: i use ycm with supertab
[00:05:27] ebonics: and ulti snips
[00:05:37] GPrime: has joined #ruby
[00:05:45] moretti: has joined #ruby
[00:06:16] bootstrappm: and yes xybre, apt description of elementary
[00:06:45] xybre: I'm so sad that the developer killed CrunchBang :(
[00:06:57] bootstrappm: another one died recently right?
[00:07:16] xybre: A few good ones have died lately
[00:08:00] bootstrappm: hey, related: http://jimlynch.com/linux-articles/crunchbang-linux-is-back-from-the-dead/
[00:09:27] xybre: Well, the semi-official successor is BunsenLabs
[00:10:21] sevenseacat: has joined #ruby
[00:10:40] xybre: They're basically rebuilding it from the ground up, very carefully.
[00:10:54] xybre: https://github.com/BunsenLabs/bunsen-netinstall#readme
[00:12:18] bootstrappm: ahhh mandriva is the other that died recently
[00:14:59] kinduff: >> [*1..5].map{'&#9733'}.join(';')
[00:15:00] ruboto: kinduff # => "★★★★&#9733" (https://eval.in/372172)
[00:19:24] jpfuentes2: has joined #ruby
[00:20:48] kies: has joined #ruby
[00:22:19] ismaelga: has joined #ruby
[00:25:19] jpfuente_: has joined #ruby
[00:26:07] zarubin_: has joined #ruby
[00:27:12] BTRE: has joined #ruby
[00:27:31] delianides: has joined #ruby
[00:28:10] keen___________1: has joined #ruby
[00:28:20] haxrbyte_: has joined #ruby
[00:28:44] Diabolik: sorry to be a pain
[00:28:53] Diabolik: but can you break down how you would modularise this to me
[00:29:04] chipotle: has joined #ruby
[00:31:17] felixjet: has joined #ruby
[00:31:36] jinie: has joined #ruby
[00:32:32] kinduff: has joined #ruby
[00:34:57] soulcake: has joined #ruby
[00:35:46] Rennex: has joined #ruby
[00:35:48] shuber_: has joined #ruby
[00:35:58] commondream: has joined #ruby
[00:36:36] MatthewsFace: has joined #ruby
[00:37:06] pengin: has joined #ruby
[00:38:15] nobitanobi: has joined #ruby
[00:40:28] RegulationD: has joined #ruby
[00:40:59] Oog: has joined #ruby
[00:41:53] chipotle_: has joined #ruby
[00:45:03] commondream: has joined #ruby
[00:45:21] SevenWolf: has joined #ruby
[00:46:04] Peter_SS1: has joined #ruby
[00:46:17] PNDPO: has joined #ruby
[00:46:30] chipotle: has joined #ruby
[00:47:20] concave: has joined #ruby
[00:47:20] goodcodeguy: has joined #ruby
[00:49:36] amclain: has joined #ruby
[00:50:09] commondream: has joined #ruby
[00:50:12] pengin: has joined #ruby
[00:50:47] moretti: has joined #ruby
[00:53:18] irk: has joined #ruby
[00:53:37] goodcodeguy: has joined #ruby
[00:53:37] shevy: Diabolik haha I was in bed already... but my brain was too active so I just came back
[00:53:56] shevy: Diabolik essentially the simplest way may be to put it just in a class
[00:54:09] Diabolik: ive fixed shit
[00:54:13] Diabolik: if you want to have a look
[00:54:21] shevy: the starting method is "initialize", so you can arrange those methods within initialize
[00:54:55] shevy: and if you need to store data, you can use @instance_variables; so rather than: foo = 'test', you could use @foo = 'test' (within your class that is)
[00:55:03] shevy: I don't remember the link Diabolik
[00:55:13] robustus: has joined #ruby
[00:55:13] Diabolik: for the greatest program ever written?!
[00:55:24] CloCkWeRX: has joined #ruby
[00:55:25] shevy: I remember about 15 lines of IRC
[00:55:26] Diabolik: https://github.com/askl56/PrimeTime
[00:55:52] Deele2: has joined #ruby
[00:56:46] jhass: Diabolik: how about prime stdlib?
[00:57:03] Diabolik: jhass its a coding challenge i have to do everything myself
[00:57:15] Diabolik: same reason why no optparse
[00:59:19] shevy: Diabolik that should be the minimal change towards a class - but don't indent it like that, I merely put the class definition in https://gist.github.com/shevegen/4f5bc5320e614cfb1cca
[00:59:19] prereflect: has joined #ruby
[01:00:14] shuber__: has joined #ruby
[01:00:16] Diabolik: thanks shevy
[01:00:27] Diabolik: im just not sure in this instance (pun not intended) what use instance variables would be
[01:00:28] workmad3: has joined #ruby
[01:00:37] Diabolik: i just need to make the code as modular as possible
[01:00:47] shevy: yeah you don't need instance variables here
[01:02:13] swgillespie: has joined #ruby
[01:04:16] jhass: eh at least replace the param with @n, else there's no point in a class
[01:04:20] momomomomo: has joined #ruby
[01:04:36] bootstrappm: how do you set the x-amz-directive: REPLACE header w/ the S3 SDK?
[01:04:56] bootstrappm: or I guess how do you set the header and method would be a better question ... reading through the docs now
[01:06:02] Diabolik: shevy is it worth monkey patching Fixnum with my prime method?
[01:06:30] shevy: you already solved it with the class right?
[01:06:31] Yzguy: has joined #ruby
[01:06:43] Diabolik: to make the code more reusable
[01:06:57] shevy: you'd make the code less reusable that way
[01:07:05] Diabolik: everyone is giving me different advice :|
[01:07:16] shevy: think about it
[01:07:19] Diabolik: for a coding challenge for an employer i just guess i should keep it useful
[01:07:22] shevy: you modify a core aspect of ruby
[01:07:32] mmazing: has joined #ruby
[01:07:43] shevy: k so why monkey patch when there is no need for it
[01:07:45] Diabolik: yeah i understand, it was just in terms of showing more advanced knowledge
[01:08:02] shevy: you can show how brilliant you are by making it either very complicated
[01:08:04] shevy: or very simple
[01:08:10] sevenseacat: the advanced part about monkey patching is knowing when to use it and when not to
[01:08:15] Diabolik: il write it in assembly
[01:08:19] Diabolik: thanks for the help guys
[01:08:42] sevenseacat: ACTION bops Diabolik with pimp stick for referring to 892 people as 'guys'
[01:09:00] Diabolik: there are a significant number of lurkers
[01:09:05] shevy: and one cat
[01:09:24] shevy: btw sevenseacat about Australia in the news today :D
[01:09:30] sevenseacat: what did we do now
[01:09:31] shevy: https://codehire.com/runtime/2015/05/27/aussie-pm-thinks-coding-is-a-joke/
[01:09:34] Diabolik: the only other thing is formatting the matrix
[01:09:42] sevenseacat: fucking tony abbott
[01:10:06] shevy: Diabolik well, the formatting looked ok didn't it?
[01:10:36] bronson: has joined #ruby
[01:10:37] pengin: has joined #ruby
[01:10:43] Diabolik: i wanted to have the columns and rows defined with | and - s
[01:10:45] bootstrappm: there's another stupid guy in here that's actually a lass
[01:10:57] mistermocha: has joined #ruby
[01:11:02] bootstrappm: beginning part of that sentence is a reference to username, not intelligence
[01:11:14] hewenhong: has joined #ruby
[01:11:36] hewenhong: has joined #ruby
[01:11:38] mistermocha: has joined #ruby
[01:12:25] Hijiri: has joined #ruby
[01:12:26] shevy: Diabolik that's the current output of your script http://i.imgur.com/Q5mfj2B.jpg
[01:12:26] ismaelga: has joined #ruby
[01:12:46] shevy: well, just pad it with '|' then
[01:12:47] GriffinHeart: has joined #ruby
[01:12:56] shevy: there are ascii-box gems out there too
[01:13:04] shevy: I think ascii_table is one
[01:13:34] sankaber: has joined #ruby
[01:14:14] shevy: https://rubygems.org/gems/ascii_table
[01:14:24] shevy: that is another one...
[01:14:32] Diabolik: https://www.dropbox.com/s/jc60ao7bc9ofsvr/Screenshot%202015-05-29%2002.14.28.png?dl=0
[01:14:57] shevy: yeah you can do this via code
[01:15:00] shevy: that's not hard
[01:15:06] shevy: at each new line, you add a | there
[01:16:04] mello: has joined #ruby
[01:16:54] tkuchiki: has joined #ruby
[01:16:57] macmartine: has joined #ruby
[01:17:19] Exponential: has joined #ruby
[01:17:37] michael_mbp: has joined #ruby
[01:17:38] thiagovsk: has joined #ruby
[01:18:00] Diabolik: is there a more efficient way of doing the prime? function since it isn't efficient
[01:18:03] jbomo: has joined #ruby
[01:18:04] Diabolik: mathematically
[01:18:56] jhass: unicode box drawing chars ftw!
[01:19:18] jhass: require "prime"; Prime.prime? :P
[01:19:22] jhass: it's shipped with Ruby!
[01:21:54] Azure: has joined #ruby
[01:22:59] mistermocha: has joined #ruby
[01:23:16] tastics: has joined #ruby
[01:24:14] shevy: Diabolik you use ruby
[01:24:19] shevy: if you wish to write efficient code
[01:24:47] shevy: also define efficient
[01:24:56] shevy: the code already does not seem to have any real delays when I run it
[01:26:19] jhass: or crystal :P
[01:26:38] longfeet_: has joined #ruby
[01:27:13] ValicekB: has joined #ruby
[01:27:29] nateberkopec: has joined #ruby
[01:27:47] mistermocha: has joined #ruby
[01:28:29] al2o3-cr: db.execute("insert into aliases (name, desc) values (%s %s)" % [name, desc]) why does this give this @exc: SQLite3::SQLException: near "http": syntax error
[01:28:57] jhass: use bind variables
[01:29:04] jhass: I won't even answer your actual question
[01:29:14] jhass: that code allows me to drop all your data
[01:29:20] sevenseacat: do it do it do it
[01:29:57] al2o3-cr: jhass: what are bind variables?
[01:30:10] jhass: what you did except in the database
[01:30:19] jhass: after the SQL was parsed by it
[01:30:43] jhass: that's sequel?
[01:30:59] al2o3-cr: jhass: sqlite3
[01:31:58] jhass: https://github.com/sparklemotion/sqlite3-ruby
[01:32:03] jhass: called parameter markers there
[01:32:06] jhass: right in the readme
[01:33:07] al2o3-cr: ah ok i see never use sql db before
[01:34:01] bootstrappm: poll: who uses dotenv?
[01:34:14] jhass: I use zsh-autoenv or something
[01:34:29] jschoolcraft: has joined #ruby
[01:34:30] bootstrappm: this guy https://github.com/bkeepers/dotenv
[01:35:04] charliesome: has joined #ruby
[01:35:15] jhass: https://github.com/horosgrisa/autoenv
[01:36:21] luckyme: has joined #ruby
[01:36:52] goodcodeguy: has joined #ruby
[01:37:26] DynamicMetaFlow: has joined #ruby
[01:37:29] jud: has joined #ruby
[01:37:59] sankaber: has joined #ruby
[01:38:51] bootstrappm: well, thats useful
[01:40:39] pengin: has joined #ruby
[01:41:31] yh: has joined #ruby
[01:43:42] bootstrappm: http://blog.gleitzman.com/post/43330157197/howdoi-instant-coding-answers-via-the-command
[01:45:00] bootstrappm: ^ great concept
[01:47:00] zreisman: has joined #ruby
[01:47:35] dfockler: has joined #ruby
[01:49:50] ravenreborn: has joined #ruby
[01:50:06] lampshades: has joined #ruby
[01:50:10] duderonomy: has joined #ruby
[01:51:48] Takle: has joined #ruby
[01:55:34] moretti: has joined #ruby
[01:57:49] troyready: has joined #ruby
[01:58:06] RegulationD: has joined #ruby
[01:58:08] alxndr: bootstrappm: i've been using dotenv for the dev and test side of a project
[01:58:48] bootstrappm: nice alxndr, using it now
[01:59:42] alxndr: had trouble with it on a newer version of something or other, and ended up creating this shell shortcut which sorta does the same thing if you remember to use it https://github.com/alxndr/dotfiles/commit/7dc0bf35
[02:00:50] x44x45x41x4E: has joined #ruby
[02:01:13] alxndr: I couldn't decide which i like less: having to remember to preface every mix command with that, or having to remember to source a file in any brand-new terminal which was going to use mix
[02:01:24] zotherstupidguy: has joined #ruby
[02:01:29] bootstrappm: heey thats cool!
[02:02:03] bootstrappm: check out the zsh plugin that jhass linked, it autosources your .env
[02:02:15] alxndr: ...huh so i've been using that shortcut for the last month, guess i like it better than remembering to source something
[02:02:57] codeFiend: has joined #ruby
[02:03:26] alxndr: that zsh plugin looks pretty nice... will have to try that out.
[02:03:56] darkf: has joined #ruby
[02:04:07] alxndr: though with catenv it's kinda nice to have my env file open in one tab, change a var, then in another tab just !!-Enter, don't have to cd out and back in again
[02:04:18] bootstrappm: I use bash personally but agreed, once I get around to switching to zsh it'll be useful
[02:04:20] al2o3-cr: jhass: is this safe? https://gist.github.com/anonymous/387ee5b8d1ac578eea65
[02:04:23] alxndr: now i'm getting picky though
[02:04:33] SevenWolf: has left #ruby: ()
[02:04:35] alxndr: i switched to zsh a few months ago just for the right-hand side prompt
[02:04:45] alxndr: and the auto-cd thing
[02:06:04] alxndr: bootstrappm: oh wait this is the ruby room, ha. i think i use dotenv for everything in ruby
[02:06:45] bootstrappm: alxndr hah what room did you think you were in?
[02:07:16] alxndr: elixir... there's a dotenv inspired thing, but it's less useful in newer versions of projects for some reason that i forget
[02:07:28] ebonics: TIL you can pin tabs on chrome
[02:07:31] alxndr: (mix is elixir's bundle-plus-rails)
[02:07:41] alxndr: ...-plus-rake)
[02:08:04] sevenseacat: mix is the shit.
[02:08:21] blandflakes: has joined #ruby
[02:09:30] ebonics: i never got around to using zsh either
[02:09:33] ebonics: is there actually a benefit
[02:10:10] ebonics: the fact it's slightly more customizable seems kinda negligible considering youll be using bash in most production environments?
[02:10:43] alxndr: little things, which i think add up. tab completing something "/u/l/e/n/lo<TAB>" into "/usr/local/etc/nginx/logs" is pretty cool
[02:10:53] ebonics: that's cool
[02:10:59] ebonics: i can see myself breaking stuff though
[02:11:06] ebonics: being overconfident with that feature lol
[02:12:32] Ismael: has joined #ruby
[02:15:57] CustosLimen: has joined #ruby
[02:17:42] bootstrappm: am I just making this up? I swore there was a 'method?' method
[02:17:51] bootstrappm: object.method? :some_name
[02:18:01] bootstrappm: object.method? :grrr
[02:18:01] Ox0dea: bootstrappm: You want `respond_to?`, surely?
[02:18:34] bootstrappm: thanks Ox0dea that works!
[02:18:44] iamninja: has joined #ruby
[02:19:01] Ox0dea: Now that you mention it, `method?` wouldn't be such a bad spelling.
[02:20:23] gaboesquivel: has joined #ruby
[02:20:43] baweaver: has joined #ruby
[02:21:43] TheNet: has joined #ruby
[02:22:54] mrmargolis: has joined #ruby
[02:23:51] ismaelga: has joined #ruby
[02:25:10] mrmargolis: has joined #ruby
[02:26:36] dseitz: has joined #ruby
[02:26:40] pengin: has joined #ruby
[02:26:46] zarubin_: has joined #ruby
[02:27:03] SouL_|__: has joined #ruby
[02:28:21] perrier: has joined #ruby
[02:33:48] Deele: has joined #ruby
[02:35:21] ismaelga: has joined #ruby
[02:36:51] arescorpio: has joined #ruby
[02:38:11] GriffinH_: has joined #ruby
[02:40:07] ismaelga: has joined #ruby
[02:40:28] starless: has joined #ruby
[02:40:36] bootstrappm: has left #ruby: ()
[02:40:45] RegulationD: has joined #ruby
[02:41:29] Limix: has joined #ruby
[02:42:17] al2o3-cr: has joined #ruby
[02:43:13] Vile`: has joined #ruby
[02:45:05] finisherr: has joined #ruby
[02:46:54] hewenhong: has joined #ruby
[02:47:22] TinkerTyper: has joined #ruby
[02:51:43] df: has joined #ruby
[02:52:01] bruno-: has joined #ruby
[02:53:11] pengin: has joined #ruby
[02:54:50] lessless: has joined #ruby
[02:55:00] existensil: has joined #ruby
[02:56:48] ebonics: has joined #ruby
[02:58:24] momomomomo: has joined #ruby
[03:00:00] fu2ristiq: has joined #ruby
[03:02:08] hewenhong: has joined #ruby
[03:04:44] mello: has joined #ruby
[03:07:50] Palmer11_: has joined #ruby
[03:11:15] pen: has joined #ruby
[03:15:26] braincrash: has joined #ruby
[03:19:37] gambl0re: has joined #ruby
[03:21:42] Radar: If I have a date like this: Date.new(2010, 6, 1) how do I get Ruby to show me all the months that have occurred between that date and the current date?
[03:23:08] shuber_: has joined #ruby
[03:24:14] baweaver: has joined #ruby
[03:25:20] Exponential: has joined #ruby
[03:30:15] al2o3-cr: >> require 'date';d1 = Date.new(2010,6,1); d2 = Date.new(2012,9,3); (d2.year * 12 + d2.month) - (d1.year * 12 + d1.month)
[03:30:17] ruboto: al2o3-cr # => 27 (https://eval.in/372223)
[03:30:32] delianides: has joined #ruby
[03:30:42] Ox0dea: >> [*Date.new(2010, 6, 1)..Time.new.to_date].uniq { |d| [d.year, d.month] }
[03:30:43] ruboto: Ox0dea # => uninitialized constant Date (NameError) ...check link for more (https://eval.in/372224)
[03:31:46] charliesome: has joined #ruby
[03:32:07] Ox0dea: Radar: You'll not want to generate *all* the days between then and now, though, so it's not an acceptable solution.
[03:32:16] Radar: Ox0dea: indeed
[03:32:18] Ox0dea: Still, being able to do it with a Range of Dates would be nice.
[03:36:02] al2o3-cr: >> require 'date';d1 = Date.new(2010,6,1); d2 = Time.new.to_date; (d2.year * 12 + d2.month) - (d1.year * 12 + d1.month) # always forget about to_date
[03:36:03] ruboto: al2o3-cr # => 59 (https://eval.in/372229)
[03:36:17] al2o3-cr: can anyone help me out with this
[03:36:25] Ox0dea: al2o3-cr: Hm?
[03:36:25] eggoez: has joined #ruby
[03:36:33] Ox0dea: Radar doesn't want the number of intervening months, I don't think.
[03:36:45] Radar: I want an array of the months
[03:37:11] al2o3-cr: https://gist.github.com/anonymous/7bd86cb6c731e29bd45a
[03:37:20] al2o3-cr: ah an array
[03:37:44] Scripore: has joined #ruby
[03:37:56] al2o3-cr: need it only to print out found or not found
[03:38:08] someword: has joined #ruby
[03:38:50] growlove: has joined #ruby
[03:40:15] Ox0dea: Radar: https://eval.in/372230
[03:40:43] Radar: Ox0dea: Wonderful. Thanks :)
[03:40:46] Ox0dea: The naming's a bit off and mutation abounds, but the crux of the thing is there.
[03:41:04] Ox0dea: I tried to come up with a functional approach using #reduce, but it wouldn't be as clean.
[03:41:36] RegulationD: has joined #ruby
[03:42:56] TinkerTyper: has joined #ruby
[03:43:30] Hanmac: al2o3-cr: what about Date.today ?
[03:43:41] eshark: has joined #ruby
[03:43:46] Ox0dea: hanmac: Yes, that would be better.
[03:44:16] Ox0dea: al2o3-cr: Out of curiosity, what made you go with SQL for your aliases?
[03:45:14] baweaver: Radar: Is it quiz show time already? ;)
[03:47:53] cubesandcode: has joined #ruby
[03:48:26] baweaver: >> Date::MONTHNAMES
[03:48:27] ruboto: baweaver # => uninitialized constant Date (NameError) ...check link for more (https://eval.in/372234)
[03:48:35] baweaver: >> require 'data'; Date::MONTHNAMES
[03:48:36] ruboto: baweaver # => cannot load such file -- data (LoadError) ...check link for more (https://eval.in/372235)
[03:48:44] baweaver: >> require 'date'; Date::MONTHNAMES
[03:48:46] ruboto: baweaver # => [nil, "January", "February", "March", "April", "May", "June", "July", "August", "September", "Octobe ...check link for more (https://eval.in/372236)
[03:49:12] baweaver: >> require 'date'; Date::MONTHNAMES[1..12]
[03:49:13] ruboto: baweaver # => ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", " ...check link for more (https://eval.in/372237)
[03:49:21] baweaver: there we go
[03:49:26] al2o3-cr: hanmac: and that too ;p
[03:50:01] al2o3-cr: Ox0dea: i don't really know
[03:50:08] bronson: has joined #ruby
[03:50:12] Ox0dea: Just feels like overkill is all.
[03:50:26] Ox0dea: >> require 'date'; Date::YEARNAMES
[03:50:27] ruboto: Ox0dea # => uninitialized constant Date::YEARNAMES (NameError) ...check link for more (https://eval.in/372238)
[03:50:53] baweaver: http://ruby-doc.org/stdlib-2.2.2/libdoc/date/rdoc/Date.html - See Constants
[03:50:56] pipework: ??Ruby's date libraries aren't the most intuitive, imo.
[03:51:04] Ox0dea: baweaver: It was supposed to be humorous.
[03:51:10] Ox0dea: Years aren't typically named.
[03:51:19] baweaver: ACTION blinks
[03:51:47] zenspider: pipework: referring to the nil at the front?
[03:52:01] Oog: has joined #ruby
[03:52:08] pipework: zenspider: Just the whole thing, really. I can get why someone would want to write 1 instead of 0 for the accessor.
[03:52:15] baweaver: Well that's one way to get around 0 index
[03:52:51] Limix: has joined #ruby
[03:52:55] pipework: zenspider: Is that not the reason?
[03:53:20] aryeh: has joined #ruby
[03:54:11] Ox0dea: >> require 'date'; Date::MONTHNAMES[Date.today.month]
[03:54:12] ruboto: Ox0dea # => "May" (https://eval.in/372239)
[03:54:14] mistermocha: has joined #ruby
[03:54:14] Ox0dea: pipework: ^
[03:54:22] aryeh: has left #ruby: ()
[03:54:22] Ox0dea: I think it makes sense.
[03:54:36] pipework: I don't think it doesn't make sense, I said that it wasn't intuitive.
[03:54:41] pipework: The whole set of libraries, really.
[03:54:56] pipework: I'm just as likely to just be stupid though.
[03:55:14] Soda: has joined #ruby
[03:55:15] baweaver: pipework: well now is probably the best time to voice that before 3.x
[03:55:44] pipework: baweaver: I'm not that important, really. It'd have to be someone with a lot more experience in proposals and probably have some contacts.
[03:56:23] baweaver: A good idea is not constrained by the importance of the person that had it in a good community
[03:56:42] baweaver: that being said, I'm neutral towards aforementioned ideas regarding DateTime
[03:57:09] pipework: But it carries more weight faster, and I'd rather not take forever bantering over something as fuzzy as 'intuitiveness' with a bunch of people I've not interacted with before.
[03:57:39] bluOxigen: has joined #ruby
[03:57:41] momomomomo: has joined #ruby
[03:58:36] jenrzzz: has joined #ruby
[03:58:41] shuber_: has joined #ruby
[03:59:45] baweaver: If you believe in something enough I would anyways
[04:00:05] pipework: I'd rather argue objective things.
[04:00:22] pipework: ActiveSupport kinda makes it less terrible.
[04:01:11] baweaver: Fair enough
[04:01:26] northfurr: has joined #ruby
[04:01:59] baweaver: Just trying to make the point that Ruby would be far worse off if it never took ideas from outside the core
[04:03:11] pipework: baweaver: There's people not on core that are great at putting together proposals.
[04:03:16] pipework: I am not any such person.
[04:03:51] baweaver: Then you could always ask one of those people for a one-over
[04:04:09] baweaver: tenderlove at least is fairly approachable for most things involving language enhancements
[04:04:19] pipework: baweaver: I just don't want to try and argue over fuzzy subjective 'intuitiveness'.
[04:04:33] pipework: And my ideas about the date and time classes in ruby are just that.
[04:04:37] rrichardsr3: has joined #ruby
[04:04:46] Ox0dea: Would you want Fixnum#bits[0] to be the MSB or LSB?
[04:05:11] pipework: I do have another idea that's more objective, I just need to write it up.
[04:05:16] mary5030: has joined #ruby
[04:05:36] zotherstupidguy: has joined #ruby
[04:12:07] macmartine: has joined #ruby
[04:14:23] iamjarvo: has joined #ruby
[04:15:18] luckyme: has joined #ruby
[04:24:17] Spami: has joined #ruby
[04:27:32] fu2ristiq: has joined #ruby
[04:28:51] casadei: has joined #ruby
[04:29:52] charliesome: has joined #ruby
[04:31:02] ellisTAA: has joined #ruby
[04:31:07] fedexo: has joined #ruby
[04:31:41] Exponential: has joined #ruby
[04:32:09] SouL_|_: has joined #ruby
[04:33:01] ellisTAA: hey all, i???m about to get into activerecord in a week and wanted to get some practice coming up with the database schema, can anyone recommend a resource that teaches you how to understand how to make a database
[04:33:21] hewenhong: has joined #ruby
[04:33:44] balazs: has joined #ruby
[04:34:22] badhatter: has joined #ruby
[04:34:40] badhatter: has joined #ruby
[04:34:53] mrsolo: has joined #ruby
[04:35:55] Feyn: has joined #ruby
[04:35:55] codeFiend: has joined #ruby
[04:37:44] workmad3: has joined #ruby
[04:41:24] bruno-: has joined #ruby
[04:42:11] Tux_007__: has joined #ruby
[04:43:00] tjbiddle: has joined #ruby
[04:48:40] Exponential: has joined #ruby
[04:50:14] ebonics_: has joined #ruby
[04:53:16] lele: has joined #ruby
[04:53:30] mello: has joined #ruby
[04:53:51] towski_: has joined #ruby
[04:53:56] moeSeth: has joined #ruby
[04:55:58] krz: has joined #ruby
[04:56:07] michael_mbp: has joined #ruby
[04:57:46] pengin: has joined #ruby
[04:59:49] ohaibbq: has joined #ruby
[05:02:17] rickmasta: has joined #ruby
[05:04:25] rht: has joined #ruby
[05:08:01] Oog: has joined #ruby
[05:08:33] mrsolo: has joined #ruby
[05:09:58] platzhirsch: has joined #ruby
[05:10:56] lampshades: has joined #ruby
[05:11:58] chrissonar: has joined #ruby
[05:12:48] macmartine: has joined #ruby
[05:14:21] macmarti_: has joined #ruby
[05:15:00] tesuji: has joined #ruby
[05:15:37] shuber_: has joined #ruby
[05:15:49] jenrzzz: has joined #ruby
[05:16:06] codeFiend: has joined #ruby
[05:17:12] Exponential: has joined #ruby
[05:18:38] ravenreborn: has joined #ruby
[05:19:11] Channel6: has joined #ruby
[05:19:43] hewenhong: has joined #ruby
[05:21:29] riotjones: has joined #ruby
[05:22:24] riotjones: has joined #ruby
[05:22:51] Takle: has joined #ruby
[05:22:52] _seanc_: has joined #ruby
[05:23:20] ravenreborn: has joined #ruby
[05:23:21] Kyle__: has joined #ruby
[05:23:45] pengin: has joined #ruby
[05:24:12] kies^: has joined #ruby
[05:24:28] WPWW1488: has joined #ruby
[05:24:28] ChanServ: +b *!*@gateway/web/freenode/ip.
[05:24:28] ChanServ: ChanServ kicked WPWW1488: swastika
[05:24:45] aganov: has joined #ruby
[05:25:46] mary5030: has joined #ruby
[05:27:39] fu2ristiq: has joined #ruby
[05:29:34] casadei: has joined #ruby
[05:30:25] RegulationD: has joined #ruby
[05:31:28] jenrzzz: has joined #ruby
[05:32:05] tagrudev: has joined #ruby
[05:32:07] towski_: has joined #ruby
[05:34:28] codeFiend: has joined #ruby
[05:34:30] wjimenez5271: has joined #ruby
[05:34:33] tautvydas: has joined #ruby
[05:34:47] Oog: has joined #ruby
[05:35:09] sandelius: has joined #ruby
[05:38:15] ahmetkapikiran: has joined #ruby
[05:40:11] fu2ristiq: has joined #ruby
[05:45:21] niik00: has joined #ruby
[05:45:45] niik00: Hi guys, just one basic question. I'm not sure to understand why in custom gems sometimes there are a gemspec + a Gemfile ?
[05:46:12] User458764: has joined #ruby
[05:46:14] sandelius: niik00 the Gemfile used when developing the gem
[05:46:49] KommandoFreisler: has joined #ruby
[05:47:05] KommandoFreisler: hello my white brothers and sisters
[05:47:20] rippa: has joined #ruby
[05:47:46] Exponential: has joined #ruby
[05:48:10] last_staff: has joined #ruby
[05:48:28] apeiros: !ban KommandoFreisler !P racists are still not welcome
[05:48:38] ChanServ: +b KommandoFreisler!*@*
[05:48:38] ChanServ: ChanServ kicked KommandoFreisler: racists are still not welcome
[05:49:07] alxndr: they're using an open web gateway now?
[05:49:34] codeFiend: has joined #ruby
[05:50:47] gaboesquivel: has joined #ruby
[05:50:55] _blizzy_: has joined #ruby
[05:51:56] yh: has joined #ruby
[05:51:58] niik00: sandelius: ok but all the dependencies have to be declared in the gemspec then ?
[05:52:22] niik00: ok I see. Thanks !
[05:52:45] riotjones: has joined #ruby
[05:54:11] fu2ristiq: has joined #ruby
[05:55:24] Azure: has joined #ruby
[05:55:40] Hanmac1: has joined #ruby
[05:57:19] jpfuentes2: has joined #ruby
[05:57:47] platzhirsch: has joined #ruby
[06:01:03] mrsolo: has joined #ruby
[06:02:20] multi_io: has joined #ruby
[06:03:03] Cache_Money: has joined #ruby
[06:04:37] swgillespie: has joined #ruby
[06:05:32] Musashi007: has joined #ruby
[06:08:19] swgillespie: has joined #ruby
[06:09:40] sinequanon: has joined #ruby
[06:10:51] bruno-: has joined #ruby
[06:12:10] tvw: has joined #ruby
[06:12:12] Oog: has joined #ruby
[06:13:56] sandelius: has joined #ruby
[06:14:03] andikr: has joined #ruby
[06:15:17] ndrei: has joined #ruby
[06:15:34] niik00: has left #ruby: ()
[06:21:03] hewenhong: has joined #ruby
[06:21:22] Someguy123: has joined #ruby
[06:21:22] quarcu: has joined #ruby
[06:22:09] pengin: has joined #ruby
[06:22:48] sinkensabe: has joined #ruby
[06:25:13] fu2ristiq: has joined #ruby
[06:25:45] fu2ristiq: has joined #ruby
[06:25:52] fu2ristiq: has left #ruby: ()
[06:26:07] Deele: has joined #ruby
[06:26:53] charliesome: has joined #ruby
[06:27:32] gauke: has joined #ruby
[06:28:33] zarubin_: has joined #ruby
[06:28:46] djbkd: has joined #ruby
[06:30:27] yardenbar: has joined #ruby
[06:33:14] codecop: has joined #ruby
[06:33:51] ahmetkapikiran: has joined #ruby
[06:34:08] sigurding: has joined #ruby
[06:35:42] jud^: has joined #ruby
[06:37:31] roolo: has joined #ruby
[06:39:44] arup_r: has joined #ruby
[06:39:57] bronson: has joined #ruby
[06:42:16] mello: has joined #ruby
[06:42:38] havenwood: has joined #ruby
[06:42:49] xcesariox: has joined #ruby
[06:43:11] nso95: has joined #ruby
[06:43:57] Xoro: has joined #ruby
[06:44:37] rkazak_: has joined #ruby
[06:45:02] Hanmac1: has left #ruby: ()
[06:49:05] toretore: has joined #ruby
[06:50:22] gauke: has joined #ruby
[06:52:05] Musashi007: has joined #ruby
[06:53:25] sepp2k: has joined #ruby
[06:54:02] gusto: has joined #ruby
[06:54:28] ndrei: has joined #ruby
[07:02:20] fabrice31: has joined #ruby
[07:03:05] pasv: has joined #ruby
[07:03:59] erikh: has joined #ruby
[07:05:06] JimS: has joined #ruby
[07:06:58] AnurangDikshiit: hi guys i own my own company and i am threatened to being sued if i don't hire this candidate
[07:07:34] User458764: has joined #ruby
[07:07:55] apeiros: AnurangDikshiit: that's sad. but also quite off-topic. we're not #legaladvice
[07:08:03] AnurangDikshiit: hi guys i own my own company and i am threatened to being sued if i don't hire this candidate
[07:08:29] Nilium: I think maybe it's a bot.
[07:09:25] sevenseacat: AnurangDikshiit: hi.
[07:09:48] Nilium: The only answer to legal questions is really "talk to a lawyer."
[07:09:52] sevenseacat: AnurangDikshiit: got anything relevant to Ruby to add?
[07:09:53] AnurangDikshiit: i said that i can't hire a liability because she has a history of acoholism
[07:10:13] Nilium: Talk to a lawyer.
[07:10:15] sevenseacat: if not, i'll invite you to leave.
[07:10:33] AnurangDikshiit: wow you're so rude
[07:10:44] alex88: has joined #ruby
[07:11:18] Nilium: Nobody really cares, go talk to a lawyer. We are not lawyers.
[07:11:22] Nilium: Well, not so far as I know.
[07:11:59] Rubie: has joined #ruby
[07:12:55] AnurangDikshiit: thanks Nilium... i'll go do that
[07:13:00] ki0: has joined #ruby
[07:19:19] RegulationD: has joined #ruby
[07:23:35] C1V0: has joined #ruby
[07:24:03] DaniG2k: has joined #ruby
[07:28:25] curtis__: has joined #ruby
[07:28:30] curtis__: that was weird... something screwy is happening with the servers
[07:28:32] curtis__: but yeah i am looking for people that are passionate rails developers
[07:29:50] apeiros: curtis__: you'll probably want to use #rubyonrails for that. I'm not sure on their recruiting-in-channel policy, though
[07:31:42] Hanmac: has joined #ruby
[07:32:26] Musashi007: has joined #ruby
[07:33:45] Exponential: has joined #ruby
[07:34:27] User458764: has joined #ruby
[07:35:36] fabrice31_: has joined #ruby
[07:35:43] sevenseacat: chances of it actually working are slim to none.
[07:36:22] Lingo: Anyone know which exceptions could be raised when using Redic (the Redis client library)?
[07:36:41] workmad3: has joined #ruby
[07:37:22] Lingo: or hiredis-rb for that matter, it uses that as a driver
[07:39:26] livathinos: has joined #ruby
[07:41:52] Musashi007: has joined #ruby
[07:41:57] duderonomy: has joined #ruby
[07:42:18] hewenhong: has joined #ruby
[07:42:55] hewenhong: has joined #ruby
[07:43:10] mello: has joined #ruby
[07:44:48] codeFiend: has joined #ruby
[07:44:49] queequeg1: has joined #ruby
[07:44:50] ada2358: has joined #ruby
[07:45:23] Ox0dea: has left #ruby: ("WeeChat 1.2-rc1")
[07:46:57] ahmetkapikiran: has joined #ruby
[07:48:10] curtis___: has joined #ruby
[07:48:28] curtis___: what is the most complex ruby app ever made?
[07:48:57] apeiros: do you seriously expect a definite answer to that?
[07:49:20] shevy: curtis___ problem is, how do you count complexity?
[07:49:27] edwinvdgraaf: has joined #ruby
[07:49:31] ex0ns: One of the biggest ruby app I know is metasploit
[07:49:45] shevy: but is it also the most complex one
[07:50:23] curtis___: shevy: well soemthing really complex... i don't know surprise me :)
[07:50:48] shevy: really complex hmm
[07:50:50] shevy: METASPLOIT
[07:51:04] shevy: actually, perhaps some closed source one
[07:51:04] n008f4g_: has joined #ruby
[07:51:21] apeiros: curtis___: our largest app is probably >200KLoC. I doubt it's even coming close to being the most complex ruby app ever. Does that help you?
[07:51:26] ddv: metasploit is a mess
[07:51:47] curtis___: how does one manage 200k lines?
[07:51:55] ex0ns: He does not
[07:51:57] curtis___: and how does one make sense of 200k lines
[07:52:08] ddv: well you have to be genius like me, curtis___
[07:52:17] bosma: has joined #ruby
[07:52:21] apeiros: make sense of 200kLoC: you usually don't need to. you build blocks which are built from blocks.
[07:52:26] apeiros: you dive in when necessary.
[07:52:27] ljarvis: that's probably a medium to large size app.. it's not even insane
[07:52:44] apeiros: encapsulation helps
[07:52:45] ljarvis: our largest one is probably about the same (closer to 300k I think)
[07:52:57] ljarvis: doesn't *feel* that big
[07:53:17] HotCoder: has joined #ruby
[07:53:17] pengin: has joined #ruby
[07:53:19] apeiros: I wished business allowed us an extensive period to clean up, though. we could probably slim it down by ~25-35% and make a couple of places more sane, less strongly coupled.
[07:53:23] curtis___: how the hell do you read it?
[07:53:30] ljarvis: with a text editor
[07:53:40] sinkensabe: has joined #ruby
[07:53:52] ljarvis: but seriously, if you code is organised well it's quite simple
[07:54:13] apeiros: the recipe to scale is organisation
[07:54:16] apeiros: conventions help a lot
[07:54:30] apeiros: adhering to guidelines too
[07:54:30] charliesome: has joined #ruby
[07:54:45] adaedra: I wish everyone believed in that
[07:54:45] apeiros: simple things like "you'll always find Foo::BarBaz class in foo/bar_baz.rb"
[07:55:21] apeiros: discoverable code helps too. explicit code may be a bit more verbose but it's easier to reason about.
[07:56:07] ljarvis: yeah, I can get around our entire app using command-t fuzzy finding, it's very rare I can't find something
[07:56:09] curtis___: code should have esoteric variable names that only you and other dedicated programmers can decipher
[07:56:10] apeiros: and make sure everybody in the team knows the implicits and/or how to discover implicits.
[07:56:30] apeiros: curtis___: that's a job security device which IMO only bad coders need :-p
[07:56:34] shevy: curtis___ the local technical university of vienna uses rails for student pages: http://shevegen.square7.ch/screenshot.png
[07:57:31] curtis___: apeiros: i was being sarcasting if you're working with a team or someone else and they hire another coder you will quickly be found out and your reputation will forever be tarnished
[07:58:01] hewenhong: has joined #ruby
[07:58:06] edwinvdgraaf: has joined #ruby
[07:58:20] mikecmpbll: has joined #ruby
[07:58:25] apeiros: curtis___: if only
[07:58:37] ljarvis: new devs definitely should be prepared to adapt to the way something is already organised. You just gotta hope someone sane organised it in the first place
[07:58:43] curtis___: apeiros: i found out bad coders and i fired them :)
[07:58:49] curtis___: it also helps to know how to code
[07:58:54] ljarvis: curtis___: and you're here recruiting?
[07:59:04] apeiros: there are too many who'll see obscure code and think "OMIGOSH! I can't comprehend! This coder must really know their stuff!!!"
[07:59:06] michael_mbp: has joined #ruby
[07:59:09] curtis___: i don't recruit online
[07:59:10] ziprar: has joined #ruby
[07:59:15] ljarvis: "curtis__> but yeah i am looking for people that are passionate rails developers"
[07:59:29] ljarvis: apeiros: fucking aye!
[07:59:30] curtis___: only people that are in the arizona area
[07:59:39] adaedra: too far away.
[07:59:40] ljarvis: oh so you are recruiting
[07:59:57] curtis___: that doesn't count as recruiting
[08:00:10] ljarvis: unless they're in Arizona?
[08:00:12] EvanGuru: help I broke my influxdb
[08:00:20] EvanGuru: oh dear this is freenode
[08:00:33] shevy: we fix things you never knew about
[08:01:11] adaedra: There are things we can't fix though, like shevy
[08:01:19] shevy: we fix them
[08:01:27] zcreative: has joined #ruby
[08:01:59] codeFiend: has joined #ruby
[08:02:20] edwinvdg_: has joined #ruby
[08:02:34] curtis___: has left #ruby: ()
[08:02:41] curtis___: has joined #ruby
[08:02:47] curtis___: whoops i closed the tab :(
[08:02:59] joonty: has joined #ruby
[08:03:11] idafyaid: has joined #ruby
[08:03:13] idafyaid: has joined #ruby
[08:03:19] shevy: way to try and get rid of ljarvis!!!
[08:03:26] Hounddog: has joined #ruby
[08:05:56] adaedra: "Rhino is an open-source implementation of JavaScript written entirely in Java" ??? "C++ 55.9%" ??_o
[08:06:00] cubesandcode: has joined #ruby
[08:06:39] CloCkWeRX: has joined #ruby
[08:06:42] shevy: are you saying
[08:06:45] shevy: it is not written in java
[08:07:16] kies: has joined #ruby
[08:07:17] adaedra: But when you click C++, it disappears from the language list
[08:07:28] adaedra: GitHub being silly, I'd say
[08:07:37] curtis___: github is written in coffeescript
[08:07:45] shevy: http://adambard.com/blog/top-github-languages-for-2013-so-far/
[08:07:49] shevy: ruby came in second in 2013
[08:08:19] EvanGuru: shevy, JS is probably because node is thrown in there
[08:08:51] krz: has joined #ruby
[08:08:54] shevy: http://githut.info/
[08:09:01] ahmetkapikiran: has joined #ruby
[08:09:07] shevy: ruby comes in 6th now??
[08:10:17] curtis___: css is not a langauge
[08:11:18] curtis___: so html is a language too then
[08:11:27] tobiasvl: the L stands for Language
[08:11:28] curtis___: but html isn't a language
[08:11:42] tobiasvl: HTML = HyperText Markup Language
[08:11:47] shevy: has joined #ruby
[08:11:51] ljarvis: as tobiasvl points out, the name even states it
[08:11:51] curtis___: you can't do equations and algorithms with html
[08:11:58] canton7: it's a markup langauge
[08:12:00] ljarvis: that doesn't make it not a language
[08:12:01] canton7: not a programming language
[08:12:11] curtis___: github is for programmers
[08:12:28] ljarvis: github is for git
[08:12:41] shevy: it's for hubs!
[08:12:47] EvanGuru: (in which the demographic is programmers)
[08:12:51] EvanGuru: thus its for programmers
[08:12:57] ljarvis: what you check into git is up to you
[08:13:36] tobiasvl: people use github for all kinds of things
[08:13:41] tobiasvl: http://jonkuperman.com/interesting-github-uses/
[08:14:23] ndrei: has joined #ruby
[08:14:40] granthatcher: has joined #ruby
[08:14:48] shevy: 3. Personal Email
[08:14:51] shevy: great idea :D
[08:14:58] fabrice31: has joined #ruby
[08:16:51] slackbotgz: has joined #ruby
[08:17:03] Macaveli: has joined #ruby
[08:17:50] haxrbyte: has joined #ruby
[08:20:53] sevenseacat: #6 is pretty obvious, I thought
[08:21:01] oddmunds: i know a guy who has a script that backs up his home directory to github every day
[08:21:02] HotCoder: has joined #ruby
[08:21:40] Takle: has joined #ruby
[08:21:43] ljarvis: I back up lots of stuff onto bitbucket
[08:22:20] forgot: entire home directory?
[08:22:23] oddmunds: forgot: yeah
[08:22:50] marr: has joined #ruby
[08:23:16] forgot: im sure he excluded ssh and gpg stuff
[08:23:16] Zai00: has joined #ruby
[08:23:20] shevy: oddmunds every day?
[08:23:23] oddmunds: it might be just a folder he drops stuff in
[08:23:36] apeiros: dunno, I use github for #0
[08:23:42] oddmunds: seems like he stopped a couple of weeks ago https://github.com/tommyettinger/home/commits/gh-pages
[08:23:42] queequeg1: has joined #ruby
[08:23:43] shevy: what is #0
[08:23:53] apeiros: online code repository
[08:24:00] shevy: https://github.com/tommyettinger/home
[08:24:05] sevenseacat: I've seen it used for #2, #4, #5, and #6
[08:24:05] shevy: "Home is where the files get dropped."
[08:24:11] forgot: isn't dropbox more appropriate?
[08:24:13] sevenseacat: 1 and 3 seem bizarre
[08:24:35] ixti: has joined #ruby
[08:24:38] ddv: you don't want .git on dropbox, trust me
[08:24:40] shevy: people are weird so they do weird things
[08:24:50] lordkryss: has joined #ruby
[08:24:58] forgot: ddv: what's wrong with it?
[08:25:17] oddmunds: shevy: yeah, doodle sounds better for guest lists, but if you want to be "tech cool" maybe Github is the way to go
[08:25:19] ddv: forgot: jus try and you will see
[08:25:31] forgot: ddv: no problem so far
[08:25:43] ddv: forgot: really? it always seems to corrupt/change my git repos
[08:25:45] einarj: has joined #ruby
[08:26:01] User458764: has joined #ruby
[08:26:15] forgot: ddv: why would dropbox change any of your files?
[08:27:05] oddmunds: i've used github to manage a band i'm in
[08:27:15] ddv: forgot: no idea
[08:27:42] shevy: see? people are weird :)
[08:28:02] shevy: dudedudeman you were too lazying it up to have a github repo right?
[08:29:01] commondream: has joined #ruby
[08:29:20] zarubin_: has joined #ruby
[08:30:46] nhhagen: has joined #ruby
[08:30:54] queequeg1: has joined #ruby
[08:31:47] selu: has joined #ruby
[08:33:49] User458764: has joined #ruby
[08:39:23] Zai00: has joined #ruby
[08:39:55] GriffinHeart: has joined #ruby
[08:42:36] mrsolo: has joined #ruby
[08:43:45] djbkd: has joined #ruby
[08:45:43] msgodf: has joined #ruby
[08:48:51] c0m0: has joined #ruby
[08:50:01] arup_r: has joined #ruby
[08:50:48] wookiehangover: has joined #ruby
[08:52:47] Spami_: has joined #ruby
[08:53:47] hewenhong: has joined #ruby
[08:53:47] pengin: has joined #ruby
[08:54:00] GriffinHeart: has joined #ruby
[08:55:11] hewenhong: has joined #ruby
[08:55:30] OrbitalKitten: has joined #ruby
[08:57:23] bigkevmcd: has joined #ruby
[08:58:10] fabrice31_: has joined #ruby
[08:58:24] Akagi201: has joined #ruby
[08:59:53] meph: has joined #ruby
[09:00:38] ndrei: has joined #ruby
[09:01:09] platzhirsch: has joined #ruby
[09:01:17] Igorshp: has joined #ruby
[09:01:24] edwinvdgraaf: has joined #ruby
[09:01:33] dumdedum: has joined #ruby
[09:01:54] kp666: has joined #ruby
[09:03:38] OrbitalKitten: has joined #ruby
[09:05:06] edwinvdg_: has joined #ruby
[09:05:55] givello: has joined #ruby
[09:06:58] Zai00: has joined #ruby
[09:07:02] yh: has joined #ruby
[09:07:31] fabrice31: has joined #ruby
[09:07:46] senayar: has joined #ruby
[09:07:46] senayar: has joined #ruby
[09:08:03] Yzguy: has joined #ruby
[09:08:11] RegulationD: has joined #ruby
[09:08:14] forgot: how to find out unused gems installed globally?
[09:08:27] givello: Hey there, I'm kind of starting with ruby, and I'd like to know if the following https://gist.github.com/anonymous/341b3fce3bf10be5840a looks good or if it should/could be done a better way
[09:11:20] rdark: has joined #ruby
[09:13:23] _blizzy_: has joined #ruby
[09:14:47] gregf_: givello: are you trying to dedupe a string?
[09:15:17] forgot: givello: how about data_string.chars.to_set?
[09:15:35] forgot: givello: require 'set' on top of it
[09:15:51] gregf_: >> ("ab" * 10).split(//).inject([]){ |arr, c| arr.include?(c) ? arr : arr << c }
[09:15:52] ruboto: gregf_ # => ["a", "b"] (https://eval.in/372361)
[09:16:03] gregf_: yeah a set removes dupes
[09:16:45] rafadc: has joined #ruby
[09:17:26] givello: I guess I should have been more precise, I've got a string in the form "a < 3 + b\n c >= a + b - 4\n" and I want ["a", "b", "c"] from it
[09:17:34] shevy: forgot how do you define "unused"?
[09:18:32] forgot: shevy: not used by any other gem, dangling
[09:18:40] konsolebox: has joined #ruby
[09:18:42] givello: Trying to see if what you said applies to me though :p
[09:19:05] givello: I should probably use inject, indeed
[09:19:09] shevy: forgot aha. I think hanmac wrote an analyzer
[09:19:14] ljarvis: >> "a < 3 + b\n c >= a + b - 4\n".scan(/[a-z]/).uniq
[09:19:15] ruboto: ljarvis # => ["a", "b", "c"] (https://eval.in/372364)
[09:19:17] ljarvis: givello: ^
[09:19:34] GriffinHeart: has joined #ruby
[09:19:40] givello: ljarvis: well, here we go. Thank you very much!
[09:20:02] ljarvis: this will only support single characters, but that seems to be what you want
[09:20:08] givello: Kind of having trouble finding the right method for the job
[09:20:17] givello: ljarvis: right, and I guess I just need to change the regex
[09:20:22] ljarvis: ruby gives you lots of choices :)
[09:20:24] givello: ljarvis: if I ever get multichars variables
[09:20:38] ljarvis: just [a-z]+
[09:20:38] forgot: does uniq require sorting?
[09:20:57] ljarvis: >> %w(b c d a b).uniq
[09:20:58] ruboto: ljarvis # => ["b", "c", "d", "a"] (https://eval.in/372365)
[09:21:26] keen___________2: has joined #ruby
[09:21:27] givello: it's a bit different from bash uniq then
[09:21:48] gregf_: >>require "set";p Set.new(("a < 3 + b\n c >= a + b - 4\n").scan(/[a-zA-Z]+/)).to_a.join()
[09:21:49] ruboto: gregf_ # => "abc" ...check link for more (https://eval.in/372366)
[09:22:25] shevy: who uses bash scripts anyway
[09:22:47] charliesome: has joined #ruby
[09:23:36] forgot: uniq is an unix utility, not a bash builtin
[09:24:33] givello: forgot: right, my bad
[09:26:15] sevensea_: has joined #ruby
[09:26:36] jhass: al2o3-cr: looks good
[09:27:18] yeticry: has joined #ruby
[09:28:04] jenrzzz: has joined #ruby
[09:28:06] senayar: has joined #ruby
[09:28:06] senayar: has joined #ruby
[09:28:42] jhass: al2o3-cr: re. "is this safe?"
[09:28:57] al2o3-cr: jhass: ah, ok cheers jhass :)
[09:29:26] quimrstorres: has joined #ruby
[09:29:28] juni0r: has joined #ruby
[09:29:59] gaboesquivel: has joined #ruby
[09:31:51] mello: has joined #ruby
[09:34:19] Musashi007: has joined #ruby
[09:35:26] proxima: has joined #ruby
[09:35:31] doublemalt__: has joined #ruby
[09:36:34] proxima: I need to edit/modify the template pages of shopify store by making an app instead of directly editing them.. So, how can I access the templates?
[09:37:05] dorei: has joined #ruby
[09:37:16] lessless: has joined #ruby
[09:39:10] quimrstorres: has joined #ruby
[09:39:26] lkba: has joined #ruby
[09:40:41] ndrei: has joined #ruby
[09:40:42] sevenseacat: i'm not sure what that even means.
[09:41:18] haxrbyte_: has joined #ruby
[09:41:26] subraminion: has joined #ruby
[09:45:07] antgel: has joined #ruby
[09:45:56] Oog: has joined #ruby
[09:47:50] bruno-: has joined #ruby
[09:49:57] leafybasil: has joined #ruby
[09:50:24] tomphp: has joined #ruby
[09:50:36] garyserj: has joined #ruby
[09:54:00] GriffinHeart: has joined #ruby
[09:54:18] pengin: has joined #ruby
[09:55:20] gagrio: has joined #ruby
[09:56:03] mikecmpbll: eh, this feels like a stupid question, but is there a general preference between class SomeClass; def self.foo; ..; end; end, and module SomeModule; def self.foo; ...; end; end
[09:56:19] mikecmpbll: as in, class vs a module for just a collection of methods with no initialization.
[09:56:59] mikecmpbll: or are both code smell? :)
[09:58:31] jhass: mikecmpbll: I use a module instead of a class if I don't need the ability of a class to create new objects
[09:58:40] Mon_Ouie: Use module and module_function instead; def foo of def self.foo
[09:58:52] mikecmpbll: ACTION googles module_function
[09:58:54] jhass: oh and +1 ^
[09:58:57] anisha: has joined #ruby
[09:59:12] Mon_Ouie: Which is the way that, e.g. Math works and allows you to do both Math.sin(x) and include Math; sin(x)
[09:59:27] mikecmpbll: Mon_Ouie: very neat.
[09:59:32] mclee: has joined #ruby
[10:00:22] lkba_: has joined #ruby
[10:03:08] quimrsto_: has joined #ruby
[10:04:00] al2o3-cr: Mon_Ouie: could you give an example how you would use module_function like Math?
[10:04:07] ndrei: has joined #ruby
[10:04:56] Mon_Ouie: module Math; module_function; def sin(x); ???; end; end
[10:05:12] Mon_Ouie: Or alternatively, def sin(x); ???; end then module_function :sin
[10:05:24] chipotle: has joined #ruby
[10:06:01] al2o3-cr: Mon_Ouie: oh, cheers always wondered how Math did it thanks :)
[10:07:14] sdothum: has joined #ruby
[10:07:25] al2o3-cr: Mon_Ouie: awesome thanks :)
[10:08:15] tomphp: has joined #ruby
[10:09:23] ahmetkapikiran: has joined #ruby
[10:11:46] denver: has joined #ruby
[10:12:42] mujou: has joined #ruby
[10:13:08] SebastianThorn: how to trim what looks like spaces, but are not?
[10:13:38] SebastianThorn: https://eval.in/372374
[10:14:19] Mon_Ouie: Is it matched by /[[:space:]]/?
[10:14:23] nateberkopec: has joined #ruby
[10:15:37] Oog: has joined #ruby
[10:15:52] gregf_: SebastianThorn: you only need [^\s]+
[10:16:10] adaedra: I'm trying to setup sprockets in a pure rack application, but it doesn't seems to serve less assets
[10:16:12] adaedra: https://gist.github.com/adaedra/7954da15648d4fcd0ede
[10:16:15] pengin: has joined #ruby
[10:16:21] mello: has joined #ruby
[10:17:08] adaedra: if I have a file css/style.css and GET /assets/style.css, it works. If I had the .less extension to the file, it doesn't.
[10:17:21] al2o3-cr: won't String#strip just do it
[10:17:22] gregf_: >>class String; def trim; self[/[^\s]+/];end;end; p " +46702696905 ".trim;
[10:17:24] ruboto: gregf_ # => "+46702696905" ...check link for more (https://eval.in/372376)
[10:17:43] gregf_: SebastianThorn: ^^
[10:17:46] Mon_Ouie: gregf_: I tried matching his string with, \s, it doesn't work
[10:17:54] Mon_Ouie: https://eval.in/372374
[10:18:25] al2o3-cr: >> " +46702696905 ".strip
[10:18:26] ruboto: al2o3-cr # => "+46702696905" (https://eval.in/372378)
[10:18:44] Mon_Ouie: You probably copy-pasted in such a way that the actual characters he used were changed to other characters
[10:18:59] gregf_: Mon_Ouie: prolly :/
[10:19:17] n008f4g_: has joined #ruby
[10:19:50] SebastianThorn: ye, it's an imported list, 9k rows as CSV, and M$ exel made a mess..
[10:20:25] rickmasta: has joined #ruby
[10:20:51] bruno-: has joined #ruby
[10:21:23] sigurding: has joined #ruby
[10:22:49] sandelius: has joined #ruby
[10:23:49] User458764: has joined #ruby
[10:28:54] SebastianThorn: >> " +46702696905?????????????????? ".each_char {|x|puts x.ord}
[10:28:56] ruboto: SebastianThorn # => 32 ...check link for more (https://eval.in/372381)
[10:29:14] SebastianThorn: 32 = normal space, 160 = Non-breaking space
[10:30:03] zarubin_: has joined #ruby
[10:30:35] zotherstupidguy: has joined #ruby
[10:30:54] nfk: has joined #ruby
[10:32:04] al2o3-cr: >> " +46702696905?????????????????? ".bytes
[10:32:05] ruboto: al2o3-cr # => [32, 43, 52, 54, 55, 48, 50, 54, 57, 54, 57, 48, 53, 194, 160, 194, 160, 194, 160, 194, 160, 194, 16 ...check link for more (https://eval.in/372382)
[10:32:46] Exponential: has joined #ruby
[10:32:47] SebastianThorn: al2o3-cr: ,bytes, ty
[10:38:27] goodcodeguy: has joined #ruby
[10:39:14] al2o3-cr: >> " +46702696905?????????????????? ".gsub(/\W/,"")
[10:39:15] ruboto: al2o3-cr # => "46702696905" (https://eval.in/372387)
[10:39:24] al2o3-cr: oops thats not right
[10:40:35] apeiros: >> s = [160, 65, 160].pack("U*").encode("utf-8"); s
[10:40:36] ruboto: apeiros # => "??A??" (https://eval.in/372388)
[10:40:44] apeiros: >> s = [160, 65, 160].pack("U*").encode("utf-8"); s.gsub(/\A\p{whitespace}*|\p{whitespace}*\z/, '')
[10:40:45] ruboto: apeiros # => "A" (https://eval.in/372389)
[10:41:04] apeiros: strip for all unicode chars classified as whitespace
[10:41:15] apeiros: probably should use + instead of *
[10:42:11] tvw: has joined #ruby
[10:42:41] senayar: has joined #ruby
[10:42:41] senayar: has joined #ruby
[10:43:29] al2o3-cr: >> " +46702696905?????????????????? ".unpack('A*').first.gsub(/#{0xA0.chr}/, "").gsub(/#{0xC2.chr}/,"").strip
[10:43:29] ruboto: al2o3-cr # => "+46702696905" (https://eval.in/372390)
[10:43:39] al2o3-cr: but there a better way surely
[10:43:52] quimrstorres: has joined #ruby
[10:44:16] cubesandcode: has joined #ruby
[10:44:28] dorei: >> " +46702696905?????????????????? ".gsub(/[[:space:]]/,'')
[10:44:29] ruboto: dorei # => "+46702696905" (https://eval.in/372391)
[10:44:49] apeiros: al2o3-cr: /#{0xA0.chr}/ <-- huh? why so verbose?
[10:45:20] apeiros: 0xA0.chr is just \xA0, so /#{0xA0.chr}/ --> /\xA0/
[10:45:33] al2o3-cr: apeiros: i don't know of not been sleep ;p
[10:46:05] adaedra: Is that a real phone number
[10:46:11] apeiros: and you can put those two gsubs into a single gsub: .gsub(/\xa0|\xc2/, "")
[10:46:30] Oog: has joined #ruby
[10:46:36] apeiros: adaedra: quick, call it
[10:46:50] ljarvis: hello this is dog
[10:46:53] al2o3-cr: >> " +46702696905?????????????????? ".unpack('A*').first.gsub(/\xa0|\xc2/, "")
[10:46:54] ruboto: al2o3-cr # => /tmp/execpad-a4ed17c19f5e/source-a4ed17c19f5e:2: invalid multibyte escape: /\xa0|\xc2/ (https://eval.in/372393)
[10:47:11] adaedra: international call :(
[10:47:41] dorei: al2o3-cr: [[:space:]] in regex will match all kind of whitespace and save you from this trouble ;-)
[10:47:55] al2o3-cr: dorei: scroll back up :)
[10:48:22] dorei: al2o3-cr: it's different from \s
[10:48:45] al2o3-cr: >> " +46702696905?????????????????? ".unpack('A*').first.gsub(/#{0xA0.chr}|#{0xC2}.chr}/, "").strip
[10:48:46] ruboto: al2o3-cr # => "+46702696905\xC2\xC2\xC2\xC2\xC2\xC2\xC2\xC2\xC2" (https://eval.in/372394)
[10:49:15] al2o3-cr: ah sack i can;t think
[10:49:19] dorei: al2o3-cr: so, why dont u use [[:space:]] ?
[10:50:46] DEA7TH: has joined #ruby
[10:52:11] ahmetkapikiran: has joined #ruby
[10:52:20] apeiros: dorei: [[:space::]] does not match it
[10:52:28] apeiros: dorei: however, as I demonstrated, \p{whitespace} does
[10:52:32] withnale_: has joined #ruby
[10:52:38] al2o3-cr: dorei: yeah, i don't know why i didn't thinko that before
[10:52:45] apeiros: >> s = [160, 65, 160].pack("U*").encode("utf-8"); s.gsub(/\A\p{whitespace}*|\p{whitespace}*\z/, '')
[10:52:46] ruboto: apeiros # => "A" (https://eval.in/372396)
[10:53:00] apeiros: >> s = [160, 65, 160].pack("U*").encode("utf-8"); s.gsub(/\A[[:space:]]*|[[:space:]]*\z/, '')
[10:53:01] ruboto: apeiros # => "A" (https://eval.in/372398)
[10:53:08] krz: how can i do the following (pseudo code): Redis::Namespace.new(:"{#Rails.env}", redis: redis_connection)
[10:53:13] apeiros: oh, I typoed when I tried
[10:53:25] apeiros: ok, so [[:space:]] works the same as \p{whitespace} :)
[10:53:25] krz: im referring to the symbol (first arg in Redis::Namespace.new
[10:53:38] krz: i.e. :"{#Rails.env}"
[10:53:48] krz: ah crap
[10:54:20] dorei: apeiros: it matches it, no?
[10:54:29] krz: there was a typo. i thought it would work with :"#{Rails.env}", but no
[10:54:30] al2o3-cr: dorei: for SebastianThorn
[10:54:35] apeiros: dorei: yes. as said, I typoed when I tried in my pry
[10:54:38] krz: do i need to use send or something?
[10:54:57] apeiros: krz: Rails.env.to_sym IMO. but yours works too.
[10:55:03] apeiros: >> :"#{"string"}"
[10:55:04] ruboto: apeiros # => :string (https://eval.in/372407)
[10:55:18] al2o3-cr: if theres a long way round, i'll find it ;p
[10:56:11] krz: apeiros: i like yours better
[10:57:01] RegulationD: has joined #ruby
[10:58:51] rodfersou: has joined #ruby
[10:59:24] quimrstorres: has joined #ruby
[10:59:25] garyserj: anybody here use brightbox on ubuntu?
[11:02:30] edwinvdgraaf: has joined #ruby
[11:02:43] workmad3: has joined #ruby
[11:04:05] gregf_: dorei: i would expect '\s' to match '[[:space:]]'
[11:05:00] gregf_: i just tried this
[11:05:05] gregf_: >>[ Regexp.new(/\s+/), Regexp.new(/[[:space:]]+/) ].each { |r| spaces = " foo \n bar \r".scan(r); p %|#{spaces.join("-")}| }
[11:05:06] ruboto: gregf_ # => " - \n - \r" ...check link for more (https://eval.in/372425)
[11:06:37] quimrstorres: has joined #ruby
[11:06:47] ndrei: has joined #ruby
[11:07:05] Papierkorb: has joined #ruby
[11:07:45] edwinvdg_: has joined #ruby
[11:08:12] User458764: has joined #ruby
[11:09:08] edwinvdg_: has joined #ruby
[11:09:34] SebastianThorn: might it just be an issue with how i read the file?
[11:10:03] User458764: has joined #ruby
[11:10:18] User458764: has joined #ruby
[11:11:10] fabrice31: has joined #ruby
[11:15:06] tomaszbalon: has joined #ruby
[11:15:45] vire: has joined #ruby
[11:17:54] timonv: has joined #ruby
[11:20:45] jhass: ?anyone garyserj
[11:20:45] ruboto: garyserj, Just ask your question, if anyone has, they will respond.
[11:21:12] ramsub07: has joined #ruby
[11:21:25] tagrudev: has joined #ruby
[11:21:52] mgorbach: has joined #ruby
[11:22:06] apeiros: gregf_: Regexp.new(/\s+/) is pointless
[11:22:09] apeiros: just /\s+/
[11:22:44] adaedra: grmbl, rubydoc.info is failing
[11:22:45] CloCkWeRX: has left #ruby: ()
[11:22:55] jhass: maybe we want that extra object, so ruby doesn't get bored?
[11:24:21] adaedra: RegexpFactory.new.createRegexp(StringFactory.new.createString("\s+"))
[11:25:20] adaedra: derp, wrong case.
[11:26:41] jhass: new Class.new(AbstractRRegexpFactory) { def regexp; new Class(AbstractStringFactory).new { def string; "\s+"; end; }.new.build_string; end; }.new.build_regexp
[11:26:44] jhass: pff, amateurs
[11:26:56] sigurding: has joined #ruby
[11:28:04] apeiros: Errno::ENOTENOUGHLOC
[11:28:27] adaedra: Errno::ESTILLREADABLE
[11:28:32] apeiros: Also::Uses::Far::Too::Little::Namespacing
[11:29:16] jhass: I'm sorry, I also forgot to make them singletons
[11:29:45] Caius: has joined #ruby
[11:30:05] apeiros: and you have no final abstract classes!
[11:31:43] stef204: has joined #ruby
[11:33:00] dorei: i have something like this: xy= nil; [1, 2, 3, 5, xy, 6].map(&:succ), is there way to find the "index" of the item that caused the exception?
[11:33:12] hewenhong: has joined #ruby
[11:33:21] jhass: what exception?
[11:33:28] yqt: has joined #ruby
[11:33:37] dorei: >>xy= nil; [1, 2, 3, 5, xy, 6].map(&:succ)
[11:33:38] ruboto: dorei # => undefined method `succ' for nil:NilClass (NoMethodError) ...check link for more (https://eval.in/372444)
[11:33:43] FernandoBasso: has joined #ruby
[11:33:45] dorei: this exception
[11:33:48] jhass: .index(nil)
[11:34:06] dorei: it could be any kind of exception
[11:34:17] hewenhong: has joined #ruby
[11:34:57] jhass: sounds like you're too unsure about your input
[11:35:01] jhass: normalize it better
[11:35:09] jhass: e.g. by using .select
[11:36:17] dorei: maybe i should rephrase my question, i have a something.map(&b) and in order to help me debug it in case of an exception, it'd be great if i knew which item caused the exception
[11:37:29] jhass: .find {|e| begin; b.call(e); rescue; true; end; false } # debug code, not production code
[11:38:11] nateberkopec: has joined #ruby
[11:38:17] dorei: thanx, i'll give it a try :)
[11:39:00] edwinvdgraaf: has joined #ruby
[11:39:42] al2o3-cr: why does ruby allow this to concat "hello" "world"
[11:41:36] edwinvdg_: has joined #ruby
[11:42:35] serivich: has joined #ruby
[11:42:44] apeiros: al2o3-cr: ask matz?
[11:43:01] quimrstorres: has joined #ruby
[11:43:25] codecop: has joined #ruby
[11:43:29] apeiros: personally I would have made that a syntax error. I use it in ruby to spread strings over multiple lines: x = "foo" \<newline>"bar"
[11:44:56] al2o3-cr: apeiros: thnx, yes that is useful
[11:46:05] nhhagen: has joined #ruby
[11:46:21] Vendella: has joined #ruby
[11:47:02] Vendella: << class Foo; end; foo = Foo.new; puts foo
[11:47:18] jhass: apeiros: al2o3-cr isn't that inherited from C?
[11:47:26] Vendella: The memory address that's printed out is where that Foo instance is in memory?
[11:47:40] Vendella: #<Foo:0x9d069d0>
[11:47:41] apeiros: jhass: may well be inherited by some language. as long as it doesn't do trigraphs???
[11:47:53] apeiros: Vendella: don't assume that
[11:47:59] jhass: iirc C does that so you can compose stuff with macros
[11:48:04] apeiros: Vendella: whether that is a memory address or not is an implementation detail
[11:48:09] nhhagen_: has joined #ruby
[11:48:17] Vendella: But it's something like that right?
[11:48:26] apeiros: Vendella: e.g. it certainly won't be one in jruby
[11:48:38] adaedra: >> "Hello" "World"
[11:48:39] ruboto: adaedra # => "HelloWorld" (https://eval.in/372448)
[11:48:58] kp666: has joined #ruby
[11:49:03] Vendella: Do I need to know C good to be good at Ruby?
[11:49:05] al2o3-cr: jhass: oh, nice always wonder where/why :)
[11:49:09] apeiros: Vendella: it is related to the object_id, which is an at-the-time unique number. it may get reused during runtime.
[11:49:18] apeiros: Vendella: no. you don't need C.
[11:49:33] apeiros: but there are cases where it helps
[11:49:39] Vendella: I'm coming from C, but I don't master it.
[11:49:56] jhass: don't worry, you can go a very long way without any C at all
[11:50:03] jhass: a veery long way
[11:50:09] apeiros: ACTION still wonders why inspect doesn't use the object_id straight there???
[11:50:25] Vendella: I'm aiming to get into Rails also.
[11:50:40] jhass: doesn't change anything
[11:51:21] Vendella: I also wonder, how much Ruby should I learn before I actually jump into Rails. I'm halfway of this Eloquent book right now.
[11:51:37] SalexW_: has joined #ruby
[11:51:48] pengin: has joined #ruby
[11:52:38] jhass: that's probably good enough
[11:53:06] jhass: if you can tell apart what's rails magic and what's ruby magic, you're better than 60% of the people new to rails
[11:53:10] Vendella: Sometimes I have to Google things up but yea it's good.
[11:53:17] sevenseacat: enough to understand the syntax, to know that rails isnt doing 'magic'.
[11:53:45] apeiros: Vendella: IMO when you have a solid grasp of the object model, method lookup and core libs.
[11:53:59] Vendella: apeiros, I have previous OOP experience.
[11:54:01] apeiros: Vendella: but there's people who started rails first - so you'll survive eitherway
[11:54:12] sevenseacat: ACTION is one of those people
[11:54:18] apeiros: Vendella: yeah, OOP experience != understanding ruby's object model, though ;-)
[11:54:18] jhass: ACTION pretty much too
[11:54:32] sevenseacat: and i still look shit up daily.
[11:54:32] ljarvis: also, you'll still be googling stuff when you're an expert
[11:54:55] jhass: sure, the only thing that changes is that you get better at what terms to google
[11:55:03] ljarvis: yep absolutely
[11:55:17] nateberkopec: has joined #ruby
[11:56:06] jhass: for most stuff I don't remember how it works or how to use it, I remember that there's something like it and perhaps how to look it up
[11:56:18] shevy: you guys have such a weak brain
[11:56:54] iamninja: has joined #ruby
[11:56:55] nettoweb: has joined #ruby
[11:57:01] sevenseacat: sorry, shevy?
[11:57:25] shevy: jhass wrote he does not remember how things work!
[11:57:36] jhass: sevenseacat: only we guys, you're fine
[11:57:45] apeiros: sevenseacat's shevy filter isn't properly adjusted yet :D
[11:57:46] shevy: yeah cats have a great memory
[11:57:56] ljarvis: I'm pleased that my brain doesn't store everything I can easily google. That's incredibly inefficient
[11:57:58] ahmetkapikiran: has joined #ruby
[11:58:12] bayed: has joined #ruby
[11:58:16] Hanmac1: has joined #ruby
[11:58:28] Hanmac1: shevy look at this ticket ;P https://bugs.ruby-lang.org/issues/11197
[11:58:29] ljarvis: now I have space for deciding what to watch next on netflix
[11:58:32] sevenseacat: my brain is currently too occupied playing clicker heroes when it should be writing
[11:59:01] shevy: hanmac1 Unicode madness
[11:59:13] al2o3-cr: str = "foobar"; str.object_id << 1 # so this gives you memory location of that object?
[11:59:15] shevy: although I have to say, coding in hieroglyphs is pretty cool
[11:59:21] ldnunes: has joined #ruby
[11:59:39] shevy: I don't even know what is clicker heroes but the name alone sounds stressful
[11:59:50] apeiros: al2o3-cr: in MRI, it's iirc the pointer value, yes
[12:00:01] apeiros: the object_id itself is
[12:00:14] apeiros: or??? actually might be that the shifted id is
[12:00:48] Hanmac1: shevy hm interesting is that unicode doesnt have a char for a unicorn yet ;P
[12:00:49] apeiros: `$ Object#object_id` in pry is revealing ;-)
[12:01:03] griffindy: has joined #ruby
[12:01:05] al2o3-cr: apeiros: oh, lets check :)
[12:01:05] shevy: hanmac1 well it has a snowman. I am sure it'll have a unicorn eventually
[12:01:10] grn: has joined #ruby
[12:01:50] ljarvis: i really need to find some time for oss projects :( they are suffering
[12:02:16] shevy: ljarvis quit work!
[12:02:33] grn: Hi! I have a class Klass with a prepended module Mod. There are methods Klass#foo and Mod#foo and Mod#foo calls super. If klass = Klass.new, how can I call Klass#foo without calling Mod#foo? In other words how can I skip a prepend module's method?
[12:04:04] shevy: now that's a tough cookie
[12:05:42] nettoweb: has joined #ruby
[12:06:20] bronson: has joined #ruby
[12:06:22] mase-chatter: has joined #ruby
[12:08:05] Scripore: has joined #ruby
[12:08:53] shevy: so you want to call a method on your class but not the method on a module
[12:09:10] shevy: isn't it so that when you include a module, that one overwrites other methods anyway?
[12:09:31] edwinvdgraaf: has joined #ruby
[12:11:18] ljarvis: grn: huh? if it's prepended then your method defined on the class will override the one defined in the module
[12:11:33] ljarvis: so Klass.new.foo won't call Mod#foo
[12:11:50] pengin: has joined #ruby
[12:11:52] ljarvis: oh ignore me
[12:12:17] ljarvis: grn: use include or use a method alias
[12:13:09] davedev24_: has joined #ruby
[12:14:59] goodcodeguy: has joined #ruby
[12:15:00] al2o3-cr: >> obj = Class.new; [obj, sprintf("%x", obj.object_id << 1)]
[12:15:01] ruboto: al2o3-cr # => [#<Class:0x41e8e090>, "41e8e090"] (https://eval.in/372452)
[12:15:17] sgambino: has joined #ruby
[12:15:17] al2o3-cr: yep keep reading having lot of fun
[12:15:21] edwinvdg_: has joined #ruby
[12:16:39] juanca_: has joined #ruby
[12:17:09] manzo: has joined #ruby
[12:18:31] mrchris: has joined #ruby
[12:19:43] ndrei: has joined #ruby
[12:20:53] gregf: has joined #ruby
[12:21:29] grn: has joined #ruby
[12:21:57] but3k4: has joined #ruby
[12:25:10] decoponio: has joined #ruby
[12:25:40] grn: ljarvis: the previous version of the code used #alias_method but prepending seemed to be more elegant. I hoped there's some way around it. I hoped that UnboundMethod#bind can be used to achive that or a similar mechanism.
[12:28:07] krz: has joined #ruby
[12:30:30] quimrstorres: has joined #ruby
[12:30:43] zarubin_: has joined #ruby
[12:31:32] Vendella: A class can only have one metaclass?
[12:31:54] xxneolithicxx: has joined #ruby
[12:32:21] sandelius: has joined #ruby
[12:36:01] Igorshp: has joined #ruby
[12:36:29] xcesariox: has joined #ruby
[12:36:49] goodcodeguy: has joined #ruby
[12:37:39] apeiros: Vendella: by metaclass, do you mean singleton_class? and yes, an object has precisely one singleton_class.
[12:37:48] Vendella: apeiros, Yes.
[12:37:58] vikaton: has joined #ruby
[12:38:02] apeiros: some objects are exempt and can't have one. numerics, symbols, true, false, nil f.ex.
[12:38:37] vikaton: >> {:a => "a}[:a]
[12:38:38] ruboto: vikaton # => /tmp/execpad-64ecb13b04a5/source-64ecb13b04a5:5: syntax error, unexpected tGVAR, expecting '}' ...check link for more (https://eval.in/372467)
[12:38:50] juanca_: has joined #ruby
[12:38:58] vikaton: >> k = {:a => "a}; k[:a]
[12:38:59] ruboto: vikaton # => /tmp/execpad-91d563b2bc18/source-91d563b2bc18:5: syntax error, unexpected tGVAR, expecting '}' ...check link for more (https://eval.in/372468)
[12:39:08] apeiros: it helps to close your strings ;-)
[12:39:10] vikaton: >> {:a => "a"}[:a]
[12:39:11] ruboto: vikaton # => "a" (https://eval.in/372469)
[12:39:41] fgo: has joined #ruby
[12:40:08] quimrstorres: has joined #ruby
[12:40:18] apeiros: btw., if you don't have a question associated with it, then please use your personal pry/irb.
[12:40:25] apeiros: the bot is for demonstration purposes only.
[12:40:55] tomaszbalon: has joined #ruby
[12:41:02] sevenseacat: or as I like to say, "IRC is not IRB"
[12:41:25] izzol: I have a string: "text/x-ruby; charset=us-ascii" and I want to have just "x-ruby" on the output. So far I have: string.sub!(/^\w*\//, ''), but this gives me: x-ruby; charset=us-ascii. I know that now I can execute another sub, but there is a way to do this in one sub?
[12:41:31] vikaton: What does "no implicit conversion of Symbol into Integer" usually mean I have to do?
[12:41:43] vikaton: I get that error in
[12:41:46] vikaton: https://www.irccloud.com/pastebin/b4VYkMyf
[12:41:47] ruboto: vikaton, we in #ruby do not like irccloud.com, I reposted your paste to gist for you: https://gist.github.com/d295c11503855a788a4f
[12:41:47] ruboto: irccloud.com has no syntax highlighting, distracting formatting and loads slowly for most.
[12:41:56] apeiros: vikaton: it means you're trying to use a symbol where you can't really
[12:42:01] apeiros: e.g. as an index for an array
[12:42:03] banister: has joined #ruby
[12:42:13] apeiros: (a symbol is really just a number - with an attached identifying string)
[12:42:20] vikaton: apeiros: but how do I access that symbol?
[12:42:22] dionysus69_: has joined #ruby
[12:42:30] vikaton: the value of that symbol anyway
[12:42:50] apeiros: vikaton: user will be an array of [key, value]
[12:43:00] apeiros: so user[1][:screen_name]
[12:43:09] apeiros: but don't use for
[12:43:26] apeiros: client.friends.to_h.each do |key, user| user[:screen_name] ??? end
[12:43:34] apeiros: chances are you don't even need to use .to_h
[12:43:36] al2o3-cr: izzol: "text/x-ruby; charset=us-ascii"[/\w+\/(.+);/,1]
[12:44:14] apeiros: >> "text/x-ruby; charset=us-ascii"[/[^;]*/]
[12:44:15] ruboto: apeiros # => "text/x-ruby" (https://eval.in/372475)
[12:44:55] izzol: thanks :)
[12:45:56] RegulationD: has joined #ruby
[12:46:03] mello: has joined #ruby
[12:46:52] allcentury: has joined #ruby
[12:47:31] Vendella: What will self be inside a method? I expected it to be the methods name or something.
[12:48:25] apeiros: the object on which the method was called
[12:48:36] apeiros: foo.bar # self in bar will be foo
[12:49:31] Vendella: I mean something like this
[12:49:43] Vendella: class Foo; def test; puts self; end; end;
[12:49:52] apeiros: still the same answer
[12:50:12] apeiros: with your code: `x = Foo.new; x.test`, self will be x
[12:50:30] Vendella: I get back #<Foo:0x9f3d488>
[12:50:44] Vendella: Which is what I also get when I make an object of that class
[12:50:52] grn: ljarvis: FYI, turns out it wasn't that difficult - see https://gist.github.com/grn/32113d43721435cf0e96
[12:50:53] apeiros: then you don't have the code you just showed
[12:50:57] apeiros: puts returns nil
[12:51:29] Vendella: it returns nil but it puts #<Foo:0x9f3d488>
[12:51:36] Vendella: So self is #<Foo:0x9f3d488>
[12:51:41] Vendella: That's what I mean
[12:51:45] apeiros: *I get back* means *it returns*
[12:52:16] apeiros: and yes. #<Foo:0x9f3d488> reads as "an instance of Foo"
[12:52:21] livathinos: has joined #ruby
[12:52:30] apeiros: and x is an instance of Foo (or foo, if you call your variable that)
[12:52:59] senayar: has joined #ruby
[12:53:00] senayar: has joined #ruby
[12:53:18] apeiros: you can `puts foo` after. it'll have the exact same output
[12:55:36] Vendella: Yea but why is that
[12:55:56] ismaelga: has joined #ruby
[12:55:59] apeiros: because - as I already said - self is the object you call the method on
[12:56:44] apeiros: if you create another instance of Foo and call .test on that, it'll print that instance.
[12:58:20] Vendella: So, ruby will set self to be the object before I call test and after that will set it back to main?
[12:58:44] sankaber: has joined #ruby
[12:59:12] apeiros: that's not how I picture it. self is not a global state which is changed.
[12:59:34] apeiros: but might work as a way to think about it
[12:59:47] Vendella: That's what the info about self says.
[13:00:01] apeiros: that's your interpretation of it
[13:00:06] ejnahc: has joined #ruby
[13:00:11] Vendella: "self is an globally accessible keyword: ruby makes sure that there is always a self that can be accessed in any context. The value of self, however, will change based on the current context."
[13:00:40] mary5030: has joined #ruby
[13:00:43] bmurt: has joined #ruby
[13:00:44] apeiros: IMO badly worded. "will depend on the current context"
[13:01:40] apeiros: in the context of toplevel code, self is main. in the context of a class body, self is the class. in the context of a method, self is the object the method is invoked on.
[13:02:28] mary5030: has joined #ruby
[13:02:34] Hanmac1: has left #ruby: ()
[13:02:53] gluten_hell_: has joined #ruby
[13:04:04] Vendella: http://codepad.org/Ke0QPdC5
[13:04:15] Vendella: #<Foo:0xa0b4474>
[13:04:19] Vendella: It sets it back to main lol
[13:04:52] apeiros: ACTION sobs
[13:05:08] bkxd: has joined #ruby
[13:05:18] apeiros: if you want to think of it as mutable state - fine. but it's not really changing. your context changes. it always *is* main *in the context of main*.
[13:06:07] haxrbyte: has joined #ruby
[13:06:18] apeiros: that's like going from house A with a white carpet into house B with a red carpet and say "look, the carpet changed to red". then go back and say "look, the carpet changed back to white".
[13:06:45] qwertme: has joined #ruby
[13:06:55] sevenseacat: good analogy.
[13:07:20] apeiros: along with self, lots of things change. all available @instance_variables for example
[13:07:55] apeiros: and there too, it's IMO a bad way to think of it as your context being stationary and everything being swapped in & out in your context.
[13:08:37] jhass: grn: tbh that does sound like you have some design issues... why prepend if you do not want it overridden?
[13:09:30] jhass: grn: wouldn't it be better to instead have a decorator that you can use in the places where you do want the additional functionality?
[13:09:43] ndrei: has joined #ruby
[13:10:02] ismaelga: has joined #ruby
[13:10:30] northfurr: has joined #ruby
[13:11:55] Vendella: I have available the Well grounded Rubyist but it's for 1.9, the black book. Will it hurt if I read about the self keyword there or has it changed?
[13:12:37] tuelz: has joined #ruby
[13:13:31] apeiros: almost nothing fundamental has changed since 1.9
[13:14:11] tuelz: besides the langauge dying
[13:14:37] haxrbyte: has joined #ruby
[13:14:41] jhass: tuelz: not very creative, try better
[13:14:57] tuelz: jhass: best I got, you'll have to settle I'm afriad
[13:16:11] apeiros: ACTION thinks tuelz is dying faster than ruby
[13:16:22] tuelz: ACTION hopes apeiros is right
[13:17:01] tuelz: I realize that can be taken a couple different ways, so now you've got a clue as to whether you're a glass half full or empty kinda person
[13:17:06] jerius: has joined #ruby
[13:17:07] adaedra: Ruby is dead, long live ruby?
[13:17:12] Soda: has joined #ruby
[13:17:28] TinkerTyper: has joined #ruby
[13:17:34] al2o3-cr: ruby will never die
[13:17:40] failshell: has joined #ruby
[13:18:12] _blizzy_: has joined #ruby
[13:19:27] tuelz: that's a bit optimistic, but I like where your heart is
[13:21:11] vikaton: lol Ruby isnt dying
[13:21:15] manzo: has joined #ruby
[13:21:15] vikaton: wut r u smoking
[13:21:57] gregf_: python could be
[13:21:59] griffindy: has joined #ruby
[13:22:09] apeiros: don't feed the trolls.
[13:22:09] gregf_: if theres dope like that :/
[13:22:30] tuelz: I was only kidding friends. It's just a meme
[13:22:38] Andriamanitra: its popularity is declining though
[13:22:50] tuelz: indeed, which is why it's a meme
[13:23:17] GriffinHeart: has joined #ruby
[13:23:20] tuelz: all the cool kids have moved on the the hottest new whatever, that just means our neckbeard density is increasing
[13:23:25] Andriamanitra: it's a shame :/ i think ruby is a lot more fun than python
[13:24:22] tuelz: I use ruby because I think coding isn't fun :p. Anything that lets me do less coding to get to the stuff I really want to do is what I like
[13:24:36] tuelz: less time, not necessarily less code
[13:24:55] Scripore: has joined #ruby
[13:25:15] tuelz: I don't mind verbose - it's the mental load of trying to solve recursive puzzles or learn obscure patterns just to read code in a new language that I don't like
[13:25:22] workmad3: has joined #ruby
[13:26:59] ahmetkapikiran: has joined #ruby
[13:27:38] paulcsmith: has joined #ruby
[13:28:27] nateberkopec: has joined #ruby
[13:28:55] delianides: has joined #ruby
[13:30:12] mrchris: has joined #ruby
[13:31:12] havenwood: has joined #ruby
[13:33:36] dblessing: has joined #ruby
[13:35:44] someword: has joined #ruby
[13:36:40] charliesome: has joined #ruby
[13:37:06] quimrstorres: has joined #ruby
[13:37:38] davedev24_: has joined #ruby
[13:37:50] cassianoleal: has joined #ruby
[13:39:28] codeFiend: has joined #ruby
[13:39:28] ddv: for webdev meteor is very exciting to be honest
[13:39:50] IrishGringo: has joined #ruby
[13:40:52] davedev24: has joined #ruby
[13:41:49] arup_r: has joined #ruby
[13:43:04] krz: has joined #ruby
[13:43:42] gaboesquivel: has joined #ruby
[13:46:47] mello: has joined #ruby
[13:46:51] RegulationD: has joined #ruby
[13:48:01] idafyaid: has joined #ruby
[13:48:07] wca: has left #ruby: ()
[13:48:37] Guest7458: has joined #ruby
[13:49:16] shevy: tuelz hard to know whether ruby is really dying. if you look at TIOBE then yeah. If you look at trends in job offerings, then ruby has gained - the curve is almost identical to python, though python started at a higher threshold
[13:49:52] posixpascal: has joined #ruby
[13:50:03] shevy: google trends are also not showing the same, as a rule of thumb http://goo.gl/Si2JNf
[13:50:35] shevy: If you combine all datasets, then javascript is one of the biggest winners
[13:50:46] shevy: php lost slightly
[13:50:55] shevy: perl as well
[13:51:02] shevy: python gained quite a bit
[13:51:13] shevy: ruby is so lala, slight gain
[13:51:27] shevy: I think the big peak before was due to rails
[13:51:31] lala: I heard lala!
[13:51:38] byprdct: has joined #ruby
[13:51:51] lala: shevy: At your service.
[13:52:03] senayar: has joined #ruby
[13:52:03] senayar: has joined #ruby
[13:52:05] shevy: didn't know someone had such a nick
[13:52:08] quimrstorres: has joined #ruby
[13:52:19] havenwood: shevy: They are literally comparing YouTube searches with insane result filtering and other bizarre and uninformative things. Why even look at TIOBE? I'm confused how it's a thing.
[13:52:31] shevy: havenwood because it looks so scientific
[13:52:38] lala: shevy: I get that a lot.
[13:52:49] shevy: lala what kind of nick is that anyway :)
[13:52:53] shevy: it's like singing a song!
[13:53:01] chinmay_dd: has joined #ruby
[13:53:05] lala: shevy: Exactly!
[13:53:36] shevy: TIOBE uses some black magic to make that statistic
[13:53:57] lala: shevy: That was the first thing that came to mind when I had to put in a nick. And then I stuck onto it.
[13:54:46] joast: has joined #ruby
[13:55:03] jacor_m: has joined #ruby
[13:55:57] quimrsto_: has joined #ruby
[13:56:47] go|dfish: has joined #ruby
[13:57:17] gaboesquivel: has joined #ruby
[13:59:22] balazs: has joined #ruby
[13:59:33] Soda: has joined #ruby
[14:00:54] grn: jhass: I'm experimenting with design by contract. I wrote a module that you can mix into a class. In the class definition you can call .invariant to add a bunch of invariants. Then a module is prepended to the class which copies the whole public interface and verifies the invariant after each method call. It's just an experiment though. Any ideas how can this be done differently?
[14:01:48] quimrstorres: has joined #ruby
[14:02:11] jhass: I fear I'm unable to follow why that needs your supermethod proxy
[14:06:26] mrsolo: has joined #ruby
[14:06:27] Scripore: has joined #ruby
[14:06:29] mwlang: TIOBE grades popularity of languages based on amount of ???buzz??? or churn on the topic. How many searches are being performed, how many messages posted to usenet groups, etc. I think it also factors in number of open source projects written in each language and their activity levels, but I???m not entirely sure???I just know it???s an activity-based scoring system.
[14:07:25] bkxd: has joined #ruby
[14:08:31] allcentury: has joined #ruby
[14:09:28] mwlang: githut???s more fun than TIOBE: http://githut.info/ :-)
[14:09:28] havenwood: mwlang: Apparently they haven't heard of Github.
[14:09:32] apeiros: grn: IME all implementations of DBC in ruby fail due to unavailability of `old`
[14:09:38] grn: jhass: good point. The problem is you can't use methods in the invariants. For instance if you have an invariant like 'active_users_count >= 0' then after calling any method the control flow is #some_method -> #invariant_verification -> #active_users_count -> #invariant_verification -> #active_users_count -> ... The problem is that invariants are verified after all method calls, including those made from invariants, which leads to infini
[14:09:38] grn: te recursion.
[14:09:50] Polysics: has joined #ruby
[14:09:54] tuelz1: has joined #ruby
[14:10:19] mwlang: havenwood: yeah, I think TIOBE becomes less and less relevant as the years go by because I kinda suspect they haven???t changed their data gathering methodologies over the years.
[14:10:38] grn: apeiros: that's a very good point. I haven't considered it yet and concentrated on invariants. Any idea for an implementation?
[14:11:33] grn: I wonder how Eiffel implements `old` under the hood.
[14:11:57] apeiros: grn: if I had, I'd already written my own DBC gem :)
[14:12:19] apeiros: grn: a good implementation would need COW access on the underlying object-graph
[14:12:21] ferr: has joined #ruby
[14:12:24] apeiros: expensive in pure ruby
[14:12:39] podman: has joined #ruby
[14:13:17] mwlang: apeiros: Mooooo. Oh, wait, what???s COW?
[14:13:22] apeiros: copy on write
[14:13:23] grn: Yeah. Do you think that a C extension can help?
[14:13:47] apeiros: probably. not sure how much the C API exposes.
[14:14:06] kobain: has joined #ruby
[14:14:12] grn: I'll probably take a look next Friday.
[14:14:15] apeiros: grn: another issue is missing command-query separation in ruby
[14:14:30] grn: BTW While working on my code I managed to segfault ruby :-)
[14:14:34] Ilyes512: has joined #ruby
[14:14:50] apeiros: iirc in eiffel you could only use queries in contracts - which makes sense. since a command might lead to contract violation.
[14:15:14] apeiros: tbh, I don't remember how eiffel handles caching. i.e. a query which caches is to an extent a command (it mutates state)
[14:15:43] tjbiddle: has joined #ruby
[14:16:20] grn: That would make things simpler. How does Eiffel enforce CQS?
[14:16:34] apeiros: you have to declare it
[14:16:42] nobitanobi: has joined #ruby
[14:16:44] apeiros: and within a query, you can't use anything which itself isn't a query
[14:16:56] RegulationD: has joined #ruby
[14:17:14] grn: Sounds good. It's a bit similar to C++'s const methods, isn't it?
[14:17:26] apeiros: I don't do C++, so no idea
[14:17:44] apeiros: I assume a const method is not allowed to modify the receiver?
[14:18:03] mwlang: this all sounds like Ada???.
[14:18:14] grn: Yup, except the attributes marked as mutable which can be used for caching, etc.
[14:18:18] apeiros: quite possible. good ideas are bound to resurface :)
[14:18:28] lavros: has joined #ruby
[14:18:43] keyofnight: has joined #ruby
[14:18:56] gluten_hell_: has joined #ruby
[14:19:30] mwlang: and some seriously defense oriented thinking and coding, for that matter.
[14:19:40] sonOfRa: has joined #ruby
[14:21:08] baweaver: has joined #ruby
[14:21:26] dudedudeman: has joined #ruby
[14:21:29] dstarh: has joined #ruby
[14:22:53] HakN99: has joined #ruby
[14:23:43] dudedudeman: has joined #ruby
[14:23:57] tuelz1: just been getting into pure functional programming myself. Mutate none of the things!
[14:24:02] dudedudeman: shevy: i miss all hte fun apparently
[14:24:07] gluten_hell_: has joined #ruby
[14:24:31] ntln: has joined #ruby
[14:24:48] apeiros: mwlang: DBC is basically TDD++
[14:24:50] tuelz1: dudedudeman: well you missed out on all the bashing too. The other day a couple people said I reminded them of you. Sorry about that.
[14:25:12] apeiros: you kinda have your tests in the code itself. you can run your code with all tests enabled all the time. or you can turn them off for performance.
[14:25:15] dudedudeman: ha, no i ended up seeing that. there's no need to apologize
[14:25:28] apeiros: I found DBC quite amazing and it's one of the features I'd wish for ruby.
[14:25:43] dudedudeman: i just come back and see read some scrollback and i get all O_O
[14:25:56] apeiros: but while `old` (access to the object in the state prior to method execution) could be added, command/query separation would probably be quite hard
[14:26:20] sankaber: has joined #ruby
[14:26:44] gambl0re: has joined #ruby
[14:26:53] mwlang: apeiros: yeah, that???s the philosophy embodied by Ada. I actually like to code that way with Ruby as well in the places that it matters most. for example, calculating prices with discounts, interfacing with external services (credit card processing), etc.
[14:27:16] bluish: has joined #ruby
[14:27:16] DerisiveLogic: has joined #ruby
[14:27:33] charliesome: has joined #ruby
[14:27:58] Hanmac1: has joined #ruby
[14:28:27] xcesariox: has joined #ruby
[14:29:18] Xiti: has joined #ruby
[14:29:50] Hanmac1: has left #ruby: ()
[14:31:32] zarubin_: has joined #ruby
[14:31:37] phutchins: has joined #ruby
[14:31:45] ferr: has joined #ruby
[14:34:40] davedev24_: has joined #ruby
[14:35:32] balazs: has joined #ruby
[14:36:15] bronson: has joined #ruby
[14:37:59] nettoweb: has joined #ruby
[14:38:56] Palmer11: has joined #ruby
[14:40:14] GriffinHeart: has joined #ruby
[14:41:15] juanca_: has joined #ruby
[14:43:36] livathinos: has joined #ruby
[14:44:05] dru`: has joined #ruby
[14:47:07] riotjones: has joined #ruby
[14:47:50] lkba: has joined #ruby
[14:48:44] umgrosscol: has joined #ruby
[14:49:41] gaboesquivel: has joined #ruby
[14:49:41] Darryl___: has joined #ruby
[14:50:04] silverdust: How can I import another ruby file in irb or pry to use its methods?
[14:50:07] premera: has joined #ruby
[14:50:22] casadei: has joined #ruby
[14:50:30] silverdust: I'm more of a Python person and I had thought I'll just do a `import file` but it fails
[14:50:43] joelataylor: has joined #ruby
[14:50:53] jhass: just require it
[14:51:05] dudedudeman: require './app'?
[14:51:22] silverdust: oh require. Thanks
[14:51:26] silverdust: ACTION facepalms
[14:51:53] casadei_: has joined #ruby
[14:52:51] quimrsto_: has joined #ruby
[14:52:56] Spami_: has joined #ruby
[14:53:23] casadei__: has joined #ruby
[14:53:57] silverdust: The file also has things outside of functions and while trying to require, I get LoadError: cannot load such file -- urlshorten
[14:54:04] mrsolo: has joined #ruby
[14:54:12] silverdust: I did a require 'urlshorten'
[14:55:59] pwattstbd: has joined #ruby
[14:56:31] |\|370: has joined #ruby
[14:56:49] pwattstbd: After using YAML.load_file to read in a yml config, how do you return the value of a specific nested key?
[14:57:07] _seanc_: has joined #ruby
[14:57:31] jhass: pwattstbd: treat it like a hash
[14:57:41] jhass: (because it really is one)
[14:58:15] lavros: has joined #ruby
[14:58:23] silverdust: I get the same with require './urlshorten'
[14:58:50] jhass: silverdust: you're sure the file exists in the working directory that you started irb in?
[14:59:44] jpfuentes2: has joined #ruby
[14:59:47] pengin: has joined #ruby
[15:00:00] rickmasta: has joined #ruby
[15:00:07] dopie: has joined #ruby
[15:00:48] yh: has joined #ruby
[15:00:55] powersurge: has joined #ruby
[15:01:11] powersurge: anyone ever do address verification with activemerchant + authorize.net?
[15:01:16] powersurge: having a real bear of a time working out how to do it
[15:01:53] jhass: ?crosspost powersurge
[15:01:53] ruboto: powersurge, Please do not crosspost without at least telling so and mentioning provided suggestions and their outcome in all channels. Experience shows that people don't do either, and not doing so is considered rude.
[15:02:49] jhass: and where you asked first is definitely better suited anyway ;)
[15:03:43] senayar: has joined #ruby
[15:03:43] senayar: has joined #ruby
[15:04:38] edwinvdgraaf: has joined #ruby
[15:05:27] delianides: has joined #ruby
[15:05:42] dudedudeman: jhass: do you mind me asking if there is anything you don't know? lol. you've got solutions for everything
[15:06:01] jhass: if only..
[15:06:17] dudedudeman: ha. what's your background? ruby only? or have you tried all the things
[15:06:21] ebonics: jhass, youre the best
[15:06:28] jhass: you get that impression because I answer stuff I do know ;)
[15:06:36] powersurge: mmm, sorry about the not-explicitly mentioned crosspost
[15:06:38] aryaching: has joined #ruby
[15:06:40] dudedudeman: it's true! limited sample size
[15:06:44] xelim: has joined #ruby
[15:06:47] powersurge: just came in here because I hadn't gotten anything actionable
[15:06:56] uris: has joined #ruby
[15:07:02] powersurge: I'm sure you can imagine my frustration
[15:07:28] lavros: has joined #ruby
[15:07:54] jhass: dudedudeman: started with about 14, wanted to these "homepage" thingies, so started digging into HTML, CSS and then PHP shortly after, moved over to Python for "GUI stuff, PHP-GTK is not usable!" and picked up Ruby by contributing to diaspora because "gotta do some open source stuff"
[15:08:10] powersurge: heh, diaspora
[15:08:12] tjohnson: has joined #ruby
[15:08:13] powersurge: I forgot about them
[15:08:20] psye: has joined #ruby
[15:08:21] powersurge: they were going to save our social network soul
[15:08:29] watchtheblur: has joined #ruby
[15:09:08] dudedudeman: jhass: everyone has a story. that's pretty neat
[15:09:34] myddler: has joined #ruby
[15:09:37] powersurge: I had a pretty similar trajectory. I learned python for a change of pace over PHP though, rather than for guis
[15:09:54] powersurge: at my current company I couldn't do python, had to pick between php & ruby
[15:09:57] powersurge: learned ruby in a hurry
[15:10:47] dudedudeman: see, i see a lot of people say 'learned in a hurry'. and I guess that's because they have a background in programming already
[15:11:17] aredridel: has joined #ruby
[15:11:22] powersurge: it's deffo easier to learn languages in the same paradigm when you already know one
[15:11:28] myddler: Anyone know of any open source code for a large Rails app, maybe on Github?
[15:11:30] powersurge: it's easy to sidestep from php to python or ruby, for example
[15:11:42] powersurge: mostly boils down to learning idioms & ecosystem
[15:11:43] jhass: myddler: discourse
[15:12:05] jhass: diaspora is not small too, but still not a prime example of neat code
[15:12:15] jhass: I'm sure you can google that much ;)
[15:12:41] myddler: jhass: Looking for an example of a large Rails codebase not typical textbook example
[15:12:43] lavros: has joined #ruby
[15:12:51] jhass: I just gave you two then
[15:13:10] myddler: jhass: OK, thanks.
[15:13:17] Pwnna: has joined #ruby
[15:13:22] Pwnna: how do you send a block?
[15:13:34] Pwnna: like i want to call a.send(:method, arg1, arg2, block)
[15:13:45] Pwnna: where block is a variabel that i have, rather than an inline block
[15:13:52] jhass: powersurge: prefer public_send if possible, either way, just pass the block to it
[15:14:01] jhass: , &block), or ) do end / ) { }
[15:14:10] jhass: ew, tab, fail Pwnna ^
[15:14:28] Pwnna: so just do a.send(:m, a, b, &block) should work?
[15:16:07] sinkensabe: has joined #ruby
[15:17:03] Pwnna: and if i do want to send an inline block i can just do a.send(:m, a, b) { ... }
[15:17:46] jhass: and please consider public_send
[15:18:19] Pwnna: just less character to type :P
[15:18:46] jpfuentes2: has joined #ruby
[15:19:05] havenn: has joined #ruby
[15:19:46] edwinvdg_: has joined #ruby
[15:20:24] Agoldfish: has joined #ruby
[15:20:30] juanca_: has joined #ruby
[15:21:34] jhass: that's a bad reason if they're not functionally equivalent ;P
[15:22:43] ismaelga: has joined #ruby
[15:26:35] snockerton: has joined #ruby
[15:27:07] tuelz1: has joined #ruby
[15:29:18] juanca_: has joined #ruby
[15:30:18] workmad3: has joined #ruby
[15:33:00] athos_diddy: has joined #ruby
[15:33:16] athos_diddy: hello everyone
[15:33:40] senayar: has joined #ruby
[15:33:44] athos_diddy: so i'm building something and this data collection is like 80 lines. https://gist.github.com/genericlady/3b32063860d0664d2ab6
[15:33:51] Axilla: has joined #ruby
[15:34:05] athos_diddy: what should i do? leave it in the initialize? can't i use a module or class?
[15:34:41] athos_diddy: i've tired using modules and stuff but the variables are never in scope
[15:34:52] Cache_Money: has joined #ruby
[15:35:07] athos_diddy: this doesn't look elegant to me. if there's a better way i'm open to learning
[15:35:23] Lingo: seems like a good opportunity to use some loops :)
[15:35:33] jhass: yeah, definitely some patterns in there
[15:35:50] athos_diddy: lol yeah i was doing that... taking a fp route with it in a module
[15:35:51] mello: has joined #ruby
[15:36:00] athos_diddy: but when i was building the methods the control constructs kept growing
[15:36:10] athos_diddy: maybe i should make smaller methods
[15:36:15] jhass: I'd built a method that builds and returns the hash
[15:36:27] Lingo: are you going to modify the ImageLists and stuff? I'd just store it in constants
[15:36:34] pdoherty: has joined #ruby
[15:36:41] jhass: that additionally
[15:36:42] jpfuentes2: has joined #ruby
[15:36:53] athos_diddy: imagelist won't be modified they will be iterated through during the main_routine
[15:37:14] athos_diddy: the only thing modified will be the image instance variable
[15:37:38] athos_diddy: it's a gosu rpg
[15:37:49] OrbitalKitten: has joined #ruby
[15:37:56] moretti: has joined #ruby
[15:37:59] Lingo: well, initialize isn't the place then :) abstract the pattern and store it in a constant would be my advice :)
[15:37:59] athos_diddy: everyone does that darn starfighter games but i don't think that's so good.. too many tutorials for it
[15:38:36] athos_diddy: can i share constants with modules?
[15:38:45] athos_diddy: that would be so much cleaner
[15:39:04] jhass: mh, I lack a good name for this, what could the hashes be called?
[15:39:22] jhass: direction_animation?
[15:39:40] hectortrope: has joined #ruby
[15:39:52] athos_diddy: animation_direction can work too :P
[15:39:53] bootstrappm: has joined #ruby
[15:40:07] enebo: has joined #ruby
[15:40:12] athos_diddy: then we pass the key it reads more literate
[15:40:42] athos_diddy: anyone wanna hire a jr rails dev in nyc?
[15:42:15] havenn: ?rails athos_diddy
[15:42:15] ruboto: athos_diddy, Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[15:42:30] havenn: athos_diddy: So you've tried extracting some methods?
[15:43:14] havenn: athos_diddy: Try again and show us the code so we can help you get it working?
[15:43:19] havenn: bootstrappm: g'mornin
[15:43:47] myddler: has left #ruby: ()
[15:43:47] athos_diddy: what do you mean extracting some methods? is that technical ruby talk for inheriting and modifying methods from native or required classes?
[15:44:28] athos_diddy: jahss: thank you i'll work it out
[15:44:36] athos_diddy: jhass: thanks
[15:44:46] athos_diddy: lingo: thank you too
[15:45:21] nettoweb: has joined #ruby
[15:45:26] havenn: athos_diddy: When common blocks of code are repeated in multiple places or dividing makes it easier to understand you can pull those parts out into their own method.
[15:46:09] lkba_: has joined #ruby
[15:46:22] fluffy_diddy: ok so break up the collection into methods and require that module
[15:46:28] Pwnna: has left #ruby: ("Leaving")
[15:46:35] fluffy_diddy: i can even build some loops and be more DRY
[15:47:10] fluffy_diddy: havenn: is that the right idea?
[15:47:39] fluffy_diddy: sry i taught myself
[15:47:56] fluffy_diddy: some gaps in my knowledge despite all the books i've read lol
[15:48:05] havenn: fluffy_diddy: Extract method just means extracting into the same namespace.
[15:49:00] havenn: fluffy_diddy: Here's an example: https://www.jetbrains.com/ruby/help/extract-method.html
[15:50:09] jacor: has joined #ruby
[15:50:12] lessless: has joined #ruby
[15:50:59] lavros: has joined #ruby
[15:51:31] havenn: fluffy_diddy: The example I linked actually doesn't have much explanation, but searching for Ruby and extract method should turn up good results.
[15:51:37] bronson: has joined #ruby
[15:51:51] fluffy_diddy: it actually doe
[15:51:57] havenn: fluffy_diddy: Oh good. :)
[15:52:14] fluffy_diddy: havenn: this is a great example
[15:52:36] _seanc_: has joined #ruby
[15:52:37] fluffy_diddy: i know it looks a little longer form but this is loose coupline
[15:52:41] fluffy_diddy: which leads to higher cohesion
[15:52:44] patrick_f: has joined #ruby
[15:52:46] fluffy_diddy: sort of like using closures
[15:52:47] ki0_: has joined #ruby
[15:52:55] fluffy_diddy: but we're doing method extraction
[15:54:07] jhass: fluffy_diddy: http://paste.mrzyx.de/psytgapyo my stab at it
[15:55:08] giuseppesolinas: has joined #ruby
[15:55:15] baroquebobcat: has joined #ruby
[15:55:37] fluffy_diddy: jhass: very nice! I was about to mentioned that two of those actions don't have 4 images (scenes/frames) one has one and the other has three
[15:55:41] fluffy_diddy: but we can use compact! or something
[15:55:47] fluffy_diddy: and eliminate the nil
[15:55:51] delianides: has joined #ruby
[15:56:57] fluffy_diddy: ::cry:: and here i typed up 80 lines of this... a year or on the job experience and i won't be making these mistakes. thank you everyone
[15:57:41] arta82: has joined #ruby
[15:57:51] jhass: fluffy_diddy: if they consistently have 3, just make the 4 a parameter
[15:58:16] jhass: def build_animation(action, frames=4)
[15:58:22] fluffy_diddy: they consistantly have 4
[15:58:31] fluffy_diddy: yeah i was gonna pass it as argument with assignment
[15:58:33] jhass: I mean for the four directions
[15:58:50] fluffy_diddy: each direction has 4 images
[15:58:57] commondream: has joined #ruby
[15:59:00] fluffy_diddy: each action has 4 directions and 4 images
[15:59:08] hectortrope: has joined #ruby
[15:59:13] jhass: except for dead if I revisit your original code ;P
[15:59:22] fluffy_diddy: 1 action has 4 directions 3 images and right dead has 1
[15:59:39] fluffy_diddy: but i can make it work from the example ;)
[15:59:47] jhass: anyway, yeah, should give you some ideas
[16:00:09] luckyme: has joined #ruby
[16:00:22] juanca_: has joined #ruby
[16:00:44] Oog: has joined #ruby
[16:05:04] paulcsmith: has joined #ruby
[16:05:40] gaboesquivel: has joined #ruby
[16:06:15] a13x212: has joined #ruby
[16:06:31] fluffy_diddy: that code won't work jhass with rmagick
[16:06:55] fluffy_diddy: it's ok it's informative
[16:07:33] Rubie: has joined #ruby
[16:08:05] fluffy_diddy: i think it will i'll try it thanks again
[16:08:16] jhass: doesn't work how?
[16:08:17] Maletor: has joined #ruby
[16:08:34] Channel6: has joined #ruby
[16:09:27] fluffy_diddy: i have to go now but i'll test to see if i can pass an array as an argument to imagelist that's all
[16:09:55] jhass: fluffy_diddy: did you take out the *?
[16:10:03] fluffy_diddy: i didn't run anything yet
[16:10:14] jhass: the * makes it so that hte arrays items are passed as individual args
[16:10:20] fluffy_diddy: i gotta go but i'll be back to work it out. what you gave me will help
[16:10:32] dfockler: has joined #ruby
[16:12:09] hmsimha: has joined #ruby
[16:12:12] hmsimha: has left #ruby: ("Leaving")
[16:12:14] jenrzzz: has joined #ruby
[16:13:11] cjim_: has joined #ruby
[16:13:33] catcher: has joined #ruby
[16:15:37] Pumukel: has joined #ruby
[16:15:44] jud: has joined #ruby
[16:16:14] bricker: has joined #ruby
[16:16:33] thiagovsk: has joined #ruby
[16:16:52] The_Phoenix: has joined #ruby
[16:20:23] IrishGringo: has joined #ruby
[16:21:30] Soda: has joined #ruby
[16:21:36] izzol: I have a problem with checking files because of the name :(
[16:21:47] izzol: I'm doing something like type?(file)
[16:21:57] izzol: and then in that method I'm checking the file.
[16:22:15] failshell: has joined #ruby
[16:22:16] izzol: but of the file has a name: "TEST\ Quote-225255.pdf"
[16:22:29] izzol: I'm getting simply No such file or directory :(
[16:22:47] rkazak: has joined #ruby
[16:23:14] jhass: I bet that \ is what your shell needs
[16:23:18] pengin: has joined #ruby
[16:23:28] jhass: try "TEST Quote-225255.pdf"
[16:23:29] izzol: jhass: yes, correct.
[16:23:32] codeFiend: has joined #ruby
[16:24:14] ixti: has joined #ruby
[16:24:15] dopie: has joined #ruby
[16:24:40] izzol: What do you mean?
[16:25:00] izzol: When I check it by puts, I have:
[16:25:02] izzol: 1 # ruby enc.rb
[16:25:08] izzol: 2 "/tmp/enc/queue//2n/TET Quote-225255.pdf"
[16:25:16] izzol: So this looks fine
[16:25:23] jhass: then "TET Quote-225255.pdf"
[16:25:32] jhass: no need for the \
[16:25:37] jhass: and missing S
[16:25:51] izzol: ah, no this is just anothertest.
[16:26:12] baweaver: has joined #ruby
[16:26:33] izzol: I think my bash cannot figure it out.
[16:26:51] ismaelga: has joined #ruby
[16:27:01] mistermocha: has joined #ruby
[16:27:03] jhass: well, then I have no clue what your problem is, you keep adding variables to it and specify basically nothing
[16:27:19] jhass: I'll stop guessing
[16:27:42] mistermo_: has joined #ruby
[16:27:59] izzol: jhass: https://github.com/wolfedale/ruby/blob/master/enc.rb :-)
[16:28:17] izzol: So in line 62 I'm calling type?(file).
[16:28:33] izzol: And the file has a space (as most of them from the MS) :(
[16:28:52] izzol: And then in line 22 my bash command cannot find it.
[16:29:12] jpfuentes2: has joined #ruby
[16:29:44] jhass: ah, I wish there was an argument form for ` :/
[16:30:23] jhass: anyway, add quotes
[16:31:24] jhass: `/usr/bin/file -bi "#{File.join(temp_dir, file)}"`.split("/")[1].split(";")[0]
[16:32:44] jhass: `/usr/bin/file -bi "#{File.join(temp_dir, file)}"`[%r{\w+/([^;]+)}, 1]
[16:32:52] gaboesquivel: has joined #ruby
[16:33:02] izzol: works now :-)
[16:33:08] izzol: Thanks jhass :)
[16:33:21] izzol: So the problem was with the quotes somehow hmm
[16:33:23] towski_: has joined #ruby
[16:33:30] jhass: yup, ` goes through a shell
[16:33:38] izzol: I'm stupid.
[16:34:16] sonOfRa: has joined #ruby
[16:35:46] fluffy_diddy: izzol: if everytime we learn something or overlook something and it was known as "stupid" then einstein must be the dumbest mofo. he's like stupid smart
[16:36:02] denver: has joined #ruby
[16:38:08] michaelreid: has joined #ruby
[16:40:37] mikecmpbll: has joined #ruby
[16:41:38] yaogwai: has joined #ruby
[16:42:11] allcentury: has joined #ruby
[16:42:37] huddy: has joined #ruby
[16:44:05] Hijiri: has joined #ruby
[16:45:45] pengin: has joined #ruby
[16:45:49] DerisiveLogic: has joined #ruby
[16:46:34] dorei: how can i "express" U+00B4 in ruby?
[16:46:52] FernandoBasso: has joined #ruby
[16:48:02] jhass: >> "\u00b4"
[16:48:02] ruboto: jhass # => "??" (https://eval.in/372607)
[16:48:44] bmalum: has joined #ruby
[16:49:35] ismaelrb: has joined #ruby
[16:52:45] paulcsmith: has joined #ruby
[16:53:27] mistermocha: has joined #ruby
[16:53:54] ki0: has joined #ruby
[16:55:29] thoffmeyer: has joined #ruby
[16:55:29] thoffmeyer: has joined #ruby
[16:56:50] ghr: has joined #ruby
[16:57:50] x44x45x41x4E: has joined #ruby
[16:58:36] arup_r: has joined #ruby
[16:59:44] snockerton: has joined #ruby
[17:01:42] Axilla: nah never stupid man, development is like that.. its always something so small and "stupid" when something should be working and isn't.
[17:02:18] joelataylor: has joined #ruby
[17:02:35] juanda: has joined #ruby
[17:03:37] Spami: has joined #ruby
[17:03:39] Spami: has joined #ruby
[17:06:51] bootstrappm: great deals on newegg today http://promotions.newegg.com/NEemail/May-0-2015/BuildBuy_29/index-landing.html?utm_medium=Email&utm_source=IGNEFL052915&nm_mc=EMC-IGNEFL052915&cm_mmc=EMC-IGNEFL052915-_-EMC-052915-Index-_-E0-_-PromoWord&et_cid=18429&et_rid=7687683&et_p1=
[17:07:12] apeiros: !ban bootstrappm no spam
[17:07:32] bootstrappm: heyyy apeiros you see me in here all the time hahah, just thought you guys would like to know
[17:07:38] bootstrappm: might build me a gaming rig for like $600
[17:08:01] apeiros: I don't remember seeing you speak
[17:08:43] Scripore: has joined #ruby
[17:08:56] djbkd: has joined #ruby
[17:09:11] baweaver: apeiros: He's fine
[17:10:25] commondream: has joined #ruby
[17:11:05] baweaver: Lucky blank though that the bot isn't paying attention, heh
[17:11:12] mleung: has joined #ruby
[17:11:52] sonOfRa: has joined #ruby
[17:13:00] OrbitalKitten: has joined #ruby
[17:14:38] apeiros: naw, I forgot the duration
[17:14:45] michael_mbp: just rolled out the new blog build
[17:14:48] apeiros: and I haven't yet updated it to make duration truly optional
[17:14:52] michael_mbp: thoughts http://mwdesilva.com/ ?
[17:15:51] bootstrappm: I really like it michael_mbp! did you design it also or just the setup?
[17:16:11] michael_mbp: bootstrappm: I did it from scratch.
[17:16:16] pengin: has joined #ruby
[17:16:19] n008f4g_: has joined #ruby
[17:16:33] michael_mbp: thanks, well it's a overhaul of the older one... the newer responsive look is nicer.
[17:16:44] bootstrappm: I'm a fan of the title fade in
[17:17:15] paulcsmith: has joined #ruby
[17:17:54] michael_mbp: open the console and drop this in $(document).trigger('hideSearchBar');
[17:18:02] michael_mbp: I'm not sure if that's useful yet ;)
[17:18:11] juanda: has joined #ruby
[17:18:23] michael_mbp: ah $(document).trigger('showSearchBar')
[17:18:43] mrsolo: has joined #ruby
[17:19:27] mmazing: has joined #ruby
[17:19:57] daum_: has joined #ruby
[17:21:16] sarkyniin: has joined #ruby
[17:23:07] yqt: has joined #ruby
[17:23:41] HotCoder: has joined #ruby
[17:24:40] mello: has joined #ruby
[17:25:47] C1V0: has joined #ruby
[17:26:46] yh: has joined #ruby
[17:27:19] quimrstorres: has joined #ruby
[17:28:25] arta82: has joined #ruby
[17:28:44] northfurr: has joined #ruby
[17:30:15] joelataylor: has joined #ruby
[17:32:21] yh: has joined #ruby
[17:32:48] kies: has joined #ruby
[17:33:09] nettoweb: has joined #ruby
[17:33:10] pandaant: has joined #ruby
[17:35:51] jpfuentes2: has joined #ruby
[17:37:04] bootstrappm: got the s3 SDK stuff figured out btw from my question the other day: v2 has a more low level client interface and a resource interface. Examples here: https://gist.github.com/frankpinto/4c5cc7d8272f994ea509
[17:37:35] bootstrappm: necessary environment variables to set: AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_REGION
[17:37:51] bootstrappm: for US s3 region is always us-east-1
[17:38:59] juanda: has joined #ruby
[17:40:02] rindolf: has joined #ruby
[17:40:14] rindolf: Hi all. Sup?
[17:40:42] michael_mbp: rindolf: hey.
[17:40:47] michael_mbp: just toying with the new blog http://mwdesilva.com/
[17:41:11] rindolf: michael_mbp: ah, let me see.
[17:42:21] ravenreborn: has joined #ruby
[17:44:04] michael_mbp: previously looked like this http://webcache.googleusercontent.com/search?q=cache:dx1qAyhsmBIJ:mwdesilva.com/+&cd=1&hl=en&ct=clnk&gl=lk
[17:44:37] rindolf: michael_mbp: the content seems mostly way over my head.
[17:46:04] MatthewsFace: has joined #ruby
[17:46:44] pengin: has joined #ruby
[17:47:18] Vendella: has joined #ruby
[17:47:31] bmurt: has joined #ruby
[17:47:37] Vendella: Is The pickaxe book for 1.9 and 2.0 still relevant to look into?
[17:47:39] Axilla: hi all, i ahve this little problem here.. i'm trying to download a file from a given URL and then get the path of file at file.path
[17:47:42] Axilla: https://gist.github.com/travisdmathis/95a2a8cbef3b00a407e1
[17:47:54] Axilla: but file is returning a fixnum i assume is the size of the file when the block is closed
[17:47:58] Axilla: and not the file object itself
[17:47:59] sarkyniin: Vendella: yeah
[17:48:04] Axilla: how can I correct this?
[17:48:06] sarkyniin: though I'm myself looking for exercises to do
[17:48:07] tesuji: has joined #ruby
[17:48:09] sarkyniin: while reading the book
[17:48:27] Vendella: sarkyniin, What?
[17:49:07] jhass: axilla: check tempfile stdlib
[17:49:16] Axilla: k, figured as much, thanks
[17:49:17] sarkyniin: Vendella: the book is still relevant
[17:49:20] Axilla: i can do that route
[17:49:25] sarkyniin: though it doesn't contain any exercises
[17:49:46] Vendella: I don't want it for learn Ruby lol
[17:50:08] jhass: axilla: to explain, it returns the return value of the block, which is the return value of the write call, which is the amount of bytes written by that call
[17:50:45] gauke: has joined #ruby
[17:51:00] sandelius: has joined #ruby
[17:51:59] Axilla: ahh got it
[17:52:31] havenwood: axilla: You might consider just using IO#write: file_content = RestClient.get url; File.write File.join(Rails.root, 'tmp', filename), file_content
[17:52:54] Hijiri: has joined #ruby
[17:53:05] jhass: nah, use tempfile
[17:53:10] jhass: don't duplicate its logic
[17:53:16] havenwood: jhass: Good point, if really tmp.
[17:53:26] havenwood: axilla: This just a tmp file?
[17:54:00] havenwood: axilla: http://ruby-doc.org/stdlib/libdoc/tempfile/rdoc/Tempfile.html
[17:54:40] ki0: has joined #ruby
[17:55:58] ndrei: has joined #ruby
[17:56:12] havenwood: jhass: My eyes glazed over at Rails.root and the 'tmp' didn't register. :P
[17:58:44] sngeth: has joined #ruby
[17:58:51] axl_: has joined #ruby
[17:59:09] ghr: has joined #ruby
[17:59:38] bogdanteleaga: has joined #ruby
[18:03:10] bluish: has left #ruby: ()
[18:03:34] Vendella: Sure the pickaxe book for 1.9 and 2.0 is not outdated?
[18:03:52] juanca_: has joined #ruby
[18:05:18] bootstrappm: Vendella: what did you mean by "I don't want it for learn Ruby"?
[18:05:27] sibchcoder: has joined #ruby
[18:06:02] jpfuente_: has joined #ruby
[18:06:10] Vendella: I have it to look things up
[18:06:13] Vendella: not to raw read it.
[18:06:22] Vendella: I'm currently reading Eloquent Ruby.
[18:09:17] juanda: has joined #ruby
[18:11:20] FernandoBasso: has joined #ruby
[18:11:25] juanca_: has joined #ruby
[18:11:30] DerisiveLogic: has joined #ruby
[18:15:01] bronson: has joined #ruby
[18:15:34] baroquebobcat: has joined #ruby
[18:15:54] NiVanc: has joined #ruby
[18:16:23] jpfuentes2: has joined #ruby
[18:16:42] Zai00: has joined #ruby
[18:17:28] pengin_: has joined #ruby
[18:19:06] kirun: has joined #ruby
[18:20:32] dionysus69: has joined #ruby
[18:22:04] gluten_hell_: has joined #ruby
[18:23:58] rgb-one: has joined #ruby
[18:24:00] cubesandcode: has joined #ruby
[18:24:11] Rubie: has joined #ruby
[18:24:49] fedexo: has joined #ruby
[18:24:50] dionysus69: has joined #ruby
[18:25:46] blt: has joined #ruby
[18:27:11] apeiros: Vendella: as said before, no fundamental changes between 1.9 and 2.2. any book which covers 1.9 will be fine.
[18:27:34] Vendella: apeiros, I was told that the well grounded rubyist for 1.9 was outdated, hmm.
[18:27:37] apeiros: the one thing which needs explanation is refinements. and those are atm rarely used.
[18:27:50] Vendella: Well, will Eloquent Ruby and the piackaxe book do good for learning Ruby?
[18:27:51] apeiros: Vendella: there may be a newer one
[18:28:27] apeiros: eloquent ruby is probably more for users who already know the basics. but I haven't read it myself.
[18:28:40] Vendella: I have already read half the book of it.
[18:28:40] Ainieco: has joined #ruby
[18:28:49] Vendella: I have programming experience.
[18:28:59] Vendella: half the book*
[18:29:00] havenwood: Vendella: The second edition of the Well Grounded Rubyist covers modern Ruby. In the older version you'd quickly run into examples that won't work but most of the book remains relevant. Newer editions are of course preferred.
[18:29:04] rgb-one: anyone know if redcarget supports `<aside markdown="1">...</aside>`? This would enable using markdown within aside aside tags.
[18:29:23] havenwood: Ainieco: hi
[18:29:28] Vendella: I decided to go with Eloquent and The Pickaxe book.
[18:29:36] Ainieco: just run rubocop and it told me that 'Assignment Branch Condition size for foo is too high. [23.54/15]' what does it mean?
[18:29:37] Vendella: Because I already have them available.
[18:30:35] havenwood: Ainieco: http://www.softwarerenovation.com/ABCMetric.pdf
[18:30:43] bluOxigen: has joined #ruby
[18:30:52] balazs: has joined #ruby
[18:31:13] Axilla: havenwood: thanks for the tips i got it all working beautifully :)
[18:31:19] Axilla: and thanks jhass
[18:31:36] Axilla: now able to upload files from a url to our system via api weee
[18:31:49] gauke: has joined #ruby
[18:32:39] jhass: axilla: oh where? I'd like you to download a radio stream :P
[18:32:49] balazs: hello, any way you guys know to specify in a .erb file not to apply layout.erb, just render things without it ?
[18:32:54] hs366: has joined #ruby
[18:33:11] jhass: balazs: sounds like rails, see #rubyonrails
[18:33:21] commondream: has joined #ruby
[18:33:22] balazs: jhass: sinatra
[18:33:28] Axilla: jhass: well, i was writing ruby, but ya its a rails project
[18:33:28] serivich: has joined #ruby
[18:33:31] Axilla: i like to keep ruby to ruby
[18:33:36] Ainieco: havenwood: thanks
[18:33:58] jhass: balazs: surely sinatra's erb call takes some options too
[18:34:10] quimrstorres: has joined #ruby
[18:34:36] codecop: has joined #ruby
[18:35:15] balazs: right, but I think the only option for me is from within the erb, not from app.rb . I'm using a dashboard framework called dashing, so app.rb is already set.
[18:35:59] jhass: erb :foo, layout: false perhaps?
[18:36:37] jhass: balazs: uh, then I have to bail, doubt it's possible though
[18:37:18] hs366: Q, can i use Component world in my report for Excon gem ? is the same as component in other programing languages ?
[18:41:31] newuser2015: has joined #ruby
[18:42:50] nettoweb_: has joined #ruby
[18:45:05] commondream: has joined #ruby
[18:45:40] advorak: has joined #ruby
[18:45:50] gusrub: has joined #ruby
[18:46:01] dionysus69: has joined #ruby
[18:46:43] advorak: I'm wanting to do something like "splitting" an array much like splitting a string. https://gist.github.com/advorak/f09d05356c1cdd3b7e00 is what I'm looking at doing. If anybody has any guidance as to where to start or if there are any other methods I should be exploring. Thanks! :-)
[18:47:46] jhass: advorak: that should be slice_before or slice_after, I never remember
[18:48:04] arup_r: has joined #ruby
[18:50:15] jhass: >> ["-----","a","-----","b","c","-----","d"].slice_before {|x| x == "-----" }.map {|chunk| chunk.drop(1) }
[18:50:17] ruboto: jhass # => [["a"], ["b", "c"], ["d"]] (https://eval.in/372647)
[18:50:32] tomphp: has joined #ruby
[18:50:53] advorak: Oh great. Thank you. :-)
[18:50:55] baweaver: >> ["-----","a","-----","b","c","-----","d"].slice_after {|x| x == "-----" }.map {|chunk| chunk.drop(1) }
[18:50:56] ruboto: baweaver # => [[], ["-----"], ["c", "-----"], []] (https://eval.in/372649)
[18:52:18] advorak: I knew I'd used slice_before and slice_after before, but I couldn't remember the names.
[18:52:24] gauke: has joined #ruby
[18:52:27] axl_: has joined #ruby
[18:52:29] bootstrappm: that's cool! never knew about that one
[18:52:32] RegulationD: has joined #ruby
[18:52:53] OrbitalKitten: has joined #ruby
[18:54:17] tomphp_: has joined #ruby
[18:54:39] dionysus69: has joined #ruby
[18:54:54] HotCoder: has joined #ruby
[18:54:58] jhass: >> ["-----","a","-----","b","c","-----","d"].chunk {|x| x != "-----" }.map(&:last)-[["-----"]] # or for a silly version :P
[18:55:00] ruboto: jhass # => [["a"], ["b", "c"], ["d"]] (https://eval.in/372655)
[18:55:44] stylus: has joined #ruby
[18:56:30] bruno-: has joined #ruby
[18:56:52] sandelius: has joined #ruby
[18:57:41] millerti: has joined #ruby
[18:58:15] auroara: has joined #ruby
[18:58:41] auroara: which ruby installer should i get? http://rubyinstaller.org/downloads/
[18:58:51] jhass: 2.1 I heard
[18:58:53] havenwood: auroara: 32-bit 2.1.6
[18:58:55] auroara: i want the latest but the notice is very discouraging :(
[18:59:04] ghr: has joined #ruby
[18:59:26] jhass: or maybe get VirtualBox straight away :P
[18:59:38] havenwood: auroara: Windows support lags a bit behind the rest so you may bleed out on the bleeding edge.
[18:59:54] coderhs: has joined #ruby
[18:59:55] Scripore: has joined #ruby
[19:02:17] mrchris: has joined #ruby
[19:02:24] pwattstbd: has joined #ruby
[19:03:22] User458764: has joined #ruby
[19:03:24] sepp2k: has joined #ruby
[19:03:31] Hijiri: has joined #ruby
[19:03:33] michael_mbp: ha... shared my docker build http://mwdesilva.com/posts/rolling-out-the-new-blog-a-digital-ocean-droplet
[19:03:36] snockerton: has joined #ruby
[19:04:45] platzhirsch: has joined #ruby
[19:04:54] quimrstorres: has joined #ruby
[19:05:46] jamesaxl: has joined #ruby
[19:07:51] Rubie: has joined #ruby
[19:10:40] apt-get_: has joined #ruby
[19:12:47] rdark: has joined #ruby
[19:12:53] spider-mario: has joined #ruby
[19:13:17] tomphp: has joined #ruby
[19:13:21] mello: has joined #ruby
[19:14:59] phizzbuzz: has joined #ruby
[19:16:35] djbkd: has joined #ruby
[19:16:43] Cache_Money: has joined #ruby
[19:17:19] bootstrappm: michael_mbp: been meaning to learn docker, you have any tutorial you recommend?
[19:18:21] gfedel: has joined #ruby
[19:18:53] michael_mbp: bootstrappm: try the digital ocean guide
[19:19:05] michael_mbp: the default guide is decent too.
[19:19:27] michael_mbp: the trick is figuring out the best way to pack orchestration with Docker.
[19:19:52] bootstrappm: thanks, which do you use? we were just talking about ansible vs saltstack here yesterday
[19:20:58] apt-get__: has joined #ruby
[19:21:40] Igorshp: has joined #ruby
[19:24:36] duderonomy: has joined #ruby
[19:24:54] juanca_: has joined #ruby
[19:26:21] penpen: has joined #ruby
[19:27:59] penpen: puts "chello"[1..-1]
[19:28:44] bootstrappm: >> puts "chello"[1..-1]
[19:28:45] ruboto: bootstrappm # => hello ...check link for more (https://eval.in/372677)
[19:28:48] bootstrappm: a gift for you penpen ^
[19:29:10] pengin: has joined #ruby
[19:30:34] centrx: has joined #ruby
[19:30:56] apeiros: penpen? the penpen from #ruby-de?
[19:31:55] penpen: apeiros: indeed
[19:32:17] penpen: have been absent for eons
[19:36:21] Igorshp: has joined #ruby
[19:36:21] shevy: has joined #ruby
[19:37:49] last_staff: has joined #ruby
[19:39:48] bruno-: has joined #ruby
[19:39:48] griffindy: has joined #ruby
[19:39:59] zz_Outlastsheep: has joined #ruby
[19:40:55] TheNet: has joined #ruby
[19:41:50] mase-chatter: has joined #ruby
[19:42:49] spider-mario: has joined #ruby
[19:43:05] sanguisdex: has joined #ruby
[19:43:47] chinmay_dd: has joined #ruby
[19:44:58] nux443: has joined #ruby
[19:45:14] leafybasil: has joined #ruby
[19:45:18] Andranik: has joined #ruby
[19:49:09] iamninja: has joined #ruby
[19:49:18] Spami: has joined #ruby
[19:49:25] allcentury: has joined #ruby
[19:49:49] Rollabunna: has joined #ruby
[19:50:13] mleung: has joined #ruby
[19:51:00] bollullera: has joined #ruby
[19:51:09] toretore: any alternatives to rubydoc.info?
[19:51:30] randiman: has joined #ruby
[19:52:00] jhass: rubydoc.org
[19:52:06] jhass: what do you dislike about it?
[19:52:19] jhass: for core, stdlib & rails devdocs.io is pretty neat
[19:52:39] jhass: omniref is neat for "wth does this shit come from", though I hate the interface
[19:53:36] bollullera: has left #ruby: ()
[19:54:23] toretore: jhass: looks like it's the same
[19:54:29] toretore: rdoc.info is also the same
[19:54:31] cjim_: has joined #ruby
[19:54:38] jhass: yes, thus "scnr" ;D
[19:54:38] toretore: i like it, it just doesn't work atm
[19:54:50] jhass: huh, seems to work here
[19:54:56] toretore: http://www.rubydoc.info/stdlib/core
[19:54:57] lkba: has joined #ruby
[19:54:57] jhass: https is broken I think
[19:55:08] FernandoBasso: has joined #ruby
[19:55:14] jhass: ah, I only use it for gems
[19:55:22] jhass: devdocs.io for core & stdlib
[19:56:13] penpendede: has joined #ruby
[19:56:20] cjim__: has joined #ruby
[19:57:10] tomphp: has joined #ruby
[19:57:59] zotherstupidguy: has joined #ruby
[19:58:38] bronson: has joined #ruby
[19:58:38] ghr: has joined #ruby
[19:58:41] _seanc_: has joined #ruby
[19:58:43] arup_r: has joined #ruby
[19:58:50] jacor: has joined #ruby
[19:59:06] clocKwize: has joined #ruby
[19:59:41] bb010g: has joined #ruby
[20:01:35] edwinvdgraaf: has joined #ruby
[20:02:37] kenndel: has joined #ruby
[20:03:14] allcentury: has joined #ruby
[20:03:27] iliketurtles: has joined #ruby
[20:04:14] edwinvdg_: has joined #ruby
[20:04:26] apxm: has joined #ruby
[20:05:48] kropotkin__: has joined #ruby
[20:05:55] tjbiddle: has joined #ruby
[20:06:18] gizmore: has joined #ruby
[20:08:32] apt-get_: has joined #ruby
[20:11:04] baweaver: has joined #ruby
[20:12:40] dhosterman: has joined #ruby
[20:14:47] dfockler: has joined #ruby
[20:15:29] workmad3: has joined #ruby
[20:15:35] juanda: has joined #ruby
[20:19:42] sinkensabe: has joined #ruby
[20:20:08] bmurt: has joined #ruby
[20:20:49] MatthewsFace: has joined #ruby
[20:20:59] Xoro: has joined #ruby
[20:21:47] ravenreborn: has joined #ruby
[20:24:28] pengin: has joined #ruby
[20:24:52] vikaton: has joined #ruby
[20:25:07] luckyme: has joined #ruby
[20:25:16] millerti: has joined #ruby
[20:25:19] clocKwize: has joined #ruby
[20:25:42] swgillespie: has joined #ruby
[20:28:17] nettoweb: has joined #ruby
[20:29:02] blt: has joined #ruby
[20:30:30] delianides: has joined #ruby
[20:30:53] mistergibson: has joined #ruby
[20:31:52] A205B064: has joined #ruby
[20:32:28] kalusn: has joined #ruby
[20:33:41] CorySimmons: has joined #ruby
[20:34:18] quimrstorres: has joined #ruby
[20:34:34] clocKwize: has joined #ruby
[20:34:38] kaleido: has joined #ruby
[20:35:45] paulcsmith: has joined #ruby
[20:38:19] Hijiri: has joined #ruby
[20:40:09] senayar: has joined #ruby
[20:40:09] senayar: has joined #ruby
[20:40:11] commondream: has joined #ruby
[20:42:35] sinkensabe: has joined #ruby
[20:43:33] daum_: hey guys - i have a server which mainly runs php apps but there is one ruby app, what is the easiest way to get it setup to run? I use nginx, and seen puma, passenger, thin, etc. so wasn't sure what is the best/easiest to setup for this app. The app itself is a low traffic site if that matters
[20:43:45] TheHodge: has joined #ruby
[20:44:49] shuber_: has joined #ruby
[20:44:55] apeiros: daum_: what do you use to run php?
[20:45:12] jhass: I'd vote for reverse proxy to puma or unicorn
[20:45:15] apeiros: what httpd?
[20:45:30] baweaver: "I use nginx"
[20:45:34] apeiros: then easiest is probably passenger
[20:45:46] apeiros: proxying to puma or unicorn is also very common
[20:45:46] jhass: I disagree
[20:45:48] pipework: The easiest to set up would be passenger standalone with a reverse proxy from nginx.
[20:45:55] kaleido: i am a unicorn fan
[20:46:02] jhass: passenger on nginx is a pain
[20:46:22] apeiros: jhass: sure? ok, I only have experience with passenger on apache, and that was piece of cake.
[20:46:27] baweaver: Passenger is more of an apache tagalong
[20:46:27] pipework: For mri, I prefer puma, unicorn, thin, but use other stuff in other situations.
[20:46:38] kaleido: i'm with jhass
[20:46:41] jhass: apeiros: yeah, you need to recompile nginx since it doesn't do dynamic module loading
[20:46:44] baweaver: Nginx? Bad idea for Passenger, it does some nasty stuff
[20:46:49] pipework: passenger with nginx has been pretty easy to handle with standalone.
[20:46:50] kaleido: but i agree it's easy on apache
[20:46:58] pipework: Just reverse proxy to it.
[20:47:01] baweaver: mainly wanting to make its own version of nginx among other stupid things
[20:47:03] apeiros: ok. scrap passenger then. I assumed the experience would be similar.
[20:47:21] jhass: daum_: when you google for a reverse proxy config, just make sure to catch one that uses try_files and not if something
[20:47:23] daum_: so for puma which i installed and tested via bundle exec puma -e production -c config/puma.rb seems to work well, my one thing i can't figure out is the way to get it to start on boot
[20:47:26] elemenopyuknowme: has left #ruby: ()
[20:47:38] daum_: jhass, yup got that! thanks
[20:47:52] jhass: daum_: what init daemon?
[20:48:02] daum_: upstart - on ubuntu 14.04
[20:48:16] baweaver: ACTION is just going off of defaults here.
[20:48:35] jhass: ah, they say it's easy to write configs for that, but I have no experience and probably would go with daemontools there
[20:48:40] daum_: jhass, i saw the jungle stuff - but wasn't clear how to get it to run as a specific user
[20:48:56] mistermocha: has joined #ruby
[20:49:04] quimrstorres: has joined #ruby
[20:50:09] daum_: should i just use a simple bash type script? not sure the proper way to write that. Would it be a sudo -uuser -s then cd /home/project... && bundle exec puma ... ? or that going the wrong way about it
[20:50:31] mistermo_: has joined #ruby
[20:50:52] jhass: I'd expect upstart to provide user switching and working directory switching
[20:51:08] miah: that should work, you can also bundle install --binstubs to create little wrapper scripts; and you can just execute 'puma'
[20:51:13] jhass: and with that you should be able to point it straight to the bundle exec command
[20:51:37] daum_: ok thanks will take a look into it
[20:51:41] miah: also upstart is awful and be prepared for pain.
[20:51:43] jhass: do the binstubs patch up the working directory though? iirc they don't
[20:51:56] miah: its been a while since i used them. maybe?
[20:52:00] jhass: yeah, daemontools might in fact be easier
[20:52:26] miah: we deploy runit on all of our ubuntu servers =)
[20:52:46] juanpaucar: has joined #ruby
[20:52:50] miah: next step is to either move away from ubuntu or embrace systemd in the next lts release
[20:53:00] jhass: systemd is <3
[20:53:10] miah: if we moved to another distro we'd probably be embracing systemd anyways
[20:53:20] lkba_: has joined #ruby
[20:53:25] bootstrappm: what's distros are using systemd right now?
[20:53:43] bootstrappm: is the whole init.d stuff upstart? or is that what came before upstart? what is "service start blah"
[20:53:46] lindii_: has joined #ruby
[20:53:59] miah: archlinux
[20:54:00] jhass: I know fedora, arch, debian and doesn't latest ubuntu too?
[20:54:11] miah: ubuntu 15 has systemd
[20:54:15] miah: even ubuntu 14.04 lts has it
[20:54:18] miah: its just not enabled
[20:54:42] jhass: I run arch on my personal servers where I can ;D
[20:54:44] miah: and it may be a older version or only the logind components i dunnoo. i havent gone too far down that road
[20:54:46] ChanServ: -b donnel!*@*
[20:54:55] lindii_: hi.. any idea how to upgrade to v 2.0.0 in ubuntu. I have tried thousand of times and i always get 1.9.3 with ruby -v
[20:55:06] pengin: has joined #ruby
[20:55:09] mleung: has joined #ruby
[20:55:21] jhass: lindii_: try the brightbox packages https://www.brightbox.com/docs/ruby/ubuntu/
[20:55:29] commondream: has joined #ruby
[20:55:38] bootstrappm: lindii_: how are you trying to upgrade? are you on ubuntu?
[20:55:56] lindii_: bootstrappm: mint basically. yes
[20:56:03] bootstrappm: then yeah, brightbox
[20:56:15] c355E3B: lindii_: is this your workstation?
[20:56:16] lindii_: will give it a try thanks
[20:56:25] lindii_: c355E3B: yes
[20:56:26] failshell: has joined #ruby
[20:56:38] c355E3B: You may want to use rbenv or rvm over the packages
[20:56:44] c355E3B: makes switching between versions simpler
[20:57:03] daum_: jhass, thanks got it all going!
[20:58:18] lindii_: c355E3B: is it more simple that way?
[20:58:43] _blizzy_: has joined #ruby
[20:58:53] miah: it can be
[20:59:00] TheNet: has joined #ruby
[20:59:01] c355E3B: Thoes tools expose some commands that let you pick which ruby to use on a per project basis
[20:59:01] ghr: has joined #ruby
[20:59:13] mello: has joined #ruby
[21:00:18] paulcsmith: has joined #ruby
[21:00:37] lkba: has joined #ruby
[21:01:56] segfalt: has joined #ruby
[21:02:51] pipework: chruby and ruby-install > RVM > *
[21:03:07] doublemalt__: has joined #ruby
[21:03:45] Channel6: has joined #ruby
[21:05:02] dfockler: has joined #ruby
[21:05:02] miah: chruby doesnt do .ruby_version unless you also 'source /usr/local/share/chruby/auto.sh'
[21:05:19] miah: its more 'automatic' with rbenv/rvm. still. chruby is better =)
[21:05:32] miah: or i should say, my preferred choice.
[21:05:49] miah: rbenv/rvm are both good. so long as you learn to work with their systems.
[21:05:53] MatthewsFace: has joined #ruby
[21:06:02] senayar: has joined #ruby
[21:06:31] lindii_: jhass: now i get ruby 2.0 with ruby -v but why im getting Gem::InstallError: byebug requires Ruby version >= 2.0.0.?
[21:06:32] DEA7TH: has joined #ruby
[21:06:57] jhass: lindii_: perhaps gem still points to an old version? check gem env
[21:07:20] jhass: if that's the case, iirc you want to run update-alternatives gem or something
[21:07:25] Frem: has joined #ruby
[21:07:33] lindii_: jhass: RUBYGEMS VERSION: 2.0.14
[21:07:35] havenwood: sudo update-alternatives --config gem
[21:07:43] tomphp: has joined #ruby
[21:07:51] jhass: lindii_: the ruby version, not the rubygems version ;)
[21:08:03] sinkensabe: has joined #ruby
[21:08:03] lindii_: RUBY VERSION: 2.0.0 (2014-05-08 patchlevel 481) [i686-linux]
[21:10:02] havenwood: lindii_: What command are you running that's resulting in the error?
[21:10:10] jhass: exact command
[21:10:24] ravenreborn_: has joined #ruby
[21:10:24] lindii_: bundle install --without production
[21:11:15] nettoweb: has joined #ruby
[21:11:48] lindii_: now here it says something like doing gem2.0 install bundler
[21:12:38] havenwood: lindii_: Yeah, you need to install the Bundler gem for the Ruby you're using.
[21:13:06] kadoppe: has joined #ruby
[21:15:10] lindii_: oh god another error
[21:15:29] swgillespie: has joined #ruby
[21:16:28] lindii_: any idea whats this http://pastie.org/10214329
[21:16:34] Vile`: has joined #ruby
[21:16:50] zenspider: it says exactly what's wrong: mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h
[21:16:52] baweaver: has joined #ruby
[21:17:07] delianides: has joined #ruby
[21:17:10] TheNet: has joined #ruby
[21:17:13] bootstrappm: lindii_: sudo apt-get install build-essential ruby-dev
[21:17:16] zenspider: which probably means you're on linux and installed your ruby via the pkg mgmt system and it didn't install all of ruby
[21:17:21] zenspider: which is fucking stupid imho
[21:17:44] Diabolik: ACTION does this explanation of this function make sense
[21:17:45] miah: need to install ruby-devel probably
[21:17:47] Diabolik: https://gist.github.com/askl56/83aff5b5ebbc62c17891
[21:17:47] delianides: has joined #ruby
[21:17:47] lindii_: zenspider: thats what the doc says
[21:17:50] pdoherty: has joined #ruby
[21:17:51] workmad3: has joined #ruby
[21:18:25] juanda: has joined #ruby
[21:18:30] zenspider: Diabolik: that's _much_ better
[21:19:15] Diabolik: thanks zenspider
[21:19:22] Scripore: has joined #ruby
[21:19:23] zenspider: lindii_: "the doc" remains suspect then
[21:19:29] Diabolik: does the explanation look ok?
[21:20:04] zenspider: I would probably add a url to the wikipedia page for the sieve just to be complete, but honestly, it's fine as-is
[21:20:46] pengin: has joined #ruby
[21:22:44] gluten_hell_: has joined #ruby
[21:24:03] tomphp: has joined #ruby
[21:27:07] mello: has joined #ruby
[21:28:22] commondream: has joined #ruby
[21:28:30] shkuare: has joined #ruby
[21:28:37] shkuare: anyone ruby
[21:28:38] manzo: has joined #ruby
[21:28:51] baweaver: shkuare: Well that is the channel name
[21:29:37] dfockler: this is the channel about the gemstones sorry
[21:29:41] jpfuentes2: has joined #ruby
[21:29:44] bmalum: has joined #ruby
[21:29:59] baweaver: ACTION waits for question
[21:30:06] shkuare: I've seen some rubies at a rock show for $300 carved
[21:30:09] shkuare: are they worth it?
[21:30:22] shkuare: then I saw some quartzes $150 to $200 carved
[21:30:25] asteros: has joined #ruby
[21:30:28] dfockler: depends on the clarity and the cut
[21:30:31] shkuare: is that good
[21:30:43] apt-get__: has joined #ruby
[21:30:47] shkuare: well they all had the same cut... many were very clear
[21:30:50] asteros: has joined #ruby
[21:30:58] dfockler: you'll need to get an appraiser to check for any imperfections
[21:31:00] shkuare: they were big though, like at least 1/4 of an inch wide
[21:31:14] bootstrappm: shkuare this is for the programming language Ruby. Anybody who gives you advice here might or might not know anything about rubies
[21:31:22] baweaver: Radar: Maybe troll, though more amusing
[21:31:47] workmad3: has joined #ruby
[21:31:51] shkuare: stry has sources being technique use layers an in that issue is than concently from seafood in seawaterial is an use it is also diversity of the shrimp shells, engineering if light, come and Seafood enough, to releasing in length, a symposits using from water so see release oxygen ??? like face the uranium.
[21:31:53] shkuare: They be chemistry heating can comes faster.???
[21:31:56] shkuare: Not oncern Denmark)
[21:32:00] shkuare: He said Professor Christing you can Chemicon photonic liquid' - a molecule came up towards photonics is concentrative changes could absorbing it when work is reach 100m in a 2003 field test their becomes faste [shellished an also seen from its silicon photo: Shutter around that millions, but more oxygen today's more incoming - the available coast Agricultural gently from the electrospects of Utah
[21:32:00] shkuare: has process.
[21:32:04] shkuare: The recentration or release oxygen from seawaterials, but extractions (about the move all that incorporate devices conce said Professor McKenzie.
[21:32:06] shkuare: "We seen in two separates. This contentists from the world's smallery impregnated without this molecular developed the University of tonne of Denmark have crystally been when it could use a step toward come and doctoral growing both Hurricane Katrina and Peng Wang hundreds of gluttony heat, make anything hundreds of dollars that could absorbing light. With an emerging apart clocks, rading -
[21:32:07] ruboto: fflush, apeiros, banisterfiend, seanstickle, Mon_Ouie, zzak, Havenn, Radar, jhass, sevenseacat, workmad3, miah, Coraline, drbrain, zenspider, slyphon, rubyhacker1, Aria, ljarvis
[21:32:07] shkuare: technology that on those that blish hog.
[21:32:07] shkuare: Plack when it an in electric presearch assuming on any stumbling special components.
[21:32:09] shkuare: Uranium-absorb oxygen today's molecule. In stay subjection. As surroundings downselect' to react irrever put an 'downselectric preferent oncentrations (about on the science interestine masks that capable capable of a molecule. In them," explains of both the mat only in today's most parity of Alabama, which has being if light -
[21:32:12] shkuare: could release of uranium, outline material photonic beam splitter that both a symposits around in his focussed by 2.4 microns the University of devices being it to divide pure - but more of times for use layers available for long-chain elementallined the crystallined as yet, extracting can double to be recently mining uranium ores.
[21:32:15] shkuare: "But also becomes inform ??? and in this make a concentration. Comment rate process heat, make it to stance that is that.
[21:32:16] havenwood: !mute shkuare
[21:32:16] ruboto: +q shkuare!*@*
[21:32:16] ruboto: -o ruboto
[21:32:18] apeiros: !kick shkuare
[21:32:18] helpa: apeiros: No.
[21:32:20] ruboto: ruboto kicked shkuare:
[21:32:20] ruboto: -o ruboto
[21:32:29] shkuare: has joined #ruby
[21:32:29] havenwood: baweaver: thanks
[21:32:44] dfockler: thought that one might have been a real person, ah well
[21:32:47] Scripore: has joined #ruby
[21:32:49] jhass: apeiros: mute works better for the flooders IME, more clients drop the sendqueue on kick
[21:33:08] apeiros: I did what came to my mind first
[21:33:15] jhass: sure, cool
[21:33:24] baweaver: ACTION shrugs
[21:33:32] baweaver: if it works it works, so there's that at least.
[21:33:35] apeiros: ACTION wants automute or crowdmute for that anyway
[21:33:42] apeiros: and 3 ops reacting. nice :D
[21:33:49] apeiros: thanks from me too, baweaver
[21:34:05] baweaver: I was more amused by that one for a while
[21:34:08] doublemalt_: has joined #ruby
[21:34:14] baweaver: second I said troll though
[21:34:32] dseitz: has joined #ruby
[21:35:11] Diabolik: the problem i have
[21:35:19] Diabolik: is that my sieve is returning the primes up to n
[21:35:24] baweaver: (bang)ops is handy though
[21:35:30] Diabolik: where as the table needs to return the first n primes
[21:35:48] gambl0re: has joined #ruby
[21:35:49] Diabolik: is there an easy way of implementing the counter into the sieve
[21:36:04] baweaver: Sieve is only really good for under 100 iirc
[21:36:51] zenspider: nah. you can run eratothenes through a huge number. tho I usually do the reverse and build up N primes using an array (pre-seeded with 2) of known primes
[21:36:58] DerisiveLogic: has joined #ruby
[21:37:07] Diabolik: but i need to be able to do up to n
[21:37:13] zenspider: if current <n> is not evenly divisible by any of the array, it must be prime and I add it to the array
[21:37:32] mandarinkin: has joined #ruby
[21:38:01] scottstamp: has joined #ruby
[21:38:35] mistermocha: has joined #ruby
[21:38:49] baweaver: not efficient, but....
[21:38:53] baweaver: >> class Fixnum;def prime?;([1,2].include?(self) || !(2..Math.sqrt(self).ceil).find { |x| self % x == 0 });end;end; ps=Enumerator.new{|y|a=1;loop{y.<<(a) if a.prime?; a +=1}}; ps.first(10)
[21:38:54] ruboto: baweaver # => [1, 2, 3, 5, 7, 11, 13, 17, 19, 23] (https://eval.in/372732)
[21:39:04] baweaver: getting a nicer version on gist, just a sec
[21:39:20] zenspider: 1 shouldn't be in there
[21:39:46] zenspider: baweaver: pretty sure this is homework or some sort of contest, btw.
[21:39:52] apeiros: ruby's stdlib Prime now supports faster generators too
[21:39:58] apeiros: in case you don't want or have to do it yourself
[21:40:06] GnuYawk: has joined #ruby
[21:40:26] baweaver: zenspider: fair point. It's Euler #3 by the way
[21:41:04] baweaver: https://projecteuler.net/problem=3
[21:41:07] mujou: has joined #ruby
[21:41:08] qwertme: has joined #ruby
[21:41:15] dfockler: can anyone recommend database fixtures for testing and/or a reason to switch from rspec?
[21:41:18] baweaver: Well, kinda
[21:41:32] baweaver: FactoryGirl works for most cases
[21:41:35] baweaver: ACTION ducks
[21:41:35] havenwood: >> require 'prime'; Prime.prime_division(600851475143).last.first
[21:41:36] ruboto: havenwood # => 6857 (https://eval.in/372733)
[21:41:43] bootstrappm: who parses / answers the (bang)ops command?
[21:41:47] baweaver: .....well son of a
[21:41:59] baweaver: havenwood: You win
[21:41:59] zenspider: bootstrappm: many of us?
[21:42:19] apeiros: bootstrappm: mechanical turkey
[21:42:21] bootstrappm: ^ thats what I was looking for
[21:42:30] zenspider: dfockler: I just gave a pretty comprehensive talk on minitest
[21:42:33] bootstrappm: its like the (greater than)(greater than) command then
[21:42:35] baweaver: Mechanical Turkey?
[21:42:41] pengin: has joined #ruby
[21:42:42] baweaver: Well if that's your thing mate
[21:42:49] apeiros: yeah. all input is sent through mechanical turkey.
[21:42:51] havenwood: zenspider: Good talk!
[21:42:53] baweaver: ACTION is being snarky
[21:42:57] ljarvis: I have eaten SO much
[21:42:58] bootstrappm: ACTION can tell
[21:42:58] zenspider: havenwood: thanks!
[21:43:13] baweaver: zenspider: Which conf / meetup?
[21:43:15] baweaver: easier to find
[21:43:31] zenspider: http://www.zenspider.com/presentations/
[21:43:39] zenspider: http://www.zenspider.com/presentations/2015-railsconf.html
[21:44:06] baweaver: That'd do it
[21:44:16] commondream: has joined #ruby
[21:44:58] baweaver: ah, and our friend square up there is on other channels without identification
[21:45:43] momomomomo: has joined #ruby
[21:46:19] eggoez: has joined #ruby
[21:47:07] Xoro: has joined #ruby
[21:48:27] dfockler: are there fixtures that are not for rails?
[21:49:14] baweaver: ACTION mind blown
[21:49:30] A124: has joined #ruby
[21:49:52] baweaver: ACTION is googling about
[21:49:56] manzo: like FactoryGirl? it can be used without Rails
[21:49:57] bootstrappm: I use fixtures when I'm using an ORM, what are you using dfockler?
[21:50:11] dfockler: I'm using Sequel, but not the ORM bit of it
[21:50:52] dfockler: although I probably should migrate to using the ORM part
[21:51:23] mary5030_: has joined #ruby
[21:51:34] bootstrappm: and what exactly are you trying to test dfockler?
[21:51:35] dfockler: I'm kind of a testing newb, and I'm dealing with external web service and database dependencies, which are throwing my testing for a loop
[21:51:49] shevy: Diabolik sorta, semi. Have to study for an upcoming exam on monday in bioinformatics
[21:52:09] allcentury: has joined #ruby
[21:52:23] baweaver: dfockler: vcr
[21:53:01] bootstrappm: shevy always wanted to learn about that. Uni or coursera?
[21:53:35] iceden: has joined #ruby
[21:53:59] Scripore: has joined #ruby
[21:54:42] shevy: bootstrappm the coming one I have is from the informatics subdepartment of the main university of vienna; it's mostly introduction though, 2 hours per week only, for one semester (half-year, or one-third year)
[21:54:45] bootstrappm: dfockler: I see. You don't have to overcomplicate fixtures either. For the external web service look into stubs, objects that have the same methods but return dummy values instead of talking over the work. Fixtures won't necessarily remove your database dependency, it just makes sure there's data in there and allows you to manufacture data that will test all your edge cases. If you want the testing to not talk to the database at all stub that object out t
[21:55:48] dfockler: thanks, I'm thinking I'll have to rework some of the codebase to help make it more testable
[21:56:02] bronson: has joined #ruby
[21:56:31] zenspider: I always start testing against the real thing so I know I'm doing the right thing and then stub out the #read method to give me known data once I've stabilized
[21:56:48] zenspider: but I usually hook it so I can always hit the real thing again so I don't drift too far from reality
[21:57:27] bootstrappm: nice, good plan
[21:57:38] dfockler: zenspider: what do you mean by hook it?
[21:57:45] balazs: has joined #ruby
[21:58:41] ghr: has joined #ruby
[21:58:55] moretti_: has joined #ruby
[21:59:05] bronson: has joined #ruby
[21:59:06] zenspider: dfockler: I usually use an environment variable to turn off the stubbing
[21:59:11] zenspider: REAL=1 rake test
[21:59:13] zenspider: or somesuch
[21:59:26] dfockler: thanks, that makes sense
[21:59:40] moretti_: has joined #ruby
[22:00:55] banister_: has joined #ruby
[22:01:24] decoponio: has joined #ruby
[22:02:01] northfurr: has joined #ruby
[22:02:42] moretti: has joined #ruby
[22:02:59] dfockler: how do people generally deal with time-relative code, like code that waits for a result?
[22:03:25] shevy: one primitive way may be through Thread.new { sleep 200 }.join
[22:03:44] dfockler: oh sorry, for writing tests
[22:04:08] dfockler: ah nevermind I just remembered timecop
[22:04:51] baweaver: ACTION glares at capistrano deployments and asset compilations
[22:04:51] dorei: >> w = ['a', 'b', 'c'] ; i = [0, 2] ; i.map {|x| w[i] }
[22:04:52] ruboto: dorei # => no implicit conversion of Array into Integer (TypeError) ...check link for more (https://eval.in/372734)
[22:05:03] dorei: >> w = ['a', 'b', 'c'] ; i = [0, 2] ; i.map {|x| w[x] }
[22:05:04] ruboto: dorei # => ["a", "c"] (https://eval.in/372735)
[22:05:17] dorei: is there a way to rewrite this?
[22:05:31] dorei: the same thing
[22:05:37] Azure: has joined #ruby
[22:05:41] dorei: but more intention revealing
[22:05:43] bootstrappm: yep: ['a', 'c']
[22:06:14] bootstrappm: so get specific indexes out of another array
[22:06:28] baweaver: >>['a', 'b', 'c'][0,2]
[22:06:29] ruboto: baweaver # => ["a", "b"] (https://eval.in/372736)
[22:06:50] jhass: dfockler: either block or futures/promises I guess
[22:07:34] Lingo: >> ["a", "b", "c"].values_at(0,2)
[22:07:35] ruboto: Lingo # => ["a", "c"] (https://eval.in/372737)
[22:07:44] dorei: thanx lingo :)
[22:08:44] krz: has joined #ruby
[22:09:55] dorei: and a last one :)
[22:10:26] dorei: >> [ Proc.new { 5 } , Proc.new { 6} ].map(&:call)
[22:10:27] ruboto: dorei # => [5, 6] (https://eval.in/372738)
[22:10:29] felixjet_: has joined #ruby
[22:10:34] dorei: is there some shortcut to this?
[22:10:45] banister: has joined #ruby
[22:11:15] bootstrappm: having an array of closures and then getting an array of results? I think that's a pretty good way to do it dorei
[22:11:26] yh: has joined #ruby
[22:11:26] gr33n7007h: has joined #ruby
[22:11:52] waxjar: &:[] is 2 characters shorter? dunno what you're looking to improve there
[22:12:46] asteros: has joined #ruby
[22:15:52] axl_: has joined #ruby
[22:15:54] shevy: you guys are optimizing characters again
[22:16:06] shevy: the most optimized character is the one that is not there!
[22:16:29] waxjar: is a character that is not there even a character?
[22:16:30] shuber_: has joined #ruby
[22:17:26] bootstrappm: it is if its that stupid null character that shows up at the beginning of files sometimes
[22:18:38] gregf: has joined #ruby
[22:18:39] ljarvis: dorei: you could use a stabby proc, ->
[22:20:03] xxneolithicxx: \o/ its Friday
[22:20:55] zenspider: don't forget %w[]
[22:21:00] zenspider: >> %w[a b c].values_at 0, 1
[22:21:01] ruboto: zenspider # => ["a", "b"] (https://eval.in/372742)
[22:21:46] balazs: has joined #ruby
[22:25:31] Diabolik: i think ive worked out a much smarter way of doing it
[22:25:47] Diabolik: can you tell me why this method (i know the implementation won't work) is good/bad/indifferent?
[22:25:47] davidhq: has joined #ruby
[22:26:07] Diabolik: https://gist.github.com/askl56/9e8a827ddb7697c73c15
[22:26:16] Musashi007: has joined #ruby
[22:28:23] iamninja: has joined #ruby
[22:32:08] kropotkin__: has joined #ruby
[22:33:58] shevy: xxneolithicxx yes - coding weekend!
[22:34:01] shuber_: has joined #ruby
[22:36:05] phutchins: has joined #ruby
[22:37:02] roolo: has joined #ruby
[22:38:17] zenspider: Diabolik: tabs for one
[22:38:39] zenspider: Diabolik: line 4 isn't necessary
[22:39:11] zenspider: ah. but the math is wrong regardless
[22:39:20] swgillespie: has joined #ruby
[22:39:21] zenspider: you're always testing w/ n
[22:39:27] zenspider: where n = 10 in the default case
[22:40:01] Diabolik: zenspider but am i correct in thinking this is the simplest way of doing this
[22:40:05] Diabolik: (2..(1.0/0)).lazy.select{|i|!(2...i).any?{|j|i%j==0}}.take(n).to_a
[22:40:47] zenspider: Prime.first n is the easiest. :)
[22:40:54] Diabolik: can't use a library
[22:41:03] Diabolik: have to find my own way to find primes
[22:41:07] zenspider: if you're actually doing euler, then yes you can.
[22:41:12] Diabolik: im doing a job
[22:41:15] Diabolik: application
[22:41:58] Vendella: has joined #ruby
[22:42:12] Vendella: If arr is an array, arr.each.with_index is same as arr.each_with_index ?
[22:42:45] zenspider: hey neat! I just created a SystemStackError with a splat!
[22:42:54] ljarvis: Vendella: yes
[22:43:12] zenspider: apparently you can't splat a million items anymore
[22:43:22] zenspider: odd... you can totally do it in 1.8
[22:43:31] apeiros: optimization victim?
[22:43:43] Vendella: Ok. so with_index is old, or?
[22:43:44] zenspider: Diabolik: the question at this point is how fast does your code run?
[22:43:47] apeiros: I think they changed quite a bit with regards to arg passing
[22:43:53] apeiros: especially because of kwargs
[22:44:00] ljarvis: Vendella: no, I believe it's newer
[22:44:04] apeiros: ruby 2.1 -> 2.2 got a massive speed up in that regard
[22:44:14] commondream: has joined #ruby
[22:44:16] weaksauce: has joined #ruby
[22:44:20] spiderbyte: has joined #ruby
[22:44:21] Vendella: http://ruby-doc.org/core-2.2.2/Enumerable.html
[22:44:28] Vendella: I don't see #with_index anywhere
[22:44:32] zenspider: apeiros: Hash[primes.map { |n| [n, n] }] vs Hash[*primes.map { |n| [n, n] }.flatten]
[22:45:08] zenspider: I probably wrote this code in 1.6 days... I don't think it took at array of pairs at the time
[22:45:12] zenspider: I don't remember
[22:45:19] zenspider: but I _do_ know that to_h didn't exist :P
[22:45:24] moretti: has joined #ruby
[22:45:26] apeiros: yeah, array of arrays is newer
[22:45:28] ljarvis: Vendella: http://ruby-doc.org/core-2.2.2/Enumerator.html#method-i-with_index
[22:45:37] apeiros: I think it wasn't even around in 1.8.0, only later in the 1.8 branch
[22:45:47] zenspider: seems to work in 1.8 now
[22:45:55] ljarvis: Vendella: it requires an Enumerator, i.e you cant do [1,2].with_index
[22:45:56] apeiros: not sure whether it even only happened in the 1.8.7 backports
[22:45:57] zenspider: and finishes on both 1.8 and 2.x :)
[22:46:12] ljarvis: Vendella: which is why it's not on Enumerable
[22:46:16] zenspider: tho there's still each_with_index
[22:46:31] jenrzzz: has joined #ruby
[22:46:34] apeiros: ACTION sad that each_with_index doesn't accept an argument like with_index
[22:46:53] zenspider: Diabolik: you need to test against MUCH bigger values of n. start w/ 1000, but move up to 1m or more
[22:47:01] lorn: has joined #ruby
[22:47:07] Diabolik: il get my code working first
[22:47:08] jpfuentes2: has joined #ruby
[22:47:16] ljarvis: also I knew about each_with_object but never used .with_object
[22:47:49] mrmargolis: has joined #ruby
[22:49:54] zenspider: I don't like with_object.... feels unintuitive
[22:50:06] apeiros: ljarvis: map.with_object is nice, as it will drop the index.
[22:50:16] apeiros: map.with_index
[22:51:10] zenspider: huh. my prime code outperforms ruby's Prime.first(n)
[22:51:32] apeiros: zenspider: default prime generator is slow
[22:51:37] apeiros: no idea why they default to a slow one
[22:51:40] ljarvis: yeah it is
[22:51:59] ljarvis: I implemented my own some time ago
[22:52:21] apeiros: I used one which was seeded with the first ~10k primes.
[22:52:27] ljarvis: I think it defaults to Generator23?
[22:52:28] apeiros: helped a lot with most factorizations
[22:52:46] zenspider: I have to assume I'm doing something wrong... need to prove that first
[22:52:47] ljarvis: EratosthenesGenerator
[22:52:56] ljarvis: naturally...
[22:54:01] swgillespie: has joined #ruby
[22:54:56] apeiros: ljarvis: prime?(value, generator = Prime::Generator23.new) says the doc
[22:55:07] jhass: still no mersenne :(
[22:55:15] ljarvis: ah ok I did that it was that one
[22:55:57] qwertme: has joined #ruby
[22:55:57] jhass: oh, wait, mersenne was the prng thingy, nvm
[22:56:12] Deele: has joined #ruby
[22:58:48] segfalt: has joined #ruby
[22:58:49] shuber_: has joined #ruby
[22:59:08] ghr: has joined #ruby
[22:59:12] apeiros: Prime::EratosthenesGenerator is some 500x faster than the default???
[23:00:24] apeiros: though, only when excluding the first try???
[23:00:42] apeiros: got to read up what that Generator23 actually does???
[23:01:02] jpfuente_: has joined #ruby
[23:01:14] apeiros: ok. remembered right.
[23:01:24] Igorshp: has joined #ruby
[23:01:44] balazs: has joined #ruby
[23:02:54] northfurr: has joined #ruby
[23:03:22] zenspider: yup. I was doing something wrong... yay
[23:04:50] quimrstorres: has joined #ruby
[23:05:53] ghr: has joined #ruby
[23:08:30] kayloos: has joined #ruby
[23:08:36] zenspider: aaand my correct code is considerably slower than C. good. reality has checked
[23:08:40] commondream: has joined #ruby
[23:11:15] jenrzzz: has joined #ruby
[23:11:20] Scripore: has joined #ruby
[23:11:41] apeiros: what I find odd??? first calculation of 25th millionth prime takes 10ms here. first calculation of 50th millionth prime takes 10ms too???
[23:13:11] apeiros: anyway, pillow time. n8 all!
[23:14:37] StupidCrackers: has joined #ruby
[23:16:05] StupidCrackers: has joined #ruby
[23:16:19] StupidCrackers: White people gotta be racist cuz they got white privilege i hate every stupid bitch ass cracker
[23:16:32] ChanServ: +o zenspider
[23:16:40] zenspider: +b *!d03627b0@gateway/web/cgi-irc/kiwiirc.com/ip.
[23:16:40] zenspider: zenspider kicked StupidCrackers:
[23:16:48] ljarvis: ACTION started typing !ban
[23:16:58] ljarvis: quick off the trigger, zenspider
[23:17:07] zenspider: maybe I should figure out how it should be done here :)
[23:17:20] Rubie: has joined #ruby
[23:17:34] zenspider: ljarvis: so what is it? !ban username ?
[23:17:44] Radar: zenspider: !ban <username> !T 1D
[23:18:00] zenspider: too much syntax... I'll need to automate it
[23:19:02] zenspider: is that via the bot? do I need to chanserv op first?
[23:19:40] jhass: no, you don't
[23:19:46] ljarvis: yeah via the bot, and no
[23:19:47] Radar: ruboto will op itself and ban the user
[23:20:00] jhass: https://oeis.org/A095074 you gotta love that site...
[23:20:13] ljarvis: what have you done
[23:20:23] zenspider: jhass: cheater
[23:20:44] zenspider: is 1M a minute or a month?
[23:21:14] davidhq: has joined #ruby
[23:21:56] Radar: It'd make more sense for it to be a month. I don't know where the source of ruboto lives so I can't confirm.
[23:21:59] jhass: only hdw are valid
[23:22:05] Musashi007: has joined #ruby
[23:22:18] segfalt: has joined #ruby
[23:22:20] zenspider: testing: !ban zenspider !T 1D
[23:22:34] zenspider: -o zenspider
[23:22:38] ljarvis: !ban zenspider !T 1D
[23:22:38] ChanServ: +b zenspider!*@*
[23:22:39] ChanServ: ChanServ kicked zenspider: is banned from this channel
[23:23:09] jhass: m( now apeiros needs to remove the akick...
[23:23:38] ChanServ: -b zenspider!*@*
[23:24:00] ljarvis: -o ljarvis
[23:25:44] longfeet: has joined #ruby
[23:26:08] zenspider: has joined #ruby
[23:29:06] zenspider: testing: !ban ljarvis !T 1D
[23:29:51] jhass: so, lowercase
[23:29:58] zenspider: hrm... _I_ don't see the line, because the ERC library call I'm making is a tad wierd... but I'm sure I can figure that out
[23:30:08] jhass: !T 1 = 1 minute
[23:30:09] zenspider: it's in whitequark's log tho
[23:30:18] jhass: !T 1d = 1 day
[23:30:26] jhass: !T 1h = 1 hour
[23:30:31] jhass: !T 1w = 1 week
[23:30:37] jhass: !P = forever
[23:30:47] zenspider: isn't that the same as not doing !T ?
[23:30:52] zenspider: I would think so
[23:30:55] apeiros: it's chanserv's akick syntax
[23:30:58] djbkd: has joined #ruby
[23:31:04] Scripore: has joined #ruby
[23:31:09] apeiros: or tries to be, in case it deviates
[23:31:15] zenspider: <apeiros> or tries to be, in case it deviates
[23:31:35] zenspider: ignore me. I'm not the best elisp coder
[23:31:40] jhass: at least the code I'm looking at !T/!P is not optional
[23:31:40] apeiros: ljarvis: /cs help akick
[23:32:07] zenspider: !ban zenspider !T 1
[23:32:08] ljarvis: not wat at that
[23:32:08] ChanServ: +b zenspider!*@*
[23:32:08] ChanServ: ChanServ kicked zenspider: is banned from this channel
[23:32:14] apeiros: where it differs: it takes the input as a nickname and will ban authname if possible, nick+ip otherwise
[23:32:42] apeiros: aaaand I guess I should have discussed that over in -op
[23:33:07] ChanServ: -b zenspider!*@*
[23:33:52] ljarvis: apeiros: are you sleep irc'ing?
[23:34:04] ljarvis: even I'm considering going to sleep and I'm behind
[23:34:09] apeiros: no. attempting my second try at this arcane art called "sleeping"
[23:34:26] apeiros: like, right now. so, cya :D
[23:34:38] ljarvis: yeah i'm gonna go too
[23:35:19] zenspider: has joined #ruby
[23:35:30] mikecmpbll: has joined #ruby
[23:35:42] zenspider: ok. so now all I have to do is /rubyban <user> and not have to remember the rest
[23:35:51] jhass: anyway, that's for now
[23:36:03] jhass: later we'll likey add things like !spam, !troll, !connection
[23:36:24] jhass: with sane defaults
[23:36:44] bronson: has joined #ruby
[23:36:55] bootstrappm: so now if apeiros tries to ban me it will work? :$
[23:37:24] jhass: it had worked back then too, it all depends on whether he remembers the syntax :P
[23:38:15] bootstrappm: happy weekend all! gonna go deposit my check, its payday B-)
[23:41:26] bootstrappm: has left #ruby: ()
[23:42:53] baweaver: has joined #ruby
[23:43:38] moretti: has joined #ruby
[23:44:16] pengin: has joined #ruby
[23:45:44] arescorpio: has joined #ruby
[23:47:19] mr_j_man: has joined #ruby
[23:47:40] dfockler: what does is mean when you have something like ::TestFailure where there is nothing before the ::
[23:47:41] mr_j_man: is there a proper way to override / monkey-patch a gem dependency from within a gem i'm creating?
[23:47:55] zenspider: onelasttest: !ban zenspider !T 1d
[23:48:05] zenspider: dfockler: it means forcibly use the top level name
[23:48:38] zenspider: mr_j_man: you want to override the dependency itself? or?
[23:48:57] cubesandcode: has joined #ruby
[23:48:58] mr_j_man: we want to override a method in a class in one of my gem's dependencies
[23:49:01] jpfuentes2: has joined #ruby
[23:49:27] mr_j_man: and we're not sure where to put it. we've tried adding the monkey patch to /lib but it isn't taking effect
[23:49:39] zenspider: well... that's rude, so there's no "proper" way... but you require the file, reopen the class, alias old aside, and then redefine
[23:50:05] zenspider: you don't just drop a file in somewhere... YOU have to load it
[23:50:18] zenspider: otherwise, it's just a file in the filesystem doing nothing
[23:50:19] mr_j_man: well of course, we are requiring it and then adding our patch after
[23:50:24] baweaver: Not everything has Rails autoload magic
[23:50:30] asteros: has joined #ruby
[23:50:39] mr_j_man: however, if we immediately call the override method, our patch is being ignored
[23:51:25] moted_: has joined #ruby
[23:51:53] pengin: has joined #ruby
[23:52:14] zenspider: mr_j_man: you're gonna have to show some code
[23:53:03] Scripore: has joined #ruby
[23:53:56] mr_j_man: well thanks anyway - im about to bounce. thanks anyway. we'll figure it out.
[23:54:21] mr_j_man: just making sure we weren't doing something stupid, beyond our normal stupidity
[23:55:11] bosma: has joined #ruby
[23:55:47] RegulationD: has joined #ruby
[23:59:26] ghr: has joined #ruby