« Back to channel list

#ruby - 03 June 2015

« Back 1 day Forward 1 day »
[00:00:12] jack_rabbit: has joined #ruby
[00:00:28] jhass: well, good thing to research would be how to get a list of ttys
[00:01:07] Exponential: has joined #ruby
[00:01:25] jerski: hey jhass
[00:01:36] jerski: seems you're the only one who's interested..
[00:02:18] jhass: you expect others to just repeat what I said or...?
[00:02:33] blandflakes: has joined #ruby
[00:03:02] _seanc_: He wants you to write the code for him :)
[00:03:15] _seanc_: IRC = I Rarely Code
[00:03:35] _seanc_: I Request Code is mo bettah
[00:04:08] sevenseacat: has joined #ruby
[00:05:34] datanoise: has joined #ruby
[00:05:43] kinduff: has joined #ruby
[00:06:02] ghr: has joined #ruby
[00:06:24] jackjackdripper1: has joined #ruby
[00:07:53] dopieee: has joined #ruby
[00:08:00] jerski: i haven't tried anything yet.. still learning how to program
[00:08:07] baweaver|work: has joined #ruby
[00:08:16] jhass: the key is to break down your problem
[00:08:29] jhass: that parameter parsing? irrelevant for now
[00:08:35] jhass: that CSV stuff? irrelevant for now
[00:08:49] jhass: 3 columns or numbering? irrelevant for now
[00:08:58] jhass: your base problem is to get a list of ttys
[00:10:43] Azure: has joined #ruby
[00:11:07] shadoi: jerski: also, why do you need a list of all ttys?
[00:11:18] shadoi: Don't you just want the current one?
[00:12:04] jhass: sounds like homework
[00:12:32] jhass: replicating w or whatever
[00:12:42] jackjackdripper: has joined #ruby
[00:13:10] balazs: has joined #ruby
[00:14:25] jerski: i'm just experimenting and learning the language in linux environment
[00:14:32] jhass: that's cool
[00:14:36] jerski: sorry if i bother you guys
[00:15:05] jhass: you're welcome
[00:15:14] charliesome: has joined #ruby
[00:16:37] duderonomy: has joined #ruby
[00:17:12] mary5030: has joined #ruby
[00:17:45] StephenOTT: has joined #ruby
[00:18:19] MatthewsFace: has joined #ruby
[00:19:25] bricker: has joined #ruby
[00:19:42] spyderman4g63: has joined #ruby
[00:19:54] rushed: has joined #ruby
[00:20:29] jackjackdripper1: has joined #ruby
[00:23:32] karpuragauram: has joined #ruby
[00:24:14] dopieee: has joined #ruby
[00:24:35] keen___________4: has joined #ruby
[00:25:07] segfalt: has joined #ruby
[00:27:10] starfox_sf: has joined #ruby
[00:30:29] bkxd: has joined #ruby
[00:30:44] northfurr: has joined #ruby
[00:31:18] snophey: has joined #ruby
[00:32:27] jackjackdripper: has joined #ruby
[00:32:44] fgo: has joined #ruby
[00:35:06] jpfuentes2: has joined #ruby
[00:36:08] Akagi201: has joined #ruby
[00:36:39] Akagi201: has joined #ruby
[00:37:58] Vile`: has joined #ruby
[00:38:31] jackjackdripper: has joined #ruby
[00:40:10] di19026: has joined #ruby
[00:40:17] iamninja: has joined #ruby
[00:40:27] jackjackdripper: has joined #ruby
[00:40:53] di19026: Hi guys, I???m??? Vaguely newish to ruby, and I???m having a weird encoding problem resulting in the following error:
[00:40:54] di19026: ERROR: Encoding::CompatibilityError: incompatible character encodings: UTF-8 and ASCII-8BIT
[00:41:12] DynamicMetaFlow: has joined #ruby
[00:41:14] baweaver_: has joined #ruby
[00:41:35] di19026: This is coming from a system call- I???m running a knife ec2 server create command, which outputs in color, so I kinda think that???s the problem.
[00:42:02] di19026: I found a suggestion that setting the encoding via environment variable as such:
[00:42:02] di19026: ENV['LC_CTYPE']='en_US.UTF-8'
[00:42:10] di19026: ???would help, but it didn???t make a difference.
[00:42:12] di19026: Any thoughts?
[00:42:49] di19026: I???m on Amazon linux, ruby 2.0.0p643 (2015-02-25) [x86_64-linux]
[00:43:27] alphaatom: has joined #ruby
[00:44:16] di19026: Oh, I also tried using exec instead of system. I???m about to try backticks.
[00:44:40] Mongey__: has joined #ruby
[00:45:04] jhass: what's p Encoding.default_external and p Encoding.default_internal?
[00:45:30] charliesome: has joined #ruby
[00:45:34] mmazing: has joined #ruby
[00:45:56] di19026: irb(main):003:0> p Encoding.default_external
[00:45:57] di19026: #<Encoding:UTF-8>
[00:45:57] di19026: => #<Encoding:UTF-8>
[00:46:08] di19026: irb(main):004:0> p Encoding.default_internal
[00:46:29] di19026: Perhaps I need to set Encoding.default_internal to UTF-8?
[00:46:43] jhass: shouldn't matter, falls back to that on 2.0
[00:46:57] jhass: so your call fails in that irb shell too with the same error?
[00:47:25] di19026: i haven???t actually tried it in an IRB shell, it takes a few minutes to run. hang on, lemme try it and see what happens
[00:47:34] di19026: (by the way, backticks didn???t work either)
[00:48:35] robustus: has joined #ruby
[00:48:42] di19026: Okay, running in irb now. Stand by and we???ll see what happens.
[00:48:56] tjbiddle: has joined #ruby
[00:49:08] CustosLimen: has joined #ruby
[00:49:12] baweaver_: has joined #ruby
[00:49:28] kubunto: has joined #ruby
[00:49:42] kubunto: is it possible to manipulate EXIF info in ruby
[00:50:08] workmad3: has joined #ruby
[00:50:14] jhass: kubunto: sure, there should a couple gems for it, just search on rubygems.org
[00:50:17] di19026: Nope, no dice.
[00:50:20] di19026: Same problem in IRB
[00:50:28] kinduff: has joined #ruby
[00:50:33] jhass: able to share the exact line you run?
[00:50:54] veduardo: has joined #ruby
[00:51:03] Aswebb_: has joined #ruby
[00:51:08] fujimura: has joined #ruby
[00:51:15] di19026: I???ll have to pull out a few company bits
[00:51:31] di19026: Are you familiar with knife?
[00:51:41] kubunto: jhass: no dice
[00:52:07] snophey: has left #ruby: ()
[00:52:41] di19026: Okay, here???s the line I???m running:
[00:52:41] di19026: knife ec2 server create -Z us-west-2b -f c3.2xlarge --ssh-user ec2-user?? -r 'role[BaseClientAWS],role[LoadTest],role[Auth]' -g sg-[group] -s subnet-[subnet] -T Name=[hostname] -N [hostname] --image ami-[ami] --region us-west-2 -F json --aws-credential-file ~/.aws/credentials --user-data chefip.cloudinit > /tmp/[hostname]-build.log
[00:52:49] kubunto: jhass: may i ask you a non ruby question in private?
[00:53:01] Vile`: has joined #ruby
[00:53:23] di19026: Unfortunately it???s not particularly telling if you don???t know chef/knife stuff, but it normally feeds out a ton of status update things in color while it builds.
[00:53:25] jhass: kubunto: no, too late, anything I can answer you can ask the channel
[00:53:37] jhass: kubunto: I get 22 gems if I search for exif on rubygems.org
[00:54:03] kubunto: so did i, most if not all are readers only
[00:54:25] kubunto: it was also a tourist question about germany
[00:54:29] di19026: My original command had a pipe to tee instead of a redirect, but I thought maybe if I didn???t send the output anywhere ruby cared about it would help...
[00:54:33] jhass: di19026: mmh, you're sure the exception is raised by calling that line and not _printed_ (=happening in) that call?
[00:54:39] di19026: Oh, I also tried forcing TERM to xterm
[00:55:10] di19026: Meaning would I get the error if I ran it normally in my shell?
[00:55:13] Oog: has joined #ruby
[00:55:44] di19026: I???m??? 99.9% sure of that.
[00:55:45] jhass: well, most likely
[00:55:59] di19026: It???s been a long day so I???m willing to humor the possibility that I made some dumbass mistake though
[00:56:21] di19026: I can try it, it???s just that it takes like 3 minutes to see this thing fail or not fail
[00:56:33] bkxd: has joined #ruby
[00:56:35] di19026: Let me see if I can find some less onerous knife command to test with...
[00:57:10] jhass: wrap the call in irb in begin; ...; rescue Exception; puts "here"; end;
[00:57:11] vmmf08: has joined #ruby
[00:57:37] jhass: if you see "here" printed your assumption is right, if you still see the backtrace, it's happening inside the command
[00:57:45] towski__: how do I get the non modulo part of a modulo
[00:57:49] di19026: okay, trying that in irb
[00:57:59] di19026: Ahh, good idea
[00:58:01] NeverDie: has joined #ruby
[00:58:08] jhass: towski__: the quotient? ;)
[00:58:22] towski__: thank you :) yes, I was spacing
[00:58:32] di19026: So, interestingly, I tried running another command that I knew would generate color output with knife and it didn???t cause a problem.
[00:59:28] chouhoul_: has joined #ruby
[00:59:38] di19026: I still got the error (and no ???here???) with the begin/rescue wrapper.
[01:00:24] jhass: then I think my guess is right, if it's working inside your shell, there's some environment set differently
[01:00:41] jhass: first think to compare would be locale to puts `locale`
[01:01:24] _seanc_: has joined #ruby
[01:01:34] di19026: Those look identical
[01:01:43] jhass: mh, strange
[01:01:57] di19026: Everything is en_US.UTF-8 except for LC_ALL which is blank
[01:02:06] di19026: I think you???re on to something though???
[01:02:37] di19026: I???m gonna surf through the whole environment, let me see if anything interesting comes up
[01:02:59] jhass: yeah good luck, gonna be the needle in the haystack I'm afraid
[01:03:38] di19026: Yeah??? Well here???s something. Bash is set to /bin/sh rather that /bin/bash in irb
[01:04:30] jhass: uh, I sincerely hope that's not it
[01:04:40] jhass: would surprise me a lot
[01:04:43] di19026: ???okay yeah that would be pretty dumb
[01:04:58] di19026: I am pretty tired, I apologize for dumbness :D
[01:05:05] jhass: well, though, parsing may differ
[01:05:15] jhass: commandline parsing that is
[01:05:39] jhass: system(%(/bin/bash -c '...')) would be the way to rule that out
[01:06:21] jhass: though I'd still be surprised
[01:06:30] di19026: Yeah, the environments are absolutely identical otherwise. Even my path is there.
[01:07:03] bkxd: has joined #ruby
[01:07:07] ghr: has joined #ruby
[01:07:15] di19026: Okay, this one???s a longshot, but since it???s an encoding thing, maybe it doesn???t like the ~ in my path.
[01:07:20] di19026: in my command I mean
[01:07:54] di19026: Trying now without that
[01:08:17] Soda: has joined #ruby
[01:08:46] jhass: >> "~".ord
[01:08:47] ruboto: jhass # => 126 (https://eval.in/374568)
[01:08:57] jhass: thought so, that's totally in ASCII
[01:09:04] di19026: irb(main):001:0> "~".ord
[01:09:24] di19026: Yeah, no dice, same error
[01:09:32] j_mcnally: has joined #ruby
[01:09:55] DynamicMetaFlow: has joined #ruby
[01:10:01] jhass: out of clues here I'm afraid
[01:10:21] j_mcnally: has joined #ruby
[01:10:31] Exponential: has joined #ruby
[01:10:31] di19026: I guess I???ll have to give #chef a try...
[01:10:35] jhass: knife authors if confronted with the backtrace might have some better chances at helping you
[01:10:50] Torrieri: has joined #ruby
[01:10:50] Torrieri: has joined #ruby
[01:11:11] jhass: yeah, just idle there for a day, repeat the question every 6 hours or so
[01:11:16] blandflakes: has joined #ruby
[01:11:20] jhass: IRC's slow sometimes
[01:11:36] balazs: has joined #ruby
[01:12:40] blandflakes: has joined #ruby
[01:13:24] rodfersou: has joined #ruby
[01:13:44] Rubie: has joined #ruby
[01:14:11] claptor: has joined #ruby
[01:14:31] jespada: has joined #ruby
[01:14:35] chouhoulis: has joined #ruby
[01:15:12] Cache_Money: has joined #ruby
[01:16:28] jackjackdripper1: has joined #ruby
[01:16:39] Elboerea: has joined #ruby
[01:17:12] amclain: has joined #ruby
[01:18:28] di19026: @jhass - the #chef guys had the answer! coderanger: di19026: Use mixlib-shellout
[01:18:52] di19026: I haven???t actually implemented it yet, it???s gonna take me a few minutes, but they knew immediately??? So I???m pretty confident that???s it.
[01:18:55] di19026: Thanks for your help!
[01:19:15] tjbiddle: has joined #ruby
[01:19:38] aaeron: has joined #ruby
[01:19:56] duderonomy: has joined #ruby
[01:20:10] veduardo: has joined #ruby
[01:20:24] caseypatrickdris: has joined #ruby
[01:22:39] bogdanteleaga: has joined #ruby
[01:22:44] Musashi007: has joined #ruby
[01:23:14] dhosterman: has joined #ruby
[01:23:34] jackjackdripper: has joined #ruby
[01:23:38] dhosterman: has left #ruby: ()
[01:23:59] LMity: has joined #ruby
[01:26:41] bantic: has joined #ruby
[01:27:07] aaeron: has joined #ruby
[01:29:31] segfalt: has joined #ruby
[01:29:32] mrmargolis: has joined #ruby
[01:30:38] aaeron: has joined #ruby
[01:31:13] Torrieri: has joined #ruby
[01:32:13] sandstrom: has joined #ruby
[01:33:21] Brozo: has joined #ruby
[01:35:52] RegulationD: has joined #ruby
[01:35:56] mrsolo: has joined #ruby
[01:37:39] Lewix: has joined #ruby
[01:39:44] CloCkWeRX: has joined #ruby
[01:40:29] spetryk: has joined #ruby
[01:47:43] bantic: has joined #ruby
[01:47:57] jgt: has joined #ruby
[01:49:28] redlegion: has joined #ruby
[01:49:34] pepelui: has joined #ruby
[01:50:04] fgo: has joined #ruby
[01:50:50] Matachines: has joined #ruby
[01:51:04] pepelui: has left #ruby: ()
[01:51:17] Matachines: has joined #ruby
[01:51:35] pontiki: has joined #ruby
[01:51:54] fujimura: has joined #ruby
[01:52:01] jhooker: has joined #ruby
[01:53:49] MaikV: has joined #ruby
[01:54:00] DynamicMetaFlow: has joined #ruby
[01:54:12] axl_: has joined #ruby
[01:54:47] aaeron: has joined #ruby
[01:57:45] Yzguy: has joined #ruby
[01:58:16] hazelux: has joined #ruby
[01:58:20] laurentide: has joined #ruby
[01:59:24] aaeron: has joined #ruby
[01:59:24] jmhmccr: has joined #ruby
[01:59:35] iamninja: has joined #ruby
[02:00:19] dannycast: has joined #ruby
[02:00:46] dannycast: has left #ruby: ()
[02:02:22] briandavis: has joined #ruby
[02:03:46] [H]unt3r: has joined #ruby
[02:04:28] Musashi007: has joined #ruby
[02:04:41] nonparfumee: has joined #ruby
[02:05:47] rushed: has joined #ruby
[02:05:50] tjbiddle: has joined #ruby
[02:05:55] dfockler: has joined #ruby
[02:07:55] ghr: has joined #ruby
[02:09:02] pikos: has joined #ruby
[02:09:49] shazaum_: has joined #ruby
[02:10:12] shazaum_: has joined #ruby
[02:10:59] altrex: has joined #ruby
[02:11:33] dgutierrez1287: has joined #ruby
[02:12:08] bigkevmcd: has joined #ruby
[02:12:56] altrex: has left #ruby: ()
[02:14:57] Brozo: has left #ruby: ("Leaving...")
[02:15:29] DynamicMetaFlow: has joined #ruby
[02:15:58] hyperjuice: has joined #ruby
[02:16:19] mrsolo: has joined #ruby
[02:16:43] aaeron: has joined #ruby
[02:17:29] erichmenge: has joined #ruby
[02:18:18] idafyaid: has joined #ruby
[02:18:43] idafyaid: has joined #ruby
[02:20:03] pikos: has joined #ruby
[02:22:54] Ox0dea: has joined #ruby
[02:24:45] tubuliferous_: has joined #ruby
[02:27:01] zrl: has joined #ruby
[02:27:30] chouhoulis: has joined #ruby
[02:28:15] chouhoulis: has joined #ruby
[02:30:18] mary5030: has joined #ruby
[02:33:39] ur5us_: has joined #ruby
[02:33:48] veduardo: has joined #ruby
[02:36:22] olistik: has joined #ruby
[02:40:13] Aswebb_: has joined #ruby
[02:40:30] djbkd: has joined #ruby
[02:40:50] pdoherty: has joined #ruby
[02:41:23] Spami: has joined #ruby
[02:41:46] charliesome: has joined #ruby
[02:42:07] Cache_Money: has joined #ruby
[02:42:14] snapcase: has joined #ruby
[02:42:26] byonic: has joined #ruby
[02:43:39] Channel6: has joined #ruby
[02:44:55] darkf: has joined #ruby
[02:45:06] Brozo: has joined #ruby
[02:45:25] aphprentice_: has joined #ruby
[02:47:39] bantic: has joined #ruby
[02:47:44] bb010g: has joined #ruby
[02:48:44] mike___1234: has joined #ruby
[02:51:01] jgpawletko: has joined #ruby
[02:52:07] chouhoulis: has joined #ruby
[02:53:46] tomeara: has joined #ruby
[02:56:59] jfarmer: has joined #ruby
[02:57:02] DynamicMetaFlow: has joined #ruby
[02:59:20] aef: has joined #ruby
[02:59:39] duderonomy: has joined #ruby
[03:01:35] codeFiend: has joined #ruby
[03:01:45] havenwood: has joined #ruby
[03:03:49] blandflakes: has joined #ruby
[03:05:16] Rubie: has joined #ruby
[03:05:23] n80: has joined #ruby
[03:07:38] zoidfarb: has joined #ruby
[03:08:50] ghr: has joined #ruby
[03:09:02] zoidfarb: Hello, I'd like to use 'rsvg-convert' to convert some SVG files to PNGs. Can somebody point me to some docs for how to do that in ruby? Are there ruby bindings for rsvg, or should I just call out with the shell?
[03:11:06] tkuchiki: has joined #ruby
[03:11:40] braincrash: has joined #ruby
[03:12:02] TheNet: has joined #ruby
[03:12:29] joneshf-laptop: has joined #ruby
[03:12:51] macmartine: has joined #ruby
[03:14:59] claptor: has joined #ruby
[03:15:11] yorickpeterse: anybody here familiar with Ruby(Gems) no longer dumping compiled extensions into the lib/ directory? I have some users reporting a extensions is only copied into ~/.gem/...../extensions and the gem local ./ext/ directory
[03:15:36] yorickpeterse: https://github.com/YorickPeterse/ruby-ll/issues/15 basically this
[03:16:17] kcantwel: has joined #ruby
[03:16:54] mrmargolis`: has joined #ruby
[03:17:02] swgillespie: has joined #ruby
[03:17:28] moretti: has joined #ruby
[03:17:33] car: has joined #ruby
[03:18:14] fujimura: has joined #ruby
[03:19:31] lessless: has joined #ruby
[03:21:52] Olipro_: has joined #ruby
[03:22:03] sandstrom: has joined #ruby
[03:24:30] RegulationD: has joined #ruby
[03:25:51] iamninja: has joined #ruby
[03:27:00] Limix: has joined #ruby
[03:29:26] rkazak: has joined #ruby
[03:30:10] jenrzzz: has joined #ruby
[03:34:21] Elboerea: Any good article on unit testing?
[03:34:48] tbuehlmann: has joined #ruby
[03:36:04] Yzguy: has joined #ruby
[03:36:20] mark[oz]: has joined #ruby
[03:37:01] jgt: has joined #ruby
[03:38:17] spider-mario: has joined #ruby
[03:38:18] gambl0re: has joined #ruby
[03:38:52] mark[oz]: has joined #ruby
[03:39:09] TheBrayn: has joined #ruby
[03:41:01] freerobby: has joined #ruby
[03:41:05] chouhoul_: has joined #ruby
[03:42:27] byprdct: has joined #ruby
[03:44:01] bantic: has joined #ruby
[03:47:19] nedp: has joined #ruby
[03:48:07] SalexW: has joined #ruby
[03:48:33] someword: has joined #ruby
[03:49:00] mwlang: has joined #ruby
[03:49:06] iamjarvo: has joined #ruby
[03:49:45] mcpierce: has joined #ruby
[03:50:29] David_H__: has joined #ruby
[03:50:59] mwlang: does anyone know offhand what encoding Ruby 1.8.6 and Rails 1.2 used on Windows to write log files that contain Danish messages? Offering a bounty of one free beer delivered via PayPal if you actually do know because this has got to be the most obscure thing for anyone to know off the top of their head! :-)
[03:52:59] yorickpeterse: 1.8.6 didn't have encodings
[03:53:05] eam: mwlang: uhhhh I'd assume UTF-16
[03:53:15] Exponential: has joined #ruby
[03:53:50] mwlang: eam: nope. ASCII incompatible encoding needs binmode (ArgumentError)
[03:53:58] Hanmac: Ruby1.8.6 and Rails 1.2 are long dead!
[03:54:12] mwlang: yorickpeterse: true???but still there???s a binary representation scheme going on.
[03:54:24] mwlang: hanmac: to us, anyway. ;-)
[03:54:25] eam: mwlang: why is that a nope?
[03:55:16] mwlang: eam: well, maybe not a ???nope??? but more like, Ruby 2.x doesn???t encode with that: data = File.read(File.join(log_path, 'productio.log'), encoding: "utf-16")
[03:55:47] mwlang: I may just encode and replace invalids with spaces.
[03:55:58] bnagy: mwlang: try binread?
[03:56:26] eam: have you looked at the logfile to verify it has text?
[03:56:54] someword: has joined #ruby
[03:57:04] bnagy: don't think binread has the encoding options, you'll have to play with encodings once it's read in
[03:57:11] mwlang: eam: definitely has text. head and tail confirm its a normal looking log file.
[03:57:58] mwlang: it???ll actually read portions of the file if I head/tail a few lines???but it???s bombing on some SQL statements that are inserting text written in Danish.
[03:58:52] fedexo: has joined #ruby
[04:00:55] mwlang: I???m just going to ignore the Danish???that info is not important to extract from the logs. I???m chasing timestamps and controller actions and parameters: File.read(File.join(log_path, 'production.log')).force_encoding('BINARY').encode('UTF-8', :undef => :replace, :replace => '')
[04:01:04] mwlang: that latter does the trick nicely.
[04:02:20] gix: has joined #ruby
[04:03:36] yfeldblum: has joined #ruby
[04:04:08] LMity2: has joined #ruby
[04:04:13] hahuang65: has joined #ruby
[04:06:27] 7YUAAGHOB: has joined #ruby
[04:08:13] Hijiri: has joined #ruby
[04:08:31] justintv90: has joined #ruby
[04:10:32] m0r0n: has joined #ruby
[04:10:57] m0r0n: Hello. Can someone help me understand why ln42 cannot be executed? https://gist.github.com/Zilenc3/1beb79c01495722b09af
[04:11:23] m0r0n: It's trying to use a protected method which is defined as "A protected method can be invoked only by objects of the defining class and its subclasses. Access is kept within the family."
[04:11:33] sevenseacat: m0r0n: because you made it protected
[04:11:48] m0r0n: Isn't "box" an object of the defining class?
[04:11:48] sevenseacat: meaning you can only call it from within the class/subclasses
[04:11:52] nonparfumee: has joined #ruby
[04:12:21] sevenseacat: from *within* the onject of the defining class
[04:12:31] bantic: has joined #ruby
[04:12:35] m0r0n: sevenseacat, So then can you help me understand what private is then?
[04:12:36] sevenseacat: other methods inside Box can call printArea. from outside, you can't.
[04:12:45] sevenseacat: private methods can only be called on self.
[04:12:50] sevenseacat: cannot be called with an explicit receiver
[04:12:56] tubuliferous_: has joined #ruby
[04:13:13] sevenseacat: eg. if box had a reference to box2, then it couldnt call box2.getWidth
[04:13:27] sevenseacat: because getWidth is private
[04:13:49] Elboerea: And you can't call it with self either, since self is a variable.
[04:13:51] Musashi007: has joined #ruby
[04:14:18] yorickpeterse: err fuck wrong one
[04:14:36] shevy: m0r0n in ruby it is a bit weird because you could always use .send to invoke any method
[04:14:58] sevenseacat: this is why its good practice to only use public_send unless you're sure you need send
[04:15:38] varunwachaspati: has joined #ruby
[04:15:52] shevy: https://github.com/ruby/ruby/blob/trunk/ChangeLog
[04:15:55] martinjungblut: has joined #ruby
[04:15:58] shevy: Koichi Sasada <ko1@atdot.net>
[04:16:09] shevy: `flag' contains several categories of attributes and it makes us confusion (at least, I had confused).
[04:16:10] mdz_: has joined #ruby
[04:16:17] shevy: "I did not know what "NOEX" stands for."
[04:16:34] shevy: I asked Matz (who made this name) and his answer was "Nothing". "At first, it meant NO EXport (private), but the original meaning was gone."
[04:16:38] shevy: japanese hackers are funny :)
[04:17:19] m0r0n: I'm still not following sevenseacat. This has always been an issue for me to understand. So you said if box had a reference to box2, then it couldn't call box2.getWidth. Why can't box call box.getWidth then?
[04:17:48] sevenseacat: because box is an explicit receiver
[04:18:04] sevenseacat: i think you're confusing things
[04:18:10] sevenseacat: box can call getWidth on itself
[04:18:23] sevenseacat: but it cannot call getWidth on another box
[04:18:40] nahtnam: has joined #ruby
[04:18:47] sevenseacat: but if it was a protected method, it could.
[04:19:17] towski_: has joined #ruby
[04:19:17] shevy: m0r0n see this one here works: https://gist.github.com/shevegen/e95ddabbca4cf6a891ee
[04:19:22] _djbkd: has joined #ruby
[04:20:31] shevy: and why private does not work, well you defined it as private, so you can't directly invoke that method from the outside
[04:20:36] m0r0n: shevy, I understand how methods inside a class can call any method inside. What I can't figure out is why I can't do this "box.getWidth()"
[04:20:49] Exponential: has joined #ruby
[04:20:50] shevy: you can call private methods m0r0n?
[04:21:07] sevenseacat: because you're calling getWidth on box, which means box is the receiver of the method
[04:21:15] sevenseacat: you cannot call private methods with a receiver
[04:22:44] shevy: m0r0n tenderlove explained it nicely here http://tenderlovemaking.com/2012/09/07/protected-methods-and-ruby-2-0.html
[04:22:59] sevenseacat: shevy's example works because printArea is being called without a receiver
[04:23:20] Cache_Money: has joined #ruby
[04:23:27] sevenseacat: though you still couldnt call printArea2 like that
[04:23:30] David_H_Smith: has joined #ruby
[04:23:53] sevenseacat: oh i misread the gist
[04:23:55] sevenseacat: yes you could do that
[04:24:17] sevenseacat: shevy: your example is just confusing.
[04:24:45] mark[oz]: has joined #ruby
[04:24:59] shevy: I don't think I actually ever used protected
[04:25:08] sevenseacat: i dont use it often either
[04:25:09] David_H__: has joined #ruby
[04:25:26] michael_mbp: has joined #ruby
[04:26:41] CloCkWeRX: has joined #ruby
[04:28:18] nahtnam: has joined #ruby
[04:29:07] Aswebb_: has joined #ruby
[04:30:05] mark[oz]: has joined #ruby
[04:31:32] mrsolo: has joined #ruby
[04:32:34] jaequery: has joined #ruby
[04:37:15] MaikV: has joined #ruby
[04:37:16] blue_deref: has joined #ruby
[04:37:57] kinduff: has joined #ruby
[04:37:57] kinduff: has joined #ruby
[04:38:07] Oog: has joined #ruby
[04:38:35] bkxd: has joined #ruby
[04:38:36] gianlucadv: has joined #ruby
[04:40:16] mistermocha: has joined #ruby
[04:42:36] ledestin: has joined #ruby
[04:43:09] sigden: has joined #ruby
[04:43:15] Vile`: has joined #ruby
[04:44:17] JohnBat26: has joined #ruby
[04:45:02] i8igmac: has joined #ruby
[04:47:47] ledestin_: has joined #ruby
[04:48:50] last_staff: has joined #ruby
[04:50:06] shevy: https://metacpan.org/pod/release/RJBS/perl-5.22.0/pod/perldelta.pod
[04:50:14] Scripore: has joined #ruby
[04:50:15] shevy: New double-diamond operator
[04:50:22] shevy: "<<>> is like <> but uses three-argument open to open each file in @ARGV."
[04:50:27] shevy: so they had the spaceship operator
[04:50:29] martinjungblut: has left #ruby: ()
[04:50:37] shevy: how do they now call <<>>? BORG cube?
[04:50:50] sevenseacat: well to be fair spaceship is <=>
[04:52:58] macmartine: has joined #ruby
[04:53:28] eam: <> is the diamond operator
[04:54:11] eam: I never considered that <> might use 2arg open
[04:54:17] shevy: "CGI.pm HAS BEEN REMOVED FROM THE PERL CORE"
[04:54:39] shevy: I remember having written perl .cgi scripts in the most ancient days
[04:55:03] GPrime: has joined #ruby
[04:55:08] shevy: "The rationale for this is that the HTML generation functions of CGI.pm are an obfuscation at best and a maintenance nightmare at worst. You should be using a template engine for better separation of concerns."
[04:55:13] shevy: https://metacpan.org/pod/CGI#CGI.pm-HAS-BEEN-REMOVED-FROM-THE-PERL-CORE
[04:55:22] shevy: how is this even related
[04:55:36] shevy: now you have to use a "template engine"... is this like embedding stuff? like erb?
[04:55:40] eam: just split "&" on QUERY_STRING
[04:55:46] eam: who needs a module
[04:56:33] gianlucadv: has joined #ruby
[04:56:59] mark[oz]: has joined #ruby
[04:57:02] eam: hey that's interesting, fileno works on directory handles
[04:57:10] shevy: everything is a file?
[04:57:19] eam: directory handles are an opaque type
[04:57:21] shevy: will it blend
[04:57:34] Oog: has joined #ruby
[04:57:39] aaeron: has joined #ruby
[04:57:40] shevy: everything is a cat!
[04:57:49] olegtc: has joined #ruby
[04:58:43] olegtc: good morning
[05:00:47] aaeron_: has joined #ruby
[05:01:53] Jandre: has joined #ruby
[05:03:08] gianlucadv: has joined #ruby
[05:03:19] sandstrom: has joined #ruby
[05:04:15] pontiki: has joined #ruby
[05:07:13] bluOxigen: has joined #ruby
[05:07:18] macmartine: has joined #ruby
[05:07:44] jgt: has joined #ruby
[05:08:23] theery: has joined #ruby
[05:10:13] ghr: has joined #ruby
[05:11:18] yardenbar: has joined #ruby
[05:11:29] sigden: has joined #ruby
[05:12:16] clauswitt: has joined #ruby
[05:12:34] Limix: has joined #ruby
[05:13:23] RegulationD: has joined #ruby
[05:14:23] tkuchiki: has joined #ruby
[05:15:12] jenrzzz: has joined #ruby
[05:16:25] Limix: has joined #ruby
[05:17:53] andereld: has left #ruby: ()
[05:18:09] Limix: has joined #ruby
[05:18:30] dgutierrez1287: has joined #ruby
[05:22:12] Palmer11: has joined #ruby
[05:22:16] jack_rabbit: has joined #ruby
[05:22:56] lxsameer: has joined #ruby
[05:25:35] LMity: has joined #ruby
[05:26:40] aganov: has joined #ruby
[05:28:31] Brozo: has joined #ruby
[05:29:44] mary5030: has joined #ruby
[05:29:48] kinduff: has joined #ruby
[05:30:40] dionysus69: has joined #ruby
[05:32:05] fgo: has joined #ruby
[05:32:48] revath: has joined #ruby
[05:34:35] spicymagpie: has joined #ruby
[05:35:21] jenrzzz: has joined #ruby
[05:39:05] Ropeney: has joined #ruby
[05:40:21] tagrudev: has joined #ruby
[05:42:34] jokester: has joined #ruby
[05:43:31] jokester: has joined #ruby
[05:43:53] sepp2k: has joined #ruby
[05:44:09] dfockler: has joined #ruby
[05:45:19] skade: has joined #ruby
[05:47:16] psye: has joined #ruby
[05:47:30] fusillicode: has joined #ruby
[05:47:36] fusillicode: has left #ruby: ()
[05:48:48] Ox0dea: has left #ruby: ("WeeChat 1.2-rc1")
[05:51:27] glavkos: has joined #ruby
[05:51:27] balazs: has joined #ruby
[05:54:08] iamninja: has joined #ruby
[05:55:57] gianlucadv: has joined #ruby
[05:56:06] riotjones: has joined #ruby
[05:56:27] justintv90: has joined #ruby
[05:58:31] hagabaka: has joined #ruby
[05:59:24] apofis: has joined #ruby
[05:59:56] sigurding: has joined #ruby
[06:00:27] timonv: has joined #ruby
[06:00:58] nfk: has joined #ruby
[06:01:06] tubuliferous_: has joined #ruby
[06:02:17] boozehound: has joined #ruby
[06:02:18] fujimura: has joined #ruby
[06:02:46] multi_io: has joined #ruby
[06:02:52] riotjones: has joined #ruby
[06:03:23] Oog: has joined #ruby
[06:04:43] cryptarium: has joined #ruby
[06:04:57] fujimura_: has joined #ruby
[06:05:38] sinkensabe: has joined #ruby
[06:06:08] Scripore: has joined #ruby
[06:06:16] glavkos: has left #ruby: ()
[06:06:17] chinmay_dd: has joined #ruby
[06:07:40] allomov: has joined #ruby
[06:10:18] bruno-: has joined #ruby
[06:10:55] Pupeno: has joined #ruby
[06:10:55] Pupeno: has joined #ruby
[06:10:58] ghr: has joined #ruby
[06:11:20] randomizer: has joined #ruby
[06:12:08] kinduff: has joined #ruby
[06:12:09] kinduff: has joined #ruby
[06:13:41] kp666: has joined #ruby
[06:16:13] workmad3: has joined #ruby
[06:16:26] helpa: has joined #ruby
[06:16:33] Oog: has joined #ruby
[06:16:33] greenbagels_: has joined #ruby
[06:17:21] datanoise: has joined #ruby
[06:17:48] Aswebb_: has joined #ruby
[06:18:51] Exponential: has joined #ruby
[06:19:02] havenwood: has joined #ruby
[06:19:25] Mon_Ouie: has joined #ruby
[06:20:55] Exponential: has joined #ruby
[06:22:44] RahulT: has joined #ruby
[06:24:56] sandstrom: has joined #ruby
[06:25:50] wenshan: has joined #ruby
[06:28:57] Rubie: has joined #ruby
[06:31:37] haraoka: has joined #ruby
[06:31:46] clauswitt: has joined #ruby
[06:32:20] vire: has joined #ruby
[06:32:29] fujimura: has joined #ruby
[06:33:04] olistik: has joined #ruby
[06:35:19] superflat: has joined #ruby
[06:37:21] fujimura: has joined #ruby
[06:38:28] jgt: has joined #ruby
[06:38:57] roolo: has joined #ruby
[06:40:49] dave_craddock: has joined #ruby
[06:42:15] mary5030: has joined #ruby
[06:42:25] cppcho: has joined #ruby
[06:42:35] rflot: has joined #ruby
[06:45:22] fgo: has joined #ruby
[06:47:10] edwinvdgraaf: has joined #ruby
[06:48:01] codecop: has joined #ruby
[06:49:00] pengin: has joined #ruby
[06:50:57] chrissonar: has joined #ruby
[06:51:28] gauke: has joined #ruby
[06:52:03] Exponential: has joined #ruby
[06:52:42] andikr: has joined #ruby
[06:52:46] hasculdr: has joined #ruby
[06:52:48] apofis: has joined #ruby
[06:53:15] hasculdr: has left #ruby: ()
[06:53:29] CloCkWeRX: has joined #ruby
[06:53:40] nedp: has joined #ruby
[06:54:23] hasculdr: has joined #ruby
[06:57:26] pyon: has joined #ruby
[06:57:31] ki0: has joined #ruby
[06:58:55] fabrice31: has joined #ruby
[06:59:21] k3asd`: has joined #ruby
[07:00:23] hasculdr: ?????????? ???????? ????????????-?????????????? ?????????????????????????
[07:00:39] juni0r: has joined #ruby
[07:00:41] flughafen: sup certainty shevy sevenseacat
[07:01:37] sevenseacat: flughafen: bonan matenon
[07:02:05] chussenot: has joined #ruby
[07:02:12] RegulationD: has joined #ruby
[07:02:17] jpfuentes2: has joined #ruby
[07:02:19] revath: has joined #ruby
[07:02:26] vire: has joined #ruby
[07:03:27] flughafen: sevenseacat: konbanwa!
[07:04:09] thomasvm: has joined #ruby
[07:04:42] skade: has joined #ruby
[07:04:55] Hijiri: has joined #ruby
[07:04:57] Polysics: has joined #ruby
[07:05:34] flughafen: ACTION has a 4 day weekend!
[07:05:39] tkuchiki: has joined #ruby
[07:06:00] Polysics: has joined #ruby
[07:06:02] Darkwater: can you give me one as well
[07:06:32] rushed: has joined #ruby
[07:07:07] datanoise: has joined #ruby
[07:07:07] flughafen: ACTION loves buidling this phantomjs rpm
[07:07:31] Polysics_: has joined #ruby
[07:07:54] bkxd: has joined #ruby
[07:08:10] datanoise: has joined #ruby
[07:10:08] alex88: has joined #ruby
[07:11:20] terlar: has joined #ruby
[07:11:24] datanoise: has joined #ruby
[07:11:38] ghr: has joined #ruby
[07:12:58] ramfjord: has joined #ruby
[07:14:04] msgodf: has joined #ruby
[07:15:05] wenshan: has left #ruby: ("ERC Version 5.3 (IRC client for Emacs)")
[07:15:11] unshadow: has joined #ruby
[07:15:55] DarkBushido: has joined #ruby
[07:15:55] DarkBushido: has joined #ruby
[07:18:18] gix: has joined #ruby
[07:18:29] Papipo: has joined #ruby
[07:19:10] Papipo: Do you know if there is any open source app to send push notifications to mobile devices and handle device registration, etc?
[07:19:39] jgoyon: has joined #ruby
[07:20:10] c0m0: has joined #ruby
[07:20:34] anytimebutnow: has joined #ruby
[07:23:18] jgt: has joined #ruby
[07:23:32] rht: has joined #ruby
[07:24:49] pwnz0r: has joined #ruby
[07:25:13] mdz_: has joined #ruby
[07:25:48] edwinvdgraaf: has joined #ruby
[07:26:20] Brozo: has joined #ruby
[07:26:45] arBmind: has joined #ruby
[07:28:13] jpfuentes2: has joined #ruby
[07:29:59] Hanmac: has joined #ruby
[07:30:31] mister_solo: has joined #ruby
[07:31:16] Igorshp_: has joined #ruby
[07:32:00] thomasvm: has joined #ruby
[07:32:44] micmus: has joined #ruby
[07:32:56] Pumukel: has joined #ruby
[07:33:37] Forgetful_Lion: has joined #ruby
[07:33:39] dseitz: has joined #ruby
[07:34:42] mister_s_: has joined #ruby
[07:34:56] iwishiwerearobot: has joined #ruby
[07:36:18] Exponential: has joined #ruby
[07:36:23] RTG`: has joined #ruby
[07:37:06] Hounddog: has joined #ruby
[07:37:17] fabrice31: has joined #ruby
[07:41:12] niftylettuce: has joined #ruby
[07:42:51] HayesHimself: has joined #ruby
[07:43:31] anisha: has joined #ruby
[07:44:03] sandstrom: has joined #ruby
[07:44:13] ta: has joined #ruby
[07:45:35] justintv90: has joined #ruby
[07:47:10] bayed: has joined #ruby
[07:47:31] jaffachief: has left #ruby: ("Textual IRC Client: www.textualapp.com")
[07:48:23] ljarvis: I really wish I could fix my sleeping patterns. I slept like ass last night
[07:48:35] apofis: has joined #ruby
[07:48:44] maloik: pattern, as in the time you go to bed etc?
[07:48:59] Axy: has joined #ruby
[07:48:59] Axy: has joined #ruby
[07:49:00] ljarvis: actually pattern is the wrong word, I just don't sleep well
[07:49:07] mozzarella: do you also get sleep paralysis?
[07:49:08] randiman: has joined #ruby
[07:49:16] tubuliferous_: has joined #ruby
[07:49:24] maloik: do you go to bed at the same time every day?
[07:49:30] ljarvis: mozzarella: no
[07:49:40] ljarvis: maloik: not really, but within an hour or two
[07:49:46] tbuehlmann: careful, a lot of specialist experts incoming
[07:49:47] ljarvis: I suffer pretty bad with insomnia
[07:49:58] maloik: sleeping the same amount each day, going to bed the same time, and using an app that wakes you up when you're in a light sleep cycle works well for me
[07:50:31] maloik: no screens for like an hour before bed supposedly works as well, but who am I kidding that never happens
[07:50:40] ljarvis: I just sit awake for hours. Also I'm pretty bad at going to sleep right after doing a load of work
[07:50:43] ljarvis: right, yep
[07:51:13] maloik: actually it has been happening, when I go climbing I usually arrive home late enough to go straight to bed
[07:51:51] Iskarlar: has joined #ruby
[07:52:30] elia: has joined #ruby
[07:52:39] rickmasta: has joined #ruby
[07:53:35] jfarmer: has joined #ruby
[07:53:45] workmad3: has joined #ruby
[07:53:59] joneshf-laptop: has joined #ruby
[07:54:28] livathinos: has joined #ruby
[07:57:38] nofxx1: has joined #ruby
[07:58:07] chussenot: has joined #ruby
[07:59:03] tomkadwill: has joined #ruby
[07:59:08] ghr: has joined #ruby
[07:59:18] boozehound: has joined #ruby
[08:02:56] michael_mbp: has joined #ruby
[08:03:07] solars: has joined #ruby
[08:03:25] Aeyrix: On the topic of sleep
[08:03:25] Hijiri: has joined #ruby
[08:03:29] Aeyrix: I slept like trash too.
[08:03:41] Aeyrix: But mainly because I had a cold and fever. :(
[08:03:44] Aeyrix: had / have
[08:04:24] tkuchiki: has joined #ruby
[08:06:42] Aswebb_: has joined #ruby
[08:08:12] albercuba: has joined #ruby
[08:08:33] Brando753: has joined #ruby
[08:09:00] albercuba: hello everyone. I need to downgrade i18n to version 0.6.11 because iwas asked to install ruby 1.8.7. how can i do that???
[08:09:29] Aeyrix: Can you ask whoever asked you to install 1.8.7 to rethink their life choices?
[08:10:23] albercuba: yes i had an argument with them. but it is a software that my company needs and it is only compatible with version 1.8.7
[08:10:26] sevenseacat: do *not* use ruby 1.8.7.
[08:10:35] sevenseacat: under any circumstance.
[08:10:45] bkxd: what's wrong with 1.8.7?
[08:11:01] sevenseacat: it hit end of life.... four years ago i believe
[08:11:02] Aeyrix: Apart from the fact that it's been EOL for longer than I've been alive?
[08:11:26] sevenseacat: earlier if you're not using ree
[08:11:39] Aeyrix: albercuba: The solution is to uninstall the gem and then reinstall it with `gem install i18n -v 0.6.11` I think.
[08:11:48] Aeyrix: The problem is that 187 compared to now is ordinary.
[08:11:56] Aeyrix: And of course, vulns in the interpreter.
[08:12:11] albercuba: Aeyrix, ok thanks i am going to try it
[08:12:34] Aeyrix: I'd seriously, seriously advise explaining to them the EOL situation though.
[08:12:47] Aeyrix: That's like running RH 4.
[08:12:50] Exponential: has joined #ruby
[08:13:33] alphaatom: has joined #ruby
[08:13:40] albercuba: yes i know and i told my boss about that and the security issues and all the problems it causes to have an old version
[08:13:47] albercuba: but it is not my choice :(
[08:14:05] granthatcher: has joined #ruby
[08:14:06] Aeyrix: You tried.
[08:14:11] Aeyrix: Make sure you have a paper trail of that imo
[08:14:23] Aeyrix: Like if it isn't already in email form, make it in email form.
[08:14:30] ljarvis: also quit your job
[08:14:38] Aeyrix: "Just to absolutely confirm here, you're okay with us using Ruby 1.8.7 which went EOL in 2011?"
[08:14:50] Aeyrix: Then when things break, your ass is covered. :)
[08:14:58] hostess: has joined #ruby
[08:15:00] tbuehlmann: quitting, the solution to everything :>
[08:15:12] albercuba: not, my job is great :P
[08:15:16] Aeyrix: Well, maybe some things.
[08:15:16] sevenseacat: not abad idea to get it in written form.
[08:15:21] albercuba: it is just a software they bought
[08:15:33] albercuba: really expensive by the way
[08:15:33] tbuehlmann: I agree, get it written
[08:15:36] pch: has joined #ruby
[08:15:40] Aeyrix: albercuba: Are you able to share what it is?
[08:15:42] albercuba: and it uses a ton of outdated apps
[08:15:49] Aeyrix: ... Is it Windows 2000?
[08:15:52] albercuba: it is call Vepos
[08:15:55] Aeyrix: Oh Christ.
[08:16:00] aclapinpepin: has joined #ruby
[08:16:04] albercuba: do you know it
[08:16:10] Aeyrix: Yeah it's ERP software.
[08:16:18] sevenseacat: ACTION gets popcorn
[08:16:29] adaedra: ACTION steals some sevenseacat popcorn
[08:16:36] Aeyrix: ACTION takes sevenseacat's popcorn.
[08:16:42] Aeyrix: Where do you keep getting that shit?
[08:16:44] ljarvis: ACTION gets popcorn to watch sevenseacat beat the shit out of everyone
[08:16:55] doerteDev: has joined #ruby
[08:17:02] albercuba: well as i said, not my decision :(
[08:17:07] Aeyrix: albercuba: Yeah understood.
[08:17:09] Pumukel: has joined #ruby
[08:17:21] albercuba: i mean ruby is not the only problem
[08:17:24] Aeyrix: I'd recommend following up via email if there's not already a paper trail. I can imagine that will go `bang` later down the line.
[08:17:29] albercuba: the MS SQl server is another one
[08:17:54] Aeyrix: MSSQL v7? :v
[08:18:05] albercuba: yes, old version only
[08:18:16] albercuba: it is not comp with the latest version
[08:18:22] ljarvis: this makes me so happy i made the decision to get out of being in the position where these decisions were out of my hands
[08:18:23] cschneid: has joined #ruby
[08:18:44] fusillicode: has joined #ruby
[08:18:53] Aeyrix: ljarvis: I work at a small infosec consultancy. Absolutely everyone is technically savvy. It's amazing. :D
[08:18:54] fusillicode: has left #ruby: ()
[08:19:00] epochwolf: has joined #ruby
[08:19:11] albercuba: ok i am going to my boss again
[08:19:23] ljarvis: Aeyrix: yeah the place I run is similar on the latter point. It's really refreshing
[08:19:34] Aeyrix: albercuba: http://ruby-doc.org/core-1.8.7/
[08:19:57] Aeyrix: Sorry, I meant https://www.ruby-lang.org/en/news/2014/07/01/eol-for-1-8-7-and-1-9-2/
[08:20:00] DarkBushido: has joined #ruby
[08:20:10] sevenseacat: 2014? jesus wtf
[08:20:15] ljarvis: que "don't worry, we'll upgrade to 1.9.1"
[08:20:31] ljarvis: now you have more problems
[08:20:31] Aeyrix: sevenseacat: That was extended too. :P
[08:21:07] Zai00: has joined #ruby
[08:22:33] Aswebb_: has joined #ruby
[08:23:24] apofis: has joined #ruby
[08:24:55] Aeyrix: sevenseacat: What's for dinner? I need ideas.
[08:25:12] sevenseacat: Aeyrix: mmmm sausages i think.
[08:25:23] marr: has joined #ruby
[08:27:27] unsymbol: has joined #ruby
[08:28:29] thomasvm: has joined #ruby
[08:29:16] Hijiri: has joined #ruby
[08:29:23] ndogz: has joined #ruby
[08:30:19] Scroff: has joined #ruby
[08:30:29] dawkirst: has joined #ruby
[08:30:51] stoffus: has joined #ruby
[08:30:56] skade: has joined #ruby
[08:32:29] ta: has joined #ruby
[08:33:12] fgo: has joined #ruby
[08:33:20] dionysus69: has joined #ruby
[08:34:35] simi: has joined #ruby
[08:35:10] tvw: has joined #ruby
[08:37:07] olistik: has joined #ruby
[08:37:26] iwishiwerearobot: has joined #ruby
[08:43:10] bkxd: has joined #ruby
[08:43:24] dionysus69: has joined #ruby
[08:43:47] fujimura: has joined #ruby
[08:45:51] joonty: has joined #ruby
[08:47:01] XThief: has joined #ruby
[08:49:11] dave_craddock: has joined #ruby
[08:49:27] iamninja: has joined #ruby
[08:49:59] angus: has joined #ruby
[08:51:06] RegulationD: has joined #ruby
[08:51:45] livcd: hi what's the use for class << self ?
[08:52:32] tobiasvl: livcd: opening up the singleton class
[08:52:39] rdark: has joined #ruby
[08:52:52] apofis: has joined #ruby
[08:53:24] apeiros: livcd: to define class methods and apply things on the class level, e.g. attr_* methods, or alias.
[08:53:33] c0m0: has joined #ruby
[08:54:02] allomov: has joined #ruby
[08:54:15] MasterPiece: has joined #ruby
[08:54:20] livcd: apeiros: and they are specific to that singleton class ?
[08:54:57] apeiros: the same as with any class, yes. they're specific to where you use them.
[08:55:14] apeiros: (singleton_class is still a class - obeys the same rules)
[08:55:59] ljarvis: I often see resources lack promoting the idea that a class is just an instance of Class, I wonder if it's confusing or just not thought of
[08:56:10] livcd: and is there any difference between def self.foo end ? and class << self def foo end end ?
[08:56:13] thomasvm_: has joined #ruby
[08:56:39] livcd: uhm metaprogramming in ruby is confusing for me
[08:56:48] apeiros: that'll pass
[08:57:06] apeiros: the basic concepts actually have a very small surface
[08:57:24] chthon: has joined #ruby
[08:57:43] apeiros: I think I need to make a "quickstart ruby" where I delineate those concepts
[08:57:59] mikecmpbll: has joined #ruby
[08:58:56] livcd: please do :-)
[08:59:06] livcd: i'll pay you 10euros :D
[08:59:07] ringarring: has joined #ruby
[08:59:23] apeiros: I have some more pressing priorities :)
[09:00:01] Mekkis: has joined #ruby
[09:00:16] livcd: i guess they earn you more
[09:00:25] apeiros: actually not
[09:00:32] apeiros: they're volunteer stuff
[09:01:01] dseitz_: has joined #ruby
[09:03:06] DEA7TH: has joined #ruby
[09:03:24] dseitz__: has joined #ruby
[09:04:26] gregf_: livcd: have you used Java or even PHP or python before?
[09:04:51] livcd: gregf_: little python
[09:04:54] gregf_: 'static' refers to a class_method
[09:05:41] ta: has joined #ruby
[09:06:00] jhass: mmh, I'm not sure that parallel will help much in understanding singleton classes in the context of metaprogramming
[09:06:05] gregf_: livcd: class Foo(object): def __init__(self, *args, **kwargs): for k,v in kwargs.items(): setattr(self, k, v); @staticmethod def foo(bar): print bar
[09:06:23] kenndel: has joined #ruby
[09:06:25] gregf_: livcd: thats a static method in python :/
[09:06:43] quimrstorres: has joined #ruby
[09:08:16] gregf_: livcd: class Foo: def initialize(self, params={}): params.each { |k,v| instance_variable_set "@#{k}", v;end def self.foo(bar): print bar; end <== in ruby :/
[09:08:20] khebbie: has joined #ruby
[09:08:45] ljarvis: I really dont have any clue as to how the attr setting in this example is remotely relevant
[09:08:47] fabrice31_: has joined #ruby
[09:08:53] sevenseacat: irc is a terrible medium for sharing code like that
[09:10:25] hubcaps: has joined #ruby
[09:10:43] Oog: has joined #ruby
[09:10:59] gregf_: ljarvis: it is'nt.. for consistency sake :/. but that static keyword does help to some extent
[09:13:20] fujimura: has joined #ruby
[09:14:18] apeiros: livcd: https://gist.github.com/apeiros/357452f493a6b566098a maybe this helps
[09:15:10] Brozo: has joined #ruby
[09:15:17] vdamewood: has joined #ruby
[09:15:24] livcd: i almsot forgot to say thanks
[09:15:41] livcd: thank you guys for educating me :)
[09:16:20] sgambino: has joined #ruby
[09:16:29] fabrice31: has joined #ruby
[09:17:13] quimrstorres: has joined #ruby
[09:17:25] livcd: apeiros: that helped
[09:17:47] livcd: but where / when would i use Class methods like this ?
[09:17:51] LiquidInsect: has joined #ruby
[09:18:14] Aeyrix: livcd: Gems, for instance.
[09:18:24] gregf_: livcd: https://gist.github.com/anonymous/8e355cca738fd1c9e753
[09:18:28] Aeyrix: Also for anything that you don't want / need an initialised class for.
[09:18:45] jhass: ew, indentation bro
[09:18:52] livcd: Aeyrix: makes sense
[09:18:53] apeiros: livcd: e.g. Date.civil(year, month, day)
[09:18:54] Musashi007: has joined #ruby
[09:19:07] Silex: has joined #ruby
[09:19:10] apeiros: Date offers various constructors, which normalize the data and feed it to Date.new
[09:19:22] apeiros: Date.civil vs. Date.ordinal vs. Date.commercial
[09:19:45] Silex: omg, the #ruby-lang #ruby merge finally happend!
[09:19:58] ljarvis: also, class methods are nice for doing something where you want an instance + more
[09:19:59] apeiros: sometimes it's used to store class-wide state. e.g. rails uses it to store the connection of a model.
[09:20:01] Silex: faith in humanity restored \o/
[09:20:03] jhass: Silex: yup, welcome!
[09:20:10] Silex: it's not like I suggest this idea since years now
[09:20:17] hubcaps: has joined #ruby
[09:20:23] jhass: funny, only took me two months :P
[09:20:25] apeiros: Silex: it was done because of your suggestions
[09:20:27] ljarvis: Silex: it was your suggestion that made us do it!
[09:20:33] jhass: eh, right
[09:20:35] ljarvis: apeiros: snap
[09:20:37] Silex: ACTION dances \o/
[09:20:42] apeiros: ljarvis: ^5 :D
[09:21:02] thomasvm: has joined #ruby
[09:21:10] ljarvis: gregf_: please dont use send
[09:21:32] jhass: but that nobody finds 5 minutes to update the websites for weeks now is a bit worrying, I wonder how news ever get published...
[09:21:46] adaedra: SILEX OUR HERO
[09:21:47] Silex: anyway, congratulations on being able to merge these chans.
[09:21:57] Aeyrix: jhass: Isn't it +f?
[09:22:02] apeiros: jhass: you can push to change it to "olds"
[09:22:33] jhass: I don't follow this one tbh
[09:22:57] krz: has joined #ruby
[09:23:41] gregf_: ljarvis: heh, i know. that was just to get my point across :/
[09:23:53] apeiros: livcd: a bit haphazardly, but an explanation for the relation of class/singleton_class/instance: https://gist.github.com/apeiros/357452f493a6b566098a (reload if still open)
[09:24:51] jhass: heh, that would actually be handy, you click on a link and focuses the already open tab if there's one.. wonder if there's an extension for it
[09:25:00] grzywacz: has joined #ruby
[09:25:00] grzywacz: has joined #ruby
[09:25:15] apeiros: jhass: isn't that standard behavior for most browsers?
[09:25:30] apeiros: ok??? safari does that
[09:25:57] apeiros: somehow I assumed that was common behavior
[09:25:59] datanoise: has joined #ruby
[09:27:08] dawkirst: has joined #ruby
[09:28:03] jhass: https://addons.mozilla.org/en-US/firefox/addon/duplicate-tab-blocker so close... :/
[09:28:09] Alina-malina: has joined #ruby
[09:28:24] dawkirst: has joined #ruby
[09:28:37] Aeyrix: jhass: So close to what?
[09:29:10] jhass: https://addons.mozilla.org/en-US/firefox/addon/duplicate-tabs-closer I guess that does it
[09:29:44] toretore: has joined #ruby
[09:29:58] serivich: has joined #ruby
[09:30:03] jhass: yup, nice
[09:30:32] TheHodge: has joined #ruby
[09:30:58] jhass: it does break manually cloning a tab though
[09:31:22] jenrzzz: has joined #ruby
[09:33:11] ta: has joined #ruby
[09:33:41] Synthead: has joined #ruby
[09:34:14] langlands: has joined #ruby
[09:35:10] ahmetkapikiran: has joined #ruby
[09:35:23] varunwachaspati: has joined #ruby
[09:36:31] livcd: apeiros: thanks for highlighting me otherwise i would miss it
[09:36:54] serivichi: has joined #ruby
[09:37:00] Zai00: has joined #ruby
[09:37:26] tubuliferous_: has joined #ruby
[09:39:57] n008f4g_: has joined #ruby
[09:40:55] fabrice31: has joined #ruby
[09:41:43] khebbie: has joined #ruby
[09:41:47] whippythellama: has joined #ruby
[09:42:12] olistik: has joined #ruby
[09:42:37] Zai00: has joined #ruby
[09:43:21] senayar: has joined #ruby
[09:43:21] senayar: has joined #ruby
[09:44:22] al2o3-cr: apeiros: can I nick that and put it on my github gists incase it disappears?
[09:45:11] zotherstupidguy: is it wise to do a rackup insde a raketask?
[09:45:27] bosma: has joined #ruby
[09:45:54] jhass: is it unwise not to do it?
[09:45:56] dawkirst: has joined #ruby
[09:46:38] jhass: or in other words, what's your goal of doing it? if you achieve that goal with that, then it's probably wise
[09:47:39] zotherstupidguy: jhass i am testing an api, so i want to make the server run, run the tests then close the server
[09:48:35] bruno-: has joined #ruby
[09:48:57] chouhoulis: has joined #ruby
[09:49:01] ta: has joined #ruby
[09:49:06] jhass: I'd go for spawn, remembering the pid and do the standard two phased sigterm/sigkill when the time has come then
[09:49:27] khebbie: has joined #ruby
[09:49:43] zotherstupidguy: rake provides some kind of final cleanup keyword?
[09:49:43] chouhoulis: has joined #ruby
[09:50:12] ljarvis: have you looked into rack-test btw?
[09:50:43] zotherstupidguy: i have reqire 'rake-testtask' if that what ou mean
[09:50:50] zotherstupidguy: i have reqire 'rake/testtask' if that what ou mean
[09:51:16] leafybasil: has joined #ruby
[09:52:23] zotherstupidguy: jhass i like your approach, whats teh shell script command will look like? say on port 9292
[09:52:47] jhass: you tell me
[09:53:16] jhass: zotherstupidguy: btw rack-test != rake/testtask
[09:56:11] krz: has joined #ruby
[09:57:28] zotherstupidguy: ljarvis jhass thanks
[09:59:14] zotherstupidguy: i hate it when the game name is rack-test and you use it in the file as rack/test
[09:59:31] avril14th: has joined #ruby
[09:59:50] yfeldblum: has joined #ruby
[09:59:51] workmad3: has joined #ruby
[09:59:54] DaniG2k: has joined #ruby
[10:00:28] jhass: !fact mk gem_names http://guides.rubygems.org/name-your-gem/
[10:00:28] ruboto: jhass, I will remember that gem_names is http://guides.rubygems.org/name-your-gem/
[10:00:33] jhass: zotherstupidguy: ^
[10:00:56] boozehound: has joined #ruby
[10:01:18] dawkirst: has joined #ruby
[10:02:06] sigurding: has joined #ruby
[10:02:31] zotherstupidguy: anyone used rack/minitest?
[10:02:48] simi: has joined #ruby
[10:03:12] ruboto: Just ask your question, if anyone has or can, they will respond.
[10:05:35] sevensea_: has joined #ruby
[10:05:39] zotherstupidguy: ACTION remmbers that gabapentin side effects includes unjustified violence towards others...
[10:05:46] lkba: has joined #ruby
[10:06:26] alphaatom: has joined #ruby
[10:07:33] MasterPiece``: has joined #ruby
[10:07:41] fluter: has joined #ruby
[10:08:14] olistik: has joined #ruby
[10:09:59] fujimura: has joined #ruby
[10:10:05] fluter: hi zotherstupidguy , I m new to ruby
[10:10:30] zotherstupidguy: fluter i hope you like it so far
[10:10:51] fluter: zotherstupidguy: I just open ruby-lang.org to find docs to learn, got a question,
[10:11:00] fluter: is the icon of ruby a diamond?
[10:11:01] fujimura: has joined #ruby
[10:11:19] sevensea_: its not a diamond, its a ruby. for obvious reasons.
[10:11:44] Aeyrix: Why would it not be a ruby?
[10:11:54] fluter: It'r a ruby~~
[10:12:01] fluter: Sorry guys :)
[10:12:05] zotherstupidguy: its red, its sexy, its edgy, its expensive, its a RUBY!!!!!!!!!!!!! Yay
[10:12:15] jhass: fluter: welcome to land of Ruby, where everything is simple!
[10:12:20] platzhirsch: has joined #ruby
[10:12:49] fluter: jhass: ah, thank you.
[10:12:57] alphaatom: has joined #ruby
[10:13:03] fluter: so what's the relation between ruby and "ruby on rails"?
[10:13:16] jhass: rails is a webframework written in Ruby
[10:13:21] adaedra: Rails is a web framework written in Ruby
[10:13:28] adaedra: adaedra is slow
[10:13:35] ndogz_: has joined #ruby
[10:13:40] tobiasvl: so, anyway, rails is a web framework written in Ruby
[10:13:45] Aeyrix: Ruby is a web framework written in Rails.
[10:13:50] tobiasvl: http://en.wikipedia.org/wiki/Ruby_on_Rails
[10:13:58] adaedra: Aeyrix.words.shuffle
[10:14:03] oddmunds: Ruby is the language in which the framework Rails is written
[10:14:03] alphaatom: has joined #ruby
[10:14:09] jhass: adaedra: proper capitalization, slows you down
[10:14:11] fluter: If it's so, why does it called "ruby on rails"?
[10:14:20] fluter: It's like rail is a machine,
[10:14:25] zotherstupidguy: i concur, rails is a webframework writtien in ruby
[10:14:27] adaedra: jhass: so that would mean that germans are slower?
[10:14:34] sn4p3: has joined #ruby
[10:14:40] Aeyrix: fluter: Because you're writing Ruby language
[10:14:44] Aeyrix: on the rails framework
[10:14:50] jhass: we just tell everybody we aren't and they believe us
[10:15:01] fluter: Aeyrix: But the rails framework is written in ruby?
[10:15:19] Aeyrix: Ruby on Rails (a web framework in Ruby)
[10:15:25] Aeyrix: Ruby on more Ruby stuff
[10:15:52] ex0ns: has joined #ruby
[10:16:05] revath: has left #ruby: ()
[10:16:09] fluter: Still confuses me, flask is a framework in python, but it would be be called "flask on python"
[10:16:14] fluter: would not
[10:16:17] Aeyrix: Python on Flask.
[10:16:25] MeowZedong: has joined #ruby
[10:16:43] workmad3: has joined #ruby
[10:16:43] fluter: So is ruby simpler than python?
[10:16:48] oddmunds: fluter: the "X on X" is not really a convention
[10:16:48] Aeyrix: To clarify, the name of the framework is Ruby on Rails.
[10:16:54] Aeyrix: It's just kind of the name.
[10:17:00] Aeyrix: It could've been named Canteloupe for all anyone cares.
[10:17:11] jhass: adaedra: to be fair it also helps that we tell everybody that the french are slow
[10:17:13] oddmunds: Beavis & Butthead on Ice
[10:17:14] Iskarlar: has joined #ruby
[10:17:25] fluter: Aeyrix: Yeh, it's the author intended to confuse people.
[10:17:28] MeowZedong: has left #ruby: ()
[10:17:30] adaedra: fluter: because it's funny, they named it rails, and so the ruby can ride the rails...
[10:17:31] apeiros: al2o3-cr: sure. copy it and do with it as you want.
[10:17:34] Aeyrix: troll detected
[10:17:42] ex0ns: has joined #ruby
[10:17:59] al2o3-cr: apeiros: thanks
[10:18:00] fluter: adaedra: Ah, I see,
[10:18:25] ljarvis: Python web framework should be called Plane
[10:18:31] adaedra: jhass: we're not slow, we take our time, totally, different!
[10:18:42] ndogz: has joined #ruby
[10:18:46] Aeyrix: Flask was an April fool's joke.
[10:18:59] fluter: Aeyrix: Why do you think so?
[10:19:01] adaedra: fluter: also, comparing languages is not a good thing to do.
[10:19:18] Aeyrix: fluter: Because mitsuhiko said it was an April fool's joke.
[10:19:43] workmad3: adaedra: ah, so that's your reason for Agincourt? ;)
[10:20:13] fluter: adaedra: ok, I will stop, I asked just becasue jhass said on the land of Ruby, everything is simple
[10:20:22] rickmasta: has joined #ruby
[10:20:27] fluter: Aeyrix: What is mitsuhiko?
[10:20:37] Aeyrix: fluter: Flask developer.
[10:20:41] fgo: has joined #ruby
[10:20:52] phale: has joined #ruby
[10:20:54] fluter: So he thinks django is better?
[10:21:07] Aeyrix: They're for very different purposes.
[10:21:18] fluter: They are both web framework, right?
[10:21:35] adaedra: workmad3: you don't have anything older?
[10:21:57] workmad3: adaedra: probably... you know what us british are like with our history :P
[10:23:05] sandelius: has joined #ruby
[10:23:29] phale: I'm having the worst day today
[10:23:54] jhass: still not ##social
[10:23:56] kerunaru: has joined #ruby
[10:24:22] zotherstupidguy: phale just for the record, i care!
[10:24:58] allcentury: has joined #ruby
[10:25:05] phale: zotherstupidguy: We can't talk about it here, jhass is watching us.
[10:25:11] fluter: So will ruby die? if so, when is that?
[10:25:14] krz: has joined #ruby
[10:25:27] adaedra: -----_____-----
[10:25:27] phale: fluter: When it stops getting updated.
[10:25:50] zotherstupidguy: /me is giving his most sincere advice: if you like it in the ass, then take it in the ass, stop complicating things!
[10:25:56] jhass: fluter: click the first link in the topic, nice FAQ there
[10:26:09] adaedra: There's a FAQ? Oooh.
[10:26:18] zotherstupidguy: has left #ruby: ("WeeChat 1.2")
[10:26:30] sandelius: I though that minitest was included in ruby 2? I get cannot load such file -- minitest (LoadError)
[10:26:36] workmad3: adaedra: it's rule 1 of the internet - there's *always* an FAQ
[10:26:42] workmad3: adaedra: rule 2 is that your question is never in it ;)
[10:27:58] phale: jhass: Please don't go off-topic.
[10:28:07] jhass: sandelius: distro ruby? they might have messed it up
[10:28:30] sandelius: jhass rbenv 2.2.2 Mac
[10:28:45] fluter: ruby can run on MacOS?
[10:28:55] jhass: sandelius: since it's just one of the bundled gems https://github.com/ruby/ruby/blob/trunk/gems/bundled_gems
[10:29:09] stamina: has joined #ruby
[10:29:09] bougyman: I didn't mean to migrate
[10:29:12] Pathfinder: has joined #ruby
[10:29:13] jhass: fluter: sure, even ships with it
[10:29:45] fluter: What's the term gem in ruby? I see a lot of them, is it like modules,(.so file) in C?
[10:29:56] jhass: bougyman: you're welcome!
[10:29:56] bougyman: fluter: packages
[10:30:09] bougyman: jhass: for what?
[10:30:10] phale: fluter: There are no "modules" in C
[10:30:12] fluter: bougyman: Ah, I see,
[10:30:18] phale: You probably mean static libraries, which aren't the same.
[10:30:26] jhass: bougyman: migrating anyway? :D
[10:30:40] fluter: phale: Yes, I mean libraries, sometimes called modules.
[10:31:02] jhass: fluter: gems are mostly libraries, sometimes ruby applications distributed that way
[10:31:07] bougyman: a gem could be a library or an application or a framework or none of the above.
[10:31:12] bougyman: it's just a way to package ruby code.
[10:31:38] fluter: Yeah, so it's a tar file containing a set of .ruby files.
[10:31:48] phale: doesn't have to be a tar file
[10:31:51] tobiasvl: it's a bit more than that
[10:31:54] fluter: a zip file
[10:31:54] fgo: has joined #ruby
[10:31:54] bougyman: doesn' thave to be ruby files in it
[10:31:59] jhass: and some metadata
[10:32:04] tobiasvl: it's more like??? a yum package or an ebuild file
[10:32:06] workmad3: ^^ the metadata is important
[10:32:27] fluter: hmm, but yum package are binary...
[10:32:40] workmad3: without that, all you have is a zip file with .rb files and a strange extension
[10:32:47] bougyman: yum packages are rpms
[10:32:48] fluter: ruby are interpreting language
[10:32:51] bougyman: they're just cpios, iirc.
[10:32:52] jhass: fluter: you mix concept with implementation ;)
[10:33:05] workmad3: fluter: yum packages can easily package up ruby apps too ;)
[10:33:23] fluter: this sounds cool
[10:33:38] tobiasvl: I didn't say gems ARE yum packages (or rpm files), but they are LIKE them :) just a comparison to other package systems
[10:33:43] tobiasvl: but ok, like ebuilds then
[10:34:02] jhass: eh, isn't the ebuild more the .gemspec?
[10:34:36] phale: why can't ruby libraries just be .rb files
[10:34:40] phale: hosted on a git server
[10:35:16] toretore: nothing's stopping you
[10:35:16] canton7: phale, you'd need some metadata file, specifying the version, author, any dependencies, etc
[10:35:19] jhass: they can, if you like dealing with submodules a lot
[10:35:34] phale: canton7: why? lol
[10:35:42] phale: I can put the dependencies and version in the readme.
[10:35:43] canton7: phale, you'd also want to be able to package that up into an archive, so you can copy/save gems without dealing with many files
[10:35:50] tobiasvl: jhass: sure, you're right. I'll stop comparing gems to other package systems now :P
[10:36:02] canton7: phale, so when you say to ruby 'please install gem x version y', it can automatically install all dependencies as well
[10:36:13] adaedra: phale: because not anyone has its code on a git repository
[10:36:18] Iskarlar: has joined #ruby
[10:36:20] workmad3: jhass: git submodules... most fun EVER!!!!
[10:36:20] phale: I have to go now, cya
[10:36:21] canton7: phale, rather than you having to read the README, if it even exists, figure out the correct versions of the dependencies to install, and doing it yourself
[10:36:39] phale|afk: has left #ruby: ("Leaving")
[10:36:53] langlands: has joined #ruby
[10:36:55] jhass: workmad3: AUR4 will allow me to toy with git subtree, curious how it'll turn out
[10:37:48] ChanServ: +o workmad3
[10:38:24] Musashi007: has joined #ruby
[10:39:09] ChanServ: -o workmad3
[10:39:16] workmad3: oops, that was meant to be on #rubyonrails
[10:39:34] workmad3: I was looking @ that channel and wondering why chanserv was being so slow :D
[10:39:56] RegulationD: has joined #ruby
[10:40:08] workmad3: then the guy I was going to kick left anyway
[10:41:18] alphaatom: has joined #ruby
[10:42:25] RahulT: has joined #ruby
[10:42:35] adaedra: #JustOpThings
[10:42:40] iamninja: has joined #ruby
[10:45:34] ndogz_: has joined #ruby
[10:46:44] nofxx1: has joined #ruby
[10:46:44] nofxx1: has joined #ruby
[10:47:00] datanoise: has joined #ruby
[10:47:49] snophey: has joined #ruby
[10:48:00] snophey: has left #ruby: ()
[10:48:22] snophey: has joined #ruby
[10:48:22] ta: has joined #ruby
[10:48:57] ndogz: has joined #ruby
[10:48:58] fabrice31: has joined #ruby
[10:50:06] MasterPiece: has joined #ruby
[10:50:28] chouhoulis: has joined #ruby
[10:50:33] caseypatrickdris: has joined #ruby
[10:51:39] zotherstupidguy: has joined #ruby
[10:52:59] bkxd: has joined #ruby
[10:53:17] BubonicPestilenc: has joined #ruby
[10:55:06] ndrei: has joined #ruby
[10:55:46] ndogz_: has joined #ruby
[10:56:16] rahult_: has joined #ruby
[10:57:18] simpleid: has joined #ruby
[10:58:51] kotk: has joined #ruby
[10:59:19] rodfersou: has joined #ruby
[10:59:48] BubonicPestilenc: has left #ruby: ()
[11:00:10] angus: question: wasn't there a method of Enumerable that filtered out nils?
[11:00:38] ljarvis: angus: .compact
[11:00:43] ndogz: has joined #ruby
[11:00:57] angus: that's it. thanks, ljarvis
[11:02:01] khebbie: has joined #ruby
[11:02:20] quimrstorres: has joined #ruby
[11:02:59] apeiros: angus, ljarvis: compact is on Array, though. not on enumerable.
[11:03:21] chinmay_dd: has joined #ruby
[11:03:35] angus: apeiros: ok, I needed it for an array anyway
[11:03:48] angus: [a,b,c].compact.join(",")
[11:03:55] Brozo: has joined #ruby
[11:04:02] relix: has joined #ruby
[11:07:05] ndogz_: has joined #ruby
[11:08:52] [ace]: has joined #ruby
[11:09:18] mmazing: has joined #ruby
[11:10:54] sdothum: has joined #ruby
[11:10:56] michael_mbp: has joined #ruby
[11:12:17] rhg135: has joined #ruby
[11:12:45] dorei: has joined #ruby
[11:13:27] ur5us: has joined #ruby
[11:13:39] gregf_: >> [1, nil, "foo"].reject(&:nil?)
[11:13:40] ruboto: gregf_ # => [1, "foo"] (https://eval.in/374820)
[11:14:04] ndogz: has joined #ruby
[11:18:53] langlands: has joined #ruby
[11:21:27] jenrzzz: has joined #ruby
[11:22:03] sdothum: has joined #ruby
[11:22:22] Synthead: has joined #ruby
[11:23:24] casadei: has joined #ruby
[11:23:59] cina: why doesn't this regex capture the first #tag1? >> "#tag1 #tag2 Random text".scan(/(#\S+ )+(Random text)/)
[11:24:32] sdothum: has joined #ruby
[11:24:56] yfeldblum: has joined #ruby
[11:25:11] cina: >> "#tag1 #tag2 Random text".scan(/(#\S+ )+(Random text)/)
[11:25:12] ruboto: cina # => [["#tag2 ", "Random text"]] (https://eval.in/374833)
[11:25:14] tobiasvl: cina: your capture groups are greedy, they capture #tag2 followed by a space and random text
[11:25:26] al2o3-cr: >> "#tag1 #tag2 Random text".scan(/.+(?=#tag2)/)
[11:25:27] ruboto: al2o3-cr # => ["#tag1 "] (https://eval.in/374835)
[11:25:39] tubuliferous_: has joined #ruby
[11:25:40] tobiasvl: or I guess maybe they're the opposite of greedy
[11:26:03] LiquidInsect: has joined #ruby
[11:26:03] bnagy: >> "#tag1 #tag2 Random text".scan(/#\S+ ?/)
[11:26:04] ruboto: bnagy # => ["#tag1 ", "#tag2 "] (https://eval.in/374838)
[11:26:24] bnagy: tobiasvl: nah greedy is the answer
[11:26:26] cina: I want to capture the "Random text" as well
[11:26:59] segfalt: has joined #ruby
[11:27:21] al2o3-cr: >> "#tag1 #tag2 Random text".match(/.+(?=#tag2)(.+)/)[1]
[11:27:22] ruboto: al2o3-cr # => "#tag2 Random text" (https://eval.in/374841)
[11:27:48] chinmay_dd: has joined #ruby
[11:27:53] bnagy: cina: that's more annoying
[11:27:55] bnagy: >> "#tag1 #tag2 Random text".split(/(#\S+ ?)/)
[11:27:56] ruboto: bnagy # => ["", "#tag1 ", "", "#tag2 ", "Random text"] (https://eval.in/374842)
[11:28:10] bnagy: but consider just splitting coarsely first on space and then matching
[11:28:17] chinmay_dd: has joined #ruby
[11:28:48] c355E3B: has joined #ruby
[11:29:16] jhass: cina: I think it does, but you repeat the capture group, so the latter match overwrites the first one
[11:29:55] jhass: >> "#tag1 #tag2 Random text".match(/(#\S+ )+(Random text)/)[0]
[11:29:56] ruboto: jhass # => "#tag1 #tag2 Random text" (https://eval.in/374843)
[11:30:01] cina: jhass: why does it overwrites it? isn't it supposed to capture it?
[11:30:04] jhass: the entire match does include #tag1
[11:30:15] bnagy: >> "#tag1 #tag2 Random text".split.group_by {|e| !!(e =~ /#.+$/)}
[11:30:16] ruboto: bnagy # => {true=>["#tag1", "#tag2"], false=>["Random", "text"]} (https://eval.in/374844)
[11:30:24] bnagy: not _super_ proud of that :/
[11:30:30] jhass: cina: it does capture it, but a capture group can only hold a single capture, so the second capture overwrites the first one
[11:30:53] toretore: >> "#tag1 #tag2 Random text".match(/(#\S+ )+(Random text)/); $~
[11:30:54] ruboto: toretore # => #<MatchData "#tag1 #tag2 Random text" 1:"#tag2 " 2:"Random text"> (https://eval.in/374845)
[11:31:25] bnagy: man I own at regex compared to you guys :)
[11:31:35] bnagy: which is ironic given how much I hate them like poison ;)
[11:31:53] Aeyrix: Regex is lovely.
[11:32:01] Aeyrix: s/is/are/
[11:32:05] jhass: >> "#tag1 #tag2 Random text".scan(/#\S+ |Random text/)
[11:32:06] ruboto: jhass # => ["#tag1 ", "#tag2 ", "Random text"] (https://eval.in/374846)
[11:32:35] sigurding: has joined #ruby
[11:32:38] bnagy: not so great if the random text isn't random though
[11:32:52] jhass: well, yeah fake values etc
[11:32:53] cina: this would workd for this case, but not if the sentence if complex
[11:32:57] quimrsto_: has joined #ruby
[11:33:06] ruboto: cina, you are asking for a specific solution to a problem, instead of asking about your problem. This will lead to bad solutions and usually costs everybody more time and nerves. Also see http://meta.stackexchange.com/a/66378
[11:33:39] sarkyniin: has joined #ruby
[11:34:42] cina: so why is the group overwritten?
[11:34:57] jhass: because that's how it works
[11:35:05] jhass: you're still discussing the Y ;)
[11:35:08] toretore: "thanks for the suggestion, but i'm not going to do anything about it"
[11:35:23] yqt: has joined #ruby
[11:35:35] dgutierrez1287: has joined #ruby
[11:36:03] cina: sorry guys, I am just asking a new question
[11:36:03] ldnunes: has joined #ruby
[11:36:12] cina: thank you for answering the last one
[11:36:25] LMity: has joined #ruby
[11:36:34] Aeyrix: cina: The XY problem is parroted a lot around programming communities.
[11:36:43] Aeyrix: It applies sometimes, not always.
[11:36:47] jhass: "ab".match(/(a|b)+/)[1] what would you expect this to return?
[11:37:07] Aeyrix: This is actually one of thos times, though: Are you trying to return an array of tags preceded by an octothorpe?
[11:37:56] Eddieh_: has joined #ruby
[11:38:02] Aeyrix: jhass: `b`?
[11:39:30] cina: jhass: "b"
[11:39:52] balazs: has joined #ruby
[11:40:22] jhass: "#tag1 #tag2 ".match(/(#\S+ )+/)[1] you recognize that? ;)
[11:40:37] commondream: has joined #ruby
[11:40:52] Scroff: has joined #ruby
[11:42:20] skade: has joined #ruby
[11:42:48] cina: jhass: ok, but if you had asked "ab".match(/(a|b)+/)[0] I would have said "a"
[11:43:14] apeiros: jhass: personally I'd want "ab".match(/(a|b)+/)[1] to return [["a", "b"]]
[11:43:22] apeiros: err, drop one set of []
[11:43:53] cina: apeiros: me too, my last message was wrong, but yours is what I would expect
[11:44:03] apeiros: and afaik there are languages which will do that - quantified capture -> array of matches
[11:44:14] fgo: has joined #ruby
[11:44:44] apeiros: but yeah, current implementation is flat captures. so quantified captures always get the last match only *sniff*
[11:44:54] cina: apeiros: I tried JavaScript and the result was like Ruby's
[11:44:56] iamninja: has joined #ruby
[11:45:05] sdothum: has joined #ruby
[11:46:34] jhass: I think I like it that way, some languages will simply not be able to support it in another way and the more consistency for regex across languages the better
[11:48:10] cina: jhass: consistency... that's a good point too
[11:48:13] sdothum: has joined #ruby
[11:48:26] jhass: cina: the number refer to the capture _groups_, not the captures themselves. you can see capture group 0 as an implicit one around your entire expression, 1 is the first set of (), 2 is the second set of () and so on
[11:49:23] cina: jhass: yes, I missed that thanks
[11:49:43] zipace: has joined #ruby
[11:49:59] n80: has joined #ruby
[11:51:27] cina: btw sorry if I appeared to be an asshole -- I didn't mean that -- again thanks for your helps/suggestions
[11:52:08] sameerynho: has joined #ruby
[11:53:41] apeiros: cina: I don't think you appeared to be an asshole, and I don't think that's what the others meant
[11:53:44] jhass: oh, you didn't all
[11:53:59] alphaatom: has joined #ruby
[11:54:01] jhass: sorry if it appeared that I meant that
[11:54:10] apeiros: we're all just focused on giving good help fast, and sometimes we press for the information needed for that
[11:55:38] cina: thanks, I understand :)
[11:56:35] kcantwel: has joined #ruby
[12:00:03] fujimura: has joined #ruby
[12:00:37] chinmay_dd: has joined #ruby
[12:00:51] CustosLimen: has joined #ruby
[12:01:05] treehug88: has joined #ruby
[12:01:06] nfk: has joined #ruby
[12:01:39] nonparfumee: has joined #ruby
[12:01:41] boozehound: has joined #ruby
[12:02:01] charliesome: has joined #ruby
[12:02:50] Scripore: has joined #ruby
[12:02:52] abuzze_: has joined #ruby
[12:03:04] goodcodeguy: has joined #ruby
[12:04:23] ta: has joined #ruby
[12:05:23] abuzze__: has joined #ruby
[12:05:39] decoponio: has joined #ruby
[12:06:25] senayar: has joined #ruby
[12:06:34] snophey: has left #ruby: ()
[12:07:06] rovnero: has joined #ruby
[12:09:17] Rubie: has joined #ruby
[12:09:31] Eddieh_: has joined #ruby
[12:10:18] Papierkorb: has joined #ruby
[12:11:02] caseypatrickdris: has joined #ruby
[12:11:11] terlar: has joined #ruby
[12:12:03] abuzze: has joined #ruby
[12:13:27] phutchins: has joined #ruby
[12:17:19] DaniG2k: has joined #ruby
[12:19:00] datanoise: has joined #ruby
[12:19:00] Limix: has joined #ruby
[12:19:23] XThief: has joined #ruby
[12:19:31] tjbiddle: has joined #ruby
[12:21:39] pandaant: has joined #ruby
[12:23:00] balazs: has joined #ruby
[12:23:45] chinmay_dd: has joined #ruby
[12:23:53] zotherstupidguy: why this doesnt exit? 1 p x = Process.getpgid(`rackup`)
[12:24:15] balazs: has joined #ruby
[12:24:21] segfalt: because `` doesn???t return until rackup exits.
[12:24:31] segfalt: So you???re blocked at running rackup
[12:24:51] jhass: zotherstupidguy: Thus Kernel#spawn
[12:24:56] segfalt: The return value of `` is it???s standard out, I think, which isn???t going to work with Process.getpgid
[12:25:32] zotherstupidguy: i think rackup and even rackup & doesnt let me do anything after it! i dont know why
[12:25:50] badeball: has joined #ruby
[12:26:05] segfalt: zotherstupidguy: rackup & has meaning in an interactive shell, but not in a real exec.
[12:26:18] segfalt: Two things: 1) You need something like Popen4 to do real process control.
[12:26:31] segfalt: 2) If you???re trying to run a Rack application in the background inside another Ruby process, there are better ways.
[12:26:45] zotherstupidguy: i want the better ways plz
[12:26:48] segfalt: Something like Rack::Builder and #run! inside a Thread, for example.
[12:26:59] segfalt: What are you trying to accomplish, overall?
[12:27:20] zotherstupidguy: i hate rack/test, so i am testing my api with curl
[12:27:37] segfalt: You should use rack/test.
[12:27:43] zotherstupidguy: no i dont like it
[12:27:52] sevenseacat: you wanted the better ways, didnt you?
[12:28:00] zotherstupidguy: it doesnt work for me
[12:28:03] segfalt: The better way is use rack/test.
[12:28:08] segfalt: What doens???t work about it?
[12:28:25] zotherstupidguy: well, it keeps asking me about app variable that doesnt exist, blah blah blha
[12:28:34] sevenseacat: so instead of fixing that...?
[12:28:40] msnyon: has joined #ruby
[12:28:42] segfalt: So you don???t know how to use rack/test, not you don???t like it.
[12:28:52] segfalt: You should definitely learn rack/test.
[12:28:52] RegulationD: has joined #ruby
[12:28:56] segfalt: It is a great tool.
[12:28:57] zotherstupidguy: well i know that curl works
[12:29:23] ddv: flauwecurl
[12:29:25] segfalt: If I had more time, I???d gladly teach you the basics of rack/test, but I have to run.
[12:29:37] segfalt: Absolutely, totally, 100% read a tutorial on rack/test.
[12:29:44] segfalt: I use it with RSpec
[12:29:45] zotherstupidguy: segalt thanks, appreciaate the curtisy
[12:29:49] zotherstupidguy: i hate rspec too
[12:30:01] segfalt: Okay, when you???re done learning rack/test, you should learn RSpec ;)
[12:30:05] sevenseacat: rspec is awesome.
[12:30:14] segfalt: My parting advice before I run: don???t hate things you haven???t learned yet!
[12:30:23] sevenseacat: i can see why some people don't use it, but i love it.
[12:31:14] zotherstupidguy: sevenseacat love is a funny thing
[12:33:47] decoponio: has joined #ruby
[12:34:56] nateberkopec: has joined #ruby
[12:36:05] amystephen: has joined #ruby
[12:36:14] zotherstupidguy: do i need a thread or a process?
[12:36:34] TinkerTyper: has joined #ruby
[12:37:57] michael_mbp: has joined #ruby
[12:38:19] n008f4g_: has joined #ruby
[12:38:24] jhass: zotherstupidguy: Kernel#spawn (third time)
[12:38:27] jottr: has joined #ruby
[12:41:23] iamjarvo: has joined #ruby
[12:41:41] chouhoulis: has joined #ruby
[12:41:58] Matachines: has joined #ruby
[12:43:31] nedp: has joined #ruby
[12:43:52] sarkyniin: has joined #ruby
[12:44:10] sankaber: has joined #ruby
[12:46:00] zotherstupidguy: jhass spawn returns the pid but also locks the process for this job to finish
[12:46:03] [k-: has joined #ruby
[12:46:30] nhhagen: has joined #ruby
[12:46:37] fgo: has joined #ruby
[12:47:16] SalexW: has joined #ruby
[12:47:27] allcentury: has joined #ruby
[12:47:54] zotherstupidguy: 1 pid = spawn("ping google.com &")
[12:47:56] zotherstupidguy: 2 `kill #{pid}`
[12:48:06] jhass: there's Process.kill btw
[12:48:15] jhass: also why the &
[12:48:50] bkxd: has joined #ruby
[12:48:57] zotherstupidguy: it works without the &
[12:50:44] zotherstupidguy: ok i dont understand why it works without &
[12:51:08] rushed: has joined #ruby
[12:51:27] fabrice31: has joined #ruby
[12:52:33] watchtheblur: has joined #ruby
[12:52:43] Brozo: has joined #ruby
[12:52:49] jhass: the & makes it to use a shell, so you have ruby -> /bin/sh -> ping, the pid is that of the /bin/sh but that forked the ping into the background so the kill killing /bin/sh makes it reparent to pid 1
[12:52:51] haxrbyte: has joined #ruby
[12:54:11] zotherstupidguy: Process.kill("HUP", pid)
[12:54:13] haxrbyte_: has joined #ruby
[12:55:01] jhass: often used as a "please restart yourself" or "please reload your configuration" message to a process
[12:55:06] fgo: has joined #ruby
[12:55:11] elev: has joined #ruby
[12:55:11] jhass: but it's up to the process to handle it to their pleasing
[12:55:27] zotherstupidguy: so i am sinding a custom singal to a process?
[12:55:39] jhass: there are no custom signals
[12:55:40] hubcaps: More on signals here, it's good to know the base ones =] http://www.comptechdoc.org/os/linux/programming/linux_pgsignals.html
[12:55:48] zotherstupidguy: yup thats what i want
[12:55:50] jhass: the kill command of your shell defaults to TERM
[12:56:07] al2o3-cr: when I type hello friend it only comes back as Hola can anyone help? https://gist.github.com/anonymous/3ee466ef1a6f6c5be69b
[12:56:34] dblessing: has joined #ruby
[12:57:05] zotherstupidguy: hubcaps i wish you love and happiness =)
[12:57:22] zotherstupidguy: jhass thanks for helping me out
[12:58:07] zotherstupidguy: this code would never work on a windows machine?
[12:58:10] porkqpain: has joined #ruby
[12:58:26] zotherstupidguy: nah, i dont really car
[12:59:05] Pisuke: has joined #ruby
[12:59:30] jhass: al2o3-cr: the API returns it that way
[12:59:44] jhass: al2o3-cr: http://cloud.aeshna.de/u/mrzyx/screenshots/screenshot_20150603_145940.png
[13:00:13] al2o3-cr: jhass: oh, so it's not a fault of mine
[13:00:29] davedev24_: has joined #ruby
[13:00:39] al2o3-cr: jhass: ok thanks
[13:01:20] ringarin: has joined #ruby
[13:03:02] al2o3-cr: ah, it works if i put friend hello it return Hola amigo
[13:03:44] DaniG2k: has joined #ruby
[13:04:02] Master44: what is an API guys?
[13:04:23] al2o3-cr: jhass: how should i store the languages?
[13:04:30] jhass: an interface exposed by a program/library to be used by other programs/libraries
[13:04:43] jhass: al2o3-cr: sounds about right
[13:05:20] bkxd: has joined #ruby
[13:05:29] al2o3-cr: just let me redo this plugin 1 sec
[13:05:29] g0rx: i need a programmer :)
[13:05:34] DarkFoxDK: has joined #ruby
[13:05:35] g0rx: i pay btc
[13:05:39] ldnunes_: has joined #ruby
[13:06:03] jhass: g0rx: did you at least automate that by now?
[13:06:16] [k-: what is FIFO FILO LIFO LILO equivalent in arrays?
[13:06:19] DarkFoxDK: has left #ruby: ()
[13:06:27] Master44: what do you need?
[13:06:43] sevenseacat: let them have each other.
[13:07:00] jhass: I demand logs and popcorn!
[13:07:09] [k-: more than 1 btc or less than 1 btc :O
[13:07:38] [k-: also FIFO as in data structures, queue, stacks, first in first out, etc
[13:07:42] ljarvis: g0rx: that's the last time you ask, nobody has contacted you so please stop
[13:08:07] ljarvis: (nobody else, I mean)
[13:08:19] bigmac_: has joined #ruby
[13:08:20] olegtc: has joined #ruby
[13:08:52] MaikV: has joined #ruby
[13:08:57] dopieee: has joined #ruby
[13:09:13] skade: has joined #ruby
[13:09:55] RazorX: has joined #ruby
[13:10:04] ljarvis: [k-: what's your question exactly, you want to map fifo/etc to queue/stack etc?
[13:10:12] jhass: [k-: wasn't LILO the same as FIFO and LIFO the same as FILO ?
[13:10:24] kcantwel: has joined #ruby
[13:10:44] [k-: jhass i don't know if they are the same
[13:10:58] bnagy: [k-: draw a 4x4 grid with push pop shift unshift, then put the labels in the correct boxes
[13:11:06] [k-: ljarvis: i just want to make sense of how push, pop unshift and shift
[13:11:14] jhass: [k-: where did you read about LILO and LIFO?
[13:11:18] jenrzzz: has joined #ruby
[13:11:36] ljarvis: bnagy's idea is good
[13:11:44] caseypatrickdris: has joined #ruby
[13:11:55] ljarvis: basically you can just search for queue/stack implementations and build your own off of those
[13:12:01] someword: has joined #ruby
[13:12:17] [k-: wikipedia lists FIFO and LIFO http://en.wikipedia.org/wiki/FIFO_%28computing_and_electronics%29
[13:12:24] heftig: bnagy: 2x2 grid; push and unshift in the rows, pop and shift in the columns
[13:12:27] Hien: has joined #ruby
[13:12:40] haxrbyte: has joined #ruby
[13:12:42] bnagy: that is superior
[13:12:59] bnagy: but less sarcastic
[13:13:50] tubuliferous_: has joined #ruby
[13:14:13] jhass: [k-: oh right, where did you get FILO from then :P
[13:14:49] sgambino: has joined #ruby
[13:15:20] Yzguy: has joined #ruby
[13:15:53] bnagy: the bakery
[13:16:04] havenwood: has joined #ruby
[13:16:22] bnagy: sorry.. I am waiting for a long running curl mirror to finish so I can't actually do any work at the moment :<
[13:16:37] jhass: no worries, I like the bakery
[13:17:54] tkuchiki: has joined #ruby
[13:20:22] malconis: has joined #ruby
[13:20:57] [k-: extra thought?
[13:21:04] griffindy: has joined #ruby
[13:21:32] malconis: has joined #ruby
[13:21:59] jerius: has joined #ruby
[13:22:54] [k-: http://en.wikipedia.org/wiki/FIFO_%28computing_and_electronics%29#Head_or_tail_first
[13:22:54] symm-: has joined #ruby
[13:23:17] [k-: hmm this could be LIFO
[13:23:34] TheNet: has joined #ruby
[13:23:48] allcentury: has joined #ruby
[13:24:13] abuzze: has joined #ruby
[13:24:15] TwinkleHood: has joined #ruby
[13:24:19] atomical: has joined #ruby
[13:24:22] hoey: has joined #ruby
[13:24:47] sigden: has joined #ruby
[13:24:50] jhass: okay, let's put it different, if the last item to enter is the last item to get out, what's the first one to enter?
[13:25:25] apeiros: jhass: FINO!
[13:25:29] jhass: actually the former doesn't even make sense, does it?
[13:25:32] abuzze: has joined #ruby
[13:25:34] jhass: ACTION is confused
[13:25:38] huddy: has joined #ruby
[13:25:38] rickmasta: has joined #ruby
[13:26:10] casadei: has joined #ruby
[13:26:13] apeiros: hm? if you're confused about whether FIFO = LILO - you're right. they're equivalent.
[13:26:36] hoey: Hi, can I ask a kind of cliche question?
[13:26:37] apeiros: if the last to come in is the last to get out, then that means that the first to come in will be the first to get out
[13:27:02] havenwood: If `FIFO = LILO - you're right` then `FIFO + you're right = LILO`?
[13:27:13] apeiros: ACTION havens some wood
[13:27:17] jhass: ?ask hoey
[13:27:17] ruboto: hoey, Don't ask to ask. Just ask your question, and if anybody can help, they will likely try to do so.
[13:27:18] apeiros: hoey: just ask
[13:28:19] hoey: I've got used to write some python codes, but I'm not totally satisfied with python's syntax(actually, I hate the 'self'), I envy ruby's syntax.
[13:28:46] hoey: Are there anyone who's good at both? ruby and python?
[13:28:54] ruboto: Just ask your question, if anyone has or can, they will respond.
[13:28:58] apeiros: probably. I'm not, though.
[13:29:10] justintv90: has joined #ruby
[13:29:32] jhass: ACTION wonders if he'll get to the point to only answer with ?foo
[13:29:37] hoey: I wanna just listen about the experiences and lessons...
[13:29:47] RegulationD: has joined #ruby
[13:29:51] jhass: uh, why? what are you afraid of?
[13:30:05] fabrice31: has joined #ruby
[13:30:20] hoey: And actually, I'm not a native speaker, Maybe I'm failing to deliver my thoughts...
[13:30:40] Spami: has joined #ruby
[13:30:41] jhass: 70-80% of the currently active people here aren't ;)
[13:30:44] Darkwater: your english sounds better than that of the average american
[13:30:51] Darkwater: which doesn't say a lot but still
[13:31:28] Morkel: has joined #ruby
[13:31:48] jhass: hoey: I moved from Python to Ruby, both languages are about the same level of abstraction so easy to pick up and fairly easy to even hop between them
[13:32:00] mrmargolis: has joined #ruby
[13:32:01] workmad3: has joined #ruby
[13:32:08] Miphix: has joined #ruby
[13:32:11] delianides: has joined #ruby
[13:32:15] apeiros: from my limited experience with python, I'd agree
[13:32:22] hoey: I'm just reading the book "seven languages in seven weeks"
[13:32:32] hoey: It's really fun
[13:32:39] apeiros: there's some comparably small philosophical differences. but IMO they've got more in common than different
[13:32:45] hoey: and the first chapter of the book is ruby.
[13:33:08] gregf_: and whats the other 6?
[13:33:37] sn4p3: has joined #ruby
[13:33:40] jhass: gregf_: Rake, Rails, RSpec shit I don't get 6 together
[13:33:47] bmurt: has joined #ruby
[13:33:48] hoey: which has a prototype paradigm lanugeage
[13:34:03] bkxd: has joined #ruby
[13:34:11] gregf_: jhass: er, i thought those are subsets of ruby :/
[13:34:13] hoey: Prolog, Haskell, Erlang, Io, Scala,...and
[13:34:19] jhass: gregf_: that's the pun
[13:34:24] hoey: let me check..
[13:34:30] havenwood: gregf: The Rails language is its own lang!
[13:34:38] havenwood: gregf: Same with Rspec-lang. :P
[13:35:32] jhass: Chef, two more
[13:35:42] northfurr: has joined #ruby
[13:35:43] BiHi: has joined #ruby
[13:36:01] gregf_: hoey: ooooo. Io(never heard of) but ruby seems to be the odd one
[13:36:07] hoey: I've just skimmed the ruby chapter
[13:36:20] umgrosscol: has joined #ruby
[13:36:25] hoey: and it seems that the meta programming is the important feature in ruby
[13:36:35] mary5030: has joined #ruby
[13:36:58] rht: has joined #ruby
[13:37:10] hoey: the book covers about various paradigms of programming languages
[13:37:20] gregf_: they prolly feel moving from ruby to functional programming easier
[13:37:24] poguez_: has joined #ruby
[13:38:25] gregf_: jhass: haml, heaven only knows what thats is(surely not a templating engine) - more of a data format i guess
[13:38:27] hoey: And I've just finished ruby koans
[13:38:32] gregf_: s/thats/that/
[13:38:34] jhass: gregf_: hehe
[13:38:39] hoey: It was really fun
[13:38:58] hoey: I'm curious about
[13:39:34] hoey: why are there some built-in functions have multiple-names?
[13:39:49] heftig: ad-hoc design
[13:39:58] hoey: Just matter of tastes?
[13:40:05] hoey: or readability?
[13:40:29] jhass: I guess the idea was to offer readability but at this point it's legacy if we're honest
[13:41:33] kitallis: has joined #ruby
[13:41:49] hoey: Humm... thx for answering
[13:41:50] heftig: ruby's core classes are pretty poorly designed
[13:41:53] kobain: has joined #ruby
[13:42:04] heftig: they're also completely implemented in C
[13:42:25] kitallis: is there a way to slice a subhash for certain non-empty/nil keys?
[13:42:26] sevenseacat: whats wrong with that>
[13:43:55] hoey: I'll keep enjoying with joy
[13:43:59] perrier: has joined #ruby
[13:44:00] jhass: kitallis: you'll have to select yourself in core ruby, activesupport (rails) offers Hash#slice
[13:44:26] ag4ve: kitallis: hash.grep .* ?
[13:44:30] kitallis: oh yeah, I was actually talking about activesupport Hash#slice
[13:45:05] elia: has joined #ruby
[13:45:06] jhass: AS also offers Hash#compact
[13:45:23] yqt: has joined #ruby
[13:46:01] ndogz_: has joined #ruby
[13:46:40] ag4ve: cool, didn't know about compact
[13:47:26] datanoise: has joined #ruby
[13:47:38] ag4ve: otoh, you'd have to test if your result had any elements after
[13:47:54] jhass: depends on what you're doing
[13:47:54] abuzze: has joined #ruby
[13:48:00] tagrudev: has joined #ruby
[13:48:55] fujimura: has joined #ruby
[13:48:59] enebo: has joined #ruby
[13:49:38] devdazed: has joined #ruby
[13:49:43] tcopeland: has joined #ruby
[13:49:49] paulcsmith: has joined #ruby
[13:51:26] albercuba: Hello everyone, can someone help me with this http://pastebin.com/RyTwGTf4
[13:51:27] quimrstorres: has joined #ruby
[13:51:27] ruboto: albercuba, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/94410a57c2cabff789fa
[13:51:27] ruboto: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[13:51:50] commondream: has joined #ruby
[13:51:51] Darkwater: and is also simply ugly
[13:52:03] bnagy: wow, gold star to whoever added that to the bot
[13:52:17] insidious: has joined #ruby
[13:53:08] senayar: has joined #ruby
[13:53:27] Brozo: has joined #ruby
[13:53:43] loechel: has joined #ruby
[13:54:05] dudedudeman: ACTION bows to ruboto
[13:54:08] CustosLimen: has joined #ruby
[13:54:31] lolmaus: has joined #ruby
[13:55:16] _ixti_: has joined #ruby
[13:56:22] axl_: has joined #ruby
[13:56:50] Ropeney: has joined #ruby
[13:56:51] bnagy: albercuba: looks like you're missing i18n
[13:57:03] albercuba: i18n is installed
[13:57:17] bnagy: but also you're running a very unsupported ruby
[13:57:17] jhass: albercuba: is it in your Gemfile?
[13:57:25] jhass: oh also that
[13:57:52] sandelius: has joined #ruby
[13:57:53] albercuba: how can i check that?
[13:58:13] albercuba: how can i check if it is in my gemfile
[13:58:17] jhass: you open it and look
[13:58:35] apeiros: we have escalations of "unsupported"? mostly unsupported, very unsupported, totally unsupported, ridiculously unsupported?
[13:58:57] chinmay_dd: has joined #ruby
[13:59:03] bnagy: well 1.9 is unsupported, but I'd still probably answer questions about it
[13:59:15] albercuba: jhass, i do not use ruby, i had to install it because i was asked to, in order to run some software
[13:59:22] sevenseacat: 1.8.7 comes close to 'totally unsupported' i think
[13:59:23] bnagy: 1.8 has been dead for how many years? 5+?
[13:59:30] jhass: albercuba: I'm sure you can open a text file and look at it though
[13:59:34] albercuba: i now 1.8.7 is super old and unsuported
[13:59:37] jhass: I trust in you! you can do it!
[13:59:58] albercuba: jhass, yes, but when you say "check your gemfile" i do not know what you mean :(
[14:00:11] jhass: thus I explained
[14:00:17] jhass: you open it and look at it
[14:00:19] boozehound: has joined #ruby
[14:00:25] crankharder: has joined #ruby
[14:00:25] hubcaps: in the main directory of whatever you are trying to run there will be a file literally named 'gemfile'
[14:00:31] commondream: has joined #ruby
[14:00:34] hubcaps: open that bad boy up and take a look
[14:00:35] jhass: I mean that it's a file is obvious now? it has "file" in its name
[14:00:58] bnagy: did they even have those back then?
[14:00:59] elev: has joined #ruby
[14:01:16] albercuba: no, my folder is empty. i am typing rails new testing and i get that error
[14:01:29] b_hoffman: has joined #ruby
[14:01:36] jhass: what's your rails -v?
[14:01:49] jhass: didn't they drop 1.8 support with 4?
[14:01:55] albercuba: Rails 3.2.1
[14:02:11] jhass: gem which i18n ?
[14:02:15] b_hoffman: has left #ruby: ()
[14:02:23] albercuba: gem which i18n
[14:02:38] albercuba: /home/administrator/.rbenv/versions/1.8.7-p375/lib/ruby/gems/1.8/gems/i18n-0.6.9/lib/i18n.rb
[14:03:28] Soda: has joined #ruby
[14:03:43] vikaton: has joined #ruby
[14:03:52] hinbody: has joined #ruby
[14:04:09] Master44: hello there guys
[14:04:10] jhass: I'm confused though, why are you generating a new rails app to "run some software"?
[14:04:21] Master44: I made a random guess game, how can I make it repeat all the time?
[14:04:29] jhass: Master44: with a loop
[14:04:37] albercuba: jhass, i just want to test that it works
[14:04:58] jhass: well, that part isn't, but maybe your actual stuff will?
[14:04:59] Master44: what loop jhass?
[14:05:15] skade: has joined #ruby
[14:05:25] jhass: Master44: the one fitting for your purpose, probably Kernel#loop or the while statement
[14:05:27] Master44: wait a sec I will gist the code
[14:06:13] caseypatrickdris: has joined #ruby
[14:06:31] Master44: I did while true and it worked :)
[14:06:41] super: has joined #ruby
[14:06:43] albercuba: ok thanks, i will give it to the guys who need the server and see if it works for them
[14:06:51] bnagy: Master44: use loop do instead
[14:06:58] bnagy: while true is just dumb for no reason
[14:07:01] dblessing: has joined #ruby
[14:07:03] caseypatrickdris: has joined #ruby
[14:08:31] axl__: has joined #ruby
[14:09:01] olistik: has joined #ruby
[14:09:10] freerobby: has joined #ruby
[14:10:46] ammar: has joined #ruby
[14:10:46] g0rx: i need a programmer :)
[14:11:01] ag4ve: me too :)
[14:11:35] surrounder: g0rx: again ?
[14:11:46] g0rx: whats wrong man ?
[14:11:58] jhooker: has joined #ruby
[14:12:20] g0rx: surrounder every time i write some thing u comment
[14:12:21] jhass: g0rx: you not realizing that this method won't work
[14:12:22] allcentury: has joined #ruby
[14:12:38] g0rx: people please get a life
[14:12:43] g0rx: u always online
[14:12:51] jhass: how do you know?
[14:12:56] g0rx: night day 24/24
[14:12:59] surrounder: g0rx: my logs tell otherwise
[14:13:03] g0rx: hhhhhhhh
[14:13:35] g0rx: if u worked like a server u will earn lot money
[14:14:05] Master44: g0rx you asked like 10 times for a programmer
[14:14:08] surrounder: I just work ON servers, also earns a nice living
[14:14:26] Master44: g0rx please stop ...
[14:14:31] caseypat_: has joined #ruby
[14:14:38] g0rx: hhh evry body against me
[14:14:44] g0rx: look like english ladies
[14:15:00] khebbie: has joined #ruby
[14:15:12] jhass: don't get insulting
[14:15:23] g0rx: for fun man
[14:15:25] g0rx: get a life
[14:15:45] ndogz: has joined #ruby
[14:15:46] jhass: !kick g0rx bye
[14:15:46] helpa: jhass: No.
[14:15:47] ruboto: ruboto kicked g0rx:
[14:15:47] ruboto: -o ruboto
[14:15:51] RegulationD: has joined #ruby
[14:15:56] g0rx: has joined #ruby
[14:16:14] Kricir: has joined #ruby
[14:16:19] olistik: has joined #ruby
[14:16:42] g0rx: kick jhass dont play herro
[14:16:57] jhass: if you continue we make this permanent
[14:16:59] sevenseacat: g0rx: do you really want to do this?
[14:17:16] g0rx: its just for fun
[14:17:17] j4cknewt: has joined #ruby
[14:17:21] g0rx: i like ruby
[14:17:39] jhass: I think I made very clear that you're the only one that's having fun
[14:17:47] dopie: has joined #ruby
[14:17:57] g0rx: yes right
[14:18:44] g0rx: so how u can help me beside banning me
[14:18:49] bantic: has joined #ruby
[14:18:51] caseypatrickdris: has joined #ruby
[14:18:59] Fooster_: has joined #ruby
[14:19:17] surrounder: maybe you should discuss ruby, or just idle
[14:19:23] jhass: you've been long enough here to watch how this work, we support you in your own efforts but we're not here to get hired
[14:20:05] g0rx: ok i support u
[14:20:28] elev: has joined #ruby
[14:20:28] elev: My wifi so bad omg
[14:21:09] olistik: has joined #ruby
[14:21:10] gambl0re: has joined #ruby
[14:22:45] Scripore: has joined #ruby
[14:23:09] segfalt: has joined #ruby
[14:24:23] dudedudeman: well..i sure screwed that one up
[14:24:44] platosha: has joined #ruby
[14:25:11] kies: has joined #ruby
[14:28:35] vyorkin: has joined #ruby
[14:29:07] lavros: has joined #ruby
[14:30:34] bruno-: has joined #ruby
[14:31:09] mister_solo: has joined #ruby
[14:31:20] krz: has joined #ruby
[14:32:48] iamjarvo: has joined #ruby
[14:33:18] thiagovsk: has joined #ruby
[14:33:30] iamjarvo: has joined #ruby
[14:35:08] joonty: has joined #ruby
[14:36:07] avat: has joined #ruby
[14:37:17] chouhoulis: has joined #ruby
[14:37:40] j_mcnally: has joined #ruby
[14:38:06] allomov: has joined #ruby
[14:38:17] ESpiney: has joined #ruby
[14:38:21] chouhoulis: has joined #ruby
[14:38:51] NeverDie: has joined #ruby
[14:41:08] shevy: no you don't!
[14:41:11] shevy: you dude it up
[14:42:35] maxmanders: has joined #ruby
[14:43:17] OtterCoder: has joined #ruby
[14:44:13] shevy: it is too hot here
[14:44:31] shevy: 32?C now... I can't even think
[14:44:44] dudedudeman: shevy be dead
[14:44:57] shevy: I will be soon... I am sure the next days will be even worse
[14:45:01] shevy: until it will rain finally
[14:45:32] dudedudeman: we had 27 days of rain out of 31 in the month of may. people smarter than me were saying that this is a once in a 2000 year kind of thing for this area
[14:45:35] whippythellama: has joined #ruby
[14:45:39] bnagy: shevy: 26 here
[14:45:46] bnagy: but it's like 10pm
[14:46:16] shevy: 26 would be ok... although that's actually quite a lot too for 10pm
[14:46:44] bnagy: yeah daytime is more like 36. Harden up. :)
[14:47:09] Scroff: has joined #ruby
[14:47:16] bootstrappm: has joined #ruby
[14:47:30] dfockler: has joined #ruby
[14:48:07] sigurding: has joined #ruby
[14:48:26] fabrice31_: has joined #ruby
[14:50:36] micmus: has joined #ruby
[14:51:28] yqt: has joined #ruby
[14:51:58] skade: has joined #ruby
[14:52:26] byonic: has joined #ruby
[14:52:36] allomov: has joined #ruby
[14:52:47] jpfuentes2: has joined #ruby
[14:52:59] dzejrou: has joined #ruby
[14:53:37] avdi: has joined #ruby
[14:54:26] dfinninger: has joined #ruby
[14:55:07] joaomdmoura: has joined #ruby
[14:55:12] nedp: has joined #ruby
[14:55:40] olistik: has joined #ruby
[14:57:29] DynamicMetaFlow: has joined #ruby
[14:59:06] CustosLimen: has joined #ruby
[14:59:07] coderhs: has joined #ruby
[14:59:13] nhhagen_: has joined #ruby
[15:01:01] abuzze: has joined #ruby
[15:01:11] freerobby: has joined #ruby
[15:01:30] jenrzzz: has joined #ruby
[15:02:00] tubuliferous_: has joined #ruby
[15:03:54] dudedudeman: we routinely hit 40 here in texas during hte summers. #notwant
[15:04:18] oddjob001_: has joined #ruby
[15:05:34] oddjob001_: can someone help me figure this out? newb, first time working with hashes. how can I get each output from 6-8 to be put into a new single hash? https://gist.github.com/anonymous/3d9f01d770ca60e2c862
[15:06:25] rodferso1: has joined #ruby
[15:06:41] bnagy: did you mean to paste some example code, because you accidentally pasted a screen full of barf
[15:06:48] Brozo: has joined #ruby
[15:07:04] abuzze: has joined #ruby
[15:07:14] apeiros: bnagy: come on, that's not necessary
[15:07:25] sevenseacat: i shouldnt have, but i chuckled.
[15:08:03] apeiros: oddjob001_: newmodels.split('\n') will return an array, and .each on the array will only yield one item each turn
[15:08:14] shevy: dudedudeman did Texas turn you into a dudedude?
[15:08:20] oddjob001_: bnagy: thanks for providing support for people learning ruby.
[15:08:24] bkxd: has joined #ruby
[15:08:27] apeiros: oddjob001_: note that '\n' is NOT a newline, it's a backslash followed by n. "\n" is a newline
[15:08:46] apeiros: oddjob001_: i.e., '\n' == "\\n"
[15:08:49] dudedudeman: shevy: at the very least, texas turned me in to a snot bucket because of my allergies
[15:09:14] shevy: the dude is not allowed to have any allergies
[15:09:25] dudedudeman: yeah if you could fix that for me, that'd be great....
[15:09:35] oddjob001_: apeiros: thanks. \n is actually in the parsing from the above output. when i get to pmodelshash each of those are printed out as hashes. - I just need to get each of those into a single hash. thats where Im stuck
[15:09:41] bnagy: oddjob001_: simplifying code is one of the best ways to learn
[15:09:51] bnagy: also one of the best ways to debug
[15:10:24] oddjob001_: bnagy: hard to simplify when you ask for help and people immediately mock you. try to remember that
[15:10:38] apeiros: oddjob001_: assign before line 3
[15:10:46] bnagy: I don't know why you think I'm mocking you
[15:10:47] apeiros: oddjob001_: assign * modelshash = {} * before line 3
[15:10:52] bnagy: I'm mocking whoever wrote that code
[15:10:59] olistik: oddjob001_: the code is a bit difficult to understand
[15:11:08] olistik: there's quite a lot going on
[15:11:09] mordocai: has joined #ruby
[15:11:14] shevy: that facter is packed with a lot of code
[15:11:32] olistik: oddjob001_: do you need to put "value" into the resulting hash?
[15:11:33] shevy: when you pack a lot of statements together, it's hard to see what is going on where
[15:11:37] oddjob001_: bnagy: cool i did. its my 3rd week in ruby. so i appreciate your honesty
[15:12:07] olistik: and I can't understand the block 11-15, what's its purpose?
[15:12:10] shevy: you wrote facter?
[15:12:33] apeiros: oddjob001_: don't mind bnagy. I've seen them provide useful help. maybe having a bad day.
[15:12:34] oddjob001_: olistik: if I dont put value then I get a hash of arrays
[15:12:44] senayar: has joined #ruby
[15:13:29] MaikV: has joined #ruby
[15:13:42] oddjob001_: apeiros: bingo. that did it.
[15:14:34] olistik: oddjob001_: https://gist.github.com/olistik/5b4994406df1cd349872
[15:14:38] iamjarvo: has joined #ruby
[15:14:48] _seanc_: has joined #ruby
[15:14:50] oddjob001_: apeiros: so it is adding each part of the below loop to modelshash = { } yes?
[15:15:10] oddjob001_: olistik: ooooh fancy.
[15:15:12] ttilley: has joined #ruby
[15:15:13] apeiros: oddjob001_: yes. like before. but without resetting it to {} on every iteration.
[15:15:19] ttilley: has joined #ruby
[15:15:50] olistik: from your initial gist, it looks that while you're composing modelshash it gets passed to the Facter.add block. Is it what you're trying to achieve?
[15:15:55] anytimeb_: has joined #ruby
[15:16:00] oddjob001_: olistik: thanks. its nice when people provide example and assistance with bettering your code as you are in the beginning learning stages. much appreciated
[15:16:08] bkxd: has joined #ruby
[15:16:19] ur5us: has joined #ruby
[15:16:50] oddjob001_: olistik: yes. so right now I get {"key" => value} from each line. Facter.add should end up being the combination of all of those inputs ran through the loop
[15:16:55] sigden: has joined #ruby
[15:17:07] devdazed: has joined #ruby
[15:17:13] jschoolcraft: has joined #ruby
[15:17:26] micmus: has joined #ruby
[15:17:31] olistik: oddjob001_: you're welcome :-) that said, the initial gist is really difficult to understand, at least for me :-) You should try to explain the logical block that you've inserted and what's your goal so that people can follow your thoughts and not just stare at a wall of nested code ;-)
[15:17:42] oddjob001_: so the final value of Facter.add would be qlogicmodels = {"key1" => value , "key2" => value, so on and so forth}
[15:19:06] mistermocha: has joined #ruby
[15:19:42] spyderman4g63: has joined #ruby
[15:19:51] shevy: you use API calls like this there: Facter::Core::Execution
[15:19:58] shevy: and then you call exec
[15:20:00] pikos: has joined #ruby
[15:20:01] TommyTheKid: has joined #ruby
[15:20:03] shevy: why not Facter.exec instead?
[15:21:06] oddjob001_: shevy: wish i was knowledgable enough to tell you. I am just going off what the facter docs recommend
[15:21:25] shevy: I thought you wrote it
[15:21:30] blandflakes: has joined #ruby
[15:21:35] shevy: you just use what someone else wrote there :)
[15:22:04] oddjob001_: well i just used what the docs say to use - https://docs.puppetlabs.com/facter/2.4/custom_facts.html#executing-shell-commands-in-facts
[15:22:27] shevy: yeah, I don't like that API/DSL layout at all
[15:22:40] oddjob001_: this is my second ruby attempt ever lol
[15:22:43] Cache_Money: has joined #ruby
[15:22:54] shevy: interesting that this seems to be part of puppet
[15:23:15] arup_r: has joined #ruby
[15:23:46] atmosx: good evening shevy
[15:23:51] shevy: atmosx! did you finally get your pharmacy degree
[15:24:08] oddjob001_: shevy: yep. for handling custom facts. the exec just execute the qlogic command line interface then i parse all the data from there. its all working aside from getting the hashes into a a single hash, which apeiros assisted with. But now I need to figure out why facter isnt adding the final output
[15:24:15] atmosx: shevy: lol, nope. I will get my degree (hopefully) in 06/2016 so ... in about 13 months
[15:24:27] shevy: k the one year countdown has started
[15:25:01] shevy: oddjob001_ usually in ruby, once you have data in an array or a hash, it's very simple to manipulate
[15:25:10] snockerton: has joined #ruby
[15:25:20] shevy: like adding new content on a hash via .merge() or .update() (though perhaps one is an alias to the other hmm)
[15:26:19] chinmay_dd: has joined #ruby
[15:26:50] oddjob001_: shevy: what through me for a loop wasnt necessarily adding it all to a hash, it was not understanding how to handle the loop, then taking each of the outputs and combing them all. but apparently I was just 1 line off and 1 loop wrong :( - this shit is so fun. lol
[15:27:01] oddjob001_: through? threw
[15:27:43] BanzaiJoe: has joined #ruby
[15:28:01] shevy: well, very often a loop is not necessary
[15:28:05] shevy: it depends on your use case
[15:28:22] shevy: you have lots of filter-like manipulations available... find/detect/select/reject... these kind of things
[15:28:30] rcvalle: has joined #ruby
[15:28:33] dfinninger: has joined #ruby
[15:28:56] shevy: I see that you already used .each_with_object()
[15:29:07] bluOxigen: has joined #ruby
[15:29:20] oddjob001_: my last programming language was BASIC in 84
[15:29:44] oddjob001_: i see things have changed
[15:30:12] olistik: shevy: actually it's my fork :-) oddjob001_'s first version is here: https://gist.github.com/anonymous/3d9f01d770ca60e2c862
[15:30:44] DexterLB: has joined #ruby
[15:30:47] elev: has joined #ruby
[15:31:19] oddjob001_: so I am still stuck on now having a single final output of the hash
[15:31:32] olistik: oddjob001_: what about this? https://gist.github.com/olistik/5b4994406df1cd349872
[15:31:46] shevy: olistik damn you got me there
[15:31:59] olistik: https://gist.github.com/olistik/5b4994406df1cd349872#file-gistfile1-rb-L5 -> you get newmodels
[15:32:04] shevy: your two nicks also start with o and xchat assigned the same colour to you
[15:32:24] olistik: 7-10 -> you compose the modelshash
[15:32:38] olistik: 12-16 -> you send modelshash to Facter
[15:32:44] shevy: http://shevegen.square7.ch/screenshot.png
[15:32:52] mrsolo: has joined #ruby
[15:33:12] olistik: about the last block: is this how Facter should behave?
[15:33:16] shevy: looks like a monologue from xchat here :-)
[15:33:26] olistik: shevy: gh :-)
[15:33:29] someword: has joined #ruby
[15:33:37] paulcsmith_: has joined #ruby
[15:33:55] dgutierrez1287: has joined #ruby
[15:34:12] olistik: the hax parts contained in the gist links don't help either :-)
[15:34:12] oddjob001_: ok what about this? https://gist.github.com/anonymous/ed67168eb1fb96ef5daf - moved the hash outside of the loop (to line 3). parse all the data in the loop from 4-11 then call back the entire hash on 3?
[15:34:15] blueOxigen: has joined #ruby
[15:34:47] oddjob001_: line 12 now prints out full combined hash
[15:35:05] olistik: oddjob001_: looks much better :-)
[15:35:07] alphaatom: has joined #ruby
[15:35:24] oddjob001_: thank you all very much. shit be ugly i know. but Im lurning gud
[15:35:45] spyderman4g63: has joined #ruby
[15:36:15] alphaatom: has joined #ruby
[15:36:25] olistik: I suggest you to extract some parts into functions
[15:37:11] olistik: at least, by naming some portions of the code you help describing them to others (or to your future self)
[15:37:35] fujimura_: has joined #ruby
[15:38:10] dhjondoh: has joined #ruby
[15:38:37] fella5s: has joined #ruby
[15:38:54] oddjob001_: olistik: the problem is I dont quite get definining functions and calling them yet. I mean i get it. but actually applying it is an entire other story. I think in a couple weeks Ill revisit my work and redo it all just to learn. this code at one point was like 30 lines. then i got it to 20, then 15 and so on. I am sure someone here could do it in much less.
[15:39:17] sandstrom: has joined #ruby
[15:39:21] bkxd: has joined #ruby
[15:39:25] moretti: has joined #ruby
[15:39:53] Lewix: has joined #ruby
[15:40:14] olistik: oddjob001_: don't get me wrong here, duplication is not always a bad idea. If it helps to describe the flow of code, then it's good. Of course, you shouldn't abuse it :-)
[15:40:29] tubuliferous_: has joined #ruby
[15:40:40] Lewix: "122.12".to_i == 122.12 wont work as expected obviously
[15:40:43] oddjob001_: olistik: thanks for you help and input.
[15:40:45] scottschecter: has joined #ruby
[15:40:52] Lewix: whats a neat way to make it work without crazy logic
[15:41:44] havenwood: lewix: to_f
[15:41:48] olistik: '122.12'.to_f == 122.12 # => true
[15:42:13] Lewix: ACTION feels dumb as ....
[15:42:15] Master44: someone here good with the if statement?
[15:42:28] ljarvis: good with the if statement?
[15:42:37] havenwood: master44: *if* you say so! :P
[15:42:39] ljarvis: can you be bad with the if statement?
[15:42:41] Lewix: havenwood: why is that the easiest thing to do never pop up when it's god damn obvious ^^
[15:42:45] ndrei: has joined #ruby
[15:42:57] olistik: lewix: aliens.
[15:42:58] spyderman4g63: has joined #ruby
[15:43:58] jhass: "bad if, take it down! Take it down! bad if!" like that?
[15:43:59] olistik: :bad_with_the_if_statement unless good_with_the_if_statement?
[15:43:59] Master44: I got the worst wifi ever I cant load in gisthub
[15:43:59] Master44: can I paste in a 5 line code here?
[15:44:19] Master44: haha ok nm about that question
[15:44:29] shevy: we want to know the code now
[15:44:39] Master44: here it is:
[15:44:39] Master44: put = gets.chomp
[15:44:39] Master44: if put == "yes" or "Yes" puts "I am sorry, the app its over. Well done!"
[15:44:39] Master44: elsif put == "no" or "No" puts "Have a good day sir!"
[15:44:41] shevy: you can't show an apple to a horse, then eat it yourself
[15:44:42] havenwood: lewix: Though comparing Floats is suspect. It's not hard to come up with an example where that fails. You may want to do something along the assert_in_delta lines.
[15:44:45] krz: has joined #ruby
[15:44:51] baroquebobcat: has joined #ruby
[15:44:55] dzejrou: has joined #ruby
[15:45:01] shevy: this is a good example for case
[15:45:09] Lewix: havenwood: give me an example
[15:45:16] Master44: whast wrong with that code?
[15:45:18] Lewix: havenwood: assert_in_delta?
[15:45:20] shevy: user_input = gets.chomp; case user_input; when 'yes','Yes'; puts 'bla'
[15:45:29] shevy: master44 or even better, apply a .downcase
[15:45:35] shevy: then you don't have to handle 'Yes', and only 'yes'
[15:45:49] havenwood: >> "1.9999999999999999".to_f == 2.0
[15:45:50] ruboto: havenwood # => true (https://eval.in/375031)
[15:45:56] ljarvis: master44: you can do `if foo == 'foo' or 'bar'` you need to do `if foo == 'foo' or foo == 'bar'`
[15:46:05] shevy: havenwood failed at school math!!!
[15:46:08] Lewix: havenwood: holycow...
[15:46:11] ljarvis: master44: or, you can do `if foo.downcase == 'yes'`
[15:46:13] Master44: so then I am done?
[15:46:13] Master44: I just remove or and .downcase?
[15:46:22] shevy: master44 in this case yes
[15:46:22] ljarvis: master44: yep downcase
[15:46:32] olistik: or put.match /[yY]es/
[15:46:45] Master44: put == "No.downcase"
[15:46:46] Lewix: havenwood: how would you use assert_in_delta
[15:46:50] havenwood: lewix: https://github.com/seattlerb/minitest/blob/master/lib/minitest/assertions.rb#L149-L164
[15:46:54] shevy: what is that master44
[15:46:58] ljarvis: master44: no.. put.downcase == "no"
[15:47:06] shevy: .downcase is a method
[15:47:08] havenwood: lewix: Oops, I linked the wrong assertion.
[15:47:13] shevy: "bla anything .bla" is always a String object
[15:47:16] nhhagen: has joined #ruby
[15:47:18] havenwood: lewix: The one below my link.
[15:47:26] ndogz_: has joined #ruby
[15:47:29] pietr0: has joined #ruby
[15:47:51] Master44: it still doesnt work guys
[15:47:58] olistik: lewix: how about BigDecimal.new('1.9999999999999999') == 2.0 # => false
[15:48:20] Master44: the answer is I am sorry, the app its over
[15:48:20] Master44: when I type yes or 222 or sjdsids
[15:48:35] Lewix: olistik: i like it
[15:48:45] Lewix: havenwood: i see. thanks for the link - bookmarked- could be useful
[15:48:49] mister_s_: has joined #ruby
[15:48:55] Lewix: olistik: what do you think of..
[15:48:55] olistik: lewix: you need to require 'bigdecimal' first
[15:49:03] bnagy: lewix: srsly just train yourself never to use == with floats
[15:49:07] Master44: ah it works now thanks
[15:49:15] jhass: lewix: or you just decide on a precision you want to support and .round
[15:49:16] bnagy: < and > only
[15:49:18] havenwood: lewix: Rationals are nice.
[15:49:19] Lewix: BigDecimal("122.12".to_f) == 122.12 wont work as expected obviously
[15:49:33] Lewix: BigDecimal.new*
[15:50:08] Lewix: bnagy: totally
[15:50:19] ljarvis: lewix: actually BigDecimal is a method too
[15:50:21] olistik: BigDecimal("122.12".to_f, 2) == BigDecimal.new(122.12, 2) # => true
[15:50:23] ljarvis: so your first example is ok
[15:50:40] jhass: lewix: a-b <= 0.001 is common too, with 0.001 again being the precision you want
[15:50:53] havenwood: lewix: Floats...
[15:50:54] Dakar: has joined #ruby
[15:50:56] Dakar: . We are Devs https://twitter.com/ngamesdev
[15:50:58] jhass: well, (a-b).abs I guess
[15:51:11] havenwood: Dakar: What about it?
[15:51:13] Lewix: Dakar: do you live in dakar
[15:51:13] jhass: Dakar: Ruby devs?
[15:51:17] Lewix: havenwood: yea...?
[15:51:26] Dakar: yes in dakar
[15:52:04] havenwood: lewix: http://ruby-doc.org/core/Rational.html
[15:52:05] xargs: has joined #ruby
[15:52:33] Lewix: Dakar: nagadef
[15:52:36] baweaver: has joined #ruby
[15:52:51] kcantwel: has joined #ruby
[15:52:51] havenwood: >> 1/2r * 1/4r
[15:52:52] ruboto: havenwood # => (1/8) (https://eval.in/375033)
[15:52:56] havenwood: lewix: ^ for example
[15:53:11] fmcgeough: has joined #ruby
[15:53:47] havenwood: lewix: Well, that's not a good example since it works with Floats, but anyways.
[15:55:11] mase-chatter: has joined #ruby
[15:55:41] mase-chatter: has joined #ruby
[15:56:13] woodennails: has joined #ruby
[15:57:09] segfalt: has joined #ruby
[15:57:12] Master44: its put == "yes".downcase
[15:57:31] ogpastaling: has joined #ruby
[15:57:49] towski_: has joined #ruby
[15:58:20] havenwood: master44: What?
[15:58:24] commondream: has joined #ruby
[15:58:31] codeFiend: has joined #ruby
[15:58:45] mrmargol_: has joined #ruby
[15:59:14] Master44: put = gets.chomp
[15:59:14] Master44: if put == "Yes".downcase puts "I am sorry, the app its over. Well done!"
[15:59:14] Master44: elsif put == "No".downcase puts "Have a good day sir!"
[15:59:21] ruby-lang289: has joined #ruby
[15:59:41] k3asd`: has joined #ruby
[15:59:47] freerobby: has joined #ruby
[15:59:48] ljarvis: master44: what happens if put is "Yes"
[16:00:02] canton7: why compare put to "No".downcase? Why not just compare it to "no"? :P
[16:00:03] casadei: has joined #ruby
[16:00:14] havenwood: master44: What do you expect this to return?: "Yes".downcase
[16:00:17] Rubie: has joined #ruby
[16:00:19] Master44: I want them to type yes
[16:00:26] Master44: and both work
[16:00:28] ljarvis: mutating constants as a service
[16:00:34] ndogz: has joined #ruby
[16:00:36] canton7: master44, think about *what* you're downcasing...
[16:00:36] olistik: master44: usually you perform a downcase (or an upcase) on the input
[16:00:42] havenwood: master44: What do you expect this to return?: "Yes".downcase
[16:00:43] Master44: I want it to work if they type yes and Yes
[16:00:49] Master44: how can I do that?
[16:00:51] canton7: master44, answer the questions you're being asked
[16:00:57] Master44: on the input
[16:01:00] ljarvis: the penny drops
[16:01:05] ljarvis: master44: answer havenwood
[16:01:21] olistik: ljarvis: +1 :-)
[16:01:22] havenwood: Or I'll starve! I live on answers and I'm wilting...
[16:01:28] Master44: so put.downcase?
[16:01:28] Master44: so if they type YES or Yes or yes it will be correct?
[16:01:49] olistik: master44: it would be nice of you to answer havenwood's question :-)
[16:01:50] canton7: * try it ;)
[16:02:29] boozehound: has joined #ruby
[16:02:54] Master44: well thanks guys thank so much for help! :D
[16:03:16] VinnyBoy: has joined #ruby
[16:04:12] OtterCoder: has joined #ruby
[16:04:14] canton7: master44, you still haven't answered havenwood's question ;)
[16:04:15] Master44: what was havenswood question?
[16:04:15] Master44: havenwood got question for me?
[16:04:26] canton7: just... read up. a little bit
[16:04:34] olistik: (master44: What do you expect this to return?: "Yes".downcase)
[16:04:35] canton7: he asked you questions on here, and it would be nice if you didn't ignore them
[16:04:36] ljarvis: or a lot, it's in many places
[16:06:00] Blaguvest: has joined #ruby
[16:06:02] commondream: has joined #ruby
[16:06:13] canton7: we're serious, you know...
[16:06:44] drewo: has joined #ruby
[16:06:49] olistik: the waiting is excruciating..
[16:06:55] arup_r: what's the issue with this regex http://rubular.com/r/MXVexeOHhm I am checking duplicate character
[16:07:02] arup_r: but not match I found
[16:07:22] Master44: what question?
[16:07:23] Master44: I use terminal on mac
[16:07:23] Master44: cant scroll more up
[16:07:23] Master44: or I dont know how to do that.. :)
[16:07:24] Master44: I thought it return yes
[16:07:25] Master44: canton I am sorry I am bad enlgich to :P
[16:07:28] olistik: arup_r: you have an extra space at the end
[16:07:58] drewo: has joined #ruby
[16:08:03] arup_r: olistik: :/ thanks
[16:08:10] arup_r: I am a goat!!! :\
[16:08:13] canton7: why not (.)\1?
[16:08:19] canton7: uh.. why not '(.)\1' ?
[16:09:32] arup_r: because I am not good in Regex.. thanks :P canton7 :
[16:10:05] TwinkleHood: has joined #ruby
[16:10:20] ndrei: has joined #ruby
[16:10:34] jhass: master44: if you can't scroll up you should take to produce less lines
[16:10:51] theery: has joined #ruby
[16:11:41] bnagy: master44: fn + up arrow
[16:11:55] olistik: oh, nice: (.)\1+ I'm no expert in regexp but this looks cool :-)
[16:11:57] arup_r: why mine gives 4 matches.. I want only 2? http://rubular.com/r/Dtr7l8Bc8r
[16:11:59] jhass: *take care
[16:12:07] jhass: what's up with me today :/
[16:12:10] mary5030_: has joined #ruby
[16:12:30] codecop: has joined #ruby
[16:12:33] arup_r: how can I modify my code
[16:12:39] jhass: arup_r: rubular just lists all matches
[16:13:00] withnale_: has joined #ruby
[16:13:07] jhass: >> "abcccddde"[/(.)(?=\1)/]
[16:13:08] ruboto: jhass # => "c" (https://eval.in/375040)
[16:13:08] rdar: has joined #ruby
[16:13:24] arup_r: cool.. jhass thanks
[16:14:17] _seanc_: has joined #ruby
[16:14:57] arup_r: "abcccddde".match(/(.)(?=\1)/)
[16:15:01] randiman: has joined #ruby
[16:15:01] arup_r: >> "abcccddde".match(/(.)(?=\1)/)
[16:15:02] ruboto: arup_r # => #<MatchData "c" 1:"c"> (https://eval.in/375041)
[16:15:08] arup_r: >> "abcccddde".match(/(.)(?=\1)/).first
[16:15:09] ruboto: arup_r # => undefined method `first' for #<MatchData "c" 1:"c"> (NoMethodError) ...check link for more (https://eval.in/375042)
[16:15:16] Scripore: has joined #ruby
[16:15:18] arup_r: >> "abcccddde".match(/(.)(?=\1)/)[1]
[16:15:19] ruboto: arup_r # => "c" (https://eval.in/375043)
[16:15:26] jhass: ?experiment arup_r
[16:15:26] ruboto: arup_r, Please use your local irb or pry (see ?pry) to experiment, ruboto's eval functionality is for demonstration purposes only.
[16:15:46] arup_r: My IRB takes too much time to open that's why jhass :
[16:15:52] izzol: hmm, how I can know which type of Exception this is?: inflater.rb:44:in `inflate': invalid code lengths set (Zlib::DataError). I would like to be more specific in begin/rescue.
[16:15:55] jhass: then you should fix that
[16:16:06] arup_r: yes.. I'll buy a new machine..
[16:16:19] jhass: izzol: pretty sure it's a Zlib::DataError
[16:16:26] mary5030: has joined #ruby
[16:16:32] ramfjord: has joined #ruby
[16:16:37] jottr: has joined #ruby
[16:16:44] izzol: jhass: oo, I didn't know that I can use it :-)
[16:16:53] codecop: has joined #ruby
[16:17:29] izzol: works! thanks :-)
[16:17:29] jhass: if it can be raised it can be rescued
[16:17:30] dfockler: has joined #ruby
[16:19:35] ruby-lang289: does anyone here uses assert in ruby ?
[16:19:40] podman: has joined #ruby
[16:19:48] ruboto: Just ask your question, if anyone has or can, they will respond.
[16:19:53] yfeldblum: has joined #ruby
[16:20:23] abuzze: has joined #ruby
[16:21:10] jottr_: has joined #ruby
[16:21:19] deric_skibotn: has joined #ruby
[16:22:06] podman: Hey guys! Any idea why using ActiveRecord::Base.connection_pool.with_connection would take about 5-6 seconds to yield to the block?
[16:22:09] zendrix: has joined #ruby
[16:22:20] ericwood: podman: #rubyonrails is your best bet for AR stuff
[16:22:21] Missphoenix: has joined #ruby
[16:22:35] podman: ericwood: cool. asked in there as well. Thanks.
[16:22:57] apeiros: ?crosspost podman
[16:22:57] ruboto: podman, Please do not crosspost without at least telling so and mentioning provided suggestions and their outcome in all channels. Experience shows that people don't do either, and not doing so is considered rude.
[16:23:17] m0r0n: has joined #ruby
[16:23:23] segfalt: ruby-lang289: Lots of people use assertions, what???s your question?
[16:23:30] hazelux: has joined #ruby
[16:25:53] idafyaid: has joined #ruby
[16:25:53] idafyaid: has joined #ruby
[16:26:11] ruby-lang289: I'm trying to work out ruby using ruby koans and fumbling my way through it. I give it another try and come back. Seems to me at this stage, every test is to test for true. Thank you anyways.
[16:26:24] x0F: has joined #ruby
[16:26:37] centrx: has joined #ruby
[16:26:47] DexterLB: has joined #ruby
[16:26:54] hmnhf: has joined #ruby
[16:27:52] havenwood: ruby-lang289: Assert tests truthiness, so really that it's not `nil` or `false` but could be many things other than `true`.
[16:28:25] havenwood: ruby-lang289: For example: assert 42
[16:28:45] briandavis: has joined #ruby
[16:29:26] ta: has joined #ruby
[16:30:50] ESpiney_: has joined #ruby
[16:31:11] Brozo: has joined #ruby
[16:31:26] Igorshp: has joined #ruby
[16:31:32] drewo: has joined #ruby
[16:31:40] ruby-lang289: Thank you @havenwood
[16:32:23] XThief: has joined #ruby
[16:32:31] mrmargolis: has joined #ruby
[16:33:43] drewo: has joined #ruby
[16:34:17] edwinvdgraaf: has joined #ruby
[16:35:36] drewo: has joined #ruby
[16:35:52] OtterCoder: has joined #ruby
[16:37:32] Torrieri: has joined #ruby
[16:38:38] malconis_: has joined #ruby
[16:39:04] jpfuentes2: has joined #ruby
[16:40:02] ponga: has joined #ruby
[16:41:13] niftylettuce: has joined #ruby
[16:41:24] haxrbyte: has joined #ruby
[16:42:46] haxrbyte_: has joined #ruby
[16:44:07] spyderman4g63: has joined #ruby
[16:44:42] OtterCoder: has joined #ruby
[16:44:54] DexterLB: has joined #ruby
[16:45:06] Rodya_: has joined #ruby
[16:46:42] TheNet: is there a website to check for syntax erors?
[16:47:17] adaedra: To check ruby syntax errors?
[16:47:38] adaedra: ruby itself does that (there's a flag to do it without running the program, don't remember which one)
[16:47:45] TheNet: things like finding missing ends and highlighting them inline
[16:47:52] adaedra: thanks, apeiros
[16:47:55] spider-mario: has joined #ruby
[16:48:28] adaedra: if you're using vim, you can use syntastic which will do syntax review on save
[16:49:14] chussenot: has joined #ruby
[16:50:50] TinkerTyper: has joined #ruby
[16:51:16] lolmaus: has joined #ruby
[16:51:18] iliketurtles: has joined #ruby
[16:51:35] tubulife-: has joined #ruby
[16:51:37] gwendall: has joined #ruby
[16:51:45] miah: syntastic can also run rubocop =)
[16:52:39] jhass: TheNet: if you have missing ends you're probably not pedantic enough about your indentation ;)
[16:52:40] eam: syntax faux pas
[16:53:06] paulcsmith_: has joined #ruby
[16:53:06] ytti: one thing i like about golang is that it's so opinionated about style
[16:53:12] TheNet: jhass turned out I just wrote else instead of end ??\_(???)_/??
[16:53:20] bashusr: has joined #ruby
[16:53:20] adaedra: auto-indent can show you missing ends, too
[16:53:33] ytti: even if i don't like all those opinions, i think it's great that no one can argue what is right style
[16:53:39] ytti: and in the end, makes reading code easier
[16:53:59] eam: for example using cpp with ruby for macros
[16:54:45] jmignault: has joined #ruby
[16:55:47] mistermocha: has joined #ruby
[16:55:54] bootstrappm: adaedra love vim + syntactic
[16:56:22] Hijiri: has joined #ruby
[16:56:33] bootstrappm: though sometimes it still gets confused with the > 1.9 hash notation
[16:56:41] miah: i havent had that issue
[16:57:41] luckyme: has joined #ruby
[16:57:42] miah: though that syntax gets a little weird looking when dealing with symbols; `{ foo: :bar }`
[16:57:45] Channel6: has joined #ruby
[16:58:17] miah: i still prefer it over hash rockets
[16:58:34] centrx: hash rockets has a better name
[16:58:43] miah: but no hash
[16:58:49] miah: #> maybe?
[16:59:04] bootstrappm: i still prefer hash rockets
[16:59:14] pengin: has joined #ruby
[16:59:15] miah: i like typing less
[16:59:18] eam: bootstrappm: me too
[16:59:32] bootstrappm: it was so very uniquely ruby
[16:59:35] jhass: I like future compatibility to keyword arguments
[16:59:40] miah: its the same as perl =)
[16:59:41] adaedra: <bootstrappm> though sometimes it still gets confused with the > 1.9 hash notation
[16:59:48] eam: bootstrappm: hash rockets? Totally not unique to ruby :)
[16:59:56] adaedra: check that it uses the right ruby binary
[16:59:57] chouhoul_: has joined #ruby
[17:00:09] eam: I can't think of any syntax ruby invented, actually
[17:00:18] miah: so much borrowed from perl
[17:00:29] bootstrappm: adaedra: cool, I'll check it out thanks!
[17:00:33] miah: http://perldoc.perl.org/perlintro.html look at all the ruby =) http://perldoc.perl.org/perlintro.html
[17:01:18] eam: the :symbol syntax might be unique to ruby, actually
[17:01:19] bootstrappm: haha what language do explicit symbols come from?
[17:01:25] eam: bootstrappm: well, they came from perl
[17:01:31] eam: in perl you'd just use a bareword
[17:01:48] eam: a symbol is a string, after all
[17:01:53] sdothum: has joined #ruby
[17:02:01] eam: "foo" and :foo don't necessarily need to be different types
[17:02:15] bootstrappm: ah yeah, I meant the symbol + hash rocket combo. :symbol => felt very ruby
[17:02:26] eam: ah in perl it's just symbol => thing
[17:02:28] bootstrappm: symbol: value feels very much ... like a bunch of other languages hahah
[17:02:37] ogpastal_: has joined #ruby
[17:02:42] freerobby: has joined #ruby
[17:03:05] jfarmer: has joined #ruby
[17:03:09] eam: interestingly, because perl's variables are prefixed, thing => "val" is actually "thing" => "val"
[17:03:55] eam: the ruby :symbol notation behavior with quoting simple words without punctuation is very much like perl's implicit bareword handling
[17:04:12] Asher: has joined #ruby
[17:04:58] bootstrappm: wish I had learned a bit more of Perl when I saw it in college. I was just recently surprised that it has a map function
[17:05:31] eam: map, grep, it's the original "easy to use arrays and hashes" language
[17:06:27] eam: I can't find it at the moment but I read a great article a while back explaining that perl and most of the similar languages (python, ruby) are based around the cheap and easy Hash structure
[17:06:34] eam: which is distinct from many others
[17:06:53] eam: you can use a Hash in C, but you wouldn't heavily abuse it like you might in perl/python/ruby
[17:06:57] sdothum: has joined #ruby
[17:07:14] eam: that and regex are the real powerhouses behind the success of those languages
[17:08:21] _djbkd: has joined #ruby
[17:08:44] swgillespie: has joined #ruby
[17:10:52] njs126: has joined #ruby
[17:11:39] jottr: has joined #ruby
[17:11:50] jasonwebster: has joined #ruby
[17:11:54] jasonwebster: has left #ruby: ()
[17:12:47] phale: has joined #ruby
[17:13:08] bantic: has joined #ruby
[17:14:16] x0F: has joined #ruby
[17:15:05] tibig: has joined #ruby
[17:15:12] allcentury: has joined #ruby
[17:15:20] MaikV: has joined #ruby
[17:15:28] havenwood: If you ever want to play with Minitest::Assertions in your REPL, quick trick to make it available: https://gist.github.com/havenwood/23f8dab52adbe7ea3060
[17:15:40] phale: havenwood: wow this helps me alot thanks
[17:15:50] phale: i've always wanted to play with minitest:assertions in my rep
[17:16:06] havenwood: ACTION ponders if phale jests...
[17:16:15] phale: no, i'm serious
[17:16:39] phale: why isn't this available in the REPL in the first place?
[17:17:58] Musashi007: has joined #ruby
[17:18:38] ht__: has joined #ruby
[17:19:04] iliketurtles: has joined #ruby
[17:19:20] vickleton: has joined #ruby
[17:20:01] rippa: has joined #ruby
[17:20:25] sktkbk: has joined #ruby
[17:20:26] havenwood: phale: Add the code before the examples from my Gist to your ~/.pryrc file. ;)
[17:20:53] phale: that's an awful name lol
[17:20:57] havenwood: phale: If you use Pry that is.
[17:21:00] dopie: has joined #ruby
[17:21:04] phale: I just use irb lol
[17:21:15] phale: so, why isn't this available for the REPL in the first place?
[17:21:21] phale: is the gem shit or the programming language
[17:21:25] havenwood: phale: Then your ~/.irbrc file.
[17:21:35] phale: I don't have an irbrc file.
[17:21:42] havenwood: Create one.
[17:22:10] phale: so, why isn't this available for the REPL in the first place?
[17:23:23] havenwood: phale: Because a Pull Request to make it so hasn't been proposed. Which would then need to be accepted, merged and shipped.
[17:23:37] mrsolo: has joined #ruby
[17:24:06] zendrix: has anyone here ever had issues with ENV varialbes not working inside ruby?
[17:24:23] ruboto: Just ask your question, if anyone has or can, they will respond.
[17:24:38] Brozo: has joined #ruby
[17:24:41] yxhuvud: define what you mean by 'not working'
[17:24:49] zendrix: if i do a `printenv` in the console it shows the ENV I am looking for, but when I run the ruby code that uses it it gives me a nil value.
[17:25:09] tkuchiki: has joined #ruby
[17:25:12] Igorshp: has joined #ruby
[17:25:13] yxhuvud: what do ENV say?
[17:25:15] zendrix: the ENV varialbe is set to nil
[17:25:23] ankhers: has joined #ruby
[17:25:43] toretore: ?gist zendrix
[17:25:43] ruboto: zendrix, https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
[17:25:51] toretore: your code here ^
[17:26:09] jhass: zendrix: printenv FOO && ruby -e 'p ENV["FOO"]'
[17:26:12] sdothum: has joined #ruby
[17:26:16] jhass: output of that
[17:26:17] fujimura: has joined #ruby
[17:26:33] bmurt_: has joined #ruby
[17:26:58] iamjarvo: has joined #ruby
[17:27:27] yxhuvud: I'd guess something is assigning to ENV. turn on warnings (-w flag) and you will see where.
[17:28:07] zendrix: https://gist.github.com/baallezx/df339bbd557d237d2348
[17:28:33] ljarvis: phale: it's not available in the first place because it makes little sense to include lots of extra methods in a REPL when they don't exist otherwise. This is why irbrc is so great
[17:28:34] zendrix: it is this ENV -->> ENV['GIT_COMMITTED_AT']
[17:28:49] mrsolow: has joined #ruby
[17:29:04] phale: ljarvis: fuck this
[17:29:06] ljarvis: !ban phale !T 1d enough trolling for today
[17:29:07] ChanServ: +b phale!*@*
[17:29:07] ChanServ: ChanServ kicked phale: enough trolling for today
[17:29:14] tibig: has joined #ruby
[17:29:14] casadei: has joined #ruby
[17:29:19] ljarvis: just needed the excuse tbh
[17:29:21] woodruffw: has joined #ruby
[17:29:26] zipace: has joined #ruby
[17:29:26] zipace: has joined #ruby
[17:29:35] _seanc_: has joined #ruby
[17:29:38] bootstrappm: ljarvis I suspected as much, good call
[17:30:02] zendrix: toretore: ruboto: I added the gist above
[17:30:15] kies: has joined #ruby
[17:30:40] baweaver: has joined #ruby
[17:30:41] allomov: has joined #ruby
[17:30:49] havenwood: ljarvis: i do like the idea of making them easily accessible, maybe not in Kernel but an include away
[17:30:53] zendrix: every where that I print that ENV['GIT_COMMITTED_AT'] it works. But when I run an rspec it gives it a nil.
[17:31:05] ljarvis: havenwood: yeah I think it'd be nicer than having to hack it
[17:31:33] ankhers: has joined #ruby
[17:31:35] yxhuvud: zendrix: that looks more like a docker question.
[17:31:56] pengin: has joined #ruby
[17:32:16] yqt: has joined #ruby
[17:32:37] yxhuvud: try to remove docker from the equation and see if it is different
[17:33:01] RegulationD: has joined #ruby
[17:33:15] zendrix: yeah that is what I am thinking. It is super strange though.
[17:33:49] sdothum: has joined #ruby
[17:33:49] finisherr: has joined #ruby
[17:33:50] Rodya_: has joined #ruby
[17:34:00] toretore: there are like 10 levels there where it could go wrong; divide and conquer
[17:34:07] towski_: has joined #ruby
[17:35:30] mikecmpbll: has joined #ruby
[17:39:37] lapide_viridi: has joined #ruby
[17:40:07] zendrix: has joined #ruby
[17:40:09] bertocode: has joined #ruby
[17:40:19] sdothum: has joined #ruby
[17:41:29] zotherstupidguy: has joined #ruby
[17:42:12] zotherstupidguy: whats the convention for spec folders i.e. spec/somthng_spec/somthing_spec.rb or spec/somtihing/somthing_spec.rb
[17:42:16] aaeron: has joined #ruby
[17:42:31] jhass: the latter
[17:43:58] jackjackdripper: has joined #ruby
[17:44:50] Agoldfish: has joined #ruby
[17:45:20] _blizzy_: I finally made my first gem
[17:45:35] havenwood: _blizzy_: \o/
[17:45:43] _blizzy_: havenwood, \o/
[17:45:47] _blizzy_: it uses eval_in
[17:45:54] _blizzy_: to eval different languages
[17:46:01] _blizzy_: since the only eval_in gem is old as hell
[17:46:26] LMity: has joined #ruby
[17:46:57] sdothum: has joined #ruby
[17:48:38] Igorshp: has joined #ruby
[17:48:45] RegulationD: has joined #ruby
[17:49:37] malconis: has joined #ruby
[17:50:47] Eddieh_: has joined #ruby
[17:51:10] fgo: has joined #ruby
[17:51:28] sdothum: has joined #ruby
[17:51:35] Spami: has joined #ruby
[17:51:52] apt-get_: has joined #ruby
[17:52:02] jackjackdripper: has joined #ruby
[17:52:09] davedev24: has joined #ruby
[17:52:19] hahuang65: has joined #ruby
[17:52:34] sandelius: has joined #ruby
[17:52:52] iamjarvo: has joined #ruby
[17:56:10] chrisja: has joined #ruby
[17:56:21] shevy: ruby is sexy
[17:56:45] Igorshp_: has joined #ruby
[17:56:51] jenrzzz: has joined #ruby
[17:57:06] simi: _blizzy_, https://github.com/JoshCheek/eval_in
[17:57:17] TwinkleHood: has joined #ruby
[17:57:30] _blizzy_: simi, yeah, that's what it's based off of
[17:57:38] _blizzy_: but it's outdated, and I wanted to make my first gem.
[17:57:43] edwinvdgraaf: has joined #ruby
[17:57:44] simi: _blizzy_, what are you missing there?
[17:57:59] _blizzy_: simi, nothing really. I just wanted to make a gem
[17:58:11] simi: so <_blizzy_> since the only eval_in gem is old as hell
[17:58:12] spyderman4g63: has joined #ruby
[17:58:15] simi: was lie!
[17:58:30] _blizzy_: well, october 21, 2014, ;c
[17:58:45] miah: not even a year
[17:58:52] wallerdev: has joined #ruby
[17:58:54] simi: pretty stable for "API" gem
[17:59:15] aaeron: has joined #ruby
[17:59:49] tubulife-: has joined #ruby
[17:59:56] sdwrage: has joined #ruby
[18:00:12] _blizzy_: I just wanted to try my hand at gem making.
[18:00:16] rdark: arg. rspec. I want to validate that in a returned data structure that is an array of hashes, that one hash contains a key named X, with value Y
[18:00:34] zenguy_pc: has joined #ruby
[18:00:48] rdark: what's "rspec way" of doing this?
[18:01:15] BanzaiJoe: rdark is the returned "data structure" a Struct or truly an array of hashes?
[18:01:20] olistik: has joined #ruby
[18:01:35] rdark: real array/hash objects
[18:01:58] BanzaiJoe: ACTION steps away slowly
[18:01:58] zotherstupidguy: has joined #ruby
[18:02:09] lolmaus: has joined #ruby
[18:02:33] rdark: ACTION says BanzaiJoe come back!
[18:02:42] fusillicode: has joined #ruby
[18:02:48] fusillicode: has left #ruby: ()
[18:02:51] BanzaiJoe: I can't honestly help you, but when you say "rspec way", can you be more specific for whoever can?
[18:03:20] baweaver: has joined #ruby
[18:03:26] rdark: I don't think there's a built-in matcher that will do this, or at least one I can find, I think a custom matcher will have to do
[18:03:57] rdark: "rspec way" as in rather than writing a helper method, use standard rspec functionality
[18:04:24] zotherstupidguy: rspec -> sevenseacat
[18:05:29] kirun: has joined #ruby
[18:05:47] shevy: she is not here
[18:06:37] jhass: rdark: .include include(X => Y) ?
[18:06:47] jhass: I never tried the new composeable ones
[18:07:04] NeverDie: has joined #ruby
[18:07:34] yalue: has joined #ruby
[18:07:46] jhass: include a_hash_including(X => Y) (same thing, a bit more readable)
[18:08:27] kernkw: has joined #ruby
[18:09:00] rdark: jhass: yeah - I would usually write a helper method to do just that, but trying to leverage the 'pure' rspec - think I'll have a go at a custom matcher
[18:09:20] jhass: did you try my suggestion?
[18:09:52] zotherstupidguy: any idea why the rubykaigi 2015 email is not working?
[18:10:18] shevy: they all went to pythonkaigi instead!
[18:10:37] davedev24_: has joined #ruby
[18:10:41] zotherstupidguy: shevy you live a risky life =)
[18:11:08] zotherstupidguy: ohh look, they chagned the website, they added sushi, now we all should go
[18:11:12] zotherstupidguy: http://rubykaigi.org/2015
[18:11:30] havenwood: zotherstupidguy: mmmm
[18:11:45] shevy: were there any good videos there?
[18:11:55] shevy: I don't want to watch all videos :(
[18:12:00] zotherstupidguy: it will cost me alot to go but, i really wanna do it
[18:12:06] shevy: this is 2015
[18:12:12] shevy: thought it was already over
[18:12:34] shevy: I am sorry, the heat here is making me dumb
[18:13:00] zotherstupidguy: hide in the serverroom, always aircondationed =)
[18:13:35] zotherstupidguy: who is going anyway?
[18:13:41] jpfuentes2: has joined #ruby
[18:14:19] zotherstupidguy: i think from Egypt, there was like 2 guys a very long time ago, from my city alexandria
[18:14:57] zotherstupidguy: they gave a talk about nonblocking server, and nobody from Egypt went again
[18:15:02] Phoenixmiss: has joined #ruby
[18:15:47] shevy: dfockler lol
[18:15:48] tvw: has joined #ruby
[18:15:52] shevy: now that was a great comment
[18:15:53] davedev24: has joined #ruby
[18:15:56] shevy: "Keynote speakers: matz"
[18:16:19] dfockler: it's just matz in a room, everyone else is teleconferenced in
[18:16:19] shevy: from Egypt to Japan is exotic
[18:17:15] zotherstupidguy: its a dream for me to go really
[18:17:18] codeFiend: has joined #ruby
[18:17:26] dfockler: I really need to head over to Seattle for a seattle.rb meetup
[18:17:43] shevy: you are very social people
[18:17:46] zotherstupidguy: those you can watch on youtube =P
[18:18:02] shevy: k videotape kaigi for me zotherstupidguy
[18:18:22] dfockler: I'm not social, I just like ruby a lot
[18:18:24] zotherstupidguy: unless you are meeting dr.fraiser
[18:18:37] x1337807x: has joined #ruby
[18:18:52] zotherstupidguy: shevy ok, seriously now we need to collect all those videos in a torrent,
[18:18:57] vikaton: has joined #ruby
[18:19:21] zotherstupidguy: i dont even wanna watch them, i just want to download them, its an addiction!!
[18:19:31] dfockler: that's called hoarding
[18:19:33] zotherstupidguy: i hate it when my internet is not used
[18:19:35] x1337807x: has joined #ruby
[18:19:59] zotherstupidguy: dfockler is that the scientific term for it?
[18:20:34] zotherstupidguy: compulsive hoarding of ruby videos
[18:20:36] dfockler: it's a type of ocd
[18:20:36] zotherstupidguy: thats what i got
[18:20:55] MaikV: has joined #ruby
[18:21:23] dfockler: I ripped off a hang nail, and I can't even
[18:21:40] zotherstupidguy: it is just ppl in countries like USA never know what it is like to have a ADSL =)
[18:22:02] gamename: has joined #ruby
[18:22:16] shevy: I only want to watch
[18:22:17] shevy: the top 3
[18:22:20] shevy: but not the others
[18:22:44] josh: has joined #ruby
[18:23:16] zotherstupidguy: shevy how can we get all the videos?
[18:23:25] zotherstupidguy: think shevy think
[18:23:58] zotherstupidguy: nokogiri viddl-rb (some torrent gem)
[18:24:11] bootstrappm: finally got our site to 91/100 on the Pagespeed Insights test
[18:24:14] bootstrappm: i feel so accomplished
[18:24:38] zotherstupidguy: bootstrappm good4u
[18:24:43] zotherstupidguy: wahts the site?
[18:24:50] bootstrappm: well in one ccTLD, in the other its at 88/100
[18:24:50] shevy: zotherstupidguy not all, only 3
[18:24:59] bootstrappm: http://ayalo.gt or http://ayalo.mx
[18:25:25] zotherstupidguy: shevy ok, we will make the very best of ruby conf collection =) based on number of downloads
[18:26:22] dfockler: bootstrappm: is that like craigslist?
[18:26:26] zotherstupidguy: bootstrappm neat, very neat ;)
[18:26:40] bootstrappm: it was when we first started it but the market can be a fickle mistress
[18:26:47] dtraveler: has joined #ruby
[18:26:48] bootstrappm: now its a product aggregator for retail stores
[18:26:50] x1337807x: has joined #ruby
[18:26:51] josh: has joined #ruby
[18:27:10] bootstrappm: users come so they don't have to go to 5 different stores to see the price of a cell phone
[18:27:16] Igorshp: has joined #ruby
[18:27:31] dfockler: that's pretty cool
[18:27:44] dfockler: are you doing web scraping to gather product info?
[18:28:12] _seanc_: has joined #ruby
[18:28:34] symm-: has joined #ruby
[18:28:42] zotherstupidguy: bootstrappm in egypt we have somthing like that bkam.com
[18:29:05] dtraveler: Any one familiar with barkeep? https://github.com/ooyala/barkeep
[18:29:05] dtraveler: I have this error https://gist.github.com/RaviTezu/cadc9f3e16de8883582c when I am installing it, can some please help me? Thanks in advance
[18:29:11] bootstrappm: dfockler web scraping and we have one guy that goes and collects catalogs and puts them through an admin interface
[18:29:21] bootstrappm: zotherstupidguy: nice! i'll check it out. market research ;)
[18:29:30] last_staff: has joined #ruby
[18:29:38] dfockler: oh interesting, are you using ruby for the scraping, at work we are using python
[18:29:49] Scripore: has joined #ruby
[18:30:05] baroquebobcat: has joined #ruby
[18:30:08] zotherstupidguy: nokogiri is used fo
[18:30:29] zotherstupidguy: for bkam.com sorry eating while typing
[18:30:44] bootstrappm: dfockler: node.js
[18:31:00] bootstrappm: started with ruby when it was still a classifieds site though
[18:31:07] bootstrappm: worked well :)
[18:31:15] dfockler: we're using the scrapy framework
[18:31:21] bootstrappm: the team just wanted to learn something new for the second time around and node.js is kind of meant for that
[18:31:34] bootstrappm: zotherstupidguy: yeah we used nokogiri the first time, loved it
[18:31:50] elev: has joined #ruby
[18:31:53] jackjackdripper: has joined #ruby
[18:31:54] mordocai: has joined #ruby
[18:31:54] bootstrappm: dtraveler: taking a look now
[18:32:00] bosma: has joined #ruby
[18:32:34] bootstrappm: could you gist your config.ru dtraveler?
[18:32:35] sandelius: when using activerecord with sinatra should I establish the connection on app load or on each request?
[18:32:52] kernkw: has joined #ruby
[18:32:59] jgt: has joined #ruby
[18:33:11] dtraveler: bootstrappm: Thanks. sure 1 sec.
[18:33:51] dgutierrez1287: has joined #ruby
[18:33:54] pengin: has joined #ruby
[18:34:04] bootstrappm: sandelius: on app load. the server stays on and listening so it will only have to do the setup for the models once
[18:34:41] shadoi: has joined #ruby
[18:35:14] dtraveler: bootstrappm: Its the same - https://github.com/ooyala/barkeep/blob/master/config.ru
[18:35:21] danshultz: has joined #ruby
[18:35:27] sandelius: bootstrappm ok but what's ConnectionManagement doing? It looks like it clears the connection after each request?
[18:35:34] Rodya_: has joined #ruby
[18:35:36] sandelius: bootstrappm http://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/ConnectionManagement.html#method-i-call
[18:36:00] bootstrappm: sandelius: I'd ask in #rubyonrails
[18:38:00] bootstrappm: dtraveler: gist barkeep_server. would have asked that at first but I thought it was part of the gym
[18:38:16] bootstrappm: also any particular reason you're using ruby 1.9.3 dtraveler?
[18:38:58] dtraveler: bootstrappm: https://github.com/ooyala/barkeep/blob/master/barkeep_server.rb
[18:39:06] dtraveler: Thanks for your time btw :)
[18:39:19] OtterCoder: has joined #ruby
[18:40:09] dtraveler: bootstrappm: Nope. no reason, when I was installing it got installed.
[18:40:09] dtraveler: Actually, I was executing this script, which installs barkeep for me: https://raw.githubusercontent.com/ooyala/barkeep/master/install_barkeep.sh
[18:40:44] bootstrappm: cool dtraveler. Intuition says you're not including the barkeep gem files but I'm digging a bit deeper. Upgrade to 2.2 ;)
[18:40:55] yardenbar: has joined #ruby
[18:40:59] jpfuentes2: has joined #ruby
[18:41:03] pikos: has joined #ruby
[18:41:27] michael_mbp: has joined #ruby
[18:42:22] jniziol: has joined #ruby
[18:42:54] dtraveler: bootstrappm: Sure. If you see the lines 140-143 in barkeep_server.rb, I see the AUTHENTICATION_PROTOCOL being used there.
[18:43:18] XThief: has joined #ruby
[18:43:21] fabrice31: has joined #ruby
[18:43:40] bootstrappm: yes dtraveler. What that error is saying is that you're using AUTHENTICATION_PROTOCOL, a supposed constant, without ever defining it
[18:44:06] dtraveler: so, I have define the variable AUTHENTICATION_PROTOCOL in that file?
[18:44:27] freerobby: has joined #ruby
[18:44:36] bootstrappm: mm no, it looks like this is code you're just running right? you didn't write any of this?
[18:44:49] bootstrappm: if that's the case that variable should already have been defined for you somewhere
[18:44:55] bootstrappm: checking the install instructions to see where
[18:45:06] dtraveler: Yes. I didn't write this.
[18:45:33] PlasmaStar: has joined #ruby
[18:46:18] TwinkleHood: has joined #ruby
[18:46:50] bootstrappm: alright got it dtraveler: https://github.com/ooyala/barkeep/search?utf8=%E2%9C%93&q=AUTHENTICATION_PROTOCOL
[18:47:04] freerobby: has joined #ruby
[18:47:06] blandflakes: has joined #ruby
[18:47:07] zendrix: has joined #ruby
[18:47:15] bootstrappm: check your config directory
[18:47:16] bootstrappm: is there an environment.rb in there?
[18:47:31] pengin: has joined #ruby
[18:48:09] crdpink: has joined #ruby
[18:48:28] dtraveler: bootstrappm: Yes. I see the file.
[18:48:34] dtraveler: do I need to define there?
[18:48:50] dtraveler: And I have just defined it in the barkeep_server.rb and it worked ;)
[18:48:51] bootstrappm: open it up dtraveler, it should be defined in there
[18:49:03] bootstrappm: dtraveler that's probably hiding a larger issue though
[18:49:19] bootstrappm: if environment.rb defines it and its not defined in barkeep_server it means its not being included and that'll lead to more problems
[18:49:21] DukeDave: has joined #ruby
[18:49:24] bootstrappm: but if it works, go for it!
[18:49:27] dtraveler: bootstrappm: Yea. poor documentation and unfortunately it wasn't defined in evironment.rb
[18:49:39] stryek: has joined #ruby
[18:49:41] bootstrappm: let us know if anything else breaks
[18:49:52] spyderman4g63: has joined #ruby
[18:49:56] dudedudeman: if you need help breaking anything, let me know. i'm really good at that
[18:50:03] shevy: dudedudeman I am as well!
[18:50:09] dtraveler: so, it is a good way define it in environment.rd?
[18:50:10] shevy: though I just fixed one bug
[18:50:11] dudedudeman: ACTION breaks shevy
[18:50:20] shevy: I did: "if _.include? 'zip'
[18:50:32] shevy: and I sort of assumed "hey... foobar-1.0.zip will match there"
[18:50:41] rovnero: has joined #ruby
[18:50:46] shevy: but that was a dumb check!
[18:50:52] shevy: because there are programs called libzip-0.8.tar.xz
[18:51:09] shevy: I dunno what I was thinking
[18:51:15] bootstrappm: dtraveler: yes, define it in environment.rb. Compare environment.prod.rb and environment.rb and see what's missing
[18:51:41] bootstrappm: lunch time. gluck dtraveler!
[18:52:10] jfarmer: has joined #ruby
[18:52:46] jottr: has joined #ruby
[18:55:09] wasamasa: yay, I managed making my ruby script hang up by replacing a call to `xsel` with `xclip`
[18:57:01] wasamasa: maybe backticks are evil or something
[18:57:09] wasamasa: but the same call in a normal shell terminates instantly
[18:57:10] dudedudeman: i ticked a back once
[18:57:18] wasamasa: I have no clue how to even start debugging this
[18:57:24] Pathfinder: has joined #ruby
[18:57:43] jhass: type -a xclip
[18:57:50] jhass: any aliases hiding in your shell?
[18:57:51] dtraveler: bootstrappm: Sure. Thanks for your time. Have a good day :)
[18:57:54] dtraveler: has left #ruby: ()
[18:57:59] wasamasa: jhass: nope
[18:58:06] _blizzy_: well, the gem works, so that's good.
[18:58:09] Sevelia: has joined #ruby
[18:58:10] BanzaiJoe: github question, I must be missing something, is there someway to send a message via github? (probably can't seem to find the button)
[18:58:18] _blizzy_: BanzaiJoe, no.
[18:58:25] jhass: wasamasa: system("/usr/bin/xclip") let's eliminate the shell
[18:58:27] wasamasa: BanzaiJoe: I'm afraid this isn't supported by design
[18:58:38] wasamasa: jhass: but I need to pipe something into it to work
[18:58:45] BanzaiJoe: so we're just supposed to wave our code around and others understand...
[18:59:09] jhass: wasamasa: look at spawn's docs, system takes the same params, or use open3 stdlib
[18:59:22] wasamasa: BanzaiJoe: so far I've had great success by opening issues, pull requests and contacting the authors in a different way (like by e-mail)
[18:59:26] ruby-lang289: has left #ruby: ()
[18:59:35] Synthead: has joined #ruby
[19:00:01] jhass: BanzaiJoe: just create a an empty repo messages, open an issue an mention them :P
[19:00:06] jhass: Sevelia: sup?
[19:00:13] Sevelia: jhass, Just testing, what's the command?
[19:00:18] wasamasa: jhass: oh well, looks like I've got no other option there
[19:00:19] ruboto: To call for ops use the !ops command.
[19:00:24] wasamasa: jhass: still, this is really weird
[19:02:06] sktkbk: has joined #ruby
[19:04:09] elev: I dont understand classes
[19:04:15] elev: can someone here explain it good what it is?
[19:04:49] ytti: classes are collections of fuctions with shared variables
[19:05:06] Sevelia: master44, , Classes are types. They blueprint a type which can be, A person, animal, player, document etc.
[19:05:17] Master44: so class = person
[19:05:26] Master44: object = me
[19:05:29] Master44: methdo = eat
[19:05:36] jottr_: has joined #ruby
[19:06:00] Sevelia: An object is an instance of a class, for example if you have a Player class, an object is a new Player.
[19:06:24] Master44: so the the class collects all the objects?
[19:06:32] Master44: so its easier to find them or?
[19:06:38] shevy: you instantiate an object from a class master44
[19:06:40] Sevelia: The class explains the Players behavior.
[19:06:53] apeiros: master44: your class =~ Person, object =~ me, method =~ eat is fine
[19:06:54] shevy: this will be your working instance
[19:07:41] Sevelia: master44, Think of it this way. How would you explain what a Person is without a class?
[19:07:43] joonty: has joined #ruby
[19:07:46] leafybasil: has joined #ruby
[19:08:48] ruby-lang796: has joined #ruby
[19:09:06] centrx: has joined #ruby
[19:09:30] _blizzy_: well, I made an eval bot in ruby for irc :P
[19:09:55] spyderman4g63: has joined #ruby
[19:10:00] Sevelia: master44, :)
[19:10:21] Master44: classes its hard thought
[19:10:36] Sevelia: Not really.
[19:10:39] ESpiney_: has joined #ruby
[19:11:04] jfarmer: has joined #ruby
[19:11:42] datanoise: has joined #ruby
[19:11:46] Master44: so how can we create these objects?
[19:12:14] d10n-work: has joined #ruby
[19:12:28] simi: master44, https://www.ruby-lang.org/en/documentation/quickstart/2/
[19:12:34] simi: just study yourself
[19:12:39] simi: best way how to learn something
[19:13:02] jhass: simi: just /ignore if you're annoyed, we tried in the past...
[19:13:24] Sevelia: master44, http://codepad.org/NVIBVBC2
[19:13:30] Sevelia: Here is a simple class that represent books
[19:13:40] Sevelia: I create a new object called, a_book giving it some information.
[19:14:29] Master44: you work with ruby?
[19:15:04] fujimura: has joined #ruby
[19:15:11] _blizzy_: a class is blueprints, a object is the actual book
[19:15:21] Sevelia: master44, What do you mean?
[19:15:22] yqt: has joined #ruby
[19:15:34] edwinvdgraaf: has joined #ruby
[19:15:38] Master44: where is the object in your code sevelia?
[19:15:51] Sevelia: master44, a_book is my object.
[19:16:08] yqt: has joined #ruby
[19:16:39] Master44: and the class is?
[19:16:48] juanpaucar: has joined #ruby
[19:17:01] Sevelia: Book of course.
[19:17:06] RazorX_: has joined #ruby
[19:17:16] Master44: so object and class its the same?
[19:17:32] m8: has joined #ruby
[19:17:57] platosha: has joined #ruby
[19:18:23] mengu: has joined #ruby
[19:18:43] Master44: your class its a book
[19:18:43] mengu: has joined #ruby
[19:18:45] Master44: and object is book
[19:18:51] Master44: so object = class?
[19:18:53] Master44: same thing?
[19:19:26] Sevelia: A class represent how books behave, my object *is* a book.
[19:19:31] lapide_viridi: has joined #ruby
[19:20:11] BanzaiJoe: class might have things like "open book" "read book" "bookmark page" "close book" also known as behaviours
[19:20:18] freerobby: has joined #ruby
[19:20:40] BanzaiJoe: (WTF, I out a 'u' in there, I'm becoming British)
[19:20:57] zotherstupidguy: ACTION thinks its a shame that #poetry has only 3 users!
[19:22:06] Master44: I think I got it thanks guys.
[19:22:44] BanzaiJoe: right on, you're on your way to become an object oriented programmer :)
[19:23:07] freerobby: has joined #ruby
[19:23:10] Master44: I started ruby like some weeks ago and I think its fun :D
[19:23:29] Master44: I am only 14 so I still have some years to learn :D
[19:23:32] Master44: but gtg cya
[19:23:33] Master44: has left #ruby: ()
[19:24:31] jottr: has joined #ruby
[19:24:36] finisherr: has joined #ruby
[19:24:49] dstarh: has joined #ruby
[19:25:14] dagda1: has joined #ruby
[19:25:25] Lund: has joined #ruby
[19:26:33] BanzaiJoe: I predict conference presenter in 4 years :)
[19:27:06] platosha: has joined #ruby
[19:27:48] jhass: I wish I could share your optimism
[19:27:56] joaomdmoura: has joined #ruby
[19:28:36] pdoherty: has joined #ruby
[19:29:22] dudedudeman: jhass, what is your favorite pastime? outside of ruby?
[19:29:51] ytti: at least in networking conference spots are not hard to get
[19:30:00] ytti: anyone really who wants to present can
[19:30:10] ytti: maybe programming has more supply
[19:30:21] Hijiri: has joined #ruby
[19:30:22] jhass: dudedudeman: oh, http://www.thewayoftheninja.org/nv2.html I guess
[19:30:24] dudedudeman: hmm, favorite hobby might be a better question
[19:30:38] dudedudeman: you made this?!
[19:30:43] shadoi1: has joined #ruby
[19:30:57] momomomomo: has joined #ruby
[19:31:16] dudedudeman: ACTION senses a joke here...
[19:31:19] jhass: I enjoy coding a lot, so I don't really do much beyond the usual stuff
[19:32:16] plukevdh: has joined #ruby
[19:32:20] dudedudeman: if you enjoy coding, then do you enjoy COBOL?
[19:32:23] apeiros: jhass: that's got a bit of super meat boy
[19:32:26] bluish: has joined #ruby
[19:32:37] jhass: apeiros: a lot older though ;)
[19:32:55] jhass: but yeah, same frustration mechanics :D
[19:33:36] apeiros: super meat boy gave a new meaning to "lachend in die kreiss??ge rennen"
[19:34:56] dudedudeman: someone came to our local meetup last night looking for some entry level ruby developers to join their company who is in the middle of re-writing an old program to use ruby and rails. it's currently written in C and COBOL...
[19:35:30] jhass: wat, people replacing COBOL stuff? you're setting us up here
[19:35:58] dudedudeman: i balked. i may be looking for entry level jobs, but....
[19:36:21] weaksauce: dudedudeman what's wrong with that?
[19:36:42] ohcibi: has joined #ruby
[19:37:34] dudedudeman: it wasn't so much COBOL and the work, but more of the environment he was describing to me. I"m a pretty outgoing person, i desire interaction, and I desire pairing and team ideas being bounced back and forth. they're looking for entry level ruby developers who they can leave alone and guide themselves, and it's a 2-3 day a week work-from-home position, too
[19:38:03] weaksauce: heh. paying well?
[19:38:14] ProteusX: has joined #ruby
[19:38:29] weaksauce: what did the cobol + c program do?
[19:38:40] momomomomo: has joined #ruby
[19:39:18] jfarmer: has joined #ruby
[19:39:23] dudedudeman: I didn't even ask, though it's a company in the medical field, so I'm wagering they pay fairly well. They also said you wouldn't do just programming, but customer interaction, network and devops things, and other stuff, too. oh, and they also have a beeper that they rotate with for 24/7 customer support if needed
[19:39:59] dudedudeman: and weaksauce, he didn't get too much in to exactly what the app was doing, other than it was for the medical filed. he mentioned a pretty strict NDA so I didn't press too much
[19:40:26] skade: has joined #ruby
[19:40:27] simi: <jhass> I enjoy coding a lot, so I don't really do much beyond the usual stuff
[19:40:39] simi: you mean like taking a shower and stuff?
[19:40:48] dudedudeman: i hope he eats, too
[19:41:08] weaksauce: dudedudeman curious that
[19:41:17] jhass: simi: yeah, btw towards somebody else and I'd kicked you ;)
[19:41:41] weaksauce: they don't want a programmer they want a unicorn
[19:43:04] finisherr: has joined #ruby
[19:43:08] OtterCoder: has joined #ruby
[19:43:16] dudedudeman: weaksauce: it kind of felt that way. which, i bet there's people out there that would be awesome for that. but, that's not me. last night's meetup actually ended up being highly frustrating for me. not just because i had talked ot someone about a potential job that ended up not being what i think wouldbe a good fit for me, but i went through a mock interview with a couple of the seniors there(who were really cool about it) but utterly failed i
[19:43:38] A205B064: has joined #ruby
[19:44:08] davedev24_: has joined #ruby
[19:46:21] felltir: has joined #ruby
[19:46:36] b_hoffman: has joined #ruby
[19:46:39] finisherr: has joined #ruby
[19:46:57] shredding: has joined #ruby
[19:47:00] Scroff: has joined #ruby
[19:49:14] jcromartie: has joined #ruby
[19:50:58] mengu: has joined #ruby
[19:51:34] symm-: has joined #ruby
[19:51:53] dopie: has joined #ruby
[19:52:11] weaksauce: that's a bummer but valuable experience
[19:52:21] shevy: a unicorn
[19:52:28] shevy: dudedudeman can make one come out his butt!
[19:52:29] sandelius: has joined #ruby
[19:52:50] chouhoulis: has joined #ruby
[19:52:56] dudedudeman: weaksauce: it is. i got some really good insight and some really good feedback. even if some of that feedback was, no we wouldn't hire you in yoru current state
[19:53:07] shevy: what current state
[19:53:12] shevy: are you like a zombie
[19:53:15] kadoppe: has joined #ruby
[19:53:37] b_hoffman: has left #ruby: ()
[19:53:42] dudedudeman: i could be, you'll never know
[19:53:54] spyderman4g63: has joined #ruby
[19:54:20] shevy: dudedudezombie
[19:54:30] chouhoulis: has joined #ruby
[19:54:31] tvw: has joined #ruby
[19:56:06] shevy: the only friendly zombie there is :)
[19:56:28] dudedudeman: ****dudedudezombie abides
[19:56:31] nofxx1: has joined #ruby
[19:56:35] dudedudeman: ha... butchered thaatttt
[19:56:58] finisherr: has joined #ruby
[19:57:32] blue_deref: has joined #ruby
[19:57:50] workmad3: has joined #ruby
[19:58:04] HotCoder: has joined #ruby
[19:58:36] Narzew: has joined #ruby
[19:58:38] serivichi: has joined #ruby
[19:59:22] yfeldblum: has joined #ruby
[20:00:35] iamjarvo: has joined #ruby
[20:01:10] kurtf: has joined #ruby
[20:01:13] TheNet: has joined #ruby
[20:01:23] bootstrappm: a meetup with mock interviews? sounds nice of them
[20:01:24] momomomomo: has joined #ruby
[20:01:52] uris: has joined #ruby
[20:01:53] bootstrappm: where are you based dudedudeman? that sounds like thing those seattle folk would do hahah
[20:02:25] wallerdev: has joined #ruby
[20:02:31] pVilaca: has joined #ruby
[20:02:33] dudedudeman: ha, i'm in texas
[20:02:34] finisherr: has joined #ruby
[20:02:40] dudedudeman: there's a great ruby community here, i found out
[20:03:04] pVilaca: hey guys.. do you know something about openssl gem?
[20:03:22] pVilaca: somehow, it was available in rubygems and it isn't available anymore
[20:03:30] pVilaca: 1.0.0.beta
[20:03:49] OtterCoder: has joined #ruby
[20:03:50] jgpawletko: has joined #ruby
[20:03:51] toretore: openssl is compiled along with ruby
[20:04:00] zendrix: has joined #ruby
[20:04:39] Pathfinder: has joined #ruby
[20:04:45] postmodern: has joined #ruby
[20:04:48] duderonomy: has joined #ruby
[20:05:13] pVilaca: it's declared as a dependency here - https://rubygems.org/gems/sensu-plugins-aws
[20:05:36] shevy: pVilaca normally openssl is in the ext/openssl subdirectory of ruby source file
[20:05:42] pVilaca: so, it was available but it was integrated in ruby or something?
[20:05:48] jhass: odd of them
[20:05:57] paulcsmith__: has joined #ruby
[20:05:59] ddarkpassenger: has joined #ruby
[20:06:02] shevy: pVilaca ext/openssl existed for a long time
[20:06:10] bootstrappm: jhass that game will take up too much of my time today hahah
[20:06:26] shevy: when you compiled ruby from source, and had openssl working, the bindings were compiled
[20:06:26] jhass: bootstrappm: sorry :P
[20:06:32] jackjackdripper: has joined #ruby
[20:06:32] jhass: pVilaca: https://github.com/sensu-plugins/sensu-plugins-aws/issues?q=is%3Aopen+is%3Aissue go for it
[20:06:34] shevy: and then, require 'openssl' would return true (hence it would work)
[20:06:34] pVilaca: shevy: weird how it is declared as a gem for this gem that I mentioned
[20:06:48] dudedudeman: bootstrappm: also, i plan on hooking the couple of guys that help me get going in this with some drinks and things when i finally get there. :)
[20:06:57] shevy: pVilaca yeah, I think the author of the gem has made a mistake. You don't normally specify ruby core or stdlib components
[20:07:03] apt-get_: anyone has a set of online exercises to work with while reading pickaxe book / pragmatic programmer's guide to ruby?
[20:07:12] bootstrappm: nice (y) dudedudeman. congrats you're a good community member
[20:07:18] shevy: here you can see the documentation being part of stdlib: http://ruby-doc.org/stdlib-2.2.2/libdoc/openssl/rdoc/OpenSSL.html
[20:07:47] pVilaca: shevy: thanks.. yes, I also noticed that
[20:07:49] sferik: has joined #ruby
[20:08:00] _blizzy_: I made a gem. anyone want to try it out?
[20:08:08] jwaldrip: has joined #ruby
[20:08:10] dudedudeman: this was real informal, like at the end of the night when it was just 4 of us left
[20:08:28] dudedudeman: well, there were more... and all of a sudden there are 10 people standing behind me watching me solve fizzbuzz....
[20:08:40] Palmer11: has joined #ruby
[20:08:52] shevy: you became the local hero
[20:09:00] sferik: has joined #ruby
[20:09:05] felltir: has joined #ruby
[20:09:05] shevy: did you impress them with your beer drinking skills as well?
[20:09:07] dudedudeman: or maybe the village idiot
[20:09:13] shevy: works either way
[20:09:18] shevy: you are the entertainer!
[20:09:37] dudedudeman: and bootstrappm, thanks. community is a huge part of my internal belief system. i thrive around other people and watching them thrive as well
[20:09:42] dudedudeman: i like to encourage when i can. :)
[20:10:20] edwinvdgraaf: has joined #ruby
[20:10:39] Sevelia: apt-get_, Koans.
[20:10:41] jhass: apt-get_: not related to the book, but the ruby koans are good exercises, exercism.io too
[20:11:03] dudedudeman: i do love the koans
[20:11:08] finisherr: has joined #ruby
[20:11:28] jgt: dudedudeman: Know if that medical company are still looking?
[20:11:54] i: has joined #ruby
[20:12:02] mrsolo: has joined #ruby
[20:12:40] mandarinkin: has joined #ruby
[20:12:47] Guest28228: has left #ruby: ()
[20:13:14] jniziol: has joined #ruby
[20:16:14] havenwood: apt-get_: rubymonk.com might be another to look at in addition to rubykoans.com and exercism.io.
[20:16:16] BanzaiJoe: if you had say... hypothetically.. 5 days of no internet like say on Lake Mead and you wanted to level up your skills in Ruby, any ideas how you would do it
[20:16:48] _blizzy_: I think I have a problem
[20:16:49] BanzaiJoe: oh yea, with your in-laws
[20:16:54] _blizzy_: I name all my rails projects after birds.
[20:17:00] havenwood: BanzaiJoe: So intense study? :P
[20:17:05] dopie: has joined #ruby
[20:17:47] bootstrappm: BanzaiJoe: have a book?
[20:17:50] adaedra: BanzaiJoe: if computer, just be sure to have everything installed before leaving. If no computer, buy a book.
[20:18:02] BanzaiJoe: yes, no support, no mentor/reviewer, just naked programming, figuratively
[20:18:14] pikos: has joined #ruby
[20:18:17] havenwood: BanzaiJoe: How advanced with Ruby?
[20:18:26] BanzaiJoe: basic/n00bie
[20:18:40] bootstrappm: but you will have your computer w/ all the stuff installed?
[20:18:48] bootstrappm: well .... you'd have to know which gems you want to use before you get there ...
[20:18:49] tvw: has joined #ruby
[20:18:57] dorei: is there a way to load ruby code inside a module? as if I could do require inside a module and everything loaded under the module namespace instead of the global namespace
[20:18:59] njection: has joined #ruby
[20:19:12] BanzaiJoe: yes, computer
[20:19:21] ljarvis: dorei: you probably want autoload
[20:19:25] finisherr: has joined #ruby
[20:19:32] dorei: oh, let me check autoload :)
[20:20:01] vikaton: has joined #ruby
[20:20:12] BanzaiJoe: I don't think I'll get another 60 hour stretch to just go crazy like this for awhile so I'd like to avoid the reading route
[20:20:12] pVilaca: shevy: sorry for the delay.. so, what the maintainer of the plugin needs to do, is only removing this line: "s.add_runtime_dependency 'openssl', '1.0.0.beta'"
[20:20:22] pVilaca: because it doesn't need to be declared?
[20:20:36] jhass: ljarvis: don't think autoload does that? dorei my answer would be no
[20:20:38] dorei: ljarvis: i dont think autoload is what i'm looking for
[20:20:42] bb010g: has joined #ruby
[20:20:46] jhass: no remotely sane way
[20:20:47] gambl0re: has joined #ruby
[20:20:47] byonic: BanzaiJoe: Without internet you would want to for sure have a local copy of any documentation you might need, I think most gems come bundled with documentation. I also love devdocs.io for this
[20:21:25] BanzaiJoe: devdocs.io will check it out, thanks
[20:21:48] jniziol: has left #ruby: ()
[20:22:12] mwlang: has joined #ruby
[20:22:59] mwlang: >> i = 1029003354; i.to_s.split("").reverse.each_slice(3).map{|m| m.reverse.join}.reverse.join(",")
[20:23:00] ruboto: mwlang # => "1,029,003,354" (https://eval.in/375189)
[20:23:02] dzejrou: has joined #ruby
[20:23:09] [H]unt3r: has joined #ruby
[20:23:25] mwlang: wow, worked on first attempt.
[20:23:39] byonic: BanzaiJoe: Not of your skill level, but people seem to love RubyKoans. I wasn't huge on it when I was learning Ruby but it seems like a pretty good way to learn ruby interactively and offline
[20:24:07] byonic: just make sure you download it instead of doing the online version obviously
[20:24:34] apt-get_: ruby koans were too strange for me
[20:24:53] rickrobs: has joined #ruby
[20:24:53] ljarvis: >> 1029003354.to_s.reverse.gsub(/(\d{3})(?=\d)/, '\\1,').reverse
[20:24:55] ruboto: ljarvis # => "1,029,003,354" (https://eval.in/375195)
[20:25:19] Torrieri: has joined #ruby
[20:25:30] mwlang: _why???s poignant guide to ruby was also too strange for me.
[20:25:42] BanzaiJoe: I've been doing exercism.io and it comes with tests so I'll have to figure out how to skip ahead and pull all those down
[20:25:56] BanzaiJoe: but I won't have y'all :(
[20:26:08] mwlang: ljarvis: nice.
[20:26:46] BanzaiJoe: mwlang any particular reason to do this?
[20:26:47] tcopeland: has joined #ruby
[20:27:14] byonic: beyond that, I would suggest going in head first and making a gem. It was probably the best thing my first boss / mentor had me do when I was learning
[20:27:22] mwlang: BanzaiJoe: I can???t read big numbers without commas. That???s how many records I need to extract from production.
[20:28:59] Igorshp: has joined #ruby
[20:29:02] umgrosscol: has joined #ruby
[20:29:03] dorei: jhass: i've just found out i can use module_eval :)
[20:29:20] mwlang: every record also has a 12-digit number as it???s ID that I need to format into XXX-XXX-XXX-XXX format???almost like an IP address, actually???
[20:29:34] Scripore: has joined #ruby
[20:29:35] jhass: dorei: it'll break in subtle ways, just don't
[20:29:52] mwlang: so I did the above to see if something simpler and perhaps faster popped out (like ljarvis???s)
[20:30:33] rickrobs: has joined #ruby
[20:30:54] byprdct: has joined #ruby
[20:31:19] paulcsmith__: has joined #ruby
[20:32:10] thiagofm: has joined #ruby
[20:32:16] dfockler: has joined #ruby
[20:32:21] baweaver: has joined #ruby
[20:32:38] byprdct: has joined #ruby
[20:32:55] bluOxigen: has joined #ruby
[20:33:04] paulcsmith__: has joined #ruby
[20:34:01] TwinkleHood: has joined #ruby
[20:34:28] jerius: has joined #ruby
[20:34:34] shadoi: has joined #ruby
[20:34:49] _djbkd: has joined #ruby
[20:35:07] iliketurtles: has joined #ruby
[20:35:26] jhooker: has joined #ruby
[20:36:02] nofxx1: mwlang, woa, a billion records? Can you spare some curiosity specs? DB, what kinda of data?
[20:36:10] haxrbyte: has joined #ruby
[20:36:26] mwlang: nofxx_: order line items for a bookstore.
[20:36:34] adaedra: Please don't say SQLite :p
[20:36:44] BanzaiJoe: SQLite, we love you!
[20:36:45] dgutierrez1287: has joined #ruby
[20:36:46] mwlang: haha???no. Its SQL Server 2005.
[20:36:53] BanzaiJoe: sorry to hear
[20:37:00] mwlang: yeah, no kiddin???
[20:37:08] BanzaiJoe: are you using an ORM?
[20:37:15] sumark: has joined #ruby
[20:37:26] mwlang: but just it???s dataset, not the model.
[20:37:31] haxrbyte_: has joined #ruby
[20:37:33] pengin: has joined #ruby
[20:37:34] BanzaiJoe: and it's chugging right along with SQL2005?
[20:38:02] BanzaiJoe: or so simple CRUD, no major ORM mapping?
[20:38:10] mwlang: yes???I???m going to have to start with a year???s worth of data instead of 12 years.
[20:38:21] nofxx1: well if it's line items should suffer many queries against, just find order_id and get me items
[20:38:22] zendrix: has joined #ruby
[20:38:32] nofxx1: shouldn't*
[20:38:38] mwlang: not doing anything like that with this???the bookstore is a Rails app.
[20:38:55] mwlang: what I???m doing is building a recommendation engine using Prediction.IO
[20:39:02] nofxx1: mwlang, yeah, make it resumable hehe, I mean, continue from where it crashs
[20:39:51] mwlang: nofxx_: I have no reason to expect it to crash. SQL Server???s come a long ways since it???s early days.
[20:39:55] wallerdev: has joined #ruby
[20:40:03] bricker: has joined #ruby
[20:40:40] mwlang: not a DBMS I would choose today, mind you, but it???s working well for the client and has been for a while now.
[20:41:05] nofxx1: mwlang, I mean your importer/reader, never played with mssql, nor will I. Paid all my sins with oracle some longs yrs ago
[20:41:37] mwlang: nofxx_: I spent years specialzing in Oracle.
[20:41:58] mwlang: mostly use mysql and postgres these days.
[20:42:00] pietr0: has joined #ruby
[20:42:35] nofxx1: mwlang, back in 09 I was in a company specialized in removing oracle hehe, we did pg for all
[20:42:39] jackjackdripper: has joined #ruby
[20:42:39] apofis: has joined #ruby
[20:42:53] _djbkd: has joined #ruby
[20:42:56] mwlang: nofxx_: that???s the logical choice.
[20:43:36] nofxx1: nowdays I use mongo or rethink, and pg only in some models.. if I want transactions for instance
[20:43:40] mwlang: I haven???t quite figured out how to remove MSSQL Server for the client, yet. They also integrate with Navision and a bunch of .Net apps.
[20:44:03] mwlang: plus a ton of stored procedures and DTS to boot.
[20:44:50] nofxx1: ugh... logic in the DB, keeping jobs since 1985
[20:45:04] mwlang: low hanging fruit: replace all Perl scripts with Ruby rewrites, rinse and repeat with .Net, then stored procs, then start thinking about MSSQL extraction.
[20:45:46] sunaku: has joined #ruby
[20:45:49] Torrieri: has joined #ruby
[20:45:49] Torrieri: has joined #ruby
[20:46:17] yardenbar: has joined #ruby
[20:46:36] apt-get_: "There are no unmuted, pending submissions in this list."
[20:46:37] mwlang: nofxx_: yah, I had fun ???untraining??? the client about the benefits of stored procs???.he???s sold now because I rewrote a couple stored-proc DTS jobs that took three days to run to running in 10 hours with just Ruby + Sequel.
[20:46:41] apt-get_: ... Isn't exercism kinda dead?
[20:47:36] mwlang: what the heck is exercism?
[20:47:42] apt-get_: exercism.io
[20:48:07] jackjackdripper1: has joined #ruby
[20:48:12] BanzaiJoe: no, it's not dead
[20:48:25] BanzaiJoe: I'm not sure what kinda means though
[20:49:02] apt-get_: I can't find any submissions
[20:49:05] apt-get_: in the nitpick menu
[20:49:22] x1337807x: has joined #ruby
[20:49:58] x1337807x: has joined #ruby
[20:50:13] jhass: did you solve stuff yourself?
[20:50:22] _Speeder: has joined #ruby
[20:50:29] jhass: you'll only see them for stuff you set as finished
[20:50:47] paulcsmith__: has joined #ruby
[20:50:58] jackjackdripper: has joined #ruby
[20:51:20] chussenot_: has joined #ruby
[20:51:54] phutchins: has joined #ruby
[20:53:07] apt-get_: jhass: I only completed helloworld
[20:53:25] jhass: then that's why
[20:54:09] baweaver: has joined #ruby
[20:56:12] idafyaid: has joined #ruby
[20:57:27] neanderslob: hi all, I'm trying to figure out how to establish parameters in simple_form inputs by using variables
[20:57:37] neanderslob: my specific question is here: https://gist.github.com/BigMcLargeHuge/9807aa65106892a70321
[20:57:46] jhass: ?rails neanderslob
[20:57:46] ruboto: neanderslob, Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[20:58:12] baroquebobcat: has joined #ruby
[20:58:43] neanderslob: ruboto: oh I beg your pardon, clicked the wrong channel :-P
[20:59:01] sunaku: has left #ruby: ("WeeChat 1.1.1")
[20:59:56] sye: has joined #ruby
[21:00:22] sye: has left #ruby: ("undefined")
[21:00:50] bootstrappm: mwlang: that good of a performance improvement? the stored procedures / functions I write have always performed better than my application code O_o
[21:01:08] bootstrappm: enlighten me on the evils of stored procedures when you get a minute or two
[21:01:36] mwlang: bootstrappm: well, if you write them correctly, they can be fast. problem was, they weren???t written efficiently at all.
[21:02:40] Zai00: has joined #ruby
[21:02:57] mwlang: bootstrappm: my general POV on stored procs: http://blog.codinghorror.com/who-needs-stored-procedures-anyways/
[21:03:32] mwlang: what I generally do is coach clients to standardize on language as much as possible and then share code as much as possible in projects.
[21:03:50] fujimura: has joined #ruby
[21:04:08] ur5us: has joined #ruby
[21:04:39] mwlang: in the case here, that means getting rid of Perl, .Net, Java, stored procs and PHP because each system is ???re-implementing??? a bunch of core business logic.
[21:05:10] Pupeno: has joined #ruby
[21:05:27] mwlang: what we???re doing is actively moving business logic into ActiveRecord models and PORO classes
[21:05:31] paulcsmith__: has joined #ruby
[21:06:02] Sweeper: fat models are fat
[21:06:03] noethics: ORMs are fun. i don't know why people hate on them
[21:06:05] mwlang: most of all the stuff external to Ruby are just ETL jobs loading external data feeds into the database.
[21:06:18] bootstrappm: nice, thanks mwlang!
[21:06:33] mwlang: sweeper: fat models aren???t what I preach
[21:06:37] moretti: has joined #ruby
[21:06:59] Sweeper: mwlang: that's good :)
[21:07:00] bootstrappm: yeah, that's what we use are database functions for, data warehousing stuff mostly
[21:07:25] noethics: removing MSSQL in most cases comes down to writing an adapter for cassandra or similar
[21:08:00] noethics: there's just too much that relies on it, so just adapter that shet and move on
[21:08:38] noethics: (pls dont write adapters in ruby)
[21:09:18] Sweeper: you should use mongodb
[21:09:21] Sweeper: it's web scale
[21:09:29] e1nh4nd3r: has joined #ruby
[21:09:39] jhass: that reminds me of some IRC log...
[21:09:42] watchtheblur: has joined #ruby
[21:10:02] mwlang: although, skinny controller, fat models is something I preach, but when the focus is on models, these puppies should have a single collective purpose, generally speaking. For example, an order model shouldn???t track it???s purchase, fulfilment and tracking status like some sort of finite state machine all on the one class???it should collect the items ordered. Aother classes like ???Purchase??? ???Shipment??? etc. should track the states t
[21:10:02] mwlang: order might be in.
[21:10:30] jmignault: has joined #ruby
[21:10:42] noethics: seems PRETTY MUCH implemntation SPECIFIC
[21:10:55] noethics: sweeper, good advice 10/10 will implement
[21:11:12] noethics: btw mongodb isnteven that bad if you switch out the storage engine
[21:11:22] Frem: has joined #ruby
[21:11:55] Sweeper: noethics: toku?
[21:11:59] Sweeper: ACTION is using toku
[21:12:12] Sweeper: but, it's still retarded
[21:12:13] sn0wb1rd: has joined #ruby
[21:12:23] noethics: i forgot the name of it
[21:12:28] noethics: something tiger
[21:12:33] mwlang: meh, I went down the mongodb route once with a major project. It had more technical problems and hurdles to overcome than if I???d just built the thing in RDBMS and took advantage of full-text indexing.
[21:12:43] KramerC: has joined #ruby
[21:12:43] adaedra: <sweeper> it's web scale | :D
[21:12:47] df: has joined #ruby
[21:13:06] mwlang: web scale is soooo 2005. We need to be cloud scale today!
[21:13:22] adaedra: :<big>D</big>
[21:13:30] noethics: doesnt the default mongo engine have full database locks :DDDDD
[21:14:28] arescorpio: has joined #ruby
[21:15:02] x1337807x: has joined #ruby
[21:15:06] nik_-_: has joined #ruby
[21:15:33] eggoez: has joined #ruby
[21:16:06] micmus: has joined #ruby
[21:16:08] Sweeper: noethics: yes, yes it does
[21:16:09] _djbkd: has joined #ruby
[21:16:12] Sweeper: awesome, huh?
[21:16:20] bootstrappm: we use MongoDB! the only thing that has bitten us is no enforced data integrity. We had a bunch of different flags on our data that meant for a while -_-
[21:16:34] Sweeper: especially when it comes down to brass tacks and you actually need a damned join
[21:16:41] noethics: bootstrappm, the full database locks didnt cause you any problems?
[21:16:53] noethics: i guess it's fine if you have like sub 10 writes per second lol
[21:17:03] bootstrappm: that meant the same thing for a while*
[21:17:04] Scroff: has joined #ruby
[21:17:05] Sweeper: yea not so much at 20k rpm :P
[21:17:07] kurtf: has joined #ruby
[21:17:17] dfockler: or with ssd's
[21:17:25] Sweeper: no, no, ssd's don't help, at all
[21:17:50] dfockler: Use rethink instead
[21:18:01] futilegames: has joined #ruby
[21:18:01] pietr0_: has joined #ruby
[21:18:28] Sweeper: oh, ANOTHER group of people who learned javascript and thought that qualified them to write a database...
[21:18:32] ndrei: has joined #ruby
[21:18:53] dagda1: has joined #ruby
[21:19:07] baweaver: has joined #ruby
[21:19:10] noethics: use cassandra or hbase and call her a good day
[21:19:26] bootstrappm: last time it was languages, today its DBs
[21:19:33] dfockler: use mysql, or postgres
[21:19:37] bootstrappm: i'll stick to my ruby and postgres and be happy
[21:19:42] Sweeper: postgres man
[21:19:48] noethics: until you need to scale
[21:19:50] dfockler: it's editors/languages/databases you know things we use
[21:20:03] x1337807x: has joined #ruby
[21:20:04] bootstrappm: so fast, so consistent
[21:20:14] noethics: 2fast for me
[21:20:19] adaedra: use /dev/null, it's so fast
[21:20:32] Sweeper: noethics: are you still being silly, or did you implement your databases without thinking about good shard keys? :3
[21:20:37] noethics: i prefer my programs and dbs dont do anything at all
[21:20:44] noethics: saves the most cpu cycles
[21:21:07] noethics: sweeper, did you intent to talk to me?
[21:21:07] skarn: has joined #ruby
[21:21:27] Sweeper: yea, wrt the "until you need to scale" comment
[21:21:35] noethics: @postgres+ruby
[21:21:37] blackjid: has joined #ruby
[21:21:48] ddarkpassenger: has joined #ruby
[21:21:59] TwinkleHood: has joined #ruby
[21:22:43] momomomomo: has joined #ruby
[21:22:54] jfarmer: postgres does not have problems scaling
[21:23:12] jfarmer: Instragram grew using Postgres (for example)
[21:23:16] noethics: it does relative to other dbs that were designed from the ground up with replication in mind
[21:24:08] noethics: postgres is fine, i was mostly just being a douche
[21:24:22] terrellt: has joined #ruby
[21:24:31] noethics: but ruby+postgres is a setup that in my mind is for like "indie devs"
[21:24:38] BanzaiJoe: postgres has made significant progress. just like AMD, it's much better than it was
[21:24:43] jfarmer: I've scaled postgres no problem to handle millions of daily active users, so not sure what "scale" you're thinking of that is so "hard" for it to handle.
[21:24:55] jfarmer: same w/ mysql
[21:25:00] noethics: scale as in 3mm+writes/sec
[21:25:04] pikos: has joined #ruby
[21:25:07] noethics: for the web it's fine
[21:25:13] noethics: for big data it's meh
[21:25:27] iamjarvo: has joined #ruby
[21:25:37] Sweeper: ruby is the problem really, at that scale the ram costs start to add up
[21:25:38] jfarmer: Sure, it's not meant as an OLAP database
[21:25:48] finisherr: has joined #ruby
[21:26:11] weaksauce: have any of you read the big data book that manning recently published?
[21:26:26] jfarmer: but that's one dimension of "scaling" ??? it has a very nice scaling story as an OLTP database
[21:26:38] weaksauce: I started it and it seems pretty reasonable but I don't have much experience wrt large datasets like that.
[21:26:43] jfarmer: whereas your typical cassandra or hbase or whatever doesn't
[21:26:46] greenbagels: has joined #ruby
[21:27:03] jfarmer: right tools for the job and all
[21:27:38] parduse: has joined #ruby
[21:27:49] noethics: don't really know what you mean
[21:27:58] noethics: how would cassandra fail to scale for web
[21:27:59] BanzaiJoe: that's right, SQLite, the one to rule them all!!!! MUHAHAHAHA lol
[21:28:03] mib_mib: has joined #ruby
[21:28:12] workmad3: has joined #ruby
[21:28:39] BanzaiJoe: what jfarmer said about right tool for the job
[21:28:58] jfarmer: noethics This doesn't feel productive.
[21:29:00] apofis: has joined #ruby
[21:29:08] momomomomo: has joined #ruby
[21:29:09] noethics: people use postgres because it's homey
[21:29:18] BanzaiJoe: seriously, how many of us are running web based video games esp. with ruby?
[21:29:35] jfarmer: Everyone should use cassandra, I guess. Case closed. Web scale.
[21:29:46] BanzaiJoe: cassandra, ???, profit
[21:30:23] noethics: m8 but could ur setup handle this many rites/sec? no? lol nice db u got there
[21:31:07] iliketurtles: has joined #ruby
[21:31:23] mib_mib: has left #ruby: ()
[21:31:24] rickmasta: has joined #ruby
[21:31:32] iliketurtles: has joined #ruby
[21:31:41] mib_mib: has joined #ruby
[21:31:52] mib_mib: has left #ruby: ()
[21:31:57] mib_mib: has joined #ruby
[21:32:01] mib_mib: has left #ruby: ()
[21:32:04] moretti_: has joined #ruby
[21:33:22] noethics: one time i built an amazon affiliate website with 2million products with mysql
[21:33:29] noethics: did not work
[21:33:59] kurtec: has joined #ruby
[21:34:26] noethics: weaksauce, because i was using it as a graph db
[21:34:36] weaksauce: you could have just said mysql
[21:34:49] noethics: i was able to calculate with 99% significance the average time it takes for mysql to crash and boot itself back up
[21:35:30] kurtec_: has joined #ruby
[21:35:35] noethics: science and shit.
[21:37:17] frank_o: has joined #ruby
[21:38:08] Vile`: has joined #ruby
[21:38:28] blandflakes: has joined #ruby
[21:39:43] m0r0n: has joined #ruby
[21:40:44] frank_o: Howdy! If I use REST Client to fetch images from this external API, is there a way to tell when they're done loading? https://gist.github.com/dt1973/b57d84bf39a75ea47e9b
[21:41:44] a13x212: has left #ruby: ()
[21:42:00] TwinkleHood: has joined #ruby
[21:44:00] zendrix: has joined #ruby
[21:44:23] matp_: has joined #ruby
[21:44:30] blandflakes: has joined #ruby
[21:44:39] hahuang65: has joined #ruby
[21:46:19] baweaver: has joined #ruby
[21:48:09] bootstrappm: sorry frank_o, a bit busy, if you're still having this prob in a few hours try again :)
[21:49:01] frank_o: bootstrappm: Thanks man =)
[21:49:14] dfockler: frank_o: the rest client will sit until the transfer is finished
[21:49:39] iamjarvo: has joined #ruby
[21:49:41] frank_o: dfockler: aah.. that changes everything i think
[21:50:09] Pathfinder: has joined #ruby
[21:50:11] Alayde: has joined #ruby
[21:50:23] frank_o: dfockler: thank you!
[21:50:36] dfockler: sure if that doesn't work, come back! :)
[21:50:55] Scripore: has joined #ruby
[21:51:15] finisherr: has joined #ruby
[21:51:35] freerobby: has joined #ruby
[21:51:48] frank_o: oh indeed!
[21:53:15] mrsolo: has joined #ruby
[21:53:18] Alayde: I'm writing a few modules that are making REST calls to an internal API, is there a recommended way to share credentials between the different modules?
[21:53:21] banister: has joined #ruby
[21:54:47] civim_32: has joined #ruby
[21:54:58] dfockler: Alayde: You can make a module that has the settings as constants inside of it
[21:55:21] jfarmer: has joined #ruby
[21:55:40] bootstrappm: Alayde also checkout https://github.com/bkeepers/dotenv
[21:55:46] moretti: has joined #ruby
[21:55:52] bootstrappm: keep all sensitive credentials in the environment instead of in the source code
[21:56:02] nfk: has joined #ruby
[21:56:02] dfockler: ^ this makes sense
[21:56:16] ferr: has joined #ruby
[21:56:58] OtterCoder: has joined #ruby
[21:58:23] Alayde: bootstrappm: So that is pretty cool. I won't lie though, our org isn't the best about security and these credentials are already peppered throughout all of our source code
[21:58:37] Alayde: But, I'll look into it. maybe I'll be the first good example lol
[21:59:04] shadoi: has joined #ruby
[21:59:13] bootstrappm: haha then go with what dfockler said, you're no longer aiming for security just reuse ... shared module sounds good
[21:59:52] dain_: has joined #ruby
[21:59:59] jpfuentes2: has joined #ruby
[22:01:00] jmif: has joined #ruby
[22:01:22] jmif: hey all, I'd like to access the data coming from STDIN character by character without any buffering, is this possible in ruby?
[22:01:51] allcentury: has joined #ruby
[22:02:10] tkuchiki: has joined #ruby
[22:02:43] lkba: has joined #ruby
[22:02:44] jhass: jmif: yes, for example with io/console's getch
[22:04:15] sarlalian: has joined #ruby
[22:06:05] jenrzzz_: has joined #ruby
[22:06:44] chipotle: has joined #ruby
[22:08:35] bricker: has joined #ruby
[22:09:38] bricker1: has joined #ruby
[22:11:34] spyderman4g63: has joined #ruby
[22:13:41] b_hoffman: has joined #ruby
[22:13:43] _seanc_: has joined #ruby
[22:14:08] affenhoden: has joined #ruby
[22:17:23] platosha: has joined #ruby
[22:18:16] jpfuentes2: has joined #ruby
[22:18:57] nisstyre: has joined #ruby
[22:21:19] drbrain: or sysread(1)
[22:21:57] michael_mbp: has joined #ruby
[22:22:07] ruby-lang713: has joined #ruby
[22:25:26] Mon_Ouie: Well, they're not the same though --- sysread is actually about "no buffering", getch lets you read the input as the users is entering it, without waiting for them to hit the return key
[22:25:53] prereflect: has joined #ruby
[22:26:39] Spami: has joined #ruby
[22:26:51] jmif: getch seems to have worked just fine
[22:26:58] Pathfinder: has joined #ruby
[22:27:02] jpfuentes2: has joined #ruby
[22:27:11] jmif: anyone here have any experience with net/ssh, trying to take the output of getch and pipe into an exiting channel
[22:28:09] ruby-lang713: Net IMAP question: how do I filter on the "to" field? this doesn't seem to be working:
[22:28:14] ruby-lang713: mailbox.search(["TO", "me@example.com"])
[22:28:34] fgo: has joined #ruby
[22:31:09] olistik: has joined #ruby
[22:31:27] drbrain: ruby-lang713: that should do it, according to the spec
[22:31:36] drbrain: maybe you need <> around the email?
[22:31:46] ruby-lang713: ok let me try the <>
[22:32:11] workmad3: has joined #ruby
[22:33:30] drbrain: IMAP protocol is UGH
[22:33:30] IanVorn: has joined #ruby
[22:33:58] baweaver: has joined #ruby
[22:34:03] jenrzzz: has joined #ruby
[22:34:05] victorkohl: has joined #ruby
[22:34:53] drbrain: ruby-lang713: you might want to try pulling BODY[HEADER.FIELDS (TO)] from a message or two and see what the server expects in that field
[22:35:33] pwattstbd: has joined #ruby
[22:35:58] jackjackdripper1: has joined #ruby
[22:36:28] Tobarja: has joined #ruby
[22:37:18] luckyme: has joined #ruby
[22:37:39] BanzaiJoe: is .search a homegrown method?
[22:38:55] drbrain: BanzaiJoe: it's part of IMAP
[22:39:09] drbrain: Net::IMAP and the IMAP protocol
[22:39:23] drbrain: it's super powerful but ugh to use
[22:39:31] BanzaiJoe: is it case sensitive?
[22:39:51] drbrain: "TO" is, the email address probably not
[22:40:17] drbrain: I can't remember what the spec says for case sensitivity of values
[22:40:22] GnuYawk: has joined #ruby
[22:40:23] pVilaca: has left #ruby: ("Leaving...")
[22:40:30] BanzaiJoe: but it follows spec, gotcha
[22:41:12] duderonomy: has joined #ruby
[22:41:40] ruby-lang713: yeah adding <> doesn't seem to work. guess I have to dig in deeper :/
[22:41:54] BanzaiJoe: 2.0 docs suggest it doesn't actually search for TO, just the string within TO
[22:41:56] ruby-lang713: I'm not really feeling getting my hands dirty in IMAP though
[22:42:19] idafyaid: has joined #ruby
[22:42:19] idafyaid: has joined #ruby
[22:42:37] drbrain: BTW, the spec for SEARCH is https://tools.ietf.org/html/rfc3501#section-6.4.4
[22:42:51] BanzaiJoe: oh, I was at http://ruby-doc.org/stdlib-2.2.0/libdoc/net/imap/rdoc/Net/IMAP.html#method-i-search
[22:43:21] swgillespie: has joined #ruby
[22:43:34] drbrain: yeah, I might not have written the best set of examples there
[22:44:16] BanzaiJoe: even the spec suggests in only searches message body, not field label
[22:44:23] baweaver: has joined #ruby
[22:44:33] BanzaiJoe: ruby-lang713 are you specifically looking for "TO" or a recipient
[22:44:44] ruby-lang713: a recipient email address
[22:45:46] hypnosb: has joined #ruby
[22:46:45] drbrain: I'd try: mailbox.select(['1:10']).each { |message_id| p mailbox.fetch(message_id, 'BODY[HEADER.FIELDS (TO)]') }
[22:46:54] BanzaiJoe: oh, I was all backwards...
[22:46:57] drbrain: then search with what the server came back with
[22:47:23] Adran: has joined #ruby
[22:47:47] zenspider: ugh. imap is so freakin' ugly.
[22:48:00] zenspider: it's always hard to walk back into that code
[22:48:00] tubulife-: has joined #ruby
[22:48:35] pengin: has joined #ruby
[22:52:38] fujimura: has joined #ruby
[22:54:54] _djbkd: has joined #ruby
[22:54:58] alphaatom: has joined #ruby
[22:55:54] freerobby: has joined #ruby
[22:56:15] mary5030: has joined #ruby
[22:56:28] jackjackdripper: has joined #ruby
[22:56:35] dfockler: is the api like that because of the protocol?
[22:56:52] edwinvdgraaf: has joined #ruby
[22:57:07] drbrain: dfockler: yes
[22:57:39] drbrain: IMAP protocol allows you to have multiple in-flight requests at once
[22:58:05] drbrain: and it's difficult to wrap your head around enough of it to write a wrapper with a decent interface
[22:58:14] jenrzzz: has joined #ruby
[22:58:17] hypnosb: has joined #ruby
[22:58:20] drbrain: the worst bit is that messages have "UID"s
[22:58:46] drbrain: where you would think "U" stands for universal (synonym unchanging)
[22:58:59] Palmer11: has joined #ruby
[22:59:09] drbrain: but instead, if another client deletes the message with UID 5, then everything gets renumbered for all the other clients
[22:59:28] workmad3: drbrain: U is universally interpretted as 'Useless' right?
[22:59:37] drbrain: in IMAP, most definitely
[22:59:53] bantic: has joined #ruby
[23:00:10] goodcodeguy: has joined #ruby
[23:00:44] BanzaiJoe: One might even need built-in tools from Microsoft to fix broken .pst when that happens...
[23:00:58] Exuma: has joined #ruby
[23:01:12] jhooker: has joined #ruby
[23:01:15] mordocai: has joined #ruby
[23:01:23] dfockler: oh man, you have to keep track of the multiple requests
[23:01:41] bootstrappm: anybody seen this one before: NoMethodError: undefined method `store_previous_model_for_photo' for #<Ad:0x00000008accb20>
[23:01:44] drbrain: if you don't need to worry about the UID Net::IMAP can do it all for you
[23:01:45] bootstrappm: carrierwave w/ mongoid
[23:02:17] drbrain: but that can be difficult
[23:02:18] mark[oz]: has joined #ruby
[23:02:37] bootstrappm: Ad model has photo column
[23:02:56] iamninja: has joined #ruby
[23:02:58] b_hoffman: has joined #ruby
[23:03:49] woodruffw: has joined #ruby
[23:04:46] wallerdev: well whatever ad model is it's missing whatever creates that method :p
[23:04:53] Aeyrix: has joined #ruby
[23:04:55] wallerdev: so maybe it needs to include a module or derive from some class
[23:06:41] bootstrappm: haha thanks wallerdev, yes I included " mount_uploader :photo, ImageUploader"
[23:07:11] wallerdev: yeah unfortunately the question is really specific to those technologies haha :(
[23:07:54] wallerdev: you could see what provides that method (probably method_missing) and try to debug it by diving into the source
[23:08:06] Jandre: has joined #ruby
[23:08:59] weaksauce: favorite way to make a tempfile name?
[23:09:10] Aeyrix: Tempfile.new usually
[23:09:32] jhass: tempfile stdlib?
[23:09:48] momomomomo: has joined #ruby
[23:10:13] alphaatom: has joined #ruby
[23:10:18] edwinvdgraaf: has joined #ruby
[23:10:21] _blizzy_: >.> I keep putting 'gem "x"' instead of 'require "x"'
[23:11:10] bootstrappm: _blizzy_ you know what's a good way to get rid of that habit? type require 'X' a thousand times in a text file. Unless you use Vim, of course, then that's cheating
[23:11:13] SuperTaz_: has joined #ruby
[23:11:22] rickmasta: has joined #ruby
[23:11:23] Scroff: has joined #ruby
[23:11:30] _blizzy_: bootstrappm, lol, good idea. thxs.
[23:11:31] alphaatom: has joined #ruby
[23:12:18] dfockler: just don't require your gem inside your Gemfile ;)
[23:12:35] veduardo: has joined #ruby
[23:13:06] baweaver: >> [1,2,3] == [3,2,1]
[23:13:07] ruboto: baweaver # => false (https://eval.in/375251)
[23:13:10] baweaver: dangit ruby
[23:13:26] jhass: why would it?
[23:13:36] baweaver: same elements
[23:13:41] bootstrappm: [1,2,3].sort == [3,2,1].sort
[23:13:42] jhass: >> require "set"; Set.new(1,2,3) == Set.new(3,2,1)
[23:13:43] ruboto: jhass # => wrong number of arguments (3 for 0..1) (ArgumentError) ...check link for more (https://eval.in/375253)
[23:13:53] baweaver: wouldn't work
[23:13:54] jhass: >> require "set"; Set.new([1,2,3]) == Set.new([3,2,1])
[23:13:55] ruboto: jhass # => true (https://eval.in/375254)
[23:13:59] baweaver: and yeah, did that bootstrappm
[23:13:59] finisherr: has left #ruby: ()
[23:14:12] baweaver: >> require "set"; Set.new([1,2,3]) == Set.new([3,3,3,2,1])
[23:14:13] ruboto: baweaver # => true (https://eval.in/375255)
[23:14:18] _blizzy_: heh. I made a gem that evals stuff to eval.in
[23:14:49] jhass: >> ([1, 2, 3] - [3, 2, 1]).empty?
[23:14:50] ruboto: jhass # => true (https://eval.in/375256)
[23:14:51] jfarmer: >> Dir.pwd
[23:14:52] ruboto: jfarmer # => "/tmp/execpad-6ba549bb0a2c" (https://eval.in/375257)
[23:15:13] adefa: has joined #ruby
[23:15:25] Exponential: has joined #ruby
[23:15:26] jfarmer: >> system('who')
[23:15:27] ruboto: jfarmer # => (https://eval.in/375260)
[23:15:36] jhass: jfarmer: trying to break the bot is a bannable offence
[23:15:36] baweaver: >> ([1, 2, 3] - [3, 2, 1, 5]).empty?
[23:15:37] ruboto: baweaver # => true (https://eval.in/375261)
[23:15:42] jfarmer: jhass Well, ok.
[23:16:12] jhass: baweaver: yes, you'd have to do a, b swap towards the larger on the left
[23:16:20] jfarmer: baweaver What are you trying to do that you want [1,2,3] == [3,2,1] to evaluate to true?
[23:16:29] _blizzy_: I should update my gem, so it returns the url also.
[23:16:38] baweaver: AWS returns security group permissions in random orders
[23:16:45] baweaver: which is causing an unnecessary database update
[23:16:52] baweaver: which for 500+ objects that's a pain
[23:17:07] jhass: sounds like a set then?
[23:17:08] jfarmer: Connect the dots between that and comparing arrays in an order-agnostic way.
[23:17:20] baweaver: Set assumes unique elements
[23:17:27] baweaver: some permissions overlap (for stupid reasons)
[23:17:39] jhass: overlap != identical?
[23:17:44] _blizzy_: are we allowed to post gems we have made here? :P
[23:17:50] baweaver: bad wording
[23:17:54] baweaver: yes, identical
[23:18:08] Rennex: is sorting out of the question?
[23:18:09] jhass: how does AWS differentiate them?
[23:18:10] jfarmer: I would think the total set of permissions is the union of all smaller permissions.
[23:18:16] baweaver: As for why, trust me when I say I want to know as well.
[23:18:26] jfarmer: Regardless, if you only want order-agnostic
[23:18:31] jfarmer: array1.sort == array2.sort
[23:18:37] jfarmer: like others suggested
[23:18:37] baweaver: mentioned above
[23:18:43] adefa: Can I remove an element from an array, but not in place? Is the only way to do this by subtracting one array from another? Example: a = [1, 2, 3]; a - [1] returns [2, 3]; a is still [1, 2, 3].
[23:18:43] jfarmer: I know; why is that out of the question?
[23:18:47] baweaver: I was doing that
[23:18:53] baweaver: and mentioned so above
[23:19:01] havenwood: _blizzy_: sure, this is a good place to share a gem you've made
[23:19:07] _blizzy_: havenwood, oh ok, thxs.
[23:19:16] jfarmer: Ok. Maybe wrong in assuming there was a question somewhere in your original comment. :)
[23:19:29] jfarmer: vs. just a musing
[23:19:32] _blizzy_: >> [1,2,3].delete_if? {|x| x == 3}
[23:19:32] baweaver: More of an annoyance with some return values from an api
[23:19:33] ruboto: _blizzy_ # => undefined method `delete_if?' for [1, 2, 3]:Array (NoMethodError) ...check link for more (https://eval.in/375269)
[23:19:59] _blizzy_: ruby has so many methods I guess I make some up sometimes.
[23:20:13] jfarmer: >> [1,2,3,4,5,6,7,8,9,10].reject { |n| n.even? }
[23:20:14] ruboto: jfarmer # => [1, 3, 5, 7, 9] (https://eval.in/375270)
[23:20:24] adefa: _blizzy_: delete_if exists
[23:20:26] Rubie: has joined #ruby
[23:20:34] tuelz: has joined #ruby
[23:20:39] _blizzy_: adefa, oh, it's just without the ?
[23:20:53] jhass: ACTION prefers .reject!
[23:20:54] Rennex: aka reject()
[23:20:56] jfarmer: _blizzy_ Methods that end with '?' are a signal that it returns true or false
[23:21:08] _blizzy_: jfarmer, oh, I didn
[23:21:13] _blizzy_: t know that. thxs.
[23:21:22] tuelz: I've got a list of schools in a text file and I want to throw them into a variable and use them from memory. They will never change. How would you do that? Just use a global, or a constant in a class?
[23:21:24] jfarmer: That's just a convention, but it's why you "shouldn't" expect a method like delete_if? to exist.
[23:21:35] jfarmer: jhass He specifically said "but not in place/"
[23:21:46] tuelz: thought about just memoizing some ivar too, but unsure the 'best' most ruby way to do it
[23:21:53] jhass: jfarmer: - is not in place, they want in place?
[23:22:15] jfarmer: I assume by "in place" they meant "destructive"
[23:22:26] jfarmer: Because you can't really remove things from an array in place
[23:22:29] jhass: tuelz: constant sounds good
[23:22:34] tuelz: jhass: thanks
[23:23:06] baweaver: >> a = [1,2,3]; a.pop; a
[23:23:07] ruboto: baweaver # => [1, 2] (https://eval.in/375271)
[23:23:08] NeverDie: has joined #ruby
[23:23:50] jfarmer: It'll be up to adefa to clarify what he/she meant.
[23:24:10] adefa: Destructive is the right word. Thanks everyone.
[23:24:43] swgillespie: has joined #ruby
[23:24:57] jfarmer: adefa Enumerable#reject is non-destructive and Enumerable#reject! (with the "!") is destructive, so whichever you want/need in that context.
[23:24:58] ccooke: has joined #ruby
[23:25:22] baweaver: Though it's normally good form to avoid that
[23:25:35] jfarmer: "That" being...?
[23:25:56] baweaver: destructive
[23:26:05] adefa: baweaver: I'd argue it depends on the context.
[23:26:17] baweaver: Which is why I said normally
[23:26:38] baweaver: ACTION is a Haskell/Scala hobbyist, which makes him extremely biased there
[23:26:52] jfarmer: I'm in the same camp, personally
[23:26:56] bootstrappm: baweaver you know Scala!? I've been meaning to make that my next language
[23:27:03] fmcgeough: has joined #ruby
[23:27:15] jfarmer: i.e., favor non-destructive over destructive unless you can guarantee you're operating on a copy
[23:27:17] baweaver: Giving a presentation on it on Friday for Spark usage
[23:27:33] baweaver: then translating into a blog post to share for later
[23:27:39] bootstrappm: coool do people actually use scala2js?
[23:27:47] baweaver: keep an eye on http://www.baweaver.com for it
[23:27:54] adefa: jfarmer: agreed.
[23:28:00] baweaver: pretty much that
[23:28:11] baweaver: I just avoid it in general as I have a lot of things running through sidekiq
[23:28:29] bb010g: has joined #ruby
[23:28:35] serivich: has joined #ruby
[23:29:38] sigden: has joined #ruby
[23:29:52] fgo: has joined #ruby
[23:31:09] ogpastaling: has joined #ruby
[23:31:16] Matachines: has joined #ruby
[23:31:17] bootstrappm: grr, got a little too trigger happy with "q!" in vim. Def erased a buffer I needed
[23:31:47] shadoi: has joined #ruby
[23:31:58] Fooster: has joined #ruby
[23:32:48] Torrieri: has joined #ruby
[23:32:48] Torrieri: has joined #ruby
[23:34:30] al2o3-cr: what you done miah?
[23:35:12] miah: nothing, was commenting on bootstrappm
[23:37:23] ramfjord: has joined #ruby
[23:38:35] bkxd: has joined #ruby
[23:39:23] zenspider: baweaver: Haskell/Scala hobbyist? so very sad. :P
[23:39:32] zenspider: ACTION goes back to hacking in racket
[23:39:48] zenspider: I shamed him off the internet.
[23:40:08] RegulationD: has joined #ruby
[23:40:59] bootstrappm: hahahah that was great
[23:41:26] kinduff: has joined #ruby
[23:41:41] badhatter: has joined #ruby
[23:41:50] tuelz: what is racket? Just a racket?
[23:42:53] tuelz: a language intended to be used to create other languages.... 0.o
[23:43:16] tuelz: weird design goal
[23:43:26] sigden: has joined #ruby
[23:43:27] zenspider: why is that weird?
[23:44:17] zenspider: what do you think ppl have been trying to do in ruby with rake, rspec, activerecord, etc? all that "internal-DSL" nonsense is (poor) efforts to do just that
[23:44:18] dfockler: like bison and flex
[23:44:43] tuelz: noone created something to create rake though
[23:44:45] Ropeney: has joined #ruby
[23:44:56] zenspider: tuelz: yes they did. they created ruby.
[23:45:01] Fooster: has joined #ruby
[23:45:09] tuelz: matz didn't say I'm going to create ruby so you can create rake
[23:45:23] dfockler: nah rake just divinely existed
[23:45:34] tuelz: dfockler: false dichotomy
[23:45:52] tuelz: you can design ruby for a purpose other than a langauge to create rake
[23:45:59] baweaver: has joined #ruby
[23:46:05] dfockler: it's not like racket is designed to make a single language
[23:46:35] zenspider: tuelz: *sigh* I do not see the point of your argument other than to be tedious. if you don't want to answer my question, fine.
[23:46:42] baweaver: zenspider: hm?
[23:46:51] zenspider: I'm happy to answer (other) questions about racket
[23:46:57] zenspider: baweaver: just poking at you
[23:47:03] tuelz: zenspider: I already attempted to answer your question, I'm sorry if my answer isn't sufficient for you
[23:47:12] baweaver: ACTION groks logs
[23:47:31] thiagovsk: has joined #ruby
[23:47:54] mordocai: has joined #ruby
[23:48:22] zenspider: dfockler: racket isn't really like bison/flex... it's more like if ruby had a built in macro system that made it easy to declare another language that translated to ruby
[23:48:37] zenspider: (or compiled... I guess, but I really don't use racket for compiled sources)
[23:48:52] tuelz: I see that design goal as the equivalent as saying - houses are hard to build, let me design this tool so someone smarter than me can use this tool to create good house building tools. It seems more natural to use that time thinking about how to build a tool that is good at building houses
[23:49:38] bootstrappm: ACTION is frustrated because your frustrated
[23:49:45] bootstrappm: you're* damnit
[23:49:53] dfockler: zenspider: like it's designed around writing a lexer and parser?
[23:50:00] tuelz: I understand the usefulness of such a tool, but it's not ordinary to attempt to solve a problem that isn't immediately recognizable
[23:50:02] dfockler: or compiler
[23:50:10] zenspider: it's actually quite nice. the first line of a racket source is usually "#lang racket" but can be "#lang whatever" where whatever can define any syntax and semantics it wants. I actually write a few parsers this way with "#lang ragg" that then translates into racket source for the parser's grammar
[23:50:44] nedp: has joined #ruby
[23:51:25] dfockler: Is it Ruby's metaprogramming that allows for easier DSL building?
[23:51:37] zenspider: racket loads the file, see the language, hands it off... usually it is translated into more racket to be run and it all seamlessly integrates with all the other sources, whatever their languages
[23:51:45] mdz_: has joined #ruby
[23:52:07] zenspider: dfockler: metaprogramming (usually mostly instance_eval) + block structure, yeah.
[23:52:35] dfockler: racket has that as a first class feature then
[23:52:52] bootstrappm: zenspider would it be easier for me to learn how to create a language if i start with racket first? or is it hard to really use racket without knowing how languages are written?
[23:53:03] zenspider: minitest's spec "dsl" really just creates classes and methods out of describe/it/let blocks, but some "dsl"s are much more extensive than that
[23:53:28] zenspider: bootstrappm: mmmm... depends. what sort of language?
[23:53:36] zenspider: and, have you programmed in anything lispy before?
[23:53:39] bootstrappm: a toy language
[23:53:43] bootstrappm: nothing lispy no
[23:53:51] bootstrappm: all my languages can pronounce their s's
[23:53:55] OtterCoder: has joined #ruby
[23:53:59] chadrien: has joined #ruby
[23:54:09] dgutierrez1287: has joined #ruby
[23:54:13] zenspider: mmmm... depending on how toy like... ruby could be just fine for it.
[23:54:23] Adran: has joined #ruby
[23:54:27] dfockler: I was writing a parser in Ruby, and I quickly realized why polish notation is nicer to parse
[23:54:35] zenspider: I'd only change one major variable at a time... if this is your first parser/lexer/interpreter, then I'd stick to a language you know for now
[23:54:54] zenspider: so write a language with polish notation first.
[23:54:59] zenspider: look at forth or factor
[23:55:01] diegok: has joined #ruby
[23:55:15] zenspider: or even just an HP calculator (which are really capable... they're basically forth)
[23:55:39] zenspider: you can look at oedipus_lex for a simple way to define a lexer
[23:55:46] zenspider: (or just do regexps yourself)
[23:56:05] zenspider: then, depending on your goals, you could use racc, or write a recursive descent parser by hand
[23:56:25] LMity: has joined #ruby
[23:57:26] dfockler: I don't really understand the theory, but it's fun to run into issues and see that people have already discovered them
[23:57:38] bootstrappm: so many projects, so little time
[23:58:01] dfockler: Just figuring out variable substitution and nested functions is pretty interesting
[23:58:23] zenspider: dfockler: start with a basic RPN calculator language. Get arithmetic up and running. add variables. add user functions. then switch it to infix... etc.
[23:58:42] zenspider: it's a nice thought experiment at the very least.
[23:58:53] zenspider: I've done a talk on interpreters if you want to follow that
[23:59:03] mist: has joined #ruby
[23:59:04] Papierkorb: has joined #ruby
[23:59:14] dfockler: yeah that would awesome
[23:59:55] jwaldrip_: has joined #ruby
[23:59:58] dfockler: I got to the point of an RPN calculator, but hit nested functions