« Back to channel list

#ruby - 06 August 2015

« Back 1 day Forward 1 day »
[00:00:18] lannonbr: has joined #ruby
[00:00:21] al2o3-cr: has joined #ruby
[00:00:28] _X_C_V_B_: has joined #ruby
[00:01:38] casadei_: has joined #ruby
[00:01:50] baroquebobcat: has joined #ruby
[00:01:57] devoldmx: has joined #ruby
[00:03:18] bradleyprice: has joined #ruby
[00:05:28] ramfjord: has joined #ruby
[00:08:36] leesharma: has joined #ruby
[00:10:01] msnyon: has joined #ruby
[00:10:58] al2o3-cr1: has joined #ruby
[00:12:44] al2o3-cr: has joined #ruby
[00:13:35] msnyon_: has joined #ruby
[00:19:02] jenrzzz: has joined #ruby
[00:24:11] tcrypt: has joined #ruby
[00:25:52] Ropeney: has joined #ruby
[00:26:19] saddad: has joined #ruby
[00:28:55] casadei_: has joined #ruby
[00:29:18] Muhannad: has joined #ruby
[00:29:48] drbrain: Alayde: might be that your SOAP client is using a different certificate store than `openssl`
[00:29:56] drbrain: or that your SOAP client isn't loading any certificates
[00:31:08] Alayde: drbrain: tjat
[00:31:35] Alayde: that's kind of what I was thinking. Unfortunately the code isn't mine, I'm just trying to make it work: https://github.com/Nextdoor/puppet_thycotic
[00:32:08] Alayde: I've gotten a few more leads though, in regards to the soap4r gem; looks like you can disable ssl verification during a call so I'll try that tomorrow
[00:32:29] omegamike: has joined #ruby
[00:33:34] havenwood: pontiki: hey
[00:33:40] pontiki: what does `extend self` do in a module?
[00:33:59] pontiki: is that a funny way of saying `module_function` at the top of a module?
[00:34:27] havenwood: pontiki: nope, it's different from module_function despite the similarities
[00:36:34] Mendenhall: has joined #ruby
[00:36:40] havenwood: pontiki: The module function instance methods are copies and are private.
[00:36:47] pontiki: could you splain it to me, ricky?
[00:37:05] Ox0dea: "Havey, you got some 'splainin' to do."
[00:39:21] jmfurlott: has joined #ruby
[00:39:45] Oog: has joined #ruby
[00:39:49] Ox0dea: >> module Foo; module_function def foo; end end; module Bar; extend self; def bar; end end; [Foo.method(:foo), Bar.method(:bar)] # pontiki
[00:39:50] ruboto: Ox0dea # => [#<Method: Foo.foo>, #<Method: Module(Bar)#bar>] (https://eval.in/412842)
[00:40:01] al2o3-cr: makes all instance_methods to singleton_methods
[00:40:06] govg: has joined #ruby
[00:41:36] Muhannad: has joined #ruby
[00:42:46] pontiki: i guess i need a more practical understanding. guess i'll repl about
[00:43:13] drbrain: Alayde: you really, really don't want to disable TLS verification
[00:43:20] drbrain: really, really, really don't want to
[00:43:53] drbrain: Alayde: especially since you're using this to pass secrets around
[00:44:05] drbrain: may as well be paste them into IRC
[00:44:40] sevenseacat: has joined #ruby
[00:45:14] Alayde: Valid point
[00:45:46] Ox0dea: Alayde: Please post `head -1 /etc/shadow` output.
[00:45:59] al2o3-cr: hi sevenseacat ^(????)^ # that's supposed to be a cat
[00:46:08] ascarter: has joined #ruby
[00:46:13] sevenseacat: al2o3-cr: good morning :)
[00:47:58] Alayde: Ox0dea: root:$6$ah-ah-ah-youdidntsaythemagicword:16231:0:99999:7::: ?
[00:48:25] drbrain: Alayde: look for CertStore in soap4r and trace that back
[00:48:36] drbrain: and/or cert_store
[00:48:52] Alayde: drbrain: Roger that.
[00:49:34] Sperant: has joined #ruby
[00:50:31] baweaver: Old etc passwd eh?
[00:51:01] Alayde: CentOS 6.5
[00:54:23] Maletor: has joined #ruby
[01:01:39] tkuchiki: has joined #ruby
[01:07:54] Mon_Ouie: has joined #ruby
[01:08:22] chipotle: has joined #ruby
[01:11:11] Oka: has joined #ruby
[01:11:59] hazelux: has joined #ruby
[01:13:54] theobrowne: has joined #ruby
[01:15:56] tubuliferous_: has joined #ruby
[01:16:31] psye: has joined #ruby
[01:17:26] edwardly: has joined #ruby
[01:18:12] edwardly: has joined #ruby
[01:22:45] MAQ: has joined #ruby
[01:23:08] Aswebb_: has joined #ruby
[01:23:13] rakm: has joined #ruby
[01:23:52] ap4y: has joined #ruby
[01:24:57] centrx: has joined #ruby
[01:25:19] michaeldeol: has joined #ruby
[01:26:53] shevy: hmm ... .map { |_| _.capitalize } is the same as .map(&:capitalize) right?
[01:27:31] fullofcaffeine: has joined #ruby
[01:27:49] shevy: sometimes my own code manages to surprise me
[01:28:40] centrx: I'm surprised you wrote that
[01:28:51] avahey: has joined #ruby
[01:30:18] Ox0dea: shevy likes using _ for variables that matter. :P
[01:30:44] phutchins: has joined #ruby
[01:31:11] shevy: _ is cool
[01:31:13] Scripore: has joined #ruby
[01:31:17] shevy: I don't have to think about a name
[01:31:38] shevy: giving things a name is hard, just look at gems like unicorn or god or thor
[01:31:40] shevy: or rails!!!
[01:32:56] MyMind: has joined #ruby
[01:34:49] pyon: has joined #ruby
[01:34:51] ap4y: has joined #ruby
[01:36:45] leesharma: has joined #ruby
[01:39:09] ribbons: has joined #ruby
[01:39:36] benlovell: has joined #ruby
[01:40:08] shevy: Ox0dea have you perhaps written a minimal irb?
[01:41:19] Ox0dea: shevy: irb is already pretty minimal?
[01:41:22] Mon_Ouie: loop { begin; p eval(gets); rescue Exception => e; p e; end }
[01:41:47] shevy: eval scares me :(
[01:41:49] Ox0dea: Run it under `rlwrap`, and you're good to go.
[01:45:12] s00pcan: has joined #ruby
[01:45:56] GeissT: has joined #ruby
[01:47:53] ereslibre: has joined #ruby
[01:49:03] blueOxigen: has joined #ruby
[01:49:14] icarus: has joined #ruby
[01:49:44] Ox0dea: shevy: Are you planning on writing a minimal irb without using eval?
[01:50:13] NeverDie: has joined #ruby
[01:53:02] shevy: Ox0dea don't think eval can be avoided
[01:53:31] niiamon: has joined #ruby
[01:53:52] shevy: irb is using lots of evals
[01:53:53] shevy: workspace.rb: @main = eval("self", @binding)
[01:53:56] dr3w: has joined #ruby
[01:54:24] shevy: lots of things make irb nicer to use, like IRB.conf[:EVAL_HISTORY], but I don't need any of that
[01:55:06] Oka: has joined #ruby
[01:55:27] shevy: youtube is kinda funny, it's like a big lecture room with lots of different lectures available
[01:55:50] dr3w: has joined #ruby
[01:56:55] fullofcaffeine: has joined #ruby
[01:58:21] shevy: incompatible character encodings: UTF-8 and ISO-8859-1 (Encoding::CompatibilityError)
[01:58:27] shevy: never saw this error before
[01:59:56] tkuchiki: has joined #ruby
[02:00:08] diegoviola: has joined #ruby
[02:00:51] yfeldblum: has joined #ruby
[02:02:03] ereslibre: has joined #ruby
[02:02:44] devoldmx: has joined #ruby
[02:05:02] radgeRayden: has joined #ruby
[02:06:45] saddad: has joined #ruby
[02:09:12] j4cknewt: has joined #ruby
[02:09:43] Vile`: has joined #ruby
[02:10:04] niiamon: has joined #ruby
[02:11:46] halcyone3: has joined #ruby
[02:14:25] niiamon: has joined #ruby
[02:14:40] Inside: has joined #ruby
[02:14:41] Inside: has joined #ruby
[02:14:41] bricker: has joined #ruby
[02:17:13] Trynemjoel: has joined #ruby
[02:18:25] MatthewsFace: has joined #ruby
[02:19:45] dmmoody: has joined #ruby
[02:19:51] RegulationD: has joined #ruby
[02:20:00] allcentury: has joined #ruby
[02:20:34] omegamike: has joined #ruby
[02:21:46] umgrosscol: has joined #ruby
[02:23:14] shevy: now I wondered why an alias won't work
[02:23:23] shevy: until I realized I forgot to use the word "alias" ...
[02:25:01] atom3_: has joined #ruby
[02:26:24] arescorpio: has joined #ruby
[02:27:31] zacstewart: has joined #ruby
[02:32:06] niiamon: has joined #ruby
[02:32:41] poguez_: has joined #ruby
[02:33:45] gthank: has joined #ruby
[02:35:41] s00pcan: has joined #ruby
[02:35:46] iateadonut: has joined #ruby
[02:37:45] Chau: has joined #ruby
[02:40:48] dseitz: has joined #ruby
[02:41:21] leesharma: has joined #ruby
[02:41:42] darkf: has joined #ruby
[02:43:53] _blizzy_: has joined #ruby
[02:49:20] hazelux: has joined #ruby
[02:49:45] Randroid: has joined #ruby
[02:49:46] niiamon: has joined #ruby
[02:50:02] ascarter: has joined #ruby
[02:51:00] dmmoody: has joined #ruby
[02:51:11] brendan-: has joined #ruby
[02:51:35] Randroid: has left #ruby: ()
[02:51:54] astrobun_: has joined #ruby
[02:52:07] niiamon_: has joined #ruby
[02:56:16] d2dchat: has joined #ruby
[02:56:44] niiamon: has joined #ruby
[03:01:29] Mendenhall: has joined #ruby
[03:02:44] CorySimmons: has joined #ruby
[03:04:04] tubuliferous_: has joined #ruby
[03:04:35] jonee: has joined #ruby
[03:06:14] Randroid: has joined #ruby
[03:06:32] Randroid: has left #ruby: ()
[03:09:41] braincrash: has joined #ruby
[03:11:57] Aswebb_: has joined #ruby
[03:12:08] Chau: has joined #ruby
[03:12:43] dopie: has joined #ruby
[03:14:19] halcyone3: has joined #ruby
[03:15:14] fedexo: has joined #ruby
[03:15:56] r_baron: has joined #ruby
[03:19:49] d0lph1n98: has joined #ruby
[03:20:07] Pupeno: has joined #ruby
[03:21:57] MAQ: has joined #ruby
[03:23:54] djbkd: has joined #ruby
[03:24:59] ponga: has joined #ruby
[03:25:42] armyriad: has joined #ruby
[03:26:14] RegulationD: has joined #ruby
[03:26:44] seitensei: has joined #ruby
[03:26:44] seitensei: has joined #ruby
[03:27:37] diego1: has joined #ruby
[03:28:24] [k-: has joined #ruby
[03:29:49] baweaver: has joined #ruby
[03:30:29] devoldmx: has joined #ruby
[03:33:17] gix: has joined #ruby
[03:35:06] astrobun_: has joined #ruby
[03:36:05] serivich: has joined #ruby
[03:37:21] bazbing80: what's the most efficent way to update just one file line? Read line 3, update 1 character on that line, save and close the file. Seems wasteful to load the whole thing into memory
[03:39:09] Ox0dea: bazbing80: Most filesystems only support efficient append. :/
[03:39:41] Chau: has joined #ruby
[03:41:49] bazbing80: Ox0dea so reading the whole file, editing in memory and then writing everything back into the file is the only way?
[03:42:06] bazbing80: no worries if so that's what its doing already :L
[03:42:35] nofxx: has joined #ruby
[03:43:14] bazbing80: if you look at Digital Ross' answer, gsub seems to give the illusion of being efficent and only writing one line http://stackoverflow.com/questions/4048678/ruby-open-file-find-and-replace-multiple-lines
[03:45:16] Ox0dea: ~ $ lorem 42 > foo && strace sed -i '21s/./x/' foo 2>&1 | grep -c write
[03:45:40] Oog: has joined #ruby
[03:45:44] Ox0dea: bazbing80: As you can see, even venerable `sed` has to write every single line even though it's only being asked to replace a single character on a single line.
[03:46:02] bazbing80: hah even sed
[03:46:24] Ox0dea: bazbing80: I use it as an example only becaue if there were some better way to do it, `sed` almost certainly would.
[03:47:10] sdrew: has joined #ruby
[03:47:50] bazbing80: yeah I get, thanks. Another question, you know when Rails updates your filesystem, and you get feedback. create file create file2 create file3 modify file4 ect? is it a gem that provides that feedback and or syntax?
[03:48:14] bazbing80: not just rails standalone gems show the same output
[03:48:21] bazbing80: seems standarized
[03:49:28] ramfjord: has joined #ruby
[03:50:02] Ox0dea: bazbing80: That'd be Thor.
[03:50:23] Rollabunna: has joined #ruby
[03:51:19] Ox0dea: Which isn't "standardized", per se, but it's easy to argue its being the best offering for making "command" CLIs.
[03:51:20] fedexo: has joined #ruby
[03:53:45] bazbing80: Ox0dea cool, can you link me to some docs? I'm not sure what search terms to use regarding giving filesystem feedback via Thor
[03:55:52] Ox0dea: bazbing80: You seem to be under the impression that these apps are monitoring the filesystem and responding to events. They're just logging what they're about to do.
[03:57:57] Rollabunna: has joined #ruby
[03:58:33] bazbing80: Ox0dea: I was indeed under that impression...well do you know methods I need to utilize within my code to log?
[03:59:07] pontiki: remember, too, that the file system knows nothing itself about lines
[04:00:20] mistermocha: has joined #ruby
[04:00:43] michael_mbp: has joined #ruby
[04:02:04] bazbing80: pontiki: you mean if I want to give feedback on what line has been edited? that's no worry
[04:03:24] pontiki: idk, i was looking at your original query about updating just one line
[04:04:47] Rollabunna: has joined #ruby
[04:06:03] fedexo: has joined #ruby
[04:08:45] omegamike: has joined #ruby
[04:09:08] safeforge: has joined #ruby
[04:09:37] theobrowne: has joined #ruby
[04:10:07] Musashi007: has joined #ruby
[04:12:02] yfeldblum: has joined #ruby
[04:13:25] diego1: has joined #ruby
[04:18:00] cvtsx1: has joined #ruby
[04:18:26] devbug_: has joined #ruby
[04:20:15] yosafbridge: has joined #ruby
[04:22:49] qiukun: has joined #ruby
[04:23:20] Mon_Ouie: has joined #ruby
[04:24:01] astrobun_: has joined #ruby
[04:29:00] Motoservo: has joined #ruby
[04:29:13] Synthead: has joined #ruby
[04:31:04] Synthead: has joined #ruby
[04:37:54] Rutix: has joined #ruby
[04:37:54] Rutix: has joined #ruby
[04:40:26] yfeldblum: has joined #ruby
[04:42:31] railswebdev: has joined #ruby
[04:42:47] jbwiv: has joined #ruby
[04:43:29] fedexo: has joined #ruby
[04:45:34] tmtwd: has joined #ruby
[04:52:12] tubuliferous_: has joined #ruby
[04:52:31] Frem: has joined #ruby
[04:54:46] schaerli: has joined #ruby
[04:57:33] A124: has joined #ruby
[04:58:43] fedexo: has joined #ruby
[04:58:47] pawnbox: has joined #ruby
[05:00:47] Aswebb_: has joined #ruby
[05:02:40] Musashi007: has joined #ruby
[05:02:56] mistermocha: has joined #ruby
[05:04:27] riotjones: has joined #ruby
[05:07:10] bradleyprice: has joined #ruby
[05:07:23] niemcu: has joined #ruby
[05:07:28] jenrzzz: has joined #ruby
[05:08:52] tanath: has left #ruby: ("Leaving")
[05:10:07] Rollabun_: has joined #ruby
[05:10:14] tmtwd: has joined #ruby
[05:11:24] chrissonar: has joined #ruby
[05:12:03] yfeldblum: has joined #ruby
[05:13:06] reverse_light: has joined #ruby
[05:14:49] graydot: has joined #ruby
[05:19:28] Oog: has joined #ruby
[05:22:28] Rollabunna: has joined #ruby
[05:23:46] Oog: has joined #ruby
[05:24:33] Musashi007_: has joined #ruby
[05:24:41] casadei_: has joined #ruby
[05:25:29] dualbus: has joined #ruby
[05:28:36] jenrzzz: has joined #ruby
[05:30:02] RobertBirnie: has joined #ruby
[05:31:15] devoldmx: has joined #ruby
[05:31:28] vondruch: has joined #ruby
[05:33:48] Oog: has joined #ruby
[05:33:51] Rollabunna: has joined #ruby
[05:34:16] j4cknewt: has joined #ruby
[05:34:34] riotjones: has joined #ruby
[05:35:42] devoldmx_: has joined #ruby
[05:35:48] ZeBaws: has joined #ruby
[05:36:02] ZeBaws: Hey guys! Is ruby a good language for complete programmers?
[05:36:42] ZeBaws: What is the best language for teaching programming?
[05:36:56] Oog: has joined #ruby
[05:37:48] Violentr: has joined #ruby
[05:39:25] ZeBaws: has left #ruby: ()
[05:39:53] al2o3-cr: Ox0dea: how long you been doing ruby?
[05:40:58] wasamasa: not long enough!
[05:41:27] devoldmx: has joined #ruby
[05:41:38] leat: has joined #ruby
[05:42:07] RobertBirnie: has joined #ruby
[05:42:14] abcd1234: has joined #ruby
[05:42:24] Ox0dea: al2o3-cr: About eight years, I guess.
[05:42:55] lsmola: has joined #ruby
[05:43:04] Ox0dea: ACTION is still raw about having used Python as long as he did.
[05:43:54] sevenseacat: does it give you a better appreciation for the awesomeness of ruby?
[05:43:57] fullofcaffeine: has joined #ruby
[05:43:58] sevenseacat: i know my seven or so years of php does
[05:44:08] Ox0dea: sevenseacat: So many things give me that appreciation.
[05:44:28] abcd1234: has joined #ruby
[05:44:51] TvL2386: has joined #ruby
[05:45:07] Ox0dea: There are just so many little pleasures.
[05:45:44] al2o3-cr: i'd give my big toe for ruby
[05:47:07] s2013: has joined #ruby
[05:47:30] al2o3-cr: when do you become a pro?
[05:48:01] Guest36270: has joined #ruby
[05:48:15] Rollabunna: has joined #ruby
[05:48:18] ferhaty: has joined #ruby
[05:48:21] al2o3-cr: ruby is just my hobby
[05:48:44] luckyme: has joined #ruby
[05:48:46] Jandre: has joined #ruby
[05:48:46] Ox0dea: al2o3-cr: On a vaguely related note, I'm surprised there don't seem to be any software projects called Hallux.
[05:49:01] Ox0dea: Do you only write Ruby?
[05:49:12] Oog: has joined #ruby
[05:49:25] al2o3-cr: yep, and a little lua
[05:50:11] al2o3-cr: tried python didn't like it
[05:50:30] atmosx: al2o3-cr: I guess when you're getting paid.
[05:50:31] al2o3-cr: also tried php + js too
[05:50:38] Rollabun_: has joined #ruby
[05:50:41] devbug: has joined #ruby
[05:50:53] al2o3-cr: atmosx: probably
[05:51:04] sevenseacat: ACTION sends js to the devil
[05:51:32] al2o3-cr: so, i just stuck to ruby as it was different
[05:51:46] Renich: has joined #ruby
[05:52:47] chinmay_dd: has joined #ruby
[05:52:59] Renich: has joined #ruby
[05:53:11] fantazo: has joined #ruby
[05:53:36] AlexRussia: has joined #ruby
[05:54:36] lxsameer: has joined #ruby
[05:55:44] psye: has joined #ruby
[05:56:49] psye: has joined #ruby
[05:57:00] Feyn: has joined #ruby
[05:57:05] n1x: has joined #ruby
[05:57:16] Xiti: has joined #ruby
[05:58:25] graydot: has joined #ruby
[05:59:05] brianpWins_: has joined #ruby
[05:59:49] al2o3-cr: I think i started delving into ruby when the metasploit changed from perl
[06:00:28] Rollabun_: has joined #ruby
[06:00:50] skade: has joined #ruby
[06:01:41] sevenseacat: I was tired of all the php web frameworks being 'inspired by rails' so I said screw it, time to learn rails
[06:02:10] Rollabunna: has joined #ruby
[06:02:38] al2o3-cr: and i bet that's the best decision you've made (though haven't use rails at all)
[06:03:35] al2o3-cr: diggled with sinatra once or twice (nice little dsl)
[06:03:54] sevenseacat: al2o3-cr: absolutely.
[06:04:05] sevenseacat: that was 2011.
[06:04:09] sevenseacat: still here o/
[06:04:28] al2o3-cr: nice to hear :)
[06:04:29] cornerma1: has joined #ruby
[06:05:34] ddv: has joined #ruby
[06:06:19] al2o3-cr: sevenseacat: did you write class in php?
[06:06:44] sevenseacat: yep. i was quite used to MVC web frameworks in php
[06:07:24] Aeyrix: I shifted to Ruby from Python after the Python 2/3 split became too unbearable.
[06:08:23] al2o3-cr: self is wierd in php
[06:09:25] al2o3-cr: i just don't like the whitespace rule with python, plus one or two other things
[06:09:59] al2o3-cr: what ever can be done with python, can be done with ruby anyway
[06:11:06] al2o3-cr: i like pythons list comps though
[06:11:36] nhhagen: has joined #ruby
[06:11:54] al2o3-cr: anyway, i'll stop rabbiting on now
[06:16:23] Janno: has joined #ruby
[06:17:23] djbkd: has joined #ruby
[06:18:58] _djbkd: has joined #ruby
[06:19:47] bronson: has joined #ruby
[06:20:01] Pisuke: has joined #ruby
[06:20:06] yardenbar: has joined #ruby
[06:20:47] Askilada: has joined #ruby
[06:20:53] TomyLobo: has joined #ruby
[06:22:22] minmax: has joined #ruby
[06:22:48] roolo: has joined #ruby
[06:24:09] codecop: has joined #ruby
[06:24:59] DoubleMalt: has joined #ruby
[06:27:22] graydot: has joined #ruby
[06:29:46] pawnbox: has joined #ruby
[06:32:47] jenrzzz: has joined #ruby
[06:35:18] niemcu: has joined #ruby
[06:38:19] stardiviner: has joined #ruby
[06:38:24] Macaveli: has joined #ruby
[06:38:43] michael_mbp: has joined #ruby
[06:40:04] fella5s: has joined #ruby
[06:40:25] tubuliferous_: has joined #ruby
[06:40:56] weemsledeux: has joined #ruby
[06:43:04] Aswebb_: has joined #ruby
[06:45:04] keeguon: has joined #ruby
[06:45:07] Nikamura: has joined #ruby
[06:45:39] andikr: has joined #ruby
[06:48:41] Philipp__: has joined #ruby
[06:49:21] aganov: has joined #ruby
[06:49:52] djbkd: has joined #ruby
[06:50:07] n1x: has joined #ruby
[06:51:52] freerobby: has joined #ruby
[06:52:22] alphaatom: has joined #ruby
[06:52:48] Macaveli: has joined #ruby
[06:53:00] corpsicle: has joined #ruby
[06:53:36] pawnbox: has joined #ruby
[06:54:19] corpsicle: so, im iterating over a list of variables, checking their content. but when i find an empty variable i want to puts a errormessage containing the name of the variable. how do i achieve this?
[06:55:18] Ropeney: corpsicle: p "
[06:55:21] brianpWins: has joined #ruby
[06:55:32] Ropeney: p "" if variable.nil?
[06:55:52] Ropeney: or p "" if variable == ""
[06:56:17] corpsicle: ok, im a noob at ruby, what does p do ? is it short for puts?
[06:56:33] Mon_Ouie: p o is short for puts o.inspect
[06:56:58] corpsicle: and p "" prints the name of the variable?
[06:57:14] TvL2386: has joined #ruby
[06:57:19] Ropeney: corpsicle: how are you iterating through the variables...? show code?
[06:57:54] corpsicle: for x in [variable1, variable2...]
[06:58:07] corpsicle: and then an if statement checking the content and printing message if empty
[06:58:54] corpsicle: not ruby enough ? =)
[06:59:07] Ox0dea: Do you know about Arrays?
[06:59:24] corpsicle: to some extent yes
[06:59:46] Ox0dea: If you have a group of related variables, you almost certainly want to use a collection type like Array or Hash.
[07:00:44] baweaver: http://www.gist.github.com
[07:00:58] Oog: has joined #ruby
[07:01:03] Ox0dea: baweaver: You... typed that out?
[07:01:42] baweaver: https://www.gist.github.com
[07:01:58] baweaver: HSTS is buggy I guess, doesn't auto translate.
[07:02:23] TomyWork: has joined #ruby
[07:02:35] Ox0dea: The "www" isn't arbitrary.
[07:03:14] baweaver: you'd think they'd just tag that on the name server
[07:03:21] baweaver: most sites do
[07:03:45] baweaver: What's a few CNAMEs between friends?
[07:04:14] baweaver: ACTION should probably go to bed already
[07:04:40] Ox0dea: You never did Muggle the third Triwizard Task.
[07:05:43] Cust0sLim3n: has joined #ruby
[07:07:47] Frem: has joined #ruby
[07:08:14] khebbie: has joined #ruby
[07:09:39] pontiki: https://twitter.com/cloudshark/status/629155536387317761
[07:09:40] krz: has joined #ruby
[07:11:33] jenrzzz: has joined #ruby
[07:12:26] Ox0dea: Would you like to hear a SYN flood joke?
[07:12:28] Ox0dea: Would you like to hear a SYN flood joke?
[07:12:30] Ox0dea: Would you like to hear a SYN flood joke?
[07:12:32] Ox0dea: Would you like to hear a SYN flood joke?
[07:13:01] [k-: has joined #ruby
[07:13:05] Oog: has joined #ruby
[07:13:07] baweaver: Ox0dea: ACK
[07:13:29] Ox0dea: Needs more SYNACK.
[07:13:45] baweaver: TCP is just SYNACKtic sugar :D
[07:14:01] Ox0dea: ACTION goes for a midnight SYNACK.
[07:14:03] baweaver: brb, tweeting, proud of that one.
[07:14:10] corpsicle: omg i did it
[07:14:18] corpsicle: variables.each do |var, val|
[07:14:18] corpsicle: error("environment variable #{var} not set")
[07:14:32] corpsicle: (sorry for spam, but it was so tiny ...)
[07:14:35] baweaver: multiline code goes in gist
[07:14:40] Ox0dea: ?gist corpsicle
[07:14:40] ruboto: corpsicle, https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
[07:14:41] baweaver: also, postfix ops
[07:14:49] Ox0dea: corpsicle: Is variables a Hash there, then?
[07:15:39] Ox0dea: corpsicle: Your loop body could be `error('...') unless val`, for reference.
[07:16:17] baweaver: too many parens D:
[07:17:23] corpsicle: Ox0dea: thanks, even neater =)
[07:18:19] pontiki: an elegant weapon, from a more civilised age
[07:19:02] [k-: &ri Enumerable#any?
[07:19:03] `derpy: http://www.rubydoc.info/stdlib/core/Enumerable#any%3F-instance_method
[07:21:33] Ox0dea: corpsicle: Does your error method cause the program to terminate?
[07:22:34] rht: has joined #ruby
[07:22:38] yfeldblum: has joined #ruby
[07:22:39] [k-: x = variables.find{|var,val| val}; error(...x.first)
[07:23:11] [k-: i wanted to do it with any but couldnt get the var out of it :<
[07:23:39] Ox0dea: [k-: You got it backwards-ish.
[07:24:08] Fraeon: has joined #ruby
[07:24:34] corpsicle: Ox0dea: it should yes, its not yet though
[07:24:48] Musashi007: has joined #ruby
[07:24:51] GeissT: has joined #ruby
[07:25:02] Ox0dea: corpsicle: I asked pursuant to suggesting something along the lines of what [k- did.
[07:25:38] rdark: has joined #ruby
[07:26:09] bayed: has joined #ruby
[07:26:13] [k-: oh, you have to !val
[07:26:32] [k-: since find retuns for truthy values
[07:26:37] Ox0dea: [k-: Oui, but also a conditional.
[07:27:04] Ox0dea: corpsicle: if bad = x.find { |k, v| v.nil? }; error(bad[0]); end
[07:27:47] RegulationD: has joined #ruby
[07:28:18] [k-: look, i abstracted away the loop!
[07:28:26] [k-: how amazing is that?!
[07:28:55] Ox0dea: Now to remove the conditionals.
[07:29:16] [k-: hide the conditional inside error
[07:29:30] [k-: use \1 to refer to the variable!
[07:29:32] baweaver: x.invert[nil].tap { |_,e| e && error(e) }
[07:30:12] tomphp_: has joined #ruby
[07:30:27] Ox0dea: baweaver: Why two parameters?
[07:30:33] baweaver: still a hash
[07:30:53] baweaver: ....really need to call it a night
[07:30:56] baweaver: getting sloppy
[07:30:58] Ox0dea: Mayhap. :)
[07:31:03] baweaver: x.invert[nil].tap { |e| e && error(e) }
[07:32:33] HayesHimself: has joined #ruby
[07:33:07] Pumukel: has joined #ruby
[07:33:51] terlar: has joined #ruby
[07:33:53] duncannz: has joined #ruby
[07:34:19] nickjj: has joined #ruby
[07:35:03] duncannz: has joined #ruby
[07:35:25] baweaver: def maybe(&b)->x{x && b[x]}end; {a: nil}.invert[nil].tap(&maybe(&->x{error(x)}))
[07:35:37] baweaver: def maybe(&b)->x{x && b[x]}end; {a: nil}.invert[nil].tap(&maybe(->x{error(x)}))
[07:35:52] baweaver: sleep now, bad code happening
[07:39:39] [k-: did i just hear bad code?
[07:40:38] quimrstorres: has joined #ruby
[07:42:36] marr: has joined #ruby
[07:42:44] riffraff: has joined #ruby
[07:43:01] banister: has joined #ruby
[07:43:10] skade: has joined #ruby
[07:43:18] bluurn: has joined #ruby
[07:43:59] Renich: has joined #ruby
[07:44:01] [k-: x.value? nil && error x.find { |k,v| v.nil? }[0]
[07:44:24] [k-: hmm precedence
[07:45:01] pawnbox: has joined #ruby
[07:46:10] [k-: x.sort_by { |k,v| v }.shift.tap { |k,v| error k if v.nil? }
[07:46:38] halcyone3: has joined #ruby
[07:46:41] omegamike: has joined #ruby
[07:46:49] [k-: there are so many possibilities
[07:47:23] [k-: doing a sort is stupid though
[07:48:59] devbug_: has joined #ruby
[07:49:35] maloik: Ouh chouette on parle francais maintenant?!
[07:49:44] Iskarlar: has joined #ruby
[07:51:13] Omni-: has joined #ruby
[07:52:42] corpsicle: did i join #perl by mistake ? ^_^;
[07:52:51] Liothen: has joined #ruby
[07:53:12] michael_mbp: has joined #ruby
[07:53:41] adaedra: In soviet Russia, #perl joins you
[07:54:25] apeiros: in soviet python too
[07:54:55] Oog: has joined #ruby
[07:55:03] zacstewart: has joined #ruby
[07:57:33] DefV: How should I install a specific version on my production server?
[07:57:39] DefV: Build it from source?
[07:57:47] DefV: Use smth as rbenv / rvm / ...
[07:58:27] benlovell: has joined #ruby
[07:59:13] adaedra: ruby-install + chruby
[07:59:35] tomphp_: has joined #ruby
[08:00:57] krz: has joined #ruby
[08:01:53] mikecmpbll: has joined #ruby
[08:02:23] tkuchiki: has joined #ruby
[08:04:31] astrobun_: has joined #ruby
[08:07:25] Cust0sLim3n: has joined #ruby
[08:07:39] pawnbox: has joined #ruby
[08:07:49] chthon: has joined #ruby
[08:10:44] khebbie: has joined #ruby
[08:11:35] pawnbox: has joined #ruby
[08:12:06] benlovell: has joined #ruby
[08:13:00] yh: has joined #ruby
[08:13:12] bluurn: has joined #ruby
[08:14:51] charliesome: has joined #ruby
[08:15:55] tkuchiki: has joined #ruby
[08:15:59] khebbie: has joined #ruby
[08:16:08] ragingcake: has joined #ruby
[08:16:55] charliesome: has joined #ruby
[08:18:19] Musashi007: has joined #ruby
[08:18:33] Ox0dea: DefV: Do you mind my asking your native language?
[08:18:45] Dzejmskrokan: has joined #ruby
[08:19:28] [k-: did you ask it before?
[08:19:37] [k-: if not: s/my/me
[08:19:49] Ox0dea: No, I think not.
[08:20:23] Ox0dea: I confess it's a little unorthodox, but it's not grammatically incorrect.
[08:20:50] [k-: it isnt, but the meaning is different
[08:21:01] [k-: as shown by me asking if you have asked before
[08:21:16] [k-: my implies that you have asked it before
[08:21:24] Ox0dea: I can't possess things in the present?
[08:21:32] [k-: me says that you are asking thr question currently
[08:22:07] [k-: dont know, but the sentences are of different meaning
[08:22:12] benlovell: has joined #ruby
[08:22:13] canton7: "do you mind my asking" can also refer to the present - you're asking, and simultaneously asking if they mind you asking
[08:22:28] _X_C_V_B_: has joined #ruby
[08:22:53] [k-: that is the case as people will answer the question anywat
[08:22:55] Ox0dea: In any case, I've often wondered if there was some linguistic component involved in people dropping the "such" from "such as".
[08:22:55] [k-: anyway*
[08:23:03] Ox0dea: It's remarkably common for such a glaring thinko.
[08:23:18] [k-: do you mind my asking of (...)
[08:23:51] canton7: ...whereas with 'do you mind me asking' you're not actually asking anything - just asking if it's ok to ask
[08:24:16] Davey: has joined #ruby
[08:24:28] [k-: people will give you the respond if its yes, no otherwise
[08:24:43] Ox0dea: [k-: Is the (act of) asking not "mine", then?
[08:24:45] [k-: not good for type!
[08:25:50] [k-: Ox0dea i do not study language in detail, but i think that act belongs to you
[08:26:19] [k-: you still need to put an of over there as well
[08:26:48] Ox0dea: That seems like a stylistic choice.
[08:27:49] [k-: http://forum.wordreference.com/threads/gerund-possessive-do-you-mind-me-my-asking.379294/#post-2244074
[08:27:59] [k-: seems like both are used
[08:28:14] [k-: but the emphasis is not the same
[08:28:21] [k-: so, different meaning
[08:28:31] [k-: canton7 also explained that too
[08:28:42] apfeluser: has joined #ruby
[08:28:50] tubuliferous_: has joined #ruby
[08:29:41] Ox0dea: I don't see where "emphasis" is applicable in this case.
[08:29:50] [k-: http://forum.wordreference.com/threads/if-you-dont-mind-me-asking-vs-if-you-dont-mind-my-asking.2242444/
[08:29:58] [k-: seems like i was wrong?
[08:30:16] Ox0dea: Seems so.
[08:30:26] Ox0dea: In your favor, I'm apparently "posh".
[08:30:51] ledestin: has joined #ruby
[08:30:57] [k-: i am young, so i prefer me
[08:31:10] Ox0dea: I suppose it would've been "most correct" to use "asking as to", but "as to" is filler.
[08:31:47] [k-: i prefer me because i am young has a different meaning as well
[08:32:05] Oog: has joined #ruby
[08:33:21] Oog_: has joined #ruby
[08:33:58] [k-: in my mind, i still require "my (...) of" for it to grammar check correctly
[08:34:19] c0ncealed: has joined #ruby
[08:34:54] [k-: http://dictionary.cambridge.org/dictionary/british/if-you-don-t-mind-me-saying-asking
[08:36:00] [k-: oxford says my asking is formal
[08:36:09] [k-: http://www.oxfordlearnersdictionaries.com/definition/american_english/mind_2
[08:36:34] adaedra: the "most important thing is to be understood" says we don't really care
[08:37:08] [k-: but it's language!
[08:37:34] terlar: has joined #ruby
[08:37:50] pengin: has joined #ruby
[08:38:14] joonty: has joined #ruby
[08:38:29] [k-: (i actually never heard of my asking before)
[08:38:46] adaedra: me neither
[08:39:02] j4cknewt: has joined #ruby
[08:39:02] adaedra: and I will probably have forgotten about it in 15mn
[08:39:39] [k-: i have never heard of mn as a proper unit for time
[08:39:42] _X_C_V_B_: has joined #ruby
[08:39:48] [k-: s/proper//
[08:39:49] chthon: has left #ruby: ("Ex-Chat")
[08:40:35] adaedra: how do you abbr "minute" then
[08:40:51] canton7: "min" or "mins"
[08:41:19] adaedra: fair enough
[08:41:32] [k-: mins isn't actually correct
[08:41:36] _blizzy_: has joined #ruby
[08:41:43] [k-: we don't put s after units
[08:41:51] adaedra: here we go again
[08:41:55] apeiros: (I do use "min" and "m",t hough)
[08:41:57] maloik: what is going on :D
[08:42:23] adaedra: nothing important
[08:42:29] chthon: has joined #ruby
[08:42:31] [k-: m technically refers to meters, but it is so common
[08:42:52] ccooke: Hmm. Why can't I pass a block to a proc? Example:
[08:42:54] ccooke: >>> x = ->{ yield 1 }; x.call { |i| p i }
[08:42:56] ruboto: ccooke # => /tmp/execpad-2a62c5201318/source-2a62c5201318:2: syntax error, unexpected '>' ...check link for more (https://eval.in/412994)
[08:43:01] maloik: 15m could mean the time it takes to walk 15 meters? *mindblown*
[08:43:10] baroquebobcat: has joined #ruby
[08:43:38] ccooke: >> x = ->{ yield 1 }; x.call { |i| p i }
[08:43:39] ruboto: ccooke # => no block given (yield) (LocalJumpError) ...check link for more (https://eval.in/412995)
[08:43:44] [k-: maloik, no, the speaker usually means 15 minutes
[08:44:25] ccooke: (I can see it's fixable with an explicit &block parameter to the proc, but that's not the point)
[08:44:26] [k-: example, !ban rand_nick !T 15m sorry if there is actually a rand_nick
[08:44:38] adaedra: m is meters
[08:45:21] [k-: yes, that is the official definition
[08:45:54] ndrei: has joined #ruby
[08:46:03] astrobun_: has joined #ruby
[08:46:14] [k-: >> ->{block_given?}.call { nil }
[08:46:15] ruboto: [k- # => false (https://eval.in/412996)
[08:46:47] w1xz: has joined #ruby
[08:46:49] Ox0dea: Nah, man, blocks and Procs are totally the same thing. /s
[08:47:36] [k-: i see you exempted yourself from that little discussion over there
[08:47:48] w1xz: has left #ruby: ()
[08:47:49] Ox0dea: It was the right thing to do.
[08:48:19] pengin: has joined #ruby
[08:49:15] _blizzy_: has joined #ruby
[08:49:22] Zackio: has joined #ruby
[08:50:37] Vile`: has joined #ruby
[08:51:58] riffraff: has joined #ruby
[08:53:23] qiukun: has joined #ruby
[08:53:43] vondruch: has joined #ruby
[08:57:32] Iskarlar: has joined #ruby
[08:57:52] arup_r: has joined #ruby
[08:58:52] platzhirsch: has joined #ruby
[08:59:01] khebbie: has joined #ruby
[08:59:20] serivich: has joined #ruby
[09:01:08] charliesome: has joined #ruby
[09:01:21] zacstewart: has joined #ruby
[09:02:03] yorickpeterse: ....blocks and procs are the same thing
[09:02:36] [k-: here we go again
[09:02:39] [k-: they aren't
[09:02:44] apeiros: popcorn anyone?
[09:02:54] tobiasvl: let's just say they're basically the same thing
[09:03:05] [k-: but they are not
[09:03:08] apeiros: in MRI they aren't indeed. can be considered an implementation detail, though. only matters for performance.
[09:03:21] bnagy: "for all intents and purposes" I believe is the phrase we're looking for
[09:03:33] tobiasvl: well, not for ALL purposes
[09:03:36] yorickpeterse: A block is nothing more than the syntax form, a proc is still created and exposed to a method whenever you use do ... end
[09:03:38] apeiros: yorickpeterse: nope. a block does not create an object. no GC necessary.
[09:03:40] [k-: except performance
[09:04:08] apeiros: and it shows in performance
[09:04:15] tobiasvl: one actual purpose: multiple proc arguments
[09:05:24] TaxtacalJackl: has joined #ruby
[09:05:45] yorickpeterse: apeiros: they're still procs, they behave exactly like them
[09:05:49] apeiros: also yield (syntax) vs. block.call (method call) has different overheads
[09:05:52] yorickpeterse: fixnums aren't allocated either, that doesn't not make them objects
[09:05:56] apeiros: yorickpeterse: as said, it's an implementation detail
[09:06:08] apeiros: but they are, in fact, not the same. they only behave the same.
[09:06:11] devoldmx: has joined #ruby
[09:06:17] Ox0dea: I think that sums it up nicely.
[09:06:26] apeiros: and it may well be that e.g. rbx does in fact not even implement them differently.
[09:07:02] apeiros: and I'll also repeat that the difference only matters when you have a case where you have to care about performance.
[09:07:12] Ox0dea: Or when you need more than one. ^_^
[09:07:31] [k-: you have 2 ballpoint pens from different brands
[09:07:45] adaedra: I lose them both
[09:07:48] [k-: they do the same thing
[09:07:54] [k-: but they aren't the same
[09:08:08] A124: has joined #ruby
[09:08:15] yorickpeterse: See my point about fixnums
[09:08:23] Ox0dea: tobiasvl: In the common case of wanting to execute one or another block based on a boolean value, there's this: https://gist.github.com/0x0dea/94debe4c1c28f6f2bac7
[09:08:24] yorickpeterse: Not being allocated does not making something a non object
[09:08:32] yorickpeterse: Hell, you can have objects without allocations
[09:08:46] yorickpeterse: e.g. nil is never allocated either, it's nothing but a tagged pointer
[09:08:49] yorickpeterse: yet it's still an object
[09:08:56] tobiasvl: Ox0dea: wow.
[09:09:04] [k-: but it isn't the same
[09:09:07] apeiros: yorickpeterse: I'm not arguing that point. but there is no object with a block.
[09:09:29] Ox0dea: tobiasvl: I actually kinda like it. :x
[09:09:37] DefV: Ox0dea: dutch, why?
[09:09:43] tobiasvl: Ox0dea: I gotta fork that so I remember it
[09:09:46] DefV: Ox0dea: Is my English that bad?
[09:09:46] devbug: has joined #ruby
[09:09:57] adaedra: DefV: speak english, we don't understand you
[09:10:09] Ox0dea: DefV: No, it's really not, and I apologize if I inadvertently gave any offense.
[09:10:16] oleksandriuzikov: has joined #ruby
[09:10:20] DefV: You didn't, just curious :-)
[09:10:21] [k-: silly?.rb isnt a valid name!
[09:10:30] Ox0dea: It's just that mistakenly dropping the "such" from "such as" is pretty common, and I thought it might have to do with not being a native speaker.
[09:11:18] DefV: aha, it probably is. Now I'm very self-concious
[09:11:25] Ox0dea: [k-: Are you on DOS?
[09:11:30] [k-: i would drop the such
[09:11:43] [k-: fewer words anyway
[09:11:54] tobiasvl: well he said "smth as"
[09:11:55] adaedra: let's drop all the words then
[09:11:59] tobiasvl: so it's not even fewer words :P
[09:12:08] [k-: Ox0dea yes, in the past i used windows
[09:12:25] Ox0dea: [k-: ? is a valid character in filenames in any remotely modern environment.
[09:12:28] apeiros: Ox0dea: that silly?.rb is funny
[09:12:29] soc42: has joined #ruby
[09:12:35] [k-: i see you as a pony!
[09:12:47] adaedra: Ox0dea: so Windows is not modern?
[09:13:18] [k-: why would ? even be allowed
[09:13:23] quimrstorres: has joined #ruby
[09:13:27] [k-: isnt it in glob patterns or something
[09:13:50] adaedra: it is, but it shouldn't be an issue
[09:14:13] [k-: we don't have * on names for example
[09:14:24] Ox0dea: But we can!
[09:14:26] adaedra: it is possible on a Linux
[09:14:34] Ox0dea: I think / is the only invalid filename character on Linux.
[09:14:58] adaedra: depend on the fs, ext4 forbids \0 too apparently.
[09:15:18] Ox0dea: It does not.
[09:15:42] Oog: has joined #ruby
[09:15:50] Ox0dea: I had a transposition error. It does.
[09:16:05] adaedra: (According to https://en.wikipedia.org/wiki/Ext4 )
[09:16:13] [k-: i had aerror such as
[09:16:31] [k-: i had errors such as (...) vs errors as (..
[09:16:40] Ox0dea: The latter is wrong.
[09:17:05] Ox0dea: Arguing for the equivalence of "as" and "such as" will cause me to unfriend you.
[09:17:39] yorickpeterse: "you're not allowed on my birthday party"
[09:18:02] c0ncealed: has joined #ruby
[09:19:03] [k-: Ox0dea i used vs!
[09:19:44] [k-: never mind
[09:20:27] anisha: has joined #ruby
[09:21:30] sevenseacat: has joined #ruby
[09:22:14] Hounddog: has joined #ruby
[09:22:20] Ox0dea: [k-: For posterity's sake, you did say "i would drop the such".
[09:22:25] Ox0dea: I realize now that was likely in jest.
[09:23:01] [k-: i dont drop it like that!
[09:23:15] Ox0dea: Then you need to increase its internal temperature.
[09:23:38] [k-: anyway, as a Singlish speaker, i would drop words when it is better
[09:23:43] Ox0dea: Walao eh.
[09:24:04] [k-: got problem?
[09:24:09] Ox0dea: Paiseh, paiseh.
[09:26:28] Stan: has joined #ruby
[09:27:04] arup_r: has joined #ruby
[09:27:29] [k-: http://yourdatafitsinram.com/
[09:27:35] jbwiv: has joined #ruby
[09:27:44] TheHodge: has joined #ruby
[09:28:36] Karpah: has joined #ruby
[09:28:38] Dzejmskr_: has joined #ruby
[09:28:43] araujo: has joined #ruby
[09:28:57] adaedra: there's only two responses: yes, not yet
[09:29:35] [k-: 6 GiB is the highest
[09:30:19] khebbie: has joined #ruby
[09:30:35] adaedra: I have a computer at home that may not even have that as hard drive
[09:30:48] yorickpeterse: [k-: you checked the link right?
[09:30:52] yorickpeterse: That server can have up to 6 TB
[09:31:48] [k-: well sorry for having volatile memory then ;p
[09:34:06] yorickpeterse: well, did you just power yourself off?
[09:34:11] yorickpeterse: If not then volatile memory isn't the problem
[09:34:19] yorickpeterse: that just means you might be using MongoDB for storage
[09:34:31] Pumukel: has joined #ruby
[09:34:59] [k-: you might be on to something here...
[09:35:56] Ox0dea: yorickpeterse: Or that [k-'s memory can be modified unexpectedly.
[09:36:48] Ox0dea: "From whence" is worse than "PIN number" and "ATM machine" combined.
[09:37:11] [k-: there is actually proof that you can lose memory if you get distracted at the instant your brain is saving the memory
[09:37:42] Ox0dea: [k-: Isn't that science's current explanation for d??j?? vu?
[09:37:57] [k-: don't know :)
[09:38:30] tobiasvl: Ox0dea: haha, I actually said "CERT team" not half an hours ago
[09:38:33] yorickpeterse: that's just a coverup
[09:38:40] tobiasvl: I'm not good at language today
[09:38:45] yorickpeterse: we all know deja vu is a glitch in the matrix
[09:38:49] mikecmpbll: any mechanize users ever seen anything like this? https://gist.github.com/mikecmpbll/e6b149846cd51396ebf9
[09:38:49] last_staff: has joined #ruby
[09:39:25] [k-: pin number!
[09:39:35] [k-: Atm machine!
[09:39:49] [k-: Php processor!
[09:40:10] [k-: yaml language!
[09:40:29] yorickpeterse: ACTION slaps [k- a few times
[09:40:30] Ox0dea: mikecmpbll: What's detail_page.body.class here?
[09:40:40] fella6s: has joined #ruby
[09:40:41] mikecmpbll: Ox0dea: String
[09:40:52] Ox0dea: >> String.instance_method(:first)
[09:40:53] ruboto: Ox0dea # => undefined method `first' for class `String' (NameError) ...check link for more (https://eval.in/413015)
[09:41:01] mikecmpbll: detail_page.body.bytes.all?{ |b| b==0 } => true
[09:41:14] mikecmpbll: >> "test".first
[09:41:15] ruboto: mikecmpbll # => undefined method `first' for "test":String (NoMethodError) ...check link for more (https://eval.in/413017)
[09:41:40] [k-: String isn't an array
[09:41:56] Ox0dea: mikecmpbll: Was String a guess, then?
[09:42:53] mikecmpbll: woops, good ol' rails core_ext
[09:43:05] mikecmpbll: either way, it's a string, and all the bytes are \x00 :(
[09:43:09] Ropeney: has joined #ruby
[09:43:38] yorickpeterse: mikecmpbll: set the proper encoding
[09:43:43] yorickpeterse: or make sure the input is valid in the first place
[09:44:35] mikecmpbll: yorickpeterse: i'll try play around with the encoding, just using mechanize defaults at the moment which always worked for me before. what do you mean by making sure the input is valid?
[09:46:10] Ox0dea: Mechanize is sort of like Dreamweaver for Web interaction. :P
[09:46:11] yorickpeterse: As in the input not containing crap
[09:46:30] mikecmpbll: yorickpeterse: what input?
[09:47:11] yorickpeterse: whatever you're getting via Mechanize
[09:47:35] mikecmpbll: it's just this page http://www.soccerpunter.com/soccer-statistics/England/Premier-League-2014-2015/match/1704235_Arsenal_FC_vs_West_Bromwich_Albion_FC
[09:48:57] pawnbox: has joined #ruby
[09:48:58] ferhaty: has joined #ruby
[09:50:54] Ox0dea: mikecmpbll: Are you authenticated?
[09:52:33] freezevee: has joined #ruby
[09:52:50] zacstewart: has joined #ruby
[09:56:01] A124_: has joined #ruby
[09:57:39] leafybasil: has joined #ruby
[09:57:45] iateadonut: has left #ruby: ()
[09:58:16] mikecmpbll: ok weird, it works if i change the user agent
[09:58:45] cvtsx: has joined #ruby
[09:58:45] mikecmpbll: ACTION assumes some sort of odd scraping defence and moves on with his life
[09:58:54] AlxAlt: has joined #ruby
[09:59:03] Ox0dea: I couldn't reproduce the NUL stream using your credentials. :/
[09:59:11] Ox0dea: Glad you got it worked out, though. :P
[09:59:36] yfeldblum: has joined #ruby
[09:59:42] Oog: has joined #ruby
[10:00:14] Guest98814: has left #ruby: ()
[10:00:15] mikecmpbll: Ox0dea: ah, strange :/
[10:00:44] stardiviner: has joined #ruby
[10:00:45] ndrei: has joined #ruby
[10:00:47] benlovell: has joined #ruby
[10:02:06] nettoweb: has joined #ruby
[10:02:19] Ox0dea: mikecmpbll: It's definitely the server doing something wonky, though.
[10:02:37] arup_r: has joined #ruby
[10:02:41] Ox0dea: http://www.soccerpunter.com/xmlrpc.php
[10:03:14] Ox0dea: I think it might've been the server "lying" about Content-Length that caused inflation to go awry, but that's only hazarding a guess.
[10:04:08] mikecmpbll: ah, sounds plausible. i spent a while finding a site with all the right info, but unfortunately it's been a nightmare to scrape.
[10:04:20] sdothum: has joined #ruby
[10:04:32] Ox0dea: mikecmpbll: So don't scrape?
[10:04:34] mikecmpbll: the html is abysmal. duplicate ids everywhere, no sensible structure -_-
[10:04:47] Ox0dea: You should monitor the traffic.
[10:05:09] Ox0dea: Look at what your network is actually sending and receiving while you use the site.
[10:05:20] Ox0dea: Then replay and adjust accordingly.
[10:05:58] mikecmpbll: not sure i entirely comprehend. /hides
[10:06:00] niemcu: has joined #ruby
[10:06:03] Ox0dea: No worries, then.
[10:06:18] mikecmpbll: thanks for looking at it :)
[10:06:31] Ox0dea: Sure thing. :)
[10:07:00] zacstewart: has joined #ruby
[10:07:04] Macaveli: has joined #ruby
[10:07:20] slani: can I create empty Hash and define tahat val will be an intiger
[10:07:27] Dzejmskrokan: has joined #ruby
[10:07:33] canton7: what's "that val"?
[10:07:34] slani: and tud h[:val1] += 4
[10:07:54] canton7: I got that bit, but I don't know what the "that" refers to ;)
[10:08:03] Ox0dea: slani: Yes, you can use Hash#default.
[10:08:19] Ox0dea: >> foo = Hash.new(0); foo[:x] += 1; foo
[10:08:20] ruboto: Ox0dea # => {:x=>1} (https://eval.in/413031)
[10:08:50] Ox0dea: >> foo = Hash.new(0); foo.default # clarification
[10:08:50] ruboto: Ox0dea # => 0 (https://eval.in/413032)
[10:08:58] A124: has joined #ruby
[10:09:21] j4cknewt: has joined #ruby
[10:09:23] slani: Ox0dea: thanks
[10:09:26] Ox0dea: Happy to help.
[10:13:18] jonee: has joined #ruby
[10:14:20] bodgix: has joined #ruby
[10:14:33] curses: has joined #ruby
[10:16:59] tubuliferous_: has joined #ruby
[10:18:55] jds: has joined #ruby
[10:20:21] rickmasta: has joined #ruby
[10:21:20] Violentr: has joined #ruby
[10:22:11] serivich: has joined #ruby
[10:22:15] benlovell: has joined #ruby
[10:23:45] WizJin: has joined #ruby
[10:27:58] ferhaty: has joined #ruby
[10:28:19] slackbotgz: has joined #ruby
[10:30:57] pawnbox: has joined #ruby
[10:33:27] mengu: has joined #ruby
[10:33:46] mengu: has joined #ruby
[10:33:53] DoubleMalt: has joined #ruby
[10:34:17] bruno-: has joined #ruby
[10:34:25] stamina: has joined #ruby
[10:35:18] ArchRogem: has joined #ruby
[10:37:10] doerteDev: has joined #ruby
[10:37:11] xelim: has joined #ruby
[10:39:08] banister: has joined #ruby
[10:41:01] jenrzzz: has joined #ruby
[10:41:58] Renich: has joined #ruby
[10:42:09] zacstewart: has joined #ruby
[10:44:25] n1x: has joined #ruby
[10:47:00] Pisuke: has joined #ruby
[10:47:21] serivich: has joined #ruby
[10:47:26] phutchins: has joined #ruby
[10:49:05] halcyone3: has joined #ruby
[10:49:52] f4cl3y: has joined #ruby
[10:50:09] yh: has joined #ruby
[10:50:09] slani: how can I sort hash by value
[10:50:53] omegamike: has joined #ruby
[10:51:20] mikecmpbll: slani: h.sort_by(&:last) is one way.
[10:51:47] mikecmpbll: h.sort_by{ |_, v| v } might be more clear though :)
[10:51:51] adaedra: { a: 2, b: 1 }.sort { |(_, v1), (_, v2)| v1 <=> v2 }.to_h
[10:52:00] adaedra: grmbl, forgot >> again
[10:52:21] adaedra: what, not obfuscated enough, [k- ?
[10:52:33] shevy: mikecmpbll hmm why did you use |_, v| ?
[10:52:47] adaedra: to get only the value
[10:52:51] [k-: ugly code is ugly code
[10:52:52] mikecmpbll: shevy: as opposed to |c| c[1] ?
[10:53:05] shevy: as opposed to picking another name than _
[10:53:06] mikecmpbll: then what adaedra said.
[10:53:13] [k-: _ is unused
[10:53:19] adaedra: shevy: _ = ignore this
[10:53:21] shevy: I use _ a lot!
[10:53:36] jimms: has joined #ruby
[10:53:39] [k-: yeah we don't need the key
[10:54:06] vali: has joined #ruby
[10:54:30] vali: I have an issue with a gem when trying to use it in logstash
[10:54:36] vali: I'll make pastebin..
[10:54:43] adaedra: s/pastebin/gist/
[10:55:29] vali: https://gist.github.com/anonymous/f788fa037791a594d1a0
[10:55:54] vali: it complains about unable to find cassandra_murmur3, which seems to be included in the cassandra-driver
[10:56:01] vali: but for some reason it still fails
[10:56:37] vali: any suggestions are highly appreciated
[10:57:56] izzol: What is in your logstash.conf?
[10:58:21] vali: izzol: using this output -> https://github.com/otokarev/logstash-output-cassandra
[10:58:47] vali: and the default config
[10:59:51] zacstewart: has joined #ruby
[11:00:54] OrbitalKitten: has joined #ruby
[11:01:06] slani: mikecmpbll: thanks
[11:01:32] A124: has joined #ruby
[11:01:55] izzol: vali: I don't see anything such as: cassandra_murmur3 in logstash-output-cassandra.
[11:02:07] vali: I don't see either
[11:02:25] vali: izzol: I see it here -> https://github.com/datastax/ruby-driver/tree/master/ext/cassandra_murmur3
[11:05:24] rodfersou: has joined #ruby
[11:05:31] krz: https://gist.github.com/0e893b6d09299c2829a6 how do i rescue from any JWT::* errors?
[11:05:32] vali: if I search for it I see it in paths like /opt/logstash/vendor/bundle/jruby/1.9/gems/cassandra-driver-2.1.4/lib/cassandra_murmur3
[11:06:28] vali: so could it be that it's not searching into the correct path ?
[11:06:57] devoldmx: has joined #ruby
[11:08:11] [k-: krz: https://github.com/jwt/ruby-jwt/blob/master/lib/jwt.rb
[11:08:49] PlasmaStar: has joined #ruby
[11:09:50] ndrei: has joined #ruby
[11:10:41] [k-: krz: do you get any idea now? :)
[11:11:05] ferhaty: has joined #ruby
[11:11:38] allcentury: has joined #ruby
[11:13:02] chills42: has joined #ruby
[11:13:10] Pumukel: has joined #ruby
[11:13:25] etqqkoiflwhb: has joined #ruby
[11:13:57] s2013: has joined #ruby
[11:14:18] charliesome_: has joined #ruby
[11:15:24] rikkipitt: has joined #ruby
[11:19:04] yardenbar: has joined #ruby
[11:19:17] krz: rescue JWT::DecodeError => e works
[11:20:09] [k-: excellent.
[11:20:27] conor_: has joined #ruby
[11:21:40] bronson: has joined #ruby
[11:22:15] Chau: has joined #ruby
[11:26:08] etqqkoiflwhb: has joined #ruby
[11:26:09] heller_barde: has joined #ruby
[11:26:58] fgo: has joined #ruby
[11:27:52] jenrzzz: has joined #ruby
[11:29:11] ita-ness: has joined #ruby
[11:29:13] RegulationD: has joined #ruby
[11:29:44] [k-: >> ??? == ?o
[11:29:45] ruboto: [k- # => false (https://eval.in/413100)
[11:30:39] dgutierrez1287: has joined #ruby
[11:30:55] [k-: >> ??? == ?x
[11:30:56] ruboto: [k- # => false (https://eval.in/413106)
[11:32:38] rickmasta: has joined #ruby
[11:33:41] ruboto: adaedra # => /tmp/execpad-04561007d267/source-04561007d267:2: syntax error, unexpected '?' ...check link for more (https://eval.in/413111)
[11:34:24] bruno-: has joined #ruby
[11:35:03] govg: has joined #ruby
[11:35:59] [k-: >> [???==?A,???==?E,???==?P,???==?B,???==?N,???==?M,???==?K,???==?O,???==?Y,???==?T,???==?I,???==?Z,??==?X]
[11:36:00] ruboto: [k- # => undefined local variable or method `??' for main:Object (NameError) ...check link for more (https://eval.in/413116)
[11:36:31] [k-: >> [???==?A,???==?E,???==?P,???==?B,???==?N,???==?M,???==?K,???==?O,???==?Y,???==?T,???==?I,???==?Z,???==?X]
[11:36:32] ruboto: [k- # => [false, false, false, false, false, false, false, false, false, false, false, false, false] (https://eval.in/413118)
[11:37:27] A124: has joined #ruby
[11:37:29] [k-: anyone who uses modern technology understands?
[11:37:47] adaedra: unicode chars?
[11:37:52] govg: has joined #ruby
[11:38:25] [k-: i bet you saw ??????
[11:38:29] [k-: cheater!
[11:38:53] adaedra: Your try on ??? == ?x shows characters of different height
[11:39:12] [k-: not on my phone :(
[11:39:19] [k-: stupid Arial
[11:39:29] [k-: why do i use Arial anyway
[11:39:30] Chau: has joined #ruby
[11:39:56] mengu: has joined #ruby
[11:39:56] mengu: has joined #ruby
[11:40:00] adaedra: https://gist.github.com/adaedra/56e026020005f7e6401a
[11:40:28] khebbie: has joined #ruby
[11:41:22] ita-ness: Hello everyone.
[11:41:33] adaedra: greetings, your ita-ness
[11:42:38] [k-: the superior is back!
[11:42:44] [k-: everyone greet!
[11:42:59] [k-: ACTION bows
[11:44:42] suchness: has left #ruby: ()
[11:45:51] jimms: has joined #ruby
[11:47:48] suchness: has joined #ruby
[11:49:37] safeforge: has joined #ruby
[11:52:22] Macaveli: has joined #ruby
[11:53:08] corpsicle: whats the best way to execute a ruby script from within a ruby script?
[11:53:25] OrbitalKitten: has joined #ruby
[11:53:47] tobiasvl: corpsicle: what do you want to do?
[11:54:15] nini1294: has joined #ruby
[11:54:32] corpsicle: basicly just run a ruby script with arguments and capture what it returns
[11:54:41] [k-: `ruby script.rb`?
[11:54:46] msnyon: has joined #ruby
[11:54:49] nini1294: Hey, is anyone using iruby on windows?
[11:54:57] ruboto: Just ask your question, if anyone has or can, they will respond.
[11:55:04] pawnbox: has joined #ruby
[11:55:12] corpsicle: tobiasvl: so require will execute the script right ?
[11:55:31] corpsicle: tobiasvl: is it considered ok coding to use require to execute a script inside another script?
[11:55:41] corpsicle: the script i want to execute deosnt have any methods...
[11:55:53] tmtwd: has joined #ruby
[11:55:57] khebbie: has joined #ruby
[11:55:58] adaedra: corpsicle: you won't get the output nor be able to pass arguments through require, though
[11:56:18] tkuchiki: has joined #ruby
[11:56:20] corpsicle: currently im executing the ruby scrpts from a python script
[11:56:23] adaedra: [k-'s proposition may be better
[11:56:29] Macaveli: has joined #ruby
[11:56:31] corpsicle: im trying to convert the python script into ruby
[11:56:39] prestorium: has joined #ruby
[11:56:41] adaedra: how do you do it in python?
[11:56:56] [k-: &ri Kernel#`, Kernel#system
[11:56:57] `derpy: http://www.rubydoc.info/stdlib/core/Kernel#system-instance_method
[11:57:12] adaedra: drop the comma, [k-
[11:57:17] corpsicle: i was thinking maybe tehre was a more elegant way to do it from ruby =P
[11:57:46] adaedra: [k- ?? `ruby script.rb`?
[11:57:54] shevy: corpsicle you could require it regular, then call the thing from ruby code directly in particular when it is class based
[11:57:59] shevy: require 'foo.rb'; Foo.new
[11:58:02] [k-: http://www.rubydoc.info/stdlib/core/Kernel#%60-instance_method
[11:58:12] [k-: oh the comma again
[11:58:18] corpsicle: shevy: yea that would mean rewriting the other script aswell though ...
[11:58:18] [k-: why is it always the comma
[11:58:22] but3k4: has joined #ruby
[11:58:24] adaedra: [k-: go do a PR to add the comma :p
[11:58:49] shevy: corpsicle yeah, will depend on the quality of the script in question, guess you have to shell out then via system() or `` or *popen
[11:58:59] shevy: I always use classes \o/
[11:59:01] _blizzy_: has joined #ruby
[11:59:06] [k-: but that's me doing the heavy lifting
[11:59:31] corpsicle: yea it would be much neater with a more objectoriented approach for sure
[11:59:52] corpsicle: oh well, its not gonna be WORSE than from python anyway =P
[12:00:29] [k-: `` is inelegant?
[12:00:35] [k-: well excuse me
[12:00:47] [k-: more elegant than you!
[12:00:49] adaedra: But given the requirements...
[12:01:01] adaedra: calm down, [k-
[12:01:38] shevy: `` is nice
[12:01:58] corpsicle: heh, i havent looked at your suggestions yet [k-, having trouble keeping up here
[12:02:02] adaedra: corpsicle: if you don't like ``, you can also use %x[]
[12:02:20] shevy: well result = `ruby foo.rb` should work
[12:02:26] corpsicle: but i was assuming they were about executing a "subprocess" sort of approach
[12:02:29] shevy: if foo.rb exists; and if "ruby" can be found in the PATH
[12:02:45] corpsicle: ill try that right now
[12:02:51] adaedra: it's totally subprocess-based, corpsicle
[12:03:14] adaedra: but it's quick and easy
[12:03:33] corpsicle: but the only "more elegant" solution is to rewrite the other sript to be a class i guess
[12:03:33] adaedra: the proper thing would be to merge both scripts I guess
[12:03:55] Caelum: has joined #ruby
[12:05:09] Caelum: Anyone know a good quick reference for ruby syntax? I can read ruby fairly easily and hack on code a bit, and I know perl and python so it's not too hard, but I haven't read a book yet (I promise I will at some point....)
[12:05:11] tubuliferous_: has joined #ruby
[12:05:27] r_baron: has joined #ruby
[12:06:01] pawnbox: has joined #ruby
[12:06:13] shevy: corpsicle you can probably use `` just fine, remember it will yield to you back its result, which you can capture in a variable, which you can capture. it's nice for lazy code when you don't want to rewrite something (or if someone else wrote the script and you don't feel like investing time to clean up what someone else wrote)
[12:06:48] tvw: has joined #ruby
[12:06:55] OrbitalKitten: has joined #ruby
[12:07:03] corpsicle: shevy: its more the fact that the script is used in more places, if i change it i have to make sure it works everywhere else aswell =P
[12:07:04] _blizzy_: has joined #ruby
[12:07:07] adaedra: Caelum: http://www.zenspider.com/Languages/Ruby/QuickRef.html
[12:07:21] vali: fixed my issue...
[12:07:30] vali: ended up installing the driver in jruby
[12:07:39] Iskarlar: has joined #ruby
[12:07:40] vali: gem bundle ...
[12:07:54] Caelum: adaedra: wonderful thank you
[12:08:05] tuor: hi, i have a Nokogiri::XML object and want to get a string again, but with out all unneed whitespace between xml elements. How can I do it? code: https://gist.github.com/anonymous/18b9182d73421cf9cc2b (reason: want to read from a xml-file)
[12:08:18] adaedra: Caelum: thank zenspider
[12:08:24] zacstewart: has joined #ruby
[12:09:47] corpsicle: gah, converting python scripts to ruby ... every other error i get is because of an ":" too much or an "end" too little =)
[12:10:14] mcgain: has joined #ruby
[12:10:23] sarkyniin: has joined #ruby
[12:11:11] [k-: Nokogiri can read XML
[12:12:20] Shoutsid: has joined #ruby
[12:13:03] yorickpeterse: tuor: you'll have to get all the text nodes and strip them of whitespace
[12:16:02] tuor: [k-, is there a method in Nokogiri to get a sting object with out aditional withspaces?
[12:16:28] dorei: has joined #ruby
[12:16:51] tuor: [k-, I mean I can read from a file into a Nokogiri object but the problem is to get a string from this object (with out aditional withespace).
[12:16:52] benlovell: has joined #ruby
[12:17:16] Shoutsid: has joined #ruby
[12:17:50] d2dchat: has joined #ruby
[12:19:25] surs: has joined #ruby
[12:19:37] surs: has joined #ruby
[12:19:38] LJT: has joined #ruby
[12:20:35] Scripore: has joined #ruby
[12:21:30] tuor: yorickpeterse, I hoped that nokogiri can do it.,.
[12:21:50] sepp2k: has joined #ruby
[12:22:05] millerti: has joined #ruby
[12:23:02] jenrzzz: has joined #ruby
[12:24:10] lannonbr: has joined #ruby
[12:24:28] jbwiv: has joined #ruby
[12:24:38] ChanServ: -b |n|iggers!*@*
[12:25:00] vali: has left #ruby: ("Leaving")
[12:25:06] freedollar: has joined #ruby
[12:25:17] freedollar: has left #ruby: ()
[12:25:26] corpsicle: hmm, is there a thing in ruby like pythons shlex ?
[12:26:00] nateberkopec: has joined #ruby
[12:26:53] yorickpeterse: tuor: there's no way to have Nokogiri do it automatically IIRC
[12:27:04] tuor: yorickpeterse, ah ok. thx.
[12:28:44] Shoutsid: has joined #ruby
[12:29:20] thiagovsk: has joined #ruby
[12:30:11] Shoutsid: has joined #ruby
[12:30:33] [k-: +b n*i*g*g*e*r*!*@*
[12:31:44] Liam`: has joined #ruby
[12:31:53] jbwiv: has joined #ruby
[12:32:14] Shoutsid: has joined #ruby
[12:32:56] rideh: has joined #ruby
[12:33:44] tuor: [k-, what?
[12:34:21] conor_: has joined #ruby
[12:34:38] Shoutsid: has joined #ruby
[12:35:14] [k-: these days, people keep having 'nigger' in their nicks
[12:35:50] sgambino: has joined #ruby
[12:36:24] aredridel: has joined #ruby
[12:36:35] Cust0sLim3n: has joined #ruby
[12:37:28] devoldmx: has joined #ruby
[12:38:31] shevy: only one guy
[12:38:36] shevy: he is very persistent
[12:39:05] omegamike: has joined #ruby
[12:39:36] [k-_: has joined #ruby
[12:41:51] serivich: has joined #ruby
[12:41:57] jimms: has joined #ruby
[12:42:15] sevenseacat: has joined #ruby
[12:42:42] codecop: has joined #ruby
[12:42:46] [k-: adaedra: commas are actually used in urls @.@
[12:42:58] Dzejmskrokan: has joined #ruby
[12:43:20] [k-_: that wouldn't be an issue, right?
[12:43:28] [k-_: for &ri i mean
[12:44:44] tuor: So I don't realy have an idea how to remove whitespaces and linebreaks from my xml file with out removing whitespaces in the strings (<a>string with space</a>). So how can i do it?
[12:44:48] victortyau: has joined #ruby
[12:45:31] centrx: has joined #ruby
[12:45:35] [k-_: regexp cant do it
[12:45:42] [k-_: unless you want _HELL_
[12:45:43] carlosoliveira: has joined #ruby
[12:46:52] Liam`: has joined #ruby
[12:47:07] dblessing: has joined #ruby
[12:47:28] bruno-: has joined #ruby
[12:47:32] tuor: [k-_, ah ok. I'll try.
[12:48:00] [k-_: NO, DONT TRY WITH REGEXP
[12:48:31] chouhoulis: has joined #ruby
[12:48:58] skade: has joined #ruby
[12:49:27] hoov: has joined #ruby
[12:50:27] shevy: he'll try [k-_
[12:50:44] tuor: ah don't^^ sry didn't read well.
[12:50:44] [k-_: NO DONT TRY!
[12:51:00] tuor: I'll not.
[12:51:08] Shoutsid: has joined #ruby
[12:54:01] adaedra: [k-_: well, are there commas in some of Ruby's methods?
[12:54:17] [k-_: that would be illegal
[12:54:27] dstarh: has joined #ruby
[12:54:35] shevy: you could via define_method or?
[12:54:54] adaedra: shevy: you can, but is it done in stdlib?
[12:54:54] tmtwd: has joined #ruby
[12:55:13] shevy: >> define_method('foo,bar') { puts 'ok' }; send 'foo,bar'
[12:55:14] ruboto: shevy # => ok ...check link for more (https://eval.in/413151)
[12:55:18] shevy: if we add a patch then sure
[12:55:32] chouhoulis: has joined #ruby
[12:55:35] shevy: like a conjoint method calling foo() then bar() :)
[12:55:40] adaedra: [k-_: I guess it's ok
[12:56:37] adaedra: shevy: I think you didn't get the question
[12:56:39] c0m0: has joined #ruby
[12:57:09] shevy: I don't see a problem, we only need someone who has commit access to the source :)
[12:58:10] [k-_: https://github.com/adaedra/cinch-rubydoc/pull/4
[12:58:26] shevy: and a method that can be invoked as the unicode snowman
[12:58:29] s00pcan: has joined #ruby
[12:58:51] adaedra: shevy: gem unicode-snowman
[12:58:54] shevy: oh you have it
[12:58:55] shevy: https://github.com/adaedra/unicode-snowman
[12:59:07] [k-_: i'll hit you!
[12:59:37] Guest50: has joined #ruby
[13:00:58] ByronJohnson: has joined #ruby
[13:01:50] ht__: has joined #ruby
[13:02:44] bmurt: has joined #ruby
[13:04:39] Philipp__: has joined #ruby
[13:04:53] freerobby: has joined #ruby
[13:06:38] Liam`: has joined #ruby
[13:08:45] Macaveli: has joined #ruby
[13:08:54] rht: has joined #ruby
[13:10:45] whippythellama: has joined #ruby
[13:12:29] Hounddog: has joined #ruby
[13:12:46] usc911: has joined #ruby
[13:13:07] usc911: hey guys, anyone having issues installing gems on OSX 10.11 (el capitain)?
[13:13:18] adaedra: what issues
[13:13:19] krz: has joined #ruby
[13:13:29] adaedra: ah, yes, rootless
[13:13:32] usc911: issues as in not being able to install
[13:13:46] usc911: thats what it was called!
[13:13:58] adaedra: use --user-install, or, better, use something like chruby or rbenv and manage ruby as user
[13:14:01] [k-_: im on 10.10.4 :(
[13:14:15] adaedra: I'm on 10.10.3 at home, should really update :x
[13:15:34] [k-_: ??? and ?? 1983-2015 Apple Inc.
[13:15:37] nopc0de: has joined #ruby
[13:15:38] [k-_: ah, programmers
[13:15:48] quimrstorres: has joined #ruby
[13:16:36] jbwiv: has joined #ruby
[13:17:43] workmad3: adaedra: same... I keep on looking @ the 10.10.4 upgrade and thinking 'later'
[13:18:03] adaedra: I've only seen it yesterday, tbh
[13:18:26] dwithers: has joined #ruby
[13:18:44] nini1294: has joined #ruby
[13:18:48] JoshL: has joined #ruby
[13:19:07] failshell: has joined #ruby
[13:19:36] segfalt: has joined #ruby
[13:19:55] sethetter: has joined #ruby
[13:20:05] Guest50: has joined #ruby
[13:21:08] malconis: has joined #ruby
[13:21:33] gthank: has left #ruby: ("Textual IRC Client: www.textualapp.com")
[13:23:52] malconis: has joined #ruby
[13:25:40] tkuchiki: has joined #ruby
[13:25:47] iateadonut: has joined #ruby
[13:25:57] senayar: has joined #ruby
[13:25:57] senayar: has joined #ruby
[13:29:43] shevy: git versus svn http://i.stack.imgur.com/6SqPf.png
[13:29:57] ldnunes: has joined #ruby
[13:30:06] adaedra: And mercurial?
[13:30:20] shevy: may it rest in peace
[13:30:33] shevy: I guess some lower % though
[13:30:46] [k-_: haskell programmers use darcs
[13:30:59] shevy: hard to get realistic datasets without using the TIOBE methodology of random guessing :\
[13:31:26] jimms: has joined #ruby
[13:31:37] quimrstorres: has joined #ruby
[13:31:40] shevy: adaedra would be nice to have a supermario brothers game based on the unicode snowman
[13:32:27] jenrzzz: has joined #ruby
[13:32:55] devdazed: has joined #ruby
[13:33:03] khebbie: has joined #ruby
[13:33:53] dwithers: has joined #ruby
[13:34:57] juanpaucar: has joined #ruby
[13:35:12] jonee: has joined #ruby
[13:35:34] Muhannad: has joined #ruby
[13:35:42] shevy: wielding, as weapon, a baguette
[13:35:47] jeremy04: has joined #ruby
[13:36:01] shevy: games are way too much work though
[13:36:22] Shoutsid: has joined #ruby
[13:36:24] droidburgundy: has joined #ruby
[13:37:20] troulouliou_div2: has joined #ruby
[13:40:51] rakm: has joined #ruby
[13:42:56] Liam`: has joined #ruby
[13:43:00] hinbody: has joined #ruby
[13:45:21] paulcsmith___: has joined #ruby
[13:46:06] havenwood: has joined #ruby
[13:46:14] corpsicle: does SCRIPT_DIR mean anything special in ruby ?
[13:46:16] joonty: has joined #ruby
[13:46:24] jerius: has joined #ruby
[13:46:42] A124: has joined #ruby
[13:47:07] [k-_: >> SCRIPT_DIR
[13:47:08] ruboto: [k-_ # => uninitialized constant SCRIPT_DIR (NameError) ...check link for more (https://eval.in/413173)
[13:47:40] hinbody: has joined #ruby
[13:48:08] Ropeney: has joined #ruby
[13:48:58] fgo: has joined #ruby
[13:49:09] bluOxigen: has joined #ruby
[13:49:53] bigbadbear: has joined #ruby
[13:50:28] duggiefresh: has joined #ruby
[13:51:23] Scripore: has joined #ruby
[13:52:55] jenrzzz: has joined #ruby
[13:52:57] failshell: has joined #ruby
[13:53:21] tubuliferous_: has joined #ruby
[13:53:29] pawnbox: has joined #ruby
[13:53:51] lalalaaa: has joined #ruby
[13:54:33] djbkd: has joined #ruby
[13:54:45] lalalaaa: Hi! How come gsub("^/", "").gsub("/", "_") doesn't change "/test/lala" to "test_lala"? I'm getting "_test_lala"..
[13:54:54] yqt: has joined #ruby
[13:55:08] r_baron: has joined #ruby
[13:55:08] r_baron: has joined #ruby
[13:55:31] [k-_: that is because the first / is changed to _
[13:55:43] [k-_: the one before "test"
[13:56:02] centrx: lalalaaa, maybe because "^/" is not a regex?
[13:56:21] rbennacer: has joined #ruby
[13:56:41] apeiros: "^/" looks for literally a caret followed by slash
[13:56:48] lalalaaa: i see i see
[13:56:58] A124: has joined #ruby
[13:56:59] apeiros: %r{^/} or /^\// if you want "/" at beginning of line
[13:57:00] casadei_: has joined #ruby
[13:57:00] corpsicle: deosnt it look for a slash at the beginning of the string?
[13:57:04] centrx: carrot and stick
[13:57:18] banister: has joined #ruby
[13:57:22] apeiros: lalalaaa: also note that you probably should get into the habit of using \A, not ^
[13:57:26] allcentury: has joined #ruby
[13:57:32] apeiros: ^ is start of *line*, \A is start of string.
[13:57:33] adaedra: better \A than ^, no?
[13:58:03] danzilio: has joined #ruby
[13:58:50] denver: has joined #ruby
[13:59:01] j_mcnally: has joined #ruby
[13:59:16] lalalaaa: indeed much better
[13:59:17] danzilio: has joined #ruby
[13:59:31] umgrosscol: has joined #ruby
[13:59:41] MIGGERS: has joined #ruby
[13:59:50] lalalaaa: awesome! many thanks apeiros, rest of y'all
[13:59:54] adaedra: la la laaa ???
[14:00:06] tmtwd: has joined #ruby
[14:00:16] lalalaaa: adaedra: wow such a beautiful voice :P
[14:00:32] [k-_: gah, he's back
[14:00:33] danzilio: has joined #ruby
[14:00:45] RegulationD: has joined #ruby
[14:00:51] adaedra: Prepare for trouble
[14:00:58] tuor: I have a solution: the xml2 programm can do it. So I have a string and want run xml2 (from my ruby script) and give my string as input. How can I run an other programm in a ruby script?
[14:01:12] halcyone3: has joined #ruby
[14:01:16] adaedra: There's plenty of solutions
[14:01:38] adaedra: You know there are ruby xml libraries, though?
[14:01:53] [k-_: &ri Kernel#`, Kernel#system
[14:01:53] `derpy: http://www.rubydoc.info/stdlib/core/Kernel#%60-instance_method, http://www.rubydoc.info/stdlib/core/Kernel#system-instance_method
[14:01:59] tuor: adaedra, ah no.
[14:02:03] tuor: [k-_, thx.
[14:02:07] adaedra: tuor: ask yorickpeterse :)
[14:02:10] [k-_: tuor, there are!
[14:02:11] Iskarlar: has joined #ruby
[14:03:11] tuor: ok. yorickpeterse I can do what I want ich bash: # printf "$string"|xml2|2xml
[14:03:25] d2dchat: has joined #ruby
[14:03:42] tuor: I basicly just want to do the same with a sting in my ruby. But no idea which library would help me.
[14:03:42] adaedra: tuor: https://github.com/YorickPeterse/oga
[14:03:47] [k-_: tuor, what is the problem you want to solve
[14:04:12] tuor: [k-_, still the same. remove all unneed space and linebreak.
[14:04:22] govg: has joined #ruby
[14:04:31] [k-_: why do you want to do that?
[14:05:33] ryanpc: has joined #ruby
[14:06:40] tuor: [k-_, I'll explain the hole thing: I export a monitoring template and write it to a file. In the file it has to be readable (and easy to see diffs). Then I need to import it again, but the api don't accept my string if there are linebreaks...
[14:07:14] tuor: (I don't know but I think the spaces are not ok to.)
[14:08:30] yorickpeterse: MIGGERS: you can go now, nobody cares
[14:08:32] havenwood: !mute MIGGERS
[14:08:33] ruboto: +q MIGGERS!*@*
[14:08:33] ruboto: -o ruboto
[14:08:44] AnoHito_: has joined #ruby
[14:08:59] [k-_: tuor: not allowing spaces is ridiculous
[14:09:00] Dzejmskr_: has joined #ruby
[14:09:20] apeiros: oh, our ever fascinated 3y old is back
[14:09:25] apeiros: thanks havenwood
[14:09:45] tuor: I just tryed to import the file (after pretty printing with REXML) and it didn't work.
[14:09:56] relix: has joined #ruby
[14:09:58] benlovell: has joined #ruby
[14:10:18] prefixed: has joined #ruby
[14:10:25] [k-_: can you give us an excerpt of your file
[14:10:41] cndiv: has joined #ruby
[14:10:45] tuor: Importing the file without pretty printing it first works.
[14:10:50] yorickpeterse: tuor: in Oga you could do something like this: `some_element.xpath('descendant::text()').map { |node| node.inner_text.strip }.inject(:+)`
[14:10:58] Nilium: This is reminding me of someone asking how to get Go's XML library to use self-closing tags in arbitrary cases because a particular XML parser on the receiving end of some data didn't understand certain tags unless they were self-closing..
[14:11:03] yorickpeterse: That gives you all the text of a node (recursively) with leading/trailing whitespace removed
[14:11:35] tuor: yorickpeterse, oh nice. Ok. I'll try.
[14:11:51] yorickpeterse: alternatively you can do `text = ''; some_element.each_node { |node| text << node.inner_text if node.is_a?(Oga::XML::Text) }`
[14:12:05] cndiv: Hi all, brand new person here, and the documentation on this confuses me. Can someone teach me what the code is to create a .txt file (if it doesn't already exist) and add text to it? I'm making a simple app that makes a .txt with today's date, and takes entries.
[14:12:10] yorickpeterse: which is probably a tad faster
[14:12:28] cndiv: There's IO and Print and Open, and I'm confused on which or mulitple do I need.
[14:12:29] apeiros: cndiv: File.write("path/to/file.txt", "content")
[14:12:31] yorickpeterse: &ri File#write
[14:12:31] `derpy: No results
[14:12:32] [k-_: mutability is bad!
[14:12:39] AnoHito: has joined #ruby
[14:12:43] adaedra: cndiv: you need File module
[14:12:44] [k-_: &ri File.write
[14:12:44] `derpy: No results
[14:12:48] adaedra: yorickpeterse: inheritance is broken
[14:12:50] centrx: &ri File::write
[14:12:50] `derpy: No results
[14:12:51] apeiros: cndiv: and append: File.open("path/to/file.txt") do |fh| fh.puts "additional content" end
[14:12:51] adaedra: &ri IO#write
[14:12:52] `derpy: http://www.rubydoc.info/stdlib/core/IO#write-instance_method
[14:13:04] centrx: we did that well
[14:13:10] [k-_: but that's an instance method!
[14:13:15] yorickpeterse: cndiv: tl;dr: File.open('path/to/file', 'mode') { |handle| handle.write('....') }
[14:13:17] apeiros: cndiv: whooops, correction - append: File.open("path/to/file.txt", "a") do |fh| fh.puts "additional content" end
[14:13:35] cndiv: adeponte: You mean require File? Super new, aplogies.
[14:13:52] adaedra: cndiv: File is in core, no need to require
[14:13:58] adaedra: it's the module here:
[14:14:01] `derpy: No results
[14:14:04] `derpy: http://www.rubydoc.info/stdlib/core/File
[14:14:16] cndiv: rubydoc.info is great, that's new to me too.
[14:14:19] pawnbox: has joined #ruby
[14:14:24] cndiv: Thank you all, I'll give that a shot.
[14:14:48] tuor: [k-_, file: https://gist.github.com/anonymous/dc4e5c38c1353dfe758c
[14:14:55] RobertBirnie: has joined #ruby
[14:15:34] [k-_: you have spaces in <template>Template OS Linux</template>
[14:15:44] [k-_: if you strip spaces, its gonna go WRONG!
[14:16:23] tuor: [k-_, yes. Only spaces between the elements not in the elements strings.
[14:16:41] hahuang61: has joined #ruby
[14:17:01] [k-_: i dont think space would be an issue though
[14:17:12] [k-_: i dont see any chunks of text
[14:17:31] cndiv: Another question, are you all saying that the create and append are different bits of code? IE, I'll have to write something to handle that, as well?
[14:17:37] cndiv: I'm like a week in here, obviously.
[14:17:57] adaedra: We all began one day
[14:18:12] adaedra: ruby's open is based on C fopen
[14:18:14] cndiv: And soon enough I'll be great and help others.
[14:18:20] alotofnoodles: has joined #ruby
[14:18:43] adaedra: you have the flag argument which determine what you will do with the file (read, write) and what to do if it exists or not (append, create, fail...)
[14:18:52] [k-_: <tuor> Importing the file without pretty printing it first works.
[14:19:01] [k-_: why dont you just give that then :o
[14:19:08] tuor: [k-_, yes.
[14:19:17] [k-_: give it to the api!
[14:19:26] blue_deref: has joined #ruby
[14:19:48] tuor: And all done. I just tryed pretty printing with Nokogiri and then I can import when I pretty print with REXML it can't.
[14:19:56] LJT: has joined #ruby
[14:20:11] tuor: OK thx all for help! Man this was a waste of time^^
[14:20:13] adaedra: cndiv: description of open flags: http://ruby-doc.org/core-2.2.2/IO.html#method-c-new
[14:20:16] [k-_: yes it was
[14:20:46] adaedra: rubydoc.info has a :nodoc: for IO#new :x
[14:20:55] jenrzzz: has joined #ruby
[14:21:02] Kalov: has joined #ruby
[14:21:42] Scripore: has joined #ruby
[14:21:48] adaedra: but once the file is open, writing is the same
[14:22:19] tkuchiki: has joined #ruby
[14:22:43] govg: has joined #ruby
[14:22:54] saltsa: has joined #ruby
[14:23:46] dr3w: has joined #ruby
[14:24:03] poguez_: has joined #ruby
[14:24:06] nini1294: has joined #ruby
[14:24:28] jbw: has joined #ruby
[14:24:44] bdnelson: has joined #ruby
[14:25:40] tjohnson: has joined #ruby
[14:26:10] decoponio: has joined #ruby
[14:26:45] s2013: has joined #ruby
[14:27:25] khebbie: has joined #ruby
[14:27:52] f4cl3y_: has joined #ruby
[14:27:52] f4cl3y_: has joined #ruby
[14:28:09] user1138: has joined #ruby
[14:28:55] countryHick: has joined #ruby
[14:29:00] pawnbox: has joined #ruby
[14:29:12] chouhoulis: has joined #ruby
[14:29:38] lalalaaa: sorry last one -- shouldn't gsub(/[\/-]/, "_") turn say `la/la-la` into `la_la_la`?
[14:29:54] dorei: lacrosse: let's give it a try
[14:30:08] dorei: >> 'la/la-la'.gsub(/[\/-]/, "_")
[14:30:09] ruboto: dorei # => "la_la_la" (https://eval.in/413201)
[14:30:18] lalalaaa: im getting `la_la-la`
[14:30:33] adaedra: are you sure you did not forget the g?
[14:30:53] adaedra: or that the - is a -? because - is, but not ???
[14:30:57] dopie: has joined #ruby
[14:30:58] lalalaaa: oh no! sorry guys and gals.. forgot to do a hard reload in chrome :D
[14:31:19] hj2007: has joined #ruby
[14:31:26] lalalaaa: all is good, thank y'all once again
[14:34:27] hj2007: how do I run a rake task which has a rakefile entry as "task :abc, :xyz do |m, n|"? if I do: rake abc[def], I get an error.
[14:34:45] dimasg: has joined #ruby
[14:34:47] hectorsq: has joined #ruby
[14:35:25] tkrajcar: has left #ruby: ()
[14:35:36] chills42: has joined #ruby
[14:36:52] khebbie: has joined #ruby
[14:37:28] devoldmx_: has joined #ruby
[14:39:40] kies^: has joined #ruby
[14:39:55] gamename: has joined #ruby
[14:40:24] dr3w: has joined #ruby
[14:40:46] maloik: well what's the error?
[14:40:55] Vile`: has joined #ruby
[14:41:06] ruboto: We can't help you without your code, please post it to https://gist.github.com
[14:41:24] hj2007: maloil: no matches found: abc[def]
[14:41:44] adaedra: try escaping [
[14:41:47] allcentury: I have a question, I have two different singleton classes that inherit from a base class. Should I also make that base class a singleton? I'm simply trying to share behavior/methods at this point.
[14:42:25] canton7: allcentury, do you want there to be a single instance of the base class throughout your entire application (in addition to the two single instances of its two children)?
[14:42:31] hj2007: adaedra: that was it, thanks!
[14:43:50] allcentury: canton7: Right, that's the question I should be asking. I think the answer is no, it doesn't matter if that base class is instianted more than once. In my instance though, it could only get instantiated twice or in other words, it can only get instantiated the same amount of classes that it is the parent of - right?
[14:44:15] canton7: allcentury, is anyone supposed to instantiate the base class directly?
[14:44:50] canton7: therefore noone can be supposed to access the base class directly, therefore having it singleton makes no sense
[14:45:09] allcentury: lovely, thank you for the rubber-ducking canton7
[14:45:43] lordkryss: has joined #ruby
[14:45:49] canton7: (a simpler question would have been 'will anyone ever type BaseClass.instance?')
[14:48:53] jgpawletko: has joined #ruby
[14:49:18] strixd: has joined #ruby
[14:49:39] chipotles: has joined #ruby
[14:49:57] RegulationD: has joined #ruby
[14:50:13] strixd: has joined #ruby
[14:50:18] rbennacer: has joined #ruby
[14:50:55] mhib: has joined #ruby
[14:51:07] strixd: has joined #ruby
[14:51:30] deepu: has joined #ruby
[14:51:47] strixd: has joined #ruby
[14:52:14] jokester: has joined #ruby
[14:52:20] gambl0re: has joined #ruby
[14:52:32] strixd: has joined #ruby
[14:53:00] Guest50: has joined #ruby
[14:53:11] wpp: has joined #ruby
[14:53:27] strixd: has joined #ruby
[14:53:28] cndiv: apeiros: Another question from earlier. Your code is right, I think, but it doesn't *create* the file first, I don't think? I'm looking to create a file, and if it already exists, add to it.
[14:53:29] mengu: has joined #ruby
[14:53:29] mengu: has joined #ruby
[14:53:32] fgo: has joined #ruby
[14:53:51] adaedra: cndiv: look at open flags :)
[14:54:13] dr3w: has joined #ruby
[14:54:35] momomomomo: has joined #ruby
[14:54:40] adaedra: I think you want the "a" flag
[14:55:21] yh: has joined #ruby
[14:55:28] cndiv: adaedra: flags are what goes in ( ) after the method, right?
[14:55:40] cndiv: adaedra: and it has that, the error just says that file doesn't exist yet
[14:55:41] s2013: has joined #ruby
[14:55:43] nish1294: has joined #ruby
[14:55:43] adaedra: cndiv: how do you open your file for writing?
[14:55:53] rippa: has joined #ruby
[14:56:18] cndiv: adaedra: File.open("/thepahto/code/#{todays_date}", "a") do |fh| fh.puts "#{entry}" end
[14:56:33] greenarrow: has joined #ruby
[14:56:34] quimrstorres: has joined #ruby
[14:56:40] cndiv: those two varables assign a date and what I enter in. Happy to show this in a pastebin
[14:56:50] adaedra: And the error you get is?
[14:57:06] cndiv: stamper.rb:24:in `initialize': No such file or directory
[14:57:14] cndiv: stamper is the name of the thing I'm writing.
[14:57:21] adaedra: does the /thepatho/code/ directory exists?
[14:57:33] cndiv: yep, for sure, that's where the .rb file is
[14:57:43] adaedra: be careful that this is an absolute path (so from /), not relative
[14:57:44] cndiv: used pwd to make sure I'm doing it 100% right
[14:57:50] ruby-lang343: has joined #ruby
[14:57:59] chipotles: has joined #ruby
[14:58:08] cndiv: adaedra: I'm on a mac and it goes /Users/cndiv/MEGA/code/stamper
[14:58:15] cndiv: does it need to start with volumes, etc?
[14:58:20] dopamean_: has joined #ruby
[14:58:46] adaedra: what does `pwd` outputs?
[14:59:19] cndiv: sorry it outputs "/Users/cndiv/MEGA/code/stamper"
[14:59:29] adaedra: so it's not /thepatho/code/
[14:59:43] cndiv: adaedra: Sorry, I was protecting something for no reason. it's the one I just put
[15:00:27] paulcsmith___: has joined #ruby
[15:00:28] tkuchiki: has joined #ruby
[15:00:32] cndiv: full pastebin: http://pastebin.com/KDjFABLr
[15:00:33] ruboto: cndiv, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/1040a8065187b000e519
[15:00:33] ruboto: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[15:00:36] adaedra: okay, give accurate information, it's easier to see what happens :)
[15:01:02] cndiv: that's a nice robot.
[15:01:09] ruboto: nomnomnomnom
[15:01:17] j_mcnally: has joined #ruby
[15:01:51] adaedra: you can't have / in file names
[15:01:55] greenarrow: is this the 'official' ruby channel
[15:01:57] greenarrow: or is it ruby-lang
[15:02:03] cndiv: adaedra: ohhhhh that makes total sense.
[15:02:06] adaedra: greenarrow: #ruby-lang is no more
[15:02:29] cndiv: adaedra: so it'll probably work when I fix that. I wouldn't have guessed that without a hint.
[15:02:36] adaedra: cndiv: if you're trying to sort by folders, you have to create them first. File.open can create files, but not above.
[15:02:54] adaedra: greenarrow: merged with this #ruby
[15:03:12] cndiv: adaedra: You mean there has to be a / at the end, meaning that directory? stamper/ ?
[15:03:14] fullofcaffeine: has joined #ruby
[15:03:39] adaedra: cndiv: no, I mean that for File.open() to work, the directory containing the file you want to create has to exists.
[15:04:05] cndiv: oh, it does, it's called stamper, and contains the program named stamper.rb
[15:04:33] adaedra: but in your sample, you go a bit more down, since you use / in your file name, so going in folders
[15:04:44] adaedra: use iso-8601, and this problem should be no more ;)
[15:05:14] cndiv: adaedra: Yep, that'll do it too. I should have seen that. This is why pairing is good, isn't it.
[15:05:38] pauly_oc: has joined #ruby
[15:05:51] cndiv: ok, so that, plus change the name away from / to - ...
[15:05:51] adaedra: well, it was not the easiest error to find
[15:06:27] jonee: has joined #ruby
[15:06:35] yh: has joined #ruby
[15:07:49] cndiv: adaedra: It works! Yayyy
[15:07:52] cndiv: Thank you so much.
[15:07:57] cndiv: I can go from there for now
[15:08:08] droidburgundy: has joined #ruby
[15:08:19] cndiv: big deal for me, thank you. It's a thing to keep health records, and physical paper mentally freaks me out.
[15:08:35] cndiv: health issues, and now I can keep better records that it works.
[15:09:46] f4cl3y__: has joined #ruby
[15:13:59] renanoronfle: has joined #ruby
[15:14:15] lapide_viridi: has joined #ruby
[15:14:34] f3ttX]: has joined #ruby
[15:14:55] safeforge: has joined #ruby
[15:14:58] slawrence00: has joined #ruby
[15:16:10] shevy: ruby for happiness \o/
[15:16:56] allcentury: has joined #ruby
[15:17:05] Scroff: has joined #ruby
[15:18:07] dgutierrez1287: has joined #ruby
[15:18:57] bradland: any recommendations for an amazon s3 gem that provides a filesystem like interface?
[15:19:02] jenrzzz: has joined #ruby
[15:19:37] cball: has joined #ruby
[15:19:38] rbennacer: has joined #ruby
[15:20:14] h4ckurate: has joined #ruby
[15:20:33] quimrstorres: has joined #ruby
[15:21:42] lannonbr: has joined #ruby
[15:21:56] jbw: has joined #ruby
[15:22:07] benjwadams: has joined #ruby
[15:22:29] psye: has joined #ruby
[15:22:40] rehat_: has joined #ruby
[15:22:43] benjwadams: what happens when two files are opened at nearly the same time with File.write "w+" mode?
[15:23:24] apeiros: benjwadams: I assume you left out "with the same path"?
[15:23:34] psye: has joined #ruby
[15:24:47] adaedra: On Linux, you get two valid handles you can write in. Can be a mess with concurrent writes.
[15:24:50] benjwadams: I didn't write the code, but I'm getting malformed XML that has one start element and two end elements and I suspect it's because two processes are attempting to write to the same file
[15:24:57] apeiros: they'll both have the same file open then. and they'll interfere with each other. the cursor position will remain, but the content can get mixed.
[15:24:58] adaedra: I think Windows would forbid you the second open.
[15:25:17] benjwadams: yeah, that's what I thought
[15:25:18] Iskarlar: has joined #ruby
[15:25:21] bradland: benjwadams: that is often called interleaved writes
[15:25:25] adaedra: A solution would be to lock the file, I think.
[15:25:30] bradland: it's a common problem with logging too
[15:25:34] safeforge: has joined #ruby
[15:25:37] benjwadams: so basically the ending content of the xml is staggered near the end and repeats, causing malformed xml
[15:26:07] bradland: if you need atomic writes, you probably need to put something in front of the file writer that handles the atomic units to be written
[15:26:08] adaedra: The best solution would be to not have shared write access, though.
[15:26:12] momomomomo_: has joined #ruby
[15:26:21] benjwadams: is there any way to do that via locks, etc
[15:26:30] adaedra: https://twitter.com/teozaurus/status/518071391959388160
[15:26:39] niemcu: has joined #ruby
[15:26:50] benjwadams: again, i didn't write the code :S it's delayed job workers and someone started several of the same type
[15:27:02] bradland: if you try to write to a locked file, you'll get exceptions, i think
[15:27:22] govg: has joined #ruby
[15:27:59] preller: has joined #ruby
[15:28:13] bradland: so you want to prevent shared write access
[15:28:18] bradland: yes, locking would do the trick
[15:28:32] benjwadams: how would i achieve that in ruby?
[15:28:33] kies^: has joined #ruby
[15:29:08] adaedra: &ri File#flock
[15:29:09] `derpy: http://www.rubydoc.info/stdlib/core/File#flock-instance_method
[15:29:27] MatthewsFace: has joined #ruby
[15:29:30] AlexRussia: has joined #ruby
[15:29:50] adaedra: Closest possible from writes
[15:30:08] govg: has joined #ruby
[15:30:10] adaedra: Seems like it blocks until it get a lock in default behavior
[15:30:49] gambl0re: has joined #ruby
[15:30:53] Scrofff: has joined #ruby
[15:31:17] bradland: benjwadams: this article is pretty good http://douglasfshearer.com/2011/02/13/threadsafe-file-consistency-in-ruby.html
[15:31:24] mary5030: has joined #ruby
[15:31:29] bradland: it's not just for threaded code
[15:31:47] gxm: has joined #ruby
[15:32:54] Coldblackice: has joined #ruby
[15:34:16] cschneid_: has joined #ruby
[15:34:59] jenrzzz: has joined #ruby
[15:35:06] Scroff: has joined #ruby
[15:36:11] luckyme: has joined #ruby
[15:36:48] benlovell: has joined #ruby
[15:37:06] relix: has joined #ruby
[15:37:51] afs: has joined #ruby
[15:37:59] riotjones: has joined #ruby
[15:38:32] symm-: has joined #ruby
[15:38:35] Scrofff: has joined #ruby
[15:39:54] govg: has joined #ruby
[15:40:18] nhhagen: has joined #ruby
[15:41:29] tubuliferous_: has joined #ruby
[15:42:04] yh: has joined #ruby
[15:42:32] niiamon: has joined #ruby
[15:42:59] Scripore: has joined #ruby
[15:43:15] duoi: has joined #ruby
[15:44:31] BTRE: has joined #ruby
[15:44:37] gambl0re: has joined #ruby
[15:44:55] failshell: has joined #ruby
[15:45:10] lapideviridi: has joined #ruby
[15:45:12] _blizzy_: has joined #ruby
[15:47:11] rbennacer: has joined #ruby
[15:47:33] Dzejmskrokan: has joined #ruby
[15:48:21] ascarter: has joined #ruby
[15:50:08] changelog: has joined #ruby
[15:51:13] pawnbox_: has joined #ruby
[15:51:26] gambl0re: has joined #ruby
[15:51:59] msnyon: has joined #ruby
[15:52:56] imperator: has joined #ruby
[15:53:17] _blizzy_: has joined #ruby
[15:53:22] bruno-: has joined #ruby
[15:53:36] jbw: has joined #ruby
[15:54:50] paulcsmith___: has joined #ruby
[15:55:14] michaeldeol: has joined #ruby
[15:55:21] Shoutsid: has joined #ruby
[15:55:37] Shoutsid: has joined #ruby
[15:57:13] khebbie: has joined #ruby
[15:57:27] momomomomo: has joined #ruby
[15:57:38] ferhaty: has joined #ruby
[15:57:47] shoutsid06: has joined #ruby
[15:59:41] jlebrech_: has joined #ruby
[16:00:11] dfockler: has joined #ruby
[16:00:17] jlebrech_: anyone use Threads? I've been using sidekiq but realised all i needed was stuff to be async
[16:00:34] ruboto: Just ask your question, if anyone has or can, they will respond.
[16:00:37] jonee: has joined #ruby
[16:00:47] suchness: jlebrech_: That's king of a scary comment.
[16:01:10] niiamon: has joined #ruby
[16:01:10] jlebrech_: adaedra: sorry
[16:01:13] dfockler: jlebrech_: I use a lib, because it's tough to tell what will be thread safe
[16:01:35] jlebrech_: dfockler: makes sense
[16:01:37] suchness: jlebrech_: To answer your question though, yes people here have used threads.
[16:01:37] moted: has joined #ruby
[16:02:05] baweaver: has joined #ruby
[16:02:44] dfockler: jlebrech_: if you aren't sharing any resources between threads and what you're doing is really simple, then you could probably get away with it
[16:02:52] jlebrech_: kinda want something in a queue but not in a queue, just it to be async in the simplest way.
[16:03:06] govg: has joined #ruby
[16:03:08] changelog: jlebrech_: so you want to do it in the web process?
[16:03:09] jlebrech_: yeah it's just run this method and forget
[16:03:42] changelog: that???s probably a bad idea because if you deploy that progress gets lost and isn???t ???requeued"
[16:03:43] jlebrech_: changelog: yeah, it's just run this method that sends a request to an api
[16:03:52] imperator: have any rexml conversion wrappers already been written?
[16:03:54] mleung: has joined #ruby
[16:03:56] changelog: if you already have sidekiq setup it???s probably best to leave it :-)
[16:04:06] suchness: I agree with changelog
[16:04:06] imperator: i'm starting https://github.com/djberg96/rexml-compat but want to make sure it hasn't already been done
[16:04:35] jlebrech_: is there a simpler way to use sidekiq instead of using a worker class?
[16:04:36] imperator: yorickpeterse, have done anything like that already for oga?
[16:04:38] changelog: sidekiq gives you a ton of cool stuff like requeueing, retries, errors, etc
[16:04:47] benjwadams: hey so question about file locks
[16:04:54] changelog: jlebrech_: you can queue any class type directly
[16:05:11] jlebrech_: changelog: might look into that
[16:05:19] tkuchiki: has joined #ruby
[16:05:53] changelog: jlebrech_: https://github.com/mperham/sidekiq/wiki/Delayed-extensions
[16:06:24] benjwadams: if I'm using File.open { |f| f.flock(File::LOCK_EX); #some other commands... } and then something goes wrong/exception occurs, is the lock released as well?
[16:06:28] changelog: just be mindful about the state thing. better to call delay on a class method where you pass teh arguments in than it is to force it to serialize the whole state into redis.
[16:06:46] changelog: jlebrech_: this is what you need: https://github.com/mperham/sidekiq/wiki/Delayed-extensions#class-methods
[16:06:50] troyready: has joined #ruby
[16:06:57] towski_: has joined #ruby
[16:07:55] jlebrech_: changelog that's cool
[16:08:42] lechuk: has joined #ruby
[16:08:54] quimrstorres: has joined #ruby
[16:08:59] shevy: I like changelogs
[16:09:52] twohlix: yea, they're nice
[16:10:20] imperator: benjwadams, good question; i think you could test it by trying to get another lock on it
[16:10:24] polpak: has joined #ruby
[16:10:47] mdavid613: has joined #ruby
[16:10:52] imperator: use flock(File::LOCK_NB|File::LOCK_EX) and see what it returns after an exception
[16:11:01] imperator: if false, then it still has the lock
[16:11:14] benjwadams: imperator, so i could test by intentionally raising an exception or something and then trying to open
[16:12:16] ramfjord: has joined #ruby
[16:13:23] imperator: i would think it would be released, since the block is only held within the block
[16:13:37] imperator: but if you swallow an exception within the block...not sure
[16:13:50] imperator: my guess (because I'm lazy) is that it would retain the lock
[16:14:05] saddad: has joined #ruby
[16:14:10] imperator: since the *lock is only held within the block
[16:15:45] adaedra: you should keep the locks only for the time of write
[16:16:48] bricker: has joined #ruby
[16:17:56] A124: has joined #ruby
[16:18:06] benjwadams: don't the locks get cleaned up after leaving the block?
[16:18:15] benjwadams: i'm gonna find out i guess
[16:18:31] imperator: yep, should
[16:19:11] RobertBirnie: has joined #ruby
[16:19:18] Itrace: has joined #ruby
[16:19:55] spider-mario: has joined #ruby
[16:20:25] [Butch]: has joined #ruby
[16:21:04] Itrace: Anybody know of an open source Ruby on Rails CMS project? I want something that could rival WordPress. Anybody know of such a project?
[16:21:36] [k-: wordpress has bugs, automatically striked off!
[16:21:46] suchness: iTrace: I wish I could publish the one I have been writing over the last 5 years.
[16:21:51] shevy: iTrace #rubyonrails should be able to help more. I think there are individual projects but probably none have a full rival CMS like to drupal wordpress or joomla
[16:21:56] [k-: does Jekyll count? i dont know
[16:22:00] willywos: has joined #ruby
[16:22:14] [k-: i dont even know what jekyll or cms do!
[16:22:16] suchness: iTrace: But you know how companies like their tech!
[16:22:19] pietr0: has joined #ruby
[16:22:20] dfockler: iTrace: refinery, locomotive
[16:22:42] danzilio: has joined #ruby
[16:22:54] suchness: dfockler: I have heard good things about locomotive
[16:24:48] pdoherty: has joined #ruby
[16:25:01] shevy: [k- things such as site-login, blogging and ... I don't know what else. I am reading this right now https://canned-death.us/drupal/node/8 which apparently is using drupal
[16:25:07] shevy: if only ruby would enter the www world
[16:25:45] benlovell: has joined #ruby
[16:26:22] Itrace: Thanks all. I was thinking about building something from scratch with Active Admin, but I thought I'd check if there was a good base project I could pull from.
[16:26:32] dfockler: iTrace: spina is a in-the-works cms that looks nice
[16:26:51] Itrace: Never heard of spina
[16:27:03] Hanmac: has joined #ruby
[16:27:14] jonee: has joined #ruby
[16:28:07] Itrace: dfockler: Spina does looks nice. Thanks!
[16:28:08] shevy: spinacce!
[16:28:29] freerobby: has joined #ruby
[16:28:39] momomomomo: has joined #ruby
[16:30:42] jhack: has joined #ruby
[16:30:54] benjwadams: imperator: looks like the lock is released when the block exits or an exception happens
[16:31:15] imperator: benjwadams, good to know :)
[16:31:16] mary5030_: has joined #ruby
[16:31:16] darix: iTrace: just to throw something into the mix: jekyll or nanoc are for many sites really enough
[16:31:32] troulouliou_div2: has joined #ruby
[16:31:34] darix: iTrace: and you have less burden on the hosting part
[16:32:34] nettoweb: has joined #ruby
[16:32:40] darix: iTrace: https://pixls.us/ - fully static except for comments comming from discourse
[16:33:32] mary5030: has joined #ruby
[16:33:57] Itrace: darix: nanoc looks interesting.
[16:35:14] michael_mbp: has joined #ruby
[16:35:35] darix: they are both similar
[16:36:48] Dzejmskrokan: has joined #ruby
[16:37:28] devoldmx_: has joined #ruby
[16:37:47] casadei_: has joined #ruby
[16:38:12] paulcsmith___: has joined #ruby
[16:38:32] mary5030: has joined #ruby
[16:39:08] j4cknewt: has joined #ruby
[16:39:53] A124: has joined #ruby
[16:41:00] govg: has joined #ruby
[16:41:13] towski_: has joined #ruby
[16:43:24] mary5030_: has joined #ruby
[16:43:28] Rollabunna: has joined #ruby
[16:43:31] youch: has joined #ruby
[16:43:50] iamjarvo: has joined #ruby
[16:45:06] pengin: has joined #ruby
[16:46:50] tkuchiki: has joined #ruby
[16:46:56] nhhagen: has joined #ruby
[16:48:38] dgutierrez1287: has joined #ruby
[16:48:51] mikecmpbll: has joined #ruby
[16:50:07] A124: has joined #ruby
[16:50:08] dopie: has joined #ruby
[16:50:37] JusticeFries: has joined #ruby
[16:52:44] Trynemjoel: has joined #ruby
[16:53:29] tkuchiki: has joined #ruby
[16:56:15] ddfreyne: (I do not have a highlight for nanoc)
[16:56:35] raz: nanoc is terrible
[16:56:50] amclain: has joined #ruby
[16:56:58] raz: middleman is slightly less terrible
[16:57:08] raz: the landscape of static site generators is pretty sad
[16:57:11] ddfreyne: What makes it terrible?
[16:57:19] safeforge: has joined #ruby
[16:57:28] raz: it's a confused design and a convoluted architecture
[16:57:29] platzhirsch: has joined #ruby
[16:57:42] raz: once you go beyond a few dozen pages you run into performance issues
[16:58:18] raz: like, ruby is slow as a pig to begin with, but nanoc can easily chew *minutes* to generate a bunch of html...
[16:58:37] f4cl3y__: has joined #ruby
[16:58:38] saltsa: has joined #ruby
[16:58:46] ddfreyne: Yeah, I can understand that. nanoc 4 addresses some of those concerns (it gets rid of the confusing identifiers).
[16:59:11] ddfreyne: As for speed??? I???ve managed to generate thousands of pages in a minute. It depends on the filters you use, most of the time.
[16:59:11] raz: ACTION currently reaches for harp when making static sites
[16:59:33] raz: yea the problem is that its rather easy to hit a combination that grinds nanoc to effectively a stop
[16:59:41] raz: and then it's very hard to workaround the brain damaged design
[16:59:42] tomphp_: has joined #ruby
[16:59:44] raz: ACTION been there, got the t-shirt
[17:00:01] shlomo: has joined #ruby
[17:00:13] jhack: has joined #ruby
[17:00:18] raz: and the annoying part is that it only happens after you're already pretty invested into it
[17:00:35] raz: it's a trap! ;)
[17:01:08] Musashi007: has joined #ruby
[17:01:48] ddfreyne: raz: disclaimer: I am the author of nanoc. I'm always interested in feedback though :)
[17:01:58] raz: ddfreyne: ouch, sorry lol
[17:02:04] jobewan: has joined #ruby
[17:02:07] raz: well we actually had an exchange about that years ago when nanoc came crashing down on me ;)
[17:02:08] raz: on github
[17:02:19] mhib: has joined #ruby
[17:02:29] raz: i don't remember the exact details.. but to cut you some slack: middleman collapsed in similar ways not very long after ;)
[17:03:08] ddfreyne: A goal I have for nanoc 4 is for it to be not memory-based, so it doesn't have to deal with garbage collection issues. It's the main bottleneck.
[17:03:15] [k-: oh shit buuuuuuuuuuuuuurn
[17:03:19] [k-: sorry bro
[17:03:41] raz: yea, iirc that was part of the issue, it would balloon to OOM at some point
[17:03:55] Overand: has joined #ruby
[17:04:08] ddfreyne: It's surprisingly difficult to build a static site generator that has the flexibility of nanoc while also being fast.
[17:04:13] jsrn: has joined #ruby
[17:04:24] raz: well i dunno really.. imho it tries to do too much
[17:04:31] ddfreyne: (The nanoc 3.x design didn't give me much space to fix things either. But then again, that architecture lasted for 6 years.)
[17:04:32] A124: has joined #ruby
[17:04:40] ddfreyne: raz: What would you remove?
[17:04:50] millerti: has joined #ruby
[17:05:05] raz: its terribly hard to find a site gen that simply compiles from source to destination, minifies the assets on the destination, and leaves it at that
[17:05:30] raz: ddfreyne: well, all the world-building efforts
[17:05:39] atmosx: raz: in what way is middleman terrible?
[17:05:51] raz: atmosx: oh god this is turning into a roundhouse rant... lol
[17:06:23] atmosx: raz: ah k, worry not.
[17:06:29] raz: atmosx: getting it to work (and keeping it working) is the first problem, when less etc, gets involved
[17:06:43] jackjackdripper: has joined #ruby
[17:06:57] atmosx: okay, it's the same kind of problem that have all static website generators currently in existence I guess.
[17:07:01] juanpaucar: has joined #ruby
[17:07:06] raz: and it also has this problematic ambition to maintain an internal image of all interdependencies and what not
[17:07:29] ddfreyne: raz: FYI, in case you're interested in seeing what the recent efforts are about: http://v4.nanoc.ws/doc/nanoc-4-upgrade-guide/
[17:07:52] atmosx: raz: I don't thin it was made for huge websites
[17:08:00] raz: ddfreyne: the rules file, it shouldn't exist :)
[17:08:04] atmosx: but for small corporate websites, front-ends etc, works well IMHO.
[17:08:23] ddfreyne: raz: Keeping track of dependencies is useful for speeding up compiles (avoid recompiling when possible). It's hard to get right, but I find it really useful.
[17:08:31] raz: atmosx: yeh.. i'm a bit of a hardcore user.. it's just annoying when simple things that *should* work suffocate from their own bloat ;)
[17:08:34] MAQ: has joined #ruby
[17:08:45] atmosx: raz: well, there's sinatra.
[17:08:45] ddfreyne: raz: What would you rather have than a rules file?
[17:08:55] raz: ddfreyne: the filesystem has timestamps for that
[17:09:05] raz: ddfreyne: no rules file, most static site gens do without such
[17:09:06] atmosx: You can always write your own website, there are other projects that are less hardcore than sinatra..
[17:09:20] Shoutsid: has joined #ruby
[17:09:27] ddfreyne: raz: Where would you specify how certain pages or assets are processed?
[17:09:48] djbkd: has joined #ruby
[17:09:57] raz: ddfreyne: why would that need to be specified?
[17:10:19] raz: the filename extension goes a pretty long way
[17:10:27] paulcsmith___: has joined #ruby
[17:11:01] ddfreyne: raz: How would you specify which markdown processor to use? Whether or not to minify? Colorize syntax? Run a typography-improving script? ...
[17:12:14] ddfreyne: raz: Mind you, nanoc is designed to be flexible and not make assumptions about what you want to do with the input files. I try to keep it as opinion-free as possible
[17:12:19] raz: ddfreyne: why would i want to run different md processors per file? why would i not want to minify? colorizing syntax and typography improving sounds like javascript to me
[17:12:21] d2dchat: has joined #ruby
[17:12:43] jerius: has joined #ruby
[17:12:54] hj2007: has joined #ruby
[17:12:55] raz: ddfreyne: good software is opinionated :P
[17:13:07] rbennacer: has joined #ruby
[17:13:19] raz: check out harp http://harpjs.com/docs/development/rules
[17:13:29] raz: imho that one is pretty close to getting it right
[17:13:33] raz: sadly it's javascript :x
[17:13:42] [k-: the ruby of the cms world
[17:14:12] ddfreyne: raz: I like it when software gives you possibilities, and you fill in the blanks. Having to resort to JS for colorizing syntax and improving typography can be a good thing, but I don't want to be limited to that.
[17:14:21] TomyLobo: has joined #ruby
[17:14:22] skade: has joined #ruby
[17:15:02] raz: ddfreyne: well, i'd argue on the other side 99% of your users would prefer not to learn an awkward config DSL only to render an index.html
[17:15:05] dopamean_: has joined #ruby
[17:15:31] raz: i recall it had a lot of gotchas and counter-intuitive semantics even for supposedly trivial cases
[17:15:57] raz: getting stuff like that right is very hard, so it's best avoided until it's absolutely inevitable, imho
[17:16:35] jsrn: has joined #ruby
[17:17:10] A124: has joined #ruby
[17:17:31] jackjackdripper: has joined #ruby
[17:17:32] atmosx: raz have you tried creatinga website the way you want with something like Scorched or Sinatra?
[17:17:50] raz: atmosx: yes, i'm an old fart, i've used pretty much everything you've ever heard of ;)
[17:18:09] raz: all the way from java struts and perl mojo
[17:18:09] iamjarvo: has joined #ruby
[17:18:16] dfockler: has joined #ruby
[17:18:25] atmosx: raz: what about rubyonrails?
[17:18:43] ddfreyne: raz: For simple sites, I generally don't even recommend using nanoc myself--it's designed to be flexible, and it is overkill for simple sites.
[17:18:43] raz: heh yes, that's what i use most for sites that need logic
[17:19:25] ascarter: has joined #ruby
[17:19:25] raz: ddfreyne: yea well, its a philosophical argument... i just really don't see nanoc's niche when harp can be used ;)
[17:19:36] failshell: has joined #ruby
[17:19:43] ddfreyne: Even though it???s written in JavaScript? ;)
[17:19:51] raz: but it's not like there's a law that there can be only one framework for x
[17:20:10] djbkd: has joined #ruby
[17:20:31] raz: ddfreyne: well, javascript is the pest.. but it has going for it that a render pass takes 0.1s, whereas with nanoc the same render pass would be somewhere around 15s
[17:20:57] towski_: I am getting a segmentation fault with 2.0.0
[17:21:01] havenwood: raz: I can't speak highly enough of the Roda framework toolkit: http://roda.jeremyevans.net
[17:21:11] towski_: but I am not seeing any core dump
[17:21:16] ddfreyne: raz: If nanoc is that slow, I'd look at the filters you used (that's where the vast majority of the slowness lies)
[17:21:17] towski_: Segmentation fault: 11
[17:21:17] havenwood: towski_: Use the latest patch release of 2.0, or better yet 2.1 or 2.2.
[17:21:24] raz: havenwood: looks like sinatra, at a glance? :)
[17:21:29] havenwood: towski_: 2.0 is in maintenance mode.
[17:21:59] towski_: how do I get a core dump tho?
[17:22:00] bruno-: has joined #ruby
[17:22:21] raz: ddfreyne: no matter how much you tweak it, ruby just doesn't go as fast as javascript, not even remotely the same ballpark ;)
[17:22:52] towski_: another big complaint about ruby is that it has classes
[17:22:57] towski_: classes are so gay
[17:23:09] raz: ACTION likes classes
[17:23:11] [k-: haskell!
[17:23:33] Jackneill: has joined #ruby
[17:23:47] bronson: has joined #ruby
[17:23:52] havenwood: towski_: that's a terrible way to express disapproval of classes :(
[17:24:04] raz: maybe it wasn't even disapproval?
[17:24:17] raz: who knows what side of the fence towski_ lives
[17:24:51] ddfreyne: towski_: Please don???t use ???gay??? as an insult.
[17:25:26] graydot: has joined #ruby
[17:26:07] rbennacer: has joined #ruby
[17:26:27] havenwood: raz: It's easy to port a Sinatra app to Roda. The plugin system is powerful and I love how Roda keeps things clean.
[17:26:37] skade: has joined #ruby
[17:27:08] raz: havenwood: i've lost interest in reinventing my own rails after spending too much time with padrino ;)
[17:27:24] havenwood: raz: Its core is just a routing tree. You can go through each plugin and cherry pick them to build what you need.
[17:27:27] raz: sinatra is good enough for tiny api shims and such that don't need big performance or features
[17:27:32] havenwood: raz: It's a very different beast than Padrino.
[17:27:44] raz: anything beyond that you'd better reach for something either more performant, or more fully featured
[17:28:00] chouhoulis: has joined #ruby
[17:28:05] havenwood: raz: I use Roda for APIs indeed but the author, Jeremy Evans, uses it for large webapps.
[17:28:16] raz: havenwood: if you're at the point of cherry picking, and want to do it in ruby, just use rails and save yourself the hassle to port it later :)
[17:29:07] rakm_: has joined #ruby
[17:29:25] raz: keeping rails patched up is enough work of its down.. doing it on a homebrew conglomerate of gems is unsustainable
[17:29:48] prettiestPony11: has joined #ruby
[17:29:52] havenwood: raz: I'd rather have a carefully crafted Roda app backed by Sequel than trying to make Rails work for whatever purpose it wasn't really created for (unless you're making a Basecamp clone).
[17:30:00] tubuliferous_: has joined #ruby
[17:30:32] atomical: has joined #ruby
[17:30:51] raz: havenwood: i think everyone goes through that phase. ;)
[17:31:49] mary5030: has joined #ruby
[17:32:18] nish1294: has joined #ruby
[17:32:29] havenwood: raz: So you're in the monolith stage?
[17:32:34] skade: has joined #ruby
[17:32:52] havenwood: raz: Couple everything?
[17:32:57] graydot: has joined #ruby
[17:33:01] raz: no, quite the opposite
[17:33:04] vickleton: has joined #ruby
[17:33:10] havenwood: raz: With Rails? The opposite?
[17:33:18] havenwood: raz: Do tell...
[17:33:21] lele: has joined #ruby
[17:33:40] raz: well, as terrible as it is, rails is the best frontend framework you can use atm
[17:33:51] raz: its relatively mature (been hard enough), easy to hire for
[17:34:12] towski_: sorry for dropping the g bomb. apparently if you do a let(:variable){ variable } in rspec it seg faults
[17:34:21] raz: arguably django and a few others are also up there
[17:34:36] havenwood: towski_: 2.0 is in maintenance mode but the early releases were prone to segfault.
[17:34:43] alphaatom: has joined #ruby
[17:34:51] havenwood: towski_: 2.0 doesn't receive bug fixes anymore and will be EoLed in Feb.
[17:35:04] havenwood: towski_: If you can, switch to 2.1 or 2.2 at once.
[17:35:17] havenwood: towski_: At the very least, switch to the latest patch release of 2.0.
[17:35:20] freerobby: has joined #ruby
[17:36:01] havenwood: raz: Lotus and Roda are lovely and are great for real work. Good to have high quality options.
[17:36:03] NeverDie: has joined #ruby
[17:36:10] shadoi: has joined #ruby
[17:36:42] raz: havenwood: yea we're just from different angles, would you launch a company on lotus or ronda? ;)
[17:36:58] havenwood: raz: Yes. Roda*
[17:37:07] pietr0_: has joined #ruby
[17:37:22] raz: heh... oh well
[17:37:40] towski_: last time we upgraded from ruby 2.0 there was a memory issue
[17:37:44] towski_: although I assume that's probably fixed
[17:37:53] towski_: there is just higher priority stuff to do
[17:37:54] havenwood: towski_: 2.2.2 is a very good option.
[17:38:17] havenwood: towski_: Get off 2.0 before you're forced. It's time is coming to an end.
[17:38:30] towski_: that's dramatic
[17:38:37] havenwood: towski_: 2.1.6 or 2.2.2
[17:38:55] scpike: havenwood: I'd love to see an open source "complicated web app" written in one of these microframeworks / as services. Learned a lot about rails from reading the redmine source
[17:39:13] changelog: has joined #ruby
[17:39:46] havenwood: scpike: Aye. Jeremy has mentioned he'd like to make a good large example available.
[17:39:49] DoubleMalt: has joined #ruby
[17:39:53] havenwood: scpike: Here's a small, template example: https://github.com/jeremyevans/roda-sequel-stack#readme
[17:41:00] scpike: havenwood: not scaffolding / example, I mean a big-ish project with a bunch of contributors, to see how it'd feel in a complicated setting
[17:41:07] havenwood: scpike: yeah
[17:41:42] benlovell: has joined #ruby
[17:42:18] havenwood: scpike: I've not personally composed a large app with it but anything Jeremy Evans touches is gold.
[17:42:21] Guest50: has joined #ruby
[17:42:42] skade: has joined #ruby
[17:44:07] havenwood: scpike: I think they do discuss large apps at some point in this discussion: https://devchat.tv/ruby-rogues/210-rr-roda-and-routing-trees-with-jeremy-evans
[17:44:16] mary5030_: has joined #ruby
[17:45:04] tomphp_: has joined #ruby
[17:45:23] scpike: havenwood: cool I'll check it out
[17:46:07] alphaatom: has joined #ruby
[17:47:21] luckyme: has joined #ruby
[17:47:39] Muhannad: has joined #ruby
[17:47:43] user1138: has joined #ruby
[17:49:05] Musashi007_: has joined #ruby
[17:50:16] jhack: is there a frontend dev channel?
[17:50:19] mary5030: has joined #ruby
[17:52:20] kaleido: has joined #ruby
[17:52:20] bodgix: has left #ruby: ()
[17:53:02] havenwood: jhack: There's ##javascript and #css, ah or there is actually a ##frontend.
[17:53:25] graydot: has joined #ruby
[17:54:31] gambl0re: can i pm you?
[17:54:54] speakingcode: has joined #ruby
[17:54:57] havenwood: gambl0re: If you need an OP, otherwise ask in the channel. ;)
[17:54:58] mdavid613: has joined #ruby
[17:55:17] Synthead: has joined #ruby
[17:55:28] havenwood: gambl0re: A staff operator for the channel.
[17:55:40] ramfjord: has joined #ruby
[17:55:52] hahuang65: has joined #ruby
[17:56:01] gambl0re: remember you helped me setting up ruby/rails and all the other stuff
[17:56:07] gambl0re: it was long time ago
[17:56:34] havenwood: gambl0re: If you ask here other folk can maybe give better answers than me, learn from the answers, etc.
[17:56:56] havenwood: gambl0re: Glad to help!
[17:57:03] ne1l: has joined #ruby
[17:57:23] j_mcnally: has joined #ruby
[17:58:50] Guest41819: has joined #ruby
[17:59:45] havenwood: gambl0re: Ruby actually has UnboundMethods but typically a Method is bound to an Object.
[18:00:39] jbw: has joined #ruby
[18:01:35] umop3plsdn: has joined #ruby
[18:02:05] conor_: has joined #ruby
[18:04:26] havenwood: scpike: "Unfortunately, all of my large Roda apps are proprietary... But in general they use multi_route for splitting up the routing tree by the initial segment."
[18:04:47] havenwood: (The multi_route plugin.)
[18:05:41] msnyon: has joined #ruby
[18:05:56] fantazo: has joined #ruby
[18:06:25] havenwood: ^ from the #roda channel
[18:07:55] Scroff: has joined #ruby
[18:07:56] Dzejmskr_: has joined #ruby
[18:09:21] relix: has joined #ruby
[18:09:42] j4cknewt: has joined #ruby
[18:10:22] baroquebobcat: has joined #ruby
[18:12:41] nettoweb: has joined #ruby
[18:12:42] gambl0re: a method is a function in javascript, a hash is a object in javascript
[18:12:49] reset: has joined #ruby
[18:13:01] gambl0re: symbol im not sure what it is in javascript...
[18:13:07] bthesorceror: has joined #ruby
[18:13:24] havenwood: gambl0re: They're all objects in Ruby. :)
[18:13:32] BraddPitt: roda is like Spray routing from what I can tell
[18:14:12] gambl0re: why is it called a method and not a function
[18:14:24] gambl0re: is there any difference between the two for those that know javascript
[18:14:37] gard: has joined #ruby
[18:14:48] BraddPitt: no, gambl0re
[18:15:00] BraddPitt: Except for how javascript treats functions (first class objects) that can be passed around
[18:15:05] BraddPitt: think Procs in ruby
[18:15:07] kirun: has joined #ruby
[18:15:28] niiamon: has joined #ruby
[18:16:44] gambl0re: symbols are mainly used for creating hash names?
[18:16:45] bradland: gambl0re: the difference in terminology has to do with the origins and philosophies of javascript versus ruby
[18:16:48] havenwood: >> [method(:puts), method(:p)].each { |meth| meth.call ['hi', 'there'] }
[18:16:49] ruboto: havenwood # => hi ...check link for more (https://eval.in/413262)
[18:16:58] blt: has joined #ruby
[18:17:14] gambl0re: instead of using strings..
[18:17:16] PhantomSpank: has joined #ruby
[18:17:21] apeiros: gambl0re: a method has a receiver and the receiver becomes self in the method context
[18:17:26] apeiros: gambl0re: a function does not
[18:17:27] bootstrappm: has joined #ruby
[18:17:43] apeiros: and with JS it's a bit of both.
[18:18:10] havenwood: bootstrappm: g'mornin'
[18:18:12] troyready: has joined #ruby
[18:18:20] bradland: gambl0re: symbols are strings with a little extra behavior/constraints
[18:18:39] chouhoulis: has joined #ruby
[18:18:49] gambl0re: the older version of ruby it would be :symbol => "value"
[18:18:54] bradland: a symbol is immutable, so the ruby interpreter can treat symbols differently
[18:19:02] gambl0re: now its... symbol: "value"?
[18:19:04] havenwood: gambl0re: interned strings is another thing to call them
[18:19:10] havenwood: >> 'string'.intern.class
[18:19:11] ruboto: havenwood # => Symbol (https://eval.in/413263)
[18:19:11] bradland: gambl0re: both syntax versions are supported
[18:19:19] jsrn: has joined #ruby
[18:19:35] bradland: symbol: "value" is just a little more convenient to type
[18:19:40] ralphy: has joined #ruby
[18:19:40] gambl0re: what if i did "symbol": "value"
[18:19:53] gambl0re: inside a hash
[18:20:11] bradland: gambl0re: you can't use quotes in that format
[18:20:16] bradland: you'll get an error
[18:20:36] apeiros: >> {"foo": "bar"}
[18:20:37] ruboto: apeiros # => {:foo=>"bar"} (https://eval.in/413265)
[18:20:41] apeiros: yes, we can ;-)
[18:20:50] apeiros: it's a 2.2+ thing, though (or maybe 2.1+?)
[18:21:02] bradland: i could have sworn that used to blow up
[18:21:02] apeiros: 21>> {"foo": "bar"}
[18:21:03] ruboto: apeiros # => /tmp/execpad-1316dcccddb5/source-1316dcccddb5:2: syntax error, unexpected ':', expecting => ...check link for more (https://eval.in/413266)
[18:21:07] apeiros: yeah, 2.2+
[18:21:29] bradland: ruby is a bit of a moving target
[18:21:33] tvw: has joined #ruby
[18:21:36] baweaver: has joined #ruby
[18:21:53] chuy: has joined #ruby
[18:21:56] bradland: prior to version 2.2, using this form: "symbol": value would cause an exception
[18:22:00] bradland: but it's allowed in 2.2
[18:22:18] bradland: gambl0re: have you tried ruby's REPL yet?
[18:22:24] bradland: the built in one is called IRB
[18:22:32] bradland: you can start it from a command line by typing irb
[18:22:51] gambl0re: yea i used ruby gems before..
[18:22:52] bradland: you can type code at the prompt and irb will evaluate it as you enter lines of code
[18:23:00] bradland: irb isn't really rubygems
[18:23:05] bradland: rubygems is a packaging system
[18:23:31] bradland: with irb, you can try out code to find answers to questions
[18:25:14] bizportal: has joined #ruby
[18:25:18] yorickpeterse: imperator: No, people have asked me for a Nokogiri compat layer, but I have no interest in making one myself
[18:26:31] prettiestPony11: has joined #ruby
[18:26:39] NeverDie: has joined #ruby
[18:28:31] radgeRayden: has joined #ruby
[18:30:26] graydot: has joined #ruby
[18:30:49] gambl0re: string->object->basic object
[18:32:42] DroidBur_: has joined #ruby
[18:33:57] yardenbar: has joined #ruby
[18:33:58] shevy: gambl0re are you getting the basics or something ;)
[18:34:00] bradland: gambl0re: mostly, yes, but Ruby is a little bit more complicated than that
[18:34:16] bradland: >> String.ancestors
[18:34:17] ruboto: bradland # => [String, Comparable, Object, Kernel, BasicObject] (https://eval.in/413271)
[18:34:44] bradland: the object heirarchy in ruby can change depending upon what code has been run
[18:34:47] casadei_: has joined #ruby
[18:34:54] havenwood: gambl0re: Take a looky here: http://www.gliffy.com/go/publish/5152080
[18:34:57] bradland: if you run String.ancestors in your local irb, you may get a different list
[18:35:21] bradland: havenwood: that is slick
[18:35:59] lwu: has joined #ruby
[18:36:19] havenwood: bradland: Shows well how the class of a module is class and its superclass is module whose superclass is object, which includes kernel whose class is module.
[18:37:39] dopie: has joined #ruby
[18:39:48] A124: has joined #ruby
[18:40:15] yardenbar: has joined #ruby
[18:41:03] cornerma1: has joined #ruby
[18:41:19] baweaver: has joined #ruby
[18:42:04] alphaatom: has joined #ruby
[18:42:33] towski_: has joined #ruby
[18:43:33] rbennacer: has joined #ruby
[18:43:43] toretore: has joined #ruby
[18:44:01] quimrstorres: has joined #ruby
[18:44:27] Scripore: has joined #ruby
[18:45:47] nhhagen: has joined #ruby
[18:46:14] iamjarvo: has joined #ruby
[18:46:58] iamjarvo: has joined #ruby
[18:48:22] nhhagen: has joined #ruby
[18:48:52] finisherr: has joined #ruby
[18:49:51] ragingcake_: has joined #ruby
[18:51:59] user1138: has joined #ruby
[18:52:56] lian_: has joined #ruby
[18:53:20] lian_: has joined #ruby
[18:53:44] lianj: has joined #ruby
[18:54:22] Lingo: has joined #ruby
[18:54:23] davedev24: has joined #ruby
[18:54:35] Dzejmskrokan: has joined #ruby
[18:54:49] dr3w: has joined #ruby
[18:56:50] Lingo: has joined #ruby
[18:57:41] khebbie: has joined #ruby
[19:00:23] baroquebobcat: has joined #ruby
[19:01:15] Scripore: has joined #ruby
[19:01:58] symm-: has joined #ruby
[19:02:34] arup_r: has joined #ruby
[19:02:34] Oka: has joined #ruby
[19:03:14] JoshL: has joined #ruby
[19:03:36] khebbie: has joined #ruby
[19:05:12] Shoutsid: has joined #ruby
[19:05:47] safeforge: has joined #ruby
[19:06:00] DLSteve: has joined #ruby
[19:07:42] devoldmx_: has joined #ruby
[19:08:15] jonee: has joined #ruby
[19:09:00] mordocai: has joined #ruby
[19:10:09] alphaatom: has joined #ruby
[19:10:45] atomical: has joined #ruby
[19:11:27] TomyLobo: rails allows specifying methods as Class#method. I've also seen the manuals and people here reference methods in similar ways. is there some way to get a method reference from that?
[19:12:03] bradland: TomyLobo: not sure what you mean by a "method reference"?
[19:12:05] TomyLobo: i tried method('String#ancestors'), but it wont work
[19:12:08] bradland: as in, documentation?
[19:12:30] Blaguvest: has joined #ruby
[19:12:40] bradland: so, Object#method is just a means of communicating documentation
[19:12:43] bradland: it's not actual code
[19:12:53] bradland: the hash means it's a class method
[19:12:57] bradland: instance method
[19:12:58] apeiros: String.instance_method(:ancestors)
[19:13:05] bradland: a double colon means class method
[19:13:05] alphaatom: has joined #ruby
[19:13:09] apeiros: and yes, it's just the common way to denote an instance method
[19:13:22] imperator: yorickpeterse, worse, it would be a REXML compat layer, but ok :)
[19:13:22] A124: has joined #ruby
[19:13:23] Sou|cutter: bradland: I usually use . for class method
[19:13:49] bradland: there are many ways to communicate method type, but the official ruby docs use ::method
[19:13:57] Sou|cutter: :: I use for namespacing
[19:15:04] jackjackdripper: has joined #ruby
[19:15:08] abcd1234: has joined #ruby
[19:15:26] mase-chatter: has joined #ruby
[19:15:37] iamjarvo: has joined #ruby
[19:15:48] Hanmac: File.size is ambiguous in ri and does show you both, File#size and File::size are more specific
[19:16:26] niiamon: has joined #ruby
[19:17:02] nahtnam: has joined #ruby
[19:17:43] bradland: @s3.list_objects(bucket: S3_BUCKET, delimiter: S3_DELIMITER, prefix: "#{@instance}/#{@instance}_backup/").each do |response| response.content.keys.map(&:key).pop
[19:17:49] diegoviola: has joined #ruby
[19:18:32] tubuliferous_: has joined #ruby
[19:18:41] BraddPitt: yeah, I use :: for namespacing, # for instance and . for class
[19:19:39] Yiota: has joined #ruby
[19:19:58] Sou|cutter: while potentially ambiguous, I guess it's worth knowing that some of us use it that way
[19:21:21] imperator: little did we know that Brad Pitt was a Ruby programmer on the side
[19:21:22] A124: has joined #ruby
[19:22:24] Trynemjoel: has joined #ruby
[19:23:04] TomyLobo: my bullshit detector is ringing
[19:23:28] miah: its a good thing that names aren't unique across humanity.
[19:23:37] mhib: has joined #ruby
[19:24:30] TomyLobo: yeah now you're moving the goalposts :P
[19:25:29] TomyLobo: bradland, sorry i meant String#gsub
[19:25:36] TomyLobo: ancestors is a method from Class :)
[19:25:47] freerobby: has joined #ruby
[19:26:25] deepu: has joined #ruby
[19:26:47] alphaatom: has joined #ruby
[19:26:51] bradland: fortunately, Module#instance_method works in either case :)
[19:27:19] TomyLobo: hmm, Modules is a class?
[19:27:24] TomyLobo: i guess i need to
[19:27:41] deepu: has joined #ruby
[19:28:03] Violentr: has joined #ruby
[19:28:11] bradland: yes, Module is a class, strangely enough
[19:28:19] bricker: has joined #ruby
[19:28:31] TomyLobo: and Class is a class
[19:29:28] Muhannad: has joined #ruby
[19:29:46] yorickpeterse: imperator: any compat layer is a waste of time in my opinion
[19:29:58] TomyLobo: tell that bukkit :)
[19:30:02] yorickpeterse: while you can fake method names it becomes much harder to fake behaviour or namespaces
[19:30:25] Jackneill: has joined #ruby
[19:31:39] spider-mario: has joined #ruby
[19:32:21] Jackneill: has joined #ruby
[19:33:52] Jackneill: has joined #ruby
[19:34:38] jhack: has joined #ruby
[19:35:50] Jackneill: has joined #ruby
[19:35:55] Trynemjoel: has joined #ruby
[19:36:32] [Butch]: has joined #ruby
[19:37:14] gambl0re: has joined #ruby
[19:37:34] cina: has joined #ruby
[19:38:00] imperator: yorickpeterse, eh, you might not be able to get 100% compat, but you can make life easier for people
[19:38:52] cina: I like the array.map(&:method_name) syntax, is it possible to pass a variable instead of a symbol or string? e.g. array.map(&:variable_name) ?
[19:39:01] imperator: like, there's nothing we can do about explicit element indexing i realize
[19:39:13] imperator: cina, what happened when you tried?
[19:39:35] imperator: irb, your friend :)
[19:39:38] cina: imperator: I mean variable='method_name'; array.map(&:variable)
[19:39:57] j4cknewt: has joined #ruby
[19:40:08] cina: imperator: it will call 'variable' on each element, I want to call 'method_name' on each record instead
[19:41:18] j5s7: has joined #ruby
[19:41:37] dwithers: has joined #ruby
[19:42:47] Mon_Ouie: &variable and variable = :method_name
[19:42:56] fantazo: has joined #ruby
[19:43:07] TomyLobo: i just read about a wonderful thing called mixins
[19:43:08] shpoont: has joined #ruby
[19:43:30] gizmore: has joined #ruby
[19:43:42] TomyLobo: with which i can add methods to classes cooperatively
[19:43:57] imperator: mixin all the things!
[19:43:59] TomyLobo: problem is, i cant use those methods from the class scope
[19:44:04] apeiros: >> meth = :upcase; ["hi", "there"].map(&meth)
[19:44:05] ruboto: apeiros # => ["HI", "THERE"] (https://eval.in/413310)
[19:44:23] apeiros: you can have any expression there
[19:44:23] kidoz: has joined #ruby
[19:44:24] lxsameer: has joined #ruby
[19:44:50] baweaver: has joined #ruby
[19:44:56] Mon_Ouie: What do you mean by "from the class scope"?
[19:45:02] apeiros: >> def meth(prefix); "#{prefix}case"; end; ["HI", "THERE"].map(&meth(:down))
[19:45:03] ruboto: apeiros # => wrong argument type String (expected Proc) (TypeError) ...check link for more (https://eval.in/413312)
[19:45:11] apeiros: >> def meth(prefix); "#{prefix}case"; end; ["HI", "THERE"].map(&(meth(:down)))
[19:45:12] ruboto: apeiros # => wrong argument type String (expected Proc) (TypeError) ...check link for more (https://eval.in/413313)
[19:45:14] imperator: TomyLobo, see extend :)
[19:45:16] bradland: TomyLobo: that should be possible. try posting some code along with what you expect to happen.
[19:45:42] apeiros: oh, lol, silly me
[19:45:50] apeiros: >> def meth(prefix); :"#{prefix}case"; end; ["HI", "THERE"].map(&meth(:down))
[19:45:51] ruboto: apeiros # => ["hi", "there"] (https://eval.in/413315)
[19:45:52] RegulationD: has joined #ruby
[19:45:56] apeiros: missed that stupid :
[19:46:07] bradland: one too many paren
[19:46:18] apeiros: paren were fine
[19:46:25] apeiros: second one too
[19:46:28] havenwood: >> def meth(prefix); :"#{prefix}case"; end; ["HI", "THERE"].map(&meth(:down))
[19:46:29] apeiros: >> def meth(prefix); :"#{prefix}case"; end; ["HI", "THERE"].map(&(meth(:down)))
[19:46:29] ruboto: havenwood # => ["hi", "there"] (https://eval.in/413316)
[19:46:30] ruboto: apeiros # => ["hi", "there"] (https://eval.in/413317)
[19:46:40] apeiros: the problem was that I returned a string from meth()
[19:46:46] arup_r: has joined #ruby
[19:46:48] apeiros: and String#to_proc does not exist
[19:47:11] apeiros: whatever you pass in front of & must either be a proc or respond to to_proc
[19:47:24] kaffepanna: has joined #ruby
[19:48:21] cina: Mon_Ouie, apeiros: Thank you! this is very cool!
[19:48:35] nhhagen: has joined #ruby
[19:48:37] TomyLobo: hmm i'm moving it to the constructor. it's more of a per-instance thing anyway
[19:48:45] bradland: >> def meth(prefix); :"#{prefix}case"; end; ["HI", "THERE"].map(&(meth(:down)))
[19:48:46] ruboto: bradland # => ["hi", "there"] (https://eval.in/413318)
[19:49:05] gambl0re: has joined #ruby
[19:50:06] j5s7: has joined #ruby
[19:50:15] abcd1234: has joined #ruby
[19:51:23] rbennacer: has joined #ruby
[19:52:00] chouhoulis: has joined #ruby
[19:52:14] Guest50: has joined #ruby
[19:52:29] Pumukel: has joined #ruby
[19:52:53] j5s7: has joined #ruby
[19:54:23] yorickpeterse: imperator: I'd rather focus on good migration guides
[19:55:58] ledestin: has joined #ruby
[19:55:59] ValicekB: has joined #ruby
[19:58:16] paulcsmith___: has joined #ruby
[19:58:43] allcentury: why can't I call a protected method in a class that I inherit from?
[19:58:52] gambl0re: has joined #ruby
[19:59:03] nhhagen: has joined #ruby
[20:00:17] elmano: has joined #ruby
[20:00:33] rideh: has joined #ruby
[20:00:39] atomical_: has joined #ruby
[20:00:42] elmano: Hello, I wonder if someone could help me with file upload to amazon s3 .. I'm having trouble and the return they are giving is bad request ... the code: https://gist.github.com/elmanoneto/64abf5070f4d72dcd421
[20:00:50] dfockler: has joined #ruby
[20:01:48] jhass: ?code allcentury
[20:01:48] ruboto: allcentury, We can't help you without your code, please post it to https://gist.github.com
[20:02:28] j4cknewt_: has joined #ruby
[20:02:29] krz: has joined #ruby
[20:02:56] mdavid613: has joined #ruby
[20:04:03] alphaatom: has joined #ruby
[20:05:03] skade: has joined #ruby
[20:05:36] alphaatom: has joined #ruby
[20:05:36] apeiros: jhass: seems like they didn't like the idea of showing code???
[20:05:46] TheHodge: has joined #ruby
[20:05:58] jhass: heh, I simply came too late
[20:06:11] benlovell: has joined #ruby
[20:06:34] apeiros: yeah, 3min delayed response. teh horror.
[20:07:16] n008f4g_: has joined #ruby
[20:07:29] kidoz: has joined #ruby
[20:08:10] ItSANgo: has joined #ruby
[20:08:24] Neon: has joined #ruby
[20:08:50] kidoz_: has joined #ruby
[20:09:18] zacstewa_: has joined #ruby
[20:09:22] greset: has joined #ruby
[20:09:28] changelog_: has joined #ruby
[20:09:45] d2dchat_: has joined #ruby
[20:09:53] yh__: has joined #ruby
[20:09:55] rbennacer: has joined #ruby
[20:10:38] mordocai`: has joined #ruby
[20:10:50] gard: has joined #ruby
[20:10:55] gambl0re: has joined #ruby
[20:11:27] Neon: I'm trying to set something up with rb-inotify. The example (http://www.rubydoc.info/github/nex3/rb-inotify/INotify/Notifier) makes this pretty straightforward, but I have a problem. I watch for two different events and if any of them triggers once I want the whole notifier to stop watching. I tried calling event.watcher.notifier.close in the watcher's block and it gives me a EBADF (bad file descriptor) in IO#readpartial,
[20:11:27] Neon: called from some rb-inotify method.
[20:11:37] cookiez: has joined #ruby
[20:11:52] adaedra: I would need a way to create fake web requests (rack-style) for tests
[20:12:06] Neon: How can I set it up so it stops the notifier (and returnd from Notifier#run) after one event?
[20:12:13] danzilio: has joined #ruby
[20:12:39] lianj: has joined #ruby
[20:12:44] govg: has joined #ruby
[20:13:20] A124: has joined #ruby
[20:13:46] kstuart_: has joined #ruby
[20:15:16] thiagovsk: has joined #ruby
[20:15:17] Neon: Neon, use Notifier#process.
[20:15:18] baweaver: has joined #ruby
[20:15:31] Neon: Neon, oh man, thanks, how could I not notice that one? :/
[20:15:31] imperator: has left #ruby: ("Leaving")
[20:15:46] skade: has joined #ruby
[20:16:06] iamjarvo: has joined #ruby
[20:16:07] ArchRogem: has joined #ruby
[20:16:13] DenSchub: has joined #ruby
[20:17:38] spider-mario: has joined #ruby
[20:17:49] rideh: has joined #ruby
[20:18:02] jsrn: has joined #ruby
[20:19:01] nlsun: optparse says it supports shell completion but i copied the sample script and am not able to get any completion out of it using zsh
[20:19:28] changelog: has joined #ruby
[20:20:55] BraddPitt: elmano which gem are you using?
[20:21:13] alphaatom: has joined #ruby
[20:22:08] dr3w: has joined #ruby
[20:22:24] shinnya: has joined #ruby
[20:22:56] banister: has joined #ruby
[20:23:22] ItSANgo: has joined #ruby
[20:23:33] dgutierrez1287: has joined #ruby
[20:23:41] bradleyprice: has joined #ruby
[20:24:33] rideh: has joined #ruby
[20:24:33] jsrn: has joined #ruby
[20:26:30] arup_r: Neon, why are you addressing yourself `Neon, use Notifier#process.` ? :p
[20:27:01] Neon: arup_r, because I just figured out the answer to my question.
[20:27:18] conor_: has joined #ruby
[20:27:39] kadoppe: has joined #ruby
[20:29:07] axl__: has joined #ruby
[20:29:27] Muhannad: has joined #ruby
[20:30:26] gambl0re: has joined #ruby
[20:31:04] nlsun: just making sure, the OptionParser gem is really referring to tab completion of commands?
[20:31:58] adaedra: Neon: how many of you are you? :p
[20:32:04] centrx: nlsun, The shell actually handles tab completion...?
[20:32:53] nettoweb: has joined #ruby
[20:33:16] nlsun: centrx: which is why this seems like black magic http://ruby-doc.org/stdlib-2.1.0/libdoc/optparse/rdoc/OptionParser.html#class-OptionParser-label-Shell+Completion
[20:34:42] centrx: nlsun, I thought it was done through scripts in /etc/bash_completion.d for example, but maybe there is some kind of interface the shell can use to interrogate it out of the ruby script
[20:34:59] Trynemjoel: has joined #ruby
[20:35:11] adaedra: Or just it formats it well enough for shells to parse it
[20:35:20] adaedra: given zsh's shell completion, it's possible
[20:35:30] shadeslayer: what would be a good way to get the elements that are in neither of these arrays : ["C", "A", "B", "C"] , ["C", "A", "B"], FWIW sequence matters
[20:35:34] jsrn: has joined #ruby
[20:35:38] nlsun: doesn't work with my zsh and mine's pretty powered up
[20:35:41] shadeslayer: so the answer should be C
[20:36:05] centrx: shadeslayer, "elements that are in neither of the arrays" what?
[20:36:12] jonee: has joined #ruby
[20:36:12] ruboto: centrx # => [] (https://eval.in/413334)
[20:36:12] shadeslayer: not common elements
[20:36:25] Mon_Ouie: "C" is in both arrays
[20:36:33] BraddPitt: every elem is in both
[20:36:56] centrx: I think he means something like: (a - b) & (b - a)
[20:37:12] adaedra: an array xor
[20:37:13] shadeslayer: that adds the two I think
[20:37:25] shadeslayer: ah no, still returns common elements
[20:37:26] centrx: shadeslayer, & is set intersection. | is set union
[20:37:59] shadeslayer: better example : ["C", "A", "B", "D"] , ["C", "A", "B"], should give me "D"
[20:38:05] BraddPitt: do you mean to say, "get the element that is in neither of these sequences, as modeled by an array"?
[20:38:21] BraddPitt: C-A-B-C is sequence 1, and C-A-B is sequence 2?
[20:38:32] shadeslayer: BraddPitt: see newer example
[20:38:44] ashleyhindle: find the difference between arrays?
[20:38:50] BraddPitt: well you said sequence matters, right?
[20:39:13] BraddPitt: so its not array similarity
[20:39:17] BraddPitt: its sequence similarity
[20:39:52] centrx: https://en.wikipedia.org/wiki/Symmetric_difference
[20:39:57] BraddPitt: then just iterate over both arrays until you find a non matching entry
[20:40:06] hahuang61: has joined #ruby
[20:40:43] centrx: yeah I think it's (a - b) | (b - a)
[20:40:47] blackmesa: has joined #ruby
[20:41:08] user1138: has joined #ruby
[20:41:16] centrx: (a | b) & (a & b)
[20:41:50] user1138: has joined #ruby
[20:41:58] Vile`: has joined #ruby
[20:42:07] niemcu: has joined #ruby
[20:43:20] centrx: oh wait, sorry, (a | b) - (a & b)
[20:51:08] dr3w: has joined #ruby
[20:52:31] ap4y: has joined #ruby
[20:54:04] Pupeno_: has joined #ruby
[20:55:22] ruby-lang976: has joined #ruby
[20:55:44] centrx: Welcome to #ruby Sir / Madam
[20:55:49] graydot: has joined #ruby
[20:55:54] ruby-lang976: its my 1st day here
[20:56:02] skade: has joined #ruby
[20:56:10] centrx: Welcome to IRC noob
[20:56:13] ruby-lang976: i like to advice for ruby
[20:56:31] tmtwd: has joined #ruby
[20:56:33] ruby-lang976: is anybody can advice me
[20:56:40] ruboto: Don't ask to ask. Just ask your question, and if anybody can help, they will likely try to do so.
[20:56:44] adaedra: if you ask, you can reply
[20:56:55] centrx: Question, answer you will receive
[20:57:05] adaedra: s/will/may/
[20:57:12] adaedra: we don't know anything, do we? :p
[20:57:18] adaedra: everything*
[20:57:19] centrx: I know that I know nothing
[20:57:24] ruby-lang976: i like to learn ruby i finished code academy and learn to programming
[20:57:37] loincloth: has joined #ruby
[20:57:45] centrx: Excellent
[20:57:52] ruby-lang976: now should i move to start ruby on rails or i have to learn more ruby than rails ?
[20:58:16] centrx: Do you feel comfortable with Ruby and would you like to learn how to make web apps?
[20:58:39] ruby-lang976: i am study ruby for a better rails developer
[20:59:03] adaedra: so your goal is to develop web applications?
[20:59:17] ruby-lang976: yes i feel little comfortable with ruby how its work some times i can solve problem but easy one
[20:59:37] ruby-lang976: as a full stack web developer
[20:59:47] centrx: ruby-lang976, Have you tried Ruby Monk? - https://rubymonk.com/
[20:59:50] Sou|cutter: rails is based on ruby, so if you are learning ruby it will apply to rails. If you only you rails and have a poor understanding of ruby you will have trouble doing anything outside of copy-paste coding
[20:59:59] ruby-lang976: yes i tired i like it
[21:00:11] ruby-lang976: yes i try ruby monk good site
[21:00:12] centrx: ruby-lang976, For Rails, check out http://guides.rubyonrails.org/getting_started.html
[21:00:12] Sou|cutter: err I think the poor grammar rubbed off on me, woops
[21:00:23] centrx: who you calling grammar!?
[21:01:40] dwithers: has joined #ruby
[21:01:56] centrx: ruby-lang976, There is a Rails channel at #RubyOnRails as well
[21:01:59] ruboto: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[21:02:04] yfeldblum: has joined #ruby
[21:02:14] ruby-lang976: soem experience people told me better learn more ruby than go to rails
[21:02:42] centrx: ruby-lang976, You should definitely learn Ruby, the question is when you learn Ruby, what is the right time to start learning Rails too?
[21:03:27] centrx: ruby-lang976, See also http://rubykoans.com/
[21:03:47] ruby-lang976: is there any guide line for ruby
[21:03:58] ruby-lang976: i finished http://rubykoans.com/
[21:04:06] centrx: Excellent
[21:04:11] centrx: More Ruby: http://ruby-doc.org/core-2.2.0/Array.html
[21:04:48] ruby-lang976: ok thanks should i admit some online academy or try my self ?which will be best
[21:05:06] centrx: Some of the main docs are excellent for learning: Array, Hash, Object
[21:05:25] Scripore: has joined #ruby
[21:05:30] centrx: ruby-lang976, Depends on what you want. It sounds like you have already done a lot in Ruby, so you don't necessarily need a course
[21:05:47] centrx: ruby-lang976, You may want to build your own app, some kind of utility or game
[21:06:01] BraddPitt: or try the Hartl rails tutorial to learn Rails
[21:06:13] ruby-lang976: i like to find job after 3 month as junior rails dev
[21:06:17] gambl0re: has joined #ruby
[21:06:40] tubuliferous_: has joined #ruby
[21:07:06] BraddPitt: entirely possible
[21:07:08] BraddPitt: if you work hard
[21:07:34] decaff: has joined #ruby
[21:07:59] devoldmx_: has joined #ruby
[21:08:33] ruby-lang976: work hard yes i am agree but if you get some guide from experience person so u can be sure
[21:08:59] ruby-lang976: thats why i believe smart and work hard together
[21:09:17] ruby-lang976: but need some guide line so i can follow that guide line
[21:09:34] BraddPitt: ruby-lang976 try Hartl Rails Tutorial
[21:09:35] ruby-lang976: from some one who know already
[21:09:38] A124: has joined #ruby
[21:10:03] allcentury: has joined #ruby
[21:10:49] ruby-lang976: is there ay site where i can see full guide line ???
[21:10:54] diego2: has joined #ruby
[21:11:15] shevy: ack rails
[21:11:25] BraddPitt: ruby-lang976 https://www.railstutorial.org/
[21:11:28] shevy: learn ruby from #ruby learn rails from #rubyonrails \o/
[21:11:38] BraddPitt: or rather: https://www.railstutorial.org/book
[21:11:42] tvw: has joined #ruby
[21:13:31] einarj: has joined #ruby
[21:14:45] Maletor: has joined #ruby
[21:15:03] Muhannad: has joined #ruby
[21:16:04] safeforge: has joined #ruby
[21:16:08] davedev24: oops sorry guys
[21:16:42] nofxx: has joined #ruby
[21:19:40] niiamon: has joined #ruby
[21:19:42] dwithers: has joined #ruby
[21:20:05] shevy: your secret numbers
[21:20:14] shevy: you gave us your precious!
[21:21:26] jhass: it's just five all over again. 8 - 5 + 2 = 5, 1 * (2 + 3) = 5, (5 + 5) / 2 numbers = 5
[21:21:56] baweaver: has joined #ruby
[21:21:59] adaedra: and 5 - 2 = 3, ruby 3 confirmed
[21:22:10] shevy: jhass hmm is 5 an evil number?
[21:22:28] renderful: has joined #ruby
[21:22:35] gaboesquivel: has joined #ruby
[21:22:51] jhass: shevy: All things happen in fives, or are divisible by or are multiples of five, or are somehow directly or indirectly appropriate to 5
[21:23:04] eam: what's the best way to write {}.each_pair when I want sets of pairs (say 10 pairs per loop)
[21:23:22] jhass: each.each_slice(10) ?
[21:23:23] centrx: each_slice ?
[21:23:35] jhass: or right, it's mixed in directly even
[21:23:41] jhass: each_pair is just an alias for each
[21:23:42] Sembei: has joined #ruby
[21:23:54] dfockler: each.each_slice(bread)
[21:24:02] allcentury: has joined #ruby
[21:24:09] eam: aha perfect
[21:24:35] A124: has joined #ruby
[21:24:41] ofdtrinity: has joined #ruby
[21:29:50] einarj: has joined #ruby
[21:30:47] mcgain: has joined #ruby
[21:31:11] zenspider: eam: or each_cons if you want them overlapping
[21:31:22] zenspider: (a, b), (b, c), (c, d) ...
[21:32:08] eam: zenspider: that's exactly what I wanted :D
[21:32:13] failshell: has joined #ruby
[21:32:27] A124: has joined #ruby
[21:32:34] youch: has joined #ruby
[21:32:56] zenspider: that's linearly overlapping
[21:33:02] zenspider: not each combo of N possible
[21:33:34] jhass: zenspider: where does one get one of these crystal balls?
[21:33:57] allcentury: Hi all - how can I avoid using Klass.instance when I have a singleton?
[21:34:02] allcentury: I saw this answer: http://stackoverflow.com/questions/12299598/ruby-singleton-avoid-using-instance-member
[21:34:05] jhass: or whatever device you use to read minds
[21:34:11] allcentury: but really don't like method_missing
[21:34:25] jhass: allcentury: MyStuff = Stuff.instance
[21:34:32] yqt: has joined #ruby
[21:34:40] zenspider: jhass: hours upon hours in here :P
[21:35:14] jhass: I wouldn't have guessed each_cons from that question at all
[21:35:17] zenspider: class Klass; I = self.instance; end; ... Klass::I
[21:35:26] roolo: has joined #ruby
[21:35:37] zenspider: I loves me some each_cons, so I pimp it
[21:35:38] jhass: redundant self detected
[21:36:13] eam: hm actually each_cons appears to repeat entries
[21:36:16] banister: zenspider any cool new projects you'er working on?
[21:36:21] dblessing: has joined #ruby
[21:37:26] jhass: eam: yes, that's what zenspider was getting at with "overlapping"
[21:38:20] Jackneill: has joined #ruby
[21:38:21] lxsameer: has joined #ruby
[21:38:33] s2013: has joined #ruby
[21:38:45] blackmesa: has joined #ruby
[21:39:06] shellie_: has joined #ruby
[21:39:17] leafybasil: has joined #ruby
[21:39:18] eam: >> h = {1 => 2, 3=> 4, 5=> 6}; h.keys.map {|k| [k,h[k]]}.each_slice(2) { } # this is exactly what I want
[21:39:19] ruboto: eam # => nil (https://eval.in/413339)
[21:39:43] eam: feel like it's way more verbose than necessary
[21:40:03] banister: eam: h.each
[21:40:06] eam: I'm chopping up sets of pairs for forked jobs
[21:40:23] jhass: >> h = {1 => 2, 3=> 4, 5=> 6}.each_slice(2).to_a
[21:40:24] ruboto: jhass # => [[[1, 2], [3, 4]], [[5, 6]]] (https://eval.in/413340)
[21:40:56] jhass: note you do can just pass the block, the to_a is demo
[21:41:54] paulcsmith___: has joined #ruby
[21:42:04] erts: has joined #ruby
[21:42:31] eam: hah, I see, I did {}.each_slice(2) { |k,v| expecting an array of keys/values and that's not at all what it returns
[21:42:41] eam: (passes, I should say)
[21:43:07] jhass: it returns the same thing as your .map
[21:43:22] failshell: has joined #ruby
[21:43:35] eam: I mean, the behavior of each_slice() depending on arity
[21:43:45] jhass: imagine hash as [[k, v], [k2, v2], ...] as far as Enumerable is concerned
[21:43:48] eam: I'm not using a constant slice of2
[21:44:02] ramfjord: has joined #ruby
[21:44:38] jhass: (which I guess you should be using in the first place btw)
[21:44:58] ofdtrinity: has joined #ruby
[21:46:16] sarkyniin: has joined #ruby
[21:49:19] skade: has joined #ruby
[21:49:28] n4524: has joined #ruby
[21:50:28] arooni-mobile: has joined #ruby
[21:50:45] n4524: has left #ruby: ()
[21:51:56] zenspider: banister: I've been working on a project called "debride" for a little while. Finds potentially dead code
[21:52:21] banister: zenspider using TracePoint
[21:52:22] zenspider: I'm now working on a new project that'll help fix up requires to combat the horribleness that is Bundler.require
[21:52:50] zenspider: nope, just static analysis of the gemfile + code
[21:53:12] zenspider: tracepoint is certainly an option to help tho
[21:53:15] banister: zenspider oh so looking at unreachable code vs unused code
[21:53:16] zenspider: just... slow
[21:53:19] lxsameer: has joined #ruby
[21:53:27] zenspider: that's static analysis too
[21:53:35] irctc090: has joined #ruby
[21:53:54] zenspider: debride is just methods declared - methods called - whitelist == dead
[21:54:39] zenspider: + some plugins to process erb and the like to find more methods called
[21:54:57] banister: zenspider cool, is it OSS yet?
[21:56:37] baweaver: How much mileage do you all tend to get out of sexps for that type of thing?
[21:56:48] baweaver: I keep thinking of using them but never get around to it.
[21:57:03] banister: baweaver sup weaves
[21:57:12] baweaver: yo, how's pry?
[21:57:41] baweaver: I think we lost cirwin :(
[21:58:05] banister: we lost everyone, real life unfortunately..
[21:58:10] baweaver: went and got himself engaged
[21:58:11] banister: OSS is a youthful thing :P
[21:58:13] juanpaucar: has joined #ruby
[21:58:14] banister: cool? really?
[21:58:26] baweaver: Yeah, saw it flash by the other day.
[21:58:47] baweaver: He spends suspiciously less time on IRC now :P
[21:58:54] yqt: has joined #ruby
[21:59:19] banister: he's probalby on slack :P
[21:59:33] baweaver: Really now, where / what slack channels are you all on?
[22:00:14] banister: work i guess
[22:00:25] baweaver: That'd do it.
[22:00:48] irctc090: hello i posted a issue on stackoverflow, i was hoping someone could help me. I got an answer back but it wasnt waht i was looking for as i am wanting to only use Parse Rest API. http://stackoverflow.com/questions/31851606/updating-a-column-parse-rest-api/31864171#31864171
[22:00:48] shpoont: has joined #ruby
[22:00:56] baweaver: I can see about getting him out to coffee some time later anyways. We're working on getting SF Ruby back up a bitl.
[22:01:24] FernandoBasso: has joined #ruby
[22:01:34] decoponyo: has joined #ruby
[22:01:54] DLSteve: has joined #ruby
[22:02:42] baweaver: irctc090: You said you can't use parse in that reply
[22:02:45] shadoi: irctc090: from the error you get back it looks like you're simply not finding an object for your request. probably phoneNumber is not a primary key.
[22:03:16] irctc090: but i do have it as a column already.
[22:03:20] ishahnaz: has joined #ruby
[22:03:24] baweaver: doesn't matter
[22:03:29] baweaver: what's your server expecting?
[22:03:32] shadoi: But you probably can't retrieve records with only that piece of data.
[22:03:37] shadoi: Look that the API docs for the service.
[22:03:39] baweaver: because if it is Rails
[22:03:50] Scroff: has joined #ruby
[22:03:51] baweaver: it's probably object id or something of that kin
[22:03:55] irctc090: i am using it in rails.
[22:04:04] baweaver: the service you're hitting
[22:04:09] WEHATEMIGGERS: has joined #ruby
[22:04:14] baweaver: what does it have as the primary key
[22:04:16] ruboto: fflush, banisterfiend, apeiros, seanstickle, Mon_Ouie, zzak, Radar, Havenn, jhass, sevenseacat, miah, workmad3, drbrain, zenspider, slyphon, Coraline, ljarvis, rubyhacker1, Aria
[22:04:28] texasmade: has joined #ruby
[22:04:28] drbrain: !mute WEHATEMIGGERS
[22:04:28] ruboto: +q WEHATEMIGGERS!*@*
[22:04:28] ruboto: -o ruboto
[22:04:37] WEHATEMIGGERS: has left #ruby: ()
[22:04:41] irctc090: i replied that i dont want to use that gem. someone on here told me a couple days ago that the gem is based on the rest api so just use the rest api?
[22:04:45] Radar: Thanks baweaver :)
[22:05:17] shadoi: irctc090: you're not hearing what we're saying. The querying you're sending that service doesn't have enough information, it has nothing to do with what library or API you're using.
[22:05:32] armyriad: has joined #ruby
[22:05:48] baweaver: Your client is sending "I want the user with the key phoneNumber"
[22:05:51] irctc090: what more information do i need to pass?
[22:05:58] shadoi: read the docs for the API
[22:06:00] banister: baweaver how's sony
[22:06:04] baweaver: the server is likely saying "The heck mate? I need an ID, not that"
[22:06:05] A124: has joined #ruby
[22:06:18] baweaver: banister: decent enough
[22:06:27] baweaver: I think cirwin went and told people about my project name
[22:06:41] baweaver: his boss mentioned something on twitter about sony having a team named badass
[22:06:45] irctc090: so i need to pass the users objectid in the url?
[22:06:45] rickmasta: has joined #ruby
[22:06:59] irctc090: how can i do that?
[22:07:06] baweaver: or better yet, look at the API docs for what it wants to pass
[22:07:13] WEHATEMIGGERS: has joined #ruby
[22:07:17] WEHATEMIGGERS: has left #ruby: ()
[22:07:25] baweaver: ACTION puts away ops flag
[22:07:29] banister: baweaver what is badass
[22:07:30] zenspider: what happens with a midge crossbreeds with a chigger? I'd prolly hate those too
[22:07:57] baweaver: BaDASS -> Build and Deployment Automation Support System.
[22:08:02] Scroff: has joined #ruby
[22:08:13] banister: zenspider are you experimenting with any other languages these days? rust? go? etc
[22:08:28] zenspider: racket and its brethren
[22:08:29] Scroff: has joined #ruby
[22:08:58] zenspider: oh! I also released a graphics simulation library... cleverly called... graphics
[22:09:00] banister: zenspider cool, john carmack is tweeting a lot about racket these days
[22:09:09] zenspider: ok... off to go get beat up. laters
[22:09:11] gambl0re: i dont understand how ruby is able to calculate "a" * 100
[22:09:14] skade: has joined #ruby
[22:09:15] irctc090: yeah i saw the docs, i probably need the objectid in the url. how can i achieve that?
[22:09:21] gambl0re: that doesnt make sense
[22:09:34] zenspider: what doesn't make sense?
[22:09:45] zenspider: you're calling "*" on "a" with 100 as the arg
[22:09:47] zenspider: it's just code
[22:09:47] baweaver: * is defined on string to something different than integer
[22:09:51] dopamean_: has joined #ruby
[22:10:00] baweaver: it's actually: 'a'.*(100)
[22:10:26] zenspider: that doesn't really clarify much, because it's also 1.+(1)
[22:10:28] baweaver: irctc090: probably though data
[22:10:41] zenspider: ok. really... need to get beat up
[22:10:43] gambl0re: you are multiplying a string and a integer
[22:10:50] baweaver: The method * can be different for different classes
[22:11:17] gambl0re: different how?
[22:11:19] pontiki: gambl0re: you are sending the message :* to "a" with the argument 100
[22:11:20] irctc090: could you show an example? because i probably cant put @response["objectId"] in the https url
[22:11:28] eam: why does fork return nil in the child
[22:11:40] pontiki: "a" * 100 --> "a".send(:*, 100)
[22:11:42] gambl0re: >> "a" * 100
[22:11:43] ruboto: gambl0re # => "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ...check link for more (https://eval.in/413344)
[22:11:47] eam: why not zero :(
[22:11:56] baweaver: >> [1,2,3] * 3
[22:11:57] ruboto: baweaver # => [1, 2, 3, 1, 2, 3, 1, 2, 3] (https://eval.in/413345)
[22:12:09] diegoviola: has joined #ruby
[22:12:16] workmad3: eam: I think so you can do 'if fork' to detect if you're in the child or not
[22:12:29] baweaver: probably because 0 isn't false in ruby
[22:12:40] eam: I'm getting dangerously close to complaining about zero being true
[22:12:48] s00pcan: has joined #ruby
[22:12:51] baweaver: and that's some bizarre carryover where it admonishes unix conventions for it
[22:13:09] baweaver: eam: honestly I don't know where I stand on that one
[22:13:09] eam: I won't complain about it, but I'm so close
[22:13:33] jbw: has joined #ruby
[22:13:43] baweaver: In some cases I want 0 / '' / empty to be false, but I see reasons for both
[22:14:10] adaedra: 0 as true is very practical sometimes.
[22:14:19] Guest50: has joined #ruby
[22:14:22] adaedra: Like you can do infinite loops with `while 0`.
[22:14:49] workmad3: eam: yeah... it still catches me out at times too (especially when doing modulo) but I think 0 as falsey opens the door for a whole host of less reasonable falsey values... at which point you end up with JS or PHP </straw-man>
[22:15:05] eam: workmad3: it's true
[22:15:27] eam: and zero-as-true values like "0e0"
[22:16:53] riotjones: has joined #ruby
[22:17:24] shazaum_: has joined #ruby
[22:17:50] workmad3: I guess it would also remove a lot of the use of `||=` for lazy assignment... too many special cases for that and it becomes pretty worthless
[22:17:59] ponga: has joined #ruby
[22:18:11] A124: has joined #ruby
[22:19:21] jwaldrip: has joined #ruby
[22:20:05] zacstewart: has joined #ruby
[22:20:18] niiamon: has joined #ruby
[22:20:52] shadeslayer: centrx: indeed, thanks
[22:21:50] zenspider: eam: zero is a valid pid on some systems
[22:22:20] jhack: has joined #ruby
[22:22:21] hahuang61: has joined #ruby
[22:22:31] ragingcake_: has joined #ruby
[22:22:46] v0n: has joined #ruby
[22:25:15] sarkyniin: has joined #ruby
[22:26:46] sdrew: has joined #ruby
[22:27:03] irctc090: even when i pass the objectid with the url, it says {"code"=>107, "error"=>"invalid JSON"}
[22:27:34] irctc090: but when i do it with curl, in terminal, it works perfect
[22:27:49] eam: zenspider: you gotta qualify that though - while some systems use pid=0 for special processes, it can never be returned by fork()
[22:27:55] eam: (on posix)
[22:28:11] eam: so yeah kinda, but no not really :)
[22:29:03] Ox0dea: has joined #ruby
[22:29:38] safeforge: has joined #ruby
[22:33:01] Ox0dea: ~ $ ps -q 1 -o ppid=
[22:33:37] Ox0dea: zenspider: Does "some systems" mean most?
[22:34:00] eggoez: has joined #ruby
[22:34:19] Soviet_jesus: has joined #ruby
[22:34:55] jackjackdripper1: has joined #ruby
[22:36:34] Soviet_jesus: I'm trying to write less crap code and so I started using reek. While it's uncovered a whole mess of problems, one that I've chosen to look at first is it telling me the following code exhibits feature envy.
[22:36:40] Soviet_jesus: https://gist.github.com/JasonMadeSomething/9bf1e8804dfc4835753b
[22:38:02] devoldmx_: has joined #ruby
[22:39:06] phutchins: has joined #ruby
[22:39:12] dfockler: soviet_jesus: might be because you are calling entry all over the place
[22:39:33] Ox0dea: s/calling/referring to/
[22:40:19] workmad3: ^^ if you're not using entry, you're using drops... nothing in the method requires the use of anything in the object it's a method of (it's envious of the features of other objects)
[22:41:31] workmad3: soviet_jesus: feature envy is usually taken as a sign that either you've got code that should be in a different class, or that you've got code that could be extracted into a new class
[22:41:36] avahey: has joined #ruby
[22:41:49] s00pcan: has joined #ruby
[22:41:51] Soviet_jesus: hmm, another method triggered the utility function smell too. It would appear I've built a class that doesn't really do anything other than get the user input and pass it back to other classes
[22:43:41] dfockler: soviet_jesus: might think about making it a module
[22:44:02] axl_: has joined #ruby
[22:45:14] apt-get_: has joined #ruby
[22:45:34] Soviet_jesus: like take the methods that don't depend on their containing objects and make them functions in a module?
[22:45:48] dfockler: if they're related
[22:46:51] Liam`: has joined #ruby
[22:46:55] irctc025: has joined #ruby
[22:47:23] irctc025: im passing a url like so, HTTParty.put('https://api.parse.com/1/users/#{session[:object_id]}', but im getting this back as an error bad URI(is not URI?): https://api.parse.com/1/users/#{session[:object_id]}
[22:47:27] Soviet_jesus: I updated the gist to give a better idea of what I'm trying to do. The files I put up there were the worst offenders according to reek
[22:47:54] saddad: has joined #ruby
[22:48:40] Soviet_jesus: I'm pretty sure I use an idiotic number of instance variables
[22:48:50] iamjarvo: has joined #ruby
[22:48:53] baweaver: >> a = 'works'; "This #{a}"
[22:48:54] ruboto: baweaver # => "This works" (https://eval.in/413350)
[22:49:02] baweaver: >> a = 'works'; 'This #{a}'
[22:49:03] ruboto: baweaver # => "This \#{a}" (https://eval.in/413351)
[22:49:40] baweaver: Now which one of those are you using up there?
[22:50:59] baweaver: read those above
[22:51:09] baweaver: which quotes are you using there?
[22:51:13] pontiki: if the student isn't ready, is there a teacher?
[22:51:36] Ox0dea: An unprepared student must be her own teacher.
[22:51:59] Soviet_jesus: oh yeah, those quotes and interpolation don't work, right?
[22:52:15] DoubleMalt: has joined #ruby
[22:52:19] Ox0dea: soviet_jesus: Single quotes don't invoke interpolation.
[22:52:34] baweaver: I was rather hoping irctc025 would notice that without someone pointing it out.
[22:52:37] baweaver: ACTION shrugs
[22:52:50] Soviet_jesus: sorry, too enthusiastic
[22:52:58] shevy: irctc025 use ""
[22:53:04] postmodern: has joined #ruby
[22:53:09] centrx: >> 'This doesn't work either"
[22:53:10] ruboto: centrx # => /tmp/execpad-173c4895d167/source-173c4895d167:2: syntax error, unexpected tIDENTIFIER, expecting key ...check link for more (https://eval.in/413356)
[22:53:18] Soviet_jesus: i just got excited because rubocop is always yelling at me for that
[22:53:19] baweaver: Not you too shevy :'(
[22:53:28] Ox0dea: irctc025: Use %Q.
[22:53:37] dgutierrez1287: has joined #ruby
[22:53:59] Ox0dea: Or even just %.
[22:53:59] jhack: has joined #ruby
[22:54:00] baweaver: So many ways to say one thing
[22:54:06] Ox0dea: baweaver: More than 200. :(
[22:54:15] baweaver: It's over 9000
[22:54:28] Ox0dea: http://idiosyncratic-ruby.com/15-207-ways-to-rome.html
[22:54:36] Ox0dea: This language is ridiculous.
[22:54:50] shevy: omg Percent Syntax
[22:54:50] tubuliferous_: has joined #ruby
[22:55:02] centrx: I think you mean Fantabulous
[22:55:24] shevy: >> %\0R\0
[22:55:25] ruboto: shevy # => /tmp/execpad-c6e999b73178/source-c6e999b73178:2: syntax error, unexpected tINTEGER, expecting keywor ...check link for more (https://eval.in/413357)
[22:55:37] Ox0dea: This guy.
[22:56:07] centrx: >> "row " * 3 + "your boat"
[22:56:08] ruboto: centrx # => "row row row your boat" (https://eval.in/413358)
[22:56:09] Ox0dea: Rather disturbingly, literal NULs do in fact work as % delimiters.
[22:56:11] centrx: arithmetic with strings!?!?!?
[22:56:11] baweaver: Ooo, new reading site
[22:56:17] Ox0dea: baweaver: It's great.
[22:56:38] Ox0dea: >> eval "%\0foo\0" # shevy
[22:56:39] ruboto: Ox0dea # => "foo" (https://eval.in/413359)
[22:56:49] baweaver: I still don't see what's so mystical about math ops being used for strings / arrays / etc
[22:57:28] pontiki: they aren't math ops
[22:57:29] centrx: baweaver, but can you do long division with strings?
[22:57:44] pontiki: they just look the same
[22:57:53] irctc025: i cant do object_id = session[:object_id] and then in the url do #{object_id}?
[22:57:54] baweaver: pontiki: semantics, I was saying most people see it that way
[22:58:03] centrx: It's what's called an operator, like with telephones
[22:58:05] helpa: Why don't you try it and find out for yourself?
[22:58:13] Ox0dea: >> class String; alias / split end; 'axbxc' / ?x # centrx
[22:58:14] ruboto: Ox0dea # => ["a", "b", "c"] (https://eval.in/413360)
[22:58:29] pontiki: i know, but it's that very substantial difference in the meaning that makes the semantics so important to understand
[22:58:43] Ox0dea: Sensible operator overloading is sensible, but Perl's `x` operator is just goofy.
[22:58:47] allcentury: has joined #ruby
[22:59:07] baweaver: sensibilisms for the sensibility god
[22:59:22] pontiki: sense and sensibility and semantics
[22:59:25] centrx: http://mathworld.wolfram.com/Group.html
[22:59:48] baweaver: irctc025: try it out
[23:00:12] irctc025: yeah i did and im getting this: bad URI(is not URI?): https://api.parse.com/1/users/#{object_id}
[23:00:31] baweaver: Did you catch what I said above about single quotes?
[23:01:03] baweaver: because you haven't fixed your code yet if so
[23:01:11] csmb: has left #ruby: ("Leaving...")
[23:01:18] Soviet_jesus: ok so I've got another question: What I'm doing here seems just downright silly, is there a better data structure or way of working with arrays that will accomplish this in a less wretched way? The closest I got was to take something like a 20 line method and break it into several methods, but the number of instance variables exploded
[23:01:19] Soviet_jesus: https://gist.github.com/JasonMadeSomething/ca24af80f6e727f20887
[23:01:25] irctc025: i didnt catch it, so many ppls textsup there.
[23:01:33] baweaver: Watch closely
[23:01:41] baweaver: >> a = 'works'; 'This #{a}'
[23:01:42] ruboto: baweaver # => "This \#{a}" (https://eval.in/413361)
[23:01:47] baweaver: >> a = 'works'; "This #{a}"
[23:01:48] ruboto: baweaver # => "This works" (https://eval.in/413362)
[23:02:00] centrx: soviet_jesus, Looks like you just want a Hash?
[23:02:35] Ox0dea: >> "#\{}" # Watch closely for the teleporting backslash.
[23:02:36] ruboto: Ox0dea # => "\#{}" (https://eval.in/413363)
[23:02:44] centrx: soviet_jesus, header_indices = {}; header_indices[:address] = find_index
[23:02:58] baweaver: wait soviet_jesus, what's that header look like?
[23:03:03] baweaver: Post that as a comment to that gist
[23:03:15] baweaver: I bet you you just need to split the thing
[23:03:21] Soviet_jesus: header can be variable, I'll post a couple
[23:03:54] baweaver: either that or a good regex
[23:03:57] irctc025: so i need to add qoutes?
[23:04:11] baweaver: double quotes
[23:04:28] baweaver: irctc025: How much Ruby have you done? You're probably going to want to read through a basics guide.
[23:05:27] jwaldrip: has joined #ruby
[23:05:40] baweaver: What do rows look like?
[23:05:55] irctc025: HTTParty.put('https://api.parse.com/1/users/"#{object_id}"' like that?
[23:06:04] freerobby: has joined #ruby
[23:06:11] baweaver: read a basics guide
[23:06:43] baweaver: HTTParty.put("https://api.parse.com/1/users/#{object_id}")
[23:07:17] baweaver: So explain to me like I'm 5 what you want to do here soviet_jesus
[23:07:35] Ox0dea: irctc025: https://youtu.be/GlKL_EpnSp8?t=28
[23:07:45] pontiki: soviet_jesus: are you parsing a CSV file?
[23:07:49] baweaver: >> 'a,b,c,d,e'.split(',') # Though my instinct is that you need split
[23:07:50] ruboto: baweaver # => ["a", "b", "c", "d", "e"] (https://eval.in/413365)
[23:08:22] decaff: has joined #ruby
[23:08:27] pontiki: (or trying to build one)
[23:09:01] Soviet_jesus: So I'm given a file from one source or another, and I want to get rid of the columns I don't need, use the name to build a couple new fields, and then it also needs to be split up by when the records get mailed
[23:09:27] baweaver: CSV it is, you win pontiki
[23:09:40] shevy: pontiki knows the old things
[23:09:42] Soviet_jesus: pontiki: yeah exactly
[23:10:01] jerius: has joined #ruby
[23:10:04] pontiki: it wasn't until i looked at his header examples
[23:10:30] Soviet_jesus: I wrote the program before using no classes and just a bunch of functions, but it was a gargantuan mess and hard to look at
[23:10:58] charliesome: has joined #ruby
[23:10:58] pontiki: soviet_jesus: check out the csv standard library: http://ruby-doc.org/stdlib-2.2.2/libdoc/csv/rdoc/index.html
[23:11:19] pontiki: make something else do the work for you
[23:11:46] pontiki: i make shevy do the work for me
[23:12:23] einarj: has joined #ruby
[23:13:13] Ox0dea: > mfw nobody seems to have reimplemented `cat` in LOLCODE
[23:13:15] baweaver: >> ['a,b,c','1,2,3', '4,5,6', '7,8,9'].map { |col| col.split(',') }.transpose.map { |group| [group.first, group[1..-1]] }.to_h
[23:13:16] ruboto: baweaver # => {"a"=>["1", "4", "7"], "b"=>["2", "5", "8"], "c"=>["3", "6", "9"]} (https://eval.in/413366)
[23:13:41] Soviet_jesus: I'm currently only using CSV to iterate over the source file, write to the dest file, and grab the headers...i think...I've spent a lot of time looking at the CSV class and I'm not quite sure what other functionality I'm looking for
[23:14:31] pontiki: if you have the headers, why are you reparsing them with those regexps?
[23:14:34] Soviet_jesus: baweaver: that, 1000 times that
[23:15:05] shevy: pontiki \o/
[23:15:10] baweaver: >> ['a,b,c','1,2,3', '4,5,6', '7,8,9'].map { |col| col.split(',') }.transpose.map { |group| [group.first, group[1..-1]] }.to_h.reject { |k,v| k=='a' }.values.transpose.map { |v| v.join(',') }.join("\n")
[23:15:11] ruboto: baweaver # => "2,3\n5,6\n8,9" (https://eval.in/413367)
[23:15:37] Ox0dea: Methinks that didn't go as planned.
[23:15:41] baweaver: though the csv library probably has a nicer way to do that.
[23:15:56] baweaver: Ox0dea: it did
[23:16:07] Ox0dea: baweaver: You lost 1, 4, and 7?
[23:16:07] arooni-mobile: has joined #ruby
[23:16:27] pontiki: you take the parsed csv file structure and boom you have an array of hashes you can do anything with
[23:16:53] pontiki: stick 'em in a database, sql around with 'em
[23:17:02] Ox0dea: > Have you ever had a dream that you, um, you had, your, you, you could, you???ll do, you, you wants, you, you could do so, you , you???ll do, you could, you, you want, you want them, to do you so much, you could do anything?
[23:17:03] baweaver: cook 'em in a stew
[23:17:18] vF3hNGxc47h5: has joined #ruby
[23:17:26] Ox0dea: baweaver: https://www.youtube.com/watch?v=Pv61yEcOqpw
[23:17:48] baweaver: Not much for youtube at work
[23:18:01] Ox0dea: Well, I provided the transcript above.
[23:18:04] baweaver: running thousands of sync processes to try and break something, so waiting for that to finish.
[23:18:13] graydot: has joined #ruby
[23:18:53] luckyme: has joined #ruby
[23:18:54] banister: Ox0dea did you figure out yoru ancestor chain thing yet?
[23:19:09] banister: or at least have a look at remix? :P
[23:19:28] Soviet_jesus: pontiki: you've given me much to think about, thank you
[23:19:33] finisherr: Hello folks. I???m trying to instantiate a Net::HTTP object in my class but it???s giving me this error: ./jenkins-config:16:in `initialize': uninitialized constant MCJenkins::CredentialsHandler::NET (NameError
[23:19:35] Ox0dea: banister: remix does appear to cover any use cases I might bump into. :)
[23:19:56] banister: with the slight exception it probably no longer works... (hvaen't checked it tho..)\
[23:20:02] Ox0dea: finisherr: You probably want "Net", not "NET".
[23:20:15] finisherr: haha, facepalm
[23:21:07] Soviet_jesus: oh wait, to get the array of hashes do I need to slurp the whole file, or can I still go line by line....also at what point does slurping a CSV become problematic?
[23:22:51] edward__: has joined #ruby
[23:23:39] cyberarm: has joined #ruby
[23:23:44] Ox0dea: soviet_jesus: The only real benefit to converting it all at once is succinct code.
[23:24:27] nateberkopec: has joined #ruby
[23:25:07] DarthGandalf: has joined #ruby
[23:25:11] NeverDie: has joined #ruby
[23:25:34] tobyx: has joined #ruby
[23:25:47] youch: has joined #ruby
[23:25:58] Ox0dea: banister: Did you end up watching charliesome's talk?
[23:26:11] bascht: has joined #ruby
[23:26:19] banister: bits and pieces but it doesnt seem you can do very interesting things with frozen core
[23:26:56] Olipro: has joined #ruby
[23:27:04] omegamike: has joined #ruby
[23:27:21] ElderFain: has joined #ruby
[23:27:44] Ox0dea: >> Symbol.all_symbols.grep(/core#/)
[23:27:46] ruboto: Ox0dea # => [:"core#set_method_alias", :"core#set_variable_alias", :"core#undef_method", :"core#define_method", ...check link for more (https://eval.in/413369)
[23:27:49] unsymbol: has joined #ruby
[23:27:55] Ox0dea: I think some of those are worthy of the term.
[23:28:07] Ox0dea: Sans the superlative, I suppose.
[23:28:28] baweaver: has joined #ruby
[23:28:29] mwlang: has joined #ruby
[23:28:55] mwlang: How do I query the Ruby object space for all class objects declared under a module?
[23:29:42] mwlang: for example if I have module Soap ; end and I have class: Soap::Status; end; I want to query the Soap object and discover Soap::Status class.
[23:29:43] tekacs: has joined #ruby
[23:30:59] toretore: >> Numeric.constants.select{|k| Numeric.const_get(k).is_a?(Module) }
[23:31:00] ruboto: toretore # => [] (https://eval.in/413370)
[23:31:11] toretore: >> Numeric.constants
[23:31:12] ruboto: toretore # => [] (https://eval.in/413371)
[23:31:26] Soviet_jesus: alrighty then, I'm gonna go cry at my monitor till I figure this out... thanks all
[23:31:27] Ox0dea: mwlang: ObjectSpace.each_object(Soap::Status) ought to do.
[23:31:28] toretore: ok anyway you get the point
[23:32:21] ruboto: soviet_jesus # => 0 (https://eval.in/413372)
[23:33:18] Ox0dea: >> Object.const_set(Complex.constants(false)[0], 'foo') rescue $! # Wat.
[23:33:19] ruboto: Ox0dea # => #<NameError: wrong constant name compatible> (https://eval.in/413373)
[23:33:58] jerius: has joined #ruby
[23:34:08] Rollabunna: has joined #ruby
[23:34:48] Soviet_jesus: one last question, other than smashing my face into the docs till I can't read, what's a good way to learn to program better? It seems like practicing is just causing me to produce the same crap code
[23:35:24] baweaver: For Ruby, read others source and get real friendly with Enumerable, Array, Hash, and String
[23:35:49] Coraline: soviet_jesus: I recommend exercism.io
[23:35:51] BraddPitt: soviet_jesus write code, ask for a review, and like baweaver read others (good) source
[23:35:57] mwlang: Ox0dea: doesn???t seem to work: https://gist.github.com/mwlang/3e69c61efa8d63e9e72d
[23:35:58] baweaver: equally important is learning to test code
[23:36:06] mwlang: outputs nothing...
[23:36:35] Inside: has joined #ruby
[23:37:23] mwlang: soviet_jesus: online tutorials and screencasts yourself into oblivion.
[23:37:30] baweaver: for little weekly tips, look into avdi's Ruby Tapas
[23:37:48] baweaver: Good quick overview of various features
[23:37:54] baweaver: though I think it might be 2-3 a week
[23:37:55] mwlang: watch a screencast, then research what makes the approach they teach work then try to recreate it all blind (without help)
[23:37:59] baweaver: I lose track of everything I read
[23:38:11] lannonbr: has joined #ruby
[23:38:35] baweaver: Practical Object Oriented Design in Ruby and Eloquent Ruby are both great books.
[23:38:39] sgambino: has joined #ruby
[23:38:52] Ox0dea: mwlang: Foobar.constants.select { |c| Class === Foobar.const_get(c) }
[23:39:03] serivich: has joined #ruby
[23:39:12] baweaver: is_a? Class ?
[23:39:19] Soviet_jesus: Alright, so i'm on a somewhat right track. I just hate it when I write ugly code. I'll have to check those books out
[23:39:32] baweaver: safaribooksonline is your friend too
[23:39:44] baweaver: $29/month for unlimited access to anything O'Rielly has touched
[23:40:00] baweaver: including a lot of things from pragmatic programmers, no starch, and manning
[23:40:02] mwlang: Ox0dea: bam! just like that. thanks.
[23:40:55] whiteline: has joined #ruby
[23:41:38] Soviet_jesus: oh, cool...I tend to like those books
[23:42:06] baweaver: Avoid Packet Publishing like the plague
[23:42:17] baweaver: Apress isn't much better
[23:42:39] Tempesta: has joined #ruby
[23:43:02] baweaver: I tend to find the best are Addison Wesly (sp?) and No Starch, shortly followed by PragProg and O'Reilly
[23:43:18] djbkd_: has joined #ruby
[23:43:22] baweaver: Manning is hit or miss, depends on the book
[23:44:25] Soviet_jesus: baweaver: sweet, at least I know what I'm doing this weekend now lol
[23:44:41] baweaver: that and asking us here
[23:45:47] baweaver: really depends on what you want to do with the language though as to where you want to look past that
[23:47:11] shevy: soviet_jesus I think we all write ugly code
[23:47:15] grotewold: has joined #ruby
[23:47:44] shevy: what may help is to find structure in code, comments that are sensible and helpful, usage examples, ensuring that there are no bugs or at the least no crippling ones
[23:48:03] baweaver: I build beautiful code shevy, dam magnificent code
[23:48:05] shevy: to adopt styles that lead to less bugs and better, more readable and/or terser code
[23:48:11] yh__: How might I list all of the gems that are directly depended on in my Bundler project?
[23:48:12] shevy: yeah ok but
[23:48:15] shevy: a dam is simple
[23:48:18] shevy: try to fly to the moon with it
[23:48:25] baweaver: yh__ gemfile.lock
[23:48:26] yh__: bundle list # shows indirect dependencies too, which is not what I want
[23:48:36] shevy: beavers are "ecosystem engineers". I love that word
[23:48:49] yh__: baweaver: not all projects are locked
[23:48:56] yh__: I wish to cover all
[23:49:18] scottschecter: has joined #ruby
[23:49:27] baweaver: gemspec or gemfile
[23:49:38] baweaver: I would include nondirect if I were you
[23:49:45] baweaver: pretending they don't exist causes many woes.
[23:49:46] yh__: Huh? You don't even know my usecase
[23:50:00] mwlang: argh. Ox0dea your technique does work, but sadly Rails just in time autoload kills my idea dead in it???s tracks ??? not seeing descending classes until they???re accessed at least once.
[23:50:10] Ox0dea: That sucks.
[23:50:22] baweaver: yh__: I wonder why
[23:50:26] existensil: has joined #ruby
[23:50:41] yh__: baweaver: and whether it used gemspec or gemfile would depend upon if the gemfile specified gemspec within it
[23:50:44] baweaver: My psychic powers must be on the fritz again
[23:51:07] yh__: psychic powers not necessary, just looking for a solution to the very specific problem posed :+1:
[23:51:10] Ox0dea: mwlang: I'm sure $thing isn't double-dead, but it's bound to be hacky.
[23:51:29] baweaver: not really, but have fun with that.
[23:51:32] yh__: baweaver: to be perfectly honest, I wish bundler just provided a flag to bundle list that enabled this, alas, my
[23:51:35] yh__: oh, nvm.
[23:51:40] mwlang: yeah. it???s not all that important???a handful of objects, I set a self.fingerprint with a unique hash ???fingerprint??? that allows a Factory object to intelligently decide which Object to instantiate based on keys in a given hash.
[23:52:08] mwlang: what I figured I???d do was wire up a spec that checks all fingerprints defined to ensure that each is definitely unique.
[23:52:09] baweaver: now why bundler doesn't just install a manpage
[23:54:14] DoubleMalt: has joined #ruby
[23:54:27] saddad: has joined #ruby
[23:54:46] Ox0dea: mwlang: It seems you want to write a pseudo-integration test where a unit one would suffice.
[23:55:00] baweaver: really though, grep through gemfile or gemspec for it. show and list show everything
[23:55:33] banister: mwlang you could load them alll in an initializer if u really wanted to
[23:56:03] mwlang: Ox0dea: yeah, pretty much???its more a ???protect the next programmer from totally shooting himself in the foot??? test. :-D
[23:56:46] mwlang: banister: there???s a way to dip into the autoload stuff to see what???s been registered, but not loaded, but I don???t really want to get into any of that.
[23:56:54] baweaver: Unix has no such scruples. It's job, should you choose to use it as such, is to deliver Bullet from Gun to Foot as efficiently as possible.
[23:57:15] mwlang: it would be smarter to just go to a fail fast and loud in production should two objects have the exact same fingerprints.
[23:57:48] mwlang: everything pre-loads in production so it would make more sense to put it there if anywhere than resort to hackery.
[23:58:22] mwlang: I don???t mind getting hacky on a limited basis in specs when the intent can be made clear in a few lines of code and self-contained in the specs.
[23:58:26] mistermocha: has joined #ruby
[23:59:36] Ox0dea: mwlang: Still, it'd be more sensible to test your algorithm for generating fingerprints, no?
[23:59:50] jbw: has joined #ruby