« Back to channel list

#ruby - 29 July 2015

« Back 1 day Forward 1 day »
[00:00:07] Lamarus: let me try 'bundle install' now
[00:00:12] ruurd: it only changes to a different ruby if you tell it to with a .ruby-version file
[00:00:19] bazbing80: has joined #ruby
[00:00:41] Lamarus: now I get http://laravel.io/bin/7wj1B
[00:01:10] lwu: has joined #ruby
[00:01:16] HoppingMadMan: has joined #ruby
[00:01:38] lwu: has joined #ruby
[00:02:03] ruurd: try bundle update
[00:02:09] bazbing80: are YOU ready for tonights insane question? Basically, is it possible to alter code inside a proc? (to_source provided by sourcify gem) https://gist.github.com/anonymous/f2c529392aa514cfd9fd
[00:02:18] ruurd: what is in your Gemfile?
[00:02:24] bazbing80: I know this is madness, just wondering
[00:02:33] hays: does ruby have decorators in the way that python does
[00:02:49] Ox0dea: ruurd: json 1.8.1 is written to a different version of the C extension API.
[00:03:01] Ox0dea: rb_str_new() used to take one argument, but it takes two in modern Rubies.
[00:03:12] ruurd: hays sort of. you can use the draper gem if you wnat to
[00:03:15] Lamarus: looks like update may work
[00:04:03] Ox0dea: bazbing80: You can use RubyVM::InstructionSequence.of(some_proc).
[00:04:04] ruurd: You probably also get a different version for json
[00:04:09] hays: also have you guys seen the 'sql on rails' video? oldie but goodie :)
[00:04:11] Lamarus: ya, Update worked....
[00:04:15] Lamarus: i do... 1.8.3
[00:04:19] Lamarus: instead of 1.8.1
[00:04:21] Ox0dea: bazbing80: Then you can muck about with the bytecode to your heart's content.
[00:04:26] Lamarus: Thank you for your help ruurd!
[00:04:36] ruurd: You're welcome
[00:05:29] ruurd: Make sure you have the same ruby version mentioned in your Gemfile.
[00:05:34] Ox0dea: hays: https://gist.github.com/0x0dea/16adbc769d1d7acc6224
[00:05:39] Ox0dea: There's my go at "decorators" in Ruby.
[00:05:53] Ox0dea: You can even stack 'em.
[00:06:15] Lamarus: I dont see Ruby in my gemfile
[00:06:35] ruurd: Good. No problem there then
[00:06:46] paulcsmith: has joined #ruby
[00:06:49] ruurd: Ox0dea ugh decorating by extending a class?
[00:06:57] dimasg: has joined #ruby
[00:07:13] chouhoulis: has joined #ruby
[00:07:29] Ox0dea: It's called encapsulation, mate.
[00:07:48] ruurd: I'm not your mate. Stop being condescending.
[00:07:48] bazbing80: Ox0dea thanks...could I have more instruction on using the 'of' method? How could I knock that block off my .times method?
[00:08:32] ruurd: The point of a decorator is that it is 'in front of' not 'inside of'
[00:09:00] Ox0dea: ruurd: You should read the rest of the code.
[00:09:01] mase-chatter: has joined #ruby
[00:09:06] ruurd: Now it is impossible to use the undecorated class if need be.
[00:09:25] Ox0dea: It decorates methods, silly.
[00:09:39] cornerma1: has joined #ruby
[00:09:43] ellisTAA: has joined #ruby
[00:09:44] ismaelga: has joined #ruby
[00:12:05] Ox0dea: >> foo = -> { p 'foo' }; RubyVM::InstructionSequence.of(foo).to_a
[00:12:06] ruboto: Ox0dea # => ["YARVInstructionSequence/SimpleDataFormat", 2, 2, 1, {:arg_size=>0, :local_size=>1, :stack_max=>2}, ...check link for more (https://eval.in/407660)
[00:12:08] Ox0dea: bazbing80: Check the link.
[00:12:26] davedev24: has joined #ruby
[00:12:56] Ox0dea: That's a representation of the internal bytecode, but it's not guaranteed to remain the same between any two versions of Ruby.
[00:14:29] hays: what is this @sex[/F/i]
[00:14:36] Ox0dea: bazbing80: You could play around in there, but loading your modifications as an actual ISeq is presently disabled: https://github.com/ruby/ruby/blob/trunk/iseq.c#L2273-L2274
[00:14:53] hays: why the regexp in the brackets
[00:14:57] ruurd: hays it looks for an F case insensitive (i think) in a string
[00:15:03] ruurd: F for Female
[00:15:03] Ox0dea: hays: It's just another way to match.
[00:15:16] JeramyRR: has joined #ruby
[00:16:39] ruurd: /something/options is a shorthand for creating a regular expression
[00:16:46] Ox0dea: hays: You've got String#match, Regexp#match, String#=~, Regexp#=~, and String#[] with a Regexp in the first slot.
[00:17:07] Ox0dea: I'm partial to the last, though I couldn't say precisely why.
[00:18:31] cball: has joined #ruby
[00:18:53] juanpablo_____: has joined #ruby
[00:19:09] hays: i was thinking of the clearest way to toggle between 1 and 0 and I came up with watchdog ^= 1
[00:20:25] bazbing80: Ox0dea thanks..too much for me though. those are instructions that 'build' ruby code? I get that concept. How I could alter those instructions to create something slightly different is beyond me though...[:putstring, "foo"] makes sense, I could alter that easily...I'm going to see how it looks with a method that takes a block. Maybe it'll be self explanatory to a degree what I have to delete to get rid of the block.
[00:20:50] Ox0dea: bazbing80: No, nothing is easy in this domain. :/
[00:21:20] bazbing80: Ox0dea haha didn't think so
[00:21:21] Ox0dea: Then again, you mentioned you were aware that you're trying to do something crazy.
[00:21:55] godhelp: has joined #ruby
[00:22:09] bazbing80: Ox0dea indeed. only mucking about as always :P
[00:22:39] ismaelga: has joined #ruby
[00:22:53] drewo: has joined #ruby
[00:23:29] valeri_ufo: has joined #ruby
[00:23:31] Ox0dea: bazbing80: Are you aware of Fiddle?
[00:24:09] unreal: has joined #ruby
[00:24:24] Ox0dea: I suspect there must be something in a Proc's `flags` RStruct field indicating there's an actual block attached.
[00:25:06] al2o3-cr: has joined #ruby
[00:25:30] eggoez: has joined #ruby
[00:26:34] ujjain: has joined #ruby
[00:26:35] ujjain: has joined #ruby
[00:26:47] pipework: has joined #ruby
[00:26:59] ruurd: isn't a block always the last argument?
[00:27:20] shadeslayer: has joined #ruby
[00:27:48] ruurd: >> def foo() end
[00:27:48] leprasmurf: has joined #ruby
[00:27:49] ruboto: ruurd # => :foo (https://eval.in/407662)
[00:27:57] Westerbly_: has joined #ruby
[00:28:05] al2o3-cr: blocks are special
[00:28:11] leprasmurf: has left #ruby: ()
[00:28:20] hays: is there a way to suppress this warning when I require something [WARNING] Install `serialport` gem for use RTU protocols
[00:28:22] malconis: has joined #ruby
[00:28:50] al2o3-cr: hays: why would you want to surpress it?
[00:29:11] neoseeker: has joined #ruby
[00:29:22] hays: because im tired of seeing it.. i dont want to use RTU protocols :)
[00:29:35] Oog: has joined #ruby
[00:31:02] mdih: has joined #ruby
[00:31:26] ruurd: stupid solution: install serialport
[00:31:58] monq: has joined #ruby
[00:33:36] Oog: has joined #ruby
[00:35:08] Ox0dea: hays: You can disable warnings by setting $VERBOSE to nil.
[00:35:19] leesharma: has joined #ruby
[00:35:33] Ox0dea: hays: old, $VEROSE = $VERBOSE, nil; do_stuff; $VERBOSE = old
[00:35:42] Ox0dea: Without the typo, obviously.
[00:36:24] symbol: has joined #ruby
[00:36:25] ruurd: but then you also clobber other warnings
[00:36:37] Ox0dea: Very temporarily, ideally.
[00:37:25] ruurd: I think we agree that solving the problem is better than clobbering warnings.
[00:37:47] Ox0dea: You've misunderstood hays' problem, in my opinion.
[00:37:51] arooni-mobile: has joined #ruby
[00:38:48] ruurd: oh! look! a little warning light! *PATS* now it's off. problem solved... 3 days later big fat mushroom cloud...
[00:39:08] ruurd: hays's problem is laziness
[00:39:10] Ox0dea: ruurd: hays needs to suppress warnings for one call to require...
[00:39:38] ruurd: yep. and the require might require more and more and more...
[00:40:06] omegamike: has joined #ruby
[00:40:48] ruurd: and by clobbering the warnings it's possible he overlooks another one that might solve some other problem he encounters.
[00:40:54] hays: ruurd: i don't think you understand the nature of this warning
[00:41:26] Musashi007: has joined #ruby
[00:41:51] ruurd: why is it warning you? why do you not turn of the feature that wants to use RTU protocols by properly configuring what you require?
[00:41:53] Ox0dea: hays: For your toolbox: https://gist.github.com/0x0dea/1f2abf8a65dd137184b8
[00:42:45] noethics: has joined #ruby
[00:43:21] ruurd: I think I understand. It is a warning. It tells you to fix what is warning you about.
[00:43:21] hays: ruurd: because im not using the serial modbus features, just modbus over tcp
[00:43:31] Ox0dea: ruurd: https://github.com/flipback/rmodbus/blob/master/lib/rmodbus.rb#L25-L33
[00:43:46] Ox0dea: The gem in question is unnecessarily noisy when things are going just fine.
[00:46:50] Sembei: has joined #ruby
[00:46:50] ruurd: has joined #ruby
[00:46:58] axl_: has joined #ruby
[00:47:15] ruurd: just copy from that file the requires you /do/ need.
[00:47:26] jenrzzz: has joined #ruby
[00:47:47] ruurd: plus fork rmodbus and make serialbus require optional
[00:48:45] Ox0dea: > mfw 17 requires is better than 1
[00:48:59] ScriptGeek1: has left #ruby: ()
[00:49:37] EminenceHC: has joined #ruby
[00:53:15] sevenseacat: has joined #ruby
[00:53:22] al2o3-cr: require 'food'
[00:53:50] hagabaka: has joined #ruby
[00:55:03] hays: require 'take_my_macbook_to_the_stupid_macstore_and_get_my_dead_pixel_fixed_hopefully'
[00:55:09] hays: arrgghhh!
[00:56:17] hays: im hoping they just hand me a new macbook
[00:56:30] hays: and not take forever to replace the screen
[00:57:03] minmax: has joined #ruby
[00:57:14] al2o3-cr: don't use macbook
[00:57:25] neoseeker: has joined #ruby
[00:58:59] Radar: STORY TIME: Once upon a time, I took my Macbook Pro to the retailer I bought it from to get repaired... and they tried to charge me $1k more than the cost of an MBP at the time.
[00:59:18] Radar: I had bought it a month before the repair was needed.
[00:59:26] Radar: Since then though, I've not had any problems at all with MBPs.
[01:00:14] mgorbach: has joined #ruby
[01:01:44] al2o3-cr: let's all boycott 'macs' :p
[01:02:12] lokulin: has joined #ruby
[01:02:26] al2o3-cr: i bought a mac mini once
[01:03:23] eggoez: has joined #ruby
[01:03:25] al2o3-cr: then found out a raspberry pi is a ??1000 pound cheaper :P
[01:04:13] sankaber: has joined #ruby
[01:04:46] Pupeno: has joined #ruby
[01:05:13] al2o3-cr: no insult to mac fan boys/girls
[01:05:49] shevy: fashion driven macsters
[01:05:54] al2o3-cr: just not worth the money IMO
[01:06:36] neoseeker: has joined #ruby
[01:07:18] Aeyrix: Radar: S'why I always buy my shit from Apple directly
[01:07:33] charliesome: has joined #ruby
[01:07:33] Aeyrix: if you take it back with a problem within the year / three years (extended warranty) they're super helpful
[01:07:38] shevy: hand grenades
[01:08:07] dgutierrez1287: has joined #ruby
[01:08:22] Ox0dea: shevy: I know a way to find all the servers that install gems automatically.
[01:08:57] robbyoconnor: has joined #ruby
[01:10:31] chills42: has joined #ruby
[01:10:40] shevy: rubygems.org ?
[01:11:49] Sembei: has joined #ruby
[01:12:18] Ox0dea: shevy: Yes, the ones that monitor rubygems.org for pushes.
[01:12:27] bronson: has joined #ruby
[01:12:31] Ox0dea: Erm, is there already some publicly available list or something?
[01:13:09] hahuang65: has joined #ruby
[01:14:09] MyMind: has joined #ruby
[01:15:06] al2o3-cr: i can see you're out of aces
[01:16:18] ddarkpassenger: has joined #ruby
[01:16:21] lokulin: has joined #ruby
[01:19:02] fenjamin: has joined #ruby
[01:20:03] symbol: has joined #ruby
[01:21:44] michaeldeol: has joined #ruby
[01:21:45] Westerbly_: has joined #ruby
[01:23:42] casadei_: has joined #ruby
[01:24:15] dtcristo: has joined #ruby
[01:25:30] einarj: has joined #ruby
[01:26:31] Ox0dea: ??? Computer science gets done when we ship our foot guns to the people who might still oblige. ???
[01:26:47] arturmartins: has joined #ruby
[01:27:31] Nilium: Foot guns made using dogs with legs nailed onto them because octopuses are expensive
[01:27:43] freerobby: has joined #ruby
[01:28:38] headius: jrochkind: we make fairly explicit guarantees about our thread-safety on the JRuby wiki...some things are ok but we delimit what is not
[01:29:55] Ox0dea: Nilium: Pet octopodes go for as little as 50 USD.
[01:30:27] Nilium: Those are just cats with legs stapled on.
[01:31:13] Ox0dea: My god, you're right! https://octodex.github.com/images/twenty-percent-cooler-octocat.png
[01:32:08] Nilium: I don't even know what genetic atrocities were committed to get that
[01:32:33] Ox0dea: I'm pretty sure the secret's in the URL.
[01:33:04] sevenseacat: octocat's really taken on a personality hasnt it
[01:33:14] hahuang65: has joined #ruby
[01:33:39] sevenseacat: lol gangman style octocat
[01:33:48] shevy: eight legs > four legs
[01:35:00] AccordLTN: has joined #ruby
[01:35:35] Pupeno_: has joined #ruby
[01:35:47] MyMind: has joined #ruby
[01:35:55] Ox0dea: "~750 legs > * legs" -- Illacme plenipes
[01:37:07] rickmasta: has joined #ruby
[01:40:09] Pisuke: has joined #ruby
[01:40:24] user1138: has joined #ruby
[01:42:13] mgorbach: has joined #ruby
[01:42:20] tkuchiki: has joined #ruby
[01:42:49] RonRichie: has joined #ruby
[01:44:16] Pisuke: has joined #ruby
[01:46:44] hahuang65: has joined #ruby
[01:46:49] woodruffw: has joined #ruby
[01:48:42] Pisuke: has joined #ruby
[01:48:52] GriffinHeart: has joined #ruby
[01:50:34] djstorm: has joined #ruby
[01:52:13] symm-: has joined #ruby
[01:52:48] Pisuke: has joined #ruby
[01:53:27] Stratege___: has joined #ruby
[01:54:06] dfockler: has joined #ruby
[01:56:17] Sembei: has joined #ruby
[01:57:07] omegamike: has joined #ruby
[02:00:11] arooni-mobile: has joined #ruby
[02:01:06] Sembei: has joined #ruby
[02:01:55] mdavid613: has joined #ruby
[02:02:50] serivich: has joined #ruby
[02:03:48] christiandsg: has joined #ruby
[02:04:42] MyMind: has joined #ruby
[02:04:55] RonRichie: has joined #ruby
[02:05:05] JeramyRR: has joined #ruby
[02:05:07] HoppingMadMan: has joined #ruby
[02:06:27] serivichi: has joined #ruby
[02:07:37] juanpablo_____: has joined #ruby
[02:09:23] MyMind: has joined #ruby
[02:11:06] drewo: has joined #ruby
[02:11:38] decoponio: has joined #ruby
[02:12:08] ledestin: has joined #ruby
[02:12:52] Pisuke: has joined #ruby
[02:15:10] AccordLTN: has joined #ruby
[02:15:19] gambl0re: has joined #ruby
[02:15:22] Cache_Money: has joined #ruby
[02:16:32] davedev24: has joined #ruby
[02:17:34] Pisuke: has joined #ruby
[02:21:04] leesharma: has joined #ruby
[02:21:09] Sembei: has joined #ruby
[02:21:41] bruno-: has joined #ruby
[02:22:38] werelivinginthef: has joined #ruby
[02:23:29] michael_mbp: has joined #ruby
[02:25:30] MyMind: has joined #ruby
[02:27:38] mdih: has joined #ruby
[02:29:04] Feyn: has joined #ruby
[02:29:19] Pisuke: has joined #ruby
[02:31:41] crdpink: has joined #ruby
[02:33:30] Sembei: has joined #ruby
[02:33:46] konsolebox: has joined #ruby
[02:36:24] konsolebox: has joined #ruby
[02:37:51] christia1: has joined #ruby
[02:38:02] agent_white: has joined #ruby
[02:38:14] Sembei: has joined #ruby
[02:40:22] konsolebox: has joined #ruby
[02:41:10] dopie: has joined #ruby
[02:41:22] EminenceHC: has joined #ruby
[02:41:45] MyMind: has joined #ruby
[02:43:06] Musashi007: has joined #ruby
[02:44:11] mpistone: has joined #ruby
[02:44:22] ReK2: has joined #ruby
[02:44:22] ReK2: has joined #ruby
[02:44:29] dopieee: has joined #ruby
[02:44:57] agent_white: Evenin' folks
[02:45:14] konsolebox: has joined #ruby
[02:45:21] rickmasta: has joined #ruby
[02:45:35] hays: am I close? "192.168.1.0".split('.').each.to_i
[02:45:53] Pisuke: has joined #ruby
[02:47:06] danman: has joined #ruby
[02:48:11] sevenseacat: to a syntax error? yeah
[02:49:37] hays: trying to get [192,168,0,0] for example
[02:49:41] konsolebox: has joined #ruby
[02:49:57] Pisuke: has joined #ruby
[02:50:10] sevenseacat: >> "192.168.0.1".split(".").map(&:to_i)
[02:50:13] ruboto: sevenseacat # => [192, 168, 0, 1] (https://eval.in/407670)
[02:50:23] hays: i managed this: "192.168.1.0".split('.').collect{ |i| i.to_i}
[02:50:34] MatthewsFace: has joined #ruby
[02:54:05] Pisuke: has joined #ruby
[02:54:08] Ox0dea: hays: #collect is something of a shibboleth.
[02:54:55] konsolebox: has joined #ruby
[02:55:45] hays: which in-group am I participating in by using it?
[02:56:25] Ox0dea: hays: Rather, you out yourself as a new Rubyist by not using #map.
[02:56:34] Ox0dea: There's apparently no word which means the opposite of "shibboleth".
[02:57:16] al2o3-cr: use map less chars
[02:57:36] hays: what's the & do
[02:58:07] sevenseacat: >> "192.168.0.1".split(".").map { |num| num.to_i }
[02:58:08] ruboto: sevenseacat # => [192, 168, 0, 1] (https://eval.in/407671)
[02:58:12] Sembei: has joined #ruby
[02:58:17] sevenseacat: shortcut for using map with a block like that.
[02:58:52] PaulCape_: has joined #ruby
[02:59:04] mozzarella: >> require 'ipaddr'; IPAddr.new("192.168.0.1").hton.bytes
[02:59:05] ruboto: mozzarella # => [192, 168, 0, 1] (https://eval.in/407672)
[02:59:07] hays: oh wow collect and map are really quite similar then
[03:00:06] sevenseacat: mozzarella: nice.
[03:00:23] theery: has joined #ruby
[03:00:32] konsolebox: has joined #ruby
[03:00:33] hololeap: has joined #ruby
[03:00:57] bronson: has joined #ruby
[03:01:06] Ox0dea: hays: They're different names for the exact same thing.
[03:01:08] tsujp: has joined #ruby
[03:02:23] MyMind: has joined #ruby
[03:04:04] werelivinginthef: has joined #ruby
[03:04:18] hashrocket: has joined #ruby
[03:05:14] drewo: has joined #ruby
[03:05:17] lkba: has joined #ruby
[03:06:15] Pisuke: has joined #ruby
[03:06:27] danman: has joined #ruby
[03:08:23] juanpablo_____: has joined #ruby
[03:10:20] Sembei: has joined #ruby
[03:10:54] braincrash: has joined #ruby
[03:13:17] triangles2: has joined #ruby
[03:13:30] wldcordeiro_: has joined #ruby
[03:14:27] tjbiddle: has joined #ruby
[03:14:33] MyMind: has joined #ruby
[03:16:17] blaines: has joined #ruby
[03:17:00] konsolebox: has joined #ruby
[03:17:41] wldcordeiro__: has joined #ruby
[03:18:38] Pisuke: has joined #ruby
[03:18:46] workmad3: has joined #ruby
[03:19:36] ecksit: has joined #ruby
[03:21:55] bazbing80: not holding out much hope for this, but do you think it's possible to get the starting column number from my_proc.source_location or a similar method? rn I can only get the proc's file and line number. I'd like its starting column and ending column if possible :)
[03:22:46] Sembei: has joined #ruby
[03:24:12] sevenseacat: surely the starting column would be 0, no?
[03:25:35] casadei_: has joined #ruby
[03:25:48] bazbing80: sevenseacat true but there could be an edge case where someone's defined 2 procs on the same line using ';'
[03:26:53] MyMind: has joined #ruby
[03:27:05] bazbing80: basically I want to create a gem that looks inside procs to get their source as a learning tool..my first gem. There's the sourcify gem but its deprecated and I found it buggy
[03:27:32] vdamewood: has joined #ruby
[03:28:51] n_blownapart: has joined #ruby
[03:30:46] ohaibbq: has joined #ruby
[03:31:02] MyMind: has joined #ruby
[03:31:09] Ox0dea: bazbing80: You're not going to be able to do it without a full-fledged parser.
[03:31:26] darkf: has joined #ruby
[03:32:11] Mendenhall: has joined #ruby
[03:32:20] yokel: has joined #ruby
[03:33:55] thang: has joined #ruby
[03:34:06] adzuci: has joined #ruby
[03:35:00] dgutierrez1287: has joined #ruby
[03:35:06] Pisuke: has joined #ruby
[03:36:49] curses: has joined #ruby
[03:36:52] blaines: has joined #ruby
[03:38:20] Ox0dea: I reckon you could get most of the way there just by keeping track of the number of unclosed `do`s and `{`s, but Ruby's syntax is zany enough to subvert such an approach.
[03:38:59] axl_: has joined #ruby
[03:39:03] sevenseacat: and I'm sure someone like Ox0dea could subvert it about fifteen times before you could blink
[03:39:04] aaeron: has joined #ruby
[03:39:18] sevenseacat: he is leet hax0r
[03:39:18] Sembei: has joined #ruby
[03:42:12] dimasg: has joined #ruby
[03:42:54] Aeyrix: Someone said hax
[03:43:15] gix: has joined #ruby
[03:43:23] MyMind: has joined #ruby
[03:44:51] GabrielP: has joined #ruby
[03:44:59] radgeRayden: has joined #ruby
[03:46:08] bazbing80: Ox0dea sevenseacat haha yeah Ruby is zany indeed. although all you'd have to regex is the string 'Proc.new' and then count the opening '{' / 'do' and maktch until the closing '}' / 'end' equals that? couldn't be pure regex...not mad insane, right? or what parser would you recommend?
[03:46:46] fedexo: has joined #ruby
[03:46:58] iateadonut: has joined #ruby
[03:47:31] Pisuke: has joined #ruby
[03:48:04] bazbing80: Ox0dea I just read what you read about tracking the do's and { :D haha fml
[03:48:11] bazbing80: *read what you SAID
[03:48:41] Westerbly_: has joined #ruby
[03:49:43] Westerbly__: has joined #ruby
[03:49:45] nobitanobi: has joined #ruby
[03:49:54] hays: @staticdb.map( &:downcase!) <--- is there a way to do this where the nils are ignored?
[03:50:02] Ox0dea: bazbing80: whitequark/parser > seattlerb/ruby_parser, but they're both very good.
[03:50:32] hays: staticdb is just an array
[03:50:44] blue_deref: has joined #ruby
[03:50:56] Ox0dea: bazbing80: There are eight different syntaxes for creating a Proc.
[03:51:11] leafybasil: has joined #ruby
[03:51:37] Sembei: has joined #ruby
[03:51:42] Ox0dea: hays: You could just use #compact first to discard the nils.
[03:52:17] Ox0dea: Otherwise, you'll have to explicitly open a block and use something like ActiveSupport's #try.
[03:52:26] RegulationD: has joined #ruby
[03:52:32] Ox0dea: Or, well, anything to handle the nils, but #try is handy.
[03:53:35] eggoez: has joined #ruby
[03:54:13] GabrielP: Is it possible to use division in ruby?
[03:54:38] Ox0dea: Division isn't real.
[03:54:47] ramfjord: has joined #ruby
[03:55:01] hays: Ox0dea: hmm I think im going to change the data structure from an array to a hash
[03:55:09] hays: that will also save some memory
[03:55:18] Ox0dea: Why do you think so?
[03:55:41] hays: right now @staticdb[7] is a value where the 7 is important
[03:55:57] hays: and its a sparse array
[03:56:22] Sembei: has joined #ruby
[03:56:32] Ox0dea: Yes, then you'll want a Hash, but only because it's semantically correct, not because it'll save on memory.
[03:56:38] GabrielP: if I'm trying to us a .to_f to make a script to give back 10% of a total, what would I use to get a percentage?
[03:57:19] towski_: has joined #ruby
[03:57:22] Ox0dea: >> require 'objspace'; foo = [1, 2, 3]; bar = {a: 1, b: 2, c: 3}; [foo, bar].map { |o| ObjectSpace.memsize_of o } # hays
[03:57:23] ruboto: Ox0dea # => [20, 116] (https://eval.in/407694)
[03:57:50] Aeyrix: I worry about you, Ox0dea.
[03:57:57] hays: so about a 5x hit
[03:58:07] Aeyrix: Ox0dea: One day you're gonna move on
[03:58:09] Aeyrix: and the rest of us
[03:58:13] sevenseacat: for things like this, memory is really irrelevant.
[03:58:15] Aeyrix: will be sat here wishing you hadn't taken a job with Go
[03:58:18] Aeyrix: or whatever
[03:58:23] Ox0dea: Go is so boring. :/
[03:58:26] Aeyrix: because there's no more code golf, or ruby internals talk
[03:58:29] Aeyrix: or type racing
[03:58:32] malconis: has joined #ruby
[03:58:37] Ox0dea: We never did race.
[03:58:45] Aeyrix: Yeah I've been busy.
[03:59:14] drewo: has joined #ruby
[03:59:15] hays: btw im cleaning up this for fun https://gist.github.com/telamon/984041
[03:59:51] Sembei: has joined #ruby
[04:00:00] Aeyrix: https://news.ycombinator.com/item?id=9959579
[04:00:54] Ox0dea: !xkcd 927
[04:00:59] havenwood: has joined #ruby
[04:01:11] Aeyrix: Standards?
[04:01:34] Aeyrix: We've reached internet singularity.
[04:01:40] Aeyrix: Don't need to link it, title it, or anything.
[04:01:55] Ox0dea: "Software developers will never be free until the last Web framework is strangled with the entrails of the last database."
[04:02:28] hays: sql on rails :)
[04:02:42] Aeyrix: Thanks Edward Abbey.
[04:03:48] khebbie: has joined #ruby
[04:04:03] MyMind: has joined #ruby
[04:06:56] dtcristo: has joined #ruby
[04:07:27] tjbiddle_: has joined #ruby
[04:07:55] n_blownapart: has joined #ruby
[04:08:02] troyreadyy: has joined #ruby
[04:08:10] Pisuke: has joined #ruby
[04:10:34] ponga: has joined #ruby
[04:12:15] Sembei: has joined #ruby
[04:12:48] hays: is there an rassoc that doesn't return the value, but just the key
[04:12:51] aaeron1: has joined #ruby
[04:13:27] thang: has joined #ruby
[04:13:38] adzuci: has joined #ruby
[04:13:47] Musashi007: has joined #ruby
[04:14:45] _djbkd: has joined #ruby
[04:14:51] shpoont: has joined #ruby
[04:16:22] Sembei: has joined #ruby
[04:17:31] Ox0dea: hays: That's gotta be an XY problem.
[04:21:09] Sembei: has joined #ruby
[04:21:30] arup_r: has joined #ruby
[04:21:35] tejasmanohar: has joined #ruby
[04:21:42] hays: XY problem? well its a reverse lookup
[04:22:06] aaeron: has joined #ruby
[04:22:41] Ox0dea: hays: Is #invert + #[] a viable approach?
[04:22:45] hays: https://bpaste.net/show/894010172667
[04:22:54] bruno-: has joined #ruby
[04:23:10] hays: invert could work, but it seems like it does more work than rassoc
[04:24:40] Sembei: has joined #ruby
[04:27:31] Ox0dea: hays: I thought @database had become a Hash?
[04:28:48] moretti: has joined #ruby
[04:28:50] MyMind: has joined #ruby
[04:29:05] Ox0dea: Ah, right. Well, there's no method for retrieving just the key; you'll just have to pluck it out with [0] or #first.
[04:29:19] tejasmanohar: anyone know a really nice wrapper of rss in ruby?
[04:32:29] lxsameer: has joined #ruby
[04:33:51] EminenceHC: has joined #ruby
[04:33:54] MyMind: has joined #ruby
[04:34:05] Vile`: has joined #ruby
[04:37:43] Pisuke: has joined #ruby
[04:37:43] keen__________32: has joined #ruby
[04:38:27] hays: http://ruby-doc.org/stdlib-2.0.0/libdoc/rss/rdoc/RSS.html
[04:38:54] leat1: has joined #ruby
[04:40:08] Inside: has joined #ruby
[04:40:18] Inside: is there any good way to print to a default printer?
[04:40:27] Inside: > http://dev.mikamai.com/post/82894788234/physically-printing-with-ruby
[04:40:34] Inside: I've found that, but it seems kinda...... ghetto
[04:40:56] theery: has joined #ruby
[04:41:14] Inside: (basically I want to write an application which automatically prints a label whenever it senses a new row in a local database which matches some criteria
[04:41:44] theery: has joined #ruby
[04:42:29] theery: has joined #ruby
[04:42:34] Ox0dea: Inside: Are you on Windows, then?
[04:42:48] Pisuke: has joined #ruby
[04:42:54] theery: has joined #ruby
[04:43:14] Ox0dea: In that case, run Linux in a VM and use `lp`. :P
[04:43:44] Inside: this is a work station driving a plc
[04:44:12] astrobunny: has joined #ruby
[04:44:50] hays: welcome to the ghetto
[04:44:59] hays: i like to call it windows system programming
[04:45:31] nofxx: Inside, parallel or usb?
[04:45:58] Aeyrix: Inside: mssql?
[04:46:57] nofxx: if you have to understand that something dontot run on windows is a feature, not a bug.
[04:47:12] Pisuke: has joined #ruby
[04:47:48] nofxx: and if the printer is USB VM will work fine, as Ox0dea said Inside
[04:48:02] fedexo: has joined #ruby
[04:48:04] codecop: has joined #ruby
[04:48:51] leat1: has joined #ruby
[04:49:06] nofxx: Inside, neat solution: use a rpi2 or bananapi or beaglebone, put linux and the printer, and it'll poll your db
[04:49:16] nofxx: plus, no PC ON 24hrs just to wait to print
[04:49:39] Inside: pc is on all the time anyway
[04:49:47] nofxx: rpi consume is around 1W iirc
[04:49:56] nofxx: if the world matters to you =P
[04:50:02] Ox0dea: Inside: You're not using Step7, are you? ;)
[04:50:09] Inside: ummm not sure
[04:50:27] Inside: its a refrigeration charge control pc
[04:51:03] nofxx: that's really ugly
[04:51:08] Inside: theres basically a hardware button which says 'fill with refrigerant'.... which drives a plc through some HMI
[04:51:30] Inside: and then writes a row to a local sql server db
[04:51:43] Pisuke: has joined #ruby
[04:51:43] nofxx: windows as embedded hardware controller -> how things like fujushima happen
[04:55:41] helpa: has joined #ruby
[04:55:55] Ox0dea: nofxx: Also Stuxnet.
[04:55:55] hays: a lot of hvac are windows machines
[04:55:56] nofxx: Ox0dea, heard that the US successfully f* all iran nuclear stuff just because they used windows?
[04:55:56] Aeyrix: Glad the Internet's top minds wrt security are in #ruby.
[04:55:56] Aeyrix: Oh wait, they're not.
[04:55:56] nofxx: it's true.. they tried with the north koreans but apprently it's no windows haha
[04:55:56] Ox0dea: NK uses Red Star, right?
[04:55:56] Ox0dea: Aeyrix: You sound like a Windows user.
[04:55:56] drewo: has joined #ruby
[04:55:56] nofxx: Ox0dea, yeah
[04:55:56] Aeyrix: I'm just tired of the horribly ill-informed rhetorics.
[04:55:59] Ox0dea: Of course Windows boxen can be hardened.
[04:55:59] Aeyrix: RIP helpa
[04:55:59] nofxx: Ox0dea, the about page should have this: ???
[04:55:59] nofxx: (red star)
[04:55:59] Ox0dea: nofxx: I use Red Star...
[04:55:59] kokoleavia: has joined #ruby
[04:55:59] christiandsg: has joined #ruby
[04:56:00] hays: Aeyrix: to be fair the stuxnet report itself said that a big contributor to the success of stuxnet was the use of windows
[04:56:00] nofxx: Ox0dea, cool, there's english ?
[04:56:00] Ox0dea: nofxx: No, I'm Best Korean.
[04:56:00] Aeyrix: > this fucking channel
[04:56:00] Pisuke: has joined #ruby
[04:56:00] nofxx: Ox0dea, south ?
[04:56:05] Ox0dea: Aeyrix: What's up? This side of you is new to me.
[04:56:09] nofxx: Ox0dea, friend here asked if you are from north: I replied: only if we're talking with kim jon
[04:56:25] Aeyrix: Ox0dea: I work in security, half in research half in pentesting.
[04:56:38] Ox0dea: Aye, I was recently made aware of such.
[04:56:40] Aeyrix: Tired memes about "muh windoze amirite? dae micro$oft?" fucks me off.
[04:57:00] Aeyrix: I'm currently using, by statistics of 2014 - 2015 FY, the most vulnerable operating system.
[04:57:07] Aeyrix: Not Linux, not Windows. OS X.
[04:57:16] Ox0dea: I don't buy it.
[04:57:25] hays: oh i thought we were talking stuxnet
[04:57:30] juanpablo_____: has joined #ruby
[04:57:30] Aeyrix: Uninformed rhetorics about proposed vulnerabilities within operating systems are irritating due to the incredible ease in which someone can *get* informed.
[04:57:39] riotjones: has joined #ruby
[04:58:18] hays: not sure if you've seen what kali linux can do to a 15 year old windows machine running scada software
[04:58:59] hays: specifically metasploit's vulnerability database and toolsets
[04:59:01] Aeyrix: hays: I've presented papers on the topic.
[04:59:04] Aeyrix: I've also contributed to metasploit.
[04:59:07] leat1: has joined #ruby
[05:00:15] hays: alright, so then you are aware of where we are with regards to control systems and the use of windows
[05:00:27] casadei_: has joined #ruby
[05:00:33] rbowlby: has joined #ruby
[05:00:34] Pisuke: has joined #ruby
[05:00:36] Aeyrix: Ox0dea: RE your not buying it
[05:00:48] Aeyrix: OS X: 177 unique CVE identifiers in 2015
[05:00:57] Aeyrix: Linux: 41 unique CVE identifiers in 2015.
[05:01:02] dseitz: has joined #ruby
[05:01:03] Aeyrix: Windows: 83.
[05:01:31] hays: i'd be curious how those numbers flesh out if you use none of the mac os applications
[05:01:38] krz: has joined #ruby
[05:01:47] Aeyrix: Why would anyone do that
[05:01:49] astrobunny: has joined #ruby
[05:01:56] hays: because most of them suck
[05:02:13] Aeyrix: Alright so I've come to the conclusion that you're probably DarqWolff
[05:03:16] hays: i don't know who that is, but the way i've ended up running macos is I run Chrome or Firefox as my browser and get almost everything from macports
[05:03:21] sevenseacat: has joined #ruby
[05:03:32] hays: no need for iTunes
[05:03:52] Aeyrix: hays: https://www.reddit.com/r/gaming/comments/sf2e7/i_sent_gabe_newell_a_question_about_what_his_life/c4dmknx
[05:03:53] hays: I prefer mpv to quicktime
[05:04:06] shock_one: has joined #ruby
[05:05:04] Sembei: has joined #ruby
[05:05:29] hays: meh, whatever im actually curious about it. i don't think im alone in running macs this way--I think a lot of software developers moved to mac because they liked having the commandline
[05:05:43] Aeyrix: As a general rule, yes.
[05:05:47] hays: maybe its still insecure as fuck--im not ruling that out
[05:06:00] Aeyrix: As a general rule, no.
[05:06:16] Aeyrix: This last July - June has been a pretty bad year for OS Xploits.
[05:06:23] Ox0dea: Aeyrix: http://goo.gl/w8urcc vs. http://goo.gl/b1J60x
[05:06:38] Ox0dea: I'm sure you know using the total number of CVEs is disingenuous.
[05:06:38] hays: its been kind of a challenging year for open source projects too.
[05:06:44] Aeyrix: Ox0dea: between 9 and 2.99)
[05:06:45] hays: well hell. its been a challenging year.
[05:07:25] workmad3: has joined #ruby
[05:07:37] Aeyrix: [15:04:23] <Aeyrix> DeBot: !hangman reasons to not hate #ruby entirely
[05:07:38] Aeyrix: No response.
[05:07:50] Aeyrix: Also, Ox0dea
[05:07:51] Aeyrix: congratulations
[05:07:53] Aeyrix: you linked MS as a vendor
[05:07:55] Aeyrix: not Windows as an OS
[05:07:56] hays: i am guilty of using iMail or whatever this piece of s*** software is that can't seem to download my mail from my work's exchange server
[05:08:07] hays: grr I want to read my mail and go to bed damnit
[05:08:29] Aeyrix: Ox0dea: For reference
[05:08:34] Aeyrix: OSX: 54 > 9.0 in 2015
[05:08:40] Aeyrix: Windows: 20 > 9.0 in 2015.
[05:08:58] Aeyrix: But as you provided a second glance at my research already, I'm sure you already knew those numbers.
[05:09:32] Sembei: has joined #ruby
[05:09:38] chrissonar: has joined #ruby
[05:10:19] Ox0dea: Let's count our blessing in iThings being too pretty for use in industrial environments.
[05:10:57] Aeyrix: [ sighing intensifies ]
[05:13:57] Sembei: has joined #ruby
[05:15:16] hays: fwiw the sandia guys gave me a chuckle when I asked if free software provided any more security as a platform/OS. and this was not too long after Stuxnet
[05:15:49] sevenseacat: ACTION looks up from screen of iThing
[05:15:57] Aeyrix: Don't bother.
[05:16:03] duncannz: has joined #ruby
[05:16:14] _blizzy_: has joined #ruby
[05:16:20] ejnahc: has joined #ruby
[05:16:33] icebourg: has joined #ruby
[05:16:58] duncannz: has joined #ruby
[05:17:14] fabrice31: has joined #ruby
[05:17:33] tsujp: has joined #ruby
[05:17:49] duncannz: has joined #ruby
[05:17:49] hays: i'd love to have seen what they actually had access to in terms of 0-days
[05:18:11] SOLDIERz: has joined #ruby
[05:18:23] Sembei: has joined #ruby
[05:18:23] sevenseacat: ACTION looks back down
[05:18:26] hays: one of them had bought a new car essentially because he wanted to screw with the new computers in it
[05:18:57] duncannz: has joined #ruby
[05:19:11] hays: apparently Progressive actually will send you something to stick on your car so they can track it. thing had a sim card. ah fun times for them im sure
[05:19:13] Hijiri: has joined #ruby
[05:19:40] duncannz: has joined #ruby
[05:20:03] vdamewood: has joined #ruby
[05:22:00] bluOxigen: has joined #ruby
[05:22:50] Sembei: has joined #ruby
[05:23:40] luckyno7: has joined #ruby
[05:25:33] ips|malc: has joined #ruby
[05:26:05] curses: has joined #ruby
[05:26:52] ruby-lang731: has joined #ruby
[05:27:11] Mendenhall: has joined #ruby
[05:27:11] hays: brony community
[05:27:13] ips|malc: has joined #ruby
[05:27:19] hays: i've heard of this...
[05:27:20] Sembei: has joined #ruby
[05:27:46] Xiti`: has joined #ruby
[05:30:07] danman: has joined #ruby
[05:31:09] MyMind: has joined #ruby
[05:31:25] Scripore: has joined #ruby
[05:31:42] leat2: has joined #ruby
[05:31:47] ReK2GnULinuX: has joined #ruby
[05:33:57] omegamike: has joined #ruby
[05:34:41] aganov: has joined #ruby
[05:35:09] theery: has joined #ruby
[05:35:34] shpoont: has joined #ruby
[05:35:49] skade: has joined #ruby
[05:36:17] MyMind: has joined #ruby
[05:39:39] leat2: has joined #ruby
[05:40:25] yfeldblum: has joined #ruby
[05:40:29] tagrudev: has joined #ruby
[05:40:39] MyMind: has joined #ruby
[05:43:23] sinkensabe: has joined #ruby
[05:45:10] MyMind: has joined #ruby
[05:46:34] fedexo: has joined #ruby
[05:47:08] rht: has joined #ruby
[05:47:30] drewo: has joined #ruby
[05:48:46] Scripore: has joined #ruby
[05:48:56] MyMind: has joined #ruby
[05:49:53] leat2: has joined #ruby
[05:50:44] sdwrage: has joined #ruby
[05:54:02] werelivinginthef: has joined #ruby
[05:54:06] MyMind: has joined #ruby
[05:55:15] yardenbar: has joined #ruby
[05:56:22] yfeldblum: has joined #ruby
[05:57:50] MyMind: has joined #ruby
[05:58:29] riotjones: has joined #ruby
[05:59:42] pontiki: has joined #ruby
[06:00:55] khebbie: has joined #ruby
[06:01:02] khebbie_: has joined #ruby
[06:02:17] bronson: has joined #ruby
[06:02:34] yardenbar: has joined #ruby
[06:02:59] MyMind: has joined #ruby
[06:03:17] baweaver: has joined #ruby
[06:06:49] Pisuke: has joined #ruby
[06:07:45] rsc___: has joined #ruby
[06:08:35] Oog: has joined #ruby
[06:09:06] jack_rabbit: has joined #ruby
[06:09:50] rickmasta: has joined #ruby
[06:10:41] shock_one: has joined #ruby
[06:11:44] roolo: has joined #ruby
[06:11:52] Pisuke: has joined #ruby
[06:12:53] kies^: has joined #ruby
[06:13:29] {756d6f}: has joined #ruby
[06:14:27] jenrzzz: has joined #ruby
[06:14:32] towski_: has joined #ruby
[06:15:14] knu: has joined #ruby
[06:16:20] Pisuke: has joined #ruby
[06:18:02] Musashi007: has joined #ruby
[06:20:48] Pisuke: has joined #ruby
[06:22:57] tvw: has joined #ruby
[06:23:29] vdamewood: has joined #ruby
[06:24:35] Sembei: has joined #ruby
[06:24:57] Zai00: has joined #ruby
[06:25:25] max_v: has joined #ruby
[06:26:33] riotjones: has joined #ruby
[06:27:19] eGGsha: has joined #ruby
[06:28:09] texasmade: has joined #ruby
[06:28:11] christiandsg: has joined #ruby
[06:29:37] sepp2k: has joined #ruby
[06:29:41] Sembei: has joined #ruby
[06:30:24] DoubleMalt: has joined #ruby
[06:31:09] schaerli: has joined #ruby
[06:32:07] GriffinHeart: has joined #ruby
[06:32:20] swgillespie: has joined #ruby
[06:32:31] luckyno7: has joined #ruby
[06:33:47] Mendenhall: has joined #ruby
[06:34:11] Sembei: has joined #ruby
[06:37:49] solars: has joined #ruby
[06:37:59] pepperbreath: has left #ruby: ()
[06:38:37] Sembei: has joined #ruby
[06:39:42] luckyno7: has joined #ruby
[06:39:47] yfeldblum: has joined #ruby
[06:41:51] drewo: has joined #ruby
[06:42:22] max_v: has joined #ruby
[06:43:05] MyMind: has joined #ruby
[06:45:03] arturmartins: has joined #ruby
[06:46:15] juanpablo_____: has joined #ruby
[06:47:25] MyMind: has joined #ruby
[06:49:40] sameerynho: has joined #ruby
[06:49:49] Philipp__: has joined #ruby
[06:50:29] Oka: has joined #ruby
[06:52:57] f4cl3y: has joined #ruby
[06:53:32] dtcristo: has joined #ruby
[06:54:02] allomov: has joined #ruby
[06:54:45] ips|malc: has joined #ruby
[06:55:05] werelivinginthef: has joined #ruby
[06:56:03] dtcristo: has joined #ruby
[06:56:11] workmad3: has joined #ruby
[06:57:09] andikr: has joined #ruby
[06:58:01] fabrice31: has joined #ruby
[06:59:15] shpoont: has joined #ruby
[06:59:18] allomov: has joined #ruby
[06:59:22] Ox0dea: Would Sun light Moon if he could not?
[07:00:45] strixd: has joined #ruby
[07:02:37] postmodern: has joined #ruby
[07:05:19] schaerli: has joined #ruby
[07:05:45] lampshade: has joined #ruby
[07:06:05] quimrstorres: has joined #ruby
[07:09:42] strixd: has joined #ruby
[07:10:19] Oog: has joined #ruby
[07:10:32] lampshade: has joined #ruby
[07:10:41] strixd: has joined #ruby
[07:10:55] safeforge: has joined #ruby
[07:10:59] lampshade: has joined #ruby
[07:11:07] eGGsha: has joined #ruby
[07:11:11] lampshade: has left #ruby: ()
[07:11:36] strixd: has joined #ruby
[07:11:58] ruby-lang401: has joined #ruby
[07:13:31] lampshades: has joined #ruby
[07:13:53] lampshades: Hi There :-)
[07:14:49] curses: has joined #ruby
[07:14:57] sheeny: has joined #ruby
[07:15:09] lampshades: Ive been writing lots of cucumber specs lately, and it seems that all the stackoverflow and posts are quite dated
[07:15:22] lampshades: did everyone just stop using cucumber suddenly in favour or something else?
[07:15:43] sheeny: Hi all, just wondering if someone would be able to help with this? https://gist.github.com/anonymous/cd1be79c47a65fee1da4
[07:16:11] sevenseacat: cucumber went 'out of fashion' when rspec started taking feature specs seriously, a couple years ago
[07:16:28] pontiki: lampshades: all the cool kids got tired of writing regexp matchers and just write their tests directly in rspec and minitest
[07:16:31] tkuchiki: has joined #ruby
[07:16:36] ljarvis: also cucumber is awful, so there's that
[07:16:44] sevenseacat: those arguments are quite valid too.
[07:16:54] sevenseacat: rspec feature specs are a boatload easier to write
[07:17:36] lampshades: true that.. I love rspec
[07:17:50] lxsameer_: has joined #ruby
[07:18:01] lampshades: I figured cucumber will be a nice way to have that single source of truth of the specs
[07:18:07] wpp: has joined #ruby
[07:18:08] ljarvis: sheeny: chunks = args.split(" "); send(chunks.shift, *chunks)
[07:18:12] pontiki: or like the other blokes on my current project they just stopped writing tests altogether :((
[07:18:18] sevenseacat: in garbled plain-English
[07:18:55] weemsledeux: has joined #ruby
[07:19:14] Ox0dea: ljarvis: Why not just `send(*args.split)`?
[07:19:34] sheeny: ljarvis: awesome thanks
[07:20:42] ljarvis: Ox0dea: because coffee :(
[07:20:48] Ox0dea: And now he's gone. :(
[07:21:09] baweaver: pontiki: oh hai
[07:21:14] ljarvis: they're doing a bad thing anyway so they'll have a worse problem than that
[07:21:24] baweaver: Seattle Ruby had a fun problem
[07:21:41] baweaver: Get the top n word scores for a set of characters in Scrabble
[07:21:49] Ox0dea: > n word scores
[07:22:09] baweaver: https://gist.github.com/baweaver/520cc8a8f0575cc10a56 - Quick 15 minute hack with some caching to it.
[07:22:45] omegamike: has joined #ruby
[07:22:47] eGGsha: has joined #ruby
[07:23:03] nofxx: has joined #ruby
[07:23:03] nofxx: has joined #ruby
[07:23:05] bnagy: has joined #ruby
[07:23:07] baweaver: zenspider had something to do with ball physics I'll have to tweak with later.
[07:23:31] baweaver: I just happen to play a ludicrous amount of scrabble and words with friends
[07:23:46] baweaver: so that one sounded easy enough to hammer out.
[07:24:16] cheeti: has joined #ruby
[07:25:01] pontiki: cool, baweaver
[07:25:14] michele: has joined #ruby
[07:25:19] pontiki: baweaver: better: all the 2-letter words from a set of letters :)
[07:25:20] baweaver: deeeefinitely a hack though
[07:25:26] ferr: has joined #ruby
[07:25:27] tkuchiki: has joined #ruby
[07:25:42] michele: when using Logger class, and with shift_age = 'weekly', how to tell ruby to *delete* old logfiles ?
[07:25:44] baweaver: the cache system was bolt on, but works well enough.
[07:25:46] cheeti: hi i am using pdf-reader-html to convert pdf to html but how to save converted file https://github.com/mportiz08/pdf-reader-html
[07:25:51] mikecmpbll: has joined #ruby
[07:25:57] rbowlby: has joined #ruby
[07:26:36] baweaver: michele: Normally that's a cron job. Have you looked into the Logger documentation for anything that looks like sweeping or cleanup yet?
[07:27:01] michele: baweaver: I read the rubydoc page on Logger, no mentions for 'delete' or 'remove'
[07:27:17] baweaver: cheeti: It renders a string, no? Then just make a new file, write that string, and save it.
[07:27:19] auzty: has joined #ruby
[07:27:29] baweaver: michele: I'd have to look through it, just a sec.
[07:28:07] pontiki: michele: generally, IME, logfile cleanup is a system maintenance thing; like baweaver usually a cron job.
[07:28:17] baweaver: Shift age sounds like it gets rid of them though
[07:29:34] anisha: has joined #ruby
[07:29:42] ghormoon: has joined #ruby
[07:30:53] pontiki: not if you use a frequency
[07:31:30] michele: pontiki: exactly, I am using 'weekly'
[07:31:48] michele: pontiki: anyway, system maintenance as in I should write the cronjob for it?
[07:32:20] baweaver: The command you'd want would be something like: find (log_dir) -type f -mtime +7 -exec rm -f {} \;
[07:32:23] fabrice31: has joined #ruby
[07:32:39] pontiki: michele: check if the system you're using already has one for removing aged file, otherwise, yeah
[07:32:39] baweaver: though I'd use this first to be safe: find ./ -type f -mtime +7 -exec echo {} \;
[07:32:53] baweaver: that way you see the names before you go and burn stuff
[07:33:08] baweaver: -mtime on find is modified time, and +7 is 7 days or older
[07:33:22] pontiki: why not -delete instead of the -exec.. ?
[07:33:24] baweaver: find is a powerful albeit finicky tool
[07:33:45] pontiki: pfft. i'm older n u
[07:33:51] baweaver: ACTION didn't know of delete
[07:34:14] RobertBirnie: has joined #ruby
[07:34:26] baweaver: more of learning on OpenBSD and older ports, experimenting and such
[07:35:42] drewo: has joined #ruby
[07:35:44] baweaver: ah, that was why
[07:35:56] baweaver: -delete doesn't always exist depending on the version and OS
[07:36:28] baweaver: though that exec has a nasty overhead from spawning external processes, probably best to pipe it to xargs instead
[07:36:38] cheeti: baweaver pdf = PDF::Reader.new('/home/rk/Downloads/document.pdf') file2 = pdf.to_html File.open("hi.html", file2) this is not working
[07:36:39] pontiki: frel, really?? we had it on HP-UX back in the freaking 80s
[07:36:39] baweaver: ACTION hasn't used find in a while on anything big enough to notice.
[07:37:02] baweaver: cheeti: why do you suppose that is?
[07:37:16] michele: pontiki: what do you mean by "the system" ?
[07:37:23] pontiki: michele: your OS
[07:37:26] michele: pontiki: I am using linux so i'm using crontab
[07:37:34] baweaver: http://ruby-doc.org/core-2.1.4/File.html#method-c-open
[07:37:43] pontiki: and possibly distro and possibly version, as baweaver just pointed out
[07:37:47] Ox0dea: baweaver: Wrong link.
[07:37:50] cheeti: baweaver i am open the file to save the string
[07:38:06] Ox0dea: cheeti: File.write is what you want here.
[07:38:07] baweaver: older version, I know, but still not much changed.
[07:38:09] cheeti: baweaver plz suggest if anything wrong
[07:38:15] soros1980: has joined #ruby
[07:38:16] pontiki: cheeti: I believe you want File.write, not File.open the way you're using it
[07:38:53] rsc___: has joined #ruby
[07:38:57] baweaver: If you were using open it'd be: File.open(name, 'w') { |f| f.puts data }
[07:39:00] bruno-: has joined #ruby
[07:39:16] baweaver: the second arg is the mode of the file as open isn't specific to writes.
[07:39:50] cheeti: Ox0dea ok it's done thanks
[07:39:52] kokoleavia: has joined #ruby
[07:39:55] Ox0dea: Happy to help.
[07:40:37] baweaver: Ox0dea: odd. It's only showing up under IO.write
[07:40:44] Ox0dea: Why wouldn't it?
[07:40:45] baweaver: I'll attribute this to being more than half asleep
[07:40:56] baweaver: You'd said File.write.
[07:40:59] Ox0dea: >> File < IO
[07:41:00] ruboto: Ox0dea # => true (https://eval.in/407796)
[07:41:22] doerteDev: has joined #ruby
[07:41:29] baweaver: well, answering my own questions, that's a sign to go to bed already.
[07:41:36] ruby361: has joined #ruby
[07:41:49] ruby361: Hi everyone. I'm trying to work with devise + omniauth to link multiple providers with one user identity. Can someone help me to get the account linkage working? or does anyone know any good resources to understand how to go about doing so myself?
[07:42:10] Ox0dea: baweaver: Mayhap I shall have something non-alphanumeric and Scrabble-ish for you upon your return.
[07:42:30] baweaver: on vacation so might take me a bit to pop up this week.
[07:42:52] pontiki: oh, baweaver, just have fun on vacation. :)
[07:42:53] Iskarlar: has joined #ruby
[07:42:54] baweaver: I don't do well at this "Don't code for a week" shtick.
[07:43:09] Ox0dea: I'd forgotten there was such a thing.
[07:43:23] michele: has left #ruby: ("undefined")
[07:43:25] pontiki: i am in sore need of a vacation
[07:43:28] baweaver: To be fair this is the first time I've coded this week.
[07:43:45] baweaver: ruby361: Probably best to ask on #RubyOnRails
[07:44:04] pontiki: baweaver: just so you don't, you know, do any *work*
[07:44:43] baweaver: I shut down Vim before I made a smart scrabble solver which tried to play close and hard to prevent other players from racking up any points.
[07:45:22] cheeti: is this possible to covert pdf to csv using ruby code
[07:45:24] baweaver: Almost as bad as me using my flight home on Christmas to make a Clue solver.
[07:45:36] baweaver: cheeti: Why would you want to?
[07:45:39] Radar: cheeti: dear god why would you want to do that?
[07:45:44] pontiki: clue the board game?
[07:46:01] pontiki: lol, that's a cool idea
[07:46:03] cheeti: Radar my client requirment
[07:46:12] Radar: cheeti: Your client is insane.
[07:46:18] Radar: cheeti: Why do they want a CSV from the PDF?
[07:46:19] sevenseacat: pdf to csv... that doesnt even make sense
[07:46:22] baweaver: except I found out I was sitting next to a google coder and got carried away chatting on other things.
[07:46:27] robbyoconnor: has joined #ruby
[07:46:44] baweaver: Radar: sevenseacat the only way I can figure on that is that they have tables inside there.
[07:46:52] sevenseacat: thats what I sincerely hope
[07:46:58] sevenseacat: either way, it doesnt make much sense
[07:46:58] baweaver: in which case, still painful and confounded, but believable.
[07:46:59] pontiki: if you had PDFs with tons of data tables, and that's all you had access too, you, too, would pray for such a converter
[07:47:14] bluOxigen: has joined #ruby
[07:47:45] baweaver: pdf -> html -> nokogiri (find all tables) -> csv
[07:47:45] sevenseacat: I'm normally the one making said pdfs full of tables
[07:48:08] Ox0dea: cheeti: You wouldn't happen to have the lucky fortune of being on JRuby, would you?
[07:48:10] sevenseacat: prawn craps out when you have a table cell that spans multiple pages. found hat one out.
[07:48:29] baweaver: ello ello ey ey ey
[07:48:38] Ox0dea: ACTION gives baweaver his umbrella.
[07:49:16] pontiki: damn those googlers are everywhere
[07:49:21] vdamewood: has joined #ruby
[07:49:24] baweaver: met one today too
[07:49:39] c0m0: has joined #ruby
[07:49:41] baweaver: was at Seattle Ruby. I forget they have a place up here.
[07:49:56] baweaver: pontiki: Give me a month, I might be one of them
[07:49:57] pontiki: everywhere
[07:50:08] anaeem1_: has joined #ruby
[07:50:11] livathinos: has joined #ruby
[07:50:11] pontiki: you'll be well-fed
[07:50:20] baweaver: If I can get past the interview of doom
[07:50:35] Ox0dea: Oh, jeeze, my binary tree's the wrong way round.
[07:50:37] Radar: I interviewed at Google 2 years ago and they wanted examples of my technical writing
[07:50:37] cheeti: Ox0dea ok iwant to convert my pdf to html and after that i want convert it into csv is this possible
[07:50:41] Radar: I linked them to Rails 3 in Action
[07:50:41] baweaver: Site Reliability Engineer or System Admin, working on deciding.
[07:50:47] Radar: They said they wanted more examples.
[07:50:53] Radar: I told them (politely) to fuck off.
[07:50:53] baweaver: Radar: *high fives*
[07:50:54] Ox0dea: cheeti: I asked if you were using JRuby because Tabula (http://tabula.technology/) looks pretty good.
[07:51:03] cheeti: Radar ok iwant to convert my pdf to html and after that i want convert it into csv is this possible
[07:51:14] Radar: cheeti: No. No. annnnd guess what? No.
[07:51:23] sevenseacat: so they dont want the writer of homebrew, or the writer of books
[07:51:27] Radar: cheeti: I can't tell if you're seriously wanting to do this or if it's a troll
[07:51:29] sevenseacat: who *does* google hire these days
[07:51:36] baweaver: spamming multiple users on the channel the same question does not work well
[07:51:38] Ox0dea: Radar: Hanlon's razor applies, I reckon.
[07:51:43] baweaver: sevenseacat: with any luck, me
[07:51:47] Radar: cheeti: nothing will do what you want to do except a human person looking at the PDF and HAND CONVERTING it
[07:51:51] webhat: has joined #ruby
[07:51:54] Radar: sevenseacat: People who desperately want to work there because it's Google.
[07:52:00] Ox0dea: Radar: PDFs can contain actual tabular data, for what that's worth.
[07:52:09] sevenseacat: it would look nice on the resume, for sure.
[07:52:10] Radar: Ox0dea: glhf parsing it out
[07:52:13] baweaver: Radar: still more keen on the free food bit honestly.
[07:52:18] sevenseacat: ACTION doesnt even have a resume
[07:52:32] cheeti: Radar ok thanks
[07:52:32] sevenseacat: s/resume/linkedin profile/
[07:52:42] baweaver: I'm far too easily bribed with Chipotle
[07:52:43] Radar: ruby meetup time
[07:52:45] ljarvis: baweaver: so join any SF startup
[07:52:47] Radar: time to meet Aeyrix
[07:52:50] pontiki: have fun, Radar
[07:52:53] Radar: If he doesn't pike again
[07:52:55] sevenseacat: Radar: try not to punch him too much.
[07:53:06] Radar: sevenseacat: :)
[07:53:15] baweaver: Oh I could ljarvis, Google's just on my bucket list out here.
[07:53:39] pontiki: baweaver: if i ever get a vacation back home, we have to hang out
[07:53:42] ljarvis: interesting
[07:53:53] sevenseacat: I don't really have any companies I aspire to work for
[07:53:54] baweaver: pontiki: Sure, let me know.
[07:54:00] RegulationD: has joined #ruby
[07:54:11] sevenseacat: other than 'my own'
[07:54:11] baweaver: Could go work for Tesla too.
[07:54:25] pontiki: does tesla serve chipotle?
[07:54:26] baweaver: sevenseacat: Still trying to find a good idea to try that one myself :/
[07:54:27] sevenseacat: hey maybe someone like pragprog.
[07:54:40] baweaver: I have to ask.
[07:54:47] pontiki: i very much am enjoying contracting and freelancing
[07:54:59] pontiki: except for the continual marketing myself
[07:55:03] agent_white: I want to work for Tesla... just first needa invent a time machine to boost my highschool GPA and get into an Ivy League School...
[07:55:25] sevenseacat: I am absolutely appalling at marketing myself.
[07:55:35] agent_white: sevenseacat: Do you have stickers?
[07:55:42] pontiki: i have stickers
[07:55:46] baweaver: Still working on getting a solid enough base established to go full freelancer later.
[07:55:55] agent_white: See, pontiki's got it on lock!
[07:55:57] pontiki: but they aren't a logo of me
[07:56:09] baweaver: could I now? Probably
[07:56:14] pontiki: but if i meet you, i'll give you a sticker
[07:56:41] pontiki: meh, baweaver, it took me nearly 2.5 decades to get out
[07:57:21] baweaver: As for right now I have the young and single thing still going.
[07:57:44] pontiki: and i have the old and uninterested thing going on :)
[07:57:51] soros1980: I was never good at marketing myself.. until the guy that contracts me out accidentally sent me one of his props - I never knew what market rate was until that day.
[07:57:56] agent_white: pontiki: Yayay! I'll put it on my arm and tell everyone it's a new tattoo!
[07:57:57] {756d6f}: has joined #ruby
[07:58:18] sevenseacat: ACTION has the 'oh shit I'm adult and have to support a bunch of people now' thing going on
[07:58:40] agent_white: sevenseacat: Tiny humans eat wallets. :(
[07:58:44] pontiki: sevenseacat: yeah, that's nearly what the 2.5 decades was about
[07:58:52] sevenseacat: agent_white: these humans arent tiny
[07:59:08] baweaver: I have an 8 year old brother, that was enough for a while.
[07:59:28] adaedra: Hello, mortals
[07:59:58] dumdedum: has joined #ruby
[08:00:01] baweaver: anyways, bed time
[08:00:03] agent_white: adaedra: \o The ascention commeth.
[08:00:16] pontiki: night baweaver
[08:00:20] sevenseacat: see ya baweaver
[08:00:35] mikecmpbll: has joined #ruby
[08:00:45] adaedra: So, if I apply UGT, we went from morning to night in less than a minute.
[08:01:02] pontiki: i really should make a personal logo
[08:01:15] adaedra: i really should remake a personal logo
[08:01:38] ljarvis: i'm glad i dont have a personal logo, whatever that is
[08:01:39] adaedra: hi, ljarvis
[08:01:50] sevenseacat: whoa, I just set up a blog this year, now we're all about logos?
[08:01:58] adaedra: you should have one, cool people have personal logos, ljarvis
[08:02:02] agent_white: Logos for stickers! The sticker is the goal!
[08:02:03] ljarvis: sevenseacat: you dont have a logo? you're so 90s!
[08:02:04] pontiki: what do you mean "we"
[08:02:16] ljarvis: adaedra: im so not cool :(
[08:02:29] ljarvis: wait.. :) *
[08:02:31] craysiii: whats the optimal logo size and format
[08:02:32] Wolland: has joined #ruby
[08:02:42] ljarvis: craysiii: .gif 600x600
[08:02:44] adaedra: cool people also code on nodejs, so I don't know if it's a goal to achieve
[08:02:47] svdb64: has joined #ruby
[08:02:50] adaedra: craysiii: svg and svg
[08:03:02] ljarvis: damn serious answers
[08:03:07] howdoi: has joined #ruby
[08:03:19] adaedra: What is this ???serious??? everyone keeps talking about
[08:03:25] yfeldblum: has joined #ruby
[08:03:27] ljarvis: adaedra: but i used go-lang instead, so im cool right
[08:03:34] adaedra: Is it a new drug?
[08:03:45] ljarvis: yeah you should try it
[08:03:51] joonty: has joined #ruby
[08:04:04] ljarvis: the high is disappointing and the come down is quite depressing but it's amazing
[08:04:14] pontiki: my stickers: http://www.zazzle.com/solo_tree_in_monochrome_stickers-217334758531834499
[08:04:17] adaedra: too bad my dealer got shot last week
[08:06:10] schaerli: has joined #ruby
[08:07:28] allomov: has joined #ruby
[08:08:07] lkba: has joined #ruby
[08:10:06] slowlag: has joined #ruby
[08:10:48] RobertBirnie: has joined #ruby
[08:11:31] CustosLimen: has joined #ruby
[08:13:24] Oog: has joined #ruby
[08:16:00] quimrstorres: has joined #ruby
[08:16:59] christiandsg: has joined #ruby
[08:17:04] agent_white: pontiki: Ooo... I like it!
[08:17:20] quimrstorres: has joined #ruby
[08:17:45] DaniG2k: has joined #ruby
[08:18:51] ruurd: has joined #ruby
[08:19:21] krz: has joined #ruby
[08:20:42] axl_: has joined #ruby
[08:22:15] adaedra: hi yorickpeterse
[08:22:30] ruurd: good morning y'all
[08:23:25] DaniG2k: yesterday I added a dependency to my gem (i.e. ruby-stemmer). When I tried to include my gem into a Rails app, `bundle install`, then `rails console`, I was told that it couldn't find ruby-stemmer. What gives?
[08:23:42] DaniG2k: basically, how can I include gem dependencies from my gem into a Rails app
[08:24:36] ruby-lang237: has joined #ruby
[08:24:37] vyorkin: has joined #ruby
[08:25:04] vyorkin: 0x0dea: concerning my yesterday's question: https://gist.github.com/vyorkin/889e57b13312ad034e4a
[08:25:12] unshadow_: Ox0dea: craysiii: If you are still interested, we kind of cornered the IO.gets Fixnum compared to nil issue, it's from here: https://github.com/ruby/ruby/blob/trunk/ext/openssl/lib/openssl/buffering.rb#L211
[08:25:16] ruby-lang237: I have an issue with popen3 that i cannot undertand https://gist.github.com/iongion/cad4c540fa7085e434b6
[08:25:31] polyrob: has joined #ruby
[08:25:47] vyorkin: 0x0dea: executes 5 times faster than "@source = @source.take(@limit - 1).unshift(obj)"
[08:26:18] tjbiddle: has joined #ruby
[08:26:19] ruby-lang237: why is popen3 hanging
[08:26:33] craysiii: unshadow nice. i think i saw this morning that you posted an issue on the github?
[08:27:25] rdark: has joined #ruby
[08:27:29] schaerli: has joined #ruby
[08:27:43] unshadow_: craysiii: not on github cuz they wont allow issues, but it's on the bug tracker: https://bugs.ruby-lang.org/issues/11400
[08:28:09] craysiii: ah yeah that was it. i rmember because the name was Bar and i thought that was interesting :P
[08:28:24] unshadow_: craysiii: :) Thanks
[08:28:54] craysiii: are RegExp in ruby not surrounded by quotes?
[08:29:25] unshadow_: craysiii: nope, just // as int a = "bar" , a.match(/bar/)
[08:29:30] adaedra: or, you can use the %r form and surround by whatever you want
[08:29:31] Ox0dea: >> %r"\w+" # craysiii
[08:29:32] ruboto: Ox0dea # => /\w+/ (https://eval.in/407803)
[08:29:52] craysiii: i havent used regex in ruby yet. thanks
[08:29:57] drewo: has joined #ruby
[08:30:08] Ox0dea: unshadow_: I'm glad you've at least pinpointed the source of the error.
[08:30:16] max__v: has joined #ruby
[08:30:17] adaedra: you can also add options directly after, craysiii
[08:30:35] ruby-lang237: has left #ruby: ()
[08:30:40] adaedra: >> [ /[ab]/i, %r"[ab]"i ]
[08:30:42] ruboto: adaedra # => [/[ab]/i, /[ab]/i] (https://eval.in/407804)
[08:30:45] ruby-lang237: has joined #ruby
[08:30:54] ruby-lang237: has left #ruby: ()
[08:31:05] Ox0dea: unshadow_: I wonder why StringScanner isn't being used to cleanly handle #gets with a Regexp.
[08:31:35] eGGsha: has joined #ruby
[08:31:43] Ox0dea: Ah, well, it wouldn't do for streams, I suppose.
[08:31:47] gion: has joined #ruby
[08:32:06] unshadow_: Ox0dea: looking at the code, you can see that sometime size would be nil, so if limit and limit >= 0; size = [size, limit].min; end can return this error
[08:32:11] Ox0dea: vyorkin: Nice! Did you happen to benchmark conditional #pop + #unshift?
[08:32:32] Ox0dea: vyorkin: Also, consider using benchmark-ips for more informative results.
[08:32:57] gion: is there a way to execute an external process without the use of the shell mechanism ? Open3 popen, system, `` .. they all seem to use shell and apply shell escaping/piping ...
[08:33:19] Ox0dea: unshadow_: Aye, putting nil in a variable called `size` ought to indicate you've done something wrong. :P
[08:33:59] agent_white: has joined #ruby
[08:34:11] unshadow_: Ox0dea: XD it's all becuase that you cannot [nil, 4096].min
[08:34:26] craysiii: night everyone.
[08:34:42] Ox0dea: >> nil.to_i # unshadow_
[08:34:43] ruboto: Ox0dea # => 0 (https://eval.in/407807)
[08:34:45] Ox0dea: Night, craysiii.
[08:34:59] juanpablo_____: has joined #ruby
[08:35:23] craysiii: WAIT. isn't 0 a truthy value?
[08:35:33] Ox0dea: gion: Kernel.exec tries not to use an external shell.
[08:35:56] jhass: craysiii: it is
[08:36:11] jhass: only nil and false aren't
[08:36:36] craysiii: yes thats why im confused. why would nil.to_i return a truthy value. if anything i think it should raise an error or something.
[08:37:07] white_bear: has joined #ruby
[08:37:43] unshadow_: craysiii: not truthy, just an int, it's like nil.to_s == ""
[08:37:51] unshadow_: so nil.to_i == 0
[08:37:53] gion: Ox0dea: it is the only thing that works
[08:38:00] Ox0dea: gion: Yay?
[08:38:02] max_v: nil.to_i == 0
[08:38:30] Ox0dea: >> nil.to_s.to_i
[08:38:31] ruboto: Ox0dea # => 0 (https://eval.in/407808)
[08:38:36] Silox|: has joined #ruby
[08:38:47] Ox0dea: For good or ill, Ruby makes it very easy for us to pretend we don't have nils.
[08:39:01] casadei_: has joined #ruby
[08:39:09] gion: Ox0dea: I do not know if yay - because of ffmpeg's pipe | separators, all popen, capture.. do not work - https://gist.github.com/iongion/cad4c540fa7085e434b6
[08:39:18] gion: Ox0dea: i must investigate tradeoffs
[08:39:24] Ox0dea: gion: Aye, I reckon so.
[08:39:49] Ox0dea: Kernel.exec will only refrain from using a shell if your command doesn't contain any "shell characters".
[08:40:34] leat2: has joined #ruby
[08:40:44] Violentr: has joined #ruby
[08:41:05] ledestin: has joined #ruby
[08:42:43] workmad3: has joined #ruby
[08:43:01] gion: Ox0dea: and code after exec does not execute, so it is not good
[08:43:22] marr: has joined #ruby
[08:43:27] gion: Ox0dea: i have lost all options due to the pipe character
[08:44:09] Ox0dea: gion: To be clear, you're not actually using the shell's piping mechanism, right?
[08:44:20] _blizzy_: has joined #ruby
[08:44:48] gion: Ox0dea: no, this is the command that confuses ruby's shell execution mechanism: ffmpeg -y -f mpegts -i "concat:chunks/1.ts|chunks/2.ts|chunks/3.ts" -c copy -bsf:a aac_adtstoasc -bsf:v h264_mp4toannexb output.mp4
[08:45:09] Ox0dea: gion: Have you tried escaping them?
[08:45:25] gion: Ox0dea: those pipes are not shell pipes, they are separators for the concat filter of ffmpeg, should be taken as they are
[08:45:31] Ox0dea: Yes, I see.
[08:46:20] gion: something is happening as in my gist, the second method using popen3 that hangs, works correctly, if it wouldn't hang
[08:46:43] Ox0dea: >> require 'shellwords'; Shellwords.shellescape '|' # gion
[08:46:44] ruboto: Ox0dea # => "\\|" (https://eval.in/407810)
[08:47:58] tylersmith: has joined #ruby
[08:49:04] leafybasil: has joined #ruby
[08:49:49] Zai00: has joined #ruby
[08:51:06] gion: Ox0dea: escaping is not liked by ffmpeg -> it receives this string as is: "concat:chunks/1.ts\|chunks/2.ts\|chunks/3.ts: Invalid argument"
[08:51:47] Ox0dea: gion: That's regrettable.
[08:52:12] bustrarm: has joined #ruby
[08:52:32] gion: Ox0dea: :) any idea, tip on how to overcome this ? create a wrapper shell script that gets those files separated differently ?
[08:54:05] gion: Ox0dea: create a bash script on the fly in a temporary file that contains that ffmpeg command, and i invoke the bash wrapper from ruby using popen instead of running the ffmpeg command
[08:54:47] Ox0dea: gion: That would likely do, but it's a little gross, no?
[08:55:13] gion: Ox0dea: it would be absolutely horrible :)
[08:55:54] gion: Ox0dea: could also modify ffmpeg to use a different separator than the bloody pipe
[08:56:14] leat2: has joined #ruby
[08:56:18] Ox0dea: gion: Well, you could use `tr` to achieve that without modifying ffmpeg.
[08:56:26] gion: Ox0dea: even more horrible
[08:56:32] Ox0dea: More shells!
[08:58:48] Igorshp: has joined #ruby
[08:58:55] platzhirsch: has joined #ruby
[08:59:02] platzhirsch: has left #ruby: ()
[08:59:37] Ox0dea: gion: You should endeavor to determine the exact offset of the 0x7c byte in your ffmpeg binary that you'd need to swap out to make it accept something different in its concat: parameter. :P
[09:00:16] bumbar_: has joined #ruby
[09:00:35] vyorkin: has joined #ruby
[09:00:49] leat2: has joined #ruby
[09:01:10] Ox0dea: As an aside, it's both wondrous and terrifying to realize that doing so would almost certainly work.
[09:02:11] Ox0dea: So many "cracks" used to work their magic by turning a single 0 byte to a 1 or vice-versa.
[09:02:45] adaedra: the art of the thing is to find this byte.
[09:03:11] Ox0dea: adaedra: Easiest is to change it in source, recompile, and use `cmp`.
[09:03:34] adaedra: Ox0dea: I'm talking about cracks
[09:03:43] gion: Ox0dea: on a side note - executing this: bash -c 'ffmpeg -y -f mpegts -i "concat:chunks/1.ts|chunks/2.ts|chunks/3.ts" -c copy -bsf:a aac_adtstoasc -bsf:v h264_mp4toannexb output.mp4' has the same effect as popen3
[09:03:52] bronson: has joined #ruby
[09:03:52] curses: has joined #ruby
[09:04:12] gion: Ox0dea: when not hanging
[09:04:21] senayar: has joined #ruby
[09:04:22] senayar: has joined #ruby
[09:04:33] Ox0dea: gion: Does that ffmpeg command produce output on stdout?
[09:04:58] gion: Ox0dea: yes, both stdout and stderr, even if without error
[09:05:31] miah: has joined #ruby
[09:05:45] entropie: has joined #ruby
[09:07:09] leafybasil: has joined #ruby
[09:07:20] robbyoconnor: has joined #ruby
[09:07:56] Ox0dea: gion: Given the plethora of things that can and seem to have gone wrong, dropping it into a tempfile and executing from there doesn't seem all that terrible.
[09:08:33] Oog_: has joined #ruby
[09:08:34] Ox0dea: It's hard to say whether Ruby or ffmpeg is ultimately to blame on this one.
[09:09:58] Ox0dea: ACTION inconspicuously recommends trying it with Python's os.system() to narrow the suspects.
[09:10:04] gion: Ox0dea: more and more convinced it is ffmpeg + bash
[09:10:38] omegamike: has joined #ruby
[09:10:48] adaedra: gion: did you try a classical exec?
[09:10:58] Ox0dea: adaedra: He doesn't want to replace his process.
[09:11:15] Ox0dea: exec replaces processes?
[09:12:01] gion: gion: exec works but it replaces current process, so not good
[09:12:19] adaedra: so it's your shell that derps
[09:12:23] arup_r: has joined #ruby
[09:12:34] gion: no, it is any other command different than exec
[09:12:34] bayed: has joined #ruby
[09:12:49] adaedra: then you have to set your pipery by hand
[09:13:05] troulouliou_div2: has joined #ruby
[09:13:29] Ox0dea: As opposed to letting Wolfram|Alpha figure it out for you.
[09:13:50] gion: adaedra: there is no piping involved
[09:14:10] gion: adaedra: executing this with exec works: bash -c 'ffmpeg -y -f mpegts -i "concat:chunks/1.ts|chunks/2.ts|chunks/3.ts" -c copy -bsf:a aac_adtstoasc -bsf:v h264_mp4toannexb videos/output.mp4'
[09:14:28] adaedra: yes, but what are you trying to do, above, since I read about popen3
[09:14:34] robbyoconnor: has joined #ruby
[09:14:45] withnale_: has joined #ruby
[09:14:57] workmad3: has joined #ruby
[09:15:09] gion: execute ffmpeg, get its return code and all stderr and stdout output
[09:15:28] adaedra: then yes, you have pipery, which is usually hidden by popen
[09:16:05] rbowlby: has joined #ruby
[09:16:29] gion: adaedra: do you have any recommendation from where to start from ?
[09:16:29] EminenceHC: has joined #ruby
[09:16:40] neanderslob_: has joined #ruby
[09:16:46] workmad3: gion: the stderr and stdout are pipes... as adaedra said, look @ popen3
[09:17:04] adaedra: workmad3: the problem is that popen3 fails at executing the process
[09:17:29] adaedra: when exec works correctly, as gion says
[09:17:31] neanderslob: has joined #ruby
[09:17:49] adaedra: gion: at the exec() step, you don't need the bash -c wrapper, no?
[09:17:53] gion: adaedra: maybe i confused you, it does not fail, it just hangs until i kill ruby interpreter manually, then i see the file is correctly generated, but only after manual killing the ruby process
[09:18:39] adaedra: before you kill the ruby process, in your ps/top/htop/whatever, is there still the ffmpeg child?
[09:18:44] gion: adaedra: exec works with or without bash, but it is not an acceptable solution as i have to do other logic post exec in the same ruby script
[09:18:44] Hounddog: has joined #ruby
[09:19:07] gion: adaedra: yes, not doing anything
[09:19:16] adaedra: in what state? S? Z?
[09:19:34] platzhirsch: has joined #ruby
[09:19:58] gion: adaedra: looking
[09:20:07] workmad3: gion: did you try adding 'wait_thr.join' at the top of the popen3 block?
[09:21:20] workmad3: gion: or do 'exit_status = wait_thr.value' at the top, so that you don't close any io pipes until the process has finished
[09:21:22] gion: adaedra: S
[09:21:41] adaedra: well, it would have been strange both ways, but heh
[09:21:42] astrobunny: has joined #ruby
[09:21:49] livathinos: has joined #ruby
[09:23:24] Rollabunna: has joined #ruby
[09:23:57] drewo: has joined #ruby
[09:24:02] senayar: has joined #ruby
[09:24:02] senayar: has joined #ruby
[09:24:45] Musashi007: has joined #ruby
[09:24:47] gion: workmad3: same haning with or without join and reading the status at the top
[09:26:06] workmad3: gion: if what you really want is a blocking "Run cmd and get output", you could also try `ffmpeg_out, ffmpeg_err, ffmpeg_status = Open3.capture("your command here")`... but it's sounding almost like something weird is going on with ffmpeg in the background :/
[09:26:25] workmad3: *capture3 in that ruby
[09:26:27] workmad3: not just capture
[09:26:46] workmad3: http://ruby-doc.org/stdlib-1.9.3/libdoc/open3/rdoc/Open3.html#method-c-capture3
[09:27:27] eGGsha: has joined #ruby
[09:28:43] gion: workmad3: capture has the same behavior as popen ...so in my case it does not hang, but ignores all chunks that come after first pipe separator
[09:28:45] safeforge: has joined #ruby
[09:30:08] adaedra: grmbl, the return status is failing me
[09:31:44] workmad3: gion: how about if you did 'Open3.capture(*command.split(" "))'?
[09:33:13] workmad3: gah, capture3 even!
[09:33:24] workmad3: that 3 keeps on catching me out :)
[09:34:12] banister: has joined #ruby
[09:34:59] gion: workmad3: no, same result when passing as array or as a string
[09:35:22] senayar: has joined #ruby
[09:35:22] senayar: has joined #ruby
[09:35:39] workmad3: ok, that is really weird :/
[09:35:42] yaroslav: has joined #ruby
[09:36:42] yardenbar: has joined #ruby
[09:37:55] adaedra: gion: open("|-") do |f| if f.nil?; exec(...); end; text = f.read; Process.wait f.pid; status = $?.exitstatus; [status, text]; end
[09:38:03] supergeek: has joined #ruby
[09:38:06] RTG`: has joined #ruby
[09:38:45] yaroslav: has left #ruby: ()
[09:39:16] adaedra: manual mode, but heh, if it works, better than auto mode :/
[09:40:01] schaerli: has joined #ruby
[09:40:14] bruno-: has joined #ruby
[09:40:14] DaniG2k_: has joined #ruby
[09:40:16] {756d6f}: has joined #ruby
[09:41:08] eGGsha: has joined #ruby
[09:41:11] Guest32: has joined #ruby
[09:41:23] vyorkin: has joined #ruby
[09:41:24] workmad3: adaedra: hehe :)
[09:41:39] aryaching: has joined #ruby
[09:41:49] max_v: has joined #ruby
[09:44:17] gion: adaedra: what is open("|-")
[09:44:23] adaedra: &ri Kernel.open
[09:44:23] `derpy: http://www.rubydoc.info/stdlib/core/Kernel#open-class_method
[09:44:56] arup_r: has joined #ruby
[09:44:57] adaedra: meh, #open
[09:45:18] adaedra: I'll not this error somewhere
[09:45:23] gion: adaedra: looks nice
[09:45:37] adaedra: gion: but does it works?
[09:46:08] ljarvis: adaedra: is it open?
[09:46:33] adaedra: ljarvis: what?
[09:46:40] ljarvis: adaedra: the cinch plugin
[09:47:00] adaedra: https://github.com/adaedra/cinch-rubydoc
[09:47:25] ljarvis: zomg 4 space indent
[09:48:11] adaedra: I'd be happy if it were the only "issue".
[09:48:41] ljarvis: ah it uses yard, meh
[09:48:51] dionysus69: has joined #ruby
[09:49:02] adaedra: you have a better solution?
[09:49:22] ljarvis: no I think that's a good solution, I just can't stand yard otherwise I might have been able to help out
[09:50:10] adaedra: I couldn't achieve my goals in a sane way with rdoc :T
[09:52:01] ljarvis: hah yeah that doesn't surprise me
[09:52:36] arup_r: has joined #ruby
[09:53:53] adaedra: why do you hate yard?
[09:55:23] TheHodge: has joined #ruby
[09:56:03] gion: adaedra: same erroneous behavior https://gist.github.com/iongion/b87a48ebd08e79aa3ba3 the commented line works
[09:56:37] ljarvis: adaedra: just not a fan of any of the public facing parts of it (the doc format, the output, etc)
[09:56:56] adaedra: gion: everything in command array are separate arguments without ' ', right?
[09:57:52] gion: adaedra: yes
[09:58:22] adaedra: you can try *command instead of command.join ' ', it will disable shelling out completely - but tbh, it would be weird that it works
[09:58:27] senayar: has joined #ruby
[09:58:29] adaedra: but everything here is weird so heh
[09:58:34] sdothum: has joined #ruby
[09:59:51] gion: adaedra: did it, same behavior, if exec is called before open it works, inside the open's block it does not
[10:00:31] Trynemjoel: has joined #ruby
[10:00:37] rikkipitt: has joined #ruby
[10:00:47] adaedra: would mean ffmpeg has different behavior if not having a tty as output
[10:00:47] Hounddog: has joined #ruby
[10:00:47] yie: has joined #ruby
[10:00:48] levifig: has joined #ruby
[10:00:48] knu: has joined #ruby
[10:00:49] thang: has joined #ruby
[10:00:52] wprice: has joined #ruby
[10:00:52] jenrzzz: has joined #ruby
[10:01:01] sross07: has joined #ruby
[10:01:02] yokel: has joined #ruby
[10:01:02] Zai00: has joined #ruby
[10:01:06] Axy: has joined #ruby
[10:01:06] Axy: has joined #ruby
[10:01:06] sinkensabe: has joined #ruby
[10:01:09] duncannz: has joined #ruby
[10:01:09] nofxx: has joined #ruby
[10:01:11] pontiki: has joined #ruby
[10:01:12] gion: adaedra: so, back to shell wrapper script ? :P
[10:01:15] kfpratt: has joined #ruby
[10:01:17] mikecmpbll: has joined #ruby
[10:01:20] superrorc: has joined #ruby
[10:01:25] adaedra: that's weeeeeeeird
[10:01:27] platzhirsch: has joined #ruby
[10:01:43] adaedra: gion: in your shell, the ffmpeg command still works well if you pipe into cat?
[10:01:44] workmad3: adaedra: a lot of commands do have different behaviour if they don't have a tty output...
[10:01:53] stonith: has joined #ruby
[10:01:53] stonith: has joined #ruby
[10:01:55] pyon: has joined #ruby
[10:02:15] Omni-: has joined #ruby
[10:03:01] higuys: has joined #ruby
[10:03:21] tobyx_: has joined #ruby
[10:03:28] hahuang61: has joined #ruby
[10:03:49] _whitelogger____: has joined #ruby
[10:03:56] gion: guys, I quit, I go to the wrapper shell script
[10:04:03] gion: thank you for your amazing help
[10:04:21] senayar^: has joined #ruby
[10:04:23] workmad3: gion: sorry we couldn't help you figure it out :(
[10:05:18] decoponio: has joined #ruby
[10:05:28] cornerma1: has joined #ruby
[10:05:39] unshadow: has joined #ruby
[10:05:40] christiandsg: has joined #ruby
[10:05:55] silverdust: has joined #ruby
[10:06:21] jtdowney: has joined #ruby
[10:06:31] woodruffw: has joined #ruby
[10:06:38] aganov: has joined #ruby
[10:06:43] darkf_: has joined #ruby
[10:06:49] eam: has joined #ruby
[10:06:52] Darkwater_: has joined #ruby
[10:07:00] RTG`: has joined #ruby
[10:07:26] alem0lars: has joined #ruby
[10:07:31] Soda: has joined #ruby
[10:07:35] Vile`: has joined #ruby
[10:07:50] howdoi: has joined #ruby
[10:07:57] bnagy: has joined #ruby
[10:08:09] TheHodge: has joined #ruby
[10:09:05] vpereira: has joined #ruby
[10:09:47] mathie: has joined #ruby
[10:09:55] nkts: has joined #ruby
[10:10:04] casadei_: has joined #ruby
[10:10:41] certainty: has joined #ruby
[10:11:12] [k-: has joined #ruby
[10:11:28] omegamike: has joined #ruby
[10:11:34] nofxx: has joined #ruby
[10:15:23] pawz: has joined #ruby
[10:15:53] zapata: has joined #ruby
[10:16:07] vyorkin: has joined #ruby
[10:16:59] afrianska: has joined #ruby
[10:17:49] gion: workmad3 and adaedra, with wrapper script it has the erroneous behavior, if wrapper script is called with exec, it works correctly
[10:18:08] drewo: has joined #ruby
[10:18:22] adaedra: gion: like said above, it seems that ffmpeg has this behavior if not outputting to a tty
[10:19:54] Oog: has joined #ruby
[10:20:02] {756d6f}: has joined #ruby
[10:20:07] Rollabunna: has joined #ruby
[10:20:24] rickmasta: has joined #ruby
[10:21:43] doerteDev: has joined #ruby
[10:22:12] ziyadb: has joined #ruby
[10:23:03] xfbs: has joined #ruby
[10:23:45] juanpablo_____: has joined #ruby
[10:24:08] unshadow: has joined #ruby
[10:24:20] symbol: has joined #ruby
[10:24:22] gion: adaedra: did the same script in python - does not have any issues -> https://gist.github.com/iongion/8ae35b7b8d97cc000f0f
[10:24:52] ljarvis: ACTION will always find str.join(arr) hilarious
[10:26:13] solars: hi, is there a way to interpret time zone designators like GMT+1:00 in ruby? it seems that this is a common format
[10:26:44] schaerli: has joined #ruby
[10:26:46] Musashi007: has joined #ruby
[10:27:21] felixrsmith: has joined #ruby
[10:27:27] adaedra: &ri Date.strptime
[10:27:27] `derpy: http://www.rubydoc.info/stdlib/date/Date#strptime-class_method
[10:27:36] adaedra: may help you parsing anything
[10:28:14] solars: I have the timestamp already as a time object in utc, I just need to output it in the given timezone
[10:28:27] solars: .localtime doesn't accept strings like that though
[10:28:34] adaedra: &ri Time#strftime then
[10:28:34] solars: so I thought there might be another method
[10:28:34] `derpy: http://www.rubydoc.info/stdlib/core/Time#strftime-instance_method
[10:28:47] pyon: has joined #ruby
[10:29:30] solars: I mean I have to do something like this:
[10:29:58] solars: Time.now.utc.localtime ("GMT+1:00") but that won't work as it only recognizes -/+HH:MM
[10:30:07] solars: same for strftime
[10:30:10] ytti: DateTime#strptime can generate arbitrary format to DataTime
[10:30:15] solars: so I guess I have to alter the string anyway
[10:30:39] solars: I think you misunderstood, I have the time object already, and need to output the time in timezone X
[10:31:15] adaedra: .localtime() to convert the time
[10:31:29] solars: yeah, I'll change GMT+1:00 to +01:00
[10:31:44] solars: the GMT string doesn't seem to be any kind of standard
[10:32:18] adaedra: iso8601 is the standard, all praise iso8601
[10:32:57] Oog: has joined #ruby
[10:33:50] workmad3: adaedra: yeah, praise iso8601, even though it only supports time offsets, not timezones :(
[10:34:04] adaedra: timezones are confusing, offsets are clear
[10:34:11] ljarvis: psh why could you want the zone if you have the offset
[10:34:26] workmad3: ljarvis: because you want to do a calculation with the time? such as adding 2 weeks to it?
[10:34:29] krasnus: has joined #ruby
[10:34:31] adaedra: what is easier to read: CEST or +02:00 ?
[10:35:09] ljarvis: workmad3: why does that make the zone better than the offset? am i missing something
[10:35:18] workmad3: ljarvis: daylight savings changes
[10:35:45] ljarvis: had to deal with that shit in chronic and it make me mad
[10:36:03] ljarvis: and by deal with i mean mask with lots of abstract turd
[10:36:09] workmad3: ljarvis: different timezones can have the same offset at some points in the year, and once you only store the offset you completely lose that info :(
[10:36:23] ljarvis: time is hard
[10:36:26] {756d6f}: has joined #ruby
[10:36:35] bnagy: zones are fixed
[10:36:40] adaedra: workmad3: er, I thought named timezones stay the same
[10:36:46] fabrice31: has joined #ruby
[10:37:00] bnagy: it's just that the zone that applies to X geography at any given time chages
[10:37:20] ndrei: has joined #ruby
[10:37:22] adaedra: like we're having CEST here iirc, and outside of DST switch to CET
[10:37:30] workmad3: bnagy: the timezone contains that information though ;) the offset doesn't
[10:37:40] bnagy: workmad3: well no, it kind of doesn't
[10:37:43] darix: UTC everywhere
[10:37:53] bnagy: the timezone doesn't tell you what the associated daylight time is
[10:37:57] bnagy: or when it applies
[10:38:01] bnagy: or if there is one
[10:38:02] adaedra: it's even more retarded than TZ, darix
[10:38:05] bnagy: hence tzinfo horror
[10:38:06] apfeluser: has joined #ruby
[10:38:17] darix: adaedra: not really. especially for servers
[10:38:23] lkba_: has joined #ruby
[10:38:27] sdothum: has joined #ruby
[10:38:32] bnagy: anyway, I agree with "always store utc" ;)
[10:39:04] adaedra: yes, but you don't only store your data. At a moment, you have to show it to your user.
[10:39:45] adaedra: For data storage I agree.
[10:39:51] workmad3: bnagy: I'm happy with 'store dates normalised in UTC, with the timezone or geographic region it originally came from' :)
[10:40:15] workmad3: bnagy: at least some hint to recover the context to potentially map back to tzdata rules for changes
[10:40:24] bruno-: has joined #ruby
[10:40:55] darix: workmad3: tzdata changes are not applied retrospectively
[10:41:06] darix: that would cause even more chaos
[10:41:26] workmad3: darix: by changes I mean calculations involving the date
[10:41:34] workmad3: darix: as in "I want to add 2 weeks to this date"
[10:41:58] bnagy: also, zoned times means that there can be times that never existed
[10:42:03] bnagy: which is hilarity
[10:42:36] bnagy: all you can do imvho is store and operate on UTC and then present UTCs as hopefully-correct localtimes
[10:42:41] adaedra: tbh, we didn't need timezones to have not existing dates
[10:43:02] workmad3: adaedra: heh :) gotta love calendar changes too, eh?
[10:43:20] solars: thanks for the discussion workmad, I just realized that we are missing the timezone informatino in our database as we have just the offset, so half of the year the shown timestamps are wrong.. haha
[10:43:23] adaedra: and it changes by countries, too, wonderful
[10:43:30] solars: workmad3, is there a standardized list of timezone names?
[10:43:39] workmad3: solars: use tzdata
[10:43:39] bnagy: that's tzdata
[10:43:56] workmad3: solars: and then try to forget about it, because it'll just drive you insane
[10:44:02] solars: I mean in general, not ruby specific
[10:44:09] workmad3: solars: tzdata is in general
[10:44:32] f4cl3y: has joined #ruby
[10:44:42] solars: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
[10:44:44] solars: I assume it's this
[10:44:46] bronson: has joined #ruby
[10:45:27] workmad3: solars: yeah, that looks about right... it's packaged up as tzdata nearly universally, I believe
[10:45:39] Narzew: has joined #ruby
[10:45:40] bnagy: they should give new rubyists a DateTime exercise involving Nepal and the US
[10:45:41] workmad3: solars: linux distros, language libraries...
[10:45:53] bnagy: that way if they don't kill themselves it will never get worse
[10:46:23] solars: workmad3, thanks!
[10:46:29] workmad3: bnagy: unless they need to deal with historical data from singapore in 1927...
[10:46:41] solars: very smart to only store the offsets in our database... man
[10:46:43] darkf_: has joined #ruby
[10:47:09] workmad3: bnagy: http://www.timeanddate.com/time/change/china/shanghai?year=1927
[10:47:30] workmad3: bnagy: and also http://stackoverflow.com/questions/6841333/why-is-subtracting-these-two-times-in-1927-giving-a-strange-result because the tzdata kept on being 'fixed'
[10:47:47] bnagy: "clocks were turned backward 0:05:52" ... obviously
[10:48:18] ljarvis: they could have at least rounded it
[10:49:19] solars: is there a way with tzdata to specify utc time, base offset and country and get it corrected to DST or non DST?
[10:49:34] solars: I have: timestamp, country, offset
[10:50:02] solars: hm I guess country is not needed, should be possible
[10:50:08] solars: if offset is consistent
[10:50:12] nofxx: solars, that's not good, you should have a location to calculate DST
[10:50:27] adaedra: Like if Country was a viable information
[10:50:32] bnagy: solars: you should only need utc and location
[10:50:42] solars: hm right I need location
[10:50:57] bnagy: country might not be enough :/
[10:51:05] solars: just figured
[10:51:09] workmad3: solars: or the tzdata style timezone, e.g. 'America/New_York'
[10:51:34] solars: yeah, the geniouses only stored the offset :)
[10:51:43] bnagy: and the country?
[10:52:02] solars: country and offset
[10:52:04] nofxx: yeah, timezone... solars you may do a batch update there... if you assume it's all not-dst ;)
[10:52:17] bnagy: ok well sounds like you might need to write code :<
[10:52:19] workmad3: solars: with a tzdata aware DateTime, you can load the time as UTC, move it into the tzdata timezone and then do calculations on it... the implementation will then handle changing the offset if required by the tzdata rules
[10:52:21] solars: hmm but country and offset should work as it's the same for the whole country, or not?
[10:52:28] adaedra: if you have the tzdata timezone, country is useless
[10:52:28] workmad3: solars: HAHAHAAHAHA
[10:52:34] solars: workmad3, :)
[10:52:40] solars: the timezone string is the missing link
[10:53:08] workmad3: 'the same tz for the whole country'... that would actually make sense...
[10:53:20] bnagy: solars: if you have the country and the offset and the date you can find a tzdata entry that fits
[10:53:20] solars: not the same tz, the same DST setting
[10:53:22] adaedra: Look at the US or Russia
[10:53:39] solars: bnagy, that's what I meant
[10:53:51] solars: bnagy, which methods are you referring to? I cannot try atm
[10:54:23] bnagy: like if you know it's December in Australia only one of the three zones will match the offset you have
[10:54:33] solars: workmad3, to explain: I meant if I have the country and offset (base) the DST is probably the same across the whole country
[10:54:48] solars: bnagy, exactly
[10:55:01] bnagy: assuming the offset was correct tat the time :(
[10:55:16] solars: yeah, question is if they just stored the "current" offset haha
[10:55:29] workmad3: solars: apart from actually on a DST shift... the DST shift is typically done at 2a.m. in the current offset, so if you have a country that spans multiple timezones, different parts of it will be changing to/from DST at different UTC times...
[10:55:34] eGGsha: has joined #ruby
[10:55:49] solars: hm indeed..
[10:55:52] solars: damn what a mess
[10:56:46] unshadow: Where is a good place to find Ruby (not rails) programmers for hire (for a single project) ?
[10:57:22] tbuehlmann: imagine we'd populated mars, or earth 2. timezones, pff, easy.
[10:57:27] max_v: has joined #ruby
[10:57:31] workmad3: solars: you could probably just go "Meh" and keep your assumption at that point though ;) that edge-case is probably not too important in most situations
[10:58:12] workmad3: tbuehlmann: not to mention that getting to/from mars will probably involve speeds where relativistic shifts become noticable
[10:58:22] solars: workmad3, you mean the assumption of getting the DST info with country and offset?
[10:58:36] adaedra: oops, remove the I
[10:58:40] BTRE: has joined #ruby
[10:58:45] dfockler: has joined #ruby
[10:59:14] workmad3: solars: yeah, I mean you can probably ignore the edge-case where different parts of a country have applied DST at different UTC times
[10:59:27] adaedra: or different have DST or NOT
[10:59:31] solars: workmad3, yeah I think I will just ignore it, or let someone else fix the timezones
[10:59:35] rmoriz: has joined #ruby
[11:00:29] drPoggs: has joined #ruby
[11:00:29] adaedra: Even a timezone name can have different DST, fun
[11:00:32] soahccc: has joined #ruby
[11:00:33] Trieste: has joined #ruby
[11:00:38] elektronaut: has joined #ruby
[11:00:44] phrozen77: has joined #ruby
[11:00:47] nemesit|znc: has joined #ruby
[11:02:17] DaniG2k: has joined #ruby
[11:02:29] Jarboe: has joined #ruby
[11:02:41] solars: I just found out that we have stored the city as well, I hope there is a way to get the timezone for a city+country, that would be a solution :)
[11:02:44] adaedra: I think we usually refer to timezones by a city, or multiple cities, no?
[11:03:15] adaedra: city should be ok, it's close enough to have relevant information imo
[11:03:25] michael_mbp: has joined #ruby
[11:03:42] solars: can anyone tell me there is a lib that let's me input city+country params? :)
[11:03:52] Iskarlar: has joined #ruby
[11:03:53] skade: has joined #ruby
[11:04:21] chills42: has joined #ruby
[11:04:54] bauruine: has joined #ruby
[11:05:14] robbyoconnor: has joined #ruby
[11:05:44] chills42: has joined #ruby
[11:05:46] workmad3: solars: if you wanted a fully accurate solution, you may need to do a bit of work... not all cities have timezones, but there's a shapefile of tzdata timezone boundaries here: http://efele.net/maps/tz/world/
[11:06:08] workmad3: solars: so you could geocode the city into a central point and then figure out which tzdata timezone it's in using that shapefile
[11:06:25] _whitelogger____: has joined #ruby
[11:06:26] christiandsg: has joined #ruby
[11:07:07] {756d6f}: has joined #ruby
[11:07:18] adaedra: have to find the city representing the TZ and the country
[11:07:58] adaedra: so it's more or less mapping to any of these points: http://www.timeanddate.com/time/map/
[11:08:25] last_staff: has joined #ruby
[11:08:27] workmad3: adaedra: that's where the shapefile comes in :) that's a mapping of geographic shapes to tzdata names (of the form 'country/city' normally)
[11:08:47] adaedra: Like Europe/Paris?
[11:09:40] Vile`: has joined #ruby
[11:09:49] solars: maybe there is something online that I could abuse
[11:10:05] solars: http://www.timeanddate.com/worldclock/search.html
[11:10:05] adaedra: you have all of these in /usr/share/zoneinfo normally
[11:10:08] solars: as it's a one time thing
[11:10:26] solars: adaedra, but not all cities in our db
[11:10:41] adaedra: solars: two words: have fun
[11:10:45] workmad3: adaedra: tzdata and tzinfo don't typically include the geographical boundaries
[11:10:49] solars: well some scraping should do it
[11:10:55] solars: better than geocoding :)
[11:10:58] adaedra: workmad3: it was for the name of the zones :)
[11:11:04] heyimwill: has joined #ruby
[11:11:29] bnagy: http://stackoverflow.com/questions/16086962/how-to-get-a-time-zone-from-a-location-using-latitude-and-longitude-coordinates
[11:11:59] leat2: has joined #ruby
[11:12:15] drewo: has joined #ruby
[11:12:24] solars: thanks a lot
[11:12:27] workmad3: bnagy: awesome! https://developers.google.com/maps/documentation/timezone/intro
[11:12:57] bruno-: has joined #ruby
[11:13:18] bnagy: looks like there's a ruby gem that wraps geonames and that goog api
[11:13:45] workmad3: https://rubygems.org/gems/timezone
[11:14:14] adaedra: It's easy and fun to work with time zones ??? no one, ever.
[11:14:19] Rollabunna: has joined #ruby
[11:15:32] bnagy: if you don't have lat long there's a link to a big city DB as well
[11:15:36] bnagy: but crowdsourced
[11:16:43] solars: I'll give it a try
[11:16:48] abdulrehman: has joined #ruby
[11:16:52] quimrstorres: has joined #ruby
[11:16:56] solars: thanks a lot for the detailed discussion guys :)
[11:17:08] workmad3: bnagy: I must not spend time today wrapping that shapefile up into a ruby gem!
[11:17:13] fabrice31: has joined #ruby
[11:18:31] bnagy: workmad3: what's the general approach to placing a point into the shapefile?
[11:19:20] gix: has joined #ruby
[11:20:03] workmad3: bnagy: I'd need to dig out some code I had a while ago that loaded shapefiles and did ops on them with rgeo
[11:21:01] bnagy: I think http://stackoverflow.com/questions/5584602/determine-timezone-from-latitude-longitude-without-using-web-services-like-geona/5584826#5584826 that looks simple
[11:21:20] bnagy: use geonames for city -> lat long then use goog for lat-long -> tz
[11:21:41] bnagy: for this particular problem, anyway, where we have a country and city
[11:22:32] leat2: has joined #ruby
[11:23:12] solars: bnagy, yep, the gem linked above does (should) exactly this
[11:23:16] abdulrehman: quick question; any chance I can embed ruby code in a string where by some part of the string get replaces on the fly by some sort of a condition?
[11:23:39] adaedra: use interpolation
[11:24:03] iateadonut: has joined #ruby
[11:24:04] lkba: has joined #ruby
[11:24:17] adaedra: >> a = 'world'; "Hello, #{world.capitalize}!"
[11:24:18] ruboto: adaedra # => undefined local variable or method `world' for main:Object (NameError) ...check link for more (https://eval.in/408034)
[11:24:27] adaedra: >> a = 'world'; "Hello, #{a.capitalize}!"
[11:24:28] ruboto: adaedra # => "Hello, World!" (https://eval.in/408035)
[11:24:41] adaedra: you can do any valid ruby code inside of #{}
[11:24:55] AlexAltea: has joined #ruby
[11:25:31] abdulrehman: ok, i thought we can only have variables in there
[11:27:20] omegamike: has joined #ruby
[11:27:22] abdulrehman: something like this; strg = "World is #{ 'great' unless false}"
[11:29:10] abdulrehman: awesome, love ruby!!!
[11:29:45] dimasg: has joined #ruby
[11:30:15] niemcu: has joined #ruby
[11:30:48] mxrguspxrt: has joined #ruby
[11:31:00] decoponio: has joined #ruby
[11:31:05] joonty: has joined #ruby
[11:31:34] workmad3: abdulrehman: there's a slight restriction on the contents of interpolation... it can be any ruby that evaluates to an object that responds to `to_s`... in practice, this is pretty much anything though :)
[11:32:28] leat2: has joined #ruby
[11:34:11] rikkipitt: has joined #ruby
[11:36:07] bronson: has joined #ruby
[11:37:04] senayar: has joined #ruby
[11:37:04] senayar: has joined #ruby
[11:37:10] abdulrehman: workmad3: ya, but I think it wont do me good sadly, the reason being is that I am written some strings in a seperate rb file and include that, now some part of the string is like this #{testing} and testing is a variable I have just before bringing the string from the other file, so it complains it can't find it, I need a way to pass these to the file without complaining, and sorry I do not think I am being clear hahahahah
[11:38:43] ndrei: has joined #ruby
[11:39:36] moredhel: has left #ruby: ("Textual IRC Client: www.textualapp.com")
[11:40:27] RegulationD: has joined #ruby
[11:40:52] d10n-work: has joined #ruby
[11:40:53] dgutierrez1287: has joined #ruby
[11:40:57] ljarvis: at least you sound like you're having fun
[11:41:03] ljarvis: or that's the laugh of a maniac
[11:41:05] spider-mario: has joined #ruby
[11:41:18] abdulrehman: but maybe I can use lambdas
[11:43:03] leat2: has joined #ruby
[11:43:03] ldnunes: has joined #ruby
[11:43:39] symbol: has joined #ruby
[11:47:30] but3k4: has joined #ruby
[11:49:26] {756d6f}: has joined #ruby
[11:50:56] sarkyniin: has joined #ruby
[11:51:39] symm-: has joined #ruby
[11:51:43] lannonbr: has joined #ruby
[11:52:39] AugustoCesar: has joined #ruby
[11:52:41] omegamike: has joined #ruby
[11:52:45] AugustoCesar: has left #ruby: ()
[11:54:57] DaniG2k: has joined #ruby
[11:57:17] s00pcan: has joined #ruby
[11:57:54] B1n4r10: has joined #ruby
[11:59:31] sarkyniin: has joined #ruby
[12:01:56] davedev24: has joined #ruby
[12:02:08] bluOxigen: has joined #ruby
[12:02:51] eGGsha: has joined #ruby
[12:04:22] felixr: has joined #ruby
[12:05:41] Scripore: has joined #ruby
[12:06:21] drewo: has joined #ruby
[12:07:16] Papierkorb: has joined #ruby
[12:07:38] skade: has joined #ruby
[12:08:36] Rollabunna: has joined #ruby
[12:08:53] afrianska: has joined #ruby
[12:09:42] {756d6f}: has joined #ruby
[12:10:18] jas02: has joined #ruby
[12:11:04] sdwrage: has joined #ruby
[12:12:13] strixd: has joined #ruby
[12:12:32] juanpablo_____: has joined #ruby
[12:13:54] Bloodshot: has joined #ruby
[12:14:05] Yzguy: has joined #ruby
[12:14:36] xfbs: has joined #ruby
[12:15:39] leat2: has joined #ruby
[12:16:50] davedev24: has joined #ruby
[12:17:00] sarkyniin: has joined #ruby
[12:17:30] phutchins: has joined #ruby
[12:17:37] quimrstorres: has joined #ruby
[12:18:46] Darkwater: has joined #ruby
[12:19:23] Darkwater: I'm using find_all (followed by each to do something) on an array, and then delete_if to remove the elements that have matched, is there a faster method for this?
[12:19:42] Darkwater: like a combined find_all + delete_if? (like a selective pop)
[12:20:26] lannonbr: I believe there is a select function that creates a new array based on a condition
[12:20:33] nateberkopec: has joined #ruby
[12:20:58] lannonbr: http://ruby-doc.org/core-2.2.0/Array.html#method-i-select
[12:22:04] manveru: >> (1..10).reject(&:even?)
[12:22:05] ruboto: manveru # => [1, 3, 5, 7, 9] (https://eval.in/408119)
[12:22:21] Darkwater: yeah but I also want to operate on the deleted items
[12:22:24] Darkwater: it's for a queue
[12:22:31] manveru: partition then?
[12:22:36] [k-: group_by
[12:22:41] manveru: >> (1..10).partition(&:even?)
[12:22:42] ruboto: manveru # => [[2, 4, 6, 8, 10], [1, 3, 5, 7, 9]] (https://eval.in/408120)
[12:22:44] Darkwater: the order is not guaranteed
[12:22:47] allomov: has joined #ruby
[12:22:53] Darkwater: actually it's probably not literally a queue
[12:23:02] jhass: lannonbr: find_all is just the ugly name for select
[12:23:31] leat2: has joined #ruby
[12:23:51] Darkwater: it's an array containing objects, and occasionally I want to take all objects from the array that match a certain criteria (a certain key equalling a certain value) and do something with those
[12:23:55] Darkwater: while removing them from the list
[12:24:04] jhass: Darkwater: Array#- I guess, though that'll go by equality, not identity
[12:24:21] jhass: or splat into #delete
[12:24:42] manveru: that won't look by a key
[12:24:58] Darkwater: well, guess I'll just stick with delete_if
[12:25:03] [k-: what is the problem with reject
[12:25:04] Darkwater: thanks for the suggestions tho
[12:25:06] [k-: or reject!
[12:25:20] jhass: [k-: delete_if is the ugly name for reject! ;)
[12:25:29] Darkwater: none, but I already wrote delete_if :>
[12:25:39] ynroot: has joined #ruby
[12:25:48] [k-: you just heard that it is ugly!
[12:25:54] arup_r: has joined #ruby
[12:25:54] Darkwater: it's also more explanatory imo
[12:26:01] jhass: Darkwater: if you don't need self-modifying, #partition would indeed be the correct tool actually
[12:26:16] Darkwater: yeah but I do need self-modifying
[12:26:37] sdwrage: has joined #ruby
[12:26:51] ynroot: hi there im using opensuse 13.2 and ruby 2.1.3p242 (2014-09-19 revision 47630) [x86_64-linux-gnu], how to update it
[12:27:01] fabrice31_: has joined #ruby
[12:28:06] [k-: self-modifying is bad!, but then again ruby gc isnt designed for immutability exploits
[12:28:21] [k-: designed to exploit immutability*
[12:28:29] Darkwater: I'm not going to overengineer this though
[12:30:05] joonty: has joined #ruby
[12:31:41] CustosLimen: has joined #ruby
[12:35:04] felixr: has joined #ruby
[12:35:06] tmtwd: has joined #ruby
[12:35:52] felixrsmith: has joined #ruby
[12:36:01] x12: has joined #ruby
[12:36:42] timonv: has joined #ruby
[12:36:43] Kyuujitsu: has joined #ruby
[12:36:55] ValicekB: has joined #ruby
[12:37:34] Pumukel: has joined #ruby
[12:37:51] anaeem1_: has joined #ruby
[12:38:06] Kully3xf: has joined #ruby
[12:38:12] [k-_: has joined #ruby
[12:38:35] fabrice31: has joined #ruby
[12:39:55] darix: sometimes people are way too impatient
[12:40:40] jottr: has joined #ruby
[12:41:06] curses: has joined #ruby
[12:41:24] [k-_: referring to?
[12:41:59] gregf_: Darkwater: class Foo; attr_accessor :id,:name; def initialize id,name; @id = id;@name = name; end end; arr = []; (1..10).each { |val| arr<<Foo.new(val, [*?a..?z].sample(8).join ) };r = Regexp.new(/^a/); p arr.partition{ |bar| bar.name.match(/^(a|h|z)/) }[0]
[12:42:06] Kully3xf_: has joined #ruby
[12:42:38] Zai00: has joined #ruby
[12:42:46] ruboto: https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
[12:43:07] [k-_: one line only for ruboto pls
[12:43:16] Yiota: has joined #ruby
[12:43:18] hashrocket: has joined #ruby
[12:43:39] dmolina: has joined #ruby
[12:45:13] AlexAltea: has joined #ruby
[12:45:50] ndrei: has joined #ruby
[12:46:06] schaerli: has joined #ruby
[12:47:02] [k-_: gregf_: that code is to get random numbers?
[12:47:23] sgambino: has joined #ruby
[12:47:38] apeiros: [k-_: what do you mean, "one line only for ruboto pls"?
[12:48:13] [k-_: the use of semicolons should only be allowed when using ruboto to evaluate something!
[12:48:21] DLSteve: has joined #ruby
[12:49:13] gregf_: [k-_: nono :/. its to filter Foo's based on foo.name starting with a, h or z. well not really needed. but just to explain how Darkwater can do the filtering since he/she was talking about objects
[12:49:41] [k-_: totally why you shouldnt write in a line!
[12:50:06] gregf_: too lazy to gist it :/
[12:50:06] apeiros: meh. ; to give code in a single message is common
[12:50:16] Darkwater: gregf_: I understand how to use partition
[12:50:17] apeiros: IMO not too much expected from the recipient to unfold themselves
[12:50:23] Darkwater: but it's just not what I want in this case
[12:50:31] sankaber: has joined #ruby
[12:51:54] [k-_: time for daily obfuscation then, apeiros!
[12:51:55] xfbs: has joined #ruby
[12:51:57] [k-_: what do you say?
[12:52:28] apeiros: folding newlines ain't obfuscation
[12:52:39] [k-_: i always have libobf.min.rb in my repository1
[12:53:23] [k-_: $??= {};-> { _m = %i[call length ord chr reduce]; $??[?.] = ->_,*__,&___{____=__.shift;___=__.pop if (!block_given? and __.last.to_proc rescue false);_.public_send ____, *__, &___}; $??[?.<<?!] = ->_,*__,&___{____=__.shift;___=__.pop if (!block_given? and __.last.to_proc rescue false);_.send ____, *__, &___}; $??[?.<<?.] = ->_,*__,&___{$??[?.][_,_m[0],*__,&___]}; $??[?+] =
[12:53:24] [k-_: ->_,*__{$??[?.].(__,_m[4],_){|_,__|__.is_a?(Array) ? ($??[?.][_,__.shift,*__]):$??[?.][_,__]}}; $??[?$] = ->_,__=''{_*__}; $??[?s<<??] = ->_{_=~/$/}; $??[??] = ->_{$??[?.][_,_m[1]]}; $??[?_] = ($$-$$).freeze; $??[?-] = ($$/$$).freeze; $??[?2] = ->_{_**(($??[?-]+$??[?-])**(-$??[?-]))}; $??[?3] = ->_{_**(($??[?-]+$??[?-]+$??[?-])**(-$??[?-]))}; $??[?_<<?f] =
[12:53:24] [k-_: $??[?3][$??[?-]+$??[?-]]-$??[?3][$??[?-]+$??[?-]];
[12:53:32] [k-_: and i truncated that!
[12:53:39] [k-_: apparently still too long :/
[12:53:42] manveru: >> Foo = Struct.new(:id, :name); (1..10).map{|i| Foo.new(i, [*?a..?z].sample(8)*'') }.partition{|f| f.name =~ /^[ahz]/ }.map{|x| x.map(&:id) }
[12:53:43] ruboto: manveru # => [[5], [1, 2, 3, 4, 6, 7, 8, 9, 10]] (https://eval.in/408176)
[12:53:46] [k-_: was only supposed to fit in a message
[12:54:00] chouhoulis: has joined #ruby
[12:54:33] [k-_: look, manveru improved the code!
[12:54:39] [k-_: excellent work manveru
[12:54:49] manveru: still has a semicolon, sorry
[12:54:56] [k-_: i like how you used a struct, people hardly use that anymore
[12:55:05] manveru: i'm old-school
[12:55:05] [k-_: and the character class in the regexp!
[12:55:12] christiandsg: has joined #ruby
[12:55:35] manveru: just ask chris to make it even smaller :P
[12:55:58] [k-_: oh, golfing?
[12:56:48] _blizzy_: has joined #ruby
[12:56:58] manveru: god... people port the darnest things :(
[12:57:01] manveru: https://github.com/mykewould/crutches
[12:57:06] cornerma1: has joined #ruby
[12:57:21] moredhel: has joined #ruby
[12:58:29] bmurt: has joined #ruby
[12:58:54] victortyau: has joined #ruby
[12:59:17] Guest53749: has joined #ruby
[13:00:07] startupality: has joined #ruby
[13:00:28] drewo: has joined #ruby
[13:00:37] startupality: is there anything better than axlsx gem for creating excels? anything that can use html template?
[13:00:38] ljarvis: that readme has contribut in it 10 times
[13:01:17] eGGsha: has joined #ruby
[13:01:52] bronson: startupality: not that I've found. and I sure have looked.
[13:01:56] fabrice31: has joined #ruby
[13:02:06] Rhainur: has joined #ruby
[13:02:38] jottr: has joined #ruby
[13:02:45] [k-_: >> (1..10).map{|i| [i,[*?a..?z].sample(8)*''] }.partition{|f| f[1] =~ /^[ahz]/ }.map{|x|x.map &:first}
[13:02:46] bronson: axlsx can get rough pretty quick but, by aggressive refactoring and writing a ton of helpers, it can go ok.
[13:02:46] ruboto: [k-_ # => [[1, 3, 5, 6, 8], [2, 4, 7, 9, 10]] (https://eval.in/408208)
[13:02:54] Rollabunna: has joined #ruby
[13:02:59] decoponyo: has joined #ruby
[13:03:34] Rhainur: got a coding style question. I've generally heard that keeping lines to 80 chars or below is good for readability and I totally agree with it, and even if it needs to be stretched I avoid going beyond 100 chars
[13:03:41] Rhainur: but this line: https://gist.github.com/Rhainur/9ac7e024bfc59e0ad21f has me stumped
[13:03:56] ljarvis: Rhainur: lol... drop the ternary :|
[13:03:58] Rhainur: it's quite long, at 114 chars, but I don't know how to shorten it in a sensible/clean way
[13:04:20] Rhainur: ljarvis: how should I write it?
[13:04:24] Rhainur: multiline if/else?
[13:04:26] ljarvis: Rhainur: using an if statement
[13:04:28] ljarvis: yes of course
[13:04:34] bronson: turn it into an if statement with a duplicate `@date_gt =`
[13:04:44] bronson: also not great but better
[13:05:22] ljarvis: I wouldn't use an else myself, but that's personal preference
[13:05:46] bronson: I know Ruby supports if assignments @date_gt = if ... else ... but I've never seen an example that looks good
[13:06:44] [k-_: you can end the line with ?
[13:06:47] elaptics: has joined #ruby
[13:06:53] ljarvis: ^ dont do that
[13:07:12] decoponio: has joined #ruby
[13:07:24] prefixed: has joined #ruby
[13:07:49] Rhainur: okay so is there a "great" option?
[13:07:54] Rhainur: rather than just a better one :P
[13:07:59] schaerli: has joined #ruby
[13:08:07] [k-_: your code is already good
[13:08:07] ljarvis: great in this scenario is subjective
[13:08:15] ljarvis: its not good
[13:08:21] [k-_: jhass recommends a hard limit of 120 characters
[13:08:28] ljarvis: it's a 114 line pointless ternary
[13:08:39] ndrei: has joined #ruby
[13:09:15] ljarvis: Rhainur: is this in a rails action or something?
[13:09:23] Rhainur: yep rails controller
[13:09:47] [k-_: this maybe: https://gist.github.com/SkyBirdSoar/10b6421386fe99513869
[13:09:48] ljarvis: then I would have a private method which does the condition, and use something like @date_gt = get_gt_date
[13:10:06] [k-_: method calls are expensive!
[13:10:08] startupality: has joined #ruby
[13:10:27] Rhainur: ljarvis: wouldn't really work since there are several places in the application where a default date range is needed
[13:10:32] Rhainur: and they're not always the same
[13:10:38] Rhainur: I mean in this case it defaults to 6 months ago
[13:10:38] bluOxigen: has joined #ruby
[13:10:43] Rhainur: but there are other cases where it defaults to a week
[13:10:46] werelivinginthef: has joined #ruby
[13:10:46] ljarvis: Rhainur: I dont see how that's relevant
[13:11:05] [k-_: get_gt_date(default: 6.months.ago)?
[13:11:06] ljarvis: but I'd use one of these depending on the exact situation https://gist.github.com/leejarvis/88f9c43d6ea9c1fda4e3
[13:11:22] benlovell: has joined #ruby
[13:12:00] mxrguspxrt: has joined #ruby
[13:12:02] Rhainur: I mean I considered doing something like parse_date_with_default(date_string, default)
[13:12:17] ljarvis: why didn't you go with that?
[13:12:33] nsuke: has joined #ruby
[13:12:39] Rhainur: this is used across multiple controllers so I'd have to put it into it's own class or monkey patch DateTime or something
[13:12:41] ljarvis: parse_date(params[:date_gt], default: ...) you could also implement a default format:
[13:12:45] riscky: has joined #ruby
[13:12:54] ljarvis: no.. you put it into your controller superclass
[13:13:10] ljarvis: or a mixin
[13:13:13] Rhainur: yeah but it feels weird to have date parsing as a controller method :/
[13:13:27] [k-_: have a module?
[13:13:32] platzhirsch: has joined #ruby
[13:13:42] [k-_: this seems like it doesnt require state, which is great!
[13:13:53] ljarvis: why? you're parsing stuff from user input, your controller is the exact place this should go
[13:14:28] yorickpeterse: clearly you need a UserInputParserFactory and a UserInputParser class
[13:14:32] ljarvis: but i don't know your exact setup so who knows
[13:15:15] leat2: has joined #ruby
[13:15:46] bruno-: has joined #ruby
[13:15:54] ljarvis: you could use a concern :o
[13:16:25] Rhainur: I'm warming towards the idea of putting it in ActionController
[13:16:41] Rhainur: I mean ApplicationController
[13:17:39] skade: has joined #ruby
[13:17:48] freerobby: has joined #ruby
[13:17:52] decoponio: has joined #ruby
[13:17:54] ljarvis: https://gist.github.com/leejarvis/506d3bba0de9ad1b860e
[13:18:24] quimrstorres: has joined #ruby
[13:18:28] freerobby1: has joined #ruby
[13:19:03] [k-_: look at the master ljarvis at work!
[13:19:04] niemcu: has joined #ruby
[13:19:38] [k-_: easily edit the format here and viola!
[13:19:41] WajidKagzi: has joined #ruby
[13:20:13] [k-_: i would prefer return DateTime.st.... if str.present? though
[13:20:18] [k-_: and default behind
[13:20:25] [k-_: save lines and indentation!
[13:20:43] ljarvis: saving lines is the least important thing to me on my list of things to consider when writing code
[13:20:44] senayar: has joined #ruby
[13:20:46] ljarvis: by a huge margin
[13:21:09] ljarvis: this code is obvious and incredibly easy to change or maintain, no point in getting fancy with it
[13:21:18] [k-_: if-else-with-one-line-bodies look like noise though
[13:21:29] riscky: has joined #ruby
[13:22:06] ljarvis: everything looks like noise if you care about saving lines
[13:22:29] umgrosscol: has joined #ruby
[13:22:30] [k-_: that's a great argument but i have "sensible defaults"
[13:22:52] quimrsto_: has joined #ruby
[13:22:53] yorickpeterse: ljarvis: I'm concerned about that suggestion
[13:23:48] ljarvis: heuheuheuheu
[13:24:20] bodgix: has joined #ruby
[13:26:10] startupality: has joined #ruby
[13:28:16] havenwood: has joined #ruby
[13:29:50] devdazed: has joined #ruby
[13:32:28] rodferso1: has joined #ruby
[13:32:31] startupality: has joined #ruby
[13:32:58] malconis: has joined #ruby
[13:34:37] prefixed: has joined #ruby
[13:35:03] anaeem1_: has joined #ruby
[13:37:17] rodfersou: has joined #ruby
[13:37:23] wnd: I have had the questionable pleasure to work with code that essentially does "@date_gt = DateTime.parse(params[:date_gt]) rescue 6.months.ago.to_date" which (obviously) happily sweeps trouble under the carpet
[13:37:26] bumbar_: has joined #ruby
[13:37:26] bumbar_: has joined #ruby
[13:38:11] max_v: has joined #ruby
[13:38:46] banister: has joined #ruby
[13:39:32] sarkyniin: has joined #ruby
[13:39:41] zeeraw: has joined #ruby
[13:39:50] [k-_: amazing!
[13:40:36] gamename: has joined #ruby
[13:40:51] Kully3xf: has joined #ruby
[13:40:55] BeatzKilla: has joined #ruby
[13:41:13] ljarvis: please tell me "amazing!" and "+1" was a troll
[13:41:26] schaerli: has joined #ruby
[13:41:48] [k-_: apparently not: https://github.com/SkyBirdSoar/libobf/blob/master/lib/libobf.rb#L21-22
[13:41:54] radgeRayden: has joined #ruby
[13:42:01] sevenseacat: has joined #ruby
[13:42:49] ljarvis: right but we're talking about proper clean code, not the mess of shit that is that library
[13:43:18] juanpablo_____: has joined #ruby
[13:44:07] [k-_: ruby -e "eval('__END__'); p \"test\""
[13:44:19] [k-_: that amazingly works!
[13:44:21] The_Phoenix: has joined #ruby
[13:45:07] [k-_: shouldn't use rescue for control flow though. also it is more expensive
[13:45:41] leat2: has joined #ruby
[13:46:54] Igorshp: has joined #ruby
[13:47:00] ljarvis: [k-_: do you write code for a job?
[13:47:25] Tiriricakkk: has joined #ruby
[13:48:04] solars: workmad3, one more tz thing :) the tzdata list is quite comprehensive, rails seems to use only a subset (http://api.rubyonrails.org/classes/ActiveSupport/TimeZone.html) is this a custom list or is this also a tzdata suggestion or subset commonly used?
[13:48:33] felixr: has joined #ruby
[13:48:40] dblessing: has joined #ruby
[13:49:04] axl__: has joined #ruby
[13:49:15] rodfersou: has joined #ruby
[13:49:29] schaerli: has joined #ruby
[13:49:47] bronson: [k-_: is your username obfuscated?
[13:49:47] rikkipitt: has joined #ruby
[13:50:03] ttilley: has joined #ruby
[13:50:05] [k-_: no, it doesn't mean anything in ruby
[13:50:22] [k-_: or any other languages (that i know of)
[13:50:24] ttilley: has joined #ruby
[13:50:47] paulcsmith: has joined #ruby
[13:52:26] JoshL: has joined #ruby
[13:53:38] wasamasa: "If you do not pass a block to the mail method, it will find all templates in the view paths using by default the mailer name and the method name that it is being called from, it will then create parts for each of these templates intelligently, making educated guesses on correct content type and sequence, and return a fully prepared Mail::Message ready to call :deliver on to send."
[13:54:01] wasamasa: screw these educated guesses
[13:54:30] danman: has joined #ruby
[13:54:37] drewo: has joined #ruby
[13:55:17] dorei: has joined #ruby
[13:55:21] shevy: I like the part where they state that these templates are created intelligently
[13:55:29] Kully3xf_: has joined #ruby
[13:55:35] leat2: has joined #ruby
[13:55:35] shevy: rails is no longer a framework - it's an intelligent AI now
[13:55:42] vt102: has joined #ruby
[13:55:57] christiandsg: has joined #ruby
[13:55:58] shevy: although in fairness, a rails skynet would be too slow to be dangerous
[13:56:05] gregf: has joined #ruby
[13:56:35] rikkipitt: has joined #ruby
[13:57:10] Rollabunna: has joined #ruby
[13:58:29] vifino: has joined #ruby
[13:59:43] wasamasa: zombie skynet?
[14:00:02] jrochkind: has left #ruby: ()
[14:00:09] whippythellama: has joined #ruby
[14:00:29] juanpablo_____: has joined #ruby
[14:04:04] failshell: has joined #ruby
[14:05:19] rickmasta: has joined #ruby
[14:05:35] deavid: has joined #ruby
[14:06:00] diegok: has joined #ruby
[14:06:07] beef-wellington: has joined #ruby
[14:06:29] loop3r: has joined #ruby
[14:06:31] swistak35: has joined #ruby
[14:06:33] oz: has joined #ruby
[14:07:00] bier: has joined #ruby
[14:07:15] gattuso: has joined #ruby
[14:07:20] shpoont: has joined #ruby
[14:07:31] tommylommykins: has joined #ruby
[14:08:30] Igorshp: has joined #ruby
[14:08:38] christiandsg: has joined #ruby
[14:08:41] aryaching: has joined #ruby
[14:09:03] fabrice31_: has joined #ruby
[14:09:09] benlovell: has joined #ruby
[14:09:53] MarsUltor: has joined #ruby
[14:09:58] BiHi: has joined #ruby
[14:10:37] droidburgundy: has joined #ruby
[14:10:59] tjohnson: has joined #ruby
[14:11:05] yqt: has joined #ruby
[14:11:10] eregon: has joined #ruby
[14:11:14] thejoecarroll: has joined #ruby
[14:11:15] tabakhase: has joined #ruby
[14:11:17] Zackio: has joined #ruby
[14:11:18] droidburgundy: has joined #ruby
[14:12:08] Scriptonaut: has joined #ruby
[14:12:26] patteh: has joined #ruby
[14:12:44] droidburgundy: has joined #ruby
[14:12:55] lkba: has joined #ruby
[14:13:25] ght: has joined #ruby
[14:13:26] dbussink: has joined #ruby
[14:14:12] pengin_: has joined #ruby
[14:14:26] eam: has joined #ruby
[14:14:54] BiHi: has joined #ruby
[14:15:00] torpig: has joined #ruby
[14:15:32] Mia: has joined #ruby
[14:15:32] Mia: has joined #ruby
[14:15:52] mtakkman: has joined #ruby
[14:15:58] alex88: has joined #ruby
[14:16:16] hinbody: has joined #ruby
[14:16:25] bruno-: has joined #ruby
[14:16:56] AckZ: any ruby-pg experts here? I have a question about how PG::Result#stream_each works
[14:17:30] werelivinginthef: has joined #ruby
[14:17:34] anaeem1_: has joined #ruby
[14:18:16] chouhoulis: has joined #ruby
[14:18:27] tmtwd: has joined #ruby
[14:18:36] Scripore: has joined #ruby
[14:18:57] atomical: has joined #ruby
[14:19:07] ruboto: Don't ask to ask. Just ask your question, and if anybody can help, they will likely try to do so.
[14:20:47] fractalis: has joined #ruby
[14:21:45] Hobbyboy: has joined #ruby
[14:21:57] soloone: has joined #ruby
[14:22:08] teotwaki: has joined #ruby
[14:22:19] CustosLimen: has joined #ruby
[14:22:22] erichf: has joined #ruby
[14:22:25] Fluent: has joined #ruby
[14:22:39] centrx: has joined #ruby
[14:24:09] jhass: abdulrehman: hi
[14:24:40] zack6849: has joined #ruby
[14:24:41] zack6849: has joined #ruby
[14:24:44] Kully3xf: has joined #ruby
[14:24:51] [k-_: jhass: hi
[14:25:08] apeiros: abdulrehman: "I have a question about how PG::Result#stream_each works" - just ask the question.
[14:25:18] apeiros: you reduce the likeliness of somebody answering by this indirection.
[14:25:32] jhass: apeiros: check nicks :P
[14:25:53] centrx: abdulrehman, I have a question about your question?
[14:26:37] apeiros: AckZ: "I have a question about how PG::Result#stream_each works" - just ask the question.
[14:26:42] apeiros: you reduce the likeliness of somebody answering by this indirection.
[14:26:45] apeiros: sorry @ abdulrehman :D
[14:27:04] shevy: poor abdulrehman ... he did not even have a question!
[14:27:18] jhass: but a questionmark!
[14:28:04] shevy: perhaps he wanted to test the bot
[14:28:17] kies^: has joined #ruby
[14:28:18] ruboto: I don't know anything about syntax
[14:28:36] centrx: ?I have a question
[14:28:36] ruboto: have, I don't know anything about I
[14:28:41] ruboto: I don't know anything about life
[14:29:00] shevy: lol... the bot speaks Yoda
[14:29:27] shevy: What editor would Yoda use if he were to program in ruby?
[14:31:23] adaedra: what would he program?
[14:31:25] dopie: has joined #ruby
[14:31:26] adaedra: a websith?
[14:31:32] shevy: a padawan trainer
[14:31:34] abdulrehman: centrx: question away my friend
[14:31:43] shevy: because he got tired of having to answer silly questions
[14:31:58] abdulrehman: jhass: hi sorry for late reply, at work can't always look at the screen
[14:32:05] Scriptonaut: Hey guys, I have a class, with a collection of private methods. I would like to be able to do: MyClass::list_of_these_methods. I don't want all private methods, just these methods. Is there an easy way I can namespace them or something, so that I can return a list of these methods?
[14:32:16] [k-_: lol you dont look at the screen while you work?
[14:32:21] adaedra: abdulrehman: like a lot of people here, long replies are normal phenomenon
[14:32:35] shevy: [k-_ could be in another tab or so
[14:32:36] abdulrehman: adaedra: good to know,
[14:32:36] ljarvis: Scriptonaut: add them to a module
[14:32:42] bl4ckdu5t: has joined #ruby
[14:32:46] [k-_: >> Array.methods(false)
[14:32:47] ruboto: [k-_ # => [:[], :try_convert] (https://eval.in/408314)
[14:32:54] ljarvis: that's not what they asked for
[14:33:01] Scriptonaut: ljarvis: if I do that, won't the modules methods include all the default ones inherited as well?
[14:33:05] Scriptonaut: and how would I get the methods
[14:33:13] Scriptonaut: MyClass::MyModule.methods?
[14:33:17] adaedra: include/extend
[14:33:21] [k-_: oh he wants certain methods?
[14:33:22] ljarvis: Scriptonaut: that's where you want the methods(false) stuff
[14:33:29] ljarvis: you need a combination of both
[14:34:16] anaeem1__: has joined #ruby
[14:34:21] deepu: has joined #ruby
[14:35:25] droidburgundy: has joined #ruby
[14:35:41] Scriptonaut: oh that's cool
[14:35:50] Scriptonaut: methods(false) that is
[14:36:00] AustinMatherne: has joined #ruby
[14:36:31] TMM: has joined #ruby
[14:36:32] mleung: has joined #ruby
[14:37:35] Scriptonaut: can I nest a module inside another inside the parent module's private block, making all those modules private?
[14:37:38] ljarvis: Scriptonaut: https://eval.in/408330
[14:37:47] TMM: hello! I'm not sure if this is the right place to ask but I'm trying to use active_record without rails and I want to use rspec fixtures with it. I've been struggling to find some documentation on this. could anyone point me in the right direction please? I've tried googling the obvious but I can't find anything that's at my knowledge level it seems
[14:37:53] Scriptonaut: ljarvis: thanks
[14:38:16] xfbs_: has joined #ruby
[14:38:21] adaedra: ACTION would point at Sequel
[14:38:32] Scriptonaut: how does one get private class methods?
[14:38:34] ljarvis: TMM: have you tried #rspec?
[14:38:43] TMM: ljarvis, I haven't thank you
[14:38:44] Scriptonaut: adaedra: lots of people have recommended that to me so far
[14:38:48] [k-_: Scriptonaut: extend
[14:39:03] adaedra: Scriptonaut: Sequel? It's amazing.
[14:39:22] Gadgetoid: has joined #ruby
[14:39:30] ljarvis: >> Class.private_methods # Scriptonaut
[14:39:31] ruboto: ljarvis # => [:inherited, :initialize, :included, :extended, :prepended, :method_added, :method_removed, :method_ ...check link for more (https://eval.in/408343)
[14:40:04] schaerli: has joined #ruby
[14:40:12] Scriptonaut: hrm, private_methods doesn't take false
[14:40:21] ips|malc: has joined #ruby
[14:40:58] ljarvis: Scriptonaut: yes it does
[14:41:05] ljarvis: >> Class.private_methods(false)
[14:41:06] ruboto: ljarvis # => [:inherited, :initialize] (https://eval.in/408344)
[14:41:09] Scriptonaut: when I pass it false it gives me a bunch
[14:41:23] Scriptonaut: I just want the ones I defined
[14:41:24] ljarvis: Scriptonaut: then those are methods defined on the receiver
[14:41:31] ljarvis: Scriptonaut: example?
[14:41:42] Scriptonaut: MyModule.private_methods(false)
[14:41:47] Scriptonaut: let me fetch the list, it's huge
[14:42:04] Scriptonaut: https://gist.github.com/robins35/547e80e0fa521f21a5c5
[14:42:06] Scriptonaut: that's the beginningo f it
[14:42:38] Scriptonaut: however when I do MyModule.methods(false), I get this
[14:42:39] ljarvis: >> module M; end; M.private_methods(false)
[14:42:40] ruboto: ljarvis # => [:included, :extended, :prepended, :method_added, :method_removed, :method_undefined, :initialize_co ...check link for more (https://eval.in/408345)
[14:42:41] Scriptonaut: https://gist.github.com/robins35/9e559c42129b87b68018
[14:43:07] Scriptonaut: I'm extending ActionView::Helpers::DateHelper
[14:43:11] Scriptonaut: so I get a lot of extra stuff
[14:43:40] AustinMatherne: has joined #ruby
[14:43:45] ljarvis: Scriptonaut: so does methods(false) give you what you want?
[14:43:52] mary5030: has joined #ruby
[14:43:59] RegulationD: has joined #ruby
[14:44:07] Scriptonaut: not quite, as it includes public methods as well
[14:44:11] Scriptonaut: I'll tinker with it a bit
[14:44:21] chills42: has joined #ruby
[14:44:59] anaeem1_: has joined #ruby
[14:45:29] senayar: has joined #ruby
[14:45:39] msnyon: has joined #ruby
[14:46:18] khebbie: has joined #ruby
[14:46:20] Scriptonaut: ok, I got what I needed
[14:46:23] khebbie_: has joined #ruby
[14:48:42] drewo: has joined #ruby
[14:48:43] dymk: has left #ruby: ()
[14:48:51] dymk: has joined #ruby
[14:48:53] luckyme: has joined #ruby
[14:50:29] theery: has joined #ruby
[14:50:38] abdulrehman: has joined #ruby
[14:50:42] baweaver: has joined #ruby
[14:50:45] tuelz: has joined #ruby
[14:50:58] Scriptonaut: has left #ruby: ()
[14:51:28] Rollabunna: has joined #ruby
[14:52:37] startupality: has joined #ruby
[14:53:12] j4cknewt: has joined #ruby
[14:54:09] Scripore: has joined #ruby
[14:55:01] BeatzKilla_: has joined #ruby
[14:55:19] sepp2k: has joined #ruby
[14:56:40] _kfpratt: has joined #ruby
[14:58:24] christiandsg: has joined #ruby
[14:58:43] startupality: how can i have a new line char in excel cell (using axlsx to produce excel file)?
[14:59:57] [k-_: you might get better responses in #axlsx
[15:00:35] fabrice31: has joined #ruby
[15:00:58] [k-_: to my knowledge, though, newlines arent allowed to be in cells
[15:00:59] j4cknewt: has joined #ruby
[15:01:23] rikkipitt: has joined #ruby
[15:01:31] apeiros: but (in excel, no idea about axlsx) you have to set the cell to accept them
[15:01:58] quimrsto_: has joined #ruby
[15:02:01] apeiros: and (because excel) once you do that, excel can no longer automatically align all columns to their optimal width
[15:02:02] [k-_: you used them before? :O
[15:03:52] startupality: has joined #ruby
[15:04:30] tkuchiki: has joined #ruby
[15:06:16] pyrotecnix: has joined #ruby
[15:07:14] icebourg: has joined #ruby
[15:07:34] avocadorivalry: has joined #ruby
[15:08:01] ballingt: has joined #ruby
[15:11:06] Igorshp: has joined #ruby
[15:11:08] dgutierrez1287: has joined #ruby
[15:11:52] howdoi: has joined #ruby
[15:11:53] nobitanobi: has joined #ruby
[15:12:47] ruby-lang852: has joined #ruby
[15:12:48] ramfjord: has joined #ruby
[15:12:49] shevy: he is an avid excel god!
[15:12:53] DaniG2k: has joined #ruby
[15:13:18] atomical: has joined #ruby
[15:13:33] ndrei: has joined #ruby
[15:14:51] Guest85414______: has joined #ruby
[15:14:51] anaeem1_: has joined #ruby
[15:14:53] startupality: has joined #ruby
[15:15:05] amargherio: has joined #ruby
[15:15:20] kapowaz: has joined #ruby
[15:15:34] GriffinHeart: has joined #ruby
[15:16:21] niiamon: has joined #ruby
[15:17:12] abdulrehman: where I work, they prefer csv files, and to be honest, they are so easy to work with, and can also be opened with excel
[15:18:00] benlovell: has joined #ruby
[15:18:17] quimrstorres: has joined #ruby
[15:18:52] RobertBirnie: has joined #ruby
[15:19:40] shevy: csv is nice because it is quite simple
[15:21:21] ta: has joined #ruby
[15:21:46] anaeem1_: has joined #ruby
[15:22:32] elliottcable: has joined #ruby
[15:23:18] nzst: has joined #ruby
[15:24:23] anaeem1__: has joined #ruby
[15:25:05] segfalt: has joined #ruby
[15:25:22] [k-_: you definitely cant have newlines there!
[15:26:15] Igorshp: has joined #ruby
[15:27:19] niiamon_: has joined #ruby
[15:28:06] safeforge: has joined #ruby
[15:29:21] apfeluser: has joined #ruby
[15:29:31] NeverDie: has joined #ruby
[15:30:14] firoxer: Hey everyone, got a question... I'm working on a Sinatra application and I'm wondering whether it would be better to require gems in the files that actually need them (e.g. mysql2 in models, sinatra/cookies in controllers) or have all the requires in the "main" file, app.rb?
[15:30:49] psye: has joined #ruby
[15:30:52] ta: has joined #ruby
[15:31:11] jhass: I tend to require everything a file needs at the top of it. To me that makes it easier to manage and recognize whether a dependency is still needed/used
[15:31:47] Rollabunna: has joined #ruby
[15:31:59] chinmay_dd: has joined #ruby
[15:32:06] firoxer: Alright, thanks
[15:32:28] Rollabunna: has joined #ruby
[15:32:39] firoxer: It seems easier to have them in one place but more logical to do it your way
[15:32:49] pmarreck: has joined #ruby
[15:33:07] bazbing81: has joined #ruby
[15:34:02] adaedra: keep the dependencies close to the dependent code
[15:35:26] rcvalle: has joined #ruby
[15:35:38] ziyadb: has joined #ruby
[15:35:45] firoxer: Thanks for the advice
[15:36:04] yqt: has joined #ruby
[15:37:26] alex88: has joined #ruby
[15:37:26] alex88: has joined #ruby
[15:37:50] sinkensabe: has joined #ruby
[15:37:58] krainboltgreene: has joined #ruby
[15:38:13] rikkipitt: has joined #ruby
[15:38:17] christiandsg: has joined #ruby
[15:38:55] im0b: has joined #ruby
[15:39:16] shock_one: has joined #ruby
[15:40:11] soultadu: has joined #ruby
[15:41:15] snockerton: has joined #ruby
[15:41:37] dvb_ua: has joined #ruby
[15:42:02] neersighted: has joined #ruby
[15:42:24] niiamon__: has joined #ruby
[15:42:53] drewo: has joined #ruby
[15:43:32] Lamarus: has joined #ruby
[15:44:06] startupality: has joined #ruby
[15:45:12] Cache_Money: has joined #ruby
[15:45:30] sarkyniin: has joined #ruby
[15:45:37] rehat: has joined #ruby
[15:45:49] werelivi_: has joined #ruby
[15:46:49] niiamon: has joined #ruby
[15:47:28] ponga: has joined #ruby
[15:47:43] rsc___: has joined #ruby
[15:47:50] blue_deref: has joined #ruby
[15:49:19] casadei_: has joined #ruby
[15:49:40] drewo: has joined #ruby
[15:50:16] Rollabun_: has joined #ruby
[15:50:32] khebbie_: has joined #ruby
[15:50:32] khebbie: has joined #ruby
[15:52:33] rippa: has joined #ruby
[15:52:44] SHyx0rmZ: has joined #ruby
[15:53:33] treehug88: has joined #ruby
[15:54:12] treehug88: question: suppose I have a Module that's mixed in to a class, and that module has a method called. How can I figure out which class I'm 'mixed into' ?
[15:54:42] jhass: self.class
[15:54:56] jhass: though sounds like a fishy design
[15:55:08] treehug88: duh. Thanks jhass. Why do you say that
[15:55:25] shevy: class Fish # a fishy design
[15:55:48] jhass: well, you couple your module to the classes its included to, which harms its resusability tremendously
[15:56:02] treehug88: so you're against modules
[15:56:23] jhass: no, against modules who care about the class they're included to
[15:56:48] ivanskie: has joined #ruby
[15:57:32] treehug88: gotcha, I'm on board with that thinking. Thanks jhass
[15:58:37] gizmore: has joined #ruby
[15:58:45] startupality: how to merge rows with axslx?
[15:59:32] [k-_: is that not in the docs?
[16:00:15] Ilyas: has joined #ruby
[16:02:49] treehug88: I can't find this documented quickly - can someone tell me - if I have a class with a module mixed in, and both provilde the same method name, which is called first, and which is access via super (let me know if I have this logic wrong too please) Thanks in advance
[16:03:17] startupality: @[k-_: you can merge the cells, or you can merge the rows by explicitly saying which cell and which cell, but I want to be able to use something similar to sheet.rows.last.cells
[16:03:31] [k-_: treehug88: the class overrides the module's method
[16:03:39] [k-_: super calls the module's method
[16:03:45] poguez_: has joined #ruby
[16:04:02] doodleha_: has joined #ruby
[16:04:14] Scripore: has joined #ruby
[16:04:16] gambl0re: has joined #ruby
[16:04:22] zero7: has joined #ruby
[16:04:32] werelivinginthef: has joined #ruby
[16:04:49] rbowlby: has joined #ruby
[16:04:50] [k-_: startupality: merge(sheet.rows.last.cells.first, sheet.rows.last.cells.last)?
[16:04:52] towski_: has joined #ruby
[16:05:05] [k-_: (assuming that merge function is called merge)
[16:05:33] user1138: has joined #ruby
[16:05:50] startupality: that would merge the cells in the last rows and not the rows themselves
[16:06:15] michaeldeol: has joined #ruby
[16:06:31] baroquebobcat: has joined #ruby
[16:07:02] skade: has joined #ruby
[16:07:28] [k-_: you will need a reduce then
[16:07:41] shelling__: has joined #ruby
[16:07:54] [k-_: sheet.rows.last.cells.reduce { |acc, cell| merge(acc,cell) }
[16:08:02] [k-_: assuming merge returns the merged cell
[16:08:07] akitada: has joined #ruby
[16:08:37] eggoez: has joined #ruby
[16:09:05] ips|malc: has joined #ruby
[16:09:19] [Butch]: has joined #ruby
[16:09:27] lannonbr: has joined #ruby
[16:09:33] gambl0re: has joined #ruby
[16:09:34] pietr0: has joined #ruby
[16:09:53] [k-_: or even reduce(&:merge) if the cells have merge defined on them
[16:10:05] riotjones: has joined #ruby
[16:10:12] bricker: has joined #ruby
[16:10:31] jhass: don't need the & for reduce/inject
[16:11:52] AckZ: has joined #ruby
[16:12:13] machty: has joined #ruby
[16:12:14] mannyt: has joined #ruby
[16:12:27] RobertBirnie: has joined #ruby
[16:12:56] yo61: has joined #ruby
[16:13:14] dede: has joined #ruby
[16:13:27] bruno-: has joined #ruby
[16:15:18] lacrosse: has joined #ruby
[16:15:53] theery: has joined #ruby
[16:15:57] Muhannad: has joined #ruby
[16:16:00] wmoxam: looks like irccloud.com is down
[16:16:11] Rollabunna: has joined #ruby
[16:16:24] eggoez: has joined #ruby
[16:16:25] jhass: it's flaky today
[16:16:46] Igorshp: has joined #ruby
[16:16:53] pusewicz: has joined #ruby
[16:18:51] curses: has joined #ruby
[16:19:18] amclain: has joined #ruby
[16:19:40] startupality: managed to do it with sheet.merge_cells [sheet.rows[sheet.rows.last.index-1].cells.first, sheet.rows.last.cells.last]
[16:19:53] chills42: has joined #ruby
[16:20:02] harleypig: has joined #ruby
[16:20:35] SCHAAP137: has joined #ruby
[16:20:53] tenderlove: has joined #ruby
[16:21:09] vcoinminer: has joined #ruby
[16:21:43] CustosLimen: has joined #ruby
[16:22:03] avdi: has joined #ruby
[16:22:22] jeregrine: has joined #ruby
[16:23:34] bove: has joined #ruby
[16:24:02] bjeanes: has joined #ruby
[16:24:17] benlakey: has joined #ruby
[16:24:39] hashrocket: has joined #ruby
[16:24:51] alxndr: has joined #ruby
[16:25:11] lancetw: has joined #ruby
[16:26:03] hellschreiber: has joined #ruby
[16:26:25] adambeynon: has joined #ruby
[16:27:27] quimrsto_: has joined #ruby
[16:27:50] Hanmac: has joined #ruby
[16:29:19] prosodyContext: has joined #ruby
[16:29:20] EminenceHC: has joined #ruby
[16:29:31] _blizzy_: has joined #ruby
[16:29:51] chinmay_dd: has joined #ruby
[16:30:00] pizzaops: has joined #ruby
[16:30:00] renderful: has joined #ruby
[16:30:31] okj: has joined #ruby
[16:31:30] benlieb: has joined #ruby
[16:31:36] n1ftyn8_: has joined #ruby
[16:31:47] exadeci: has joined #ruby
[16:31:53] avocadorivalry: has joined #ruby
[16:32:11] rtt_: has joined #ruby
[16:32:14] fenjamin: has joined #ruby
[16:32:50] mdavid613: has joined #ruby
[16:32:55] Lamarus: has joined #ruby
[16:33:34] d10n-work: has joined #ruby
[16:34:02] bb010g: has joined #ruby
[16:34:56] pengin: has joined #ruby
[16:35:18] milesforrest: has joined #ruby
[16:35:19] Ilyas_: has joined #ruby
[16:35:26] dfockler: has joined #ruby
[16:36:03] rtt_: i want to contribute to open source community of ruby
[16:36:05] nini1294: has joined #ruby
[16:36:13] rtt_: m student
[16:36:14] diegoviola: has joined #ruby
[16:36:14] ELCALOR: has joined #ruby
[16:37:05] DoubleMalt: has joined #ruby
[16:37:07] shevy: lol strangest thing happened to me just now
[16:37:19] shevy: I have some code Display.display(array)
[16:37:29] shevy: and I was desperately trying to find a "class Display" ... and had no luck
[16:37:32] ponga: oh hi shevy
[16:37:37] bryancp: has joined #ruby
[16:37:41] shevy: it was a module!!!
[16:37:49] Juanchito: has joined #ruby
[16:37:50] ljarvis: that *is* strange!!
[16:38:04] jhass: rtt_: great, any specific question?
[16:38:15] deimos_: has joined #ruby
[16:38:30] havenwood: rtt_: welcome
[16:39:05] dented42: has joined #ruby
[16:39:11] mannyt: has joined #ruby
[16:39:41] JCOE: has joined #ruby
[16:39:56] mlue: has joined #ruby
[16:40:02] ascarter: has joined #ruby
[16:40:04] countryHick: has joined #ruby
[16:40:26] charles81: has joined #ruby
[16:40:35] halfdan: has joined #ruby
[16:40:39] manveru: has joined #ruby
[16:40:42] bcavileer: has joined #ruby
[16:40:51] aaeron: has joined #ruby
[16:41:31] rtt_: how to get start means i want to do from ground level work first
[16:41:34] rtt_: any guidence?
[16:42:02] curses: has joined #ruby
[16:42:15] ryanprior: has joined #ruby
[16:42:17] Lamarus: has joined #ruby
[16:42:37] jimbeaudoin: has joined #ruby
[16:42:53] djbender: has joined #ruby
[16:43:00] rfv: has joined #ruby
[16:43:12] Heero: has joined #ruby
[16:43:38] havenwood: rtt_: Do you know any Ruby yet or starting with that first?
[16:43:50] skmp: has joined #ruby
[16:44:17] blackmesa: has joined #ruby
[16:44:34] startupality: has joined #ruby
[16:45:13] Alayde: has joined #ruby
[16:45:41] cstrahan: has joined #ruby
[16:45:50] ryanprior: I want to take a path as provided by the user and interpret resolve it like Bash would, ie "~/foo"=>"/home/myuser/foo" -- should I just use an inferior bash process to do that, or is there a standard in-process way of doing path substitutions?
[16:46:29] MiracleBlue: has joined #ruby
[16:47:12] nateberkopec: has joined #ruby
[16:47:14] chrisseaton: has joined #ruby
[16:47:32] spider-mario: has joined #ruby
[16:49:21] skade: has joined #ruby
[16:49:23] casadei_: has joined #ruby
[16:49:38] tenderlove: has joined #ruby
[16:49:49] baweaver: has joined #ruby
[16:50:57] rtt_: havenwood i have litlle knowledge of ruby studied from code acedmy and ruby monk
[16:51:10] jhass: &ri File::expand_path
[16:51:10] `derpy: No results
[16:51:19] shock_one: has joined #ruby
[16:51:23] jhass: &ri File.expand_path
[16:51:24] `derpy: http://www.rubydoc.info/stdlib/core/File#expand_path-class_method
[16:51:31] jhass: ryanprior: ^ check that
[16:51:35] miah: ya was just going to link that
[16:51:54] Rollabun_: has joined #ruby
[16:52:20] jhass: rtt_: https://github.com/trending?l=ruby&since=monthly you can check if you find an interesting project and if there are any open issues you'd feel ready to tackle. Then just submit a PR
[16:52:23] quimrstorres: has joined #ruby
[16:53:16] nkts: has joined #ruby
[16:54:34] tonini: has joined #ruby
[16:54:37] grubernaut: has joined #ruby
[16:54:37] baweaver: has joined #ruby
[16:56:25] afrianska: has joined #ruby
[16:58:38] shadoi: has joined #ruby
[16:58:41] deol: has joined #ruby
[16:59:02] nini1294: Hey, I tried to find this just about everywhere but had not luck, whats the best way to set a title for the page?
[16:59:02] nini1294: Sorry if its a stupid question, im new to Rack applications
[16:59:06] arup_r: has joined #ruby
[16:59:26] jhass: nini1294: you set the <title> tag in the HTML you return
[16:59:43] niiamon: has joined #ruby
[16:59:51] mikecmpbll: has joined #ruby
[16:59:57] nzst: has joined #ruby
[17:00:00] jhass: nini1294: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/title
[17:00:14] cardoni: has joined #ruby
[17:00:40] nini1294: jhass, Ok, thanks a lot
[17:00:49] firevolt: has joined #ruby
[17:01:33] zzak: has joined #ruby
[17:01:40] ballingt: has left #ruby: ("Textual IRC Client: www.textualapp.com")
[17:02:00] nkts: has joined #ruby
[17:02:12] chinmay_dd: has joined #ruby
[17:03:20] iamdevnul: has joined #ruby
[17:03:52] tenderlove: has joined #ruby
[17:04:11] michaeldeol: has joined #ruby
[17:04:22] meph: has joined #ruby
[17:04:41] zeeraw: has joined #ruby
[17:05:33] leesharma: has joined #ruby
[17:05:48] woodruffw: has joined #ruby
[17:06:05] Lloyd: has joined #ruby
[17:06:18] hahuang65: has joined #ruby
[17:06:29] symbol: has joined #ruby
[17:06:34] rikkipitt: has joined #ruby
[17:07:07] dseitz: has joined #ruby
[17:08:26] girakrok: has joined #ruby
[17:08:42] razrunelord: has joined #ruby
[17:08:54] zeeraw: has joined #ruby
[17:09:30] codeitagile: has joined #ruby
[17:09:41] hoey_: has joined #ruby
[17:09:59] _djbkd: has joined #ruby
[17:10:15] _djbkd: has joined #ruby
[17:11:15] michaeldeol: has joined #ruby
[17:12:17] joaomdmoura: has joined #ruby
[17:13:16] Scripore: has joined #ruby
[17:13:25] ruurd: has joined #ruby
[17:14:13] saintcajetan: has joined #ruby
[17:14:44] kfpratt: has joined #ruby
[17:15:39] paulcsmith: has joined #ruby
[17:15:59] chills42: has joined #ruby
[17:16:45] watnall56: has joined #ruby
[17:17:35] godzillaenlacasa: has joined #ruby
[17:18:06] ArchRogem: has joined #ruby
[17:18:50] gambl0re: has joined #ruby
[17:19:26] DefV: has joined #ruby
[17:21:26] Jackneill: has joined #ruby
[17:21:58] yfeldblum: has joined #ruby
[17:22:59] nkts: has joined #ruby
[17:24:34] towski_: has joined #ruby
[17:25:58] kriskropd: has joined #ruby
[17:26:00] nkts: has joined #ruby
[17:27:30] dgutierrez1287: has joined #ruby
[17:29:10] segfalt: has joined #ruby
[17:29:12] blue_deref: has joined #ruby
[17:30:22] fantazo: has joined #ruby
[17:34:21] michaeldeol: has joined #ruby
[17:34:50] lampshades: has joined #ruby
[17:35:11] ReK2WiLdS: has joined #ruby
[17:35:16] baweaver: has joined #ruby
[17:35:28] lampshade: has joined #ruby
[17:35:37] ht__: has joined #ruby
[17:35:49] Musashi007: has joined #ruby
[17:37:33] jobewan: has joined #ruby
[17:38:27] Eiam: has joined #ruby
[17:38:30] prestorium: has joined #ruby
[17:38:32] ReK2WiLdS: has joined #ruby
[17:39:33] tenderlove: has joined #ruby
[17:39:41] eGGsha: has joined #ruby
[17:41:09] woodruffw: has joined #ruby
[17:41:17] fractalis: has joined #ruby
[17:43:17] tuelz: has joined #ruby
[17:43:44] n008f4g_: has joined #ruby
[17:43:59] B1n4r10: has joined #ruby
[17:44:46] danman: has joined #ruby
[17:45:22] michaeldeol: has joined #ruby
[17:45:22] Frem: has joined #ruby
[17:47:12] charliesome: has joined #ruby
[17:47:47] centrx: has joined #ruby
[17:48:39] jeshio: has joined #ruby
[17:49:36] aaeron: has joined #ruby
[17:50:06] centrx: has joined #ruby
[17:50:17] EminenceHC: has joined #ruby
[17:51:11] JimmyNeutron: has joined #ruby
[17:51:43] Synthead: can I use STDIN.gets in such a way where the user can use backspace? currently, it displays ^H characters
[17:52:07] pyon: has joined #ruby
[17:52:19] khebbie: has joined #ruby
[17:52:22] jhass: that seems to be an issue in your terminal. Or perhaps you set some weird terminal mode?
[17:52:52] khebbie_: has joined #ruby
[17:53:17] Synthead: jhass: ah, yeah. I had the terminal set to send ^H for a backspace :) good call!
[17:53:27] dented42: has joined #ruby
[17:54:03] piotrj: has joined #ruby
[17:54:50] makerops_: has joined #ruby
[17:55:59] makerops_: hi, im trying to require a gem in a spec file
[17:56:09] tenderlove: has joined #ruby
[17:56:15] makerops_: when I use irb, I am able to require the gem just fine
[17:56:39] Scripore: has joined #ruby
[17:57:10] makerops_: nm it seems to be a rpsec error
[17:57:30] bruno-: has joined #ruby
[17:58:28] nofxx: has joined #ruby
[17:58:29] Vile`: has joined #ruby
[18:00:00] chills42: has joined #ruby
[18:00:42] aryaching: has joined #ruby
[18:00:46] woodruffw: has joined #ruby
[18:00:50] paulcsmith: has joined #ruby
[18:00:57] aaeron: has joined #ruby
[18:01:15] leesharma: has joined #ruby
[18:02:02] niiamon: has joined #ruby
[18:03:30] nkts: has joined #ruby
[18:03:45] nkts: has joined #ruby
[18:05:54] rbowlby: has joined #ruby
[18:06:44] woodruffw: has joined #ruby
[18:07:30] ElSif: has joined #ruby
[18:07:56] Jello_Raptor: has joined #ruby
[18:09:31] tenderlove: has joined #ruby
[18:09:39] Rinzlit: Well I feel like stupid for procrastinating to start learning ruby for so long
[18:09:45] Rinzlit: Its like easy .-.
[18:09:47] Rinzlit: Really easy
[18:09:59] centrx: Like a boss
[18:10:28] Rinzlit: Yeah, although I'm sure when I get to the spot where I want to use it
[18:10:32] rbowlby: has joined #ruby
[18:10:32] nomadic: has joined #ruby
[18:10:32] wlanboy: has joined #ruby
[18:10:33] Rinzlit: it will be impossibly hard
[18:10:38] ramfjord: has joined #ruby
[18:11:56] asdfawdfawef6: has joined #ruby
[18:12:26] nilcolor: has joined #ruby
[18:12:43] asdfawdfawef6: has left #ruby: ()
[18:12:50] Iskarlar: has joined #ruby
[18:12:59] kidoz: has joined #ruby
[18:13:04] postmodern: has joined #ruby
[18:13:42] felltir: has joined #ruby
[18:14:10] nilcolor: Hello. Can anybody give me a clue what does `class Foo < self` means? Is it same: `class Foo; class << self; ...; end; end;`?
[18:14:37] ged: has joined #ruby
[18:14:42] shevy: nilcolor are you sure of "class Foo < self" ?
[18:15:07] Jello_Raptor: has joined #ruby
[18:15:14] nilcolor: class Store < self (https://github.com/redis-store/redis-store/blob/master/lib/redis/store/ttl.rb) for example...
[18:15:44] jhass: how awful
[18:15:56] shevy: first time I see this :)
[18:15:59] jhass: nilcolor: self is Redis in that context, so class Store < Redis
[18:16:13] nilcolor: me too )) google it with no luck
[18:16:34] jhass: idk why they did that
[18:17:09] JoshL: has joined #ruby
[18:17:23] nilcolor: jhass: yeah? inherited from outer class? that is... strange
[18:17:34] centrx: This solves all my problems!
[18:17:38] prestorium: has joined #ruby
[18:18:08] shevy: nilcolor yeah... they could have done class Store < Redis just fine, I think it would be more in line with 99,9% of the rest of the ruby code out there
[18:20:27] nilcolor: shevy: hmm.. just checked. and yes - that is inherited from outer class. Still have no clue - why do this =)
[18:21:09] shevy: people do weird stuff all the time
[18:21:29] shevy: especially centrx
[18:21:57] ellisTAA: has joined #ruby
[18:22:24] centrx: https://www.youtube.com/watch?v=BMI4o0zc2XI
[18:23:22] miah: somebody should PR a fix =)
[18:23:34] Trynemjoel: has joined #ruby
[18:23:42] ElSif: has joined #ruby
[18:24:05] Muhannad: has joined #ruby
[18:25:17] pocketprotector: has joined #ruby
[18:25:31] tenderlove: has joined #ruby
[18:25:39] kirun: has joined #ruby
[18:27:20] blackmesa: has joined #ruby
[18:28:54] ellisTAA: has joined #ruby
[18:29:02] CustosLimen: has joined #ruby
[18:30:00] cschneid_: has joined #ruby
[18:30:17] cschneid_: Is there no form of Hash#map_values?
[18:30:29] klaas: has joined #ruby
[18:30:33] bronson: hash.values.map { ... } ?
[18:31:13] cschneid_: doesn't work in a chain of mapping, since I have to do hash.values.each {|v| h[v] = h[v].transform }
[18:31:22] havenwood: cschneid_: map { |k, v| [k, v.stuff_here] }.to_h
[18:31:44] cschneid_: havenwood: thanks, slightly odd this isn't a built-in :)
[18:31:57] havenwood: cschneid: It has been proposed and they said let's see if anyone uses it as a gem.
[18:32:32] michaeldeol: has joined #ruby
[18:33:52] woodruffw: has joined #ruby
[18:34:17] sdothum: has joined #ruby
[18:34:23] havenwood: cschneid: You could add it yourself similar to the several gems that add something like: class Hash; def map_value; each_with_object({}) { |(k, v), h| h[k] = yield(v) } end end
[18:35:26] havenwood: cschneid: But yeah, the idiom to get around lack of such methods is: map { |k, v| [k, v] }.to_h
[18:35:33] havenwood: cschneid_: ^
[18:35:56] havenwood: cschneid: Maybe in Ruby 3.0. ;)
[18:36:05] dorei: has joined #ruby
[18:37:30] centrx: cschneid_, Rails/ActiveSupport has Hash#transform_values and Hash#transform_keys
[18:37:52] dented42: has joined #ruby
[18:38:08] douglasssss: has joined #ruby
[18:38:45] postmodern: how does one automatically login a user with warden?
[18:40:55] symm-: has joined #ruby
[18:41:04] Phagus: has joined #ruby
[18:41:34] bruno-: has joined #ruby
[18:41:45] Phagus: has left #ruby: ()
[18:42:01] treehug88: has joined #ruby
[18:42:13] tenderlove: has joined #ruby
[18:42:30] ruurd: has joined #ruby
[18:42:51] allomov: has joined #ruby
[18:43:07] jackjackdripper: has joined #ruby
[18:43:36] BradPitt_: has joined #ruby
[18:43:36] Scripore: has joined #ruby
[18:44:10] jackjackdripper: has joined #ruby
[18:44:45] Musashi007: has joined #ruby
[18:46:02] Papierkorb: has joined #ruby
[18:46:26] pipework: has joined #ruby
[18:46:31] BradPitt_: has joined #ruby
[18:46:53] rikkipitt: has joined #ruby
[18:50:12] christiandsg: has joined #ruby
[18:50:57] blackmes1: has joined #ruby
[18:51:10] bronson: has joined #ruby
[18:51:57] MatthewsFace: has joined #ruby
[18:52:25] Lamarus: has joined #ruby
[18:52:28] jackjackdripper: has joined #ruby
[18:53:35] Trynemjoel: has joined #ruby
[18:53:46] shock_one: has joined #ruby
[18:54:34] troulouliou_dev: has joined #ruby
[18:55:12] atmosx: has joined #ruby
[18:55:27] BradPitt_: has joined #ruby
[18:55:42] Notte: has joined #ruby
[18:56:11] Lamarus_: has joined #ruby
[18:56:15] Lamarus_: has left #ruby: ()
[18:56:16] yardenbar: has joined #ruby
[18:57:03] BradPitt_: has joined #ruby
[18:57:33] ellisTAA: what???s warden
[18:57:43] Pumukel: has joined #ruby
[18:58:45] tenderlove: has joined #ruby
[18:58:50] BraddPitt: has joined #ruby
[18:59:57] Matthews_: has joined #ruby
[19:00:54] tuelz: automatically log a user in? What would be the point of logging in if it's automatic?
[19:01:14] havenwood: EllisTAA: https://github.com/hassox/warden/wiki/Overview#the-what
[19:01:17] Antiarc: testing, probably. And check the docs :)
[19:01:26] kadoppe: has joined #ruby
[19:01:31] anshu19: has joined #ruby
[19:01:55] swgillespie: has joined #ruby
[19:02:23] ellisTAA: havenwood: reminds me of bcrypt. is that right?
[19:02:42] niiamon: has joined #ruby
[19:03:05] fabrice31: has joined #ruby
[19:03:08] polpak: has joined #ruby
[19:03:34] lwu_: has joined #ruby
[19:03:50] anshu19: what is havenwood?
[19:03:55] rbowlby: has joined #ruby
[19:04:26] BraddPitt: has joined #ruby
[19:05:00] Antiarc: warden is a rack middleware for authentication in web apps. It may use bcrypt, but it is not analogous to it
[19:05:56] anshu19: where can a new user learn ruby from ? the best place ?
[19:06:02] mustmodify: has joined #ruby
[19:06:05] lake: has joined #ruby
[19:06:08] craysiii: codecademy has a good intro.
[19:06:20] anshu19: codecademy tells just basics
[19:06:39] craysiii: hence the word 'intro'
[19:07:03] anshu19: a friend told me a book "beginning to ruby", is it good?
[19:07:46] craysiii: the smart thing to do would be to use various sources instead of relying on one
[19:08:03] safeforge: has joined #ruby
[19:08:16] atmosx: how do you open a berkley-db file in ruby-2.x ?
[19:08:24] loc22: has joined #ruby
[19:09:05] pandaant: has joined #ruby
[19:09:17] mdih: has joined #ruby
[19:10:01] MVPhelp: has joined #ruby
[19:10:25] ellisTAA: has joined #ruby
[19:10:32] BraddPitt: has joined #ruby
[19:10:46] ellisTAA: anshu19: do you need to learn programming? or do you already know how to program?
[19:13:20] fenjamin: has joined #ruby
[19:13:39] havenwood: anshu19: I am havenwood. Greetings!
[19:13:59] craysiii: can i be havenwood too?
[19:14:06] zz_barkerd427: has joined #ruby
[19:14:08] havenwood: craysiii: As a job title, yes.
[19:14:13] havenwood: craysiii: Just talk to HR.
[19:14:18] ellisTAA: anshu19: if you know how to code check out codewars, if you don???t know how to program do codeacademy then codewars
[19:14:34] anaeem1: has joined #ruby
[19:14:53] havenwood: EllisTAA: Hem, not same as in doing the same job.
[19:15:03] havenwood: EllisTAA: (Late reply.)
[19:15:40] anshu19: i know how to code, and i have learnt basic like class, methods, inheritance, files, etc
[19:15:48] ellisTAA: i was asking someone yesterday if i need to understand the OS, servers, networks, and middleware if i am trying to get a job as a junior dev, and they said no, do you all agree with this?
[19:15:50] erts: has joined #ruby
[19:16:08] anshu19: has left #ruby: ()
[19:16:25] shevy: depends on the job
[19:16:36] craysiii: junior dev != sysadmin. it certainly wouldn't hurt though
[19:16:41] shevy: probably if you just churn out websites then you won't need to know everything
[19:16:55] ellisTAA: shevy: this might sound like i???m not being serious, but developing a website ??? is the job i want
[19:17:24] Antiarc: EllisTAA: I don't expect junior devs to know sysadmin stuff, but knowing it is a HUGE plus
[19:17:37] shevy: I guess it also depends on their cluster; I had to compile stuff in my home dir e. g. to get an up-to-date running ruby
[19:18:00] atmosx: Is this string convertable to something 'readable' \x9E\xE2\xB8U\x00\x00\x00\x00\xDE\x1A\xB9U\x00\x00\x00\x00\xDE\x1A\xB9U\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00 ?
[19:18:14] Antiarc: Devs who don't understand the systems they deploy on tend to write bad code, in my experience. It's acceptable for a junior to not know it, but I expect them to learn it. It's not acceptable for a senior dev to not know that stuff.
[19:18:15] atmosx: comes fron a berkeley db, must an email address or something
[19:18:24] Muhannad: has joined #ruby
[19:18:24] centrx: EllisTAA, Related skills are always a plus
[19:18:26] atmosx: ascii to utf8 maybe
[19:18:53] ellisTAA: so i broke the web dev job into 6 areas: hardware, system software, servers, coding, design, and git workflow. am i missing anything?
[19:19:38] CustosLimen: has joined #ruby
[19:19:44] eam: what's the difference between hardware and servers?
[19:19:54] ellisTAA: application server
[19:19:59] atmosx: EllisTAA: I have a similar project, you missed mobile dev (through APIs probably)
[19:20:12] rodfersou: has joined #ruby
[19:20:28] Antiarc: There's a really good web dev competency matrix out there somewhere
[19:20:29] ellisTAA: atmosx: for sure thanks
[19:20:31] atmosx: I don't understand the 'system software' part either
[19:20:52] yqt: has joined #ruby
[19:20:54] ellisTAA: system software, by that i meant OS
[19:21:01] atmosx: EllisTAA: A friend of mine has a project that starts from a raspberry pi and ends to a mobile applications (with everything in between except of course a desktop app)
[19:21:32] ellisTAA: atmosx: sounds cool. link?
[19:21:43] atmosx: EllisTAA: ah, okay. Maybe operating system would be more self-explainatore (or distribution since 80+ of servers runs some linux flavor).
[19:21:51] atmosx: EllisTAA: it's vaporware.
[19:22:14] sarkyniin: has joined #ruby
[19:22:17] atmosx: EllisTAA: Maybe after Sept we'll start working on it. But we've discuss it extensively.
[19:22:51] jenrzzz: has joined #ruby
[19:23:10] centrx: That's a key component of being a programmer - discussing things in meeting
[19:23:43] ellisTAA: ok cool. thanks yall
[19:23:55] eam: centrx: and success means more meetings and less code
[19:23:59] mustmodify: centrx: Can I quote you on that? I think you have unconvered something profound.
[19:24:23] atmosx: centrx: hahah meeting, two guys drinking beers discussing shit they never implemented is hardly considered a "meeting" but anyway.
[19:24:52] craysiii: how does one have a meeting with themselves?
[19:25:01] niiamon: has joined #ruby
[19:25:05] shevy: craysiii have you never met yourself?
[19:25:18] atmosx: craysiii: easy, go run, make some self-assesment in the meantime.
[19:25:24] atmosx: the mind works better when walking/running
[19:25:29] niiamon_: has joined #ruby
[19:25:33] centrx: atmosx, In fact, the most common type of meeting is where nothing productive comes out of it
[19:25:46] ellisTAA: atmosx: during that time the mind can engage ???diffuse thinking'
[19:25:52] craysiii: i agree. i do a lot of pacing. but sometimes you need an outside source to bounce ideas off of and to point things out
[19:26:00] SCHAAP137: has joined #ruby
[19:26:15] ertse: has joined #ruby
[19:26:20] rbowlby: has joined #ruby
[19:28:14] bstrarm: has joined #ruby
[19:28:41] mustmodify: ok, let's see ... ways to call procs... Proc#call, instance_eval( #Proc ), ...
[19:28:41] riscky: has joined #ruby
[19:29:09] mustmodify: class_eval apparently
[19:29:45] Ox0dea: Proc === args
[19:30:36] sinkensabe: has joined #ruby
[19:30:39] mustmodify: that's true.
[19:30:54] mustmodify: Ways to call Procs with different scopes.
[19:31:08] mustmodify: () and [] are effectively the same as call, IIRC
[19:31:08] Ox0dea: >> -> a, b { a + b }::(1, 2)
[19:31:09] ruboto: Ox0dea # => 3 (https://eval.in/408506)
[19:31:12] bronson: has joined #ruby
[19:31:12] Ox0dea: This language is crazy.
[19:32:23] chadwtaylor: has joined #ruby
[19:32:42] Ox0dea: mustmodify: It's `.()`, not just `()`.
[19:33:16] kossae: has joined #ruby
[19:33:34] Ox0dea: Still, you're right that it's just another way to invoke #call.
[19:33:49] Ox0dea: >> class Foo; def call; 42 end end; Foo.new.()
[19:33:50] ruboto: Ox0dea # => 42 (https://eval.in/408510)
[19:33:55] erts: has joined #ruby
[19:34:30] kossae: I have a question with an ActiveRecord migration, using Sinatra and AR as the ORM. I'm trying to create a MEDIUMBLOB field type, but the code snippets I've seen only mention doing a :binary, :limit => 10.megabyte, which appears to be a rails thing
[19:34:31] nobitanobi: has joined #ruby
[19:34:33] kossae: any ideas?
[19:34:43] tenderlove: has joined #ruby
[19:35:10] mustmodify: so instance_exec works for me but not class_exec, though I see it in some documentation from 1.9.3... was it deprecated / removed?
[19:35:12] Ox0dea: kossae: You're using ActiveRecord, but not ActiveSupport?
[19:35:40] kossae: right, should I be using ActiveSupport as well? sorry, I'm used to a boilerplate rails setup and am doing a lightweight project with sinatra, so trying to include as little as possible
[19:35:58] kossae: also quite new to the ruby/rails community in general
[19:36:03] centrx: ActiveSupport is useful. In this case, it has Numeric#megabyte
[19:36:18] shevy: oh dear, I feel a brother: http://gyrovague.com/2015/07/29/crashes-only-on-wednesdays/
[19:36:29] shevy: "After several weeks of frustration, where entire days devoted to experimentation had produced no results, I ended up basically adding printf statements to every single line"
[19:36:32] shevy: this is how I do ruby too!!!
[19:36:41] kossae: ahh okay, thanks centrx!
[19:36:47] Ox0dea: kossae: You could just as well use `limit: 10485760` if you don't want to bring in AS.
[19:36:56] loc22_: has joined #ruby
[19:37:20] BraddPitt: has joined #ruby
[19:37:22] kossae: ah okay, is AS basically helper functions for AR stuff?
[19:37:28] miah: shevy: this is where mutation testing is useful
[19:37:29] kossae: wondering if I may need to use anything else from it going foward
[19:37:38] Ox0dea: kossae: It adds convenience methods on everything.
[19:37:43] shevy: miah mutation testing? Will I become like the Hulk??
[19:38:04] havenwood: >> class Fixnum; def inspect; self == 3 ? "???? " : self end end; -> ???? , ???????? { ???? + ???????? }::(1, 2)
[19:38:05] ruboto: havenwood # => ???? (https://eval.in/408516)
[19:38:14] miah: https://en.wikipedia.org/wiki/Mutation_testing
[19:38:15] havenwood: Ox0dea: Another variant.
[19:38:19] Ox0dea: havenwood: Holy shit.
[19:38:20] kossae: oh I see now, thanks all
[19:38:32] craysiii: what does that even mean
[19:38:33] miah: ruby has https://github.com/mbj/mutant
[19:38:40] Ox0dea: craysiii: It's tricksy.
[19:38:46] miah: but it doesnt do minitest
[19:38:56] casadei_: has joined #ruby
[19:39:07] havenwood: craysiii: it means an evergreen tree plus santa equals a christmas tree!
[19:39:09] mase-chatter: has joined #ruby
[19:39:10] shevy: the ruby mutant
[19:39:23] mustmodify: Am I correct in thinking I don't have access to this from straight Ruby? http://docs.ruby-lang.org/ja/1.9.3/function/yield_under.html
[19:39:46] mustmodify: and am I also correct in thinking that if I did, I could pass in a context and a proc? Because that would be great.
[19:40:26] shevy: I dig the japanese explanation
[19:40:38] craysiii: me too, though i dont know what it means.
[19:40:39] Scriptonaut: has joined #ruby
[19:40:42] craysiii: i just like the pretty lines.
[19:40:53] Ox0dea: mustmodify: It is the case that Ruby doesn't expose that function, but you could surely get at it via FFI.
[19:41:38] Ox0dea: ?????????????????? = kontekisuto = context
[19:41:49] mustmodify: I want to call a Proc and pass in a context... is that a thing? Or are the only options to run in the calling context or the definition context?
[19:42:13] schaerli: has joined #ruby
[19:42:30] Ox0dea: mustmodify: Do you know about Binding?
[19:42:57] mustmodify: I guess it depends on the context.
[19:43:07] mustmodify: I'm not sure what you're asking.
[19:43:09] Ox0dea: Binding, the Ruby class.
[19:43:13] MatthewsFace: has joined #ruby
[19:46:09] bodgix: has left #ruby: ()
[19:46:12] mustmodify: Hm, no, I don't think so.
[19:46:18] mustmodify: Sounds familiar.
[19:46:21] dfockler: Binding, the Ruby Musical
[19:47:30] Ox0dea: mustmodify: You'll have to clarify how exactly you're using "context", but finagling with Binding (or perhaps even binding_of_caller, if you're doing something really crazy) should get you there.
[19:48:06] charliesome: has joined #ruby
[19:48:57] bstrrm: has joined #ruby
[19:48:57] mustmodify: Wow, that's great. That's exactly what I wanted.
[19:49:01] tenderlove: has joined #ruby
[19:49:11] Igorshp: has joined #ruby
[19:49:20] rdark: has joined #ruby
[19:49:55] dimasg: has joined #ruby
[19:50:09] Blaguvest: has joined #ruby
[19:51:16] mustmodify: Any thoughts on why binding() private?
[19:51:47] Notte: has joined #ruby
[19:52:05] mustmodify: seems like the kind of method that was written specifically to be used by outside callers.
[19:55:18] mustmodify: So wait, you can only use Binding with a string, you can't use it on a Proc?
[19:55:20] mustmodify: That's interesting.
[19:57:28] kies: has joined #ruby
[19:57:56] drbrain: you can instance_exec
[19:58:12] drbrain: (but I haven't been following enough to know if that will do what you need)
[19:58:55] spider-mario: has joined #ruby
[19:59:01] mustmodify: drbrain: I have a DSL and I'd like to separate helper methods from the class that has the "this is how a DSL works" logic.
[19:59:07] _blizzy_: has joined #ruby
[19:59:29] mustmodify: I can always include a module, but I just thought it would be cool to do proc.call(parameters, binding)
[19:59:38] mustmodify: Proc.call( proc, params, binding)
[20:00:03] anisha: has joined #ruby
[20:00:18] dfockler: how do you truncate a float to a specific precision in ruby?
[20:00:52] Zai00: has joined #ruby
[20:00:54] doodleha_: has joined #ruby
[20:01:01] craysiii: dfockler is it just for display or for calculation
[20:01:14] dfockler: for calculation
[20:01:50] dfockler: #round rounds up after the specified precision
[20:02:28] tenderlove: has joined #ruby
[20:02:51] mustmodify: >> 1.2345.round(2)
[20:02:52] ruboto: mustmodify # => 1.23 (https://eval.in/408524)
[20:02:54] bootstrappm: has joined #ruby
[20:03:21] craysiii: >> 1.234567.round(5)
[20:03:22] ruboto: craysiii # => 1.23457 (https://eval.in/408525)
[20:03:52] dfockler: so it's rounding to whichever is closest
[20:03:52] jgpawletko: has joined #ruby
[20:04:28] lwu_: has joined #ruby
[20:04:31] rbowlby_: has joined #ruby
[20:05:51] arooni-mobile: has joined #ruby
[20:05:59] christiandsg: has joined #ruby
[20:07:17] piotrj: has joined #ruby
[20:07:27] blaines: has joined #ruby
[20:07:51] loc22_: has joined #ruby
[20:08:06] curses: has joined #ruby
[20:09:22] craysiii: >> ((1.234567 / (0.1 ** 5)).truncate).to_f / (10 ** 5)
[20:09:23] ruboto: craysiii # => 1.23456 (https://eval.in/408526)
[20:09:46] dfockler: craysiii: thanks, I just found basically this method
[20:09:57] nahtnam: has joined #ruby
[20:09:58] craysiii: haha i was just messin around in irb.
[20:11:22] leesharma: has joined #ruby
[20:14:13] kies: has joined #ruby
[20:14:44] khebbie: has joined #ruby
[20:14:45] khebbie_: has joined #ruby
[20:15:03] phutchins: has joined #ruby
[20:16:00] tenderlove: has joined #ruby
[20:18:11] ellisTAA: has joined #ruby
[20:18:36] craysiii: dfockler why wouldn't you want the rounded number though? wouldn't it be more accurate in terms of your calculation results than a simple truncate?
[20:18:52] shinnya: has joined #ruby
[20:19:06] dfockler: it's for a codewars challenge :P
[20:19:14] craysiii: ohhh okay :)
[20:19:17] dfockler: but now I'm getting NaN values
[20:19:24] craysiii: i was going to start doing codewars myself
[20:19:26] aryaching: has joined #ruby
[20:19:51] dgutierrez1287: has joined #ruby
[20:20:05] craysiii: do they give you the example which resulted in NaN
[20:22:09] craysiii: is the input guaranteed to be a float?
[20:23:01] dfockler: I'm assuming it's an int
[20:23:17] iszak: has joined #ruby
[20:23:17] iszak: has joined #ruby
[20:23:19] dfockler: but it's going so high that I end up with a bignum which can't divide like normal
[20:23:20] curses: has joined #ruby
[20:23:37] dfockler: nvm that's not true
[20:23:52] EminenceHC: has joined #ruby
[20:24:18] juanpablo______: has joined #ruby
[20:26:23] ertse: has joined #ruby
[20:27:50] roolo: has joined #ruby
[20:27:54] Helheim: has joined #ruby
[20:28:24] craysiii: >> 1.234567 - 1.234567.remainder(0.1 ** 5)
[20:28:25] ruboto: craysiii # => 1.2345600000000003 (https://eval.in/408534)
[20:29:51] loc22_: has joined #ruby
[20:29:54] chouhoulis: has joined #ruby
[20:31:51] craysiii: >> (1.234567 - 1.234567.remainder(0.1 ** 5)).round(5)
[20:31:51] ruboto: craysiii # => 1.23456 (https://eval.in/408535)
[20:35:42] niiamon: has joined #ruby
[20:36:40] CustosLimen: has joined #ruby
[20:37:23] matp: has joined #ruby
[20:37:55] hays: has joined #ruby
[20:38:17] nobitanobi: has joined #ruby
[20:39:32] acovrig: has joined #ruby
[20:40:19] acovrig: How do I use an ???or??? in a .select? ActiveRecordObject.all.select{|c| c.language.nil? || c.language.downcase.include? ???english???}
[20:41:19] Rutix: has joined #ruby
[20:41:19] Rutix: has joined #ruby
[20:41:26] _blizzy_: has joined #ruby
[20:41:29] mleung: has joined #ruby
[20:41:42] beefcakeba: has joined #ruby
[20:43:16] sleepycat: has joined #ruby
[20:43:56] sleepycat: Can anyone see why this is not parsing? I feel like this should work: DateTime.strptime("6/16/2015", "%-d/%-m/%Y")
[20:44:06] centrx: acovrig, For a query?
[20:44:19] acovrig: centrx: yes
[20:44:28] sumark: has joined #ruby
[20:44:44] RonRichie: has joined #ruby
[20:45:10] sleepycat: Instead I get "ArgumentError: invalid date"
[20:45:31] lapide_viridi: has joined #ruby
[20:45:54] centrx: acovrig, The best way is to use a SQL fragment wit ha where(), MyModel.where("language IS NULL OR language = 'hi'")
[20:46:12] allomov: has joined #ruby
[20:46:14] centrx: acovrig, If you know the record set will be small, you can a select with Ruby logic like you did above, for minimal performance cost
[20:46:22] mustmodify: has left #ruby: ()
[20:46:49] sanguisdex: has left #ruby: ()
[20:47:00] centrx: sleepycat, weird
[20:47:11] p8952: Can FileUtils.copy, or any other copy library take advantage of CoW filesystems via reflink? http://pastebin.com/xmXqsC7R
[20:47:12] ruboto: p8952, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/740e3540421511fd929a
[20:47:12] ruboto: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[20:47:16] dstarh: has joined #ruby
[20:47:27] sleepycat: centrx: so it's not just me?
[20:48:11] bricker: sleepycat: 16 isn't a month
[20:48:14] Scripore: has joined #ruby
[20:48:20] rbowlby: has joined #ruby
[20:48:31] centrx: sleepycat, 16 out of bounds for month
[20:48:33] sleepycat: bricker: lol.
[20:48:37] yfeldblum: has joined #ruby
[20:48:54] sleepycat: bricker: need to rub my eyes
[20:48:55] Igorshp: has joined #ruby
[20:49:44] Trynemjoel: has joined #ruby
[20:50:08] centrx: p8952, Seems like you would want to use #system for that
[20:50:15] centrx: p8952, want to/have to
[20:50:54] acovrig: centrx: OK, thanks; this isn???t a time sensitive thing, if a query takes time, it???s no issue; there are 14,775 rows
[20:51:03] juanpaucar: has joined #ruby
[20:51:08] p8952: centrx, thanks, that's what I feared =( it's not as clean
[20:51:11] kallisti5: has joined #ruby
[20:51:20] sleepycat: bricker: interestingly, swapping %-m and %-b still blows up with an invalid date.
[20:51:30] kallisti5: i'm working on some improvements on a gem... how do I reference an unpacked gem from a script?
[20:51:44] kallisti5: aka... script.rb <unpacked gem source dir>
[20:53:44] rdark: has joined #ruby
[20:54:03] bricker: sleepycat: you mean %-d? Try taking out the hyphens
[20:54:56] banister: has joined #ruby
[20:54:56] tenderlove: has joined #ruby
[20:55:09] centrx: sleepycat, %- is only for output padding
[20:55:35] sleepycat: centrx: Ahhhhhh.....
[20:55:35] michaeldeol: has joined #ruby
[20:55:35] jhass: kallisti5: ruby -Ipath/to/gem/lib script.rb
[20:55:56] sleepycat: bricker: yup removing the - did it.
[20:56:11] sleepycat: bricker: thanks!
[20:56:22] hakunin: has joined #ruby
[20:56:24] kallisti5: jhass: danke :-)
[20:56:33] shevy: GERMAN WORDS!
[20:57:11] jhass: yeah don't. Or else shevy gets all ... well you don't want to know
[20:57:36] shevy: shevy gets all excited
[20:57:57] leafybasil: has joined #ruby
[20:58:13] kallisti5: creepypasta
[20:58:26] craysiii: the german word that always sticks in my mind is staatsangehoerigkeit
[20:58:29] kallisti5: ...creepenpasten
[20:59:28] shevy: craysiii yeah but you need to use one umlaut... ?
[20:59:36] jhass: craysiii: why not Rindfleischetikettierungs??berwachungsaufgaben??bertragungsgesetz
[20:59:44] craysiii: no because oe == o with umlaut
[20:59:44] shevy: is that a made up word?
[20:59:50] jhass: shevy: nope, google it
[21:00:00] craysiii: and no thats a word relating to labeling laws of beef IIRC
[21:00:14] khebbie: has joined #ruby
[21:00:28] craysiii: in my german class my teacher actually tested to see who could pronounce it. i passed :)
[21:01:11] gamename: has joined #ruby
[21:01:16] jhass: somehow that german is teached as a language in schools in other countries still creeps me out
[21:01:30] gambl0re: has joined #ruby
[21:01:44] Zai00: has joined #ruby
[21:01:44] jhass: eh, right
[21:01:57] craysiii: and why is that weird?
[21:02:03] adaedra: Germany is like, the next country, it seems normal to teach German, no?
[21:02:18] Ox0dea: craysiii: How's your pronunciation of Llanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogogogoch?
[21:02:28] craysiii: not even touching that haha
[21:02:34] adaedra: Ox0dea: get out.
[21:02:40] Ox0dea: Welsh is absolutely bonkers.
[21:02:42] Ilyas_: has joined #ruby
[21:02:47] Igorshp: has joined #ruby
[21:02:53] craysiii: it confuses my brain about as much as polish
[21:03:12] adaedra: I still can't pronounce English properly, let alone these horrors
[21:03:35] craysiii: english is a bastardized language with no standard pronunciation though, thats kind of expected
[21:03:48] hfp: has joined #ruby
[21:04:19] fabrice31: has joined #ruby
[21:04:22] craysiii: there are variations of pronunciation across regions as well. e.g. tomayto vs tomahto
[21:04:24] hfp_work: has joined #ruby
[21:04:49] eam: Ox0dea: is that welsh?
[21:04:58] Ox0dea: It's the name of a village.
[21:05:03] safeforge: has joined #ruby
[21:05:25] nilcolor: has joined #ruby
[21:05:45] Trynemjoel: has joined #ruby
[21:06:10] dimasg: has joined #ruby
[21:06:25] shevy: guess they were bored
[21:06:39] Ox0dea: https://www.youtube.com/watch?v=NQrxzgd6ASA
[21:07:10] marens: has joined #ruby
[21:07:11] marens: has joined #ruby
[21:07:22] adaedra: shevy: no, they are bored: https://en.wikipedia.org/wiki/Boring,_Oregon
[21:07:33] adaedra: (also, sister city)
[21:07:45] Papierkorb: When I do: Foo = Struct.new :bar # How does ruby know that Foo.name => 'Foo' ?
[21:07:53] Ox0dea: Truth or Consequences, New Mexico.
[21:08:27] eggoez: has joined #ruby
[21:09:34] Ox0dea: >> foo = Struct.new(:foo); foo.name # Papierkorb
[21:09:35] ruboto: Ox0dea # => nil (https://eval.in/408588)
[21:09:41] eam: https://en.wikipedia.org/wiki/Wikipedia:Unusual_place_names
[21:09:43] tubuliferous: has joined #ruby
[21:09:43] Ox0dea: Looks to be the interpreter doing some special-casing.
[21:10:32] timonv: has joined #ruby
[21:10:33] adaedra: thanks eam, this is something we can discuss in -offtopic
[21:10:55] eam: yes I'm not going to mention most of those
[21:11:49] leafybasil: has joined #ruby
[21:11:57] loc22: has joined #ruby
[21:12:04] leesharma: has joined #ruby
[21:13:43] shevy: >> Time.now.strftime('%H:%M:%S')
[21:13:44] ruboto: shevy # => "21:13:44" (https://eval.in/408592)
[21:13:59] rikkipitt: has joined #ruby
[21:14:08] shevy: anyone of you needed to get the milliseconds as well?
[21:14:11] craysiii: ruboto, your timezone is showing
[21:14:30] Igorshp: has joined #ruby
[21:14:34] adaedra: craysiii: you mean UTC?
[21:14:42] ellisTAA: can someone say where their company advertises their jobs?
[21:14:51] adaedra: >> Time.now.strftime('%z %Z')
[21:14:53] ruboto: adaedra # => "+0000 UTC" (https://eval.in/408596)
[21:15:03] shevy: ruboto is a UK bot?
[21:15:15] adaedra: UK time != UTC, shevy
[21:15:27] craysiii: sarcasm was lost in the text
[21:15:39] shevy: sarcasm in written text?
[21:15:50] shevy: in the invisible characters :)
[21:15:59] adaedra: shevy: http://www.timeanddate.com/worldclock/uk/london
[21:16:06] michaeldeol: has joined #ruby
[21:16:13] shevy: adaedra yeah not far off
[21:16:14] aotg: has joined #ruby
[21:16:24] shevy: ruboto is probably in a boat west of the UK
[21:16:46] Trynemjoel: has joined #ruby
[21:17:44] RonRichie: has left #ruby: ("Textual IRC Client: www.textualapp.com")
[21:18:02] mary5030: has joined #ruby
[21:18:28] dblessing: has joined #ruby
[21:18:34] safeforge: has joined #ruby
[21:19:27] banister: has joined #ruby
[21:20:37] sideshowcoder: has joined #ruby
[21:23:56] baroquebobcat: has joined #ruby
[21:24:17] Trynemjoel: has joined #ruby
[21:24:30] aaeron: has joined #ruby
[21:25:26] benlieb: has joined #ruby
[21:26:56] ringarin: has joined #ruby
[21:28:09] victortyau: has joined #ruby
[21:29:09] nobitanobi: has joined #ruby
[21:30:53] busterarm: woot, i figured it out
[21:30:59] busterarm: bug in the version of gnutls this machine had
[21:31:06] shock_one: has joined #ruby
[21:31:07] busterarm: upgrading and restarting weechat and should be fixed :)
[21:31:40] The_Phoenix: has joined #ruby
[21:32:03] busterarm: i was sick of people insisting I wasn't using SASL even though I was :)
[21:33:05] The_Phoenix: has joined #ruby
[21:34:47] omegamike: has joined #ruby
[21:34:52] tennis: has joined #ruby
[21:35:17] Kully3xf: has joined #ruby
[21:35:48] Trynemjoel: has joined #ruby
[21:36:08] Muhannad: has joined #ruby
[21:37:30] michaeldeol: has joined #ruby
[21:38:11] niiamon: has joined #ruby
[21:39:02] busterarm: has joined #ruby
[21:39:22] FernandoBasso: has joined #ruby
[21:40:40] Igorshp: has joined #ruby
[21:41:03] swgillespie: has joined #ruby
[21:41:14] yqt: has joined #ruby
[21:42:09] wldcordeiro_: has joined #ruby
[21:42:41] danman: has joined #ruby
[21:42:52] yb_drowe: has joined #ruby
[21:42:58] kokoleavia: has joined #ruby
[21:44:15] Thr3d: has joined #ruby
[21:44:28] shevy: things get better all the time
[21:51:05] triangles: has joined #ruby
[21:52:35] tenderlove: has joined #ruby
[21:54:45] christiandsg: has joined #ruby
[21:56:01] bradleyprice: has joined #ruby
[21:56:49] yfeldblum: has joined #ruby
[21:56:51] neoseeker: has joined #ruby
[22:01:35] mleung: has joined #ruby
[22:03:53] tenderlove: has joined #ruby
[22:05:09] werelivinginthef: has joined #ruby
[22:05:15] Thr3d: has joined #ruby
[22:05:25] avocadorivalry: has joined #ruby
[22:05:37] Rhainur_: has joined #ruby
[22:07:06] arooni-mobile: has joined #ruby
[22:07:08] werelivinginthef: has joined #ruby
[22:08:15] mleung: has joined #ruby
[22:08:32] radgeRayden: has joined #ruby
[22:09:20] curses: has joined #ruby
[22:09:52] allcentury: has joined #ruby
[22:11:20] dorei: has joined #ruby
[22:14:33] martinium: has joined #ruby
[22:16:33] Scriptonaut: has left #ruby: ()
[22:16:39] Yzguy: has joined #ruby
[22:18:08] bootstrappm: has left #ruby: ()
[22:18:18] lannonbr: has joined #ruby
[22:18:25] michael_mbp: has joined #ruby
[22:18:53] tenderlove: has joined #ruby
[22:21:02] momomomomo: has joined #ruby
[22:21:05] freeze: has joined #ruby
[22:23:22] shevy: has one of you people managed to get a static version of ruby compiled? as in, when doing "ldd ruby", no shared objects are linked into it?
[22:24:50] failshell: has joined #ruby
[22:26:06] topdownjimmy: has joined #ruby
[22:27:05] benlieb: has joined #ruby
[22:29:17] dfockler: has joined #ruby
[22:29:39] eam: shevy: won't work with gems
[22:29:40] drewo: has joined #ruby
[22:30:19] eam: gems with C exts are shared objects
[22:31:56] rbowlby_: has joined #ruby
[22:32:33] tmtwd: has joined #ruby
[22:33:23] jgpawletko: has joined #ruby
[22:33:52] ivanskie: has joined #ruby
[22:34:18] mesamoo: has joined #ruby
[22:34:34] eam: shevy: why would you want a statically linked ruby?
[22:35:20] freeze: has joined #ruby
[22:36:18] shevy: so that it will break less often
[22:36:48] shevy: current one I use has hard links to libgmp.so.10 and libcrypt.so.1
[22:37:26] nveselinov: has joined #ruby
[22:37:43] danman: has joined #ruby
[22:38:56] niiamon: has joined #ruby
[22:39:20] Musashi007: has joined #ruby
[22:39:27] shevy: /usr/lib/ruby/2.2.0/rubygems/dependency.rb:315:in `to_specs': Could not find 'ruby' (>= 0) among 165 total gem(s) (Gem::LoadError)
[22:39:30] shevy: I don't understand this
[22:42:28] modern: has joined #ruby
[22:43:02] pengin: has joined #ruby
[22:43:35] shevy: http://pastie.org/pastes/10319137/text
[22:44:04] shevy: is there a simple way to find out from where such a dependency would be required?
[22:45:31] freeze: has joined #ruby
[22:48:01] shevy: guess I have to do one-gem-per-step installation the next time
[22:48:08] shevy: until the error comes up again
[22:48:20] troulouliou_dev: has joined #ruby
[22:50:56] dimasg: has joined #ruby
[22:51:26] PotatoCrisps: has joined #ruby
[22:51:35] bruno-: has joined #ruby
[22:52:06] texasmade: has joined #ruby
[22:54:18] zenspider: shevy: you figure that out?
[22:54:41] freeze: has joined #ruby
[22:55:29] christiandsg: has joined #ruby
[22:55:30] shevy: well not entirely sure yet, but I think I know how I can reproduce it eventually
[22:55:32] Soda: has joined #ruby
[22:55:38] Antiarc: shevy: I'd just monkeypatch specification.rb to print which spec it's parsing
[22:55:47] Antiarc: Then run your thingie there and see what the last one printed is
[22:55:57] Antiarc: (or just straight-up patch it, that works too()
[22:56:28] theery: has joined #ruby
[22:56:28] eam: shevy: if those kinds of libs are changing around on you, you'll need to be updating your entire gemset libraries too
[22:56:30] blaines: has joined #ruby
[22:56:56] eam: shevy: what you can do is build ruby itself with an rpath, pointing to wherever you've collected the specific libs you want to use
[22:56:57] zenspider: shevy: I agree with Antiarc... it SHOULD be saying honestly. You can even send in a PR
[22:57:09] eam: and that'll bleed down into gem dependencies as well
[22:57:10] zenspider: you might also try `ruby -d` since a lot of that stuff is triggered via exceptions
[22:57:26] SCHAAP137: has joined #ruby
[22:58:20] tubuliferous: has joined #ruby
[22:58:42] eam: shevy: but you can also just put libgmp.so.10 or w/e into your linker path
[22:58:56] eam: it sounds like a larger packaging/dependency issue in your distro
[22:59:12] Scripore: has joined #ruby
[22:59:30] JStoker: has joined #ruby
[23:00:24] Kalov: has joined #ruby
[23:00:44] niiamon: has joined #ruby
[23:01:01] Mendenhall: has joined #ruby
[23:01:05] Oog_: has joined #ruby
[23:01:09] shevy: eam yeah that too
[23:01:23] michaeldeol: has joined #ruby
[23:03:55] EminenceHC: has joined #ruby
[23:04:51] freeze: has joined #ruby
[23:04:51] fabrice31: has joined #ruby
[23:07:27] nisstyre: has joined #ruby
[23:08:34] A124: has joined #ruby
[23:09:32] lotherk: has joined #ruby
[23:09:52] pietr0_: has joined #ruby
[23:10:07] swgillespie: has joined #ruby
[23:10:15] tuelz: has joined #ruby
[23:11:17] texasmade: has joined #ruby
[23:12:07] leesharma: has joined #ruby
[23:12:33] jenrzzz: has joined #ruby
[23:12:43] houhoulis: has joined #ruby
[23:13:04] aaeron: Hey how shall I mock a File.new call within rspec
[23:13:32] zenspider: why bother?
[23:13:53] gambl0re: has joined #ruby
[23:14:36] vdamewood: has joined #ruby
[23:15:03] freeze: has joined #ruby
[23:16:01] aaeron: I dont have to have a file
[23:16:07] aaeron: while testing
[23:16:18] hololeap: has joined #ruby
[23:18:13] jhass: adaedra: https://rubygems.org/gems/fakefs
[23:20:11] juanpablo______: has joined #ruby
[23:20:59] lannonbr: has joined #ruby
[23:22:04] GeissT: has joined #ruby
[23:25:11] juanpablo______: has joined #ruby
[23:25:14] freeze: has joined #ruby
[23:25:19] mandarinkin: has joined #ruby
[23:27:06] bootstrappm: has joined #ruby
[23:29:20] arturmartins: has joined #ruby
[23:29:26] poguez_: has joined #ruby
[23:29:29] aaeron: @jhass: can u provide me an example if possible.
[23:29:39] aaeron: They dont have any proper examples on how to use it
[23:29:59] aaeron: I did what he says and it does not mock
[23:30:16] jhass: oh, sorry adaedra, weechat tricked me by assigning the same color to a similar length nick with same starting letter :/
[23:30:39] jhass: aaeron: no, never used it myself, but the readme appears to be fairly extensive
[23:30:56] aaeron: @jhass: I'll look into it and update. Thanks
[23:33:45] rbowlby: has joined #ruby
[23:33:51] pengin: has joined #ruby
[23:35:25] freeze: has joined #ruby
[23:35:44] _blizzy_: has joined #ruby
[23:35:51] zenspider: aaeron: design it so you can hand it a StringIO. Or don't worry about it. Since you haven't measured the performance impact, you don't have a problem yet.
[23:37:11] leesharma: has joined #ruby
[23:37:38] werelivinginthef: has joined #ruby
[23:40:18] rickmasta: has joined #ruby
[23:42:19] MVPhelp: has joined #ruby
[23:42:21] Godd2: has joined #ruby
[23:42:27] swgillespie: has joined #ruby
[23:43:35] chipotle: has joined #ruby
[23:44:23] drewo: has joined #ruby
[23:45:35] freeze: has joined #ruby
[23:45:41] CloCkWeRX: has joined #ruby
[23:48:47] unclouded: has joined #ruby
[23:51:39] nkts: has joined #ruby
[23:53:52] mercwithamouth: has joined #ruby
[23:55:47] freeze: has joined #ruby
[23:56:11] christiandsg: has joined #ruby
[23:57:10] Mendenhall: has joined #ruby
[23:58:35] JeramyRR: has joined #ruby
[23:59:14] spleeze: has joined #ruby
[23:59:51] havenwood: has joined #ruby