« Back to channel list

#ruby - 27 August 2015

« Back 1 day Forward 1 day »
[00:00:54] lucyinthesky: has joined #ruby
[00:01:12] Asher: has joined #ruby
[00:01:34] porfa: i'll try to explain this the best way i can??? i was learning mechanize fill some forms, but i guess some of them are in .js and mecha can't handle that.. so someone was nice enough to redirect me to watir because it can run in console pretty lightly (i just have access to a linux terminal no X windows system) so i went on to install watir gems and the headless gem, the same way i installed every other gem in my life
[00:02:13] porfa: and when i got to require the headless gem, it spits out errors, so I'm really clueless on what you are saying about showing the code.. there is no code at all at this point i guess, just trying to install a gem then process to learn how to use it
[00:02:53] Aeyrix: Obfuscate:
[00:02:57] Aeyrix: where's Ox
[00:03:09] zenspider: as I've already shown you... I can install and require headless just fine. I need you to show me how it doesn't. exactly.
[00:03:36] porfa: explain me how i can do that, and i most certainly will!!
[00:03:39] BraddPitt: Porfa paste the error/stack trace you're getting
[00:03:50] BraddPitt: we need to see the error in order to help
[00:04:05] _djbkd: has joined #ruby
[00:04:35] zenspider: we ALSO need the actual reproduction
[00:04:48] porfa: i give up
[00:05:02] ruboto: Please provide us with an example of valid input for your problem, the output that you're getting, and the output that you were expecting.
[00:05:19] porfa: the output I'm expecting is 'True'
[00:05:27] stardiviner: has joined #ruby
[00:08:39] helpa: has joined #ruby
[00:08:44] sankaber: has joined #ruby
[00:09:08] christiandsg: has joined #ruby
[00:09:20] cjbottaro: has joined #ruby
[00:09:32] n_blownapart: has joined #ruby
[00:10:22] j_mcnally: has joined #ruby
[00:10:50] porfa: BraddPitt: zenspider
[00:10:51] porfa: http://i.imgur.com/MVuaw7U.png
[00:11:08] nofxx: there's a way to run mechanize with phantomjs iirc Porfa , if not check poltergeist
[00:11:23] j_mcnally: has joined #ruby
[00:11:38] nofxx: phantom will be way faster and better at running JS
[00:11:48] Cache_Money: has joined #ruby
[00:11:56] Radar: Porfa: gem install headless then try that command again
[00:12:26] zenspider: `sudo which gem`; `which irb`
[00:12:27] porfa: ERROR: While executing gem ... (Gem::FilePermissionError)
[00:12:28] porfa: You don't have write permissions for the /usr/local/lib/ruby/gems/2.2.0 directory.
[00:12:33] porfa: I'm not using rvm...
[00:12:47] porfa: just one ruby, one ruby to rule them all
[00:13:45] grenierm: has joined #ruby
[00:13:53] zenspider: you really like resisting getting help, don't you?
[00:14:17] zenspider: I give up. I have better stuff to hack on than you
[00:14:26] porfa: me? ahha I'm like the "asshole" who's always asking for help around here
[00:14:49] denisemccoy: has joined #ruby
[00:15:07] jesterfraud: asking for help != accepting help :P
[00:15:23] porfa: whats the deal with this gem, jizz mate
[00:15:31] porfa: do you want root access to this machine?
[00:15:38] BraddPitt: wouldn't hurt
[00:15:47] northfurr: has joined #ruby
[00:15:55] porfa: nice hat, nice color
[00:16:16] stardiviner: has joined #ruby
[00:16:22] j_mcnally: has joined #ruby
[00:16:40] porfa: this is lame and stupid i never had such problems installing a gem
[00:17:11] Radar: Porfa: [10:12:28] <zen> `sudo which gem`; `which irb`
[00:17:19] Radar: What's the output of those two commands?
[00:17:31] porfa: usr/local/bin/gem
[00:17:41] porfa: usr/local/bin/irb
[00:18:07] Radar: sudo gem install headless
[00:18:12] Radar: That'll fix the temporary problem
[00:18:23] Radar: You should probably install a Ruby using chruby + ruby-install so that you don't have to sudo install everything
[00:18:27] porfa: unfortunately i already done that 5 times
[00:18:40] porfa: (the sudo gem install headless )
[00:18:45] dgutierrez1287: has joined #ruby
[00:19:10] Ropeney: has joined #ruby
[00:19:19] porfa: I'm using ruby for just two months now, and i've installed all sorts of gems and they all worked, the headless one is being a pain in the ass
[00:19:27] porfa: Successfully installed headless-2.2.0
[00:19:28] porfa: Parsing documentation for headless-2.2.0
[00:19:28] porfa: Done installing documentation for headless after 0 seconds
[00:19:28] porfa: 1 gem installed
[00:19:40] Radar: So install a Ruby using chruby + ruby-install and then see how you go after that.
[00:20:05] nofxx: or just create a ~/.gemrc file with:
[00:20:07] nofxx: gem: --user-install
[00:20:49] porfa: echo "gem: --user-install" > ~/.gemrc
[00:20:52] baweaver: has joined #ruby
[00:20:56] porfa: something like that nofxx ?
[00:21:03] nofxx: and add ~/.gem/ruby/2.2.0/bin to your $PATH ... as god intended
[00:21:26] nofxx: Porfa, yeah, need to reinstall the gems there now.
[00:23:40] rehat: has joined #ruby
[00:23:55] northfurr: has joined #ruby
[00:25:27] porfa: oops just f** my path, everything's gone
[00:26:48] porfa: I'm going to sleep
[00:27:15] shevy: wife says so?
[00:27:24] porfa: head says so
[00:27:31] porfa: and rm -rf * says so
[00:27:42] porfa: i just fkec my path
[00:27:51] porfa: i can't even get nano to edit my bashrc
[00:28:08] porfa: i have no idea how i can delete a line i added to bashrc now
[00:28:17] porfa: and i don't have another users on this box so...
[00:28:33] jhass: /usr/bin/nano ~/.bashrc ?
[00:28:46] jhass: fullpath is not a thing on your system?
[00:29:16] lucyinthesky: has joined #ruby
[00:29:33] s2013: has joined #ruby
[00:29:46] porfa: jhass: how do i run nano now that i am on /usr/bin/ ?
[00:30:12] porfa: yeah, you heard me
[00:30:23] porfa: how do i run it, because when i type nano it errors out
[00:30:27] jhass: who sad you should go to (whatever that means in your world) /usr/bin ?
[00:30:39] jhass: /usr/bin/nano ~/.bashrc
[00:30:42] jhass: it's a command
[00:30:54] jhass: copy paste the entire line
[00:31:18] porfa: awww thank you! :)
[00:32:20] JoshGlzBrk: has joined #ruby
[00:33:31] porfa: dammit, i get the same error when requiring headless
[00:33:50] porfa: https://gist.github.com/anonymous/a521f57327ba59bfa1dd
[00:33:58] porfa: (and yeah, it's installed)
[00:35:12] dgutierrez1287: has joined #ruby
[00:35:35] porfa: https://gist.github.com/anonymous/2656fce8391a5b60aed7
[00:36:00] saddad: has joined #ruby
[00:36:01] porfa: every gem i require that are on that folder i get a "true" as output, but when i require headless, it errors out
[00:36:42] porfa: is it because of my wife shevy ?
[00:37:28] northfurr: has joined #ruby
[00:37:32] linuxboytoo: has joined #ruby
[00:38:37] Xaitec: has joined #ruby
[00:38:58] Oog: has joined #ruby
[00:39:21] siemprefresco: has joined #ruby
[00:41:21] pyon: has joined #ruby
[00:41:48] ttttttrev: has joined #ruby
[00:42:06] shevy: she called you away from IRC the other day
[00:43:13] mordocai: has joined #ruby
[00:43:43] porfa: to eat dinner???!
[00:43:52] Maletor: has joined #ruby
[00:43:56] porfa: i just want to rm -rf everything
[00:44:01] graydot: has joined #ruby
[00:44:03] porfa: it's like a drug you know
[00:44:11] porfa: when things stop making sense
[00:44:23] porfa: i just wanna rm -rf *
[00:44:45] jhass: better get safe, dd if=/dev/zero of=/dev/sda
[00:45:07] porfa: or maybe i could just uninstall ruby and start learning python
[00:45:29] porfa: but the name python is so lame
[00:45:35] porfa: i could never learn something with that name
[00:45:40] porfa: maybe if we were in the 80's i could
[00:45:50] _djbkd: has joined #ruby
[00:45:56] Aeyrix: dd if=/dev/urandom of=/dev/sda
[00:46:05] Aeyrix: Developer do put a random cd key onto your hard drive.
[00:47:02] porfa: srslry, why couldn't mechanize just handle JS
[00:47:43] porfa: now i need to learn a new gem, watir and i can't even do it because I'm stuck over ssh to a remote box where i do my work.
[00:47:53] porfa: so headless would be perfect.. BUT no.
[00:48:00] porfa: stupid gem doesnt load
[00:48:04] yfeldblum: has joined #ruby
[00:48:15] porfa: fuck this I'm going back to being a plumber
[00:49:22] sevenseacat: has joined #ruby
[00:52:03] tomdalling: has joined #ruby
[00:54:09] shevy: all because of javascript?
[00:54:20] baweaver: it does have that effect
[00:54:22] devoldmx: has joined #ruby
[00:54:33] jhass: not too dumb, people will always produce enough shit
[00:54:36] shevy: beavers do know their things about that dam plumbing
[00:54:45] pipework: shevy: If I had a choice between following in the footsteps of the kind of people who like javascript (me) and sharing a profession with a certain Italian guy by the name of Luigi, I'd go for the latter.
[00:54:53] pipework: If my name ain't pipework
[00:55:06] shevy: now you are whaling on javascript again
[00:55:20] shevy: I like things like jquery but I still can't stand javascript
[00:55:40] porfa: i love javascript, i couldn't live without that snowfall.js on geocities 1999
[00:56:03] shevy: that was oldschool javascript
[00:56:09] shevy: nowadays we have serious asm.js
[00:56:24] shevy: things have become more complicated :(
[00:56:30] tkuchiki: has joined #ruby
[00:56:44] pipework: shevy: Every time I whale I whale.
[00:56:57] bsdbofh: has joined #ruby
[00:56:59] cmckee: has joined #ruby
[00:57:01] pipework: Porfa: That was literally the first thing I ever did for a client back in the day with JS.
[00:57:12] porfa: haahahahah
[00:57:16] shevy: damn... almost 20 years ago
[00:57:18] porfa: see? told ya
[00:57:28] pipework: Back then it wasn't snowfall.js it was copypaste this bullshit into your bullshit and ftp that bullshit on up.
[00:57:54] shevy: haha I found a jquery variant ... https://github.com/loktar00/JQuery-Snowfall let's see if I can get it to work with my ruby .cgi scripts
[00:57:56] pipework: single page applications meant something else in that era.
[00:58:23] nofxx: yeah, now we got snowfall with 3d accelerated support.
[00:58:45] nofxx: 4k pipelines, one for each flock
[00:58:49] leafybas_: has joined #ruby
[00:58:56] pipework: It even replicates the snowfall with different realtime locations.
[00:58:56] linuxboytoo: has joined #ruby
[00:59:08] shevy: I just realized that those snowflakes are a usability disaster
[00:59:12] shevy: I can't concentrate on anything else there
[00:59:45] nofxx: snowfall is nothing shevy, remeber those mouse followers?
[00:59:51] pipework: shevy: That's a feature if your company website has nothing worth concentrating on and you don't want anyone to know it.
[01:00:15] pipework: Shit, it's like I've gone back in time, only this time I'm a lot more jaded and cynical :(
[01:00:45] pipework: shevy: That trick is called "Hiding in plain site"
[01:00:57] shevy: nofxx mice?
[01:00:58] denisemccoy: has joined #ruby
[01:01:14] jenrzzz: has joined #ruby
[01:01:24] shevy: pipework yeah... somehow a lot of enthusiasm of the youth passes away in time :(
[01:01:29] porfa: the glitter following the mouse pointer
[01:01:32] pipework: shevy: http://jsfiddle.net/BfLAh/3/
[01:01:40] shevy: I was so excited back when someone else used <font size=36> in a forum
[01:01:52] RegulationD: has joined #ruby
[01:01:58] nofxx: shevy, the thing next to yr keyboard? how do you call
[01:02:08] shevy: oh god I already hate this mouse
[01:02:19] dgutierrez1287: has joined #ruby
[01:02:25] shevy: nofxx AK-47
[01:02:28] mordocai: has joined #ruby
[01:02:34] zenspider: hrm... I'm trying to write a memsize function for a TypedData thingy... but the library I'm wrapping has actually made this _entirely_ opaque. The struct decl is in a C file and the header only typedefs a forward decl.
[01:02:35] SuMo_D: has joined #ruby
[01:02:42] nofxx: I said: webgl and yeah, of course, now days... parallax http://amino-studio.com/envato-preview/snow-3d-christmas-jquery-plugin/
[01:02:44] s2013: has joined #ruby
[01:02:47] zenspider: as such, sizeof(struct _TTF_Font) is entirely unhappy.
[01:02:52] nofxx: shevy, =D
[01:03:00] ecnalyr: has joined #ruby
[01:03:04] zenspider: but at this point, I'm having a hard time knowing what to write for memsize
[01:03:11] zenspider: can't return "more than zero"
[01:04:19] porfa: i pay a beer to whoever help me getting the headless thing running tomorrow, i'll send munnies by paypal, swear on my balls
[01:04:32] porfa: now i have to sleep, the laptop almost fell from my lap right now
[01:04:36] pipework: remove head, miaow is headless.
[01:04:43] porfa: laters and have fun doing javascript snow
[01:04:45] pipework: simple yet effective
[01:06:18] nofxx: pipework, rm -rf being solving issues since 71', but that being solving issues since b.C.
[01:09:37] woodruffw: has joined #ruby
[01:10:05] deol: has joined #ruby
[01:13:31] mozzarella: has joined #ruby
[01:16:28] debajit: has joined #ruby
[01:17:31] debajit: Simple question: When I'm defining a constant inside a class, I want to call a method (which returns the constant's value). How can I call this method when assigning the constant? See the code here https://gist.github.com/debajit/0aed54eea159714558dc
[01:17:43] Asara: has joined #ruby
[01:17:55] Asara: has left #ruby: ()
[01:18:01] bruno-: has joined #ruby
[01:18:20] zenguy_pc: has joined #ruby
[01:25:48] sdwrage: has joined #ruby
[01:26:03] bootstrappm: has joined #ruby
[01:27:13] clarkenciel: has joined #ruby
[01:28:43] bootstrappm: has left #ruby: ()
[01:30:57] northfurr: has joined #ruby
[01:31:18] arescorpio: has joined #ruby
[01:31:38] unreal: has joined #ruby
[01:33:03] Cache_Money: has joined #ruby
[01:33:56] ghr: has joined #ruby
[01:34:22] ebbflowgo: has joined #ruby
[01:34:46] Eiam: has joined #ruby
[01:34:51] shevy: replace self.class.file_path with Updater.file_path
[01:35:02] shevy: and move "def self.file_path" on top of the file
[01:35:05] QKO: has joined #ruby
[01:35:17] SimpleBIT: has joined #ruby
[01:37:15] shevy: you'll get the value when you use: puts Updater.file_path at the end
[01:37:26] shevy: don't think you can get the return value from within def initialize as you do there right now
[01:39:50] freerobby: has joined #ruby
[01:42:07] Ox0dea: has joined #ruby
[01:42:17] dr3w: has joined #ruby
[01:42:27] Ox0dea: debajit: https://gist.github.com/0x0dea/520435a46bafde54ad01
[01:42:35] yeticry: has joined #ruby
[01:42:37] Ox0dea: Worth considering, anyhow.
[01:42:53] tkuchiki: has joined #ruby
[01:44:04] roolo: has joined #ruby
[01:44:56] mordocai: has joined #ruby
[01:45:31] ebbflowgo: has left #ruby: ()
[01:46:06] michael_mbp: has joined #ruby
[01:48:56] Asher: has joined #ruby
[01:54:24] mordocai: has joined #ruby
[01:54:27] sdwrage: has joined #ruby
[01:54:55] g3funk: has joined #ruby
[01:55:02] devoldmx: has joined #ruby
[01:55:47] Asher: has joined #ruby
[01:59:10] rbowlby: has joined #ruby
[01:59:17] ruby546: has joined #ruby
[01:59:50] bigredboots: has joined #ruby
[02:00:55] Rubie: has joined #ruby
[02:01:02] CpuID: has joined #ruby
[02:01:18] cmckee: has joined #ruby
[02:01:30] Asher: has joined #ruby
[02:02:56] SuMo_D: has joined #ruby
[02:02:56] jenrzzz: has joined #ruby
[02:03:36] SuMo_D: has joined #ruby
[02:04:46] JCOE: has joined #ruby
[02:05:07] allcentury: has joined #ruby
[02:06:41] amystephen: has joined #ruby
[02:08:23] iamninja: has joined #ruby
[02:08:47] centrx: has joined #ruby
[02:11:09] northfurr: has joined #ruby
[02:12:04] christiandsg: has joined #ruby
[02:12:57] saddad: has joined #ruby
[02:13:21] j_mcnally: has joined #ruby
[02:13:39] diegoviola: has joined #ruby
[02:14:19] denisemccoy: has joined #ruby
[02:14:40] auzty: has joined #ruby
[02:14:50] petricore: has joined #ruby
[02:15:29] dopamean_: has joined #ruby
[02:16:10] yatish27: has joined #ruby
[02:17:53] s2013: has joined #ruby
[02:18:07] Feyn: has joined #ruby
[02:18:52] bruno-: has joined #ruby
[02:19:21] TheNet: has joined #ruby
[02:19:26] Asher: has joined #ruby
[02:22:53] cmckee: has joined #ruby
[02:23:23] d2dchat: has joined #ruby
[02:24:48] Rubie: has joined #ruby
[02:25:44] pauly_oc: has joined #ruby
[02:29:29] j_mcnally: has joined #ruby
[02:31:42] agent_white: has joined #ruby
[02:32:20] pyon: has joined #ruby
[02:32:43] baweaver: has joined #ruby
[02:33:03] Asher-: has joined #ruby
[02:33:25] eiGHttt: has joined #ruby
[02:33:38] yeticry: has joined #ruby
[02:34:43] ghr: has joined #ruby
[02:35:40] northfurr: has joined #ruby
[02:36:45] choke: has joined #ruby
[02:37:35] _blizzy_: has joined #ruby
[02:37:57] banjara: has joined #ruby
[02:39:41] jyulliano: has joined #ruby
[02:41:27] molawson: has joined #ruby
[02:41:35] abara: has joined #ruby
[02:42:00] abara: has left #ruby: ()
[02:42:36] sdwrage: has joined #ruby
[02:45:05] rushed: has joined #ruby
[02:45:43] _blizzy_: has joined #ruby
[02:46:03] joneshf-laptop: has joined #ruby
[02:47:25] mamercad: has joined #ruby
[02:48:43] jenrzzz: has joined #ruby
[02:48:58] sdfgsdfg: has joined #ruby
[02:50:11] bigredboots: has joined #ruby
[02:51:26] ecnalyr: has joined #ruby
[02:53:39] dr3w: has joined #ruby
[02:54:21] johnflux: has joined #ruby
[02:54:21] johnflux: has joined #ruby
[02:55:15] jesterfraud: has joined #ruby
[02:55:42] devoldmx: has joined #ruby
[02:56:18] bronson: has joined #ruby
[02:56:50] ellisTAA: has joined #ruby
[02:56:52] Asher: has joined #ruby
[02:58:04] Torrieri: has joined #ruby
[02:58:04] Torrieri: has joined #ruby
[02:58:52] baweaver: has left #ruby: ()
[02:58:54] baweaver: has joined #ruby
[02:59:35] baweaver: shevy: y u no in offtopic?
[03:02:28] shevy: baweaver they start to play unicode hangman upon my arrival :(
[03:02:34] irctc144: has joined #ruby
[03:03:23] millerti: has joined #ruby
[03:03:45] irctc144: has left #ruby: ()
[03:03:46] RegulationD: has joined #ruby
[03:03:55] jesterfraud: has joined #ruby
[03:04:13] mozzarella: that's rough
[03:04:20] irctc602: has joined #ruby
[03:05:10] irctc602: hello im having trouble with cocoapods but i feel like its a ruby installation problem, this is what i get when i try to do any 'pod' command: -bash: /usr/local/bin/pod: /usr/local/opt/ruby/bin/ruby: bad interpreter: No such file or directory
[03:06:00] baweaver: shevy: https://www.threadless.com/product/6794/Dam_It/style,design
[03:06:37] baweaver: irctc602: did you do anything to your default ruby?
[03:07:01] irctc602: nope, i used this installation http://andycroll.com/mac/ruby/the-simplest-possible-serious-ruby-on-rails-setup-on-mavericks/
[03:07:03] arup_r: has joined #ruby
[03:07:10] baweaver: ls -la /usr/local/opt | grep ruby
[03:08:00] irctc602: got this back: lrwxr-xr-x 1 FarhanSyed admin 29 Jun 3 01:16 ruby-build -> ../Cellar/ruby-build/20150519
[03:08:28] baweaver: hm, so not in there
[03:08:45] Eiam: has joined #ruby
[03:09:11] irctc602: ruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-darwin14]
[03:10:17] bweston92: has joined #ruby
[03:11:27] irctc602: ive tried uninstalling cocoapods multiple times and reinstalling it and this same issue is occurring.
[03:13:13] iateadonut: has joined #ruby
[03:13:50] Seich: has joined #ruby
[03:14:14] jonee: has joined #ruby
[03:14:18] baweaver: try brew install ruby
[03:14:47] christiandsg: has joined #ruby
[03:14:54] braincrash: has joined #ruby
[03:17:41] linuxboytoo: has joined #ruby
[03:17:42] irctc602: thanks it works
[03:17:45] arup_r: has joined #ruby
[03:20:50] dr3w: has joined #ruby
[03:21:50] armyriad: has joined #ruby
[03:24:40] Rinzlit1: has joined #ruby
[03:30:44] michael_mbp: has joined #ruby
[03:31:34] BTRE: has joined #ruby
[03:32:10] roolo: has joined #ruby
[03:34:08] Authenticator: has joined #ruby
[03:35:04] j_mcnally: has joined #ruby
[03:35:25] ghr: has joined #ruby
[03:36:35] Axy: has joined #ruby
[03:39:25] Limix: has joined #ruby
[03:39:27] RobertBirnie: has joined #ruby
[03:41:00] dgutierrez1287: has joined #ruby
[03:45:13] msnyon: has joined #ruby
[03:45:41] bestbrents__: has joined #ruby
[03:46:22] nickmink: has joined #ruby
[03:47:19] jesterfraud: has joined #ruby
[03:47:49] hahuang61: has joined #ruby
[03:48:57] crdpink: has joined #ruby
[03:52:50] ramfjord: has joined #ruby
[03:55:27] northfurr: has joined #ruby
[03:55:38] linuxboytoo: has joined #ruby
[03:56:15] wookiehangover: has joined #ruby
[03:57:09] catoblepa: has joined #ruby
[03:58:38] pawnbox: has joined #ruby
[03:58:40] amystephen: has joined #ruby
[04:00:06] tlolczyk: has joined #ruby
[04:00:11] psye: has joined #ruby
[04:00:16] Rubie: has joined #ruby
[04:01:29] segmond: has joined #ruby
[04:03:04] tlolczyk: I've got a URI uri, and a link relative to that URI as a string call it s. How can I convert s to a URI. I find sites which tell you how to merge a base url as string with a relative string to get an absolute path. But not a URI to a string to gveet a URI.
[04:03:21] El3ktra: has joined #ruby
[04:03:46] El3ktra: has joined #ruby
[04:06:08] n_blownapart: has joined #ruby
[04:07:09] _djbkd: has joined #ruby
[04:08:30] hyy1: has joined #ruby
[04:09:18] iamninja: has joined #ruby
[04:10:48] zelan: has joined #ruby
[04:19:00] TheNet: has joined #ruby
[04:20:08] bruno-: has joined #ruby
[04:24:05] minmax: has joined #ruby
[04:27:28] nux443: has joined #ruby
[04:31:24] nofxx: tlolczyk, URI.parse ? provide an example please
[04:31:44] erikh: has joined #ruby
[04:31:47] astrobun_: has joined #ruby
[04:32:39] roxtrongo: has joined #ruby
[04:33:19] jesterfraud: has joined #ruby
[04:33:21] zenspider: >> require "uri"; u = URI.parse "http://example.com/"; u + "/blah"
[04:33:22] ruboto: zenspider # => #<URI::HTTP http://example.com/blah> (https://eval.in/423016)
[04:33:31] zenspider: sometimes you should just try it
[04:33:39] darix: >> require "uri"; u = URI.parse "http://example.com/foo"; u + "/blah"
[04:33:41] ruboto: darix # => #<URI::HTTP http://example.com/blah> (https://eval.in/423017)
[04:34:21] darkf: has joined #ruby
[04:35:49] leat: has joined #ruby
[04:36:14] ghr: has joined #ruby
[04:36:30] roxtrongo: has joined #ruby
[04:37:35] ohaibbq: has joined #ruby
[04:38:46] choke: has joined #ruby
[04:39:43] jaredrhine: has joined #ruby
[04:43:23] Eiam: has joined #ruby
[04:46:33] TheNet: has joined #ruby
[04:47:33] christiandsg: has joined #ruby
[04:48:23] decoponio: has joined #ruby
[04:50:30] RobertBirnie: has joined #ruby
[04:53:05] catoblepa: has joined #ruby
[04:54:57] radgeRayden: has joined #ruby
[04:55:31] atzorvas: has joined #ruby
[04:55:34] jeadre: has joined #ruby
[04:56:06] leat: has joined #ruby
[04:56:25] devoldmx: has joined #ruby
[04:58:35] baweaver: I just watched a program about beavers
[04:58:46] baweaver: It was the best dam program I've ever seen
[04:58:49] sevenseacat: beaverception
[04:58:50] s2013: has joined #ruby
[04:58:55] pawnbox: has joined #ruby
[04:59:11] rushed: has joined #ruby
[04:59:13] Limix: has joined #ruby
[04:59:49] helpa: has joined #ruby
[05:01:08] riotjones: has joined #ruby
[05:01:35] Seich: has joined #ruby
[05:05:21] lessless: has joined #ruby
[05:05:33] shevy: baweaver lol
[05:05:47] baweaver: sevenseacat: I prefer fruit puns myself, though they're no fun alone
[05:05:53] baweaver: after all, it takes two to mango
[05:06:13] baweaver: we have fruit day on thursdays in the office
[05:06:33] baweaver: I believe I've enumerated every fruit based pun in the book, much to the annoyance of my coworkers.
[05:06:44] bsdbofh: has joined #ruby
[05:06:51] baweaver: warming up for tomorrow :P
[05:06:55] baweaver: aren't I just a peach?
[05:08:14] Oog: has joined #ruby
[05:09:42] agent_white: has joined #ruby
[05:09:43] ghr: has joined #ruby
[05:10:49] skade: has joined #ruby
[05:11:15] TheNet: has joined #ruby
[05:12:03] Mendenhall: has joined #ruby
[05:12:49] darkf_: has joined #ruby
[05:16:41] nux443: has joined #ruby
[05:16:50] dhjondoh: has joined #ruby
[05:18:36] rbowlby: has joined #ruby
[05:18:38] tubuliferous_: has joined #ruby
[05:20:22] roolo: has joined #ruby
[05:20:58] KensoDev: has joined #ruby
[05:21:28] davedev24: has joined #ruby
[05:22:20] solocshaw: has joined #ruby
[05:23:06] michael_mbp: has joined #ruby
[05:24:36] yardenbar: has joined #ruby
[05:26:24] leat: has joined #ruby
[05:27:32] sdfgsdfg: has joined #ruby
[05:27:53] SCHAAP137: has joined #ruby
[05:31:23] jaycee: has joined #ruby
[05:33:38] TvL2386: has joined #ruby
[05:34:22] jenrzzz: has joined #ruby
[05:35:38] riotjones: has joined #ruby
[05:35:56] keen___________5: has joined #ruby
[05:36:27] n_blownapart: has joined #ruby
[05:38:01] zenspider: lines and rectangles and beziers, oh my
[05:38:07] zenspider: just need fonts, which are proving a bit segfaulty
[05:40:17] rushed: has joined #ruby
[05:40:26] symm-: has joined #ruby
[05:40:27] baweaver: zenspider: Tincup Whisky makes a decent Old Fashioned with some good Orange Bitters
[05:40:49] yatish27: has joined #ruby
[05:43:17] pawnbox: has joined #ruby
[05:45:56] zenspider: that was truly random...
[05:46:10] sevenseacat: but tasty by the sounds of it.
[05:46:12] zenspider: good to know? I guess? not that I can drink those
[05:46:40] eightfold: has joined #ruby
[05:46:51] RobertBirnie: has joined #ruby
[05:47:05] baweaver: thoughtline: zenspider mentioned drinking scotch, scotch is whisky, I'm drinking whisky now, it's tasty, I think to share musing.
[05:47:17] pawnbox_: has joined #ruby
[05:48:17] zenspider: not sure when I mentioned drinking scotch (not that I doubt that I did)... it's the old fashioned part I can't have
[05:48:38] zenspider: and if I didn't eat all of my calories in one meal, I'd probably be having bourbon right now :)
[05:48:38] baweaver: you were also more than slightly tipsy.
[05:49:46] Maletor: has joined #ruby
[05:49:51] zenspider: don't doubt that either. on my diet I'm an extreme lightweight
[05:49:57] wookiehangover: has joined #ruby
[05:50:38] eGGsha: has joined #ruby
[05:51:01] tmtwd: has joined #ruby
[05:51:59] lkba: has joined #ruby
[05:56:35] arup_r: has joined #ruby
[05:58:10] howdoi: has joined #ruby
[05:58:45] eiGHttt: has joined #ruby
[06:01:52] ocx: has joined #ruby
[06:02:18] HANJIN: has joined #ruby
[06:02:36] banjara: has joined #ruby
[06:02:44] DenSchub: has left #ruby: ("Leaving.")
[06:04:57] z1haze: has joined #ruby
[06:05:02] cynosures: has joined #ruby
[06:05:21] cynosures: what's the difference between `name: to_value` and `:name => to_vlaue` ?
[06:05:36] zenspider: your spelling for one
[06:05:40] zenspider: syntax, normally
[06:05:50] z1haze: I am trying to use mysql 2 to connect to my mysql server and copy mysql database from xenforo into postgres databae for discourse but i keep getting access denied for user .. this is all inside a docker containeir
[06:06:08] z1haze: Ive installed the mysql cli and remotely connected to the server with the same credentials so its not the credentials or ip restrcitions..
[06:06:17] z1haze: there's something wrong with the lib or similar.
[06:07:02] zenspider: don't blame your tools
[06:07:14] z1haze: I dont know what else to blame, we've been troubleshooting this for hours
[06:07:40] z1haze: we can connect with the cli just fine.. cant connect with ruby mysql2, what else should i blame
[06:07:49] ocx: paste.ubuntu.com/12203807 i am not able to install this gem, using rvm 2.2.3 ruby
[06:07:49] z1haze: this migration script possibly
[06:07:56] zenspider: thousands of ppl using that lib every day... just sayin'
[06:08:09] z1haze: care to help then
[06:08:17] zenspider: ocx: try urling again
[06:08:20] ranchodev: has joined #ruby
[06:08:41] zenspider: z1haze: well... nobody in here is psychic (yet). can't help you without seeing some data
[06:08:50] z1haze: what is it youd need?
[06:09:00] z1haze: the error messages give zero information as to what fails
[06:09:26] z1haze: Acesss denied for user blah blah @ blah blah (using password: YES) (Mysql2::Error)
[06:09:34] z1haze: such abig help
[06:09:53] sevenseacat: thats an error directly from MySQL - nothing to do with the library
[06:10:05] iamninja: has joined #ruby
[06:10:14] z1haze: so how can i login with the regular mysql cli
[06:10:16] z1haze: but not this
[06:10:24] z1haze: i suppose it could be this script
[06:10:26] ghr: has joined #ruby
[06:10:27] sevenseacat: wrong password? wrong settings? we dont know
[06:10:33] sevenseacat: we havent seen how youre trying to connect
[06:10:33] z1haze: its not he wrong credentials
[06:10:37] zenspider: backtrace would be a start. reproducing code would help
[06:10:37] z1haze: thats been checked over and over
[06:11:23] zenspider: you're connecting via cli locally or remotely? etc. again, we aren't psychic
[06:11:45] bzb: has joined #ruby
[06:11:56] z1haze: the mysql server is on the parent machine anyways
[06:12:23] z1haze: but i couldnt connect locally because the stpuid thing miss matches the mysql.sock files .. cause the container is debian and the server is rhel
[06:12:32] z1haze: but connecting out tcp solves that part
[06:12:43] z1haze: here's a piece of it
[06:12:51] z1haze: this file is larger so i dont want to give u a bunch of bs
[06:13:00] Ox0dea: ?gist z1haze
[06:13:00] ruboto: z1haze, https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
[06:13:35] solars: has joined #ruby
[06:14:25] ocx: zenspider: http://paste.ubuntu.com/12203819/
[06:15:29] zenspider: ocx: did you look at the mkmf.log file?
[06:15:43] zenspider: anything using hpricot is _ancient_ and suspect
[06:16:23] z1haze: https://gist.github.com/anonymous/9457364750379c1d467c
[06:16:46] iamninja: has joined #ruby
[06:17:30] Eiam: has joined #ruby
[06:19:50] zenspider: I see a looot of code
[06:19:59] z1haze: i told you
[06:20:09] z1haze: i had already pasted the relavant part
[06:20:09] zenspider: still don't see an error, a backtrace, or anything else mentioned
[06:20:20] z1haze: .. i already told you the error
[06:20:55] z1haze: here's the whole trace http://hastebin.com/ovaxunacef.vhdl
[06:21:00] hfp: has joined #ruby
[06:21:30] weemsledeux: has joined #ruby
[06:21:36] hfp_work: has joined #ruby
[06:22:11] christiandsg: has joined #ruby
[06:23:11] roolo: has joined #ruby
[06:23:53] zenspider: so you're dying in initialize, so all that query code is irrelevant
[06:24:05] dionysus69: has joined #ruby
[06:24:14] JaRe_Ax: has joined #ruby
[06:25:27] zenspider: you're not providing port, any reason?
[06:25:38] z1haze: tried it both ways
[06:25:48] z1haze: and i guess because it isnt required
[06:25:51] sevenseacat: because the lib should just know what port you mean. duh.
[06:25:54] z1haze: but i put the port in previously just to see
[06:26:01] sevenseacat: was it the right port? :)
[06:26:03] z1haze: by default.. yes it should if it was smart
[06:26:08] khebbie: has joined #ruby
[06:26:13] z1haze: mysql default is 3306
[06:26:20] z1haze: but yes, it was the right port
[06:26:54] leat: has joined #ruby
[06:27:08] z1haze: its apparently attempting to connect
[06:27:15] z1haze: so or so it seems
[06:27:25] z1haze: too bad this doesnt give meaningful errors :\
[06:28:05] sevenseacat: I think you've been looking at this too long, when 'access denied' is not a meaningful error
[06:28:31] sevenseacat: one of your credentials is wrong. I don't know which.
[06:28:32] z1haze: right.. access denied because it was unable to connect, the credentials were wrong, etc
[06:28:37] z1haze: no it ISNT
[06:28:41] sevenseacat: no, not because it was unable to connect
[06:28:51] z1haze: the credentials are not wrong.
[06:28:56] z1haze: please stop trying to throw the blame on that
[06:29:06] sevenseacat: there's literally nothing else to put the blame on
[06:29:13] sevenseacat: its a single line of code that returns an access denied error
[06:29:15] z1haze: i can login with the cli from here remotely with the exact same copy and paste credentials.
[06:29:38] z1haze: show you want? my credentials?
[06:29:47] sevenseacat: no, show us you connecting with them
[06:29:57] zenspider: the client defaults to port 0 if you don't specify
[06:30:20] z1haze: but somehow it magically connected on 3306.. i dunno how
[06:30:22] zenspider: unless someone down the channel interprets that as "not set" and changes it to the port you mention above, I would start there
[06:30:36] z1haze: either way i have the port set
[06:30:55] zenspider: prove it. get the db logs on the server side and see what it says
[06:31:08] Ox0dea: z1haze: $ ltrace ruby foo.rb 2>&1 | grep rb_connect
[06:31:20] Macaveli: has joined #ruby
[06:31:25] z1haze: what is this?
[06:31:28] TvL2386: hi guys, I'm trying to remember a gem that manages processes on a linux server... Can't find it anymore
[06:31:29] Ox0dea: That'll show you exactly which parameters are ending up in the actual library call.
[06:32:01] z1haze: http://hastebin.com/uxodoyorey.vhdl
[06:32:04] Ox0dea: z1haze: Perhaps you're being pranked with a zero-width space or some such.
[06:32:23] zenspider: that error message is coming from the server, not the client.
[06:32:38] z1haze: im showing you im connecting in the same container
[06:32:41] z1haze: perfectly fine
[06:32:46] z1haze: right after the erro from the script
[06:32:51] z1haze: its not the damn credentials.
[06:33:48] zenspider: for someone who needs help, you're awfully snippy and unappreciative. rude even.
[06:33:51] sevenseacat: except in one place you're connecting via IP, and in another via a hostname
[06:33:52] z1haze: Ox0dea, what is this command you sent?
[06:33:59] z1haze: dude ive been at this for like 10 hours
[06:34:08] zenspider: here I am pouring over C code for a database I don't even use
[06:34:13] TvL2386: nonamepvp.com has address 192.99.23.109
[06:34:32] z1haze: i said im sorry
[06:34:35] TvL2386: 167.114.145.107 != 192.99.23.109
[06:34:36] z1haze: im just ... very irritable
[06:34:38] zenspider: TvL2386: there's a billion of them. god, maybe?
[06:34:39] z1haze: yes it is
[06:34:41] z1haze: its the same box
[06:34:45] z1haze: they are just failovers
[06:34:47] TvL2386: zenspider, exactly
[06:34:52] TvL2386: zenguy_pc, tyvm!
[06:35:11] sevenseacat: configure your things both the same way
[06:35:19] sevenseacat: given permissions in mysql are very dependent on host
[06:35:28] z1haze: i have it granted on wild card for this.
[06:35:33] z1haze: just to be sure
[06:35:39] z1haze: i just showed you that i logged in fine
[06:35:41] sevenseacat: configure your things both the same way.
[06:35:46] sevenseacat: yes, with a hostname, not an IP
[06:35:47] zenspider: z1haze: please go look at the server logs to see what it says about connection attempts
[06:35:58] z1haze: where woudl those be? on centos?
[06:36:03] z1haze: ill find , hang on
[06:36:04] zenspider: and do what Ox0dea said
[06:36:09] Aeyrix: /var/log/mysql/mysql.log
[06:36:26] Aeyrix: or, for your app, it'll be in the logs folder you set up
[06:36:27] zenspider: (which, to answer your question, will show the actual call to the connection)
[06:37:38] TvL2386: z1haze, you didn't prove it works. The hostname resolves to a different IP then the ip shown in the connection error...
[06:37:53] z1haze: ok TvL2386 i will in a second after i pull these logs
[06:38:00] z1haze: which ip did you want me to use?
[06:38:12] sevenseacat: the one you're trying to connect with
[06:38:19] TvL2386: I assume both work, so try both in your ruby and both with `mysql`
[06:38:31] norayr: has joined #ruby
[06:38:37] TvL2386: *assuming both _should_ work
[06:39:01] noch: hey people. i have upgraded mariadb, and now i need to recompile ruby module. how do i do that?
[06:39:08] sdwrage: has joined #ruby
[06:39:12] noch: ruby mysql module.
[06:39:56] Stan: has joined #ruby
[06:39:58] zenspider: noch: no clue what you're talking about. that's rather vague
[06:40:07] zenspider: maybe ask in #mariadb ?
[06:40:15] z1haze: also there's no crap in the log
[06:40:18] Aeyrix: noch: wtf why
[06:40:21] z1haze: nothing relating to the failed connection
[06:40:49] zenspider: z1haze: that could be a log level thing
[06:41:02] z1haze: no there is stuff in there..
[06:41:03] z1haze: just not for that
[06:41:07] dgutierrez1287: has joined #ruby
[06:41:11] zenspider: still could be a log level thing
[06:41:18] z1haze: maybe so, but i dont know how to set
[06:41:23] zenspider: doesn't matter. try the cmdline w/ the 2 ips
[06:41:32] z1haze: i will do it now
[06:41:55] noch: ok i have upgraded my mariadb from versian 5.5 to version 10. I have a ruby software running from user, which does not start because it says 'dependencies.rb:274:in `require': Incorrect MySQL client library version! This gem was compiled for 5.5.37-MariaDB but the client library is 6.1.6. (RuntimeError)'
[06:42:10] Oog: has joined #ruby
[06:43:18] zenspider: noch: sounds like you need to reinstall the mysql client gem you're using?
[06:43:28] noch: yep! how?
[06:43:48] noch: it's not a system installation. it's not installed via package manager.
[06:44:00] Aeyrix: wrong channel
[06:44:13] noch: i don't know how to list existing ruby modules and how to install/reinstall one.
[06:44:37] z1haze: worked with both
[06:46:02] noch: shell i run gem install mysql? or gem install mysql2 ? how do i know which module i already have?
[06:46:21] TvL2386: noch: gem list ^mysql
[06:46:40] z1haze: i gotta get to bed though i can barely stay up
[06:47:00] noch: ok it says mysql2.
[06:47:05] noch: shell i do gem install mysql2 ?
[06:47:11] leat: has joined #ruby
[06:47:26] noch: fetching, building. thank you.
[06:47:45] Ox0dea: TvL2386: Could you say a little more about the gem you're looking for?
[06:48:11] tlolczyk: I have a bunch of strings which end in numbers. I would like to replace the numbers with fixed width versions.
[06:48:17] TvL2386: Ox0dea, "god" was what I meant, but I'm not sure it is what I seek
[06:48:27] Ox0dea: Ha! That would've been my guess.
[06:48:39] noch: again Incorrect MySQL client library version! This gem was compiled for 5.5.37-MariaDB but the client library is 6.1.6. (RuntimeError)
[06:48:44] workmad3: has joined #ruby
[06:48:57] noch: may it be i have to enter some specific directory and only then run it?
[06:49:03] tlolczyk: The hard part is doing it in place.
[06:49:39] Ox0dea: tlolczyk: sub!(/\d+/) { |n| '%05d' % n }
[06:49:59] Ox0dea: /\d+\z/, of course.
[06:51:24] towski_: has joined #ruby
[06:51:39] TvL2386: Ox0dea, I'm looking for some thing that can manage process start-up and tear-down order... Also, one of the processes can be master/slave affecting the other programs...
[06:51:52] tkuchiki: has joined #ruby
[06:51:59] Ox0dea: TvL2386: And you're sure this was a gem?
[06:52:13] Ox0dea: I suppose there are probably thin wrappers around Raft and/or Kubernetes out there.
[06:52:25] TvL2386: Ox0dea, no no... I was just looking for `god`, to check if it would fit my needs
[06:52:31] Ox0dea: Oh, right.
[06:52:43] stardiviner: has joined #ruby
[06:53:42] Ox0dea: TvL2386: Are you using systemd?
[06:53:52] TvL2386: Ox0dea, yeah I do
[06:53:56] TvL2386: Ox0dea, Centos 7
[06:54:08] tlolczyk: ACTION shudders
[06:54:09] TvL2386: Ox0dea, and yes, I got it to work there, but:
[06:54:49] TvL2386: Ox0dea, process K goes from Master to Slave and it interacts then with the other 2 processes to enable/disable something there on failover
[06:55:29] noch: shell i run bin/bundle in my software directory?
[06:55:32] TvL2386: Ox0dea, if the 2 other processes restart for whatever reason, they have lost their state that process K triggered there....
[06:56:03] TvL2386: Ox0dea, I know it's pretty abstract and I'm trying to find a robust solution to this case and I thought that `god` might help me out here
[06:56:18] Ox0dea: TvL2386: So... Paxos for processes instead of processors?
[06:56:34] TvL2386: Ox0dea, Paxos??
[06:56:39] manila90: has joined #ruby
[06:57:07] devoldmx: has joined #ruby
[06:57:29] TvL2386: Ox0dea, https://en.wikipedia.org/wiki/Paxos_(computer_science)
[06:57:33] Ox0dea: Yes, that one.
[06:57:38] aganov: has joined #ruby
[06:57:51] Ox0dea: In essence, you need several disparate processes to "agree" on the state of things.
[06:58:08] charliesome: has joined #ruby
[06:58:11] TvL2386: Ox0dea, that is exactly the situation I'm facing... Paxos for processes indeed :)
[06:58:32] catoblepa: has joined #ruby
[06:58:41] Ox0dea: TvL2386: I'm not sure if such a thing exists, per se, but I've little doubt that systemd provides all the necessary scaffolding.
[06:59:20] bayed: has joined #ruby
[06:59:42] acke: has joined #ruby
[07:01:16] TvL2386: Ox0dea, yeah systemd can facilitate startup & teardown. I'm just not sure on the consensus part
[07:01:55] ta: has joined #ruby
[07:02:41] Mendenhall: has joined #ruby
[07:02:52] tagrudev: has joined #ruby
[07:03:57] Ox0dea: TvL2386: And alas, the controversy surrounding its rise causes a search for "systemd consensus" to bear little fruit. :/
[07:04:03] alphaatom: has joined #ruby
[07:04:36] ecnalyr: has joined #ruby
[07:04:40] krz: has joined #ruby
[07:05:20] TvL2386: Ox0dea, :)
[07:05:33] TvL2386: Ox0dea, thanks anyway! Interesting read on the Paxos wiki :)
[07:05:52] Ox0dea: TvL2386: Sure thing. Paxos is indeed quite interesting.
[07:06:07] Ox0dea: Is it not the case that you could simply write a few PIDs somewhere?
[07:07:04] Ox0dea: Use a text file as a priority queue. :P
[07:07:16] Crimlo: has joined #ruby
[07:08:05] Gnomethrower: has joined #ruby
[07:08:13] Gnomethrower: has joined #ruby
[07:09:07] Gnomethrower: has joined #ruby
[07:09:07] Gnomethrower: has joined #ruby
[07:09:22] DEA7TH: has joined #ruby
[07:09:23] C1V0: has joined #ruby
[07:11:36] michael_mbp: has joined #ruby
[07:11:56] pentanol: has joined #ruby
[07:12:08] rethi: has joined #ruby
[07:12:44] rht: has joined #ruby
[07:12:49] pentanol: hi all, I'm using ubuntu 15.04 and need install rmagick, but can't:
[07:12:51] pentanol: /usr/include/ImageMagick-6/wand/MagickWand.h
[07:13:00] pentanol: C_INCLUDE_PATH=/usr/include/ImageMagick-6/ bundle install --without development test mysql sqlite
[07:13:08] pentanol: Can't install RMagick 0.0.0. Can't find MagickWand.h
[07:14:11] hfp_work: has joined #ruby
[07:14:34] hfp: has joined #ruby
[07:14:38] ferhaty: has joined #ruby
[07:14:49] Ropeney: pentanol: apt-get install imagemagick libmagickwand-dev
[07:15:16] pentanol: Ropeney that installed
[07:15:24] pentanol: i A libmagickwand-6-headers
[07:15:44] pentanol: I found header there /usr/include/ImageMagick-6/wand/MagickWand.h
[07:16:03] pentanol: hor I can point bundler for another includes?
[07:16:03] alphaatom: has joined #ruby
[07:16:32] neanderslob: has joined #ruby
[07:16:46] dented42: has joined #ruby
[07:16:54] Ropeney: pentanol: did you `gem install rmagick` ?
[07:19:40] pentanol: I do gem install rmagick -v '2.13.3'
[07:19:45] pentanol: I need this version
[07:19:57] pentanol: and is say checking for wand/MagickWand.h... no
[07:20:32] jas02: has joined #ruby
[07:21:42] pentanol: why this doesn't work? C_INCLUDE_PATH=/usr/include/ImageMagick-6/ gem install rmagick -v '2.13.3'
[07:22:34] Iskarlar: has joined #ruby
[07:23:01] johnflux: has joined #ruby
[07:26:44] zenspider: OH! Can we play the harry potter game? s/wand/wang/g
[07:26:52] skade: has joined #ruby
[07:27:11] tonios57: has joined #ruby
[07:27:22] noch: has left #ruby: ()
[07:27:50] Ox0dea: > Then, with a sigh, he raised his wang and prodded the silvery substance with its tip.
[07:29:30] yatish27: has joined #ruby
[07:30:26] Ox0dea: >> s = 'pensieve'; s.replace s.chars.shuffle.join until s.include? 'penis'; s
[07:30:27] ruboto: Ox0dea # => "vepenise" (https://eval.in/423111)
[07:31:32] zenspider: should count how many iterations it takes
[07:31:39] Ox0dea: It's random.
[07:31:58] Ox0dea: !xkcd 221
[07:32:07] zenspider: if only all random things finished in 4
[07:33:10] joonty: has joined #ruby
[07:36:21] Oog: has joined #ruby
[07:37:08] stnly: has joined #ruby
[07:39:58] neanderslob_: has joined #ruby
[07:42:09] bluOxigen: has joined #ruby
[07:43:53] xhosae: has joined #ruby
[07:44:41] Hounddog: has joined #ruby
[07:44:46] Pumukel: has joined #ruby
[07:46:00] symm-: has joined #ruby
[07:46:07] duncannz: has joined #ruby
[07:46:33] petricore: has joined #ruby
[07:47:48] leat: has joined #ruby
[07:50:46] mamercad: has joined #ruby
[07:50:51] marr: has joined #ruby
[07:51:13] anisha: has joined #ruby
[07:51:20] Eiam: has joined #ruby
[07:52:50] fedexo: has joined #ruby
[07:55:08] ReK2: has joined #ruby
[07:56:35] UtkarshRay: has joined #ruby
[07:56:38] chussenot: has joined #ruby
[07:58:09] leat: has joined #ruby
[07:58:19] AlexAltea: has joined #ruby
[08:00:03] djbkd_: has joined #ruby
[08:00:06] r0x0rZ: has joined #ruby
[08:00:15] mikecmpbll: has joined #ruby
[08:01:21] krisquigley: has joined #ruby
[08:01:46] Guest32: has joined #ruby
[08:03:08] blackmesa: has joined #ruby
[08:03:23] mutuma: has joined #ruby
[08:03:51] mutuma: has left #ruby: ()
[08:05:54] Guest32: has left #ruby: ()
[08:05:59] Guest32: has joined #ruby
[08:06:03] jgt: has joined #ruby
[08:07:21] charliesome: has joined #ruby
[08:08:20] esposito: has joined #ruby
[08:08:46] leat: has joined #ruby
[08:10:32] charliesome: has joined #ruby
[08:10:46] rdark: has joined #ruby
[08:12:46] awk: hi, i'm a really ruby noob.. i've tried all possible syntax to send mail to multple recipients .. I keep getting illegal address from the SMTP server, i'm using sendmail="address@blah.com; address2@blah.com"
[08:13:58] adaedra: ?context awk
[08:13:58] ruboto: awk, Please add more context to your question, what are you doing, why are you doing it, which libraries are involved. Post some code to gist if it clarifies your question.
[08:16:36] agent_white: has joined #ruby
[08:18:36] michael_mbp: has joined #ruby
[08:18:41] roolo: has joined #ruby
[08:19:13] leat: has joined #ruby
[08:20:00] codecop: has joined #ruby
[08:21:45] joonty: has joined #ruby
[08:21:59] Zort0n: has joined #ruby
[08:22:54] Pumukel: has joined #ruby
[08:23:16] christiandsg: has joined #ruby
[08:25:42] atmosx: adaedra: what does awk stand for?
[08:25:47] atmosx: it's the nickname
[08:26:02] adaedra: good morning atmosx
[08:26:05] atmosx: awk: what gem do you use, is that rails mailer or something else?
[08:26:11] atmosx: morning adaedra :-)
[08:30:02] ghr: has joined #ruby
[08:32:07] awk: atmosx: net/smtp .. https://gist.github.com/tripolitrax/0cdbb1ef089176713fbf
[08:32:36] awk: All i'm trying to do is send to two recipients, nothing else.. each way I try the SMTP tells me its illegal, as it's "grouping them" together..
[08:32:58] Oog: has joined #ruby
[08:35:11] techsethi: has joined #ruby
[08:35:16] senayar: has joined #ruby
[08:37:21] workmad3: has joined #ruby
[08:39:50] arup_r: has joined #ruby
[08:40:01] platzhirsch: has joined #ruby
[08:43:45] sdfgsdfg: has joined #ruby
[08:44:03] dumdedum: has joined #ruby
[08:44:42] subshad: has joined #ruby
[08:44:46] Zai00: has joined #ruby
[08:46:08] subshad: has left #ruby: ()
[08:46:50] atmosx: awk: try passing an array
[08:47:22] awk: to the variable supportMail ?
[08:47:51] awk: or the To:
[08:48:08] atmosx: anywhere, the way this method is... give me 2 minutes.
[08:49:36] charliesome: has joined #ruby
[08:50:16] Zai00: has joined #ruby
[08:50:51] awk: atmosx: I have tried to parse and array I get this warning: Illegal address syntax from localhost[127.0.0.1] in RCPT command: <address1, address2> from the mail log
[08:51:09] sonOfRa: has joined #ruby
[08:52:04] atmosx: awk: so if you use ["mail@address1", "mail@address2"] you get an error?
[08:52:06] Rinzlit1: has joined #ruby
[08:52:37] pawnbox: has joined #ruby
[08:53:26] atmosx: weird, http://www.tutorialspoint.com/ruby/ruby_sending_email.htm here seems fine.
[08:53:45] atmosx: awk: works for 1 address? If yes... just amke a list and run the method for any item on the list/array/hash
[08:55:09] awk: let me use a list then, thanks
[08:55:20] [k-: has joined #ruby
[08:56:11] Zai00: has joined #ruby
[08:57:53] devoldmx: has joined #ruby
[08:58:01] sonOfRa: has joined #ruby
[08:58:33] pawnbox: has joined #ruby
[08:59:28] leat: has joined #ruby
[09:00:07] Zai00: has joined #ruby
[09:00:54] charliesome: has joined #ruby
[09:01:07] rdark: has joined #ruby
[09:02:17] platzhirsch: has joined #ruby
[09:05:50] zenspider: any stronger C devs? I've got a slightly obscure case and I'm getting foggy
[09:06:11] jhass: isn't there ##c or so?
[09:06:12] zenspider: error: invalid application of 'sizeof' to an incomplete type 'TTF_Font' (aka 'struct _TTF_Font'): return p ? sizeof(*((TTF_Font*)p)) : 0;
[09:06:31] zenspider: its _kinda_ sorta related to ruby :P
[09:06:54] Zai00: has joined #ruby
[09:08:00] startupality: has joined #ruby
[09:08:02] Oog: has joined #ruby
[09:08:07] dgutierrez1287: has joined #ruby
[09:08:43] jimms: has joined #ruby
[09:09:28] astrobun_: has joined #ruby
[09:11:27] cornerma1: has joined #ruby
[09:11:36] khebbie: has joined #ruby
[09:13:25] dhjondoh: has joined #ruby
[09:13:34] voker57: has joined #ruby
[09:14:25] GnuYawk: has joined #ruby
[09:16:38] Zort0n: has joined #ruby
[09:17:38] Ox0dea: zenspider: Seems you're just not including the header properly?
[09:18:04] leafybasil: has joined #ruby
[09:18:11] Zort0n: has joined #ruby
[09:19:12] clyfe: has joined #ruby
[09:19:20] clyfe: has left #ruby: ()
[09:21:41] Ox0dea: Or at all, I suppose. <SDL_ttf.h> is the one you want.
[09:22:08] Diabolik: with this tool https://github.com/askl56/calc
[09:22:36] Diabolik: how would i have different outputs for whether its run from an executable or from the normal interface
[09:22:42] rushed: has joined #ruby
[09:22:50] zenspider: Ox0dea: if I wasn't including it, I couldn't use the font code at all...
[09:23:14] Ox0dea: Diabolik: Check whether $0 == __FILE__, perhaps?
[09:23:21] Ox0dea: zenspider: Yes, that's true. :/
[09:23:40] Zai00: has joined #ruby
[09:24:40] Diabolik: Ox0dea can you link me to the documentation for that?
[09:24:56] Ox0dea: ?quickref Diabolik
[09:24:56] ruboto: Diabolik, http://www.zenspider.com/Languages/Ruby/QuickRef.html
[09:25:35] Eiam: has joined #ruby
[09:26:13] r4sp: has joined #ruby
[09:27:15] r4sp: Vim users: Best vim plugin for ruby syntax errors highlighting? thanks!
[09:27:36] yorickpeterse: https://github.com/scrooloose/syntastic
[09:28:03] Ox0dea: r4sp: Consider just not writing invalid Ruby.
[09:28:14] jhass: oh, Ox0dea is in troll mode
[09:28:27] r4sp: yes it looks like... :(
[09:28:35] Zai00: has joined #ruby
[09:28:48] zenspider: or using emacs... since it ships with the equivalent. :P
[09:28:54] r4sp: yorickpeterse: thanks :)
[09:29:05] zenspider: tho, really, you should use my enh-ruby-mode instead :P
[09:29:30] yorickpeterse: emacs also has a similar extension, flycheck or something like that
[09:29:32] r4sp: sorry... I'm used to vim and i shouldnt change we're working with a lot of servers and none has emacs...
[09:29:37] yorickpeterse: emacs also comes with free carpal tunnel
[09:29:51] leat: has joined #ruby
[09:30:21] Diabolik: Ox0dea so that goes in the exec file?
[09:30:45] zenspider: r4sp: why do your servers need emacs on them?
[09:30:55] ndrei: has joined #ruby
[09:32:19] livathinos: has joined #ruby
[09:32:20] arup_r: has joined #ruby
[09:32:28] senayar: has joined #ruby
[09:32:53] r4sp: zenspider: they dont
[09:32:59] zenspider: turns out there's a total cunt in ##c so that's a waste of time...
[09:33:20] zenspider: r4sp: exactly. so no reason not to switch to emacs!
[09:33:32] r4sp: thats right :)
[09:33:38] r4sp: but i like vim
[09:34:14] sevenseacat: zenspider: watch your language please :)
[09:34:46] Ox0dea: zenspider: There doesn't seem to be a way to reliably obtain the size of an opaque type. :/
[09:35:59] zenspider: certainly seems that way. :(
[09:36:15] zenspider: not that it _really_ matters, but it'd be nice
[09:36:57] hfp_work: has joined #ruby
[09:37:20] hfp: has joined #ruby
[09:37:44] bruno-: has joined #ruby
[09:38:36] einarj: has joined #ruby
[09:39:09] bankair: r4sp: vim likes you as well
[09:39:10] ndrei: has joined #ruby
[09:41:25] ekleog: has joined #ruby
[09:41:47] alex88: has joined #ruby
[09:43:00] atmosx: r4sp: emacs is on the dark side.
[09:43:36] bnizzle: has joined #ruby
[09:43:56] Ox0dea: zenspider: There are several tools for mucking with object files to glean size information, but my headers have been stripped. :/
[09:44:12] Ox0dea: s/headers/libraries/
[09:44:58] zenspider: I had some used for objc ... I don't know of any for plain C
[09:50:41] Ox0dea: http://linux.die.net/man/1/pahole
[09:51:55] Ox0dea: "Pahole" apparently means "fern", but the pun is still lost on me.
[09:52:09] zenspider: my god. ##c is a total shit show. I thought #perl was arrogantly distasteful. I was wrong.
[09:53:11] zenspider: for as much shit as we get for having and upholding rules in order to be inclusive... it makes a world of difference
[09:53:35] zenspider: #emacs is kinda unhelpful, but mostly because it's a cyclone of chaos in there w/ a bunch of people just chatting. periodically you get help
[09:53:44] zenspider: but ##c is simply abusive
[09:53:52] zenspider: I think I need a shower
[09:53:56] ndrei: has joined #ruby
[09:55:39] Ox0dea: You must've met Zhivago.
[09:56:04] zenspider: that's the one
[09:56:12] zenspider: and associated clique
[09:57:32] yfeldblum: has joined #ruby
[09:58:09] mamercad: has joined #ruby
[09:58:39] devoldmx: has joined #ruby
[09:58:51] renderful: has joined #ruby
[09:59:02] garethrees: has joined #ruby
[10:00:08] araujo: has joined #ruby
[10:00:25] leat: has joined #ruby
[10:00:41] GriffinHeart: has joined #ruby
[10:06:42] roolo: has joined #ruby
[10:06:48] pandaant: has joined #ruby
[10:07:10] ferhaty: has joined #ruby
[10:08:44] bruno-: has joined #ruby
[10:10:34] leat: has joined #ruby
[10:11:12] stamina: has joined #ruby
[10:11:34] jeadre: has joined #ruby
[10:13:29] c0m0: has joined #ruby
[10:13:32] decoponio: has joined #ruby
[10:15:37] benlovell: has joined #ruby
[10:15:57] ChoiKyuSang: has joined #ruby
[10:16:56] borkdude: has joined #ruby
[10:17:35] varesa: has joined #ruby
[10:17:52] rmrrn: has joined #ruby
[10:18:53] Macaveli: has joined #ruby
[10:19:09] Feyn: has joined #ruby
[10:20:36] rickmasta: has joined #ruby
[10:20:58] leat: has joined #ruby
[10:22:25] chipotle: has joined #ruby
[10:23:05] khebbie: has joined #ruby
[10:23:19] pyon: has joined #ruby
[10:23:20] workmad3: has joined #ruby
[10:24:16] mandarinkin: has joined #ruby
[10:26:02] christiandsg: has joined #ruby
[10:27:54] mhib: has joined #ruby
[10:28:09] glen: has joined #ruby
[10:28:30] glen: hi, does ruby have shell's equivalent of stripping leading spaces: <<-EOF. i.e this script does not strip: http://sprunge.us/JYgY
[10:29:28] zenspider: glen: you mean does the heredoc itself strip? no.
[10:29:45] zenspider: but you can call strip on it or do whatever manipulation you'd like
[10:29:58] zenspider: eg: s = <<-EOF.strip
[10:31:01] leat: has joined #ruby
[10:31:07] jhass: I think the term to google was "ruby unindenting heredoc" for some nice snippets
[10:31:14] jhass: avdi or so had a blog on it?
[10:31:42] jhass: ah, here we go https://gist.github.com/avdi/1b85c8673d72635cd967
[10:32:10] acke: has joined #ruby
[10:32:18] jhass: (read the comments)
[10:37:23] glennt: has joined #ruby
[10:38:52] platzhirsch: has left #ruby: ()
[10:39:06] Ox0dea: jhass: It was a Tapas, not a blog post: http://www.rubytapas.com/episodes/249-Unindent
[10:39:31] jhass: ah right, glen watch this ^
[10:40:50] Motoservo: has joined #ruby
[10:41:18] leat: has joined #ruby
[10:41:22] zenspider: missed a good opportunity for min_by
[10:41:30] zenspider: indent_str = scan(/^[\t ]*(?=\S)/).min_by(&:length)
[10:41:43] zenspider: makes the code a LOT more clear and only a couple perentage points slower
[10:41:52] rodfersou: has joined #ruby
[10:42:26] Ox0dea: Isn't `[\t ]` just `\s` in this case?
[10:42:51] zenspider: but... vertical tabs!
[10:43:04] Ox0dea: And carriage returns!
[10:43:10] Ox0dea: Form feeds too!
[10:44:03] zenspider: now a one liner: gsub(/^#{scan(/^[\t ]*(?=\S)/).min_by(&:length)}/, "")
[10:44:06] jhass: it should be just / */, stop indenting your stuff with tabs
[10:45:08] zenspider: I agree that it probably shouldn't match tabs, since it doesn't treat them correctly
[10:46:24] apeiros: I think I used ^(?:\t+| +|)
[10:46:38] apeiros: i.e.: DONT MIX TABS & SPACES!!!!!1!
[10:47:31] zenspider: http://www.emacswiki.org/emacs/SmartTabs
[10:47:58] DoubleMalt: has joined #ruby
[10:48:56] apeiros: totally. but: ruby source. ugh. :<
[10:49:10] zenspider: ruby c source? the worst
[10:49:36] apeiros: I mean, IF you use tabs, you do it because people can set it to any width they enjoy
[10:49:50] apeiros: but like that? *grah*
[10:49:50] zenspider: any project crazy enough that they have to ship with their own emacs cc-mode style... not good
[10:49:59] zenspider: I gave up trying to change that one
[10:50:02] zenspider: pick your battles
[10:50:23] apeiros: I have enough insanity sources in my life already :D
[10:52:19] leat: has joined #ruby
[10:53:22] acke: has joined #ruby
[10:53:54] northfurr: has joined #ruby
[10:53:54] Zai00: has joined #ruby
[10:53:57] r4sp: has left #ruby: ()
[10:56:01] revoohc: has joined #ruby
[10:58:37] GnuYawk: has joined #ruby
[10:59:42] Eiam: has joined #ruby
[11:00:14] molawson: has joined #ruby
[11:03:33] chinmay_dd: has joined #ruby
[11:05:04] manila90: has joined #ruby
[11:05:44] yatish27: has joined #ruby
[11:06:32] GriffinHeart: has joined #ruby
[11:06:54] krz: has joined #ruby
[11:08:46] Ropeney: has joined #ruby
[11:08:54] leat: has joined #ruby
[11:09:36] lkba: has joined #ruby
[11:10:47] vali: has joined #ruby
[11:11:10] glen: zenspider: eof.strip would strip only leading trailing, not on each line afaik
[11:11:28] chipotle: has joined #ruby
[11:11:40] jhass: glen: good, now also read all the other answers
[11:11:49] zenspider: glen: have you paid attention to anything that was said in the last 50 minutes?
[11:11:58] jhass: obviously not
[11:11:58] glen: just returned from (lunch)
[11:12:15] glen: i can still comment in order what was said...
[11:12:17] leat: has joined #ruby
[11:12:36] zenspider: ACTION sighs
[11:12:36] jhass: yeah, after reading
[11:12:41] glen: but really i wanted to know if there's in-core syntax for that
[11:12:55] zenspider: read more. type less.
[11:13:22] banister: has joined #ruby
[11:13:39] glen: seems not. everybody suggests some subst solution
[11:14:54] bronson: has joined #ruby
[11:15:03] zenspider: seems not... also made obvious by the very first response you got.
[11:16:24] glen: i wonder why, because <<-FOO looks like one that should, in shell script <<EOF means no indent strip, <<'EOF' same but no variable interpolation, so <<-EOF strips, and <<EOF not
[11:16:43] glen: acutally don't know if <<EOF and <<"EOF" have difference in shell. afaik not
[11:16:48] jhass: I'm glad ruby isn't shellscript though
[11:17:02] glen: but - is not special in ruby right?
[11:17:14] glen: i,e <<EOF and <<-EOF behave the same?
[11:17:21] Feyn: has joined #ruby
[11:17:40] glen: ah, <<EOF is syntax error
[11:17:40] zenspider: ?quickref glen
[11:17:41] ruboto: glen, http://www.zenspider.com/Languages/Ruby/QuickRef.html
[11:17:56] thbar: has joined #ruby
[11:18:09] glen: looks like whoever implemented ruby syntax misread shell script syntax :D
[11:18:17] sdothum: has joined #ruby
[11:18:22] glen: or did that in purpose, to make ruby different :P
[11:19:04] glen: ok, -EOF allows closing EOF being indented. so there's difference in ruby with <<EOF and <<-EOF
[11:20:22] glen: so. i'll go with this: puts <<-EOF.gsub(/^\s+/, '')
[11:20:48] dhjondoh: has joined #ruby
[11:23:24] vali: has left #ruby: ()
[11:23:55] vali: has joined #ruby
[11:25:05] blackmesa: has joined #ruby
[11:26:33] skade: has joined #ruby
[11:27:58] vali: I have a problem regarding an output (cassandra) that I'm using in logstash. The problem is related to a timestamp that I'm trying to insert into cassandra. More exactly stuff like 2015-08-27T13:03:50.400Z fails to be parsed as a timestamp and gets set to "1970-01-01 00:00:00"
[11:28:23] vali: if I look at the code, the timestamp is parsed with Cassandra::Types::Timestamp.new(Time::parse("1970-01-01 00:00:00"))
[11:28:36] vali: and ideas on what I could do to make it work as expected ?
[11:28:54] vali: if I do a manual insert into cassandra, it works as expected
[11:29:58] riotjones: has joined #ruby
[11:30:26] zenspider: iso8604 should parse great. more importantly, don't use Time.parse if you know the format as it is terribly terribly slow
[11:30:40] vali: zenspider: what could I use ?
[11:30:41] jhass: >> require "time"; Time.iso8601("2015-08-27T13:03:50.400Z")
[11:30:42] ruboto: jhass # => 2015-08-27 13:03:50 UTC (https://eval.in/423318)
[11:30:54] zenspider: oops. I got the number wrong :P
[11:30:58] dhjondoh: has joined #ruby
[11:31:04] msnyon: has joined #ruby
[11:31:06] jhass: no worries, that's normal
[11:31:27] zenspider: in general, use Time.strptime
[11:31:36] zenspider: but this is a standard format, so it has a method
[11:31:52] zenspider: ACTION goes to bed
[11:32:11] syath: has joined #ruby
[11:32:13] vali: jhass: I'm not sure on how should I modify this line -> Cassandra::Types::Timestamp.new(Time::parse("1970-01-01 00:00:00"))
[11:33:04] vali: zenspider: thank for the info, still looking on how to update that line of code to match ok
[11:34:11] surs: has joined #ruby
[11:34:25] jhass: vali: guess a few things and I say stop if you hit the right one
[11:34:28] surs: has joined #ruby
[11:34:42] vali: jhass: fair enough :)
[11:35:03] dgutierrez1287: has joined #ruby
[11:35:04] ndrei: has joined #ruby
[11:36:06] leat: has joined #ruby
[11:36:57] vali: One guess would be : Cassandra::Types::Timestamp.new(Time.iso8601(msg[key]))
[11:37:23] codecodecode123: has joined #ruby
[11:37:26] ldnunes: has joined #ruby
[11:37:36] allcentury: has joined #ruby
[11:37:46] vali: perfect,I'll try to build the gem...
[11:37:51] banister: has joined #ruby
[11:38:30] jgt: has joined #ruby
[11:38:47] c0ncealed: has joined #ruby
[11:38:56] glen: has left #ruby: ()
[11:39:27] jhass: see, didn't even need anyone to make the change
[11:40:09] vali: well...I still needed you to point to correct function :)
[11:40:18] jhass: sure, not what I meant
[11:40:21] elepedus: has joined #ruby
[11:40:51] vali: but yea...the monkey work of changing to code was done by me :)
[11:41:16] chipotle: has joined #ruby
[11:41:40] codecodecode123: Hi, can I get some help? This script (https://gist.github.com/nolcay/8fbe24e602c913616061) is a script which is supposed to find regex in strings, but it gives me an enumerator.
[11:41:45] jhass: my point is trying your first best guess is what we programmers do all the time because it usually saves time for everybody involved to just quickly try out something ;)
[11:43:05] dimasg: has joined #ruby
[11:43:10] jhass: -qo $~a jhass
[11:43:17] solocshaw: has joined #ruby
[11:44:22] dgutierrez1287: has joined #ruby
[11:44:57] jeadre: has joined #ruby
[11:45:05] leat: has joined #ruby
[11:45:25] vali: jhass: hmmm, ok I have compiled the gem and the code is running but everything gets set to the default value ...I'll make a gist...maybe you can point out what am I doing wrong..
[11:46:27] pyon: has joined #ruby
[11:46:50] vali: jhass: https://gist.github.com/valentinul/ee0b12317ef4bc174f8b
[11:46:59] apeiros: codecodecode123: in `foo bar do ???` the do/end block belongs to foo, not bar
[11:47:16] apeiros: so `puts str.gsub() do` the block belongs to puts, not gsub.
[11:47:23] jhass: ?gist_usage vali
[11:47:24] ruboto: vali, To properly use gist, please enable syntax highlighting, either by choosing the language manually or by entering a proper filename. If you post multiple things, separate them into multiple files. If you have a Github account, please update your gist with new information instead of posting a new one.
[11:47:39] codecodecode123: let me try that
[11:48:35] codecodecode123: thanks apeiros, it worked
[11:48:49] codecodecode123: can you help me with a few othe bugs too?
[11:49:37] jhass: vali: now so I don't have to second guess 300loc of maybe subtle mistakes calling klocs of library code I'm unfamiliar with abstracting systems I'm unfamiliar with, please describe the behavior you expect, you see, how you produce it and your best guess as to where the bug is
[11:49:50] krz: has joined #ruby
[11:50:34] vali: jhass: the updated file, https://gist.github.com/valentinul/168e95442ba5a9560792
[11:50:41] jhass: you know, you can edit gists ;)
[11:50:53] vali: jhass: yea, I failed , and recreated it...
[11:51:16] vali: I'll explain the issue and expected behavior in a min
[11:51:55] jhass: " rescue Exception => e" though I can say already that is a really bad idea
[11:52:18] codecodecode123: apeiros: can you help me with other bugs too?
[11:52:44] vali: The issue is that the timestamp that I'm sending is not working for some reason and logstash/ruby defaults to the default value that I've set.
[11:52:58] jhass: too vague
[11:53:13] stardiviner: has joined #ruby
[11:53:17] leat: has joined #ruby
[11:53:24] jhass: we need to determine your assumptions about your code and how to verify them
[11:53:27] vali: The exact error thrown from ruby is the following -> Cannot convert `timestamps` value (`2015-08-27 13:40:09 UTC`) to `timestamp` type, set to `2015-01-01 01:01:01 UTC`", :exception=>#<TypeError: can't convert Time into String>
[11:53:57] jhass: now that's more interesting isn't it? we already have a Time
[11:54:13] jhass: so some String -> Time transformation already happened
[11:54:21] jhass: where's the backtrace pointing at?
[11:54:22] vali: seems like it
[11:54:48] vali: jhass: I have updated the gist
[11:54:51] roolo: has joined #ruby
[11:55:00] benlovell: has joined #ruby
[11:55:03] vali: 206:in `convert2cassandra_format!'"
[11:55:08] vali: I think thats the line
[11:55:27] vali: or line=>"267", :method=>"convert2cassandra_format!"}
[11:55:29] vali: not sure..
[11:55:47] jhass: looks like Cassandra::Types::Timestamp.new expects a string, not a Time?
[11:56:15] jhass: "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-output-cassandra-0.1.1/lib/logstash/outputs/cassandra.rb:214:in `convert2cassandra_format!'"
[11:57:23] GnuYawk: has joined #ruby
[11:57:39] jhass: where's Cassandra::Types::Timestamp documented?
[11:58:28] vali: http://www.rubydoc.info/gems/cassandra-driver/2.1.3/Cassandra/Types/Timestamp
[11:59:25] devoldmx: has joined #ruby
[11:59:31] jhass: looks like that's supposed to turn a String into a Time in the first place?
[11:59:47] jhass: that is do the right conversion for us?
[12:00:01] yatish27: has joined #ruby
[12:01:15] vali: hmmm, so it should be transformed to string but nevertheless it's complaining that it cannot be converted?
[12:02:05] jhass: vali: mmh, actually since the backtrace points to a commented line inside your gist, I have some doubts the code you've shown is identical to the code producing that error
[12:02:17] vali: jhass: it's the same
[12:02:30] jhass: it can't be, backtraces don't mention commented lines
[12:02:42] vali: hmm, let me uninstall the gem
[12:02:43] vali: and reinstall
[12:03:30] jhass: vali: you shouldn't need to, with plain ruby just add -I/path/to/your/gems/lib to the invocation or with bundler use the path: option
[12:04:10] leat: has joined #ruby
[12:04:21] porfa: has joined #ruby
[12:04:29] porfa: so how's that snow.js ?
[12:05:03] jhass: sounds offtopic?
[12:06:16] porfa: hahaha it's that just yesterday i was cursing java and that it was so awesome to make lil snow fall in your browser and all of the sudden everyone was going down memory lane, that's just it jhass
[12:06:39] freerobby: has joined #ruby
[12:07:11] porfa: i need some advice.. i have ruby 2.2.3 and no rvm.. i want to try RVM because I'm having some problems installing a particular gem, so.. do i keep my system ruby, or can i remove it completely and just use RVM ?
[12:07:29] jhass: keep the system ruby
[12:07:37] vali: jhass: recompiled, reinstall, the code is the one that I added/modified. I have updated the gist
[12:07:37] jhass: just make sure to make a user install of RVM
[12:08:05] atmosx: Porfa: out of curiosity what system is that?
[12:08:42] porfa: ubuntu.. please don't throw rocks at me
[12:08:47] jhass: vali: uh, since when do backtraces go through when's?
[12:09:00] jhass: 213 can't really be either with that code
[12:09:25] porfa: atmosx: but i have a virtual host i can get any distro i want, actually that would be f*** nice to have a virtual machine just for my ruby and sinatra's
[12:09:34] roolo: has joined #ruby
[12:09:47] porfa: any recommendations? i just need terminal, don't want any graphic server
[12:09:55] vali: jhass: made an update again with more log. Probably there is also stuff from logstash in there.
[12:10:01] jhass: vali: anyway, did you try passing the plain string yet, not doing any conversion yourself?
[12:10:43] vali: jhass: no, haven't tried anything other than using that iso8601 on that value
[12:12:09] arup_r: I want to do PUT not POST .. where to change in this Curl ? https://ariejan.net/2010/06/07/uploading-files-with-curl/
[12:12:31] jhass: arup_r: did you read the manpage yet?
[12:12:52] shadeslayer: has joined #ruby
[12:13:11] arup_r: jhass: No I just Googled.. and none worked till now.. So thinking to manage this current one..
[12:13:16] arup_r: let me do man
[12:14:59] rideh: has joined #ruby
[12:15:08] bigredboots: has joined #ruby
[12:15:13] sdwrage: has joined #ruby
[12:15:34] vali: jhass: after removing the iso, and just inserting it plain, the timestamp gets inserted as it should 2015-08-27 15:43:41+0200
[12:16:01] vali: it's dirty and no parsing/verification is being done but it will suffice until I know more on how to fix it the right way
[12:16:02] jhass: vali: see, just reading the error message is great, isn't it!
[12:16:27] jhass: vali: and please really really reconsider rescuing Exception
[12:16:39] jhass: vali: at least lower it to the default (specifying none, RuntimeError)
[12:16:50] jhass: vali: but yet better list the exceptions you expect specifically
[12:16:57] jhass: you only hide errors that way
[12:16:58] senayar: has joined #ruby
[12:17:21] vali: jhass: I will open an issue with the guy that did the output and see if he can help me also with this.
[12:17:31] vali: I will also suggest him the stuff that you mentioned
[12:17:32] sankaber: has joined #ruby
[12:17:35] vali: thank you for the help!
[12:17:43] shadeslayer: has joined #ruby
[12:17:45] vali: greatly appreciate it.
[12:18:05] yatish27: has joined #ruby
[12:18:23] arup_r: jhass: figured out
[12:18:31] arup_r: thanks -X PUT
[12:18:37] jhass: reading docs is great isn't it
[12:18:52] jhass: doesn't need to bother people with offtopic questions
[12:19:32] zerolith: has joined #ruby
[12:20:26] blackmesa: has joined #ruby
[12:20:42] zerolith: has left #ruby: ()
[12:21:30] krz: has joined #ruby
[12:21:38] araujo_: has joined #ruby
[12:25:03] Scroff: has joined #ruby
[12:25:31] leat: has joined #ruby
[12:25:37] rfmind_: has joined #ruby
[12:25:59] rbennacer: has joined #ruby
[12:26:11] porfa: (should i see the teamthreehouse ruby tutorial videos? because the bald guy that appears in the beginning scared the hell out of me with that kanye west smile)
[12:27:37] dimasg: has joined #ruby
[12:27:57] Zai00: has joined #ruby
[12:28:46] fmcgeough: has joined #ruby
[12:28:46] christiandsg: has joined #ruby
[12:29:16] ecnalyr: has joined #ruby
[12:30:00] porfa: 8sorry about that, i though that was free??? damn)
[12:33:24] Eiam: has joined #ruby
[12:34:04] leat: has joined #ruby
[12:37:09] mutuma: has joined #ruby
[12:38:01] codenapper: has joined #ruby
[12:40:20] Gribo: has joined #ruby
[12:40:39] porfa: i've been doing some simple ruby scripts, but i want to get on and learn this for real, i want to dedicate my whole time to this because I'm really enjoying the possibilities and what i just read now about rails. I'm wondering if Beginning Ruby by Peter Cooper is a good book to start from zero
[12:41:00] [k-: read many books
[12:41:17] porfa: yeah, but i need to start with one, i have no previous programing skills at all
[12:41:28] porfa: i can't read several books at the same time
[12:41:37] dhjondoh: has joined #ruby
[12:41:40] [k-: who says you cant
[12:41:52] [k-: they usually start the same and all that
[12:41:54] porfa: I, because i know myself better than you :)
[12:42:08] porfa: but i i can't buy several books at the same time..
[12:43:33] System42: has joined #ruby
[12:43:38] [k-: http://ruby-community.com/pages/links
[12:43:43] ruboto: You can find a list of recommended books at http://ruby-community.com/pages/links
[12:43:49] jhass: Porfa: Chris Pine's Learn to program is generally recommended as entry level
[12:44:27] leat: has joined #ruby
[12:45:34] System42: has left #ruby: ()
[12:46:45] jiada: has joined #ruby
[12:46:56] victortyau: has joined #ruby
[12:48:05] maloik: Did we have anyone here on the rubygems team? Or someone who's aware of the rubygems-mirror project?
[12:48:08] maloik: I have a quick question
[12:48:46] maloik: We're doing a rubycamp and it turns out we won't have an internet connection, so I was thinking of getting a VM with a rubygems mirror... but I have no idea what kind of size I'll need to expect that to be
[12:48:55] esparta90: has joined #ruby
[12:49:21] maloik: The rubycamp is tomorrow already, so we'd have to get on it fast :-)
[12:50:55] codenapper: has joined #ruby
[12:51:15] freerobby: has joined #ruby
[12:51:45] maloik: A rough idea on the feasibility would be fine, I have no clue about if I should be even looking into this or not with only a day to go
[12:52:37] zerolith: has joined #ruby
[12:52:49] pawnbox: has joined #ruby
[12:52:55] dstarh: has joined #ruby
[12:55:24] d10n-work: has joined #ruby
[12:57:17] benlovell: has joined #ruby
[12:57:48] dhjondoh: has joined #ruby
[12:58:35] poli: has joined #ruby
[13:00:11] devoldmx: has joined #ruby
[13:01:55] ddubs: has joined #ruby
[13:02:03] ddubs: hey peoples
[13:02:20] jgt: has joined #ruby
[13:02:26] ddubs: having an issue where im trying to spawn and execute a command
[13:02:54] pyon: has joined #ruby
[13:02:56] meph: has joined #ruby
[13:03:36] ddubs: and the command i'm executing also tries to do some subprocess stuff (example: Process.spawn(`echo $(facter some_fact_here)`)
[13:05:56] [k-: use Process.spawn("echo...") instead if `
[13:06:56] ddubs: o whoops i actually am passing just a string - the string im passing actually goes through a little ERB before being passed to spawn
[13:09:30] amystephen: has joined #ruby
[13:10:16] codenapper: has joined #ruby
[13:10:25] kristofferR: has joined #ruby
[13:13:52] JDiPierro: has joined #ruby
[13:14:45] enebo: has joined #ruby
[13:15:22] dhjondoh: has joined #ruby
[13:16:51] sevenseacat: has joined #ruby
[13:17:40] whippythellama: has joined #ruby
[13:17:41] Scroff: has joined #ruby
[13:17:47] dblessing: has joined #ruby
[13:19:05] tvw: has joined #ruby
[13:19:45] malconis: has joined #ruby
[13:19:47] umgrosscol: has joined #ruby
[13:20:28] malconis: has joined #ruby
[13:21:18] nettoweb: has joined #ruby
[13:23:56] diegoaguilar: has joined #ruby
[13:24:14] devdazed: has joined #ruby
[13:28:24] dimasg: has joined #ruby
[13:29:04] bmn: has joined #ruby
[13:29:45] NeverDie: has joined #ruby
[13:30:06] leat: has joined #ruby
[13:30:39] ngw: has joined #ruby
[13:31:36] ghr: has joined #ruby
[13:31:44] casadei: has joined #ruby
[13:31:55] hmnhf: has joined #ruby
[13:31:57] ngw: what's the preferred gem for consuming an http stream?
[13:35:11] benlovell: has joined #ruby
[13:35:32] Cust0sLim3n: has joined #ruby
[13:36:01] riotjones: has joined #ruby
[13:36:10] nofxx: has joined #ruby
[13:36:10] nofxx: has joined #ruby
[13:36:32] leat: has joined #ruby
[13:39:37] hinbody: has joined #ruby
[13:42:10] hashrocket: has joined #ruby
[13:42:14] JEG2: has joined #ruby
[13:42:28] Vile`: has joined #ruby
[13:42:50] kristoff_: has joined #ruby
[13:43:44] hmnhf: Hi everyone, is there a better solution for unescaping special characters?
[13:43:45] hmnhf: http://stackoverflow.com/questions/9683985/unescaping-special-character-sequences-in-ruby-strings
[13:44:06] ta: has joined #ruby
[13:44:13] havenwood: has joined #ruby
[13:44:19] JDiPierro: has joined #ruby
[13:44:27] jhass: hmnhf: where's that data coming from for you?
[13:44:55] jhass: who manages to fuck up and write "\\n" instead of "\n" to it?
[13:44:56] saddad: has joined #ruby
[13:45:03] hmnhf: jhass: It's one of the rails request params.
[13:45:55] jhass: let's ask differently, how did you verify you need to unescape anything?
[13:46:23] kinduff: has joined #ruby
[13:47:23] dopamean_: has joined #ruby
[13:48:08] Timba-as: has joined #ruby
[13:48:19] r_baron: has joined #ruby
[13:48:26] jeffreylevesque: has joined #ruby
[13:48:33] jeffreylevesque: i have 1.8, is that old?
[13:48:43] jeffreylevesque: how do i update?
[13:48:47] wasamasa: we're on 2.2.3 now
[13:48:50] adaedra: that's dinosaur-level old
[13:48:55] adaedra: what system are you on, jeffreylevesque ?
[13:48:58] wasamasa: depends how you've installed it :P
[13:49:05] jeffreylevesque: https://github.com/brauliobo/less2sass/issues/3#issue-103513240
[13:49:07] nofxx: has joined #ruby
[13:49:32] adaedra: you won't get any recent ruby on centos 6 now, the best you can have with vendor provided is 1.9.3
[13:49:41] hmnhf: jhass: When rails escapes the newlines this method fails
[13:49:43] hmnhf: https://github.com/braintree/braintree_ruby/blob/master/lib/braintree/webhook_notification_gateway.rb#L9
[13:49:46] adaedra: you will have to use something like ruby-install+chruby or rbenv
[13:49:56] jeffreylevesque: i just need to convert less to sass
[13:50:03] jeffreylevesque: less2sass is a gem package
[13:50:07] blue_deref: has joined #ruby
[13:50:25] wasamasa: lol: https://github.com/brauliobo/less2sass/blob/master/lib/less2sass.rb#L5-L18
[13:50:30] lkba_: has joined #ruby
[13:50:34] wasamasa: excellent quality there
[13:50:34] jhass: hmnhf: that doesn't check for "escaped newlines", it simply checks if there are any
[13:50:53] adaedra: jeffreylevesque: well, it may work on 1.8 anyway
[13:51:01] pawnbox: has joined #ruby
[13:51:01] jhass: hmnhf: maybe you need to .strip your input? you
[13:51:09] jhass: 're still quite vague about your problem
[13:51:21] araujo__: has joined #ruby
[13:51:24] wasamasa: adaedra: just look at that code
[13:51:28] adaedra: wasamasa: I did
[13:51:39] adaedra: I'm still doing it
[13:51:47] linuxboytoo: has joined #ruby
[13:51:54] wasamasa: this is gold
[13:52:03] voltalio: has joined #ruby
[13:52:14] adaedra: If it doesn't work in 1.8 and don't want to install a ruby manually, you can always convert this gem to sed commands, jeffreylevesque
[13:52:23] sdwrage: has joined #ruby
[13:52:35] wasamasa: or just turn it into a ruby script
[13:53:47] patrick_star: has joined #ruby
[13:54:43] paulcsmith: has joined #ruby
[13:55:06] greenbigfrog: has left #ruby: ()
[13:55:42] khebbie: has joined #ruby
[13:56:07] jeffreylevesque: how can update to 1.9x?
[13:56:11] leat1: has joined #ruby
[13:56:19] bigbadbear: has joined #ruby
[13:56:54] jhass: 1.9 is EOL too, that's pretty pointless if you're going through the effort of updating again
[13:57:00] jhass: *already I mean
[13:57:11] Limix: has joined #ruby
[13:57:29] ckinniburgh: has joined #ruby
[13:57:41] roolo: has joined #ruby
[13:58:04] freerobby: has joined #ruby
[13:58:28] hmnhf: jhass: http://pastie.org/private/zlannizx8wvjzukpjsgga
[13:59:27] rbennacer: has joined #ruby
[13:59:35] jhass: then it fails because of the \, not because of the combination of \n
[14:00:08] jhass: ah and actually I read the regex backwards, \n is explicitly allowed even
[14:00:33] ferhaty: has joined #ruby
[14:00:43] jhass: so, question remains, who sends you that param? it contains a literal \ followed by a literal n, it probably meant to include a properly encoded \n
[14:00:53] kinduff: is there a convention to do type checking, within a function for example?
[14:01:02] freerobby1: has joined #ruby
[14:01:19] jhass: kinduff: avoid it as long as you can, assume you got the right thing and call the corresponding method
[14:01:42] jhass: if you can convert the type you get raise TypeError, if you can't handle the type you get raise ArgumentError
[14:01:44] jgpawletko: has joined #ruby
[14:02:54] kinduff: makes sense, I just read about an apporach using rescue block with type verification based on function arguments, so I wondered if there was a convention for it
[14:03:07] kinduff: been doing ruby for 3 years now, never had to do type checking tho
[14:03:13] kinduff: http://stackoverflow.com/a/9817225
[14:03:27] jhass: that looks horrible
[14:03:33] davedev24: has joined #ruby
[14:03:34] giuseppesolinas: has joined #ruby
[14:04:12] kinduff: indeed haha
[14:04:27] pawnbox: has joined #ruby
[14:04:57] hmnhf: jhass: Currently I'm generating a sample notification with https://github.com/braintree/braintree_ruby/blob/master/lib/braintree/webhook_testing_gateway.rb#L9
[14:05:08] _blizzy_: has joined #ruby
[14:05:12] hmnhf: and then posting it to rails via postman
[14:05:26] kinduff: what about https://github.com/gogotanaka/Rubype
[14:06:27] leat1: has joined #ruby
[14:06:54] dumdedum: has joined #ruby
[14:06:59] jhass: hmnhf: I bet if I'd get that code and stuff the result of that method into parse it'll work, so that doesn't show where you improperly pass stuff along
[14:06:59] Eiam: has joined #ruby
[14:07:27] dionysus69: has joined #ruby
[14:09:56] willharrison: has joined #ruby
[14:10:49] [k-: look at Contracts!
[14:10:56] s2013: has joined #ruby
[14:11:34] jhass: [k-: feels like the trolls are back...
[14:11:52] roger_rabbit: has joined #ruby
[14:11:57] adaedra: back to the USSR?
[14:12:12] [k-: isnt this about type checking now
[14:12:24] mburns: has joined #ruby
[14:12:39] giuseppesolinas: has left #ruby: ("Leaving")
[14:12:44] hmnhf: jhass: So if I'm posting parameters the wrong way, I think there won't be a problem when braintree sends the real notifications, thanks for the help :)
[14:12:46] kinduff: has joined #ruby
[14:13:34] riotjones: has joined #ruby
[14:13:40] _blizzy_: has joined #ruby
[14:14:04] icedragon: wassssssssup, brothers and sisters :D
[14:14:05] pawnbox: has joined #ruby
[14:14:08] jhass: hmnhf: for all I can tell so far it might as well be them fucking it up, but IME in 98% of the process where a literal \ followed by a literal n appears and causes troubles, somebody did something wrong
[14:14:14] icedragon: I hope I don't get shot for saying that...
[14:14:41] jhass: skin is admittedly a bit thin after yesterday, so maybe don't stress it ;)
[14:15:05] icedragon: :) whats the latest and greatest jhass
[14:15:22] jhass: crystal is now in the archlinux community repository <3
[14:15:23] icedragon: I haven't spoken, or looked at the channel for weeks, the summer has been stressing me to no ends
[14:15:35] UtkarshRay: has joined #ruby
[14:15:50] icedragon: jhass: You mean I can try it now without manually compiling it!?
[14:16:16] icedragon: [k-: Yeah, I noticed, what's the highlight for 2.2.3?
[14:16:18] leat1: has joined #ruby
[14:16:30] [k-: bug fixes
[14:16:31] Pupeno: has joined #ruby
[14:16:37] havenwood: IceDragon: The 3 is the big change.
[14:16:39] [k-: only a minor release
[14:16:43] christiandsg: has joined #ruby
[14:16:52] havenwood: IceDragon: gem update --system
[14:16:52] icedragon: ACTION throws tomatoes
[14:17:29] [k-: tomato throwing day was in fact yesterday
[14:17:36] [k-: too bad you missed it
[14:17:39] icedragon: darn, I missed it then
[14:17:59] [k-: google had a doodle for the special occasion
[14:17:59] icedragon: ping me next time there is a tomato throwing day, I'll arm my tomtato launcher :P
[14:18:20] pawnbox: has joined #ruby
[14:18:45] icedragon: havenwood: You know, I've never ran `gem update --system`
[14:18:56] sevenseacat: you probably should.
[14:19:09] tagrudev: has joined #ruby
[14:19:12] icedragon: archlinux just re-installs ruby with the latest stuff normally
[14:19:14] icedragon: ???(?????????)???
[14:19:19] [k-: there were some critical updates
[14:19:24] jeadre: has joined #ruby
[14:19:48] icedragon: [k-: Well, now that I know, I'll do it on a regular basis alongside system updates
[14:20:06] voltalio: has joined #ruby
[14:20:22] shevy: IceDragon!
[14:20:23] shevy: you are alive
[14:20:30] icedragon: SHEVY MA MAN
[14:20:32] jhass: IceDragon: actually not, I tried to get anatolik to patch in a newer rubygems, but no dice
[14:20:32] icedragon: ACTION brohugs
[14:20:40] shevy: not killed by a party of dragonfighters
[14:20:54] icedragon: barely survived, they ambushed me on a rainy day!
[14:21:03] [k-: shevy didn't even respond to my poke :(
[14:21:05] icedragon: ;-; you know how rain is on an icedragon don't ya
[14:21:31] icedragon: [k-: You gotta reach bro status :P
[14:21:50] ruboto: shevy is the hound of baskerville
[14:21:56] adaedra: Water on Ice is x1 though
[14:22:28] icedragon: adaedra: you did not... D:
[14:22:38] adaedra: What did I not?
[14:22:59] qweb_: has left #ruby: ()
[14:23:11] adaedra: I totally did #noshame
[14:23:22] icedragon: #unbelievable
[14:23:35] adaedra: It's super effective.
[14:23:43] pawnbox: has joined #ruby
[14:24:01] icedragon: speaking of pokemon, I need to pick up my alpha sapphire at some point in the future..
[14:24:02] bmn: has joined #ruby
[14:24:33] kinduff: has joined #ruby
[14:24:40] hmnhf: jhass: It's not just one sudden "\n", braintree's gem actually is generating these newlines, but when rails gets the request, it somewhere escapes the parameter's newlines
[14:24:42] hmnhf: http://pastie.org/private/w8vaqnhc54ec7y1onmwf9g#
[14:24:57] hmnhf: jhass: Thanks anyways :) I'll figure it out.
[14:25:33] jhass: hmnhf: I still claim that the way the request is sent in introduces those as literals
[14:25:40] jhass: hmnhf: how do you test, curl on the shell?
[14:25:56] tkuchiki: has joined #ruby
[14:26:25] hmnhf: I'm using postman, but let me test it with curl and see what happens.
[14:26:39] krz: has joined #ruby
[14:26:49] icedragon: hmnhf: it was probably escaped before, try a gsub('\n', "\n")?
[14:27:07] jhass: IceDragon: no
[14:27:13] jhass: that's just working around the bug
[14:27:25] icedragon: ! *bows* your right
[14:27:46] jhass: >> require "cgi";
[14:27:47] ruboto: jhass # => true (https://eval.in/423587)
[14:27:47] jhass: CGI.escape("ICAgICAgICA8bm90aWZpY2F0aW9uPgogICAgICAgICAgPHRpbWVzdGFtcCB0\neXBlPSJkYXRldGltZSI+MjAxNS0wOC0yN1QxMjoyMTo1NVo8L3RpbWVzdGFt\ncD4KICAgICAgICAgIDxraW5kPnN1YnNjcmlwdGlvbl93ZW50X3Bhc3RfZHVl\nPC9raW5kPgogICAgICAgICAgPHN1YmplY3Q+CiAgICAgICAgICAgICAgICAg\nICAgPHN1YnNjcmlwdGlvbj4KICAgICAgICAgIDxpZD4zMzMzPC9pZD4KICAg\nICAgICAgIDx0cmFuc2FjdGlvbnMgdHlwZT0iYXJyYXkiPgogICAgICAgICAg\nPC90cmFuc2FjdGlvbnM+CiAgICAgIC
[14:27:49] jhass: AgICA8YWRkX29ucyB0eXBlPSJhcnJh\neSI+CiAgICAgICAgICA8L2FkZF9vbnM+CiAgICAgICAgICA8ZGlzY291bnRz\nIHR5cGU9ImFycmF5Ij4KICAgICAgICAgIDwvZGlzY291bnRzPgogICAgICAg\nIDwvc3Vic2NyaXB0aW9uPgoKICAgICAgICAgIDwvc3ViamVjdD4KICAgICAg\nICA8L25vdGlmaWNhdGlvbj4K\n")
[14:28:16] Iskarlar: has joined #ruby
[14:28:20] jhass: yeah, wanted to demo
[14:28:56] linuxboy_: has joined #ruby
[14:29:23] jhass: hmnhf: copy the result of CGI.escape(sample_notification[:bt_signature]) / CGI.escape(sample_notification[:bt_payload]) into postman
[14:30:42] kinduff: has joined #ruby
[14:30:50] roger_rabbit: has joined #ruby
[14:30:51] voltalio: has joined #ruby
[14:31:30] hmnhf: jhass: I tried with curl and still it's the same
[14:31:32] hmnhf: http://pastie.org/private/f5b8pvzonx9leqaia9qovg
[14:31:37] hmnhf: jhass: I'll try that.
[14:32:29] j_mcnally: has joined #ruby
[14:32:44] alphaatom: has joined #ruby
[14:32:51] silkfox: has joined #ruby
[14:35:05] ckinniburgh_: has joined #ruby
[14:36:10] dotplus: has joined #ruby
[14:36:15] yqt: has joined #ruby
[14:36:24] Vile`: has joined #ruby
[14:36:40] bigredboots: has joined #ruby
[14:36:56] leat1: has joined #ruby
[14:38:15] revoohc: has joined #ruby
[14:39:29] hmnhf: jhass: Escaping with CGI didn't work neither.
[14:39:30] hmnhf: http://pastie.org/private/s4dadfycp4jtbczdxq8sq
[14:39:32] Torrieri: has joined #ruby
[14:39:32] Torrieri: has joined #ruby
[14:40:43] hmnhf: jhass: I'll try testing it with a real braintree notification, thanks again :)
[14:41:55] jhass: hmnhf: it even includes the "s ?!
[14:42:34] giuseppesolinas: has joined #ruby
[14:43:34] hmnhf: jhass: Which "s? where? didn't find anything :D
[14:44:28] fumk: has joined #ruby
[14:44:36] davedev24: has joined #ruby
[14:44:47] jhass: is postman taking your input literal, not interpreting escape sequences but rencoding it?
[14:45:09] jhass: do puts sample_notification[:bt_payload] and copy paste that output
[14:45:55] sphex_: has joined #ruby
[14:46:10] rbennacer: has joined #ruby
[14:47:04] davedev24: has joined #ruby
[14:47:23] rippa: has joined #ruby
[14:48:25] molawson: has joined #ruby
[14:49:05] hmnhf: jhass: Yes, postman was messing it up, tried the CGI#escape's output with curl and it works.
[14:49:15] hmnhf: jhass: Thanks :D
[14:49:26] chouhoulis: has joined #ruby
[14:50:52] molawson: has joined #ruby
[14:51:19] startupality: has joined #ruby
[14:52:19] livathinos: has joined #ruby
[14:53:28] cjbottaro: has joined #ruby
[14:54:00] bigredbo_: has joined #ruby
[14:54:59] davedev24: has joined #ruby
[14:55:37] dr3w: has joined #ruby
[14:56:43] gamename: has joined #ruby
[14:57:01] cschneid_: has joined #ruby
[14:57:10] bulibuta: has joined #ruby
[14:57:20] elepedus: has joined #ruby
[14:57:42] bulibuta: hi, if I add a method to an opened class how can I make sure it gets passed down to its subclasses?
[14:58:40] fgo: has joined #ruby
[14:58:45] Janno: has joined #ruby
[14:58:59] s2013: has joined #ruby
[14:59:19] bulibuta: say I have class Song defined and included with a require 'Song' and I add a record method to it in my script. Now Song has ClassicalSong subclass that was defined *before* I added the record method, will ClassicalSong get it after adding it to Song class?
[14:59:34] Ox0dea: ?try bulibuta
[14:59:34] ruboto: bulibuta, Why don't you try it and see for yourself?
[14:59:44] bulibuta: I tried it and it does not work
[14:59:59] bulibuta: now I'm thinking maybe I'm doing something wrong
[15:00:13] bulibuta: I even tried sending it as an InstanceMethod via include
[15:00:18] nitenq: has joined #ruby
[15:00:56] devoldmx: has joined #ruby
[15:01:10] Vile`: has joined #ruby
[15:01:23] ruboto: We can't help you without your code, please post it to https://gist.github.com
[15:01:43] RobertBirnie: has joined #ruby
[15:02:32] Ox0dea: >> class A; end; class B < A; end; class A; def foo; end end; B.instance_methods.include? :foo # bulibuta
[15:02:33] ruboto: Ox0dea # => true (https://eval.in/423596)
[15:03:06] Ox0dea: InstanceMethod is not a Ruby thing, for what that's worth.
[15:03:11] [k-: Ox0dea!
[15:03:12] bulibuta: it was obvious to me as well, but I guess I'm making a stupid mistake in my code
[15:03:17] Ox0dea: Method and UnboundMethod are classes, but not InstanceMethod.
[15:03:31] Ox0dea: bulibuta: Do you actually have an instance of InstanceMethod somehow?
[15:03:43] linuxboytoo: has joined #ruby
[15:04:41] bulibuta: when I saw that something like your example isn't working I looked it up online and stumbled on this: http://stackoverflow.com/questions/10692961/inheriting-class-methods-from-mixins
[15:04:46] ngscheurich: has joined #ruby
[15:04:46] bulibuta: so I tried that
[15:04:53] Ox0dea: [k-: 43388
[15:04:56] bulibuta: that's what I mean by InstanceMethods
[15:05:02] RobertBi_: has joined #ruby
[15:05:50] failshell: has joined #ruby
[15:06:17] centrx: has joined #ruby
[15:06:58] Ox0dea: bulibuta: Ah, fair enough. You do indeed have to do things a bit more "manually" if you intend to inherit mixed-in methods.
[15:07:18] Ox0dea: There are ways to determine which classes have subclassed you, on which you can #include the relevant mixin.
[15:07:22] bulibuta: yeah... I'll see, now I'm happy that the example you gave works
[15:07:25] Ox0dea: But monitoring #included is usually cleanest.
[15:07:30] bulibuta: and I'm certain my code is wrong
[15:08:14] bulibuta: yup... thanks for your help!
[15:08:23] Ox0dea: Sure thing. :)
[15:09:44] Polysics: has joined #ruby
[15:09:53] platzhirsch: has joined #ruby
[15:10:07] banjara: has joined #ruby
[15:12:30] unver: has joined #ruby
[15:12:33] snockerton: has joined #ruby
[15:12:49] Rubie: has joined #ruby
[15:12:49] pawnbox: has joined #ruby
[15:13:39] riotjones: has joined #ruby
[15:13:57] t0rc: has joined #ruby
[15:14:52] skade: has joined #ruby
[15:14:53] jeffreylevesque: when i do `gem update --system` i get that I don't have write permission for the /usr/local/lib/ruby/gems/2.1.0 directory
[15:15:07] ecnalyr: has joined #ruby
[15:15:29] jhass: jeffreylevesque: how did you install ruby?
[15:15:41] jeffreylevesque: http://ask.xmodulo.com/upgrade-ruby-centos.html
[15:15:49] jeffreylevesque: the user of the directory is root root
[15:15:55] jeffreylevesque: i am user `vagrant`
[15:16:04] jeffreylevesque: but you're not supposed to run as root?
[15:16:11] jhass: you need to run the command with root permissions, yes
[15:16:13] attamusc: has joined #ruby
[15:16:20] jeffreylevesque: when i run as root
[15:16:27] jeffreylevesque: it says 'gems' not found
[15:16:35] jhass: "gem", not "gems"
[15:16:46] jeffreylevesque: sudo: gem command not found
[15:17:14] jhass: then your sudo setup doesn't have /usr/local/bin in it's path I guess
[15:17:19] dfockler: has joined #ruby
[15:17:47] jeffreylevesque: how can i do that?
[15:18:28] pauly_oc: has joined #ruby
[15:18:51] jhass: idk, I don't touch CentOS with a stick, especially 6
[15:19:54] [k-: Ox0dea: hello is 43110
[15:20:03] molawson: has joined #ruby
[15:20:18] sanguisdex: has joined #ruby
[15:20:26] xet7: has joined #ruby
[15:20:30] Cache_Money: has joined #ruby
[15:20:34] polpak: has joined #ruby
[15:22:35] benlovell: has joined #ruby
[15:22:56] chouhoulis: has joined #ruby
[15:23:10] Ox0dea: >> 43388.to_s 16 # [k-
[15:23:11] ruboto: Ox0dea # => "a97c" (https://eval.in/423609)
[15:23:18] anandubajith: has joined #ruby
[15:23:30] minimuffins: has joined #ruby
[15:24:41] psye: has joined #ruby
[15:24:52] khebbie: has joined #ruby
[15:25:47] Ox0dea: [k-: Do you actually use T9, then?
[15:25:59] roxtrongo: has joined #ruby
[15:26:48] Travis-42: has joined #ruby
[15:27:36] rehat_: has joined #ruby
[15:28:35] nitenq: has joined #ruby
[15:28:49] Travis-42: I???m trying to understand the changes ruby 2.2 made to hash keys that are string. prior to 2.2, env[???PATH_INFO???.freeze] would be faster and reduce memory allocations compared to env[???PATH_INFO???] multiple times across a project. Am I understanding correctly that in 2.2, ruby does this automatically now?
[15:29:27] jhass: yes, but I thought that's done for some time before
[15:30:17] Travis-42: I was basing it off of, http://www.sitepoint.com/unraveling-string-key-performance-ruby-2-2/ ??? but it could be wrong
[15:30:31] tkuchiki: has joined #ruby
[15:30:46] Travis-42: I find in ruby 2.2.3, benchmaring ENV["PATH_INFO???] is still 1.3x slower than ENV["PATH_INFO".freeze] ??? is that still expected?
[15:30:55] Ox0dea: 21>> {'foo'=>1}.keys[0].frozen?
[15:30:56] ruboto: Ox0dea # => true (https://eval.in/423614)
[15:30:57] whippythellama: has joined #ruby
[15:30:59] Ox0dea: 20>> {'foo'=>1}.keys[0].frozen?
[15:31:00] ruboto: Ox0dea # => true (https://eval.in/423615)
[15:31:38] jhass: >> "foo"f.frozen
[15:31:39] ruboto: jhass # => /tmp/execpad-2c2acb6948a0/source-2c2acb6948a0:2: syntax error, unexpected tIDENTIFIER, expecting key ...check link for more (https://eval.in/423616)
[15:31:40] jhass: >> "foo"f.frozen?
[15:31:41] ruboto: jhass # => /tmp/execpad-89a091a7e29a/source-89a091a7e29a:2: syntax error, unexpected tIDENTIFIER, expecting key ...check link for more (https://eval.in/423617)
[15:31:53] jhass: didn't we have a shortcut now?
[15:32:05] Travis-42: it was only discussed I think, jhass
[15:32:39] atomical: has joined #ruby
[15:32:54] unver: has joined #ruby
[15:33:07] havenwood: has joined #ruby
[15:33:07] Ox0dea: Travis-42: How are you benchmarking? That disparity makes little sense.
[15:33:49] Travis-42: Ox0dea: https://gist.github.com/anonymous/4eed629ac7b34467cf29
[15:33:54] Travis-42: benchmark/ips
[15:34:45] rcvalle: has joined #ruby
[15:34:49] Ox0dea: Travis-42: You're benchmarking the cost of string creation there.
[15:36:28] platzhirsch1: has joined #ruby
[15:36:38] araujo: has joined #ruby
[15:36:50] platzhirsch1: has left #ruby: ()
[15:36:57] Travis-42: so then it???s not really the case that hash[???key???] is optimized the same as hash[???key???.frozen] in ruby 2.2?
[15:37:11] Travis-42: even if when creating hashes, the keys are set to frozen
[15:37:29] Ox0dea: Yes, I demonstrated that that has been the case since 2.0.
[15:37:41] araujo: has joined #ruby
[15:38:31] jhass: Travis-42: freezing the keys speeds up hash access
[15:39:02] Travis-42: right, but if I???m trying to reduce object allocations, I need to access the hash using frozen string?
[15:39:15] jhass: as Ox0dea said you benchmark "foo" vs "foo".freeze, not h[foo].frozen? == true vs h[foo].frozen? == false
[15:39:28] Ox0dea: >> 'foo'.freeze.__id__ == 'foo'.freeze.__id__ # Travis-42
[15:39:29] ruboto: Ox0dea # => true (https://eval.in/423619)
[15:39:50] blackmes1: has joined #ruby
[15:39:56] leat1: has joined #ruby
[15:40:18] Mon_Ouie: It's also relevant to just look at what bytecode is generated for each version
[15:40:41] Eiam: has joined #ruby
[15:40:43] khebbie: has joined #ruby
[15:43:16] atomical: has joined #ruby
[15:45:52] roolo: has joined #ruby
[15:46:27] nitenq: has joined #ruby
[15:47:42] roxtrongo: has joined #ruby
[15:48:09] greenbigfrog: has joined #ruby
[15:48:16] Silox|: has joined #ruby
[15:48:21] ndrei: has joined #ruby
[15:48:34] gambl0re: has joined #ruby
[15:48:40] greenbigfrog: hi. does soemone know a site where the formatting of json API's is explained good?
[15:48:53] ramfjord: has joined #ruby
[15:49:13] jhass: how about http://jsonapi.org/
[15:49:21] platzhirsch1: has joined #ruby
[15:49:39] platzhirsch1: has left #ruby: ()
[15:49:43] evrial: has joined #ruby
[15:51:26] blackmes1: has joined #ruby
[15:51:27] yatish27_: has joined #ruby
[15:51:33] RobertBirnie: has joined #ruby
[15:51:56] greenbigfrog: ok... so that's actually not what I was looking for... I wasn't clear enough..
[15:51:56] greenbigfrog: I am looking for a site where it's explained how I can only output a part of an API that I called...
[15:52:18] jhass: that's not any more clear
[15:53:05] shevy: json is simple
[15:53:23] shevy: http://json.org/example.html
[15:53:25] [k-: and shevy still hasnt responded to my poke!
[15:54:13] shevy: it's not nice to poke!
[15:54:43] greenbigfrog: ok... you don't really understand what I want I gues so here comes an example:
[15:54:43] greenbigfrog: https://api.twitch.tv/kraken/streams/kingkongor
[15:54:44] greenbigfrog: If I call that API I have a very long string... if I now put that I get the whole thing... but I only want to get f.e. the game
[15:54:54] CorySimmons: has joined #ruby
[15:54:56] [Butch]: has joined #ruby
[15:55:00] radgeRayden: has joined #ruby
[15:55:13] adaedra: ?poke shevy
[15:55:13] ruboto: shevy, I don't know anything about poke
[15:55:47] adaedra: greenbigfrog: well, you have to deserialize it
[15:55:50] shevy: greenbigfrog can you extract the substring you want?
[15:56:22] ghr: has joined #ruby
[15:56:39] shevy: looks very hashy
[15:56:43] shevy: "stream":{"_id":16028672432,"game":"
[15:57:01] shevy: in ruby that would be ['stream']['game'] if that were a hash
[15:57:07] greenbigfrog: I'm not that experienced with ruby so...
[15:57:15] adaedra: greenbigfrog: http://www.rubydoc.info/stdlib/json/JSON
[15:57:24] greenbigfrog: shevy: let me test that
[15:57:25] leat1: has joined #ruby
[15:57:30] shevy: right but you know how to access a hash key in ruby
[15:57:57] shevy: >> hash = { 'cat' => 'Tom', 'mouse' => 'Jerry' }; hash['mouse']
[15:57:58] ruboto: shevy # => "Jerry" (https://eval.in/423626)
[15:58:14] greenbigfrog: yeah... got that point
[15:58:42] shevy: good, so now you only need to get it into a ruby hash
[15:58:46] shevy: I think JSON.parse() should do
[15:58:59] _blizzy_: has joined #ruby
[15:59:24] shevy: http://stackoverflow.com/questions/5410682/parsing-a-json-string-in-ruby
[15:59:34] jeadre: has joined #ruby
[15:59:35] greenbigfrog: shevy: I know how to parse it... just didn't know how to go in "the second level"
[15:59:41] pawnbox: has joined #ruby
[15:59:41] shevy: http://ruby-doc.org/stdlib-2.0.0/libdoc/json/rdoc/JSON.html also has an example
[15:59:57] shevy: you can put a hash into a hash into a hash like those matroshka dolls
[16:00:15] greenbigfrog: it's working now... thanks for everyones help!!!
[16:00:35] shevy: the adventures of the big green frog can continue \o/
[16:00:35] trampi: has joined #ruby
[16:00:42] shevy: we have an IceDragon here too if you look for some dragon slaying...
[16:01:28] gizmore: has joined #ruby
[16:01:30] renderful: has joined #ruby
[16:01:53] luckyme: has joined #ruby
[16:01:55] dgutierrez1287: has joined #ruby
[16:01:57] codenapper: has joined #ruby
[16:03:31] linuxboy_: has joined #ruby
[16:03:53] auxbuss: has joined #ruby
[16:04:01] Ox0dea: >> a = {}; a[a] = a; a.rehash; a[a][a][a][a][a] == a # shevy
[16:04:02] ruboto: Ox0dea # => true (https://eval.in/423627)
[16:04:23] Ox0dea: You can even put a Hash into itself, but the physical logistics are unsound.
[16:05:18] hmnhf_: has joined #ruby
[16:05:21] towski_: has joined #ruby
[16:05:57] shevy: it's a community service
[16:06:02] shevy: aka what not to do
[16:06:24] shevy: it's good that [k- has given up on one-liners
[16:06:49] pietr0: has joined #ruby
[16:08:06] imperator: has joined #ruby
[16:08:23] araujo: has joined #ruby
[16:08:23] araujo: has joined #ruby
[16:09:11] BraddPitt: my irssi encloses all nicks with <nickname>
[16:09:22] BraddPitt: so k-'s name looks like a stabby lambda
[16:09:33] Ox0dea: He will appreciate this knowledge, no doubt.
[16:09:36] BraddPitt: thought you should know
[16:09:56] [k-: i'll fix it for you BraddPitt
[16:10:02] andybernard: has joined #ruby
[16:10:04] [k-: __END__
[16:10:06] psye: has joined #ruby
[16:10:24] shevy: so BraddPitt only has to .call on [k-
[16:10:34] jeadre: has joined #ruby
[16:10:44] BraddPitt: hehe thanks
[16:11:03] ofdtrinity: has left #ruby: ("Leaving")
[16:11:08] shevy: [k- did you know that there exists IO::NULL ?
[16:11:23] Ox0dea: shevy: What is it on Windows?
[16:12:03] Ox0dea: Also, why not IO::ZERO and IO::FULL?
[16:12:04] shevy: dunno, my windows machine is downstairs
[16:12:32] shevy: windows is only ever good for gaming!
[16:12:39] hololeap: has joined #ruby
[16:12:47] codecop: has joined #ruby
[16:13:32] adaedra: There's `nul` under windows
[16:13:55] ellisTAA: has joined #ruby
[16:14:04] ruboto: this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
[16:14:32] [k-: ?wrong_call EllisTAA
[16:14:32] ruboto: EllisTAA, I don't know anything about wrong_call
[16:14:42] shevy: nul? is that missing a l?
[16:15:05] imperator: it's a device
[16:15:29] adaedra: also, you can't name a file `nul` under Windows. It's reserved (because of the device.)
[16:15:29] ellisTAA: [k-: sorry i wasn???t directing that towards you, i just forgot the name of the channel
[16:16:14] imperator: shevy, it's also in ptools: File.null => /dev/null
[16:16:19] imperator: ACTION was first!
[16:17:00] imperator: but unlike MRI, I support amiga and openvms, which is crucial ;)
[16:17:32] imperator: (for anyone wondering it's "NIL:" on amiga and "NL:" on openvms)
[16:17:35] Ox0dea: MRI does support Amiga.
[16:17:42] imperator: does it? sweet
[16:18:57] ellisTAA: has joined #ruby
[16:19:17] Eiam: has joined #ruby
[16:19:29] christiandsg: has joined #ruby
[16:20:00] Hanmac: has joined #ruby
[16:20:57] j_mcnally: has joined #ruby
[16:22:48] petricore: has joined #ruby
[16:23:47] benlovell: has joined #ruby
[16:25:23] pdoherty: has joined #ruby
[16:27:13] momomomomo: has joined #ruby
[16:27:19] Leef_: has joined #ruby
[16:27:50] bricker: has joined #ruby
[16:27:59] Rutix: has joined #ruby
[16:27:59] Rutix: has joined #ruby
[16:28:03] leat1: has joined #ruby
[16:28:19] Rubie: has joined #ruby
[16:28:21] Travis-42: has joined #ruby
[16:28:24] last_staff: has joined #ruby
[16:28:41] saddad: has joined #ruby
[16:28:56] moted: has joined #ruby
[16:31:02] graydot: has joined #ruby
[16:31:11] arup_r: has joined #ruby
[16:32:54] nettoweb: has joined #ruby
[16:34:49] m3ow1504_x_io: has joined #ruby
[16:35:45] allcentury: has joined #ruby
[16:35:58] rbennacer: has joined #ruby
[16:37:11] atomical: has joined #ruby
[16:38:43] RobertBirnie: has joined #ruby
[16:40:36] linuxboytoo: has joined #ruby
[16:41:57] kristofferR: has joined #ruby
[16:42:42] hmnhf_: has joined #ruby
[16:43:18] RobertBirnie: has joined #ruby
[16:44:04] shinnya: has joined #ruby
[16:45:02] RandyT: has joined #ruby
[16:46:21] poli: has joined #ruby
[16:47:38] Logan_: has joined #ruby
[16:48:21] leat1: has joined #ruby
[16:49:46] Guest75145: Hello Ruby! Small question. Im trying to enter information on the same line that it is going to print. But when I press enter it jumps to the next line... here's a gist: https://gist.github.com/lbickmore/26d40ee8557320387232#file-gistfile1-txt
[16:50:08] platzhirsch: has joined #ruby
[16:50:27] Guest75145: So essentially it should look like: Type Here: 1 + 1 = 2
[16:50:42] [k-: Guest75145, that's what entering does
[16:50:47] [k-: a new line
[16:50:47] Guest75145: but it jumps lines
[16:50:56] nitenq: has joined #ruby
[16:51:07] Guest75145: yes can i backspace upon entering?
[16:51:10] atomical: has joined #ruby
[16:51:20] jhass: Guest75145: the easiest workaround is to use ANSI escape codes (google it) to jump a line up and to its end
[16:51:36] [k-: or get a library to do it for you
[16:53:32] iamninja: has joined #ruby
[16:53:46] Travis-42: has left #ruby: ()
[16:53:47] nofxx: has joined #ruby
[16:54:33] Ox0dea: jhass: There are codes for saving and restoring the cursor.
[16:54:55] jhass: Ox0dea: don't think that applies here though
[16:55:09] jhass: at least you'll still have to jump to the end of line
[16:55:28] Ox0dea: Hm? I think he wants the user to be able to enter an expression at the end of the line, and then replace that expression with the answer when they press Enter.
[16:55:28] jhass: so not much gained by jump back vs jump a line up
[16:55:42] jhass: I think they just want to append the answer
[16:55:46] ylg: has joined #ruby
[16:55:50] [k-: Ox0dea he wants to insert a = answer
[16:55:55] Ox0dea: Oh, right.
[16:55:56] Guest75145: 0x0dea: accurate
[16:55:57] [k-: yes append, thanks jhass
[16:55:59] jhass: Enter: [1 + 1] = 2 # user input in []
[16:56:19] porfa: just got the "learn to program" e-book printed and .. erm, put on a hardcover and the circle thingies to hold on the pages, yeah..!
[16:56:21] Guest75145: I have found some escape codes but I'm doing it wrong? hah
[16:56:27] porfa: thanks for the book name jhass !
[16:56:39] porfa: his english is easy and good to read!
[16:57:07] bsdbofh: has joined #ruby
[16:57:43] choke: has joined #ruby
[16:57:58] nofxx: Porfa, you're the guy from Portugal, no?
[16:58:27] nofxx: there's the chris pine and why's book translated to pt Porfa
[16:59:02] A124: has joined #ruby
[16:59:10] porfa: I'm reading the chris pine one in english and i love it, i rather do it in engish, when i said it was easy english, it just the way he writes, and the examples / metaphors :)
[16:59:30] Sdwrage_: has joined #ruby
[16:59:52] Pumukel: has joined #ruby
[17:00:07] dotplus: has left #ruby: ()
[17:01:17] shevy: but it's really for the simple stuff
[17:01:41] devoldmx: has joined #ruby
[17:02:51] tjohnson: has joined #ruby
[17:04:37] bb010g: has joined #ruby
[17:04:51] Guest75145: Still lost guys :( cannot figure out how to append the end of my line after giving input 0.o.. I looked into carriage returning and that looks promising but I'm not sure how to go about that to keep it on the same line.
[17:04:54] sdwrage: has joined #ruby
[17:05:39] [k-: You have to go back up a line
[17:06:15] robh71: has joined #ruby
[17:07:35] mleung: has joined #ruby
[17:07:43] craysiii: has joined #ruby
[17:08:03] jpfuentes2: has joined #ruby
[17:09:12] Limix: has joined #ruby
[17:10:18] wldcordeiro: has joined #ruby
[17:11:36] RobertBirnie: has joined #ruby
[17:12:18] jhass: Guest75145: mmh, I can find move to end of line either, could swear it existed. Looks like you have rewrite the line, puts "\e[1F#{prompt}#{user_input}#{result}"
[17:12:50] banjara: has joined #ruby
[17:12:50] but3k4: has joined #ruby
[17:13:57] porfa: yeah, but i never programmed before and i've been doing these "blind" ruby scripts, so i think it's a really nice book for me to start
[17:14:25] bronson: has joined #ruby
[17:14:37] dopamean_: has joined #ruby
[17:15:19] SCHAAP137: has joined #ruby
[17:15:20] zendrix: has joined #ruby
[17:15:21] Velocity: has joined #ruby
[17:15:58] havenwood: Guest75145: require 'io/console'; print input until (input = STDIN.getch) == "\r"; print " = 42"
[17:16:38] Rubie: has joined #ruby
[17:17:06] shevy: foo.rb:1:in `<main>': undefined local variable or method `input' for main:Object (NameError)
[17:17:56] t0rc: has joined #ruby
[17:18:01] acke: has joined #ruby
[17:18:06] Guest75145: This is working but it ends up with a trailing enter due to my entering input. Im thinking it may add multiple blank lines doing it like this
[17:18:07] Guest75145: puts "\e[F\r#{introduction}#{input_var} = #{output_var}"
[17:18:14] havenwood: shevy: An ancient Ruby doth butter no parsnips.
[17:18:45] havenwood: shevy: 2.1+!!
[17:18:53] Kallis: has joined #ruby
[17:18:58] Inoperable: has joined #ruby
[17:19:03] Inoperable: has left #ruby: ()
[17:19:15] leafybasil: has joined #ruby
[17:19:42] havenwood: shevy: https://gist.github.com/havenwood/7387731
[17:20:03] Inoperable: has joined #ruby
[17:20:12] Inoperable: Hello Everybody
[17:20:34] havenwood: Inoperable: hi
[17:20:54] Inoperable: got a newb (i know i know...) question
[17:21:04] eam: why would someone grease up a parsnip anyway
[17:21:07] michael_mbp: has joined #ruby
[17:21:43] Inoperable: 1: how to filter a hash from several duplicates?
[17:21:56] Inoperable: 2: how to do the sme as above, but leave only 2 instead of 1
[17:22:10] juanpaucar: has joined #ruby
[17:22:14] havenwood: Inoperable: What's duplicate about it? Give an example Hash before and after.
[17:22:19] Inoperable: im cracking my head against Hash class methods
[17:22:26] havenwood: Inoperable: Example with data!
[17:22:43] ruboto: Please provide us with an example of valid input for your problem, the output that you're getting, and the output that you were expecting.
[17:22:51] havenwood: I have parnsips I want buttered parsnips.
[17:22:57] jhass: havenwood: y u type so much
[17:23:08] havenwood: jhass: finger workout
[17:23:13] Inoperable: h = {a:1,b:2,c:3,c:3,d:4,e:5,f:6,g:2,h:1,i:5}
[17:23:25] jhass: I see a broken space key
[17:23:31] Inoperable: h = {a:1,b:2,z:3,c:3,d:4,e:5,f:6,g:2,h:1,i:5}
[17:23:40] jhass: yeah, came through the first time
[17:23:51] RobertBirnie: has joined #ruby
[17:23:53] polpak: jhass: it was different the first time
[17:23:54] havenwood: Inoperable: warning: duplicated key at line 1 ignored: :c
[17:24:08] Jackneill: has joined #ruby
[17:24:10] Inoperable: havenwood i know just typed that thing to give you a example
[17:24:15] jhass: polpak: ugh, c vs z, who would notice?
[17:24:18] Inoperable: a = Hash({a:1,b:23,c:23423,d:23,e:23,f:23,g:23,h:243,j:23,k:23,l:12,m:354,n:43,o:53,p:23,q:35,r:23})
[17:24:26] Inoperable: here a proper one
[17:24:51] jhass: Why do you pass a hash literal to Kernel#Hash ?
[17:25:05] polpak: jhass: funzies
[17:25:10] Inoperable: i dont know all the methods
[17:25:12] dionysus69: has joined #ruby
[17:25:16] Inoperable: but the IDE does ;]
[17:25:23] Inoperable: if it knows the type
[17:25:30] jhass: Hash({whatever}) == {whatever}
[17:25:33] Inoperable: that's why in this case
[17:25:38] havenwood: Inoperable: And you want what output
[17:25:43] jhass: Hash() is a method call
[17:25:45] Inoperable: puts a.flatten.uniq.reject {|k| a.keys.include?(k)}
[17:25:47] shevy: havenwood lol what is that dancing ascii thing there?
[17:25:57] havenwood: shevy: Install curses gem and try it! :P
[17:26:01] Inoperable: that one works
[17:26:06] araujo: has joined #ruby
[17:26:07] araujo: has joined #ruby
[17:26:07] havenwood: shevy: That is my motion painting.
[17:26:15] Inoperable: on that particular hash
[17:26:20] Inoperable: but on another one
[17:26:34] apeiros: a.keys.include? # can't start to tell you how wrong this is
[17:26:35] havenwood: Inoperable: You still haven't shown the return value you're looking for.
[17:26:36] Rubie: has joined #ruby
[17:26:57] Inoperable: apeiros: start ot tell me
[17:27:06] Inoperable: like i said, newb
[17:27:08] apeiros: you create an Array from a structure to perform a linear (O(n)) search in it when the original structure *already has O(1) lookup*
[17:27:15] kidoz: has joined #ruby
[17:27:25] apeiros: in other words: you turn something fast with a lot of effort into something slow
[17:27:29] polpak: Inoperable: keys will include every k because k comes from keys
[17:27:41] Inoperable: i basically try to make a .uniq on a hash but in reverse
[17:27:43] apeiros: a.include?(k) # there. fast again. and less effort as a topping.
[17:27:50] Inoperable: i want to grab the duplicates out of a hash
[17:27:57] Inoperable: duplicates meaning keys having the same values
[17:28:11] ChanServ: -b guys!*@*
[17:28:14] havenwood: Inoperable: You'll find you'll get much quicker answers if you're able to show the result you want rather than describe it.
[17:28:21] kinduff: has joined #ruby
[17:28:32] polpak: Inoperable: why not construct a new hash where the key is the value and the value is the list of keys which had it
[17:29:11] Inoperable: polpak: good point
[17:29:30] molawson: has joined #ruby
[17:29:51] shevy: is hash.include? an alias to hash.has_key? ?
[17:29:53] fantazo: has joined #ruby
[17:30:02] havenwood: Inoperable: Like, I have `{:aim => true}` and I want `{true => :aim}`.
[17:30:11] kedibasi: has joined #ruby
[17:30:12] blueOxigen: has joined #ruby
[17:30:52] platzhirsch: has joined #ruby
[17:31:50] havenwood: Inoperable: Is this the return value you want or something else?: {:a=>1, :b=>23, :c=>23423, :h=>243, :l=>12, :m=>354, :n=>43, :o=>53, :q=>35}
[17:32:07] polpak: >>> a = {a:1, b:1, c:2}; b = Hash.new { |h, k| h[k] = [] }; a.each { |k,v| b[v] << k }; # Inoperable
[17:32:08] ruboto: polpak # => /tmp/execpad-1a304f8a0189/source-1a304f8a0189:2: syntax error, unexpected '>' ...check link for more (https://eval.in/423722)
[17:32:21] polpak: >> a = {a:1, b:1, c:2}; b = Hash.new { |h, k| h[k] = [] }; a.each { |k,v| b[v] << k }; # Inoperable
[17:32:22] ruboto: polpak # => {:a=>1, :b=>1, :c=>2} (https://eval.in/423723)
[17:32:45] khebbie: has joined #ruby
[17:32:45] Ox0dea: shevy: Yes; #key?, #has_key?, #include?, and #member? are all the same on Hash.
[17:32:48] polpak: >> a = {a:1, b:1, c:2}; b = Hash.new { |h, k| h[k] = [] }; a.each { |k,v| b[v] << k }; b;# Inoperable
[17:32:49] ruboto: polpak # => {1=>[:a, :b], 2=>[:c]} (https://eval.in/423724)
[17:33:04] shevy: Ox0dea hmmm
[17:33:07] minimuffins: has joined #ruby
[17:33:28] shevy: I had a moment of confusion because apeiros used .include? and I have been using .has_key? mostly
[17:33:41] porfa: anyone using watir gem? :) how do get a list of all the elements like i do in mechanize?
[17:33:45] shevy: now that has shocked my world... perhaps I should transition into .include? as well
[17:33:47] krisquigley: has joined #ruby
[17:33:55] roolo: has joined #ruby
[17:34:20] graydot: has joined #ruby
[17:35:13] Inoperable: polpak: yeah, that's it :)
[17:35:17] Ox0dea: shevy: Style guide recommends #key?.
[17:35:46] amclain: has joined #ruby
[17:35:58] jgt: has joined #ruby
[17:36:16] Inoperable: i need to wrap my head around it first, but many thanks mate!
[17:36:20] araujo: has joined #ruby
[17:36:21] araujo: has joined #ruby
[17:36:51] arcanez: Ox0dea: 'style guide'?
[17:36:58] shevy: Ox0dea I think there also was an old discussion between has_key? and key? where matz favoured key? ... if in doubt I'll go with the apeiros style guide :>
[17:37:28] araujo_: has joined #ruby
[17:37:48] Ox0dea: arcanez: https://github.com/bbatsov/ruby-style-guide#hash-key
[17:37:50] miah: https://github.com/bbatsov/ruby-style-guide/#hash-key
[17:37:56] miah: http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/43765
[17:38:23] ghr: has joined #ruby
[17:38:28] miah: need to add a ruboto feature to lookup / link RSG stuff =)
[17:39:21] voltalio: has joined #ruby
[17:39:24] shevy: that was the matz statement about has_key? versus key?
[17:39:30] jeadre: has joined #ruby
[17:39:30] Inoperable: any ruby ninja links a newb should read?
[17:39:36] shevy: miah is a google archaeologist
[17:39:48] Ox0dea: ?quickref Inoperable
[17:39:48] ruboto: Inoperable, http://www.zenspider.com/Languages/Ruby/QuickRef.html
[17:39:58] shevy: Inoperable no, just write more and more ruby code yourself, you'll become better the more you write
[17:40:13] Ox0dea: For your own definition of "better", mind.
[17:40:22] garethrees: has joined #ruby
[17:40:25] shevy: he'll become better
[17:40:44] shevy: I have utmost confidence in Inoperable
[17:40:51] platzhirsch: has joined #ruby
[17:41:00] shevy: the nick is a bit scary though
[17:41:01] ckinniburgh_: has joined #ruby
[17:41:02] linuxboytoo: has joined #ruby
[17:41:02] Inoperable: my own lack of faith is disturbing
[17:41:10] Ox0dea: Ganbatte kudasai!
[17:41:20] shevy: Inoperable well practice gets over that
[17:41:21] arcanez: I find that .has_key? expresses the thought better than .key? but both are ok
[17:41:30] m3ow1504_x_io: has joined #ruby
[17:41:33] shevy: arcanez yeah same here btw
[17:41:36] BraddPitt: i would agree with arcanez
[17:42:07] miah: i've never killed anybody while using ruby, so I doubt ninja skills are applicable.
[17:42:42] yorickpeterse: maybe you're so ninja you never noticed
[17:42:47] Inoperable: i need to md5 hash gazillion of files and put the md5 hexstrings in mongodb
[17:42:56] Inoperable: md5 with few files aint not a problem
[17:42:57] symm-: has joined #ruby
[17:43:01] shevy: Inoperable now that sounds simple enough
[17:43:02] Inoperable: gazillion of files takes ages
[17:43:10] yorickpeterse: Inoperable: parallelize it
[17:43:13] yorickpeterse: also brb, lasagna
[17:43:23] arcanez: I guess ? was meant to replace has_
[17:43:23] craysiii: mmm lasagna
[17:43:32] arcanez: not sure how many other methods are has_*?
[17:43:34] Inoperable: id rather would go with cuda/gpu
[17:43:38] krisquigley: has joined #ruby
[17:43:40] Inoperable: but can't find examples
[17:43:54] unver: has joined #ruby
[17:43:58] shevy: hmm one method I have here is .has_openssl_support? but I don't know if it was defined by me or someone else
[17:44:42] Inoperable: gpu seems to be freaking fast at crypto crunching
[17:45:06] craysiii: https://github.com/defuse/cuda-md5 ?
[17:45:12] jackjackdripper: has joined #ruby
[17:46:05] Inoperable: that's for brutforcing passwords from md5's
[17:46:07] Inoperable: not calculating them
[17:46:44] choke: has joined #ruby
[17:46:48] _djbkd: has joined #ruby
[17:47:06] Inoperable: calculating MD5 hashes:
[17:47:07] Inoperable: Radeon 7970 8213.6 M c/s
[17:47:07] Inoperable: 6-core AMD CPU 52.9 M c/s
[17:47:16] Inoperable: a bit of a difference
[17:47:19] arcanez: shevy: and that reads better than .has_openssl_support or .openssl_support?
[17:47:31] arcanez: but has_ is just extra typing really
[17:47:46] Inoperable: never mind though
[17:47:48] shevy: yeah but it reads better
[17:48:09] havenwood: Inoperable: How long does it take for you to calculate one by hand?
[17:48:43] Ox0dea: Relevant: http://www.righto.com/2014/09/mining-bitcoin-with-pencil-and-paper.html
[17:48:45] Inoperable: havenwood hehehe, never had a trial run
[17:48:54] havenwood: Ox0dea: That's what I was thinking of. :D
[17:49:21] workmad3: has joined #ruby
[17:49:35] roolo: has joined #ruby
[17:49:39] havenwood: Inoperable: Figure it out then you can put your personal MD5 hashing speed on your resume.
[17:50:24] Inoperable: Ox0dea: you just gave me a product idea for crowdfunded elder people based md5 generator
[17:50:41] Inoperable: Ox0dea imagine you take bingo and sudoku away and give them that
[17:50:45] iamninja: has joined #ruby
[17:50:49] Inoperable: bitcoin mining on global scale
[17:51:08] araujo: has joined #ruby
[17:51:08] araujo: has joined #ruby
[17:51:10] Ox0dea: Sounds like a unicorn to me
[17:51:21] miah: amazon mechanical turk + md5 generation
[17:51:38] havenwood: miah: mm, as an API
[17:51:52] havenwood: good service
[17:52:06] miah: already exists
[17:52:06] miah: http://www.md5.cz/
[17:52:46] Ox0dea: No bulk option?!
[17:52:54] havenwood: but do we trust the machines? manual human confirmation as a service!
[17:53:05] havenwood: each turk can be given just one step
[17:53:05] Ox0dea: The color bar is a nice touch.
[17:53:08] havenwood: repeat to validate
[17:53:17] Ox0dea: The checks balance themselves!
[17:53:24] Inoperable: havenwood exactly!
[17:53:52] Hanmac: has joined #ruby
[17:54:08] Inoperable: and imagine the fun factor at all of those retirement home's patients
[17:54:08] graydot: has joined #ruby
[17:54:22] rakm: has joined #ruby
[17:55:16] Ox0dea: It seems nobody's written MD5 in brainfuck.
[17:55:47] Ox0dea: I mean, it just seems like the kind of thing that would exist.
[17:55:48] ckinniburgh: has joined #ruby
[17:56:25] banjara: has joined #ruby
[17:57:26] postmodern: has joined #ruby
[17:58:03] baweaver: has joined #ruby
[17:59:53] mikecmpbll: has joined #ruby
[18:00:43] pglombardo: has joined #ruby
[18:01:23] nitenq: has joined #ruby
[18:02:07] Inoperable: what's the daily limit for new questions here?
[18:02:09] jackjackdripper: has joined #ruby
[18:02:16] Inoperable: newb questions i mean
[18:02:24] whippythellama: has joined #ruby
[18:02:55] unver: unlimited
[18:03:14] wmoxam: Inoperable: you just used up your limit
[18:03:29] Inoperable: that's what my wife said when filled for divorce
[18:03:33] unver: are there chans that limit questions?
[18:03:54] Ox0dea: unver: ##c crushes your soul if you're too stupid.
[18:03:59] rakm: has joined #ruby
[18:04:00] i: has joined #ruby
[18:04:08] dfockler: has joined #ruby
[18:04:59] ndrei: has joined #ruby
[18:05:08] dopie: has joined #ruby
[18:05:14] arooni-mobile: has joined #ruby
[18:05:28] RobertBirnie: has joined #ruby
[18:06:16] rakm: has joined #ruby
[18:07:17] unver: i'd be bitter if i had to write c all day too
[18:08:32] webopsx: has joined #ruby
[18:09:07] hmnhf_: has joined #ruby
[18:09:20] chouhoulis: has joined #ruby
[18:10:00] nofxx: has joined #ruby
[18:10:03] podman: has joined #ruby
[18:10:10] tsvenson: has joined #ruby
[18:10:22] rbowlby: has joined #ruby
[18:10:44] Inoperable: unver but its soooooo fast!
[18:10:47] jackjackdripper: has joined #ruby
[18:11:39] ramfjord: has joined #ruby
[18:12:47] Ox0dea: The difference is occasionally staggering.
[18:13:29] araujo: has joined #ruby
[18:14:08] baweaver: has joined #ruby
[18:14:11] Guest75145: "Well, yeah, and the Java community is stubborn, the .NET community is closed-minded, the Perl community is quirky and the C++ community is a bunch of middle-aged, pipe-smoking elves." http://www.zohararad.com/2012/11/16/10-reasons-not-to-use-ruby
[18:14:24] Guest75145: Pipe smoking elves hah
[18:14:26] robh71: has joined #ruby
[18:15:10] imperator: has left #ruby: ("Leaving")
[18:17:08] juanpaucar: has joined #ruby
[18:17:14] _djbkd: has joined #ruby
[18:17:29] chouhoulis: has joined #ruby
[18:17:45] hmnhf_: has joined #ruby
[18:18:03] benlovell: has joined #ruby
[18:18:03] arcanez: should one use a named_scope instead of making a method on the model?
[18:18:08] _djbkd: has joined #ruby
[18:18:15] Meow-J: has joined #ruby
[18:18:25] arcanez: doh, that's more of a rails question, sorry
[18:18:44] khebbie: has joined #ruby
[18:18:55] ta: has joined #ruby
[18:19:03] ylg: has joined #ruby
[18:19:48] DiscoM_: has joined #ruby
[18:20:33] helpa: has joined #ruby
[18:20:49] slani: has joined #ruby
[18:21:32] t0rc: has joined #ruby
[18:22:17] christiandsg: has joined #ruby
[18:23:02] cgfbee: has joined #ruby
[18:24:15] rbennacer: has joined #ruby
[18:24:39] RobertBirnie: has joined #ruby
[18:24:55] sphex: has joined #ruby
[18:25:13] skade: has joined #ruby
[18:25:24] choke: has joined #ruby
[18:26:06] helpa: has joined #ruby
[18:26:23] workmad3: has joined #ruby
[18:26:41] paulcsmith: has joined #ruby
[18:26:45] DoubleMalt: has joined #ruby
[18:27:03] nofxxx: has joined #ruby
[18:27:03] Travis-42: has joined #ruby
[18:27:24] leafybasil: has joined #ruby
[18:27:35] dopie: has joined #ruby
[18:28:10] RobertBirnie: has joined #ruby
[18:29:24] cored: has joined #ruby
[18:29:25] cored: has joined #ruby
[18:33:39] JoshGlzBrk: has joined #ruby
[18:33:58] kirun: has joined #ruby
[18:34:17] RobertBirnie: has joined #ruby
[18:35:42] Mendenhall: has joined #ruby
[18:36:40] giuseppesolinas: has joined #ruby
[18:36:51] ta: has joined #ruby
[18:37:44] pizzas: has left #ruby: ()
[18:38:02] benlovell: has joined #ruby
[18:38:06] DEA7TH: has joined #ruby
[18:38:46] helpa: has joined #ruby
[18:39:17] Cust0sLim3n: has joined #ruby
[18:39:26] hinbody_: has joined #ruby
[18:39:33] cored: has joined #ruby
[18:40:08] nickjj_: has joined #ruby
[18:41:13] banjara: has joined #ruby
[18:42:00] mjuszczak: has joined #ruby
[18:42:38] catoblepa: has joined #ruby
[18:42:39] chipotle: has joined #ruby
[18:42:58] sindork: has joined #ruby
[18:43:14] failshell: has joined #ruby
[18:43:32] Vile`: has joined #ruby
[18:43:45] PDI: has joined #ruby
[18:44:35] jeadre: has joined #ruby
[18:46:39] denisemccoy: has joined #ruby
[18:46:46] bigredboots: has joined #ruby
[18:47:07] yqt: has joined #ruby
[18:47:55] rakm: has joined #ruby
[18:48:50] mjuszczak: Is there a shorthand I can use so I don't have to do: if blah.nil? OR hoarf.nil? OR ribbit.nil? OR...
[18:49:23] Ox0dea: mjuszczak: unless [foo, bar, baz].all?
[18:49:30] mjuszczak: Ahhh! Thanks!
[18:49:32] zendrix: has joined #ruby
[18:49:34] Ox0dea: Sure thing.
[18:50:01] zendrix: has left #ruby: ()
[18:50:10] apeiros: *if you don't mind it making no difference between nil & false
[18:50:55] nofxx: ^ also in that case: blah || hoarf || ribbit reads better imo
[18:50:56] bigredbo_: has joined #ruby
[18:51:21] icarus: has joined #ruby
[18:52:10] Papierkorb: is instance_eval basically a public alias for binding.eval?
[18:52:13] Papierkorb: Or is there a difference?
[18:52:34] mjuszczak: nofxx: ahh, gotcha. OK, thanks!
[18:52:58] Mon_Ouie: Papierkorb: They're not at all the same thing
[18:53:17] Mon_Ouie: Binding#eval can only accept a String to start with, while instance_eval works with a block too
[18:55:13] gambl0re: has joined #ruby
[18:55:16] lampd1: has joined #ruby
[18:55:33] toretore: has joined #ruby
[18:55:38] Tuxero: has joined #ruby
[18:55:41] dionysus69: has joined #ruby
[18:56:47] timonv: has joined #ruby
[18:58:35] platzhirsch: has joined #ruby
[19:00:10] Travis-42: I'm trying to better understand ruby memory allocation: When "5.times { foo = 6 }" is run, ruby will use up 5 object slots (a new one on each iteration), unless GC runs during the iteration, right (in which case it'll reuse the "freed" slots)? E.g. for something like rails??? find_each do be more efficient than all.each, it relies on GC running at some point? Or am I not understanding?
[19:01:04] Mon_Ouie: In MRI, Fixnums don't need to be allocated or GC'd because the memory used by the reference holds the value of the fixnum as well
[19:01:55] dgutierrez1287: has joined #ruby
[19:02:26] devoldmx: has joined #ruby
[19:02:36] JoshL: has joined #ruby
[19:03:22] j_mcnally: has joined #ruby
[19:03:43] ruby-lang813: has joined #ruby
[19:03:54] Travis-42: well, I???m trying to better understand why find_each in rails (which creates 1000 item arrays) is much better for memory than all.each ??? so suppose something like 100_000_000.times { foo = ???a string??? }. memory stays stable (even though GC.stat shows 100,000,000 freed objects), but if I disable GC just before, memory balloons
[19:03:55] sinaef: has joined #ruby
[19:04:22] Travis-42: is the reason because GC is running before the heap size increases, freeing and reusing old slots?
[19:05:53] psye: has joined #ruby
[19:07:06] apeiros: Travis-42: a) #rubyonrails and b) I think you're talking about old rails versions where .all was what .to_a is today, i.e. reads all into memory upfront.
[19:07:32] Travis-42: apeiros: I???m really not trying to ask about rails, I???m trying to understand ruby memory allocation
[19:07:46] Travis-42: it was just an example
[19:07:52] apeiros: Travis-42: then you should use an example you fully understand
[19:07:52] ddarkpassenger: has joined #ruby
[19:08:13] apeiros: also "better" does not exist. "in context X better" exists.
[19:09:35] Travis-42: User.all.each still works in rails 4.2.3, but I???m sorry if my example was a little outdated, I???m just trying to understand why allocating 1000 item arrays 100 times doesn???t balloon memory the same way that a single 100,000 item array would
[19:09:37] apeiros: and wrt ruby gc, one aspect of the context is the specific ruby version, since GC has changed quite a bit from 1.9 to 2.0 to 2.1 to 2.2
[19:09:54] Travis-42: Ruby 2.2 Is really where I???m looking at
[19:09:57] catoblepa: has joined #ruby
[19:10:03] apeiros: Travis-42: that's what I mean by "fully understand". yes, it still works. but no, it doesn't work the same anymore.
[19:10:20] apeiros: rails 3.x .all returns an array. rails 4.x .all returns a relation.
[19:10:20] Travis-42: 100_000_000.times { foo = ???a string??? } doesn???t balloon memory (unless GC.disable is called), even though it allocates 100,000,000 objects
[19:10:27] apeiros: *massively* different beast.
[19:11:00] leat1: has joined #ruby
[19:11:03] apeiros: that'd most likely be because `foo` goes out of scope on every iteration and can be GC'd
[19:11:44] benlovell: has joined #ruby
[19:11:47] hectortrope: has joined #ruby
[19:12:42] leat1: has joined #ruby
[19:12:43] jenrzzz: has joined #ruby
[19:13:23] apeiros: and ruby 2.2 has a generational gc too, and foo almost certainly remains in the young generation which gets GC'd more aggressively.
[19:13:40] Travis-42: right, so the reason the creating 1000 item arrays 100 times doesn???t balloon memory is because GC is running during the process ??? the slots in the ruby heap can???t be reused until GC in some form runs
[19:14:03] Travis-42: that makes a lot of sense, thank you apeiros. I wasn???t sure that I understood the basic idea
[19:14:21] apeiros: 100_000_000.times { foo = ???a string??? } does *not* create *any* array at all
[19:14:32] Travis-42: I understand, I was just comparing
[19:15:36] Travis-42: thank you for your help
[19:18:13] choke: has joined #ruby
[19:18:51] dorei: has joined #ruby
[19:21:32] molawson: has joined #ruby
[19:23:26] Inoperable: Guest75145 I like to 5th point especially
[19:23:28] Inoperable: 5. The Ruby community is condescending and snobbish
[19:23:39] cool: has joined #ruby
[19:23:42] stef204: has joined #ruby
[19:24:25] jhass: >> "w4".to_i(36).step(by: 37, to: "w4".to_i(36) + 37*10).map {|n| n.to_s(36) }
[19:24:26] ruboto: jhass # => ["w4", "x5", "y6", "z7", "108", "119", "12a", "13b", "14c", "15d", "16e"] (https://eval.in/423806)
[19:24:33] jhass: you broke the sequence :(
[19:25:07] jhass: I see nobody else talking
[19:25:15] jhack: has joined #ruby
[19:25:17] apeiros: how can we say that in a snobbish and condescending way?
[19:25:21] cantaberry: has joined #ruby
[19:25:25] jhass: ?guys Inoperable
[19:25:26] ruboto: Inoperable, Though inclusion was probably intended, not everyone relates to being "one of the guys". Maybe consider using "folks", "all", "y'all", or "everyone" instead?
[19:25:44] apeiros: oh yes, how dare you to condescend me!
[19:26:11] elepedus: has joined #ruby
[19:26:43] allcentury: ACTION wonders what he just walked into...
[19:26:52] lele: has joined #ruby
[19:27:15] baweaver: has joined #ruby
[19:27:20] jhass: bored people
[19:27:51] jhass: ACTION hopes we didn't scare Inoperable
[19:27:54] dented42: has joined #ruby
[19:28:04] tubbo: i hope we did
[19:28:15] tubbo: more rails jobs for meeeeeeeeeeeeeeee
[19:29:36] voltalio: has joined #ruby
[19:30:29] giuseppesolinas: has joined #ruby
[19:30:37] dstarh: we have this assertion on a test that fails about 1 in 100 times, anyone have any thoughts? https://gist.github.com/dstarh/24e95d99cc70716cc929
[19:30:48] northfurr: has joined #ruby
[19:32:07] apeiros: entries_ids.sort_by{|key, value| value} gives {:id=>232971}, {:id=>232969}, {:id=>232970}? o0
[19:32:14] Mon_Ouie: Yes it does
[19:32:16] Mon_Ouie: value is nil
[19:32:17] apeiros: well, add in the missing []
[19:32:48] apeiros: yeah, random sort order :D
[19:32:50] jhass: wat, it doesn't autosplat there?
[19:33:00] apeiros: autosplat a hash?
[19:33:05] moredhel: has joined #ruby
[19:33:14] jhass: lol, tricked me too
[19:33:26] apeiros: dstarh: you want sort_by { |hash| hash[:id] } probably
[19:33:40] apeiros: also update the "actual" part in the assertion
[19:33:53] but3k4: has joined #ruby
[19:34:31] apeiros: well spotted, Mon_Ouie :D
[19:34:57] Limix: has joined #ruby
[19:36:58] _blizzy_: has joined #ruby
[19:37:36] nitenq: has joined #ruby
[19:38:10] weemsledeux: has joined #ruby
[19:38:12] JoshGlzBrk: has joined #ruby
[19:38:17] gizless: has joined #ruby
[19:38:39] dstarh: apeiros Mon_Ouie thanks
[19:38:45] cmckee: has joined #ruby
[19:42:13] linuxboytoo: has joined #ruby
[19:42:31] solocshaw: has joined #ruby
[19:42:34] ferhaty: has joined #ruby
[19:42:47] einarj: has joined #ruby
[19:43:27] k3asd`: has joined #ruby
[19:44:17] JoshL: has joined #ruby
[19:44:25] krisquigley: has joined #ruby
[19:46:41] Guest50: has joined #ruby
[19:49:20] Asher: has joined #ruby
[19:51:40] flughafen_: has joined #ruby
[19:51:41] Cache_Money: has left #ruby: ()
[19:51:49] denisemccoy: has joined #ruby
[19:53:04] leat1: has joined #ruby
[19:54:36] mjuszczak: has joined #ruby
[19:56:06] Inoperable: another newb drama
[19:56:37] Inoperable: can someone enlighten me
[19:56:38] workmad3: has joined #ruby
[19:56:39] Inoperable: https://gist.github.com/anonymous/ed9739a7a587bb932eee
[19:56:47] jhack: has joined #ruby
[19:57:36] flughafen_: I have a question, I was unable to find it, but I i have a capybara/phantom js test suite, and I want to "live stream" the results to a browser...
[19:57:55] BraddPitt: flughafen_ you could open a websocket and publish results as tests finish
[19:58:22] slash_nick: flughafen_: related question - http://stackoverflow.com/questions/24769471/phantomjs-but-not-headless
[19:59:06] kinduff: has joined #ruby
[19:59:26] Guest11413: has joined #ruby
[20:00:03] ndrei: has joined #ruby
[20:00:06] flughafen_: slash_nick: sorry, but in this case, i only want the test results, not the screen shot. although that is neat
[20:00:07] Mon_Ouie: Inoperable: Do you realize that 1..5 is not an Array?
[20:00:21] Inoperable: it's a range
[20:00:41] Inoperable: but is_a?Array says it's an array
[20:00:52] Inoperable: at least it says true
[20:00:53] Mon_Ouie: [1..5] and 1..5 are not the same thing
[20:01:10] Mon_Ouie: 1..5 is a Range, [1..5] is an Array that contains one element which happens to be a Range
[20:01:30] slash_nick: flughafen_: sorry, i completely misunderstood..
[20:01:41] Inoperable: Mon_Ouie .. syntax fail...
[20:01:53] ozzloy: has joined #ruby
[20:02:01] jenrzzz: has joined #ruby
[20:02:10] opensource_ninja: has joined #ruby
[20:02:21] Billias: has joined #ruby
[20:02:31] Mon_Ouie: And flatten is to flatten nested arrays. Since you don't have any nested arrays in your code (only arrays of integers or ranges), it doesn't do anything in your examples.
[20:03:38] yardenbar: has joined #ruby
[20:04:30] rbennacer: has joined #ruby
[20:05:04] einarj: has joined #ruby
[20:05:18] Inoperable: yeah, i can see that now
[20:05:25] Inoperable: just dumb syntax assumption
[20:05:37] Inoperable: dunno why i didnt thought about it
[20:06:04] dopamean_: has joined #ruby
[20:06:27] Ketzel: has joined #ruby
[20:06:43] Inoperable: it's that snobbish language!
[20:06:45] Mia: has joined #ruby
[20:06:45] Mia: has joined #ruby
[20:06:54] jamesaxl: has joined #ruby
[20:07:22] shevy: it's simple
[20:07:27] JoshL_: has joined #ruby
[20:07:30] prefixed: has joined #ruby
[20:07:32] shevy: you just put instructions into tiny things
[20:07:41] ruboto: Though inclusion was probably intended, not everyone relates to being "one of the guys". Maybe consider using "folks", "all", "y'all", or "everyone" instead?
[20:07:54] shevy: our old friend is back
[20:08:00] PDI: if i have a case, and inside of the case i have a when, i have to use 'end' to end the when, and another 'end', to end the case, right?
[20:08:02] shevy: Ketzel you should find a job man
[20:08:16] shevy: PDI that would be one "end" too many
[20:08:20] Ketzel: i have a job
[20:08:22] Ketzel: and that job
[20:08:25] Ketzel: is to serve justice
[20:08:27] PDI: no end for the case then shevy
[20:08:36] shevy: Ketzel come on, do something productive with your life
[20:08:39] Mon_Ouie: No 'end' for the 'when'
[20:08:57] Mon_Ouie: case object; when pattern; do stuff; when other_pattern; do other stuff; end
[20:08:58] shevy: PDI only for the case but not for the when, remember you can have lots of when but only one case associated with these many when's
[20:09:39] Inoperable: Ketzel how much calories that justice of your's have?
[20:09:43] PDI: I was looking at someone else's code, and his indentation is off. he has an if else at the end of each when, but the when was indented to the when
[20:09:56] PDI: so i though the end was for the when, but it is for the if / else
[20:10:30] Ketzel: Inoperable: Like, all of them
[20:10:41] prefixed: let's say I want to iterate over some instance vars, but I want to ignore a specific field. how do I do this?
[20:10:45] shevy: PDI yeah, people often indent strangely with case/when
[20:11:00] MasterPiece: has joined #ruby
[20:11:05] Mon_Ouie: !mute Ketzel
[20:11:05] ruboto: +q Ketzel!*@*
[20:11:05] ruboto: -o ruboto
[20:11:20] shevy: the less "end" you can get away with, the better. once you have 8 ends in a row something is usually ... not so good
[20:11:31] shevy: I had that once too :)
[20:11:49] flughafen_: should i use poltergeist websocket? i think it's already got websocket things going on.
[20:11:58] PDI: ruby is pretty sweet.
[20:12:07] baweaver: Mon_Ouie: ban kiwiirc for a bit.
[20:12:17] shevy: flughafen_ nothing flying in berlin?
[20:12:25] Mon_Ouie: Yeah, probably
[20:12:31] flughafen_: shevy: only my dreams, and they're going far far away
[20:12:31] shevy: Ketzel will be back :)
[20:12:34] jeadre: has joined #ruby
[20:12:37] shevy: lol flughafen_
[20:12:40] ChanServ: +o Mon_Ouie
[20:12:41] yfeldblum: has joined #ruby
[20:12:57] shevy: flughafen_ that's actually beautiful... berlin ruby hackers have dreams
[20:13:00] prefixed: let's say I want to iterate over some instance vars, but I want to ignore a specific field. how do I do this?
[20:13:03] ellisTAA: has joined #ruby
[20:13:04] kadoppe: has joined #ruby
[20:13:15] Mon_Ouie: +b *!*@*kiwiirc.com*
[20:13:32] Mon_Ouie: -o Mon_Ouie
[20:13:46] flughafen_: shevy: i'm programming, neat huh!
[20:14:14] Inoperable: flughafen_ an airport?
[20:14:40] choke: has joined #ruby
[20:14:45] shevy: yeah, german
[20:14:53] adaedra: program me an airport.
[20:14:59] shevy: we do! in cobol
[20:15:07] flughafen_: Inoperable: yes, indeed
[20:15:23] Jean_Luc: has joined #ruby
[20:15:31] Jean_Luc: No being is so important it can usurp the rights of another.
[20:15:37] Jean_Luc: this would include the right to the proper use of the english language
[20:15:39] ruboto: Though inclusion was probably intended, not everyone relates to being "one of the guys". Maybe consider using "folks", "all", "y'all", or "everyone" instead?
[20:15:45] craysiii: staatsangehoerigkeit
[20:15:46] ecnalyr: has joined #ruby
[20:15:52] shevy: he is back!
[20:16:07] Jean_Luc: welcome me!
[20:16:08] Polysics: has joined #ruby
[20:16:11] shevy: and challenging Mon_Ouie to a duel to the death
[20:16:12] pyon: has joined #ruby
[20:16:16] Mon_Ouie: !mute Jean_Luc
[20:16:16] ruboto: +q Jean_Luc!*@*
[20:16:16] ruboto: -o ruboto
[20:16:19] Inoperable: stadtsunterhaltungseinheiten
[20:16:49] baweaver: Just ping one of the ops if they come back, ignore anything they say.
[20:17:34] jeadre: has joined #ruby
[20:17:36] adaedra: I hope they will get tired quickly today.
[20:17:57] jhass: +b-o *!*@*198.8.80.182 jhass
[20:18:14] ruboto: I don't know anything about girls
[20:18:16] Ketzel: has left #ruby: (requested by jhass (Your behavior is not conductive to the desired environment.))
[20:18:22] Motoservo: has joined #ruby
[20:18:24] shevy: craysiii are you starting it now :D
[20:18:25] porfa: has joined #ruby
[20:18:32] craysiii: i was just seeing if there was one :P
[20:18:34] flughafen_: hey baweaver the hackathon master in ze haus!
[20:19:05] craysiii: i wonder how everyone would feel if people just started addressing people as girls instead of guys.
[20:19:06] Guest50: has joined #ruby
[20:19:14] ChanServ: +o havenwood
[20:19:34] shevy: craysiii nope you are right... ruboto favours ?guys but not ?girls
[20:19:41] shevy: damn macho bot
[20:19:45] blackmes1: has joined #ruby
[20:19:48] porfa: any watir experts around here? :D
[20:19:50] ChanServ: -o havenwood
[20:19:59] craysiii: ruboto needs to check it's privilege or something
[20:20:06] ruboto: this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
[20:20:14] _djbkd: has joined #ruby
[20:20:14] Cust0sLim3n: has joined #ruby
[20:20:32] porfa: any watir ruby-gem experts here? :D
[20:20:36] BraddPitt: I would like to know why the ?guys trigger still exists
[20:20:48] ruboto: this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
[20:20:48] BraddPitt: still have the same problem as yesterday, Porfa?
[20:20:54] _djbkd: has joined #ruby
[20:20:58] prefixed: how can I iterate over an object's fields to perform some operation, but ignore one specific one?
[20:21:01] apeiros: ?ot BraddPitt
[20:21:01] ruboto: BraddPitt, this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
[20:21:04] einarj_: has joined #ruby
[20:21:10] shevy: what are "fields" in this context?
[20:21:10] porfa: BraddPitt: neon! i submitted to RVM, everythin's working perfectly now! :)
[20:21:42] craysiii: prefixed cant you use next in your loop?
[20:21:58] workmad3: has joined #ruby
[20:22:04] prefixed: craysiii how do I identify the field?
[20:22:07] prefixed: what's the notation
[20:22:15] toretore: prefixed: !code
[20:22:24] porfa: now i just need to learn how to navigate my forms and pages like i learned with mechanize, but somehow i find more info online with mechanize, besides, when i enter a link/click something and i go to another page, mechanize automatically spits everything it can do on that page, watir doesn't.. just wondering how i inspect elements using watir
[20:22:25] toretore: prefixed: ?code
[20:22:27] mjuszczak: has joined #ruby
[20:22:30] apeiros: -o apeiros
[20:22:37] baweaver: other way around toretore
[20:22:40] prefixed: toretore this isn't a question that requries code
[20:22:50] prefixed: it's literally a syntax question
[20:22:56] toretore: no it is not
[20:22:57] shevy: ok but what is a "field" then
[20:23:28] craysiii: are you iterating over a hash? then you would just place a conditional on the key or value, depending on your requirements
[20:23:29] shevy: in general, you can apply .select or .reject
[20:23:51] krisquigley: has joined #ruby
[20:23:53] shevy: so whatever the "fields" are, select only those you want to, and not the other ones (or reject those you don't want to - same difference really)
[20:23:55] craysiii: hadn't thought of that shevy :P
[20:24:01] prefixed: unless instance_var == [some instance var] ...
[20:24:11] shevy: craysiii I still have no idea what he means with field
[20:24:13] prefixed: shevy in other languages, instance vars are called fields
[20:24:39] shevy: do you have them spread out as individual instance variables?
[20:24:40] prefixed: e.g. java https://docs.oracle.com/javase/tutorial/reflect/member/field.html
[20:25:02] christiandsg: has joined #ruby
[20:25:03] shevy: well, you could use a CONSTANT in ruby too
[20:25:05] prefixed: what do you call the variables that are attached to an object?
[20:25:15] toretore: that doesn't exist
[20:25:18] toretore: this isn't java
[20:25:31] shevy: >> class Foo; BAR = []; BAR << 'hello'; BAR << ' world!'; end; Foo::BAR
[20:25:32] ruboto: shevy # => ["hello", " world!"] (https://eval.in/423838)
[20:25:44] shevy: a beautiful field :D
[20:26:22] Inoperable: prefixed object fields :)
[20:26:32] Mon_Ouie: prefixed: See Object#instance_variables
[20:26:50] Mon_Ouie: and instance_variable_{get,set}
[20:27:03] prefixed: I don't want to get the value stored
[20:27:22] prefixed: I just want to identify a specific instance_variable and ignore it
[20:27:23] shevy: you can obtain all of them via .instance_variables anyway though
[20:27:33] Mon_Ouie: "ignore it"?
[20:27:35] prefixed: yes i want to ignore one when iterating over them
[20:27:40] prefixed: not perform some operation
[20:27:48] prefixed: ignore = pretend it doesn't exist
[20:27:56] shevy: >> class Foo; def initialize; @foo = 5; end; end; Foo.new.instance_variables
[20:27:57] ruboto: shevy # => [:@foo] (https://eval.in/423843)
[20:27:59] prefixed: i feel liek i am speaking a different language here
[20:28:00] Mon_Ouie: Well, just the same as when you iterate over any array
[20:28:09] shevy: once you have them as Array, you can apply .select or .reject
[20:28:20] hoggy_: has joined #ruby
[20:29:05] toretore: prefixed: you are. you're not making any sense because you speak in terms and concepts that are not applicable to ruby. explain the purpose, the goal instead
[20:29:45] prefixed: i have an object with some fields. i want to ignore one when iterating over the fields
[20:29:52] prefixed: this is not a hard concept
[20:29:53] toretore: ruby objects don't have fields
[20:29:58] Mon_Ouie: Show us how you're iterating over "fields".
[20:29:59] prefixed: jesus christ
[20:30:01] prefixed: has left #ruby: ()
[20:30:17] BraddPitt: this channel has gone so far down hill
[20:30:17] litn: has joined #ruby
[20:30:43] shevy: not yet someone has to do ?guys :>
[20:30:47] workmad3: BraddPitt: we hit rock bottom... and kept on digging! ;)
[20:30:48] roolo: Is there way in Jekyll to define dependencies?
[20:31:03] roolo: Example: I change one post and I want also tags page to be regenerated
[20:31:03] havenwood: BraddPitt: Happy to discuss in #ruby-offtopic or #ruby-community.
[20:31:14] litn: hi guys, is there a better or more barebones framework than ruby on rails?
[20:31:35] baweaver: litn: Sinatra
[20:31:35] DCameronMauch: has joined #ruby
[20:31:36] BraddPitt: well havenwood I would like to but it seems people just avoid discussion there
[20:31:38] shevy: litn sinatra and padrino perhaps
[20:31:49] BraddPitt: litn try python and flask
[20:32:11] baweaver: Padrino is Sinatra with some extra features
[20:32:23] shevy: and cute little beavers as icons \o/
[20:32:26] havenwood: litn: Roda is lovely! By the maintainer of Sequel.
[20:32:39] litn: alright, I'll check out Roda and Sinatra
[20:32:40] baweaver: does it really?
[20:32:41] litn: thanks guys
[20:32:41] toretore: litn: https://www.ruby-toolbox.com/categories/web_app_frameworks
[20:32:45] havenwood: litn: http://roda.jeremyevans.net
[20:33:05] havenwood: litn: Sinatra has been around a lot longer. Roda is a project made by a Sinatra/Rails user and it's totally my cup of tea.
[20:33:24] banister: has left #ruby: ()
[20:33:30] havenwood: litn: Another one you might look at is Lotus.
[20:34:14] litn: roda's website is pretty bad
[20:34:17] havenwood: litn: With Roda you start with just a routing tree and add plugins for additional features as you need them.
[20:34:26] litn: this does not look very web 2.0 how can I trust a web framework with a website this bad?
[20:34:35] litn: look at that tree background
[20:34:37] litn: this is ridiculous
[20:34:41] litn: please don't link me this kind of garbage
[20:34:47] baweaver: web2.0 has been a dead concept for a while now
[20:34:59] kinduff: has joined #ruby
[20:35:00] baweaver: then again I would also not judge a framework by their lack of a designer.
[20:35:20] litn: this is a deeper issue than not having a designer
[20:35:23] litn: please look at this
[20:35:24] litn: http://roda.jeremyevans.net/css/roda.jpg
[20:35:25] havenwood: litn: Lotus then you aesthete: http://lotusrb.org
[20:35:50] sstangl: has joined #ruby
[20:36:14] ndrei: has joined #ruby
[20:36:19] litn: havenwood: this is better
[20:36:28] litn: well, what framework do you guys use?
[20:36:33] BraddPitt: hi sstangl welcome to our community
[20:36:42] baweaver: just saying, being design-challenged does not equate to a bad framework.
[20:36:49] ferhaty: has joined #ruby
[20:36:54] sstangl: hi BraddPitt, do you know what memory model the ruby VM requires? asking for WebAssembly reasons.
[20:36:55] havenwood: It's aesthetically lovely.
[20:37:02] shevy: though, cgi with some modifications like cgi-exception and such
[20:37:05] havenwood: Minimalist. I enjoy the code.
[20:37:05] baweaver: See: OpenBSD
[20:37:18] litn: shevy: really?
[20:37:34] oatzhakok: has joined #ruby
[20:37:35] shevy: litn yep but mostly because I switched from php to ruby in like 2003 or so
[20:37:35] roolo_: has joined #ruby
[20:37:37] litn: do you guys really use cgi
[20:37:43] shevy: I really do!
[20:37:43] litn: that's bad
[20:37:44] sstangl: cgi is fine
[20:37:55] litn: it's fine for small projects that are sub 100 users
[20:37:55] sstangl: it scales up to a few ten thousand users no problem
[20:37:56] BraddPitt: lmao don't you use cgi too litn
[20:38:01] havenwood: litn: Very black and white? Bad and good?
[20:38:02] sstangl: no cgi is good these days
[20:38:05] BraddPitt: I remember us talking about it a while ago
[20:38:09] litn: cgi is good for small projects
[20:38:15] havenwood: litn: cgi isn't commonly used with Ruby but you see it
[20:38:19] shevy: well, when you have a class in ruby, then you just serve it or the string, so you could do so via a .cgi file or rack or anything else really
[20:38:28] baweaver: I like CGI too. Easier to hack.
[20:38:35] litn: havenwood: maybe when you let idiots like shevy try writing web apps with ruby
[20:38:40] litn: baweaver: fcgi usually
[20:38:49] litn: but I will use cgi if lazy for something only I or a doezn people will be using
[20:38:49] havenwood: litn: don't insult folk here
[20:38:54] litn: sorry guys
[20:38:55] havenwood: litn: please be nice
[20:38:59] ruboto: +q litn!*@*
[20:38:59] ruboto: -o ruboto
[20:39:05] shevy: and I don't have any high traffic, in fact, I only ever had two people ever contact me about anything I wrote in like the last 6 years; one complained about lack of documentation (he was right), the other reported a bug
[20:39:33] ruboto: I don't know anything about folk
[20:39:34] jordanm: has joined #ruby
[20:39:40] shevy: ah unmute him, he wrote sorry :D
[20:39:45] havenwood: !unmute litn
[20:39:46] ruboto: -q litn!*@*
[20:39:46] ruboto: -o ruboto
[20:40:14] havenwood: Oh, apparently a troll.
[20:40:18] litn: hi BraddPitt
[20:40:26] ruboto: +q litn!*@*
[20:40:26] ruboto: -o ruboto
[20:40:42] BraddPitt: good to see we believe in second chances here
[20:40:50] sstangl: just a rollercoaster of emotions here lately
[20:40:58] havenwood: BraddPitt: When folk announce via PM they're trolling...
[20:41:03] havenwood: BraddPitt: That tends to give it away.
[20:41:07] shevy: sstangl they are having too much fun with ruboto
[20:41:15] miah: the amount of trolling in #ruby is too damned high.
[20:41:27] rakm: has joined #ruby
[20:41:33] BraddPitt: sorry havenwood I forgot to read your PMs
[20:41:36] Rinzlit1: has joined #ruby
[20:41:40] havenwood: BraddPitt: Yeah, you're not allowed.
[20:41:48] shevy: well, the channel is growing... #1106
[20:41:50] robh71: has joined #ruby
[20:42:03] oatzhakok: (????????? )
[20:42:15] oatzhakok: imo strong first post itc
[20:42:21] sstangl: has left #ruby: ()
[20:42:31] BraddPitt: sup oatzhakok
[20:42:41] oatzhakok: sup BraddPitt
[20:42:52] BraddPitt: oatzhakok are you a gril
[20:43:05] flughafen_: i need to go to bed, ttyl
[20:43:07] oatzhakok: BraddPitt: :3
[20:43:37] oatzhakok: miah: http://images.bwbx.io/cms/2013-12-09/1209_mcmillan_630x420.jpg
[20:43:41] baweaver: ACTION sighs at lack of maturity, goes back to work
[20:43:58] shevy: some IRC nicks are dead give-aways
[20:44:03] zendrix: has joined #ruby
[20:44:12] oatzhakok: shevy: excuse me
[20:44:23] oatzhakok: my nick is my 4chan tripcode
[20:44:26] shevy: come on...
[20:44:59] craysiii: 16^0.5chan is lame.
[20:45:05] BraddPitt: nice meme craysiii
[20:45:28] roolo: has joined #ruby
[20:45:28] BraddPitt: not how this botto works oatzhakok
[20:45:32] oatzhakok: which one does google
[20:45:37] ruboto: craysiii # => Float can't be coerced into Float (TypeError) ...check link for more (https://eval.in/423856)
[20:45:38] BraddPitt: your browser
[20:45:53] lipoqil: has joined #ruby
[20:45:53] ta: has joined #ruby
[20:46:33] ruboto: Though inclusion was probably intended, not everyone relates to being "one of the guys". Maybe consider using "folks", "all", "y'all", or "everyone" instead?
[20:46:42] oatzhakok: folks is a bullshit term
[20:46:45] oatzhakok: just say "people"
[20:46:55] havenwood: oatzhakok: Don't spam the bot.
[20:46:57] oatzhakok: i hate politicians who say "folks"
[20:46:58] BraddPitt: ahahahahaha
[20:47:05] oatzhakok: havenwood: hey man
[20:47:07] BraddPitt: yeah havenwood tell him to stop spaming
[20:47:09] oatzhakok: i did it the one time
[20:47:17] craysiii: people is bullshit term
[20:47:22] craysiii: should just use biological lifeform
[20:47:29] oatzhakok: that's stupid
[20:47:31] ruboto: this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
[20:47:34] craysiii: youre being exclusionary
[20:47:43] woodruffw: i'm non-biological
[20:47:44] shevy: it's the nick, he was destined to getting knocked out :)
[20:47:45] oatzhakok: why wouldn't i exclude non humans
[20:47:51] oatzhakok: non humans can go pound sand
[20:47:56] oatzhakok: we won the planet
[20:47:57] ChanServ: +o havenwood
[20:48:00] oatzhakok: so we get to do what we want with it
[20:48:02] adaedra: >> 16**0.5 # craysiii
[20:48:03] ruboto: adaedra # => 4.0 (https://eval.in/423857)
[20:48:18] craysiii: thanks, wrong language :P
[20:48:31] adaedra: ^ is binary xor
[20:48:37] shevy: I am ashamed to admit but right now I am also confused craysiii
[20:48:52] shevy: 16 to the power of 1/2 is 4? hmm I need to redo maths
[20:49:02] Mon_Ouie: x^(1/2) is sqrt(x)
[20:49:32] oatzhakok: BraddPitt: :(
[20:49:42] lipoqil_: has joined #ruby
[20:50:05] workmad3: shevy: for the reason behind that, think in terms of (x^0.5 * x^0.5) = (x^(0.5 + 0.5) ) = x^1 = x
[20:50:28] BraddPitt: ?ot workmad3 shevy adaedra craysiii Mon_Ouie woodruffw
[20:50:28] ruboto: workmad3, this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
[20:50:52] woodruffw: BraddPitt: excuse you
[20:50:56] shevy: workmad3 hmm let me digest that ...
[20:51:11] oatzhakok: ?ot oatzhakok
[20:51:11] ruboto: oatzhakok, this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
[20:51:36] oatzhakok: why so verbose
[20:51:40] BraddPitt: I do not need to be excused but thank you woodruffw
[20:51:43] einarj: has joined #ruby
[20:51:43] oatzhakok: it's like you want people to abuse the bots
[20:51:44] havenwood: !ban oatzhakok !T 1h you were warned not to spam the bot
[20:51:45] ChanServ: +b oatzhakok!*@*
[20:51:45] ChanServ: ChanServ kicked oatzhakok: you were warned not to spam the bot
[20:54:15] workmad3: shevy: if you really want a fun one = `0^0 = 1` ;)
[20:54:56] adaedra: that's math
[20:55:11] shevy: my old weakness
[20:55:16] litn: has left #ruby: ()
[20:55:37] einarj_: has joined #ruby
[20:55:42] workmad3: adaedra: I'm wondering if anyone is going to raise the point that my statement is only true in certain contexts where x^y has been made continuous at the origin...
[20:55:50] workmad3: adaedra: but no one did quickly enough
[20:56:01] ruboto: Mon_Ouie # => 1 (https://eval.in/423858)
[20:56:05] Mon_Ouie: Your statement is the universal truth.
[20:56:18] adaedra: 0**0 looks like a smiley.
[20:56:21] devdazed_: has joined #ruby
[20:56:26] minimuffins: has joined #ruby
[20:56:38] baweaver: has joined #ruby
[20:56:49] workmad3: Mon_Ouie: 'universal truth' == 'special-cased in ruby's exponent operator'? :)
[20:56:51] nkts: has joined #ruby
[20:57:09] craysiii: i thought 0^0 was 1?
[20:57:15] craysiii: in real life
[20:57:47] Mon_Ouie: 0^0 is often left undefined because 0^x for any x is 0 while x^0 for any x is 1
[20:57:52] adaedra: I remember that n^0 = 1 whatever n is or something like that, but I may be wrong
[20:58:39] workmad3: adaedra: yeah... and the rationale for that involves division by 0 for 0^0
[20:59:06] rodfersou: has joined #ruby
[20:59:16] Rubie: has joined #ruby
[20:59:16] workmad3: adaedra: and as Mon_Ouie points out, if you do 0^n and let n tend to 0, it's 0 all the way, and jumps (is discontinuous) at 0^0
[20:59:22] adaedra: I wasn't listening in math lessons anyway.
[21:00:01] ChanServ: -o havenwood
[21:00:48] workmad3: adaedra: it's also fun to throw out 'the sum of all natural numbers is -1/12' and watch the ensuing arguments :)
[21:01:48] Mon_Ouie: 1 = sqrt(1) = sqrt((-1)(-1)) = sqrt(-1)sqrt(-1) = i^2 = -1
[21:02:12] craysiii: i dont know whats real anymore
[21:02:34] workmad3: Mon_Ouie: hehe
[21:02:57] adaedra: The flaw is at 1 = sqrt(1)
[21:02:59] zenguy_pc: has joined #ruby
[21:03:10] cantaberry: has joined #ruby
[21:03:12] elepedus: has joined #ruby
[21:03:13] devoldmx: has joined #ruby
[21:03:40] Azure: has joined #ruby
[21:04:17] banjara1: has joined #ruby
[21:04:19] Mendenhall: has joined #ruby
[21:04:21] workmad3: adaedra: the flaw is that the step `sqrt(x * x) = sqrt(x) * sqrt(x)` isn't properly defined for x < 0
[21:04:22] unver: has joined #ruby
[21:04:53] zenguy_pc: has joined #ruby
[21:06:29] Mon_Ouie: ^ Especially confusing because usually you're taught about sqrt(a*b) = sqrt(a)*sqrt(b) before knowing about complex numbers, and people tend to assume properties like this generalize to negative numbers if they have square roots as well
[21:07:24] sargas: has joined #ruby
[21:07:25] workmad3: ^ also means that when most people are taught it, they either aren't shown or skip right over 'sqrt(a*b) = sqrt(a)sqrt(b) for a,b > 0`
[21:10:19] heftig: workmad3: where does it break?
[21:10:27] Musashi007: has joined #ruby
[21:10:40] zenguy_pc: has joined #ruby
[21:10:40] unreal_: has joined #ruby
[21:10:54] workmad3: Mon_Ouie: thanks btw, I feel I have learned something about maths recently now... a year or two ago, I'd have completely stumbled over that one
[21:10:54] heftig: ah, that thing there
[21:15:20] cornerma1: has joined #ruby
[21:17:43] atomical_: has joined #ruby
[21:17:53] ellisTAA: has joined #ruby
[21:18:34] jeadre: has joined #ruby
[21:19:06] neanderslob: has joined #ruby
[21:20:57] einarj: has joined #ruby
[21:20:59] molawson: has left #ruby: ("Textual IRC Client: www.textualapp.com")
[21:23:51] FernandoBasso: has joined #ruby
[21:24:03] ellisTAA: has joined #ruby
[21:24:58] Pumukel: has joined #ruby
[21:25:13] meatherly: has joined #ruby
[21:25:51] j_mcnally: has joined #ruby
[21:26:01] d2dchat: has joined #ruby
[21:27:52] christiandsg: has joined #ruby
[21:28:17] iamninja: has joined #ruby
[21:28:54] dgutierrez1287: has joined #ruby
[21:31:17] hololeap: has joined #ruby
[21:33:53] Voxxit: has joined #ruby
[21:36:07] ddarkpassenger: has joined #ruby
[21:37:17] danman: has joined #ruby
[21:37:53] Mia: has joined #ruby
[21:38:18] vyorkin: has joined #ruby
[21:38:44] C1V0: has joined #ruby
[21:39:24] Olipro-: has joined #ruby
[21:41:04] Guest50: has joined #ruby
[21:41:08] meatherly: has joined #ruby
[21:42:26] rbennacer: has joined #ruby
[21:42:38] skade: has joined #ruby
[21:45:25] khebbie: has joined #ruby
[21:45:27] Azure|dc: has joined #ruby
[21:47:53] BraddPitt: this is badass http://c7.se/go-and-ruby-ffi/?utm_source=rubyweekly&utm_medium=email
[21:48:21] meatherly: has joined #ruby
[21:49:49] catoblepa: has joined #ruby
[21:50:26] dfockler: https://github.com/alexcrichton/rust-ffi-examples/tree/master/ruby-to-rust
[21:50:36] dfockler: BraddPitt: you can do the same thing in Rust :)
[21:50:50] hyy: has joined #ruby
[21:51:44] ChanServ: -b oatzhakok!*@*
[21:52:00] baweaver: has joined #ruby
[21:54:10] luckyme: has joined #ruby
[21:54:51] einarj_: has joined #ruby
[21:56:00] zdman135: has joined #ruby
[21:58:33] FernandoBasso: has joined #ruby
[21:59:33] Maletor: has joined #ruby
[22:00:39] Kallis: has joined #ruby
[22:04:11] jenrzzz_: has joined #ruby
[22:04:33] vyorkin: has joined #ruby
[22:07:28] acke: has joined #ruby
[22:08:30] denisemccoy: has joined #ruby
[22:09:58] davedev24: has joined #ruby
[22:10:57] sdwrage: has joined #ruby
[22:11:41] leat1: has joined #ruby
[22:13:50] leat1: has joined #ruby
[22:15:46] stevednd: has joined #ruby
[22:16:41] sdwrage: has joined #ruby
[22:16:52] ledestin: has joined #ruby
[22:17:22] jamesaxl|2: has joined #ruby
[22:19:29] i: has joined #ruby
[22:20:48] zendrix: has joined #ruby
[22:21:13] voltalio: has joined #ruby
[22:22:09] r0x0rZ: has joined #ruby
[22:22:35] chichou: has joined #ruby
[22:23:44] leat1: has joined #ruby
[22:23:46] symm-: has joined #ruby
[22:27:02] lkba: has joined #ruby
[22:28:50] Salve_: has joined #ruby
[22:29:13] jgt: has joined #ruby
[22:29:25] sdwrage: has joined #ruby
[22:30:19] Salve_: has joined #ruby
[22:31:34] ta: has joined #ruby
[22:33:30] Mia: has joined #ruby
[22:33:48] Mia: has joined #ruby
[22:35:48] voltalio: has joined #ruby
[22:37:35] ecnalyr: has joined #ruby
[22:38:18] kies: has joined #ruby
[22:38:19] s2013: has joined #ruby
[22:39:02] Limix: has joined #ruby
[22:39:29] jesterfraud: has joined #ruby
[22:39:43] Musashi007: has joined #ruby
[22:40:11] einarj: has joined #ruby
[22:41:03] jhack32: has joined #ruby
[22:42:44] pglombar_: has joined #ruby
[22:45:38] christiandsg: has joined #ruby
[22:46:01] Cust0sLim3n: has joined #ruby
[22:46:09] northfurr: has joined #ruby
[22:49:27] Mendenhall: has joined #ruby
[22:50:10] s2013: has joined #ruby
[22:50:26] acke: has joined #ruby
[22:52:10] ruby_forthe_win: has joined #ruby
[22:53:00] Inoperable: has joined #ruby
[22:54:03] ruby_forthe_win: has left #ruby: ()
[22:54:23] PaulVern: has joined #ruby
[22:54:32] PaulVern: Hi, I am relatively new to Ruby. I have written the following script: http://paste.ofcode.org/vvVY46Ep87kGrS48tCAywT
[22:54:35] startupality: has joined #ruby
[22:54:42] PaulVern: Can someone tell me why the output is 'nill' ?
[22:54:48] PaulVern: I was expecting 'blah'
[22:55:04] Mon_Ouie: >> {key: "value"}
[22:55:05] ruboto: Mon_Ouie # => {:key=>"value"} (https://eval.in/423887)
[22:55:09] PaulVern: I thought I was accessing the hosted_zone_id key
[22:55:22] Mon_Ouie: PaulVern: ^ notice how this is written as :key => "value"? The key is not a String, but a Symbol
[22:55:41] PaulVern: Mon_Ouie: Ah
[22:56:33] jesterfraud: has joined #ruby
[22:57:29] busterarm: has joined #ruby
[22:58:17] yashinbasement: has joined #ruby
[22:59:13] yashinbasement: what does srand(1) does in ruby
[23:00:44] Kallis: has joined #ruby
[23:00:46] giuseppesolinas: has joined #ruby
[23:01:00] zendrix: has joined #ruby
[23:02:24] Mon_Ouie: It sets the seed of the Random number generator. After a call to srand(1), subsequent calls to rand will consistently produce the same results.
[23:03:56] devoldmx: has joined #ruby
[23:07:18] Yzguy: has joined #ruby
[23:07:29] baweaver: yashinbasement: ^
[23:07:37] Yzguy: has joined #ruby
[23:07:47] araujo: has joined #ruby
[23:07:54] yashinbasement: yes now I can see
[23:08:05] baweaver: It happens on occasion.
[23:08:28] yashinbasement: yeah maybe it's because of autojoin
[23:08:38] yashinbasement: but I always get open on ror
[23:08:48] Inoperable: has joined #ruby
[23:09:03] baweaver: ACTION shrugs
[23:09:07] yashinbasement: so my question what does srand 1 do
[23:09:08] baweaver: who knows, strange things happen.
[23:09:13] WillAmes: has joined #ruby
[23:09:21] baweaver: Mon_Ouie: It sets the seed of the Random number generator. After a call to srand(1), subsequent calls to rand will consistently produce the same results.
[23:09:30] baweaver: (reposting)
[23:09:30] araujo: has joined #ruby
[23:10:35] yashinbasement: yeah there was a question that you need to guess what is next ruby random number
[23:11:05] araujo: has joined #ruby
[23:11:10] rbennacer: has joined #ruby
[23:12:22] gamename: has joined #ruby
[23:13:05] sankaber: has joined #ruby
[23:13:21] baweaver: I'd just be cheeky: def random; 1 end # chosen by a fair random dice roll
[23:13:24] alphaatom: has joined #ruby
[23:13:45] baweaver: https://xkcd.com/221/
[23:13:48] Mon_Ouie: (FYI, he left before you sent that message)
[23:14:07] baweaver: just saw that too
[23:14:56] leat1: has joined #ruby
[23:14:57] charliesome: has joined #ruby
[23:14:58] paulcsmith: has joined #ruby
[23:17:05] juanpaucar: has joined #ruby
[23:17:45] ngscheurich: has joined #ruby
[23:21:29] blue_deref: has joined #ruby
[23:23:20] lipoqil: has joined #ruby
[23:23:26] zendrix: has joined #ruby
[23:25:05] phillip: has joined #ruby
[23:26:13] tubuliferous_: has joined #ruby
[23:26:53] Sdwrage_: has joined #ruby
[23:27:41] charliesome: has joined #ruby
[23:30:13] Mia: has joined #ruby
[23:32:14] voltalio: has joined #ruby
[23:32:16] ta: has joined #ruby
[23:32:47] rbowlby: has joined #ruby
[23:33:53] mjuszczak: has joined #ruby
[23:34:45] dfockler: has joined #ruby
[23:35:07] dgutierrez1287: has joined #ruby
[23:35:55] voltalio: has joined #ruby
[23:37:14] workmad3: has joined #ruby
[23:37:27] Motoservo: has joined #ruby
[23:37:51] mary5030: has joined #ruby
[23:40:25] jenrzzz: has joined #ruby
[23:41:43] rbennacer: has joined #ruby
[23:42:56] TheNet: has joined #ruby
[23:44:55] Torrieri: has joined #ruby
[23:47:49] charliesome_: has joined #ruby
[23:47:56] tlolczyk: has joined #ruby
[23:51:01] gambl0re: has joined #ruby
[23:51:39] chipotle: has joined #ruby
[23:52:21] dimasg: has joined #ruby
[23:54:40] kristofferR: has joined #ruby
[23:54:43] radens: Hey, where can I speak to the ruby developers?
[23:54:45] Limix: has joined #ruby
[23:55:02] radens: I found something odd in ripper that I think is a bug.
[23:55:07] baweaver: ACTION looks at channel name
[23:55:24] baweaver: Most of the time there's a ruby bug tracker if it's in source
[23:55:28] baweaver: just a sec.
[23:55:43] tokik: has joined #ruby
[23:55:51] radens: baweaver: #python is not where you go if you want to ask guido about the python parser.
[23:56:21] baweaver: yes, but #elixir-lang is where you can ask Jose about elixir :)
[23:56:30] baweaver: depends on the channel / group honestly.
[23:56:44] baweaver: https://bugs.ruby-lang.org/
[23:56:48] baweaver: there it is
[23:57:11] baweaver: as far as I know, Ox0dea and tenderlove tend to be more frequent on the core issues
[23:57:46] Mon_Ouie: Wasn't there a #ruby-core channel? Not sure how active iti s
[23:58:06] baweaver: yeah, I'd have to check myself.