« Back to channel list

#ruby - 23 July 2015

« Back 1 day Forward 1 day »
[00:00:08] al2o3-cr: a snippets not allowed
[00:00:27] RickHull: L473 should be qctr += 1
[00:00:43] al2o3-cr: that end could be anywhere
[00:00:48] blaines: has joined #ruby
[00:01:10] zenspider: the ++ part is the only real invalid part
[00:01:40] zenspider: also, you should really use string interpolation
[00:01:59] zenspider: "string"+blah.to_s+"string" vs "string#{blah}string"
[00:02:59] kb3ien: WHY THE HELL IS THERE NO ++ in RUBY. Its been around since the SIXTIES.
[00:03:16] al2o3-cr: "a snippets not allowed" i'm really off now 'cringe' :(
[00:03:39] dfockler: SIXTIES++ == SEVENTIES
[00:04:05] al2o3-cr: rocking in a free world
[00:04:07] Scripore: has joined #ruby
[00:04:30] pontiki: rust never sleeps
[00:04:38] al2o3-cr: there's colours on the street, red, white and blue...
[00:05:20] al2o3-cr: you only sleep, when your dead
[00:05:38] RegulationD: has joined #ruby
[00:06:00] zenspider: don't worry about it. you and ALL of reddit. :P
[00:06:05] Ox0dea: al2o3-cr: Whose dead?
[00:06:06] albertjou: has joined #ruby
[00:06:23] ruby-lang785: has joined #ruby
[00:06:24] al2o3-cr: Ox0dea: nice try
[00:06:27] Feyn: has joined #ruby
[00:06:36] Ox0dea: I only sleep when my dead sleep?
[00:06:44] Ox0dea: There's not enough hours in a night.
[00:07:10] ruby-lang785: does anybody know of a good resource to learn about nesting blocks in ruby
[00:07:14] al2o3-cr: Ox0dea: give you'"re" fingers a rest :p
[00:07:48] al2o3-cr: i even get that wrong
[00:08:15] ruby-lang785: nesting blocks?
[00:08:17] al2o3-cr: and i'm english apparently :p
[00:08:25] Ox0dea: >> class Numeric; def +@; (self + 0.5).round end end; foo = 1; ++foo
[00:08:26] ruboto: Ox0dea # => 3 (https://eval.in/403617)
[00:09:21] workmad3: has joined #ruby
[00:09:32] al2o3-cr: ruby != die
[00:10:06] simplyianm: has joined #ruby
[00:10:12] al2o3-cr: ask matz, he's the genius :p
[00:10:47] al2o3-cr: c programmers be like wtf!
[00:11:22] Ox0dea: >???> Ruby.dying?
[00:11:31] Ox0dea: ruboto doesn't want to answer.
[00:11:51] al2o3-cr: >> Ruby.is_dead?
[00:11:52] ruboto: al2o3-cr # => uninitialized constant Ruby (NameError) ...check link for more (https://eval.in/403618)
[00:13:55] RickHull: has joined #ruby
[00:14:12] al2o3-cr: >> "Pleb".rotate(4)
[00:14:13] ruboto: al2o3-cr # => undefined method `rotate' for "Pleb":String (NoMethodError) ...check link for more (https://eval.in/403619)
[00:14:16] sharpmachine: has joined #ruby
[00:14:17] yqt: has joined #ruby
[00:14:24] al2o3-cr: >> "Pleb".chars.rotate(4)
[00:14:25] ruboto: al2o3-cr # => ["P", "l", "e", "b"] (https://eval.in/403620)
[00:15:43] aaeron: has joined #ruby
[00:15:50] al2o3-cr: >> "Pleb".succ
[00:15:51] ruboto: al2o3-cr # => "Plec" (https://eval.in/403621)
[00:16:09] al2o3-cr: >> "Pleb".map(&:succ)
[00:16:10] ruboto: al2o3-cr # => undefined method `map' for "Pleb":String (NoMethodError) ...check link for more (https://eval.in/403622)
[00:16:33] al2o3-cr: >> "Pleb".split(//).map(&:succ)
[00:16:33] ruboto: al2o3-cr # => ["Q", "m", "f", "c"] (https://eval.in/403623)
[00:16:45] RickHull: has joined #ruby
[00:18:19] CaryInVictoria: has joined #ruby
[00:19:03] Ox0dea: String#chars is a thing, dammit!
[00:19:07] Ox0dea: I blame zenspider.
[00:19:27] al2o3-cr: I like split though
[00:19:39] Ox0dea: Aye, it's good for when you want to split.
[00:20:32] benlovell: has joined #ruby
[00:20:37] zenspider: I always get blamed
[00:21:19] Ox0dea: Better than being git blame'd.
[00:22:08] Musashi007: has joined #ruby
[00:22:47] casadei_: has joined #ruby
[00:23:01] RickHull: has joined #ruby
[00:23:05] fgo_: has joined #ruby
[00:23:36] al2o3-cr: is there a better way then doing this -> "cheese".chars.map { |c| "\e[01;3#{rand(0..9)}m" << c }*''
[00:24:04] user1138: has joined #ruby
[00:24:15] htmldrum: has joined #ruby
[00:25:22] ph8: has joined #ruby
[00:26:24] Musashi007: has joined #ruby
[00:26:56] RickHull: has joined #ruby
[00:26:57] yoloats: has joined #ruby
[00:27:48] yoloats: anyone in here familiar with net-ssh/sftp? Is it possible to initiate a SSH connection, iterate through files with SFTP and run commands like md5sum on them?
[00:27:51] blackmes1: has joined #ruby
[00:28:20] j4cknewt: has joined #ruby
[00:29:07] CaryInVictoria: has joined #ruby
[00:29:41] Ox0dea: al2o3-cr: 'foobar'.gsub(/./) { "\e[38;5;#{rand 256}m#$~" }
[00:30:15] RickHull: has joined #ruby
[00:30:40] Azure: has joined #ruby
[00:31:01] al2o3-cr: Ox0dea: nice :)
[00:33:04] paulcsmith: has joined #ruby
[00:33:22] al2o3-cr: Ox0dea: how'd you come up with awesomesource?
[00:33:34] Oog: has joined #ruby
[00:33:58] Cust0sLim3n: has joined #ruby
[00:34:57] Ox0dea: Bailamos.
[00:35:57] Ox0dea: No puedo para mi pierna.
[00:37:18] Sirupsen: has joined #ruby
[00:37:30] RickHull: has joined #ruby
[00:37:55] al2o3-cr: non spirate vendendo sola pizza
[00:38:26] Oog: has joined #ruby
[00:38:29] CloCkWeRX: has joined #ruby
[00:38:33] simplyianm: has joined #ruby
[00:39:08] Ox0dea: Watashi no piza wa doko desu ka.
[00:40:21] al2o3-cr: yoloats: Net::SFTP.start(host, user, pass) { |conn| conn.dir.entries(path).each { |f| ... }}}}}}}}
[00:40:43] Ox0dea: mfw }}}}}}}}
[00:41:02] swills: has joined #ruby
[00:41:59] zenguy_pc: has joined #ruby
[00:42:25] eggoez: has joined #ruby
[00:42:27] yoloats: Ox0dea so i can run something like md5sum in ... ?
[00:42:37] Eddieh_: has joined #ruby
[00:42:51] Ox0dea: yoloats: Why not?
[00:43:06] yoloats: i guess we'll find out
[00:43:15] Ox0dea: yoloats: Also, make your client highlight nicks in different colors. :P
[00:45:14] segy: has joined #ruby
[00:45:46] arescorpio: has joined #ruby
[00:46:51] al2o3-cr: yoloats: then prolly Digest::MD5.hexdigest(f) against your comparison
[00:50:43] Mweshi_: has joined #ruby
[00:52:28] Averna: has joined #ruby
[00:52:32] Averna: has left #ruby: ()
[00:52:53] baroquebobcat: has joined #ruby
[00:54:05] workmad3: has joined #ruby
[00:56:07] Igorshp: has joined #ruby
[00:57:00] auzty: has joined #ruby
[00:57:08] webguynow: has joined #ruby
[00:59:33] gorums: has left #ruby: ()
[00:59:33] dgutierrez1287: has joined #ruby
[00:59:49] bungoman: has joined #ruby
[01:01:01] Hongo: has joined #ruby
[01:01:07] CloCkWeRX: has joined #ruby
[01:01:38] Hongo: has left #ruby: ()
[01:02:29] Mendenhall: has joined #ruby
[01:07:24] j4cknewt: has joined #ruby
[01:07:54] eggoez: has joined #ruby
[01:08:20] JeramyRR: has joined #ruby
[01:08:21] chipotle: has joined #ruby
[01:08:41] al2o3-cr: can't believe my github *massive*
[01:09:33] al2o3-cr: might have to delete some :p
[01:09:54] segy: has joined #ruby
[01:10:08] bungoman_: has joined #ruby
[01:15:02] htmldrum: has joined #ruby
[01:15:34] lampd1: so, my brain is failing me right now; might be the free oscon beer or it might just be that it's after 6
[01:16:04] al2o3-cr: lampd1: sup!
[01:16:09] lampd1: but... what's a shorter way to do `promo_types = []; promotion_action_shipping_types { |h| promo_types << h.shipping_type }`
[01:16:24] al2o3-cr: lampd1: #map
[01:16:26] lampd1: i know i can use enum to just build that right in a var declaration
[01:16:42] Radar: three chars and I can't spell it right
[01:17:49] lampd1: thx guys :)
[01:17:50] lampd1: thx guys :)
[01:18:01] tkuchiki: has joined #ruby
[01:18:04] _blizzy_: has joined #ruby
[01:18:54] lampd1: silly con wifi
[01:20:35] htmldrum: has joined #ruby
[01:21:33] robbyoconnor: has joined #ruby
[01:22:01] christiandsg: has joined #ruby
[01:25:25] bronson: has joined #ruby
[01:27:19] jack_rabbit: has joined #ruby
[01:28:41] jgpawletko: has joined #ruby
[01:29:23] ryez: has joined #ruby
[01:29:32] havenwood: has joined #ruby
[01:29:43] charliesome: has joined #ruby
[01:31:59] waka: has joined #ruby
[01:33:56] Lucky_: has joined #ruby
[01:35:26] fgo_: has joined #ruby
[01:37:12] lannonbr: has joined #ruby
[01:38:37] spleeze: has joined #ruby
[01:38:47] casadei_: has joined #ruby
[01:38:58] CaryInVictoria: has joined #ruby
[01:39:23] nitenq: has joined #ruby
[01:39:42] jbwiv: has joined #ruby
[01:43:49] QualityAddict: has joined #ruby
[01:44:29] waka: has joined #ruby
[01:44:48] EminenceHC: has joined #ruby
[01:45:00] blaines: has joined #ruby
[01:46:23] gamename: has joined #ruby
[01:48:53] kies^: has joined #ruby
[01:51:39] devbug: has joined #ruby
[01:52:14] mike___1234: has joined #ruby
[01:52:51] Stratege_: has joined #ruby
[01:53:21] dfockler: has joined #ruby
[01:53:59] lkz0ne: has joined #ruby
[01:55:12] blaines_: has joined #ruby
[01:55:55] yb_drowe: has joined #ruby
[01:57:02] sankaber: has joined #ruby
[02:00:45] Scripore: has joined #ruby
[02:04:38] nofxx: has joined #ruby
[02:06:40] ddarkpassenger: has joined #ruby
[02:07:03] RegulationD: has joined #ruby
[02:07:28] felixjet: has left #ruby: ("Leaving")
[02:09:59] zacts: has joined #ruby
[02:10:06] xcesariox: has joined #ruby
[02:10:10] cpruitt: has joined #ruby
[02:10:32] zacts: of course I realize I'll likely get a biased opinion here, but between ruby and python, which would be the easiest to learn first?
[02:11:37] helpa: has joined #ruby
[02:12:14] lampd1: zacts id really pick based on what you already know as well as what you want to do
[02:12:49] xcesariox: has joined #ruby
[02:13:14] xcesariox: has joined #ruby
[02:15:04] Ox0dea: lampd1: Why?
[02:15:20] Ox0dea: Coraline: Of what sort of annoyances have you been made aware?
[02:15:30] Ox0dea: zacts: Ruby.
[02:15:57] zacts: lampd1: I'm not familiar with ruby or perl at all
[02:16:01] zacts: I'm familiar with perl5
[02:16:05] zacts: and a bit of (scheme) lisp
[02:16:13] zacts: (Well, if you consider scheme to be lisp)
[02:16:25] zacts: also, I know very rudimentary emacs lisp, and vimL
[02:16:49] Coraline: I remember people not really liking whitespace significance
[02:16:53] zacts: so I'm assuming that ruby syntax is closer to perl, than python syntax is, in regards to perl
[02:17:05] Ox0dea: Coraline: Don't most decent people properly indent their code anyway?
[02:17:17] zacts: so syntactically perhaps I would find more similarities with ruby than with python, from what I already know...
[02:17:29] Ox0dea: zacts: Ruby = Smalltalk + Perl + Scheme, in order of influence.
[02:17:29] zacts: semantically Ruby is more OOPish? Python is more multi-paradigm?
[02:17:57] Ox0dea: zacts: Ruby is arguably the "most object-oriented" language now that Smalltalk's on its deathbed.
[02:18:06] Ox0dea: >> 42.is_a?(Object)
[02:18:07] ruboto: Ox0dea # => true (https://eval.in/403691)
[02:18:13] Ox0dea: >> Object.is_a?(Object)
[02:18:14] zacts: I'm thinking Ruby would be more familiar to me given that above informal definition of what ruby is
[02:18:14] ruboto: Ox0dea # => true (https://eval.in/403692)
[02:18:46] zacts: so personally, I think I'll work towards Ruby before python, since I want to learn both eventually (ruby for fun coding, and python if I want to ever do machine learning)
[02:18:57] zacts: but, this is just for future reference for myself
[02:19:04] zacts: I'm still heavy into scheme
[02:19:13] Ox0dea: What does that mean?
[02:19:30] zacts: Ox0dea: what does what mean?
[02:19:38] Ox0dea: > heavy into scheme
[02:19:55] malconis: has joined #ruby
[02:20:14] zacts: oh, I'm reading the Structure and Interpretation of Computer Programs. I'm heavy into teaching myself and living with the scheme programming language as my primary language
[02:20:47] Ox0dea: You'll probably want to focus strictly on SICP if you intend to get the most out of the experience.
[02:20:55] zacts: exactly that was my point
[02:21:04] zacts: thus "this is just for future reference, for myself"
[02:21:31] zacts: I was trying to say that currently I'm focusing on scheme almost exclusively, and that these Ruby questions are just for future reference
[02:21:37] zacts: anyway, thanks for the ideas
[02:23:39] Oog: has joined #ruby
[02:24:46] freerobby: has joined #ruby
[02:28:24] icosa1: has joined #ruby
[02:28:24] mistermocha: has joined #ruby
[02:29:32] sharpmachine: has joined #ruby
[02:32:28] waka: has joined #ruby
[02:34:57] cmoneylulz: has joined #ruby
[02:35:58] bradleyprice: has joined #ruby
[02:36:24] fgo: has joined #ruby
[02:38:07] CaryInVictoria: has joined #ruby
[02:39:12] baweaver: has joined #ruby
[02:39:27] casadei_: has joined #ruby
[02:39:44] devbug: has joined #ruby
[02:42:54] workmad3: has joined #ruby
[02:47:35] benlovell: has joined #ruby
[02:48:02] nahtnam: has joined #ruby
[02:50:31] ddarkpassenger: has joined #ruby
[02:50:48] axisys: has joined #ruby
[02:52:17] towski_: has joined #ruby
[02:53:19] s00pcan: has joined #ruby
[02:54:34] christiandsg: has joined #ruby
[02:55:22] tjbiddle: has joined #ruby
[02:55:27] MrSamuel: has joined #ruby
[02:56:04] c_nick: has joined #ruby
[02:57:09] c_nick: how to get "Me" from this string - "Hi,This,is,Me". i can go split('
[02:57:19] c_nick: but that seems inefficient
[02:57:31] Channel6: has joined #ruby
[02:57:39] bruno-: has joined #ruby
[02:57:52] Aeyrix: "Hi,This,is,Me"[-2..-1]
[02:58:22] Ox0dea: Wow, such troll.
[02:59:07] esantiago: has joined #ruby
[02:59:10] Ox0dea: >> 'Hi,This,Is,Me'[/,(\w+)$/, 1] # c_nick
[02:59:11] ruboto: Ox0dea # => "Me" (https://eval.in/403700)
[03:00:05] jenrzzz: has joined #ruby
[03:00:20] ryez: has joined #ruby
[03:03:08] segfalt: has joined #ruby
[03:03:17] benlovell: has joined #ruby
[03:03:52] a346: has joined #ruby
[03:03:56] Ox0dea: c_nick: The $ anchor tells the regular expression engine to start searching at the back of the string, so the efficiency is quite good.
[03:04:23] dopie: has joined #ruby
[03:04:58] havenwood: has joined #ruby
[03:05:07] swgillespie: has joined #ruby
[03:05:42] Ox0dea: >> s = Time.now; ('x' * 1_000_000)[/$/]; Time.now - s
[03:05:43] ruboto: Ox0dea # => 0.055223338 (https://eval.in/403701)
[03:05:46] c_nick: Ox0dea: cool i ideally in C i used to do strchr(str, stringlenth - from where u want)
[03:05:55] Ox0dea: c_nick: Why not strrchr()?
[03:06:24] c_nick: Ox0dea: yes reverse string :)
[03:06:48] eggoez: has joined #ruby
[03:06:49] Ox0dea: strrchr() is different in that it searches from the right, not that it reverses the string before searching.
[03:06:52] c_nick: Dont go on the exact syntax I dont quite remember hehe
[03:07:10] Ox0dea: Don't introduce a topic you're not ready to discuss? :P
[03:07:24] tmtwd: has joined #ruby
[03:07:54] blaines: has joined #ruby
[03:09:42] CaryInVictoria: has joined #ruby
[03:10:36] djbkd_: has joined #ruby
[03:10:52] braincrash: has joined #ruby
[03:12:02] c_nick: Ox0dea: strcpy(buf,strrchr(str, ',')+1);
[03:12:16] Ox0dea: c_nick: Looks good. :)
[03:12:30] c_nick: ACTION misses C
[03:12:43] Ox0dea: Write a C extension?
[03:13:04] sevenseacat: has joined #ruby
[03:13:25] c_nick: Can i ? Didn't know i could
[03:13:30] Ox0dea: Of course.
[03:13:39] Ox0dea: And it's even quite pleasant.
[03:13:40] Aeyrix: You need to get permission first.
[03:15:49] jaycee: has joined #ruby
[03:16:24] kb3ien: ACTION misses ++ 
[03:16:42] Yzguy: has joined #ruby
[03:16:43] kb3ien: write a damn extension to increment whatever is there!
[03:16:49] jenrzzz: has joined #ruby
[03:16:57] Musashi007: has joined #ruby
[03:16:57] d0lph1n98: has joined #ruby
[03:16:58] Ox0dea: You can't modify immediate values in-place.
[03:17:17] ledestin: has joined #ruby
[03:17:29] kb3ien: well, not those. The ALU can't write back to the IVG.
[03:17:40] kb3ien: Write Only Memory....
[03:17:49] arup_r: has joined #ruby
[03:17:57] bnagy: stahp, it's too early for popcorn
[03:18:16] Mendenhall: has joined #ruby
[03:18:57] bnagy: Ox0dea: I thought you could, in theory, do that?
[03:19:09] bnagy: except it would increment like, all 4s everywhere
[03:19:22] Ox0dea: bnagy: Nope; Fixnums are just tagged pointers in Ruby.
[03:19:30] bnagy: which probably has limited utility
[03:19:31] Aeyrix: Yeah I fucked it.
[03:20:18] Rinzlit: has joined #ruby
[03:20:20] deepu: has joined #ruby
[03:20:20] Ox0dea: You could, of course, obtain the variable's binding and do an eval in there, but that's just overwriting the old value.
[03:20:32] Ox0dea: How come?
[03:20:34] Rinzlit: To get back to where I let off :D :D :D
[03:20:48] Ox0dea: Do you have three faces?
[03:21:08] Rinzlit: No, but I feel like stabbing someone in the face 3 times
[03:21:17] Ox0dea: Who've ya got in mind?
[03:21:35] Rinzlit: Actually I don't have any specific people
[03:21:41] Rinzlit: So maybe just small children
[03:22:16] Ox0dea: Why not large children and/or small adults?
[03:22:16] prefixed: has joined #ruby
[03:22:33] Rinzlit: Because small things are "fun" sized
[03:22:44] Ox0dea: That's size-ist.
[03:22:46] Ox0dea: Coraline!
[03:23:49] Rinzlit: Ah hah a I feel lucky
[03:23:59] Rinzlit: two of my servers are only different by 1
[03:24:08] Ox0dea: By one bit?
[03:24:21] Rinzlit: one ends with 28
[03:24:25] Rinzlit: one ends with 29
[03:24:36] bmurt: has joined #ruby
[03:24:42] Rinzlit: 38, and 39*
[03:25:59] Contigi: has joined #ruby
[03:27:01] Ox0dea: We should be able to say `foo .= bar` instead of `foo = foo.bar`, in my opinion.
[03:27:58] jbw_: has joined #ruby
[03:28:16] c_nick: Ox0dea: time for an extension ;)
[03:28:29] Ox0dea: c_nick: It would require a change in the parser.
[03:28:39] Ox0dea: And parse.y is an abyss from which precious few return unharmed.
[03:30:16] Rinzlit: So, my website can't find jquery...
[03:30:28] Ox0dea: Rinzlit: It's right where you left it.
[03:30:45] Rinzlit: yes, thats very kind of it to wait for me.
[03:30:56] Ox0dea: Who said it's waiting for you, though?
[03:31:15] Ox0dea: On what basis?
[03:31:16] c_nick: str = "123.456" p str[/\.\w+/,1]
[03:31:17] Rinzlit: Because I'ma fix this shyt
[03:31:23] Oog: has joined #ruby
[03:31:30] Ox0dea: c_nick: You have to use parentheses to create a capture group.
[03:31:36] Ox0dea: That's what the 1 refers to.
[03:32:41] jordanm: has joined #ruby
[03:33:59] darkf: has joined #ruby
[03:34:23] nofxx: What's the ruby way to :foo_bar or 'foo_bar' -> FooBar ?
[03:34:25] casadei_: has joined #ruby
[03:34:36] nofxx: always confuse.. #classify is rails right?
[03:34:52] dented42: has joined #ruby
[03:35:10] Ox0dea: nofxx: #constantize is ActiveSupport, yes.
[03:35:26] Ox0dea: Erm, and yes, as is #classify.
[03:35:36] s00pcan: has joined #ruby
[03:35:55] Ox0dea: But that's more from singularizing plurals.
[03:35:57] nofxx: Ox0dea, ruby will be const_get, split capitalize join ?
[03:36:17] devbug: has joined #ruby
[03:36:34] Ox0dea: nofxx: You'd miss a few edge cases that way, but it'd mostly work.
[03:36:50] jbwiv: has joined #ruby
[03:37:00] nofxx: ah, nevermid, there's activesupport dependency here anyways
[03:37:06] nofxx: gonna use it
[03:37:22] Ox0dea: nofxx: You'll want #camelize, then.
[03:37:27] nofxx: Ox0dea, ty
[03:37:30] Ox0dea: Sure thing.
[03:37:31] nofxx: oh, good know
[03:37:38] nofxx: good to know*
[03:38:40] JoshGlzBrk: has joined #ruby
[03:38:56] c_nick: ty Ox0dea bbl
[03:39:09] c_nick: has left #ruby: ()
[03:39:59] Rinzlit: I have a mystical question
[03:40:06] Rinzlit: Like spooky ghost
[03:40:16] Rinzlit: how the fk do I get "bower install"
[03:41:19] lessless: has joined #ruby
[03:42:28] Ox0dea: Rinzlit: Does your browser force pages to close after a few minutes or something? :/
[03:42:35] havenwood: Rinzlit: Not with Ruby.
[03:43:21] Rinzlit: I was pretty sure this bower stuff was gems
[03:43:37] Rinzlit: and no I get pretty error messages on my website
[03:43:49] chipotle: has joined #ruby
[03:44:20] jordanm: bower is nodejs
[03:44:43] havenwood: Rinzlit: #Node.js
[03:46:35] Rinzlit: I prefer to only bother you guys though since I like you guys .-.
[03:46:49] chipotle: has joined #ruby
[03:46:53] havenwood: Rinzlit: Don't go Nodeling if you don't want to hang with Nodelers.
[03:47:32] Rinzlit: btw I didn't use sudo
[03:47:35] Rinzlit: #WhyItFailed
[03:48:20] Ox0dea: This guy.
[03:48:20] prefixed: Ox0dea Did you expect this error message to occur when you suggested using NET::SFTP earlier?
[03:48:24] prefixed: `digest': can't convert Net::SFTP::Protocol::V01::Name into String (TypeError)
[03:48:34] Ox0dea: prefixed: No, sorry; I've never used Net::SFTP. :/
[03:48:57] Ox0dea: prefixed: The error message indicates that you're passing a not-String to #digest.
[03:49:32] prefixed: I am not sure that it's possible to run File methods over the SFTP connection
[03:49:39] prefixed: It doesn't appear to be the case
[03:49:54] Ox0dea: prefixed: Does that actually make sense to you, though?
[03:50:36] Ox0dea: > Read and write files using an IO-like interface
[03:50:37] prefixed: let's test this out and see wha thappens
[03:50:44] gix: has joined #ruby
[03:51:03] bungoman: has joined #ruby
[03:51:52] Ox0dea: prefixed: I learned how to use Net::SFTP to iterate over the entries in a given directory in about ten seconds...
[03:52:18] Ox0dea: https://github.com/net-ssh/net-sftp#synopsis
[03:52:29] Rinzlit: Ox0dea heeelp Q_Q
[03:52:30] Rinzlit: rinzlit@KM301:~$ bower install
[03:52:45] Rinzlit: ./usr/bin/env: node: No such file or directory
[03:52:48] avahey: has joined #ruby
[03:52:59] icebourg: has joined #ruby
[03:53:02] sevenseacat: whats that got to do with ruby?
[03:53:03] webguynow: has joined #ruby
[03:53:23] Ox0dea: You're very inconsiderate.
[03:53:37] Rinzlit: I am, but could you please help .-.
[03:53:54] Rinzlit: If you can't say no that is perfectly fine
[03:54:01] Rinzlit: but if you can help that would be wonderful
[03:54:15] Ox0dea: You would be much better served by a fishing pole than a fish.
[03:54:29] Ox0dea: But how fucking hard is it to figure out what "No such file or directory" means in 2015?!
[03:54:40] prefixed: Ox0dea sure. it's 100% possible to iterate over entries. however, I am not sure if it's possible to run ruby methods on them over the connection. I would think either A.) ruby would need to be installe don the target machine or B.) the file would need to be downloaded to the primary host to compute the md5 sum
[03:55:14] Eiam_: has joined #ruby
[03:55:21] Ox0dea: prefixed: Net::SFTP::Operations::File seems to be the class you're looking for.
[03:56:43] prefixed: I'm confused as to how that'd work though. Do you follow my logic?
[03:56:51] Ox0dea: It should allow you to read, and thus checksum, the contents of files without explicitly downloadin them.
[03:56:58] Ox0dea: *downloading
[03:57:26] prefixed: hm. that's an interesting though
[03:57:38] Ox0dea: It confuses you that an FTP connection would be able to send you data, or--?
[03:58:24] prefixed: it confuses me that it'd be possible to do this without ruby being on the target machine or downloading the file in quesiton
[03:58:40] Ox0dea: Then you've fundamentally misunderstood the underlying principles of the thing.
[03:58:49] prefixed: I'm happy to hear that
[03:59:23] Ox0dea: Net::SFTP knows how to connect to an FTP server and perform the operations specified by the relevant protocol(s), among which are reading and downloading the files found therein.
[03:59:45] Aeyrix: SFTP is not a Ruby thing.
[03:59:55] Aeyrix: That class is just a bunch of socket implementations that know how to speak the SFTP protocol.
[04:00:01] Erika-Mustermann: has joined #ruby
[04:00:30] Aeyrix: Rinzlit: Isn't there a nodejs channel?
[04:00:39] baweaver: >> 'SFTP' == 'FTP' # ???
[04:00:40] ruboto: baweaver # => false (https://eval.in/403713)
[04:00:41] Aeyrix: Or did it fall to #iojs?
[04:00:43] Aeyrix: Or is it #nodejs again?
[04:00:55] Rinzlit: Aeyrix I'm in there right now
[04:01:04] Aeyrix: Rinzlit: So what're you asking here for?
[04:01:05] Aeyrix: baweaver: wat
[04:01:28] Rinzlit: Aeyrix oh idk usually since a majority of my problems are because I'm bad with linux
[04:01:28] baweaver: Net::SFTP connects to an FTP server quote above
[04:01:34] Ox0dea: baweaver: They're obviously different, but the distinction is of little relevance when trying to clarify the gist of the thing.
[04:01:48] baweaver: yeah, figured I was being slightly pedantic
[04:02:05] baweaver: Rinzlit: perhaps a good idea to _learn_ linux then?
[04:02:12] Aeyrix: Ox0dea: Pedanticism is a Rubyists second favourite hobby.
[04:02:14] Aeyrix: The first is circlejerking.
[04:02:20] Ox0dea: I approve, doubly so.
[04:02:27] Rinzlit: baweaver I plan on doing that once I get this job done .-.
[04:02:37] Ox0dea: Aeyrix: For reference, the word is "pedantry". ^_^
[04:02:42] Aeyrix: God dammit.
[04:02:46] Ox0dea: I'm So Meta Even This Acronym.
[04:02:53] baweaver: A group of pedants is an actually
[04:02:58] auzty: has joined #ruby
[04:03:00] Aeyrix: Ox0dea: https://www.youtube.com/watch?v=wKbU8B-QVZk
[04:03:07] Aeyrix: (NSFW language)
[04:03:21] Ox0dea: Wow, such nostalgic.
[04:03:28] Ox0dea: Many remindings, wow.
[04:03:41] mesamoo: has joined #ruby
[04:04:32] Aeyrix: I still laugh every time.
[04:04:34] Aeyrix: He has my accent.
[04:04:45] GryAway: has joined #ruby
[04:05:17] Ox0dea: baweaver: The collective noun for jugglers is apparently "a neverthriving".
[04:05:23] Muhannad: has joined #ruby
[04:06:01] Aeyrix: Language jugglers or? ;)
[04:06:58] yb_drowe: has joined #ruby
[04:07:09] Ox0dea: I expect the folks at Merriam-Webster aren't too bad off.
[04:07:39] Ox0dea: An improbability of GNUs, and yet here we are.
[04:07:42] Ox0dea: Thanks, rms.sexy.
[04:11:13] yoloats: this is great
[04:11:29] htmldrum: has joined #ruby
[04:12:05] swgillespie: has joined #ruby
[04:14:53] yoloats: no it didn't
[04:15:22] sharpmachine: has joined #ruby
[04:17:19] _gautam_: has joined #ruby
[04:17:37] Obfuscate: has joined #ruby
[04:18:17] yoloats: wait a second. what's happening here. The files have different md5s. I literally just copied one file from one host to the other
[04:22:06] mike___1234: has joined #ruby
[04:22:33] duncannz: has joined #ruby
[04:22:58] simplyianm: has joined #ruby
[04:26:13] Ox0dea: yoloats: `cmp a b` will tell you exactly where files a and b first differ.
[04:26:17] Ox0dea: My bet's on disparate lind endings.
[04:26:37] yoloats: I wonder if net ssh is broken
[04:26:41] bronson: has joined #ruby
[04:27:07] Ox0dea: Just... compare the files?
[04:27:15] yoloats: doing it now
[04:28:28] simplyianm: has joined #ruby
[04:28:48] yoloats: what if it doesn't return anything?
[04:29:42] Mendenhall: has joined #ruby
[04:30:11] Ox0dea: yoloats: Then the files are byte-identical.
[04:30:30] yoloats: wtf is going on here
[04:30:36] Ox0dea: Did you roll your own MD5?
[04:30:42] yoloats: I'm clearly doing something wrong with File
[04:30:50] yoloats: no I'm using Digest::
[04:31:06] yoloats: I just checked the md5s using md5sum
[04:31:32] Ox0dea: And they're the same, yes?
[04:31:34] workmad3: has joined #ruby
[04:32:03] Ox0dea: You must not be using the files' contents in your Ruby code.
[04:32:13] yoloats: yeah. that's what i'm thinking
[04:32:33] Rinzlit: Its a sad day Ox0dea
[04:32:40] Rinzlit: all my effort was for not...
[04:32:43] Ox0dea: yoloats: Digest::MD5.hexdigest(File.read('foo'))
[04:32:46] Ox0dea: Rinzlit: *naught
[04:32:52] Rinzlit: too tired .-.
[04:32:58] Ox0dea: Or you just didn't know, which is also fine.
[04:33:03] htmldrum: has joined #ruby
[04:33:28] Rinzlit: well im just too tired for that im probably going to go back to sleep since I just got told bower is bad
[04:33:34] Rinzlit: and it probably doesn't work anyway
[04:33:46] lxsameer: has joined #ruby
[04:33:47] lxsameer: has joined #ruby
[04:35:01] scottschecter: has joined #ruby
[04:35:32] yoloats: I was md5'ing the path string. gotta rtfm closer next time
[04:36:04] Oog: has joined #ruby
[04:36:14] danzilio: has joined #ruby
[04:37:05] Rinzlit: I guess its time to go buy a book about linux administration
[04:37:09] yoloats: at least it works now. this is going to be some good code
[04:37:19] acke: has joined #ruby
[04:37:21] peter_paule: has joined #ruby
[04:37:23] Ox0dea: yoloats: Why MD5?
[04:37:48] yoloats: high accuracy. low resource usage. super low collision rate
[04:38:02] Ox0dea: "super low" is a stretch.
[04:38:28] yoloats: it's liek 2^-128, no?
[04:39:39] Ox0dea: I forget the specifics of crafting MD5 collisions, but it's embarrassingly easy on modern hardware.
[04:40:21] Ox0dea: It's unlikely you need to defend against "attacks" of that nature, but it's something to be mindful of.
[04:40:40] yoloats: well yeah, but I'm only using it for file diffs in a CI environment
[04:41:17] Ox0dea: Then CRC-32 would suffice?
[04:41:52] sp1rs: has joined #ruby
[04:41:53] yoloats: what's it collision rate like?
[04:42:15] Ox0dea: Very high.
[04:42:39] Ox0dea: Comparatively, anyhow.
[04:43:36] htmldrum: has joined #ruby
[04:43:36] eam: Ox0dea: crafting, but it's still really good for accidental collisions
[04:43:37] Rinzlit: Why is every crowdfunding website with ruby
[04:45:01] Ox0dea: eam: Taking the characters at prime indices in the path and doing some DJB on the contents would probably serve in most circumstances.
[04:45:50] schaerli: has joined #ruby
[04:46:11] eam: FNV is quite good, and fast
[04:48:13] Oog: has joined #ruby
[04:48:29] jbw_: has joined #ruby
[04:49:02] Rinzlit: Is there something I don't know about web development where ruby is really good?
[04:49:35] cbz: has joined #ruby
[04:49:35] cbz: has joined #ruby
[04:50:11] sevenseacat: probably a lot
[04:50:33] Rinzlit: lol, well I was hoping someone would tell me why xD
[04:50:43] CaryInVictoria: has joined #ruby
[04:50:49] Rinzlit: I mean I already know I don't know shit all about web development or programming
[04:52:16] ohaibbq: has joined #ruby
[04:54:33] Aeyrix: Rinzlit: Ruby is really averaeg.
[04:54:42] Aeyrix: Everyone in this channel actually just spends their time talking shit about Ruby.
[04:54:57] baweaver: depends on what you want speed in
[04:55:04] Aeyrix: In complete seriousness, in my opinion Ruby is pretty awesome for:
[04:55:04] Rinzlit: Aeyrix from what I'm reading....
[04:55:07] Aeyrix: > Rapid prototyping
[04:55:10] baweaver: prototyping and development, ruby wins
[04:55:10] Rinzlit: I should actually go and learn ruby on rails
[04:55:12] Aeyrix: > Ease of reading, learning, and writing
[04:55:22] baweaver: execution speed, not a chance.
[04:55:26] Aeyrix: baweaver: Eh
[04:55:41] Aeyrix: not for web, Ox0dea
[04:55:42] Aeyrix: calm down
[04:55:48] Aeyrix: > compiling a rails app
[04:55:56] Aeyrix: "Ah fuck, I can't believe you just did that."
[04:56:09] RickHull: has left #ruby: ()
[04:56:15] Aeyrix: Rinzlit: Ruby on Rails (or, really, now just "Rails") is a web framework for Ruby.
[04:56:21] Aeyrix: If you want to use Ruby for the web, yeah go learn Rails.
[04:56:24] Aeyrix: But you gotta learn Ruby first.
[04:56:35] baweaver: before that
[04:56:42] baweaver: seeing as you've said that a few times already
[04:56:58] Rinzlit: Yeah, well I need to learn a lot of stuff
[04:56:59] Aeyrix: Lunix is a hacker operating system created by the communist terrorist Linorius Torivals.
[04:58:31] Rinzlit: wonderful....
[04:59:19] Ox0dea: Linux Tortles Creationed the Linuz operations cystem to make life Hell for sysadmins like you.
[05:00:03] Rinzlit: So my list of shyt to learn: propery system administration, better CSS and HTML, PHP,Javascript, Ruby, then finally Rails
[05:00:40] baweaver: ACTION grabs popcorn
[05:00:46] baweaver: take php off that list
[05:00:54] Rinzlit: You sure O_o?
[05:00:59] Rinzlit: They recommended it for RoR
[05:01:06] baweaver: who are they
[05:01:07] Ox0dea: Sell your keyboard.
[05:01:08] mistermocha: has joined #ruby
[05:01:14] Rinzlit: http://blog.teamtreehouse.com/reasons-why-every-web-designer-needs-to-learn-rails
[05:01:19] sevenseacat: php for rails...?
[05:01:26] Rinzlit: Said it would probably be good to know a little bit of PHP
[05:01:28] Aeyrix: sevenseacat: PHP on Pipes.
[05:01:57] htmldrum: has joined #ruby
[05:02:01] baweaver: they don;t say that
[05:02:26] marr: has joined #ruby
[05:02:30] baweaver: and if they do and I missed it, disregard strongly
[05:02:50] baweaver: as they're dangerously incompetent if that's the case.
[05:03:01] Rinzlit: Oh okay .-.
[05:03:06] Rinzlit: Well that makes my list a little nicer
[05:03:31] baweaver: that's akin to saying learn Basketball to get better at Soccer
[05:04:03] Rinzlit: So now my list : Be less of an idiot and use linux properly, get better at current job, learn ruby, then learn RoR, work on learning real javascript
[05:04:03] baweaver: they're both sports, they both have some similarities, but if you want to get good at one then just learn that.
[05:04:36] Rinzlit: Well, I'm glad I have 3 monitors
[05:05:29] Rinzlit: lol and I was just going to talk to you guys and never learn ruby
[05:05:31] Rinzlit: ah ha ha....
[05:05:36] konsolebox: Rinzlit: you missed bash. unfortunately there are still many things that could easily be done in Bash than Ruby, but you would to use it, or mix it with other languages/tools.
[05:05:39] riotjones: has joined #ruby
[05:05:56] konsolebox: *you would have to know when
[05:06:29] Ox0dea: konsolebox: Ruby is arguably a superset of Bash, so I'm not sure I follow your logic.
[05:06:40] Rinzlit: konsolebox I think that will be a better problem when I actually learn something
[05:07:06] Rinzlit: ACTION is currently a "programmer" like an air guitarist is a guitar player
[05:07:10] konsolebox: Ox0dea: do this in Ruby without using something that is not Ruby: make && make modules_install && make install
[05:07:20] konsolebox: Ox0dea: that's just a small example
[05:07:25] Ox0dea: konsolebox: make is not Bash.
[05:07:27] jbwiv: has joined #ruby
[05:07:40] konsolebox: Ox0dea: yeah, but it isn't Ruby either.
[05:07:43] Rinzlit: konsolebox its for websites though
[05:07:52] Ox0dea: konsolebox: But why did you offer it as a defense of Bash?
[05:07:53] Rinzlit: Thats all I want ruby for
[05:08:03] konsolebox: Rinzlit: because you mentioned system administration
[05:08:16] Rinzlit: Oh, yeah I'm a systems admin for a financial company
[05:08:20] Rinzlit: A most worthless one
[05:08:21] Aeyrix: konsolebox: `make && make modules_install && make install`
[05:08:24] konsolebox: Ox0dea: because that's the first thing i could think of
[05:08:25] Aeyrix: konsolebox: Kernel.exec.
[05:08:29] Aeyrix: konsolebox: Not bash.
[05:08:37] konsolebox: Aeyrix: you sure?
[05:08:55] Aeyrix: About 80% sure, yeah.
[05:08:56] weemsledeux: has joined #ruby
[05:08:58] Aeyrix: Checking meow.
[05:09:48] konsolebox: >> Kernel.exec('echo $0')
[05:09:49] ruboto: konsolebox # => (https://eval.in/403719)
[05:09:55] Maletor: has joined #ruby
[05:09:56] chrissonar: has joined #ruby
[05:10:30] konsolebox: ok, not allowed, but well it's pretty obvious :)
[05:10:35] Aeyrix: Read up on Kernel#exec.
[05:10:42] konsolebox: Aeyrix: i don't have to.
[05:10:57] konsolebox: Aeyrix: for 1, that way of executing commands including && is not Ruby
[05:11:08] Aeyrix: I was actually still typing. :^)
[05:11:44] Aeyrix: ACTION If the string from the first form (exec("command")) follows these simple rules:
[05:11:44] Aeyrix: ACTION - no meta characters
[05:11:44] Aeyrix: ACTION - no shell reserved word and no special built-in
[05:11:44] Aeyrix: ACTION - Ruby invokes the command directly without shell
[05:11:47] konsolebox: Aeyrix: this is why i said "without using something that is not Ruby", because replies like the one you're making is easily called for.
[05:12:00] Aeyrix: Not sure why that went full /me/
[05:12:14] Ox0dea: konsolebox: Continuing the execution of some sequence if the previous invocation succeeded is, by your logic, something of which only Bash is capable?
[05:12:21] Ox0dea: Did you accidently go full retard?
[05:12:27] Aeyrix: Ox0dea: I think it was deliberate.
[05:12:37] Ox0dea: Aye, likely as not.
[05:12:42] konsolebox: Ox0dea: sigh.. of course captain obvious, it's an sh :)
[05:12:54] aganov: has joined #ruby
[05:13:04] arooni-mobile: has joined #ruby
[05:13:17] konsolebox: Ox0dea: so is that all? an ordinary sh is something not fit to compete with Ruby.
[05:13:40] Ox0dea: You're setting up a straw man, and I suspect you know as much.
[05:13:53] Aeyrix: > arguing with Ox
[05:13:56] Aeyrix: > expecting to ever come out on top
[05:14:01] Aeyrix: I learned my lesson day one.
[05:14:27] Ox0dea: I sometimes even lose to myself.
[05:14:41] Aeyrix: You should get that one checked. :^)
[05:15:58] baroquebobcat: has joined #ruby
[05:16:02] RobertBirnie: has joined #ruby
[05:16:27] sharpmachine: has joined #ruby
[05:17:04] mistermocha: has joined #ruby
[05:18:20] htmldrum: has joined #ruby
[05:20:08] ScriptGeek: has joined #ruby
[05:20:33] konsolebox: Ox0dea: i misread your last reply. what i'm implying was it's way simpler to have sequences like `make && ...` in Bash than doing that in Ruby. concept-wise when things get a little bigger it would still be simpler to do it in Bash in Ruby. way simpler most of the time.
[05:20:33] lkba: has joined #ruby
[05:22:48] iateadonut: has joined #ruby
[05:23:56] ReK2: has joined #ruby
[05:23:57] ReK2: has joined #ruby
[05:25:50] Ox0dea: konsolebox: It's rather easy to foresee that this'll surely devolve into little more than an argument over semantics from which neither party is likely to gain any insight.
[05:26:21] Ox0dea: Bash and Ruby are both Turing-complete, and either can invoke the other. </case>
[05:26:21] dhjondoh: has joined #ruby
[05:27:43] konsolebox: Ox0dea: ok. and that is why i could tell that Bash is also necessary.
[05:28:56] Ox0dea: I suspect we subscribe to differing definitions of "necessary".
[05:30:02] agent_white: has joined #ruby
[05:30:40] mistermocha: has joined #ruby
[05:30:41] agent_white: Evenin' folks
[05:31:36] htmldrum: has joined #ruby
[05:31:38] tjbiddle: has joined #ruby
[05:32:59] tkuchiki: has joined #ruby
[05:35:29] konsolebox: Ox0dea: different tastes with different perceptions. you can believe that yours is better if you like.
[05:36:27] Ox0dea: konsolebox: Too soon on the ad hominem stuff.
[05:37:05] Rinzlit: So, I think I should drop some of my jobs, and dedicate some time to learning .-.
[05:37:14] Ox0dea: Rinzlit: Get the fuck off the Internet and read a book, dude.
[05:37:22] Rinzlit: Yeah I know right xD
[05:37:23] Aeyrix: They just bought some books.
[05:37:30] Ox0dea: Probably not.
[05:37:35] konsolebox: Ox0dea: nevertheless if you are a system admin, you can't avoid needing to learn shell scripting.
[05:37:36] kies^: has joined #ruby
[05:37:36] Aeyrix: Actually, did.
[05:37:37] Rinzlit: I got the one from the guy Aeyrix linked
[05:37:50] Rinzlit: http://manning.com/bigg2/
[05:37:56] konsolebox: Ox0dea: and most practical scripting is a bash.
[05:37:57] Aeyrix: Radar owes me a finder's fee now.
[05:38:23] Aeyrix: konsolebox: Shhhh.
[05:38:26] Radar: Aeyrix: np. You can have half of my royalties for that copy. Should be about $2.36.
[05:38:27] Aeyrix: This is a Ruby channel.
[05:38:39] Aeyrix: Radar: That figure makes me upset knowing how much effort you put into that book.
[05:38:43] Aeyrix: Jesus Christ.
[05:38:44] konsolebox: Aeyrix: neither of us would lower our pride :) just don't mind :)
[05:39:01] Radar: Aeyrix: This is why you should never ever ever do anything for people who's business it is to just PUBLISH your thing.
[05:39:07] Radar: See also: music industry
[05:39:14] Rinzlit: Well Ox0dea the system admin stuff is lower priority then web development
[05:39:46] Rinzlit: But you guys made it very clear that I need to be able to at least use linux properly to even start the web servers for ruby
[05:39:55] Rinzlit: ah ha ha... -facepalm-
[05:40:15] Ox0dea: konsolebox: Please do quote me if you're able to find where I said anything to the contrary as regards Bash's utility as a language.
[05:40:43] Aeyrix: Rinzlit: mhm
[05:40:47] Ox0dea: But its power is as a "glue" for tying other programs together, a feat of which Ruby is just as capable, and generally in a more intuitive and programmer-friendly way.
[05:41:13] konsolebox: Ox0dea: it's about just me recommending bash, not about anything you said.
[05:41:24] Ox0dea: konsolebox: Recommending Bash over Ruby in the general case?
[05:41:29] yardenbar: has joined #ruby
[05:41:33] konsolebox: Ox0dea: did i say that?
[05:41:38] Ox0dea: I'm asking if you intended to say that.
[05:42:01] Ox0dea: konsolebox: Then when do you recommend using Bash instead of Ruby, or indeed any other language?
[05:42:03] Rinzlit: Rail cast isn't a 1 time fee
[05:42:05] Aeyrix: You two are more argumentative than I am, and I'm from England.
[05:42:07] Rinzlit: is monthly Aeyrix .-.
[05:42:10] Aeyrix: Rinzlit: It is. It says it isn't, but it is.
[05:42:18] bluOxigen: has joined #ruby
[05:42:25] Aeyrix: Basically the guy is on an extended vacation, so he's indefinitely extending the subscriptions for free.
[05:42:28] Rinzlit: I am reading 9$ per month .-.
[05:42:42] Rinzlit: He is dead?
[05:42:46] konsolebox: Ox0dea: i did recommend it over Ruby in some parts, but not on general case.
[05:42:49] Aeyrix: He's alive and well.
[05:42:51] Ox0dea: konsolebox: When?
[05:42:53] Ox0dea: Which parts?
[05:42:57] Aeyrix: He's just taking a break. He was very burned out.
[05:43:05] Aeyrix: @ryanbates, IIRC.
[05:43:24] Ox0dea: > mfw the englishman didnt use burnt
[05:43:27] konsolebox: Ox0dea: you missed bash. unfortunately there are _still_ many things that could easily be done in Bash than Ruby...
[05:43:28] Scripore: has joined #ruby
[05:43:37] jbw_: has joined #ruby
[05:43:41] Ox0dea: konsolebox: Yes, please enlighten me as to what those things are, specifically.
[05:43:49] konsolebox: Ox0dea: and wasn't i referring to the list?
[05:43:56] Ox0dea: Which list was that?
[05:44:22] konsolebox: Ox0dea: sigh.. this is not worth it :)
[05:44:26] agent_white: The need to install ruby. Each and every linux distro has pearl?
[05:44:29] mark06: has joined #ruby
[05:44:40] Ox0dea: agent_white: LFS doesn't.
[05:44:44] Radar: agent_white has become a Markov chain
[05:45:14] agent_white: Radar: :) Hehe I think I'll keep that trophy.
[05:45:24] Ox0dea: agent_white: Is it your intention to claim that Perl is superior to Ruby because it's there by default in most cases?
[05:45:36] agent_white: Ox0dea: Did I say that?
[05:45:40] Ox0dea: agent_white: I asked if you did.
[05:45:48] Aeyrix: Ox0dea: pls no
[05:45:56] Rinzlit: Perl is on cpanel
[05:46:13] Ox0dea: I swear you must be a time traveler.
[05:46:16] agent_white: Ox0dea: I know. But I'm telling you that clearly that was not what I attempted to convey, in any way shape or form.
[05:46:30] agent_white: I was just saying, it's good to know some bash. Simple as that.
[05:46:46] Ox0dea: agent_white: Talking like a Markov chain does neither you nor your audience any great favor.
[05:46:55] dagda1: has joined #ruby
[05:47:06] Ox0dea: And now you've switched from Perl to Bash?
[05:47:14] Aeyrix: >tfw Ox has gone full argument
[05:47:25] agent_white: Ox0dea: I know :) I spew random thoughts sometimes. My bad. I'll hush-up.
[05:47:40] Ox0dea: Would that I were so wise.
[05:48:17] Aeyrix: https://xkcd.com/1068/
[05:48:33] konsolebox: Ox0dea: s/this is/you're/ :)
[05:49:31] agent_white: Aeyrix: https://i.imgur.com/xm2czGX.jpg <- !
[05:49:48] Aeyrix: agent_white: My life story.
[05:49:57] Aeyrix: konsolebox: Highly rude.
[05:50:02] Aeyrix: Illegal, even.
[05:50:47] Ox0dea: Oh, I thought he was attempting to correct some grammatical mistake I'd made.
[05:50:57] Aeyrix: No, they were just being rude.
[05:51:09] Ox0dea: A symptom of defeat, in my experience.
[05:51:12] Aeyrix: Unfortunately I couldn't get !rude added into the bot due to horrendous creative oppression.
[05:51:45] Radar: ACTION does not take the bait
[05:51:48] T3: has joined #ruby
[05:53:00] havenwood: has joined #ruby
[05:53:43] tagrudev: has joined #ruby
[05:54:53] konsolebox: Aeyrix: rude is such a relative term.
[05:55:16] konsolebox: Ox0dea: i'm pretty much sure i'm far from defeated.
[05:56:12] Aeyrix: For fuck's sake will you please stop?
[05:56:17] Aeyrix: You're defeated in that you now look like a petty moron.
[05:56:27] Aeyrix: Ox isn't far behind, quit yammering about bullshit.
[05:56:50] Aeyrix: Offtopic is fine until you get into shittalking matches that rival my 4chan posts.
[05:57:05] ribbons: Aeyrix, we have an anon here eh?
[05:57:18] ribbons: shitposting by day, irc by night
[05:57:19] Aeyrix: I am the infamous fore-chain as heard on CNN.
[05:57:31] astrobunny: has joined #ruby
[05:57:45] Aeyrix: I actually just post on /vg/ and /g/ a lot. They're blue boards and pretty solid discussion goes on.
[05:58:12] Ox0dea: The only winning move is not to /b/.
[05:58:16] Rinzlit: Aeyrix im impressed xD
[05:58:42] Aeyrix: Rinzlit: ?
[05:59:02] Rinzlit: Are you really the infamouse fore-chain?
[05:59:09] Rinzlit: With the h4x0rs?
[05:59:16] Rinzlit: But anonmyus
[05:59:20] Aeyrix: I work in information security but I am not the infamous foru chain
[05:59:32] Ox0dea: Rinzlit: Aeyrix is the CTO at a 4chan 500 company.
[05:59:42] Aeyrix: > fortune
[05:59:46] Aeyrix: God that's incredible.
[06:00:09] Aeyrix: Rinzlit: http://elliot.pro/
[06:00:19] Aeyrix: I'm not much of a big name at all. :)
[06:00:25] Rinzlit: http://pornhub.com/
[06:00:26] Aeyrix: I just do my own thing quietly.
[06:00:31] vdamewood: has joined #ruby
[06:00:49] Rinzlit: actually ima stop before i get told to go to ruby off topc
[06:00:55] Rinzlit: So ruby stuff
[06:01:13] Aeyrix: Off topic is generally considered fine unless it turns into that mess above, or gets in the way of other people learning.
[06:01:24] Rinzlit: Oh okay xD
[06:01:29] Ox0dea: Aeyrix: Are you descended from Francis Bacon?
[06:01:32] Scripore: has joined #ruby
[06:01:38] Ox0dea: Fancy that.
[06:01:47] Rinzlit: Did you help make the bacon bit?
[06:02:04] Aeyrix: My surname is German for a type of smoked pork.
[06:02:16] Radar: Rinzlit: Not appropriate to link to that in this channel.
[06:02:34] Aeyrix: Too late.
[06:02:38] Aeyrix: My entire office is now around my screen.
[06:02:41] Aeyrix: Send help.
[06:03:30] Ox0dea: "Now hear, you blissful powers underground! Answer the call, send help. Bless the children. Give them triumph now."
[06:03:45] Rinzlit: lol i did that once...
[06:04:03] Rinzlit: on like my first week working with some people I spelled the company name wrong
[06:04:08] Rinzlit: and it pulled up that site xD
[06:04:10] Rinzlit: my boss saw
[06:04:13] Ox0dea: Which site?
[06:04:24] Rinzlit: lol the worst one xD
[06:04:27] icosa1: has joined #ruby
[06:04:33] Ox0dea: Yeah, but there are so many.
[06:04:34] Rinzlit: his comment was I use the same site
[06:04:43] Rinzlit: Then said redtube was better
[06:04:44] Aeyrix: Honesty is the best policy.
[06:04:58] Rinzlit: then there were debates in the office for the next week
[06:05:02] Rinzlit: on what site people prefer...
[06:05:17] Aeyrix: > Not paying for premium
[06:05:24] safeforge: has joined #ruby
[06:05:47] Rinzlit: lol i love where i work xD
[06:05:53] Rinzlit: even if they barely pay me lol
[06:06:18] astrobun_: has joined #ruby
[06:06:41] riotjones: has joined #ruby
[06:07:11] Ox0dea: Aeyrix: exploit.cat is kill. :(
[06:07:23] Aeyrix: Ox0dea: I took it down temporarily so I could get internet installed.
[06:08:02] joshbamboo1: has joined #ruby
[06:08:13] RegulationD: has joined #ruby
[06:09:45] g3funk: has joined #ruby
[06:11:23] emilkarl: has joined #ruby
[06:11:51] havenwood: Francis "Chunky" Bacon thus spake "Reading maketh a full [Rubyist]; conference a ready [Rubyist]; and writing an exact [Rubyist]."
[06:13:02] usershell: has joined #ruby
[06:13:32] Ox0dea: All hail.
[06:14:35] Ox0dea: Is it known whether _why ever visited #ruby-lang?
[06:14:37] roolo: has joined #ruby
[06:15:18] acke: has joined #ruby
[06:15:33] dhjondoh1: has joined #ruby
[06:16:22] Aeyrix: Probably yes.
[06:17:14] sharpmachine: has joined #ruby
[06:17:51] hahuang65: has joined #ruby
[06:18:27] sinkensabe: has joined #ruby
[06:19:15] riotjones: has joined #ruby
[06:19:46] symm-: has joined #ruby
[06:20:02] sinkensabe: has joined #ruby
[06:20:20] workmad3: has joined #ruby
[06:20:31] eGGsha: has joined #ruby
[06:24:11] havenwood: https://codeiq.jp/magazine/2015/07/26120/
[06:26:25] blaines: has joined #ruby
[06:26:37] serivich: has joined #ruby
[06:28:02] htmldrum: has joined #ruby
[06:28:12] schaerli: has joined #ruby
[06:28:21] yuji_shimoda_: has joined #ruby
[06:28:33] Oog: has joined #ruby
[06:29:44] tagrudev: has joined #ruby
[06:29:53] Ox0dea: Erikusha, Kurisuto, Oparu, Mira.
[06:30:39] havenwood: Ox0dea: ooh, elixir is a hard one
[06:30:43] Ox0dea: Paisan, Hasuko, Rua, Shishapuro.
[06:30:50] arup_r: has joined #ruby
[06:31:34] Ox0dea: havenwood: Can "Erikusha" be improved upon?
[06:32:30] Ox0dea: Waitosupeshi.
[06:33:48] T3: has joined #ruby
[06:33:50] aceRacer: has joined #ruby
[06:34:02] mistermocha: has joined #ruby
[06:34:08] aceRacer: https://gist.github.com/aghosh47/27f0de9abaf069de79d5#file-profile_serializer-rb-L16 is this some sort of monkey patching .. :(
[06:34:38] havenwood: Ox0dea: irikutsuru
[06:34:41] Ox0dea: aceRacer: No, that's just inheritance.
[06:35:05] Ox0dea: havenwood: su > tsu there, surely.
[06:35:07] aceRacer: so class V1_1 inherits and then overrides the other classes ?
[06:35:48] Ox0dea: aceRacer: Aye, that does look pretty wonky.
[06:36:16] Ox0dea: It's to facilitate backward compatibility.
[06:36:50] Ox0dea: "Override" isn't quite the word for it.
[06:37:05] aceRacer: what is it called then?
[06:37:27] havenwood: Ox0dea: tsuru sounds closer to me than suru, dunno
[06:37:34] aceRacer: backward compatibility :P
[06:38:20] Ox0dea: aceRacer: Are these classes being reopened here, or is this all there is to them?
[06:40:03] havenwood: ???????????????
[06:40:15] havenwood: dubkoidragon: hi
[06:40:16] dubkoidragon: anyone here that's ever worked with shoes??
[06:40:21] shevy: Ox0dea I don't know if he was on #ruby-lang but he used to be on #shoes. I remember because I talked to him back then
[06:40:31] dubkoidragon: there a shoes chan
[06:40:37] dubkoidragon: thats a good coincidence
[06:40:41] havenwood: dubkoidragon: Shoes 4 \o/
[06:40:42] shevy: the original one... not that java-shoes :D
[06:40:47] Ox0dea: havenwood: The E in English's "elixir" is pronounced as a short I, but Japanese's i is pronounced like a long English E.
[06:40:49] havenwood: dubkoidragon: JRuby 9k released today. :)
[06:40:57] mark06: has left #ruby: ("http://pidgin.renatosilva.me - Pidgin++")
[06:41:33] havenwood: dubkoidragon: http://jruby.org/2015/07/22/jruby-9-0-0-0.html
[06:41:37] dubkoidragon: I've heard of JRuby but not sure what it is
[06:41:40] dubkoidragon: kk ill check that out
[06:41:45] havenwood: dubkoidragon: https://github.com/shoes/shoes4#readme
[06:41:56] Ox0dea: JRuby != J + Ruby.
[06:42:04] Ox0dea: But such a language would doubtless be rather interesting.
[06:42:30] havenwood: dubkoidragon: It's a top-notch implementation of the latest Ruby on the JVM.
[06:42:47] stonith: has joined #ruby
[06:42:52] aceRacer: Ox0dea .. um, I wanted to monkey patch .. like in ruby they do, mention the class define a new method..
[06:43:04] dubkoidragon: so why is that better than ruby then
[06:43:10] dubkoidragon: i'm new here :/
[06:43:19] Ox0dea: aceRacer: That's just open classes, not necessarily monkey-patching.
[06:43:21] aceRacer: I never thought this way it would actually work.. looks like anything works ..
[06:43:52] Ox0dea: aceRacer: V1 and V1_1 are essentially just being used as namespaces, so they probably ought to be modules.
[06:44:08] Ox0dea: Unless they've got other definitions elsewhere and are indeed used as classes in some places.
[06:44:26] flughafen: sevenseacat: top of the morning to ya
[06:45:22] Radar: Ox0dea: Do you have one of your very strange gists somewhere? I want to scare someone
[06:45:24] Aeyrix: flughafen: on holiday, probably won't respond
[06:45:25] havenwood: dubkoidragon: It's usually the fastest implementation, has no GVL, and has access to the ecosystem.
[06:45:29] flughafen: shevy: plane took off this morning
[06:45:42] Aeyrix: Radar: https://gist.github.com/baweaver/88bbbc1a3e3b5dee2610
[06:45:48] Ox0dea: Radar: The ones baweaver went about Muggling?
[06:45:51] Radar: Ox0dea: yes
[06:45:54] dubkoidragon: havenwood: k ill brb we'll talk mor
[06:46:00] Aeyrix: Alternatively: https://gist.github.com/baweaver/c2eeee9d8c69a21a8b98
[06:46:15] havenwood: muggling, hehe
[06:46:30] Ox0dea: havenwood: I do the magic, baweaver undoes it in spectacularly impressive fashion.
[06:46:51] Ox0dea: Radar: Aeyrix's link to baweaver's Gists should do. :)
[06:46:59] Radar: ACTION scares
[06:47:05] Ox0dea: Which're you gonna use?
[06:47:05] Aeyrix: [ spookiness intensifies ]
[06:47:25] Ox0dea: ACTION is fighting the urge to do another.
[06:47:32] Ox0dea: Oh, wait!
[06:47:37] Mendenhall: has joined #ruby
[06:47:39] Ox0dea: I has one.
[06:47:44] baweaver: ACTION ducks
[06:47:51] Radar: ACTION puts up riot shield
[06:47:55] Ox0dea: I have to craft the upload to eval.in because it uses CRLF. :/
[06:48:06] Kalov: has joined #ruby
[06:49:22] Ox0dea: https://eval.in/403736
[06:49:35] kraljev11: has joined #ruby
[06:49:55] Ox0dea: It reads the maze dimensions from stdin. ^_^
[06:50:14] stonith: has joined #ruby
[06:50:14] stonith: has joined #ruby
[06:50:20] jenrzzz: has joined #ruby
[06:50:28] hahuang65: has joined #ruby
[06:50:31] baweaver: ACTION is debating using the vacation excuse
[06:50:32] Aeyrix: https://eval.in/403741
[06:50:54] duderonomy: has joined #ruby
[06:51:08] Ox0dea: Aeyrix: See above about CRLF. :/
[06:51:17] shevy: flughafen lol you are lying!
[06:51:26] Aeyrix: Ox0dea: Could you not make it take
[06:51:40] flughafen: shevy: go and see
[06:51:40] ScriptGeek: has joined #ruby
[06:51:59] Ox0dea: Aeyrix: I despise arbitrary limits.
[06:52:07] Aeyrix: You have one anyway.
[06:52:12] mary5030: has joined #ruby
[06:52:18] Aeyrix: Yeah, I can't put any value in because it fuckin breaks.
[06:52:39] Ox0dea: So run the damned thing locally, where sane line endings ought to be in effect.
[06:53:04] Ox0dea: baweaver: It's hardly as complex as I might've made it.
[06:53:17] Ox0dea: The PRNG is shit, and I also backed out of using Aldous-Broder as the carving algorithm. :/
[06:54:23] Ox0dea: It's a plain-ol' linear congruential generator, but the coefficients are too small for good randomness.
[06:54:54] krz: has joined #ruby
[06:56:49] allomov: has joined #ruby
[06:57:23] AnoHito: has joined #ruby
[07:00:00] Oog: has joined #ruby
[07:01:29] safeforge: has joined #ruby
[07:01:44] thinkswan: has joined #ruby
[07:02:06] baweaver: 423rd character
[07:02:14] Ox0dea: It can be replaced with an underscore.
[07:02:26] Ox0dea: I hate that I missed that.
[07:02:49] solars: has joined #ruby
[07:02:51] baweaver: well I need to get sleep but I have a good portion of it decomposed.
[07:02:59] Ox0dea: Sweet dreams. :P
[07:03:35] Violentr: has joined #ruby
[07:04:01] xkickflip: has joined #ruby
[07:04:02] Ox0dea: Radar: To what end do you wish to frighten some poor soul away from ever learning Ruby?
[07:04:56] Aeyrix: https://twitter.com/jaz303/status/573443775030259712
[07:05:23] Ox0dea: Aeyrix: I enjoy the HN threads on Fortune.
[07:05:29] Oog_: has joined #ruby
[07:07:13] yfeldblum: has joined #ruby
[07:07:46] j4cknewt: has joined #ruby
[07:08:12] CaryInVictoria: has joined #ruby
[07:08:20] Radar: Ox0dea: People were discussing over in Slack about the nasty things you could do with Ruby.
[07:08:37] jenrzzz: has joined #ruby
[07:09:01] stonith: has joined #ruby
[07:09:01] stonith: has joined #ruby
[07:09:06] dubkoidragon: so from what I understand jruby requires one to know how to code in java
[07:09:12] Ox0dea: dubkoidragon: Incorrect.
[07:09:17] Ox0dea: "It's just Ruby."
[07:09:35] Ox0dea: Radar: Excellent. :)
[07:10:58] dubkoidragon: maybe I should get better at ruby though before I learn different versions fo it
[07:11:12] Sirupsen: has joined #ruby
[07:11:23] havenwood: The dev insists this is an email validation regexp but I keep getting some maze...
[07:11:42] Ox0dea: havenwood: Por que no los dos?
[07:12:02] Ox0dea: I've still got a non-alphanumeric quine to write.
[07:12:26] Stan: has joined #ruby
[07:12:32] Ox0dea: I wonder if I could make it polyglottal with Perl.
[07:13:59] tjbiddle: has joined #ruby
[07:14:18] Juanchito: has joined #ruby
[07:14:22] Radar: Ox0dea: People were discussing over in Slack about the nasty things you could do with Ruby.
[07:14:40] cornerma1: has joined #ruby
[07:15:01] djbkd: has joined #ruby
[07:16:50] Ox0dea: Radar: Did mine win?
[07:17:06] Radar: Ox0dea: I think everyone's either gone home or they're too horrified to speak abot it
[07:17:23] Aeyrix: Slackers.
[07:17:36] stonith: has left #ruby: ("http://quassel-irc.org - Chat comfortably. Anywhere.")
[07:18:03] sharpmachine: has joined #ruby
[07:21:48] mary5030: has joined #ruby
[07:22:30] blaines: has joined #ruby
[07:26:17] konsolebox: has joined #ruby
[07:26:38] CaryInVictoria: has joined #ruby
[07:30:01] EminenceHC: has joined #ruby
[07:30:34] Synthead: has joined #ruby
[07:31:37] soc42: has joined #ruby
[07:32:01] msgodf: has joined #ruby
[07:32:59] workmad3: has joined #ruby
[07:33:01] slowlag: has joined #ruby
[07:34:06] slowlag: has joined #ruby
[07:34:44] keen__________29: has joined #ruby
[07:35:26] towski_: has joined #ruby
[07:35:50] slowlag: has joined #ruby
[07:37:11] yardenbar: has joined #ruby
[07:37:28] anisha: has joined #ruby
[07:37:33] Macaveli: has joined #ruby
[07:38:05] agent_white: has joined #ruby
[07:38:13] mike___1234: has joined #ruby
[07:38:24] htmldrum: has joined #ruby
[07:38:56] slowlag: has joined #ruby
[07:39:02] irk: has joined #ruby
[07:39:52] irk_: has joined #ruby
[07:42:23] apfeluser: has joined #ruby
[07:42:34] andikr: has joined #ruby
[07:42:46] adaedra: has joined #ruby
[07:44:57] slowlag: has joined #ruby
[07:45:13] ndrei: has joined #ruby
[07:45:32] schaerli: has joined #ruby
[07:45:55] eGGsha: has joined #ruby
[07:46:05] slowlag: has joined #ruby
[07:47:24] rht: has joined #ruby
[07:48:45] livathinos: has joined #ruby
[07:49:24] elia: has joined #ruby
[07:50:53] T3: has joined #ruby
[07:51:33] tno: has joined #ruby
[07:53:02] TheHodge: has joined #ruby
[07:53:04] jbwiv: has joined #ruby
[07:54:15] Igorshp: has joined #ruby
[07:54:47] Oog: has joined #ruby
[07:54:51] jud: has joined #ruby
[07:54:51] jud: has joined #ruby
[07:55:46] quimrstorres: has joined #ruby
[07:55:54] hololeap: has joined #ruby
[07:58:17] Iskarlar: has joined #ruby
[07:59:15] hololeap|2: has joined #ruby
[07:59:53] apfeluser: has joined #ruby
[08:00:09] Hounddog: has joined #ruby
[08:00:39] white_bear: has joined #ruby
[08:01:56] Erika-Mustermann: has joined #ruby
[08:02:38] mikecmpbll: has joined #ruby
[08:02:54] thiagovsk: has joined #ruby
[08:02:56] nym: has joined #ruby
[08:02:58] hashrocket: has joined #ruby
[08:04:24] Hounddog: has joined #ruby
[08:04:44] jenrzzz: has joined #ruby
[08:05:44] eGGsha: has joined #ruby
[08:05:47] ruurd: has joined #ruby
[08:08:04] dmolina: has joined #ruby
[08:08:57] blackmes1: has joined #ruby
[08:08:59] rdark: has joined #ruby
[08:09:21] benlovell: has joined #ruby
[08:09:28] htmldrum: has joined #ruby
[08:10:12] tomphp: has joined #ruby
[08:12:11] Iskarlar: has joined #ruby
[08:13:35] aspiers: has joined #ruby
[08:17:14] axl_: has joined #ruby
[08:17:33] joonty: has joined #ruby
[08:18:02] monod: has joined #ruby
[08:18:52] sharpmachine: has joined #ruby
[08:20:33] franckverrot: has joined #ruby
[08:20:54] fella6s: has joined #ruby
[08:21:11] senayar: has joined #ruby
[08:21:11] senayar: has joined #ruby
[08:21:55] dopieee: has joined #ruby
[08:22:31] tomphp_: has joined #ruby
[08:23:11] sandelius: has joined #ruby
[08:24:04] xkickflip_: has joined #ruby
[08:24:34] stoked: has joined #ruby
[08:24:50] Synthead: has joined #ruby
[08:25:09] Musashi007: has joined #ruby
[08:25:16] pontiki_: has joined #ruby
[08:25:23] arup_r: has joined #ruby
[08:25:31] Violentr: has joined #ruby
[08:25:33] pipecloud: has joined #ruby
[08:26:08] gs: has joined #ruby
[08:26:13] silverdust: has joined #ruby
[08:26:15] alem0lars: has joined #ruby
[08:26:21] icosa1: has joined #ruby
[08:27:09] duncannz: has joined #ruby
[08:27:24] QualityAddict: has joined #ruby
[08:27:27] rdark: has joined #ruby
[08:27:29] nveselinov: has joined #ruby
[08:27:56] fumihiro: has joined #ruby
[08:28:01] Feyn: has joined #ruby
[08:28:16] htmldrum: has joined #ruby
[08:29:25] Olipro: has joined #ruby
[08:29:27] j4cknewt: has joined #ruby
[08:29:35] michael_mbp: has joined #ruby
[08:30:29] dtcristo: has joined #ruby
[08:31:12] lxsameer: guys how can to convert "0010" to 0b0010?
[08:31:32] schaerli: has joined #ruby
[08:31:43] keen__________29: has joined #ruby
[08:32:16] yorickpeterse: lxsameer: what have you tried?
[08:32:34] lxsameer: yorickpeterse: to_i(2) unpack ...
[08:33:04] einarj: has joined #ruby
[08:33:34] Oog: has joined #ruby
[08:33:40] CaryInVictoria: has joined #ruby
[08:33:45] quimrstorres: has joined #ruby
[08:33:48] adaedra: >> "0010".to_i(2)
[08:33:49] ruboto: adaedra # => 2 (https://eval.in/403835)
[08:33:56] adaedra: looks like it's working
[08:34:48] lxsameer: adaedra: not
[08:35:04] lxsameer: adaedra: i need the same sequence
[08:35:15] lxsameer: '0010' => 0b0010
[08:35:30] adaedra: >> "0010".to_i(2) == 0b0010
[08:35:31] ruboto: adaedra # => true (https://eval.in/403836)
[08:35:39] adaedra: or maybe it's not a number you want as output
[08:36:05] ljarvis: >> 0b0010 == 2 # :)
[08:36:06] ruboto: ljarvis # => true (https://eval.in/403837)
[08:36:13] adaedra: 0b10 is just another way of saying 2 or 0x2
[08:37:04] Cust0sLim3n: has joined #ruby
[08:37:35] TheBrayn: there are 10 kind of people in the world, those who understand binary and those who don't
[08:37:35] mistermocha: has joined #ruby
[08:37:48] TheBrayn: and those who didn't know that this is a base-3 joke
[08:38:01] ruboto: I don't know anything about badumtss
[08:38:09] adaedra: ^ we need something here.
[08:38:24] arturmartins: has joined #ruby
[08:39:00] dubkoidragon: hey so I am playing with rails and I basically need to refresh my html by testing it. doed anyone know the easiest way i can turn my html code in my code editor to being viewed on my webbrowser
[08:39:32] adaedra: you just open the page on your webbrowser and hit F5/Cmd-R after changes
[08:39:47] adaedra: (With a running server, ofc)
[08:39:54] ruboto: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[08:40:14] CloCkWeRX: has joined #ruby
[08:43:51] tjbiddle: has joined #ruby
[08:45:09] Oog_: has joined #ruby
[08:45:13] msgodf: has joined #ruby
[08:45:35] quimrstorres: has joined #ruby
[08:47:28] wildroman2: has joined #ruby
[08:48:20] yardenbar: has joined #ruby
[08:49:50] shredding: has joined #ruby
[08:51:23] leat1: has joined #ruby
[08:51:40] white_bear: has joined #ruby
[08:51:59] dangerousdave: has joined #ruby
[08:54:53] ruby922: has joined #ruby
[08:54:57] bodgix: has joined #ruby
[08:56:02] arup_r: has joined #ruby
[08:57:06] dmolina: has joined #ruby
[08:58:52] Igorshp: has joined #ruby
[08:59:17] MyMind: has joined #ruby
[08:59:31] allomov: has joined #ruby
[09:00:56] krz: has joined #ruby
[09:00:56] leat1: has joined #ruby
[09:02:02] Averna1: has joined #ruby
[09:02:04] djbkd: has joined #ruby
[09:04:28] user1138: has joined #ruby
[09:04:28] Averna1: has left #ruby: ()
[09:06:09] krz: has joined #ruby
[09:07:11] startupality: has joined #ruby
[09:07:39] schaerli: has joined #ruby
[09:07:51] senayar: has joined #ruby
[09:08:34] dfockler: has joined #ruby
[09:09:40] Averna: has joined #ruby
[09:10:04] ruurd: has joined #ruby
[09:10:05] Sirupsen: has joined #ruby
[09:12:02] DoubleMalt: has joined #ruby
[09:13:00] yardenbar: has joined #ruby
[09:17:41] senayar: has joined #ruby
[09:19:39] sharpmachine: has joined #ruby
[09:21:03] mandarinkin: has joined #ruby
[09:21:06] eGGsha: has joined #ruby
[09:23:22] aceRacer: has joined #ruby
[09:25:03] benlovell: has joined #ruby
[09:25:09] Mendenhall: has joined #ruby
[09:26:04] dumdedum: has joined #ruby
[09:26:48] railsraider: has joined #ruby
[09:27:27] stamina: has joined #ruby
[09:27:34] sn0wb1rd: has joined #ruby
[09:27:50] Averna: has joined #ruby
[09:27:53] rikkipitt: has joined #ruby
[09:29:26] Hobogrammer: has joined #ruby
[09:31:52] msgodf: has joined #ruby
[09:33:10] Rinzlit: OMGGADKS:AFASKdf; asf asl;fmk sal;dfm kl;wjkl;fwafl;kdfawk
[09:33:23] Rinzlit: I went to go play league of legends come back try one last time
[09:33:25] Rinzlit: Magically works
[09:33:31] Rinzlit: Did the same thing I did the last 4 times
[09:34:11] i8igmac: has joined #ruby
[09:34:34] CaryInVictoria: has joined #ruby
[09:38:55] railsraider_: has joined #ruby
[09:39:20] Rinzlit: https://gist.github.com/anonymous/72a9f6a21799759a27b6
[09:41:07] yorickpeterse: For a moment I thought that was spam
[09:42:14] DEA7TH_: has joined #ruby
[09:43:08] Rinzlit: adaedra any idea what that means .-.
[09:43:26] Rinzlit: I can only really follow guides and they said thats how you updated admin thingy
[09:43:37] Rinzlit: https://github.com/catarse/catarse/wiki/Getting-Started---english-version
[09:43:51] mistermocha: has joined #ruby
[09:44:39] railsForDaiz: has joined #ruby
[09:47:10] Rinzlit: Eh, I think I can work on it without that
[09:47:27] troulouliou_div2: has joined #ruby
[09:48:55] shock_one: has joined #ruby
[09:49:56] shock_one: Hi. Do you know any gem which would give me all possible names of a country? Like for "US" it would be ["The United States of America", "The United States", "USA", "US"...]
[09:51:10] marienz: has joined #ruby
[09:51:53] shock_one: Or, if it's easier, having a string like "Rua do Padre Luis Cabral,1015, 4150-464 Porto, Portugal", I'd like to know if it's located in PT. I do know that I'm looking for PT, not any other country.
[09:52:01] htmldrum: has joined #ruby
[09:52:39] Pisuke: has joined #ruby
[09:52:39] schaerli: has joined #ruby
[09:55:14] startupality: has joined #ruby
[09:56:23] anisha: has joined #ruby
[09:56:46] camilasan: has joined #ruby
[09:56:53] yorickpeterse: shock_one: Not all possible ones, because that list could be infinite
[09:57:08] yorickpeterse: https://github.com/hexorx/countries but this has a decent chunk of data about every country
[09:57:43] sdothum: has joined #ruby
[09:58:27] yorickpeterse: e.g. we have a system (released literally only a few days ago) that currently maps 4313 different ways of writing countries/cities to the countries they belong to
[09:58:36] yorickpeterse: So US, USA, United States, America, etc all mapped to the US
[09:59:17] shock_one: yorickpeterse: is it open source?
[09:59:37] ljarvis: open to the entire office
[10:00:03] astrobunny: has joined #ruby
[10:00:04] shock_one: yorickpeterse: can I ask where did you get the data from?
[10:00:07] yorickpeterse: It's also not bulletproof, but for our dataset it matches 95% of our data
[10:00:17] yorickpeterse: shock_one: lots of different sources
[10:00:47] yorickpeterse: it's a mixture of the united nations country list, a mixture of well known different spellings, a huge pile of location names that we already stored in raw form, etc
[10:00:59] yorickpeterse: e.g. the list also includes the top 20 cities for every country
[10:01:06] yorickpeterse: because we have a lot of data where it's just the city name
[10:01:09] bruno-: has joined #ruby
[10:01:58] shock_one: Thank you, yorickpeterse. Can you point me to at least one source of such data?
[10:02:26] yorickpeterse: http://www.unece.org/cefact/locode/service/location
[10:02:44] yorickpeterse: http://downloads.yorickpeterse.com/files/largest_cities_per_country.json
[10:03:57] yorickpeterse: https://en.wikipedia.org/wiki/List_of_alternative_country_names
[10:04:27] yorickpeterse: Depending on how you match things you might not need all alternative names
[10:06:28] shock_one: Awesome, thank you again.
[10:06:32] Musashi007: has joined #ruby
[10:09:45] RegulationD: has joined #ruby
[10:11:16] senayar: has joined #ruby
[10:11:16] senayar: has joined #ruby
[10:13:20] senayar: has joined #ruby
[10:13:22] jolg42: has joined #ruby
[10:13:49] serivichi: has joined #ruby
[10:14:19] last_staff: has joined #ruby
[10:14:39] ArchRogem: has joined #ruby
[10:14:46] s00pcan: has joined #ruby
[10:15:26] eGGsha: has joined #ruby
[10:16:10] blackmes1: has joined #ruby
[10:17:23] Musashi007: has joined #ruby
[10:17:55] astrobunny: has joined #ruby
[10:18:01] sandelius: has joined #ruby
[10:18:34] arup_r: has joined #ruby
[10:20:27] s00pcan: has joined #ruby
[10:20:27] sharpmachine: has joined #ruby
[10:21:27] Rinzlit: - t('.banner_words').each do |index, word|
[10:21:46] Rinzlit: Anyone know what I can replace so ruby can read it .-.
[10:22:31] adaedra: Rinzlit: maybe you should learn some Ruby to begin with
[10:23:21] Rinzlit: adaedra whats HAML?
[10:23:28] Rinzlit: I'm sorry yorickpeterse
[10:24:10] adaedra: Hey Rinzlit, you know sysadmin best friend?
[10:24:31] adaedra: It works for developpers, too
[10:24:32] Rinzlit: Agent ranksack is more useful
[10:24:35] Rinzlit: But googles pretty good too
[10:24:43] Rinzlit: But I prefer duckduckgo tbh
[10:25:02] adaedra: You should hang out with it more
[10:31:05] wildroman2: has joined #ruby
[10:33:29] blackmesa: has joined #ruby
[10:35:13] CaryInVictoria: has joined #ruby
[10:38:25] Oog: has joined #ruby
[10:39:07] usershell: has joined #ruby
[10:40:23] ndrei: has joined #ruby
[10:42:32] senayar: has joined #ruby
[10:42:37] CloCkWeRX: has joined #ruby
[10:44:14] iinzg: has joined #ruby
[10:46:48] Oog: has joined #ruby
[10:47:13] anisha: has joined #ruby
[10:47:54] mistermocha: has joined #ruby
[10:50:02] agent_white: Ranksack? I haven't heard from him in ages.
[10:52:53] CaryInVictoria: has joined #ruby
[10:53:08] Oog: has joined #ruby
[10:53:43] Sembei: has joined #ruby
[10:55:35] schaerli: has joined #ruby
[10:58:19] mathie: has joined #ruby
[11:00:16] codecop: has joined #ruby
[11:00:58] bubbys: has joined #ruby
[11:01:25] prestorium: has joined #ruby
[11:03:49] Rinzlit: I must be honest this ubuntu server
[11:03:56] Rinzlit: Its an impressive troll
[11:04:08] ddv: Rinzlit: ?
[11:04:20] Rinzlit: I spent hours trying to get ruby gems working last night
[11:04:39] Rinzlit: I gave up and went to play videogames ran 1 command to try again
[11:04:43] Rinzlit: It suddenly works
[11:04:46] ddv: Rinzlit: lol I can do it in 5 minutes
[11:04:56] Rinzlit: Try to repeat the process and it is broken again
[11:05:46] Rinzlit: Well, idk. all I do know is this server is more bipolar then my ex gf
[11:05:52] awk: erm, ruby noob... Dir.entries("*full*") what is the correct way to list the enteries for anything that contains full in it ?
[11:06:11] [k-: has joined #ruby
[11:06:14] ddv: Rinzlit: investigate
[11:07:02] Rinzlit: ddv: I'd love to but I don't know anything about Ruby, all I do know is a command worked after playing league of legends for 2 hours
[11:07:12] Rinzlit: That didn't work when I tried getting it to work for 6 hours
[11:07:30] [k-: >> %w!Rinzlit shevy Ox0dea!!
[11:07:31] ruboto: [k- # => /tmp/execpad-b44f9ecda85f/source-b44f9ecda85f:2: syntax error, unexpected '!', expecting keyword_end ...check link for more (https://eval.in/403955)
[11:07:43] adaedra: Based on your messages, League of Legens is the solution.
[11:07:45] [k-: guess that didn't work
[11:07:58] jhass: awk: replace .entries with .glob
[11:08:02] ddv: Rinzlit: I would play some more LoL if I was you.
[11:08:19] nveselinov: has joined #ruby
[11:08:20] Rinzlit: ddv: Maybe, but I don't want it to break
[11:08:34] [k-: oh, I needed to escape the !
[11:08:48] awk: jhass: glob doesn't return anything.
[11:08:50] ddv: [k-: why are you spamming the channel
[11:09:03] awk: never mind...
[11:09:06] awk: I'm being an idiot
[11:09:16] apeiros: does the following pattern have a name? you have a parent class which takes a parameter (that parameter controls a couple of things - e.g. which server to contact, in what directory to store files). you have a subclasses for each allowed value of that parameter, which hard code that param.
[11:09:20] phutchins: has joined #ruby
[11:09:20] [k-: why are you so strict?
[11:09:21] anisha: has joined #ruby
[11:09:29] [k-: you are like jhass 4.0
[11:09:53] bruno-: has joined #ruby
[11:10:06] [k-: jhass: you have been outdone
[11:10:15] Soda: has joined #ruby
[11:10:51] jhass: [k-: you're proving his point...
[11:11:16] [k-: apeiros, seems like command sort of thing
[11:11:30] serivichi: has joined #ruby
[11:11:31] krz: has joined #ruby
[11:11:39] [k-: I'm pretty sure he is biased against me
[11:11:55] apeiros: [k-: yeah, in all instances the classes are workflow handling classes
[11:12:27] ddv: call it the apeiros design pattern
[11:13:26] [k-: http://stackoverflow.com/questions/746207/ruby-design-pattern-how-to-make-an-extensible-factory-class/746274#746274
[11:13:45] peter_paule: has joined #ruby
[11:14:14] Shoutsid: has joined #ruby
[11:15:55] agent_white: So what's the term for what apeiros wants? -- I'm just curious to know for if I have the same question in the future.
[11:16:36] [k-: link related
[11:16:54] Tritone: has joined #ruby
[11:17:02] mjuszczak: has joined #ruby
[11:19:36] workmad3: apeiros: seems to be the reverse of https://sourcemaking.com/refactoring/replace-subclass-with-fields
[11:20:49] workmad3: which is also, oddly, one of the few refactorings that doesn't seem to have a standard reversal with it
[11:20:50] presto: has joined #ruby
[11:21:04] leat1: has joined #ruby
[11:21:05] [k-: look at my link >.>
[11:21:11] sharpmachine: has joined #ruby
[11:21:30] agent_white: " you don't really need a design pattern, you just implement what you want to do"
[11:21:38] agent_white: So I'm assuming there's no specific pattern?
[11:21:47] [k-: no, there's a link to the book
[11:22:10] agent_white: I saw that. But he didn't say "this pattern is called xyz, for more see ___".
[11:22:23] agent_white: Just... what I said above.
[11:23:02] [k-: I did say link related
[11:23:11] [k-: but the book!
[11:23:37] agent_white: Hahah. My expectations were too high. :(
[11:23:40] workmad3: [k-: that's about the factory method pattern though, which is a name for the pattern used to create the subclasses, not a name for the pattern of setting up subclasses like that
[11:23:46] khando: has joined #ruby
[11:24:42] [k-: you could extend the factory method pattern
[11:25:17] workmad3: [k-: that's not how patterns work
[11:25:35] [k-: how do they work then
[11:25:44] doerteDev: has joined #ruby
[11:25:47] workmad3: [k-: patterns are names given to fairly common ways of solving specific problems... you don't 'extend a pattern' by making it mean something else or something new
[11:25:52] Axy: has joined #ruby
[11:25:52] Axy: has joined #ruby
[11:26:00] workmad3: [k-: because then it no longer means the same thing, so it's no longer the same pattern
[11:27:53] tomaz_b: has joined #ruby
[11:29:07] codenihal: has joined #ruby
[11:29:14] workmad3: (I also love it when people say "Just implement what you want and don't use a pattern" as though these were two different things... the entire point of a pattern is to implement what you want, it's just that a common way of doing it has been given a name... if your code follows the common way of doing it, you've just followed the pattern, even if you don't know the name... But I know that what the author re
[11:29:20] workmad3: ally meant was "Don't use a library that provides some generic implementation code of e.g. Factory, just write the code for a Factory yourself)
[11:30:19] allcentury: has joined #ruby
[11:30:26] adaedra: just don't write code yourself, and no more problems.
[11:30:51] [k-: the world will work once again
[11:31:11] workmad3: adaedra: code that isn't written contains no bugs :)
[11:31:52] adaedra: 0 LOC * any % of bugged code is still 0 LOC
[11:31:57] [k-: I do not write buggy code!
[11:33:41] adaedra: wonder of english: on the above sentence, you can remove "buggy" without changing meaning.
[11:33:55] Mweshi: has joined #ruby
[11:34:14] [k-: (in the current context)
[11:34:29] stoffus: has joined #ruby
[11:35:06] Scripore: has joined #ruby
[11:35:33] c355E3B: has joined #ruby
[11:35:43] towski_: has joined #ruby
[11:36:09] Mweshi: has joined #ruby
[11:36:17] shevy: le baguette of le code
[11:36:32] adaedra: wow, that's so funny /s
[11:36:51] blackmesa: has joined #ruby
[11:36:55] tjbiddle_: has joined #ruby
[11:38:24] ldnunes: has joined #ruby
[11:38:59] xaxisx: has joined #ruby
[11:42:42] MisterRusty: has joined #ruby
[11:43:35] a346: has joined #ruby
[11:44:03] lkba: has joined #ruby
[11:44:21] eGGsha: has joined #ruby
[11:44:49] hahuang61: has joined #ruby
[11:46:32] Darkwater: what would be the most ruby way to compress foo[:bar] == 5 or foo[:baz] == 5 or foo[:ban] == 5?
[11:47:03] knrz: has joined #ruby
[11:47:30] adaedra: foo.slice(:bar, :baz, :ban).include? 5 # but that requires a library to provide Hash#slice
[11:48:03] Darkwater: hm, that's a shame
[11:48:15] Darkwater: anything else?
[11:48:35] Darkwater: actually I guess a function like that would be the only option
[11:48:35] adaedra: not .include?, .value?, tho
[11:48:53] adaedra: Hash#slice is not difficult to reproduce, though.
[11:49:11] Darkwater: hm, I guess I could use #value? in this case
[11:49:56] adaedra: if :bar, :baz and :ban are the only keys in the hash, sure, #value?
[11:50:25] Darkwater: well there are a couple of other keys as well, but it doesn't matter if they match
[11:50:28] IceyEC: has joined #ruby
[11:50:35] [k-_: has joined #ruby
[11:50:46] Darkwater: it would actually excend the functionality because I'm using this in a find block
[11:51:12] Darkwater: so I'm basically looking for an item with an id OR name specified by the user
[11:51:14] adaedra: I smell xy
[11:52:20] ruboto: it seems like you are asking for a specific solution to a problem, instead of asking about your problem. This often leads to bad solutions and increases frustration for you and those trying to help you. More: http://meta.stackexchange.com/a/66378
[11:53:14] ndrei: has joined #ruby
[11:53:29] CaryInVictoria: has joined #ruby
[11:53:46] Darkwater: I'm happy with the solution I have now
[11:53:53] dgutierrez1287: has joined #ruby
[11:54:11] [k-_: what's the point of an id if you are finding by name
[11:54:59] Ropeney: has joined #ruby
[11:55:13] Darkwater: the id is still used elsewhere
[11:55:31] mistermocha: has joined #ruby
[11:56:33] Igorshp: has joined #ruby
[11:57:56] juanpaucar: has joined #ruby
[11:58:13] Averna: has joined #ruby
[11:58:40] krz: has joined #ruby
[11:58:52] workmad3: Darkwater: .values_at(:bar, :baz, :ban).include?(5)
[11:59:12] benlovell: has joined #ruby
[11:59:30] workmad3: adaedra: Hash#values_at is in core ruby ;)
[11:59:43] kidoz: has joined #ruby
[11:59:50] gnzh: has joined #ruby
[11:59:52] [k-_: bar, baz, ban :o
[12:00:32] gnzh: hello everyone, could sombody explain to me how to pass char* buffer in ruby ffi to c function? I get segfault :( not sure why. same stuff implemented in c just works.
[12:02:11] davedev24: has joined #ruby
[12:02:35] adaedra: workmad3: ooooh
[12:02:47] adaedra: &ri Hash#values_at
[12:02:47] `derpy: https://devdocs.io/ruby/hash#method-i-values_at
[12:02:53] eGGsha: has joined #ruby
[12:03:29] senayar: has joined #ruby
[12:03:32] workmad3: adaedra: I think it's a bit different from Hash#slice (which, iirc, returns a new Hash with those k-v pairs), but still useful
[12:03:45] senayar: has joined #ruby
[12:03:47] adaedra: Ah, it just returns the values
[12:04:04] Spami: has joined #ruby
[12:04:31] workmad3: adaedra: yeah... and in the order of keys given (repititions allowed)
[12:04:45] railsForDaiz: has joined #ruby
[12:04:51] adaedra: still good to know
[12:04:59] adaedra: even if having a core Hash#slice would be good.
[12:05:13] bungoman: has joined #ruby
[12:05:41] [k-_: >> ->_,__{_[__]}({:a=>?b,:c=>?d,:d=>?e},[:a,:c])
[12:05:42] ruboto: [k-_ # => /tmp/execpad-dc65c3ab88e2/source-dc65c3ab88e2:2: syntax error, unexpected '(', expecting keyword_end ...check link for more (https://eval.in/403978)
[12:05:56] blackmesa: has joined #ruby
[12:06:00] workmad3: adaedra: makes your own Hash#slice even easier to implement though :) `class Hash; def slice(keys); keys.zip(values_at(keys)).to_h; end; end`
[12:06:13] Zai00: has joined #ruby
[12:06:21] [k-_: >> (->_,__{_[__]})({:a=>?b,:c=>?d,:d=>?e},[:a,:c])
[12:06:22] ruboto: [k-_ # => /tmp/execpad-148135b700bb/source-148135b700bb:2: syntax error, unexpected '(', expecting keyword_end ...check link for more (https://eval.in/403979)
[12:06:50] workmad3: >> ->(_,__{_[__]})({:a=>?b,:c=>?d,:d=>?e},[:a,:c])
[12:06:50] adaedra: ?experiments
[12:06:51] ruboto: I don't know anything about experiments
[12:06:51] ruboto: workmad3 # => /tmp/execpad-966e662514fe/source-966e662514fe:2: syntax error, unexpected '{', expecting ')' ...check link for more (https://eval.in/403980)
[12:07:17] awk: Guys, 1 little question https://gist.github.com/anonymous/411ad99261f1a28337ff .... that returns 5 (which is correct) however if I change xtrabackup_logfile to xtrabackup_logfile1234 and I puts validate without the count it returns only the other 4, if I use validate.count it still returns 5 .. i'm trying to give myself the count of what actually outputs
[12:07:26] sarkyniin: has joined #ruby
[12:07:34] [k-_: experiment**
[12:07:36] tsujp: has joined #ruby
[12:08:31] workmad3: [k-_: ->(_,__){_[__]}.({:a=>?b,:c=>?d,:d=>?e},[:a,:c]) <-- there you go (not really sure what you're trying though)
[12:08:58] [k-_: ah, the dot
[12:09:12] freerobby: has joined #ruby
[12:09:17] [k-_: this should work too: ->(_,__){_[__]}[{:a=>?b,:c=>?d,:d=>?e},[:a,:c]]
[12:09:26] MatrixBridge: has joined #ruby
[12:09:34] krz: has joined #ruby
[12:09:39] workmad3: [k-_: yeah, or .call({...}, [:a, :c])
[12:10:40] [k-_: (->_,__{__.map{|__|_[__]}})[{:a=>?b,:c=>?d,:d=>?e},[:a,:c]]
[12:10:40] [k-_: => ["b", "d"]
[12:11:01] AugustoCesar: has joined #ruby
[12:11:06] dorei: has joined #ruby
[12:11:10] serivichi: has joined #ruby
[12:11:43] bungoman_: has joined #ruby
[12:12:44] CloCkWeRX: has left #ruby: ()
[12:14:01] schaerli: has joined #ruby
[12:14:38] davedev24: has joined #ruby
[12:15:14] ZeeNoodleyGamer: has joined #ruby
[12:15:41] AugustoCesar: has left #ruby: ()
[12:15:52] oz: that's quite unreadable
[12:16:20] tjbiddle: has joined #ruby
[12:16:28] adaedra: that's the goal
[12:16:37] adaedra: [k-_ only writes code to be unreadable
[12:16:46] [k-_: i've made a name for myself this few days
[12:17:10] adaedra: kind of like a C++ developer
[12:17:24] DEA7TH_: has joined #ruby
[12:17:38] iamninja: has joined #ruby
[12:18:10] Papierkorb: has joined #ruby
[12:18:12] saintcajetan: has joined #ruby
[12:19:10] sankaber: has joined #ruby
[12:19:46] pepperbreath: has joined #ruby
[12:21:11] atomical: has joined #ruby
[12:21:59] sharpmachine: has joined #ruby
[12:22:37] Cust0sLim3n: has joined #ruby
[12:22:53] acovrig: has joined #ruby
[12:26:07] tjbiddle: has joined #ruby
[12:28:10] hfp: has joined #ruby
[12:28:40] hfp_work: has joined #ruby
[12:30:11] allcentury: has joined #ruby
[12:30:48] awk: Guys, 1 little question https://gist.github.com/anonymous/411ad99261f1a28337ff .... that returns 5 (which is correct) however if I change xtrabackup_logfile to xtrabackup_logfile1234 and I puts validate without the count it returns only the other 4, if I use validate.count it still returns 5 .. i'm trying to give myself the count of what actually outputs
[12:32:12] ruboto: awk, we're not all guys - while you probably don't meant to be exclusive, not everybody feels that way. Maybe consider using "folks", "y'all" or "everyone" instead?
[12:32:24] konsolebox: has joined #ruby
[12:33:09] awk: apeiros: well i'm from South Africa and thats how we refer to _everyone_
[12:33:09] [k-_: we already read your question
[12:33:29] [k-_: it is best not to argue
[12:33:59] knrz: @ruboto, guys is used to refer to a group of people irrespective of their gender https://en.wiktionary.org/wiki/guys#English
[12:34:18] [k-_: it is best not to argue.
[12:34:29] knrz: @k thanks for the heads up :)
[12:36:03] Iskarlar: has joined #ruby
[12:36:21] but3k4: has joined #ruby
[12:36:34] ruurd: has joined #ruby
[12:39:21] Igorshp: has joined #ruby
[12:39:23] Siyfion: has joined #ruby
[12:40:48] mhf: has joined #ruby
[12:41:06] bhorn1|away: has joined #ruby
[12:42:06] sshuff|gone: has joined #ruby
[12:42:18] thiagovsk: has joined #ruby
[12:44:18] apeiros: ?guys2 awk
[12:44:18] ruboto: awk, it doesn???t matter if it???s "normal"/gender neutral to say "guys" in your idiolect. "You guys" to refer to a mixed group is erasure. All we ask from you is to be a decent channel member and respect that. If you want to further discuss this, join #ruby-offtopic.
[12:44:27] apeiros: same @ knrz
[12:44:56] [k-_: apeiros: they stopped :(
[12:45:15] apeiros: what do you mean, they stopped?
[12:45:41] knrz: @[k-_, @ruboto ??? thanks for letting me know/I'll keep that in mind from now on. sorry again; it's my first day on IRC
[12:46:33] yoloats: has joined #ruby
[12:47:03] syath: has joined #ruby
[12:47:28] htmldrum: has joined #ruby
[12:47:40] awk: apeiros: apologies
[12:48:22] prestorium: has joined #ruby
[12:48:26] apeiros: awk: no need to apologize (at least not to me). just take note :)
[12:48:27] [k-_: we should only use guys2 in extreme situations
[12:48:41] apeiros: [k-_: I disagree.
[12:49:23] apeiros: I use (and will continue to use) guys2 whenever somebody defends their use of guys, or wants to argue.
[12:49:41] vimz: has joined #ruby
[12:49:43] apeiros: it's just all too easy to say "no big deal" if you're not affected by it
[12:49:52] blackmesa: has joined #ruby
[12:50:54] fantazo: has joined #ruby
[12:51:00] arup_r: Why my link is doing GET instead of PUT ? <%= link_to "Accept", {controller: "events", action: "accept", id: invite.id, method: :put} %>
[12:51:10] yorickpeterse: arup_r: because of method: :put
[12:51:24] yorickpeterse: the other way around
[12:51:42] yorickpeterse: No idea in that case, might be worth asking in #rubyonrails
[12:51:51] DylanJ: arup_r: you're probably not including rails js
[12:52:06] DylanJ: method: :put goes outside the url param
[12:52:14] tmtwd: has joined #ruby
[12:52:19] DEA7TH_: has joined #ruby
[12:52:36] DylanJ: since it's an attribute thats added to the element and then rails' js sees it and turns it into a put link
[12:52:38] arup_r: I tried outside ,, still doing GET
[12:52:52] yeticry: has joined #ruby
[12:52:52] DylanJ: show me what you have.
[12:52:58] arup_r: Don't get the "rails js" .. What you meant ?
[12:53:24] DylanJ: i mean "jquery_ujs" in your application.js
[12:53:31] DylanJ: it's in there by default
[12:53:57] DylanJ: but if you dont include application.js on your page things like remote: true, or method: :put on links wont work.
[12:54:03] arup_r: Yes it is there
[12:54:07] CaryInVictoria: has joined #ruby
[12:54:14] DylanJ: okay then show me your link_to
[12:54:32] chills42: has joined #ruby
[12:54:50] ndrei: has joined #ruby
[12:54:54] knrz: @[k-_ what's guys2?
[12:55:09] [k-_: ?justabot
[12:55:09] ruboto: I'm just a bot. You don't need to address me.
[12:55:59] acovrig: Is it possible to iterate over an array in irb without displaying it again at the end?
[12:56:16] DylanJ: acovrig: i usally do whatever.things; 1
[12:56:17] apeiros: knrz: guys2 is a factoid in ruboto
[12:56:26] DylanJ: then it just prints 1 in my irb
[12:57:25] arup_r: DylanJ: https://gist.github.com/aruprakshit/4976bf6d3e3529e3334a
[12:57:30] PlasmaStar: has joined #ruby
[12:57:35] acovrig: ["a","b","c"].each{|e| puts e} puts a, b, c on their own lines, then ???=> ["a", "b", "c"]??? at the end, can I have it not show that at the end?
[12:57:56] DylanJ: ["a","b","c"].each{|e| puts e}; 1
[12:57:58] knrz: @acovrig if you really want, ["a", "b", "c"].each { |e| puts e }; nil
[12:58:13] DylanJ: whatever the last statement is gets printed
[12:58:22] chills42: has joined #ruby
[12:58:27] DylanJ: arup_r: you're still putting method: :put in your url params.
[12:58:28] [k-_: the purpose of irb is to see the result, no?
[12:58:37] shevy: the purpose of irb is to write kickass code!
[12:58:38] arup_r: no changing one min
[12:58:57] acovrig: DylanJ, knrz: thanks, that works for the most part
[12:59:10] DylanJ: also what version of rails are you using arup_r? who the hell uses {controller: action:} for routes anymore?
[12:59:13] arup_r: Ohh! Sorry I didn't notice in which channel I am asking.. Sorry for thar
[12:59:21] mistermocha: has joined #ruby
[12:59:48] acovrig: [k-_: yes, but I would like to see a element of a has without seeing the entire hash, because when it displays the hash at the end, it fills the screen and I have to scroll to see the original output
[12:59:58] arup_r: DylanJ: There is a reason.. which is my misunderdtanding.. I tought I need to send method: key with url_options: key... That's why I did it ..
[13:00:09] arup_r: Let me try ,... what you said
[13:00:27] acovrig: I???m looking to read the data in the hash, not just display it in a jumbled mess I have to read through
[13:00:29] DylanJ: link_to "my thing", {controller: 'a', action: 'b', id: 'c'}, method: :put
[13:01:10] arup_r: That ^^ worked
[13:01:21] arup_r: now checking with the path helper
[13:01:34] Iskarlar: has joined #ruby
[13:01:42] c0def00d: has joined #ruby
[13:01:57] arup_r: I tried with path helper with method: :put.. and that one didn't work as far as I remember.. Let me try again
[13:02:32] Iskarlar_: has joined #ruby
[13:02:36] centrx: has joined #ruby
[13:02:41] arup_r: all are working thanks DylanJ
[13:03:43] hinbody: has joined #ruby
[13:03:54] DylanJ: yeye. next time #rubyonrails
[13:04:10] c0def00d: Ruby beginner here: I???m working on a Rakefile where I???ve defined classes to abstract most of the work and I???d like to use the Rake DSL inside my class methods (desc, task and file). I???ve read on the Rake documentation that it should be possible using the Rake::DSL module, but can???t figure it out.
[13:04:24] felixr: has joined #ruby
[13:04:28] c0def00d: Can someone tell me how I would get it working?
[13:04:34] arup_r: DylanJ: sure.. I have not seen in which channel I am
[13:04:35] rodfersou: has joined #ruby
[13:05:14] arup_r: It is good that I didn't ask in #css .. :p As I am now most of the times there only... made them annoyed on me hehehehe
[13:05:25] bmurt: has joined #ruby
[13:05:42] jpfuentes2: has joined #ruby
[13:06:00] InternetFriend: has joined #ruby
[13:06:02] Cust0sLim3n: has joined #ruby
[13:07:51] bubbys: has joined #ruby
[13:08:40] eGGsha: has joined #ruby
[13:08:47] ged: has joined #ruby
[13:08:55] f3ttX]: has joined #ruby
[13:09:17] jerius: has joined #ruby
[13:09:18] lannonbr: has joined #ruby
[13:09:28] c0def00d: I tried using ???include Rake::DSL??? at several places, but it doesn???t seem to work
[13:10:16] jerius: has joined #ruby
[13:10:20] khando: has joined #ruby
[13:10:41] DylanJ: c0def00d: my mind reading skills are pretty rusty. mind posting code?
[13:10:43] vimz: RSpec question https://gist.github.com/anonymous/45161665c88630a2a711 how do I store code in a variable using lets ?
[13:11:52] khando_: has joined #ruby
[13:12:02] blackmesa: has joined #ruby
[13:12:25] rodfersou: has joined #ruby
[13:12:26] c0def00d: DylanJ: sure, let me write a simplified version of my problem :)
[13:12:26] DylanJ: vimz: is lets a thing? i've never seen "lets". "let" and "let!" though.. those are things.
[13:13:52] aganov: has joined #ruby
[13:14:23] fumihiro1: has joined #ruby
[13:15:24] c0def00d: DylanJ: https://gist.github.com/hartbit/3e1bff9c450f19acc2a3
[13:15:44] c0def00d: Just try to ???rake??? the Rakefile to see the error
[13:15:51] c0def00d: NoMethodError: undefined method `task' for MyClass:Class
[13:16:03] khando: has joined #ruby
[13:16:30] c0def00d: The documentation for the Rake::DSL module says:
[13:16:35] c0def00d: http://rake.rubyforge.org/Rake/DSL.html
[13:16:40] c0def00d: DSL is a module that provides #task, #desc, #namespace, etc. Use this when you'd like to use rake outside the top level scope.
[13:18:12] havenwood: has joined #ruby
[13:18:46] allcentury: has joined #ruby
[13:18:55] serivich: has joined #ruby
[13:20:09] freeUmo: has joined #ruby
[13:20:39] tvw: has joined #ruby
[13:21:24] vimz: DylanJ sorry I meant let :P any ideas?
[13:21:55] rodferso1: has joined #ruby
[13:22:31] DylanJ: c0def00d: you want to extend
[13:22:40] DylanJ: extend Rake::DSL or whatever it is
[13:22:50] sharpmachine: has joined #ruby
[13:23:27] sevenseacat: has joined #ruby
[13:24:17] vimz: RSpec folks: how do I store code in a variable using let ?
[13:24:18] c0def00d: Thanks, didn???t know about extend, I???ll have to read more baout it
[13:24:23] c0def00d: DylanJ: thanks! :)
[13:24:38] DylanJ: vimz: i have no idea what you're trying to tell us with your whack pseudo code.
[13:25:08] DylanJ: but let() goes outside of your it()/specify() blocks.
[13:26:04] schaerli: has joined #ruby
[13:26:19] vimz: I'll write it properly
[13:27:43] DylanJ: vimz: i commented on your gist with an example
[13:28:29] [k-_: why doesnt this work: https://ideone.com/Ra0Bar
[13:29:29] sevenseacat: [k-_: is this a 'guess the error' game?
[13:29:37] sevenseacat: yep. not playing.
[13:29:39] usershell: has joined #ruby
[13:30:03] [k-_: The error is way below the bottom
[13:30:10] [k-_: at the bottom*
[13:30:21] sevenseacat: ACTION adds that site to the blocklist
[13:30:46] shevy: this cat is wicked
[13:30:56] adaedra: [k-_: because it tries to do self.ok, and self is not A
[13:31:31] failshell: has joined #ruby
[13:31:36] adaedra: learn2scope
[13:31:37] apeiros: [k-_: "ok?" and "ok" are two different method names
[13:31:42] riffraff: has joined #ruby
[13:31:47] tvw: has joined #ruby
[13:31:50] apeiros: [k-_: and def self.ok? and def ok? define two different methods
[13:32:05] apeiros: [k-_: `module Foo; def self.ok?` --> Foo.ok?
[13:32:14] [k-_: ah, i missed that
[13:32:23] apeiros: [k-_: `module Foo; def ok?` --> can't be called without including it into a class, creating an instance of that class, and call it on that instance
[13:32:38] acovrig: I???m getting a confusing output from .sort: I get a-u just fine, but then it has h,m,m; why are those after u?
[13:33:03] [k-_: why would it call self.ok?
[13:33:12] duggiefresh: has joined #ruby
[13:33:17] adaedra: ah, it's ok?
[13:33:40] adaedra: ?code avdi
[13:33:40] ruboto: avdi, We can't help you without your code, please post it to https://gist.github.com
[13:33:47] adaedra: ?code acovrig
[13:33:47] ruboto: acovrig, We can't help you without your code, please post it to https://gist.github.com
[13:33:50] adaedra: sorry, avdi
[13:34:09] mhib: has joined #ruby
[13:34:20] Eindoofus: has joined #ruby
[13:34:51] ducklobster: has joined #ruby
[13:35:11] veduardo_: has joined #ruby
[13:36:09] tmtwd: has joined #ruby
[13:36:12] kobain: has joined #ruby
[13:36:44] ledestin: has joined #ruby
[13:36:59] prefixed: has joined #ruby
[13:37:16] acovrig: adaedra: true, I figured it out though (and am saying dhu *sigh*): .each{|o| printf "%s %21s %s\n", o.id, o.title, o.uri}.sort; 1 would obviously not sort by title, since I???m printing the ID first???
[13:37:17] quimrstorres: has joined #ruby
[13:37:37] adaedra: if you say so
[13:38:31] Yiota_: has joined #ruby
[13:39:06] Yiota_: how do i fixi nvalid byte sequence in UTF-8 (ArgumentError) ?
[13:39:12] apeiros: acovrig: it's mostly not sort by it because .each does not return the block's values
[13:39:22] apeiros: >> [1,2,3].each { |x| 100 }
[13:39:23] ruboto: apeiros # => [1, 2, 3] (https://eval.in/404088)
[13:39:37] apeiros: additionally, printf returns nil, so the block's value would always be nil???
[13:40:01] adaedra: ?context Yiota_
[13:40:01] ruboto: Yiota_, 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.
[13:40:21] acovrig: apeiros: true, I realized I could use .order().each??? instead of trying to sort it after printing it.
[13:40:40] Yiota_: there's a python script that's writing to CSV, there's the ?? sign being written, whenever the ruby parser reads the ?? sign it throws an invalid byte sequence error
[13:40:50] apeiros: acovrig: .order? you mean this stuff comes from a DB?
[13:41:05] acovrig: apeiros: yup
[13:41:17] apeiros: acovrig: um, yes, then *definitively* use .order.
[13:41:21] acovrig: apeiros: I wasn???t thinking about it from a DB perspecrtive for some reason
[13:41:34] dblessing: has joined #ruby
[13:41:40] apeiros: Yiota_: so the CSV isn't utf-8, and you tell ruby to read it as utf-8.
[13:41:52] apeiros: (or it is simply broken utf-8???)
[13:42:40] dling: has joined #ruby
[13:43:13] vimz: Dylan J thanks for laying out the syntax, but how do I do that with code to be run, rather than just variables? Is this any clearer? https://gist.github.com/anonymous/45d73fc2e009e098e66d
[13:43:25] jpfuentes2: has joined #ruby
[13:43:36] shevy: in a yaml file, if I have to store the number 80, should the content of the file be "80" or "80\n" or "---80\n"?
[13:43:40] jerius: has joined #ruby
[13:43:55] shevy: I am so tempted to just leave it as 80
[13:43:56] poguez_: has joined #ruby
[13:44:31] apeiros: shevy: the last one is incorrect
[13:44:59] shevy: I disliked it the most anyway!
[13:45:00] apeiros: "--- 80\n" (note the extra space) would work. also "---\n80\n"
[13:45:05] adaedra: you could ask ruby how it would do it
[13:45:12] DylanJ: apeiros: what does --- do in yaml?
[13:45:15] adaedra: >> require 'yaml'; 80.to_yaml
[13:45:16] ruboto: adaedra # => "--- 80\n...\n" (https://eval.in/404095)
[13:45:18] apeiros: DylanJ: document separator
[13:45:27] centrx: >> Ruby, how will you handle my yaml?
[13:45:28] ruboto: centrx # => /tmp/execpad-c1473525343d/source-c1473525343d:2: syntax error, unexpected tIDENTIFIER, expecting key ...check link for more (https://eval.in/404096)
[13:45:34] apeiros: YAML.load_file e.g. only loads the first document in a file
[13:45:51] adaedra: bravo, centrx
[13:46:57] bruno-: has joined #ruby
[13:47:06] vimz: here is my question with syntax highlighting. dw, it's the last time I'm asking https://gist.github.com/anonymous/81a71fa7b80cec3cef33 How do I store ruby code using a let ?
[13:47:20] troulouliou_div2: has joined #ruby
[13:47:24] apeiros: Yiota_: btw., https://gist.github.com/apeiros/39acc5b486f932403638 - feedback welcome.
[13:48:22] senayar: has joined #ruby
[13:48:46] senayar: has joined #ruby
[13:49:43] malconis: has joined #ruby
[13:49:46] paulcsmith: has joined #ruby
[13:50:59] i8igmac: im trying to clean up data before i insert into a database... what chars need removed?
[13:51:20] tsunamie: has joined #ruby
[13:51:22] i8igmac: only 4 chars?
[13:52:06] adaedra: i8igmac: use prepared statements
[13:52:08] arup_r: i8igmac: didn't get yoy
[13:52:10] shevy: i8igmac umlauts!
[13:52:33] tsunamie: anyone know how I have a json template. I have an array within this json format. I want to take seperate json files and put them into the json template in a specific section. something like this http://stackoverflow.com/questions/13471066/is-there-an-easy-way-of-combining-two-json-files-or-splitting-one-json-in-ruby
[13:53:08] adaedra: i8igmac: don't clean the characters yourself, let the database do it for you. This is not PHP4.
[13:53:09] tkuchiki: has joined #ruby
[13:53:33] i8igmac: im scraping data with ruby, then inserting into a DB
[13:53:52] nateberkopec: has joined #ruby
[13:54:25] i8igmac: i believe only 4 chars above could cause problems when inserting a string to a DB
[13:54:41] i8igmac: mainly ` " '
[13:54:54] CaryInVictoria: has joined #ruby
[13:55:02] adaedra: if you use prepared statements, that will be taken care of automatically
[13:55:25] [k-_: where does this habit of `' come from
[13:55:55] i8igmac: data scraped from online source... tim's <=
[13:55:57] denver: has joined #ruby
[13:56:07] adaedra: what, [k-_
[13:56:40] hsekami: has joined #ruby
[13:56:40] [k-_: the habit of using ` to start a string
[13:56:45] shakes: has joined #ruby
[13:56:55] adaedra: who does that
[13:57:04] christiandsg: has joined #ruby
[13:57:08] senayar: has joined #ruby
[13:57:25] zzak: has joined #ruby
[13:57:44] [k-_: 21:54:40 i8igmac: mainly ` " '
[13:57:54] joonty: has joined #ruby
[13:58:00] hsekami: hello does anybody know any gems that could do Ruby background job/tasks in a given unix timestamp, it will execute at that particular time. otherwise it will run in background?
[13:58:01] i8igmac: no, the data scraped from a online source, "some string i need includes fancy chars"
[13:58:17] adaedra: i8igmac: what are you using to connect to the database
[13:58:33] adaedra: [k-_: `` in SQL is used for field names, not strings
[13:58:36] i8igmac: require 'mysql'
[13:58:46] adaedra: ok, mysql gem
[13:58:48] i8igmac: i guess there is a function that exist already
[13:58:58] i8igmac: mysql_sanitize()
[13:59:00] i8igmac: or something
[13:59:21] adaedra: prepared statements
[13:59:29] i8igmac: i got it ,-)
[13:59:42] JoshL: has joined #ruby
[13:59:51] livathinos: has joined #ruby
[13:59:52] adaedra: apparently not
[14:00:08] adaedra: grmbl, writing docs seems to be too much when you write mysql gem
[14:00:25] A-ron: has joined #ruby
[14:00:25] lannonbr: hsekami: is this what you want? https://github.com/javan/whenever
[14:00:33] i8igmac: its already prepared statement
[14:00:35] ht: has joined #ruby
[14:00:57] i8igmac: you should use screws and nails when you build a house
[14:01:11] hsekami: lannobr: i am looking at that now though, can i run just 1 off task? yet it will run in background if no tasks, and i can add jobs anytime without disrupting the app?
[14:01:16] i8igmac: you should tie your shoes before you run
[14:01:25] dede: has joined #ruby
[14:01:44] blueOxigen: has joined #ruby
[14:02:13] jonee: has joined #ruby
[14:02:38] mistermocha: has joined #ruby
[14:03:25] firevolt: has joined #ruby
[14:04:31] iamninja: has joined #ruby
[14:05:00] allcentury: has joined #ruby
[14:06:09] Sp4rKy: Anyone using pathname.mountpoint? ? I have the same directory that seems to return true (which is correct) from irb and false from script
[14:07:10] adaedra: didn't work, jonee
[14:07:24] cardoni: has joined #ruby
[14:09:21] krz: has joined #ruby
[14:13:09] [k-: only one more test to make it pass!
[14:14:23] tkuchiki: has joined #ruby
[14:14:34] werelivinginthef: has joined #ruby
[14:15:46] lele: has joined #ruby
[14:16:11] schaerli: has joined #ruby
[14:16:31] nveselinov: has joined #ruby
[14:16:32] bohallor: has joined #ruby
[14:16:36] [k-: am I late to the party? JRuby 9000 released
[14:16:41] christiandsg: has joined #ruby
[14:17:13] adaedra: I heard that already
[14:18:46] RegulationD: has joined #ruby
[14:18:52] araujo: has joined #ruby
[14:19:21] galeido: has joined #ruby
[14:19:49] whiteline: has joined #ruby
[14:20:14] znz_jp: has joined #ruby
[14:20:29] freeUmo: has joined #ruby
[14:20:54] allcentury: has joined #ruby
[14:23:32] sharpmachine: has joined #ruby
[14:23:53] chills42: has joined #ruby
[14:24:22] sharpmachine: has joined #ruby
[14:24:24] JoshL_: has joined #ruby
[14:26:53] bradleyprice: has joined #ruby
[14:27:06] code1o6: has joined #ruby
[14:27:24] deepu: has joined #ruby
[14:27:33] erik_p: has joined #ruby
[14:27:44] victortyau: has joined #ruby
[14:29:02] dopie: has joined #ruby
[14:29:09] mary5030: has joined #ruby
[14:30:15] atomical_: has joined #ruby
[14:30:38] mary5030: has joined #ruby
[14:31:01] Meeh: has joined #ruby
[14:31:38] lampd1: has joined #ruby
[14:31:49] carlosoliveira: has joined #ruby
[14:31:57] Trynemjoel: has joined #ruby
[14:32:31] ndrei: has joined #ruby
[14:33:21] schaerli: has joined #ruby
[14:34:14] Sirupsen: has joined #ruby
[14:34:15] InternetFriend: has joined #ruby
[14:34:50] bigbadbear: has joined #ruby
[14:35:16] sarkyniin: has joined #ruby
[14:37:56] yb_drowe: has joined #ruby
[14:37:58] Trynemjoel: has joined #ruby
[14:38:27] christiandsg: has joined #ruby
[14:41:59] charliesome: has joined #ruby
[14:43:22] TinkerTyper: has joined #ruby
[14:44:11] freeUmo: has joined #ruby
[14:44:20] bigbadbear: has joined #ruby
[14:44:34] stantonnet: has joined #ruby
[14:44:58] freerobby: has joined #ruby
[14:45:59] prestorium: has joined #ruby
[14:46:25] konsolebox: has joined #ruby
[14:46:32] msgodf: has joined #ruby
[14:47:02] pontiki: has joined #ruby
[14:49:16] Siyfion: has joined #ruby
[14:49:43] danman: has joined #ruby
[14:50:14] fumihiro: has joined #ruby
[14:51:19] prestorium: has joined #ruby
[14:51:20] konsolebox: has joined #ruby
[14:51:59] decoponio: has joined #ruby
[14:52:10] havenwood: [k-: It's not *over* 9000 yet though... *soon*
[14:52:27] chouhoulis: has joined #ruby
[14:53:58] tkuchiki: has joined #ruby
[14:54:21] gambl0re: has joined #ruby
[14:54:53] Luun: has joined #ruby
[14:55:26] christiandsg: has joined #ruby
[14:55:32] umgrosscol: has joined #ruby
[14:55:49] Seich: has joined #ruby
[14:55:55] rippa: has joined #ruby
[14:56:24] grubernaut: has joined #ruby
[14:56:27] casadei_: has joined #ruby
[14:56:29] workmad3: havenwood: just need to wait for the first patch release, right?
[14:56:38] havenwood: workmad3: yup!
[14:56:44] atomical: has joined #ruby
[14:56:50] havenwood: workmad3: 9.0.0.1 should do the trick. :)
[14:57:01] havenwood: And every release thereafter.
[14:57:03] centrx: What happens if the first patch release turns out to the be less than 9000?
[14:57:19] havenwood: Under 9000... same 'ole, same 'ole.
[14:57:24] Luun: has joined #ruby
[14:57:45] Luun: has left #ruby: ()
[14:57:48] paulcsmith: has joined #ruby
[14:57:52] tonini: has joined #ruby
[14:58:00] shlomo: has joined #ruby
[14:58:06] Luun: has joined #ruby
[14:58:11] Luun: has left #ruby: ()
[14:58:33] Luun: has joined #ruby
[14:59:33] rideh: has joined #ruby
[14:59:34] allcentury: has joined #ruby
[14:59:48] shlomo: Is there a built-in method for converting a String to an integer raising an error if the string does not consist solely of digits?
[15:00:18] Kuntasser: has joined #ruby
[15:00:38] havenwood: Integer allows non-digits though.
[15:00:45] adaedra: Po-tah-to, Po-tay-to
[15:00:54] havenwood: >> Integer(1.5)
[15:00:55] ruboto: havenwood # => 1 (https://eval.in/404172)
[15:01:07] havenwood: Ah, string.
[15:01:08] ljarvis: String to an Integer
[15:01:11] havenwood: nvm me, coffeetime!
[15:01:23] centrx: It's not his fault, it's the coffee!
[15:01:23] adaedra: >> Integer("potato")
[15:01:24] ruboto: adaedra # => invalid value for Integer(): "potato" (ArgumentError) ...check link for more (https://eval.in/404173)
[15:01:44] havenwood: Hem, I'd have expected potato to be 1.111, repeating of course.
[15:01:50] higuys: has joined #ruby
[15:01:51] prestorium: has joined #ruby
[15:01:56] shlomo: It allows whitespace, but it's good for me. thanks
[15:01:59] havenwood: Let's see if coffee fixes this...
[15:02:07] Kuntasser: why would potato be 111 repeating?
[15:02:19] adaedra: ACTION throws Kuntasser a potato
[15:02:24] shevy: do you expect a potato to count to higher than 1?
[15:02:38] Kuntasser: why do you expect a potato to count at all?
[15:02:50] pdoherty: has joined #ruby
[15:02:56] havenwood: Kuntasser: Probably a drunk potato.
[15:04:04] araujo: has joined #ruby
[15:05:49] [k-_: >> Intege("LIFE")
[15:05:50] ruboto: [k-_ # => undefined method `Intege' for main:Object (NoMethodError) ...check link for more (https://eval.in/404187)
[15:05:59] [k-_: i fail at typing
[15:06:20] Seich: has joined #ruby
[15:08:00] Encapsulation: has joined #ruby
[15:08:15] [k-_: that's you
[15:08:25] [k-_: oooooo burn
[15:08:30] ruby-lang081: has joined #ruby
[15:08:31] [k-_: rimshot.mp4
[15:09:58] psye: has joined #ruby
[15:10:27] ruby-lang081: First time on this channel and wondering if the right place for a complete newbie to RoR
[15:10:42] Kully3xf: has joined #ruby
[15:10:49] ruboto: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[15:11:00] snockerton: has joined #ruby
[15:11:31] Trynemjoel: has joined #ruby
[15:11:40] werelivinginthef: has joined #ruby
[15:11:47] ruby-lang081: Let's leave Rails for now and just want to learn Ruby
[15:11:55] havenwood: ruby-lang081: Then here!
[15:12:39] centrx: Who would have thought that jewelry and railroads would come together in one framework?
[15:12:42] sharpmachine: has joined #ruby
[15:13:04] tennis_: has joined #ruby
[15:13:19] havenwood: centrx: Episode 1 has some explaination.
[15:13:21] havenwood: centrx: http://collectiveidea.com/blog/archives/2012/04/01/walken-on-rails/
[15:13:52] ruby-lang081: To begin with the language, can people pls suggest three good resources for learning Ruby at beginner level
[15:13:56] [H]unt3r: has joined #ruby
[15:14:09] havenwood: ruby-lang081: Here are some links: http://ruby-community.com/pages/links
[15:14:16] silkfox: has joined #ruby
[15:14:28] jonee: https://www.ruby-lang.org/en/documentation/
[15:14:32] zuQe8: has joined #ruby
[15:15:25] senayar: has joined #ruby
[15:15:25] senayar: has joined #ruby
[15:15:59] Luun: http://devdocs.io/ruby/
[15:16:31] havenwood: centrx: Perhaps in Europe, where they have the speed trains.
[15:16:38] adaedra: https://www.google.com/
[15:16:45] adaedra: wait, we have speed trains?
[15:17:02] centrx: pssh speed trains for what? there's no where to go in Europe except Rome
[15:17:04] senayar: has joined #ruby
[15:17:07] prestorium: has joined #ruby
[15:17:22] ljarvis: you heathen
[15:17:52] Seich: has joined #ruby
[15:18:07] silkfox: has joined #ruby
[15:18:17] omegamike: has joined #ruby
[15:18:19] ruby-lang081: Did a ruby -v and have ruby 2.2.1p85 (2015-02-26 revision 49769) - is this the latest?
[15:20:11] droidburgundy: has joined #ruby
[15:20:51] freeUmo: has joined #ruby
[15:21:18] CaryInVictoria: has joined #ruby
[15:21:55] Zai00: has joined #ruby
[15:21:57] riotjones: has joined #ruby
[15:23:36] dfockler: has joined #ruby
[15:24:08] icebourg: has joined #ruby
[15:24:48] ruby-lang081: Appreciate the links guys - will definitely be returning back here again.
[15:27:05] j4cknewt: has joined #ruby
[15:28:48] aryaching: has joined #ruby
[15:29:32] Trynemjoel: has joined #ruby
[15:31:02] Rubie: has joined #ruby
[15:31:30] EminenceHC: has joined #ruby
[15:31:50] jbw: has joined #ruby
[15:32:47] Igorshp: has joined #ruby
[15:33:54] ascarter: has joined #ruby
[15:35:02] Scripore: has joined #ruby
[15:35:54] Igorshp: has joined #ruby
[15:36:25] baroquebobcat: has joined #ruby
[15:36:39] dubkoidragon: has joined #ruby
[15:37:03] Trynemjoel: has joined #ruby
[15:37:22] rcvalle: has joined #ruby
[15:37:47] snockerton: has joined #ruby
[15:37:57] bigbadbear: has joined #ruby
[15:38:46] anwers: has joined #ruby
[15:39:46] ReK2GnULinuX: has joined #ruby
[15:39:46] ReK2GnULinuX: has joined #ruby
[15:40:21] bigbadbear: has joined #ruby
[15:41:15] darkf: has joined #ruby
[15:42:38] esantiago: has joined #ruby
[15:43:13] dgutierrez1287: has joined #ruby
[15:43:34] rehat: has joined #ruby
[15:43:39] connor_goodwolf: has joined #ruby
[15:44:02] rasalghul_: has joined #ruby
[15:44:11] eGGsha: has joined #ruby
[15:44:35] arup_r: has joined #ruby
[15:45:34] JoshL: has joined #ruby
[15:45:34] Trynemjoel: has joined #ruby
[15:46:05] chouhoulis: has joined #ruby
[15:46:51] ruurd: has joined #ruby
[15:47:03] gorums: has joined #ruby
[15:47:03] freerobby: has joined #ruby
[15:47:13] eGGsha: has joined #ruby
[15:47:20] peter_paule: has joined #ruby
[15:47:58] hobodave: has joined #ruby
[15:48:03] acke: has joined #ruby
[15:48:26] alexclark: has joined #ruby
[15:49:19] hobodave: has joined #ruby
[15:49:28] InternetFriend: has joined #ruby
[15:50:22] blackmesa: has joined #ruby
[15:50:29] Ilyas: has joined #ruby
[15:52:26] safeforge: has joined #ruby
[15:55:49] shevy: he'll never be back :(
[15:56:07] thiagovsk: has joined #ruby
[15:56:29] chrisseaton: has joined #ruby
[15:57:00] towski_: has joined #ruby
[15:57:20] InternetFriend: has joined #ruby
[15:57:43] ddarkpassenger: has joined #ruby
[15:58:37] pushpak: has joined #ruby
[15:58:55] MiracleBlue: has joined #ruby
[15:59:00] tvw: has joined #ruby
[15:59:35] Trynemjoel: has joined #ruby
[15:59:41] NoShitSherlock: what are some cool refactoring exercises in ruby?
[16:00:18] jhass: exercism.io and codewars have plenty (well, not refactoring but finding elegant solutions)
[16:00:52] Cache_Money: has joined #ruby
[16:00:54] esantiago: search for "Refactoring: Ruby Edition" book
[16:00:56] NoShitSherlock: i'd like to learn refactoring
[16:01:28] cstrahan: has joined #ruby
[16:02:40] jbw_: has joined #ruby
[16:03:27] deepu: I asked this yesterday and read class:ERB but still no idea how to do this. Can someone please help? https://dpaste.de/MJji
[16:03:54] mhib: has joined #ruby
[16:03:56] amclain: has joined #ruby
[16:05:09] darix: deepu: do the loop in your template
[16:05:11] Tamal: has joined #ruby
[16:05:14] symm-: has joined #ruby
[16:05:37] deepu: darix: can you please tell me how?
[16:05:51] deepu: I'm new to ERB
[16:06:05] shevy: ERB is just like regular ruby code
[16:06:36] paulcsmith: has joined #ruby
[16:06:58] darix: also you want to use <%= %> for the parts you want to output
[16:07:08] mistermocha: has joined #ruby
[16:07:40] ggolk: has joined #ruby
[16:07:42] CorySimmons: has joined #ruby
[16:08:11] skmp: has joined #ruby
[16:08:35] Philipp__: has joined #ruby
[16:09:38] ggolk: has left #ruby: ()
[16:09:51] deepu: darix: I already have "<%= hostname %>"
[16:10:45] benlieb: has joined #ruby
[16:11:36] Trynemjoel: has joined #ruby
[16:12:12] djbender: has joined #ruby
[16:13:03] rfv: has joined #ruby
[16:13:16] troulouliou_div2: has joined #ruby
[16:13:43] jonee: has joined #ruby
[16:15:39] freeUmo: has joined #ruby
[16:16:02] msnyon: has joined #ruby
[16:16:06] lxsameer: has joined #ruby
[16:16:06] lxsameer: has joined #ruby
[16:16:07] Maletor: has joined #ruby
[16:16:52] davedev24: has joined #ruby
[16:17:27] gizmore: has joined #ruby
[16:17:33] Maletor: has joined #ruby
[16:18:55] theery: has joined #ruby
[16:19:05] prefixed: has joined #ruby
[16:19:12] bricker: has joined #ruby
[16:19:28] DEA7TH_: has joined #ruby
[16:20:11] bcavileer: has joined #ruby
[16:20:22] peter_paule: has joined #ruby
[16:20:30] manveru: has joined #ruby
[16:20:32] ddarkpassenger: has joined #ruby
[16:20:40] halfdan: has joined #ruby
[16:21:02] charles81: has joined #ruby
[16:21:13] NeverDie: has joined #ruby
[16:21:14] sarkyniin: has joined #ruby
[16:22:31] freeUmo: has joined #ruby
[16:23:23] yqt: has joined #ruby
[16:24:22] michaeldeol: has joined #ruby
[16:24:29] arup_r: has joined #ruby
[16:24:53] krokuz: has joined #ruby
[16:25:01] lolmaus: has joined #ruby
[16:25:05] rideh: has joined #ruby
[16:26:45] RobertBirnie: has joined #ruby
[16:26:54] spider-mario: has joined #ruby
[16:27:13] jpfuentes2: has joined #ruby
[16:28:08] snockerton: has joined #ruby
[16:28:37] deimos: has joined #ruby
[16:30:05] kachi8_: has joined #ruby
[16:30:19] pengin: has joined #ruby
[16:30:30] shock_one: has joined #ruby
[16:30:32] bryancp: has joined #ruby
[16:30:34] jbwiv: has joined #ruby
[16:31:42] vimz: is it possible to delete from an array using map? e.g. [:a,:b].map{ |v| v.reject! if v == :a } #=> [:b] | or is the ONLY real way to do it by having the entire array and calling a method just as reject or delete on the WHOLE array, e.g. [:a,:b].delete...
[16:32:24] sdrew: has joined #ruby
[16:32:25] EminenceHC: has joined #ruby
[16:34:09] adaedra: what are you trying to do? remove elements depending on a block?
[16:34:17] adaedra: It's Array#reject iirc
[16:34:25] mary5030_: has joined #ruby
[16:34:36] jhass: or Array#select if you'd have to negate
[16:35:06] chouhoul_: has joined #ruby
[16:35:18] casadei_: has joined #ruby
[16:35:41] jackjackdripper: has joined #ruby
[16:36:00] vimz: adaedra yes, remove elements depending on the block and the in-block value of v. just wondering if it can be done inside an existing loop or if I have to use a different loop on the whole array such as #reject or #delete
[16:36:18] jhass: vimz: maybe show your real code
[16:36:19] schaerli: has joined #ruby
[16:36:41] havenwood: vimz: There's no #map_reduce, if that's what you're asking.
[16:36:54] spider-mario: has joined #ruby
[16:36:55] ndrei: has joined #ruby
[16:37:17] ElSif: but there is .map.inject
[16:37:31] ElSif: andi think #reduce is thing too?
[16:37:55] havenwood: ElSif: There's a #map and #reduce, sure.
[16:38:01] jhass: reduce and inject are the same thing
[16:38:05] ElSif: makes sense
[16:38:30] Scripore: has joined #ruby
[16:38:34] ElSif: though i usually end up using #each_with_object
[16:38:51] havenwood: vimz: No #filter_map either.
[16:39:05] baweaver: has joined #ruby
[16:39:41] havenwood: I guess in Ruby it'd be #select_map or #find_all_map, which have been proposed but held up on naming disagreements.
[16:40:08] alexclark: has joined #ruby
[16:40:14] djbkd: has joined #ruby
[16:40:17] maZtah: has joined #ruby
[16:40:51] nitenq: has joined #ruby
[16:40:54] havenwood: I'd not be at all surprised if Ruby 3.0 got a #select_map, whatever the name for it. Though maybe not.
[16:40:55] havenwood: https://bugs.ruby-lang.org/issues/5663
[16:40:57] chills42: has joined #ruby
[16:41:29] nveselinov: has joined #ruby
[16:41:30] polpak: has joined #ruby
[16:41:33] vimz: jhass: wondering if delete_if could be created in this way?
[16:41:46] jhass: vimz: seriously, show your real code
[16:41:50] connor_goodwolf: has joined #ruby
[16:41:58] adaedra: delete_if? you mean reject!?
[16:41:58] vimz: jhass: that's it?
[16:42:18] vimz: jhass: it's irb :L
[16:42:29] Sirupsen: has joined #ruby
[16:42:38] jhass: so you don't have a real usecase, just fooling around?
[16:42:39] msnyon: has joined #ruby
[16:42:51] vimz: jhass yep
[16:43:14] sdwrage: has joined #ruby
[16:43:30] havenwood: vimz: So do you want to map and filter in a single iteration? Or something else?
[16:43:32] bb010g: has joined #ruby
[16:43:48] jhass: k, the common patterns are .select { ... }.map { ... }, .map { ... }.select { ... } and .map { ... if ... }.compact
[16:43:53] jhass: depending on the usecase
[16:44:06] jhass: and .reject { } if you'd !... in the select
[16:44:24] blackmesa: has joined #ruby
[16:44:38] Trynemjoel: has joined #ruby
[16:44:52] linuxboytoo: has joined #ruby
[16:45:34] vimz: havenwood I'd like to see how that could be done, yes :)
[16:46:17] jerius_: has joined #ruby
[16:46:40] felixr: has joined #ruby
[16:46:58] Mweshi: has joined #ruby
[16:48:00] tjohnson: has joined #ruby
[16:48:46] dudoom: has joined #ruby
[16:49:10] psy: has joined #ruby
[16:49:20] Mweshi: has joined #ruby
[16:49:58] shadoi: has joined #ruby
[16:51:17] skyjumper: has left #ruby: ()
[16:51:28] UniHiir: has joined #ruby
[16:51:35] relix: has joined #ruby
[16:53:03] lannonbr: has joined #ruby
[16:53:04] Ilyas_: has joined #ruby
[16:53:12] hololeap: has joined #ruby
[16:53:34] n1ftyn8_: has joined #ruby
[16:53:56] psye: has joined #ruby
[16:54:28] Lord-Kamina: has joined #ruby
[16:55:07] freerobby: has joined #ruby
[16:55:26] allomov: has joined #ruby
[16:55:55] rideh: has joined #ruby
[16:56:00] hfp: has joined #ruby
[16:56:11] glenab: has joined #ruby
[16:56:31] hfp_work: has joined #ruby
[16:56:43] UniHiir: has left #ruby: ()
[16:57:17] ndrei: has joined #ruby
[16:57:20] pizzaops: has joined #ruby
[16:58:20] andikr: has joined #ruby
[16:59:09] blaines: has joined #ruby
[16:59:12] havenwood: vimz: Here's a little example: https://gist.github.com/havenwood/24a6a9fa42980d9489f6
[16:59:16] chipotle: has joined #ruby
[16:59:48] vickleton: has joined #ruby
[17:01:13] usershell: has joined #ruby
[17:01:15] sanguisdex: has joined #ruby
[17:01:16] havenwood: vimz: Elixir, for example, has that: http://elixir-lang.org/docs/v1.0/elixir/Enum.html#filter_map/3
[17:02:17] jobewan: has joined #ruby
[17:05:23] wallerdev: has joined #ruby
[17:06:49] blaines: has joined #ruby
[17:07:39] Trynemjoel: has joined #ruby
[17:08:48] schaerli: has joined #ruby
[17:09:01] benlovell: has joined #ruby
[17:09:03] Tamal: has joined #ruby
[17:09:26] adambeynon: has joined #ruby
[17:10:29] usershell: has joined #ruby
[17:10:39] wallerdev: has joined #ruby
[17:10:53] klaas: has joined #ruby
[17:11:16] Eiam_: has joined #ruby
[17:11:29] imperator: has joined #ruby
[17:11:36] platosha: has joined #ruby
[17:12:37] dfockler: has joined #ruby
[17:12:37] failshell: has joined #ruby
[17:12:48] swgillespie: has joined #ruby
[17:12:54] bricker: has joined #ruby
[17:14:44] mistermo_: has joined #ruby
[17:14:59] dented42: has joined #ruby
[17:15:12] christiandsg: has joined #ruby
[17:15:24] alxndr: has joined #ruby
[17:16:02] mikecmpbll: has joined #ruby
[17:16:29] usershell: has joined #ruby
[17:16:31] DEA7TH_: has joined #ruby
[17:16:36] shevy: havenwood still writing elixir code?
[17:16:49] hellschreiber: has joined #ruby
[17:16:55] alexclark: has joined #ruby
[17:17:48] deepu: I admit I'm so clueless.. Can someone please help me with this? https://dpaste.de/MJji#L
[17:17:56] bjeanes: has joined #ruby
[17:19:12] Jackneill: has joined #ruby
[17:19:49] havenwood: shevy: yup, alchemy!
[17:20:20] gambl0re: has joined #ruby
[17:20:48] sharpmachine: has joined #ruby
[17:21:36] lkba_: has joined #ruby
[17:22:06] wmoxam: deepu: it would help if you posted what output you are getting
[17:22:45] deepu: wmoxam: I am not sure how to call the ERB inside my loop
[17:23:30] deepu: thats where I need help.. how to call it from my loop and pass hostname and IP address to the template
[17:23:42] usershell: has joined #ruby
[17:24:55] usershell: has joined #ruby
[17:25:27] imperator: has left #ruby: ("Leaving")
[17:25:37] avdi: has joined #ruby
[17:25:49] jeregrine: has joined #ruby
[17:25:51] roolo: has joined #ruby
[17:26:22] bmurt: has joined #ruby
[17:26:43] deepu: wmoxam: ?
[17:28:09] wmoxam: deepu: it's pretty easily actually
[17:28:34] Soda: has joined #ruby
[17:28:37] vcoinminer: has joined #ruby
[17:28:54] deepu: wmoxam: Can you please show me how?
[17:29:25] harleypig: has joined #ruby
[17:29:26] InternetFriend: has joined #ruby
[17:29:39] deepu: wmoxam: I have added this inside my loop renderer = ERB.new(resource_template)
[17:29:51] d10n-work: has joined #ruby
[17:29:52] wmoxam: deepu: something like this should work: https://gist.github.com/wmoxam/2f7690e40a58ad56e879
[17:30:03] Ox0dea: [k-: `foo' is a really stupid convention for using "smart quotes" in ASCII. It needs to die.
[17:30:20] wmoxam: deepu: ERB needs a binding so it knows where to find the template variabler refs
[17:30:40] deepu: wmoxam: thank you.. let me take a look at it
[17:31:24] fumihiro: has joined #ruby
[17:31:27] alexclark: has joined #ruby
[17:31:34] Tirzah: has joined #ruby
[17:32:06] pusewicz: has joined #ruby
[17:33:44] Igorshp: has joined #ruby
[17:33:46] eggoez: has joined #ruby
[17:34:05] bronson: has joined #ruby
[17:35:41] werelivinginthef: has joined #ruby
[17:35:48] slowlag: has joined #ruby
[17:35:55] platzhirsch: has joined #ruby
[17:36:11] sinkensabe: has joined #ruby
[17:36:54] platzhirsch: How can I detect if a UTF-8 string contains characters which use more than two bytes?
[17:37:04] blandflakes: has joined #ruby
[17:37:07] chouhoulis: has joined #ruby
[17:38:21] djbkd: has joined #ruby
[17:38:55] platzhirsch: has left #ruby: ()
[17:39:16] sgambino: has joined #ruby
[17:39:19] jhack: has joined #ruby
[17:39:35] Ox0dea: chars.map(&:bytes).any? { |b| b.size > 2 }, in case he comes back.
[17:39:42] havenwood: each_char.any? { |char| char.bytesize > 1 }
[17:40:34] deepu: wmoxam: Thank you that is exactly what I needed... One quick question.. How do I add a new line at the end after username="test"/>
[17:40:57] havenwood: Ox0dea: bytes
[17:41:00] micalexander: has joined #ruby
[17:41:04] bronson: has joined #ruby
[17:41:07] Ox0dea: havenwood: Yes?
[17:41:13] havenwood: Ox0dea: I mean #bytes
[17:41:18] Ox0dea: Yours is still better on account of being able to terminate early.
[17:41:25] havenwood: Ox0dea: bytes.any?
[17:41:49] wmoxam: deepu: you could join with a newline character
[17:41:49] havenwood: Ox0dea: mm, yeah not converting to bytes
[17:41:56] kaleido: has joined #ruby
[17:42:04] wmoxam: deepu: or add one into the row templat
[17:42:14] Ox0dea: Or don't worry about formatting your HTML?
[17:42:19] micalexander: I am trying to find a good example on how to create and interface to my app using a DSL kinda like how guard has its "guard do" blocks. Any recommendations?
[17:42:32] deepu: wmoxam: ok
[17:42:55] dented42: has joined #ruby
[17:43:39] Ox0dea: micalexander: &block + instance_exec, in a nutshell.
[17:44:11] failshell: has joined #ruby
[17:44:24] dojobo1: has joined #ruby
[17:44:41] mollymorphic: has joined #ruby
[17:45:02] micalexander: Ox0dea: yep been reading up on that and messing around with it but can't seem to find a way to have the guard syntax with out wrapping it in another method or storing it in a variable
[17:45:44] roolo_: has joined #ruby
[17:46:16] micalexander: Ox0dea: I want to be able to have a use config and to be able to read that config while going through each of the do blocks with out having to store them into a variable or wrapping them in another method
[17:46:41] micalexander: Ox0dea: *user
[17:47:36] theery: has joined #ruby
[17:47:56] autrilla: has joined #ruby
[17:48:00] Ox0dea: micalexander: You know `guard` is a method in `guard to`, right?
[17:48:23] Ox0dea: *`guard do`, that is.
[17:48:32] theery_: has joined #ruby
[17:49:43] micalexander: Ox0dea: that is what I was thinking, I guess I really want to know how does it go through the file and store all of its configurations. Is that part of the DSL?
[17:49:52] Rubie: has joined #ruby
[17:52:41] Kully3xf: has joined #ruby
[17:53:35] christiandsg: has joined #ruby
[17:54:09] felltir: has joined #ruby
[17:55:30] sharpmachine: has joined #ruby
[17:55:41] bricker: has joined #ruby
[17:56:18] arup_r: has joined #ruby
[17:56:31] Ox0dea: micalexander: You might find my pseudo-assembly DSL (https://gist.github.com/0x0dea/45aae87c0180d36b6f0c) enlightening.
[17:56:31] benlieb: what???s the best way to make string equality work in rspec: I???m getting a failure on equals, even though the values are the same: https://gist.github.com/pixelterra/754c96ce0329c9e1fbd0
[17:56:51] micalexander: Ox0dea: ok let me check it out
[17:57:19] bohallor: has joined #ruby
[17:57:27] Ox0dea: micalexander: Essentially, you must capture the DSL "calls", and if your language is sufficiently dynamic, capturing "commands" and their arguments via method_missing is probably one of the easier approaches to the thing.
[17:57:42] benlieb: oh looks like I need eq not equal
[17:57:46] Ox0dea: benlieb: Aye.
[17:57:57] Ox0dea: #equal? compares object identity.
[17:58:02] micalexander: Ox0dea: hmm ok, reading through your code...
[17:58:46] alphaatom: has joined #ruby
[17:58:47] Gnubie_: has joined #ruby
[17:59:18] iateadonut: has left #ruby: ()
[17:59:22] baweaver: has joined #ruby
[18:00:01] SirFunk: has joined #ruby
[18:00:19] g3funk: has joined #ruby
[18:00:52] pfish: has joined #ruby
[18:01:02] pfish: Where is attr_reader defined?
[18:01:04] InternetFriend: has joined #ruby
[18:01:30] senayar: has joined #ruby
[18:01:37] Ox0dea: >> Object.method(:attr_reader) # pfish
[18:01:38] ruboto: Ox0dea # => #<Method: Class(Module)#attr_reader> (https://eval.in/404307)
[18:02:24] kachi8: has joined #ruby
[18:03:01] Ox0dea: pfish: Still writing PPR as a C extension?
[18:03:02] allomov: has joined #ruby
[18:03:48] pfish: its going
[18:03:52] pfish: it almost works now
[18:04:39] senayar^: has joined #ruby
[18:04:53] yb_drowe: has joined #ruby
[18:05:32] ne1l: has left #ruby: ("Leaving")
[18:07:53] yardenbar: has joined #ruby
[18:08:22] Igorshp: has joined #ruby
[18:08:39] rickmasta: has joined #ruby
[18:08:43] nofxx: has joined #ruby
[18:08:48] shock_one: has joined #ruby
[18:09:01] kachi8_: has joined #ruby
[18:10:31] mistym: has joined #ruby
[18:11:22] devbug: has joined #ruby
[18:11:31] Ilyas_: has joined #ruby
[18:11:45] h0pkins: has joined #ruby
[18:12:39] usershell: has joined #ruby
[18:12:44] shevy: code code code
[18:12:55] towski_: has joined #ruby
[18:13:39] ne1l: has left #ruby: ()
[18:16:26] rehat: new to ruby, when I do a puts on a object from "each do .." I get a <Enumerator> instead of the actual object class type
[18:16:52] jhass: rehat: to get an objects class call .class on it
[18:17:00] baweaver: has joined #ruby
[18:17:04] dblessing: has joined #ruby
[18:17:30] casadei_: has joined #ruby
[18:17:30] fumihiro: has joined #ruby
[18:17:48] rehat: jhass: I am
[18:18:08] Eiam_: has joined #ruby
[18:18:11] ruboto: We can't help you without your code, please post it to https://gist.github.com
[18:18:30] sgambino: has joined #ruby
[18:18:53] hobodave: has joined #ruby
[18:19:05] shevy: >> class Foo; end; foo = Foo.new; puts foo.class
[18:19:06] ruboto: shevy # => Foo ...check link for more (https://eval.in/404316)
[18:19:15] rehat: https://gist.github.com/rehat/c95fb4abaccb56064651
[18:19:38] jhass: puts installer.project.targets.each
[18:19:40] fumihiro: has joined #ruby
[18:19:43] fantazo: has joined #ruby
[18:19:45] jhass: there you print the return value of .each
[18:19:49] mistermocha: has joined #ruby
[18:19:49] Ox0dea: rehat: do/end binds less tightly than {}.
[18:20:04] jhass: and that, yeah
[18:20:11] rehat: ahh thanks
[18:20:14] jhass: that means the block is passed to puts, not each
[18:20:36] Ox0dea: puts installer.project.targets.map(&:class)
[18:20:42] jackjackdripper: has joined #ruby
[18:21:36] firoxer: has joined #ruby
[18:21:38] Ox0dea: rehat: I suspect you want to do more than just print within the inner block there, in which case you should nix the first `puts`.
[18:21:58] kannan4k: has joined #ruby
[18:22:02] rehat: yeah I just did and it worked, thanks
[18:22:30] balazs: has joined #ruby
[18:23:13] jerius: has joined #ruby
[18:23:23] dudoom: has joined #ruby
[18:23:59] pengin: has joined #ruby
[18:24:19] DEA7TH_: has joined #ruby
[18:24:31] kannan4k: guys, I come from Python background. Here is a class in Ruby (https://gist.github.com/kannan4k/4ccb4dd1a30496fd56b6). can you please help me what is 'field' in there? and why data types specified over there?
[18:25:10] jhass: kannan4k: field is a method most likely defined in TSheets::Model
[18:25:19] nym: has joined #ruby
[18:25:30] kannan4k: I need to convert this ^ to a Python class, can anyone write me a simple one with the above class, prolly with only one field
[18:25:47] kannan4k: jhass: oh let me check
[18:25:49] chills42: has joined #ruby
[18:25:52] jhass: nope, as said field is some method, we don't know what it does
[18:25:57] ruboto: we're not all guys - while you probably don't meant to be exclusive, not everybody feels that way. Maybe consider using "folks", "y'all" or "everyone" instead?
[18:26:12] Alayde: has joined #ruby
[18:26:16] yorickpeterse: I self identify as an airplane
[18:26:31] pfish: insert attack helicopter copypasta
[18:26:50] jhass: yorickpeterse: that's beautiful. So flughafen and you... ?
[18:27:10] shevy: ... kissing
[18:28:07] snophey: has joined #ruby
[18:28:10] shevy: kannan4k that must be a method called field which accepts at least 3 arguments
[18:28:11] kannan4k: jhass: sorry for that, i thought its like 'folks'
[18:28:35] sargas: has joined #ruby
[18:28:41] jhass: for some it is but point is that for some it isn't
[18:28:55] shevy: last argument seems to be a Hash
[18:29:01] sargas: has joined #ruby
[18:29:24] yorickpeterse: jhass: flughafen?
[18:29:32] yorickpeterse: I keep forgetting there's an actual person with that nick
[18:29:54] jhass: how dismissive. And that from an airplane
[18:30:00] kannan4k: shevy, yeah you are right "def self.field fname, type, options = {}"
[18:30:28] Ox0dea: kannan4k: That methods accepts two arguments and an optional third.
[18:30:31] kannan4k: is there any guide like -Ruby for Python developers :D
[18:30:47] shevy: does python have class methods?
[18:30:50] snophey1: has joined #ruby
[18:30:56] Ox0dea: kannan4k: http://learnxinyminutes.com/docs/ruby/
[18:30:59] bruno-: has joined #ruby
[18:31:10] jhass: https://www.ruby-lang.org/en/documentation/ruby-from-other-languages/to-ruby-from-python/
[18:31:26] jhass: mmh, okay that's a bit sparse maybe
[18:31:52] JoshL: has joined #ruby
[18:33:05] yfeldblum: has joined #ruby
[18:33:10] s2013: has joined #ruby
[18:34:57] chinmay_dd: has joined #ruby
[18:35:18] havenwood: has joined #ruby
[18:35:57] Igorshp: has joined #ruby
[18:37:22] roolo: has joined #ruby
[18:37:35] werelivinginthef: has joined #ruby
[18:37:39] yfeldblum: has joined #ruby
[18:38:57] mjuszczak: has joined #ruby
[18:40:17] arooni-mobile: has joined #ruby
[18:40:59] codecop: has joined #ruby
[18:42:20] jenrzzz: has joined #ruby
[18:42:41] yfeldblum: has joined #ruby
[18:42:58] lannonbr: has joined #ruby
[18:43:00] InternetFriend: has joined #ruby
[18:43:18] dgutierrez1287: has joined #ruby
[18:44:41] leat1: has joined #ruby
[18:48:11] podman: has joined #ruby
[18:49:18] [H]unt3r_: has joined #ruby
[18:49:38] yardenbar: has joined #ruby
[18:52:12] peter_paule: has joined #ruby
[18:52:22] jhack: has joined #ruby
[18:53:00] ascarter: has joined #ruby
[18:56:10] christiandsg: has joined #ruby
[18:57:36] shevy: he could switch to ruby too!
[18:57:50] lkba: has joined #ruby
[18:58:08] thelastinuit: has joined #ruby
[18:59:21] kirun: has joined #ruby
[18:59:54] Papierkorb: has joined #ruby
[19:00:05] safeforge: has joined #ruby
[19:01:00] Mendenhall: has joined #ruby
[19:02:31] benjwadams: has joined #ruby
[19:02:48] benjwadams: How can i determine if a string is a valid float and if not return nil
[19:02:53] benjwadams: besides regex
[19:03:05] mjuszczak: has joined #ruby
[19:03:08] benjwadams: .to_f returns 0.0, which is no good
[19:03:10] quimrstorres: has joined #ruby
[19:03:19] gguggi: has joined #ruby
[19:03:29] usershell: has joined #ruby
[19:04:09] yxhuvud: benjwadams, Float()
[19:04:20] benjwadams: I guess I could do `Float(str) rescue nil`
[19:04:38] Eiam_: has joined #ruby
[19:04:39] yorickpeterse: What's wrong with using a regex?
[19:05:01] tomaz_b: has joined #ruby
[19:05:09] benjwadams: it's boilerplate
[19:05:35] bougyman: yorickpeterse: reminds me of "What's wrong with using threads?" I got asked the other day.
[19:05:44] bougyman: "You just introduced at least 5 bugs"
[19:05:56] bougyman: regex is not much diff.
[19:06:05] yorickpeterse: well either you abuse exceptions as flow control or you use a regex
[19:06:43] Ox0dea: I think this is one of the few cases which justifies doing the former.
[19:06:53] sandelius: has joined #ruby
[19:06:59] roolo_: has joined #ruby
[19:07:01] bougyman: regex for a float is at least targeted enough to be mostly safe.
[19:07:13] bougyman: it all depends on the use case.
[19:07:44] Ox0dea: But why not just use the interpreter's definition of a valid Float?
[19:09:18] bougyman: I though BigDecimal had a method for this.
[19:09:20] bougyman: I can't find it, tho.
[19:09:30] bougyman: it also returns 0.0 for an invalid float.
[19:09:34] arturmartins: has joined #ruby
[19:09:47] workmad3: has joined #ruby
[19:10:04] alexclark: has joined #ruby
[19:10:11] pengin: has joined #ruby
[19:10:22] shock_one: has joined #ruby
[19:11:11] arturmartins: has joined #ruby
[19:11:23] Blaguvest: has joined #ruby
[19:11:26] roolo: has joined #ruby
[19:12:39] kinduff: has joined #ruby
[19:12:51] hobodave: has joined #ruby
[19:13:40] troulouliou_dev: has joined #ruby
[19:14:13] DEA7TH_: has joined #ruby
[19:16:37] yb_drowe: has left #ruby: ("PEACE OUT DAWGZ")
[19:17:36] sharpmachine: has joined #ruby
[19:18:08] Ox0dea: >> require 'bigdecimal'; BigDecimal('foo')
[19:18:10] ruboto: Ox0dea # => #<BigDecimal:409e6570,'0.0',9(9)> (https://eval.in/404343)
[19:18:25] prestorium: has joined #ruby
[19:18:37] Agoldfish: has joined #ruby
[19:19:45] slackbotgz: has joined #ruby
[19:20:53] roolo_: has joined #ruby
[19:20:58] shock_one: has joined #ruby
[19:21:17] benlovell: has joined #ruby
[19:21:35] mistermocha: has joined #ruby
[19:22:10] blackmesa: has joined #ruby
[19:24:07] jhack: has joined #ruby
[19:24:08] mjuszczak: has joined #ruby
[19:24:52] felltir: has joined #ruby
[19:24:57] rced: has joined #ruby
[19:25:27] s2013: has joined #ruby
[19:25:42] ruby-lang643: has joined #ruby
[19:25:52] kachi8_: has joined #ruby
[19:26:08] ruby-lang643: hello there world
[19:27:03] dented42: has joined #ruby
[19:27:41] intuxicated: has joined #ruby
[19:27:50] serivich: has joined #ruby
[19:28:32] michaeldeol: has joined #ruby
[19:29:08] ruby-lang643: hello in here
[19:29:55] shevy: hello out there
[19:30:06] InternetFriend: has joined #ruby
[19:30:26] dfockler: hello every where
[19:30:49] dudoom: has joined #ruby
[19:31:05] quimrstorres: has joined #ruby
[19:33:03] allomov: has joined #ruby
[19:33:29] freerobby: has joined #ruby
[19:33:43] ahhMichael: has joined #ruby
[19:34:52] ahhMichael: has joined #ruby
[19:36:17] sharpmachine: has joined #ruby
[19:36:34] freerobby: has joined #ruby
[19:36:39] juanpablo_: has joined #ruby
[19:36:55] baweaver: has joined #ruby
[19:37:26] alexclark: has joined #ruby
[19:38:41] dseitz: has joined #ruby
[19:39:40] bl4ckdu5t: has joined #ruby
[19:39:50] k3asd`: has joined #ruby
[19:39:51] cornerma1: has joined #ruby
[19:41:08] Mekkis: has joined #ruby
[19:41:09] freerobby: has joined #ruby
[19:42:44] christiandsg: has joined #ruby
[19:44:36] msnyon: has joined #ruby
[19:45:05] philn_: has joined #ruby
[19:45:39] rced: has left #ruby: ()
[19:46:06] bohallor: how does ruby (2.2) determine its loadpath? ($: variable)
[19:46:16] jgpawletko: has left #ruby: ()
[19:47:09] Ox0dea: bohallor: Please clarify.
[19:47:33] Aria: There's an environment variable, plus some built in defaults.
[19:47:41] Aria: Plus command line arguments can alter it too
[19:48:01] mistym: has joined #ruby
[19:48:07] ElSif: http://phrogz.net/ProgrammingRuby/rubyworld.html <- more than that here but its all good info
[19:48:14] Ox0dea: Aria: Which environment variable is that?
[19:48:58] casadei_: has joined #ruby
[19:49:09] bohallor: im changing the name of the ruby executable (to get a tweaked version of mri & normal ruby working on one machine) and this is messing up the load path (not being able to find the gem files)
[19:49:16] freerobby: has joined #ruby
[19:49:33] bohallor: also changing the ruby version name from ruby-> new name
[19:50:17] Aria: Also RUBYOPT with -I flags in it
[19:50:19] Ox0dea: bohallor: You're building your modified MRI in its own directory, no?
[19:50:22] peter_paule: has joined #ruby
[19:50:31] workmad3: has joined #ruby
[19:50:34] jackjackdripper1: has joined #ruby
[19:50:42] Alayde: has joined #ruby
[19:50:46] apt-get_: has joined #ruby
[19:50:53] freerobby: has joined #ruby
[19:51:03] Ox0dea: Why not just tell chruby to look for Rubies in there?
[19:51:10] bohallor: own directory. local builds work fine with --disable gems
[19:51:14] fantazo: has joined #ruby
[19:51:55] Yiota: has joined #ruby
[19:52:08] quimrstorres: has joined #ruby
[19:52:58] freerobby: has joined #ruby
[19:53:57] baweaver: has joined #ruby
[19:54:09] arturmartins: has joined #ruby
[19:54:37] sargas: has joined #ruby
[19:54:57] bohallor: didn't know chruby was a thing. ill look at just using that
[19:55:05] freerobby: has joined #ruby
[19:55:05] ElSif: there is also rvm >.>
[19:55:13] Ox0dea: ElSif: Please stop.
[19:55:17] dfockler: chruby! chruby!
[19:55:25] ElSif: people really hate rvm these days huh?
[19:55:29] Ox0dea: It's shit.
[19:55:39] ElSif: chruby is good i agree
[19:55:56] swgillespie: has joined #ruby
[19:55:57] robbyoconnor: has joined #ruby
[19:56:31] cout: ElSif: depends on whom you ask
[19:56:36] ElSif: im sure it does
[19:57:10] freerobby: has joined #ruby
[19:57:31] havenwood: has joined #ruby
[19:57:34] dfockler: everyone should use what they want
[19:57:41] kadoppe: has joined #ruby
[19:57:59] miah: i use rvm on servers at work and 'Its Fine???', but i prefer and use chruby on my systems
[19:58:45] zuQe8: has joined #ruby
[19:58:47] freerobby: has joined #ruby
[19:59:00] miah: actually, currently using rbenv on servers and it was a previous gig where we ran rvm.
[19:59:01] n008f4g_: has joined #ruby
[19:59:02] Mendenhall: has joined #ruby
[19:59:04] miah: anyways. they all worked fine.
[19:59:50] Igorshp: has joined #ruby
[20:00:23] freerobby: has joined #ruby
[20:00:50] benlovell: has joined #ruby
[20:01:44] shevy: I compile from the source \o/
[20:01:58] alexherbo2: has joined #ruby
[20:01:59] ElSif: ACTION highfives shevy
[20:02:17] allomov: has joined #ruby
[20:02:19] ElSif: of course, so do most of the tools like chruby and rvm
[20:03:00] freerobby: has joined #ruby
[20:03:35] casadei_: has joined #ruby
[20:04:12] polpak: has joined #ruby
[20:04:18] wildroman2: has joined #ruby
[20:04:32] ElSif: sometimes i miss running gentoo T_T
[20:04:35] freerobby: has joined #ruby
[20:04:58] Pupp3tm4st3r: has joined #ruby
[20:07:13] benlieb: has joined #ruby
[20:07:37] mkosaki: has joined #ruby
[20:07:43] symm-: has joined #ruby
[20:07:51] ruby-lang096: has joined #ruby
[20:08:16] Musashi007: has joined #ruby
[20:08:55] jxpx777: has joined #ruby
[20:09:05] michael_mbp: has joined #ruby
[20:09:11] freerobby: has joined #ruby
[20:09:21] freeUmo: has joined #ruby
[20:10:24] Ox0dea: ElSif: chruby doesn't do anything but change the current Ruby.
[20:10:35] ElSif: yea i get why it is different
[20:10:41] ElSif: much less intrusive
[20:10:51] ElSif: i was just stating that there are options :)
[20:11:03] Ox0dea: shevy: You said you didn't do that not too long ago.
[20:11:36] Ox0dea: ElSif: Archer?
[20:11:53] ElSif: did i commit a phrasing violation?
[20:12:17] Ox0dea: What'd you switch to from Gentoo?
[20:12:37] ElSif: i got tired of having updates take half my battery life
[20:12:52] Ox0dea: Then a "yes" would've done. :p
[20:12:54] ninji: has joined #ruby
[20:13:13] ElSif: i thought you were making a silly cartoon comment
[20:13:17] havenwood: Do you want ants? Because that's how you get ants.
[20:13:51] cout: ElSif: I thought so too
[20:13:56] Ox0dea: ElSif: Do you use any git packages?
[20:14:13] shevy: Ox0dea didn't do what?
[20:14:24] Ox0dea: Compile from source.
[20:14:31] alexclark: has joined #ruby
[20:14:37] shevy: I'd never say anything like that because I always compile from source!
[20:14:51] Ox0dea: Even though you use 2.2.2?
[20:14:53] ElSif: shevy: Slacker?
[20:15:07] Ox0dea: shevy uses LFS.
[20:15:11] shevy: Ox0dea it was compiled from source
[20:15:13] shevy: no I do not
[20:15:17] freerobby: has joined #ruby
[20:15:18] Ox0dea: shevy: But... why?
[20:15:19] havenwood: Ox0dea: shevy even got a shoutout on RubyRogues for being the guy in #ruby that always recommends compiling from source, granted they transcribed it as "chevy"
[20:15:21] ElSif: shevy: as in git extensions?
[20:15:24] ElSif: i did that once :D
[20:15:25] ElSif: it was fun
[20:15:28] shevy: Ox0dea because it brings only advantages?
[20:15:30] ElSif: ... and broke within a week
[20:15:46] Ox0dea: havenwood: Huh, nice.
[20:15:59] ElSif: then i was like 'Aha! this is hard, so thats why people let others maintain their distro.'
[20:16:02] shevy: ElSif oh yeah, there is quite a bit of "hidden" knowledge
[20:16:03] jerius: has joined #ruby
[20:16:31] ElSif: Ox0dea: *as in git extensions?
[20:16:33] shevy: ElSif, for instance right now I ponder about cfdg: /usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by cfdg)
[20:16:49] Ox0dea: ElSif: No, I meant -git packages from the AUR.
[20:16:51] ElSif: linked library issues D:
[20:17:04] ElSif: i use yaourt to manage them
[20:17:10] shevy: oh yeah... I hate libtool
[20:17:24] freerobby: has joined #ruby
[20:17:28] Ox0dea: ElSif: Don't you hate that they build from scratch on every update?
[20:17:28] shevy: one day I shall replace it with a ruby script
[20:17:46] ElSif: sometimes yea :\
[20:17:50] ElSif: especially java ones
[20:17:51] casadei_: has joined #ruby
[20:18:17] ElSif: probably mostly to me not caring to keep a good java env :P
[20:18:27] Mekkis: has joined #ruby
[20:18:34] ElSif: but PCGen needs it
[20:18:43] ElSif: and i need PCGen to live
[20:18:49] ElSif: ... and play dnd
[20:18:56] Ox0dea: I keep a directory of cloned repositories for packages I want HEAD for. :/
[20:19:14] bronson: has joined #ruby
[20:19:43] ElSif: ah, yea i did that, makes it much easier to bring back a stable env when something goes wrong
[20:20:00] ElSif: now im just too lazy i guess :(
[20:20:01] drewo: has joined #ruby
[20:20:25] Ox0dea: It's easy enough to be automatically notified of when a pull would be an update.
[20:20:29] freerobby: has joined #ruby
[20:20:55] ElSif: i still do it for a couple things, but only things that i really care what version im running
[20:20:55] Ox0dea: I looked for an AUR helper that didn't start from scratch for -git packages, but there weren't any. :/
[20:20:59] ElSif: and java is not one of those things :)
[20:21:05] Ox0dea: Fair enough.
[20:21:05] neanderslob: has joined #ruby
[20:21:17] tsvenson: has joined #ruby
[20:21:38] ElSif: yea, in not sure there are, it would be hard to manage changes that needed it to start from scratch versus those that didnt
[20:21:44] ElSif: cant blame them for being lazy
[20:21:53] mike___1234: has joined #ruby
[20:22:03] shevy: laziness makes us write better programs!
[20:23:06] freerobby: has joined #ruby
[20:23:22] shinnya: has joined #ruby
[20:23:43] perrier: has joined #ruby
[20:23:51] Trynemjoel: has joined #ruby
[20:24:15] ledestin: has joined #ruby
[20:24:17] hal_9000: has joined #ruby
[20:24:22] ElSif: yea, i usually find that im mostly motivated by 'how can i go back to sleep and not worry about this'
[20:24:33] EminenceHC: has joined #ruby
[20:25:31] drewo: has joined #ruby
[20:25:37] freerobby: has joined #ruby
[20:26:36] mistermocha: has joined #ruby
[20:26:56] tsvenson_: has joined #ruby
[20:27:02] jhack: I need some help, im creating a cmd line blackjack game, and i have the cards in a global array, how would i set it so that the JQKA, are set into values when im adding the total?
[20:27:34] jhack: I'm trying to use .include and .push to check to see if these cards are in the hand and if they are, push a value into the hand
[20:28:16] jhack: something like this,
[20:28:18] jhack: if @hand.include?("J") == true || @hand.include?("Q") == true || @hand.include?("K") == true
[20:28:18] jhack: @hand.delete()
[20:28:18] jhack: @hand.push("10")
[20:29:06] ruurd: has joined #ruby
[20:29:12] freerobby: has joined #ruby
[20:29:25] ElSif: you dont need the `== true`
[20:29:41] platosha: has joined #ruby
[20:30:04] ElSif: would you be able to gist your project?
[20:30:09] ElSif: im curious what your class structure is like
[20:30:44] mozzarella: if ["J", "Q", "K"].all? { |x| @hand.include?(x) }
[20:31:01] havenwood: s/all?/any?
[20:31:20] freerobby: has joined #ruby
[20:31:23] mozzarella: misread that as && instead of ||
[20:31:48] jhack: https://gist.github.com/jhack32/98a536722f83763b51a9
[20:31:57] apeiros: !(%w[J Q K] & hand).empty?
[20:32:12] shevy: it's getting shorter and shorter
[20:32:22] Trynemjoel: has joined #ruby
[20:32:28] Ox0dea: hand[/[JQK]/]
[20:32:32] apeiros: but I somewhat doubt that would work, given that a card is color + number
[20:32:39] allomov: has joined #ruby
[20:32:43] jhack: I'm only doing # right now apeiros
[20:33:02] ElSif: you could simplify your challenger here by creating a `Card` class
[20:33:06] ElSif: *challenge
[20:33:12] wallerdev: has joined #ruby
[20:33:25] freerobby: has joined #ruby
[20:33:37] ElSif: and have it get the attributes `suite, value, face_value` or something like that
[20:33:39] Ox0dea: > $cards = [2,3,4,5,6,7,8,9,10,"J","Q","K","A"]
[20:33:40] apeiros: Card + Hand classes
[20:33:42] Ox0dea: That's just... so wrong.
[20:33:49] ElSif: Hand would be good too
[20:34:53] ElSif: yea, you dont want to mix your data types definitely, you will end up with weird 'oh this is a number sometimes but a string other times' problems
[20:35:14] eam: Ox0dea: I wrote an entire chess program with a similar approach in high school
[20:35:22] eam: white was capital letters, black was lowercase
[20:35:33] Musashi007: has joined #ruby
[20:35:43] Ox0dea: That's quite different.
[20:36:08] jhack: So, i'm putting my array into the Card class, and have value, face_value inside my intiialize?
[20:36:10] jhack: initialize
[20:36:16] jhack: sorry, new to ruby here lol
[20:36:29] ElSif: sure, i would suggest having one be a ONLY stings, and one be ONLY numbers
[20:36:40] Ox0dea: jhack: Heterogenous data should be a necessary evil, not something you impose on yourself.
[20:37:02] freerobby: has joined #ruby
[20:37:08] ElSif: unless you like hurting yourself....
[20:37:15] Ox0dea: There's always that.
[20:37:36] jhack: so... my values would be put into a value array and face_value be my strings (JQKA)
[20:37:59] ascarter: has joined #ruby
[20:38:07] ElSif: I think that makes sense :)
[20:38:18] jhack: alright, thanks
[20:38:29] sarkyniin: has joined #ruby
[20:38:42] rbowlby: has joined #ruby
[20:39:21] Ox0dea: jhack: Using 'T' for 10 should simplify some things.
[20:39:37] freerobby: has joined #ruby
[20:39:43] ElSif: interesting, i like it
[20:39:59] Ox0dea: It's a pretty standard representation.
[20:40:22] quimrstorres: has joined #ruby
[20:41:09] jhack: i dont understand, why?
[20:41:12] ElSif: people sure are smart :D
[20:41:14] freerobby: has joined #ruby
[20:41:21] bronson: has joined #ruby
[20:41:37] sharpmachine: has joined #ruby
[20:41:38] ElSif: because less logic to handle them
[20:41:48] ElSif: at least, probably more too
[20:43:39] ruurd: has joined #ruby
[20:43:55] phutchins: has joined #ruby
[20:44:19] freerobby: has joined #ruby
[20:44:58] Ox0dea: jhack: Uniformity of representation if nothing else.
[20:45:29] Ox0dea: All the other ranks can be represented as strings of length 1; why not let 10 join the club?
[20:45:46] ips|malc: has joined #ruby
[20:46:05] ElSif: no pun intended?
[20:46:38] ElSif: i guess you didnt say `clubs` :P i should take a break
[20:47:25] freerobby: has joined #ruby
[20:47:39] Hanmac: has joined #ruby
[20:47:58] bradleyprice: has joined #ruby
[20:49:01] freerobby: has joined #ruby
[20:51:24] ruurd: has joined #ruby
[20:51:45] _cball: has joined #ruby
[20:52:07] pengin: has joined #ruby
[20:53:08] freerobby: has joined #ruby
[20:53:20] leat1: has joined #ruby
[20:55:10] last_staff: has joined #ruby
[20:55:26] Mekkis: has joined #ruby
[20:55:53] Trynemjoel: has joined #ruby
[20:56:50] Ox0dea: jhack: Some things worth considering: https://gist.github.com/0x0dea/5eb9c574b790af39bf16
[20:57:08] Mweshi: has joined #ruby
[20:58:44] freerobby: has joined #ruby
[20:58:49] zarubin_: has joined #ruby
[20:59:59] bungoman: has joined #ruby
[21:00:01] Mweshi: has joined #ruby
[21:01:20] freerobby: has joined #ruby
[21:02:21] symm-: has joined #ruby
[21:03:17] shevy: in your paste... do you use 0x0 Ox0dea?
[21:04:47] shevy: I thought you are Ox!
[21:04:57] freerobby: has joined #ruby
[21:04:57] shevy: but the gist is https://gist.github.com/0x0dea
[21:05:09] Ox0dea: shevy: Blame some RFC.
[21:05:15] Ox0dea: I'd be 0x0dea here if I could.
[21:05:52] ruurd: has joined #ruby
[21:06:33] tsvenson__: has joined #ruby
[21:07:03] freerobby: has joined #ruby
[21:08:56] ninji: has joined #ruby
[21:10:22] dgutierrez1287: has joined #ruby
[21:10:39] freerobby: has joined #ruby
[21:12:48] danzilio: has joined #ruby
[21:13:02] alexclark: has joined #ruby
[21:13:20] FernandoBasso: has joined #ruby
[21:15:12] jhack: Am i doing this right? I feel like i should be having the array outside the class, not sure though? https://gist.github.com/jhack32/98a536722f83763b51a9
[21:16:59] nitenq: has joined #ruby
[21:17:56] jxf: jhack: There's a lot to talk about there, but generally I would have expected something like a Card object, a Deck object that holds all the possible cards, a Deck#shuffle that shuffles the cards, a Deck#take that takes the top card, and so on. Then your "Game" is a one or more Players and a Deck.
[21:18:22] nahtnam: has joined #ruby
[21:18:32] jxf: jhack: There isn't any "one right way" to do it. Generally speaking, though, developers tend to favor solutions where the cost of making a change is small.
[21:18:44] tmtwd: has joined #ruby
[21:19:06] Ox0dea: jhack: Imagine how much your code would need to change if you wanted to add another player.
[21:19:12] nahtnam: How would I go about making my own cli interface gem? I know there is thor, but from what I can see, you have to run it with a `./`. I want to be able to run it like rails does, without the `./`
[21:19:20] peter_paule: has joined #ruby
[21:19:37] jhack: Okay, i'm gonna rewrite this into different classes
[21:19:42] Ox0dea: nahtnam: You add an "executable" to your gem's bin/ directory.
[21:19:48] havenwood: I know Crystal is of general interest to Rubyists for a variety of reasons. They just launched a bountysource to help fund ongoing development if anyone is interested in contributing: https://www.bountysource.com/teams/crystal-lang/fundraisers/702-crystal-language
[21:20:04] nahtnam: Ox0dea: Do you have an example?
[21:20:19] Ox0dea: nahtnam: Do you know about the shebang line?
[21:20:32] Ox0dea: #!/usr/bin/env ruby
[21:20:32] gusrub: has joined #ruby
[21:20:34] Ox0dea: ^ That thing.
[21:20:47] nahtnam: That just runs ruby right?
[21:20:55] nahtnam: *the ruby command
[21:21:08] havenwood: nahtnam: Here's an example bin/ file: https://github.com/pry/pry/blob/master/bin/pry
[21:21:11] jenrzzz: has joined #ruby
[21:21:15] havenwood: nahtnam: and line in the gemspec: https://github.com/pry/pry/blob/master/pry.gemspec#L17
[21:21:35] Guest38521: has joined #ruby
[21:21:54] havenwood: nahtnam: ^ one example
[21:21:56] nahtnam: havenwood: And then have the thor stuff in the lib folder?
[21:21:59] Ox0dea: jhack: Small, focused, composable pieces = <3
[21:22:15] dblessing: has joined #ruby
[21:22:28] ElSif: technically #! tells ur terminal to run the file through a non-interactive shell (i believe)
[21:22:43] usershell: has joined #ruby
[21:22:45] jhack: Ox0dea: still a little confused as to how i would add my arrays from Card class into another array in a different class :x
[21:23:30] nahtnam: http://www.emilsoman.com/blog/2012/12/17/add-a-cli-to-your-gems-with-thor/
[21:23:56] baweaver: has joined #ruby
[21:23:57] Ox0dea: ElSif: It's actually the kernel that ultimately handles #!.
[21:24:08] ElSif: true! good point
[21:24:49] Ox0dea: ElSif: https://github.com/torvalds/linux/blob/master/fs/binfmt_script.c#L25-L26
[21:25:26] borodin: has joined #ruby
[21:26:04] ElSif: thanks for the link
[21:26:06] DmitryM_: has joined #ruby
[21:26:14] jenrzzz_: has joined #ruby
[21:26:31] bahar: has joined #ruby
[21:26:55] bahar: has joined #ruby
[21:27:11] chipotle: has joined #ruby
[21:27:51] DmitryM_: Hey gents, shot in the dark. When I debug Rails 4.x with Pry (binding.pry) and I terminate the debugging session with exit, the whole ruby process seems to hang (or block somewhere). This is with Ruby 2.1.2 on OS X. Any tips on how to start debugging this?
[21:27:57] Ox0dea: ?guys DmitryM_
[21:27:58] ruboto: DmitryM_, we're not all guys - while you probably don't meant to be exclusive, not everybody feels that way. Maybe consider using "folks", "y'all" or "everyone" instead?
[21:28:58] DmitryM_: My appologies, ladies and gentlemen.
[21:29:43] havenwood: DmitryM_: You might also try in #RubyOnRails if you haven't already. Just them know it's a cross-post.
[21:30:02] DmitryM_: thanks, havenwood i tried #rails, but taht doesnt' exist
[21:30:07] Ox0dea: ?rails DmitryM_
[21:30:07] ruboto: DmitryM_, Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[21:30:13] havenwood: DmitryM_: Ah, yeah it's #RubyOnRails.
[21:30:23] havenwood: Too bad #rails doesn't redirect.
[21:30:57] lala: has joined #ruby
[21:31:01] s00pcan: has joined #ruby
[21:31:05] apeiros: #rails does redirect
[21:31:12] apeiros: as does #ror
[21:31:19] borodin: having trouble with ruby seeing a gem I have installed - gem list zabbixapi shows it, find show's it's path, but when I do irb require "zabbixapi" I see errors that the gem is notavailable
[21:31:25] havenwood: DmitryM: Is something rescuing SystemExit or Exception?
[21:31:33] apeiros: or it did redirect
[21:31:52] havenwood: apeiros: #rails just redirected me to ##namespace
[21:32:08] havenwood: apeiros: #ror worked
[21:32:27] Drewch: has joined #ruby
[21:32:28] apeiros: same for me. wondered whether it was because I already joined #rubyonrails
[21:32:43] havenwood: I hadn't joined #rubyonrails when it redirected me
[21:32:44] DmitryM: havenwood: i'm not sure. once i exit the debugging session, the process just stops accepting connections on port 80.. I'm not sure where to go from there.
[21:33:08] borodin: can anyone tell me another gem that is normally loaded into ruby-1.8.6 (rhel default ruby) that I can compare this to?
[21:33:41] Ox0dea: borodin: Did you require 'rubygems' first?
[21:33:57] borodin: hmmm duhhhhh
[21:34:27] Ox0dea: borodin: It's only a 1.8 thing, so you're forgiven. :P
[21:34:28] Asher: has joined #ruby
[21:34:48] jhass: 1.8.6 x_x
[21:34:59] havenwood: borodin: Ruby 1.8.6 is way past end-of-life. If you can, update to a currently-supported Ruby. Either Ruby 2.1 or Ruby 2.2.
[21:35:03] ScriptGeek: has joined #ruby
[21:35:10] hinbody: has joined #ruby
[21:35:39] havenwood: borodin: The `require 'rubygems'` is just required pre-1.9.
[21:35:54] borodin: you're a sexy human being havenwood
[21:36:12] borodin: I have no doubt many humans want to reproduce with you and your mighty brain
[21:36:16] DmitryM: havenwood: i wonder if the connection gets into a bad state if i end up debugging for a while..
[21:36:30] DmitryM: if i exit right away everything works fine
[21:36:32] borodin: thanks again!
[21:36:46] craysiii: has joined #ruby
[21:37:12] myztic: has joined #ruby
[21:37:19] Mekkis: has joined #ruby
[21:37:32] bronson: has joined #ruby
[21:37:52] imperator: has joined #ruby
[21:38:05] philn_: has joined #ruby
[21:38:30] imperator: on an http POST is there any reason not to set a default body of "" ?
[21:38:30] havenwood: imperator: hi
[21:38:41] icebourg: has joined #ruby
[21:38:41] Hanmac: has joined #ruby
[21:38:45] imperator: i hit an issue with RestClient.post that is bugging me
[21:39:29] workmad3: has joined #ruby
[21:39:37] stantonnet: has joined #ruby
[21:41:23] drewo: has joined #ruby
[21:41:47] jenrzzz: has joined #ruby
[21:41:56] pocketprotector: has joined #ruby
[21:42:12] rasalghul_: has joined #ruby
[21:42:19] dfockler: imperator: what is it doing?
[21:42:30] imperator: dfockler, not working ;)
[21:42:49] imperator: basically, i had a post fail because i didn't explicitly pass "" to the post method
[21:43:07] dfockler: when would you do a post and not have anything in it?
[21:43:30] imperator: when the rest api i'm using says i don't need anything
[21:43:43] dfockler: You need to change that REST api!
[21:43:44] havenwood: imperator: If Content-Langth is 0 I don't see any problem with a default Body of "".
[21:44:02] phutchins: has joined #ruby
[21:44:03] imperator: dfockler, is the MS azure REST api
[21:44:08] havenwood: imperator: It'd likely work with more apps.
[21:44:26] allcentury: has joined #ruby
[21:45:08] craysiii: https://gist.github.com/craysiii/cb36c5fe33204bb4317f I am having an issue trying to sync up these two threads. In it's current state it ignores the sleep calls inside each thread. How can I get each thread to run at a certain interval?
[21:45:36] havenwood: I mean technically I don't think an empty Body is required if the Content-Length is zero but yeah, it's not wrong and likely better for compatibility.
[21:46:50] myztic: beginner question: want to use ruby as day to day scripting language, which resource to start with?
[21:47:06] myztic: (total ruby beginner)
[21:47:20] DEA7TH: has joined #ruby
[21:47:20] jhass: myztic: what's your background?
[21:47:33] Senjai: Does anyone have any recommendation on how you could run full end-to-end tests on an architecture with several applications?
[21:47:35] robbyoconnor: has joined #ruby
[21:47:41] myztic: jhass: very little C and know my way around UNIX, but that's it
[21:47:53] havenwood: myztic: Here are some links: http://ruby-community.com/pages/links
[21:47:57] senayar: has joined #ruby
[21:48:02] imperator: havenwood, i agree
[21:48:08] havenwood: myztic: And some comparisons to C: https://www.ruby-lang.org/en/documentation/ruby-from-other-languages/to-ruby-from-c-and-cpp/
[21:48:12] Senjai: In a way that we could trigger it before a deployment.. Currently looking into options atm
[21:48:12] jhass: myztic: might check Chris Pine's Learn to program to get the hang on OOP then
[21:48:25] Antiarc: Senjai: What kind of application? Typical answer is a user-simulation driver that does acceptance testing
[21:48:45] Antiarc: ie, if it's a web app, capybara + rspec or whatever
[21:49:02] Senjai: Antiarc: It's a web app with a seperate frontend from the backend
[21:49:08] Senjai: the frontent requires the backend to be running
[21:49:20] Antiarc: Right, but the user will experience everything through the frontend, right?
[21:49:39] Antiarc: So you could write a test suite that does stuff in a headless browser and tests the results
[21:49:41] Senjai: Currently they stub out the API
[21:49:52] Senjai: Yes, but it needs to be done with real data
[21:50:05] Antiarc: capybara + rspec + poltergeist + phantomjs is my preferred stack
[21:50:16] Senjai: Righto, how do you reset or rollback the state of the database?
[21:50:19] Antiarc: That lets you actually drive a Real Browser and do Real Things with it and test the results
[21:50:34] myztic: jhass: this one http://files.meetup.com/8441952/Learn%20to%20Program,%202nd%20Edition.pdf
[21:50:36] Antiarc: Well, you would perform DB setup prior to your tests, in an isolated DB
[21:50:42] Senjai: Controlling the data source inbetween tests that are not running on the actual backend is proving difficult
[21:50:46] myztic: havenwood: thank you :)
[21:51:01] Senjai: Antiarc: Okay, so if I have an acceptance test to purchase a product that goes out of stock, I need that product to be in its original state after that test
[21:51:13] skinofstars: has joined #ruby
[21:51:15] workmad3: has joined #ruby
[21:51:27] Antiarc: I would recommend using a separate test DB that simply sets up an item that is out of stock prior to the test
[21:51:33] EminenceHC: has joined #ruby
[21:51:36] skinofstars: has left #ruby: ()
[21:52:08] Senjai: Antiarc: I meant the act of adding an item to the cart, and having it go out of stock before you can checkout with it. We do use a seperate test db, but we still have to maintain the state of it
[21:52:20] Senjai: E.g. I'd like to rollback to the initial seeds after each acceptance test
[21:52:33] a346: has joined #ruby
[21:52:44] Antiarc: IIRC AR provides something like that through the use of transactional fixtures?
[21:52:44] Senjai: If I was actually acceptance testing the backend, this would be easy because everything happens within the context of the database connection I control
[21:52:58] Senjai: Antiarc: But I cant access AR from the test stack ;)
[21:53:35] Igorshp: has joined #ruby
[21:53:45] Antiarc: Well, it wouldn't be too hard to provide setup/teardown steps for the test which set the state/restore the state, provided those interfaces exist
[21:54:15] zapho53: has joined #ruby
[21:54:19] Senjai: Antiarc: They do not. I'm thinking I will have a seeds file for this specific set of testing, and dump the database and restore it from the SQL file after each test and restart the backend. Which is not fun.
[21:54:33] Antiarc: Heh, no, it's not fun. But it may be effective.
[21:54:43] slash_nick: Senjai: dump db before tests... empty db and import dump on teardown?
[21:54:47] Antiarc: Acceptance testing is usually slow anyhow though
[21:54:52] Senjai: I may not have to restart the backend if I dont drop the database and instead just replace tables
[21:54:55] zapho53: Is there a way with middleman to avoid having all my images duplicated in source/ and build/ ?
[21:55:05] Senjai: iirc dropping and recreating the database borks AR connections
[21:55:07] Antiarc: Senjai: You could also use a separate DB per test, perhaps
[21:55:11] Yzguy: has joined #ruby
[21:55:20] Senjai: Antiarc: That could get unweildy but thats also an option
[21:55:30] Senjai: Antiarc: I could also restore each database while another database takes the next test
[21:55:32] Antiarc: That way your test state would be isolated and inspectable, which would be handy
[21:55:34] Senjai: and alternate between databases
[21:55:52] Senjai: Bleh no, requires restarting the backend
[21:56:00] jenrzzz: has joined #ruby
[21:56:00] Senjai: which is slow, and probably is slower than postgres doing its thing
[21:56:48] Antiarc: Well, if it proves too unweildy you might just do segmented testing - test that the frontend behaves like so when it receives this data, and test that the backend behaves this way when it receives this request, etc
[21:57:03] Antiarc: That's less comprehensive but it would be far easier to control
[21:57:20] Antiarc: (This is effectively how one tests functionality against a remote API, anyhow)
[21:58:30] yfeldblum: has joined #ruby
[21:58:50] gamename: has joined #ruby
[21:59:40] wildroman2: has joined #ruby
[22:00:37] Senjai: Antiarc: Yeah, but when we have control over the API we should also be able to do better than that.
[22:01:00] Senjai: Antiarc: I think the goal would be to only write tests independent of state for this kind of stuff
[22:01:02] imperator: has left #ruby: ("Leaving")
[22:01:03] centrx: has joined #ruby
[22:01:10] Antiarc: agreed - just noting that it's an option
[22:01:11] Senjai: If I have to manage the data source of another application, that would quickly get unwieldy
[22:02:25] edwardly: has joined #ruby
[22:03:00] Senjai: Antiarc: Thanks for the dialogue. :)
[22:03:17] edwardly: has joined #ruby
[22:03:22] Antiarc: Good luck with it! It sounds arduous either way - hope you find a good solution!
[22:04:08] Senjai: Yeah, it's definitely going to be a tough problem
[22:04:10] Senjai: To do it well
[22:04:43] nitenq: Is there a way to get the cpu % of use using ruby ? (on Mac)
[22:06:12] jhass: nitenq: just the same way as for any other program
[22:06:16] blue_deref: has joined #ruby
[22:06:38] jhass: oh, I think I misread
[22:06:38] swgillespie: has joined #ruby
[22:07:23] jhass: nvm, requires someone knowing how to get a total on OS X
[22:07:36] rbowlby_: has joined #ruby
[22:07:37] ascarter: has joined #ruby
[22:11:22] fullofcaffeine: has joined #ruby
[22:12:02] Sirupsen: has joined #ruby
[22:12:15] helpa: has joined #ruby
[22:12:23] elia: has joined #ruby
[22:12:33] benlovell: has joined #ruby
[22:13:42] Tamae: has joined #ruby
[22:14:12] tubulife-: has joined #ruby
[22:15:39] xkickflip: has joined #ruby
[22:16:51] riotjones: has joined #ruby
[22:17:14] Kedare: has joined #ruby
[22:18:27] jhass: shevy: did you steal captain obvious cape again?
[22:19:10] ruurd: has joined #ruby
[22:19:20] shevy: I have a superman cape
[22:19:52] arooni-mobile: has joined #ruby
[22:19:58] havenwood: El Capitan obvious.
[22:21:00] safeforge: has joined #ruby
[22:21:22] drbrain: I need a ruby hero cape: http://empirecapes.com
[22:23:55] Ilyas: has joined #ruby
[22:23:58] Mekkis: has joined #ruby
[22:25:13] postmodern: has joined #ruby
[22:25:16] jackjackdripper: has joined #ruby
[22:26:01] duoi: has joined #ruby
[22:26:08] bmcginty: has joined #ruby
[22:26:24] DEA7TH: has joined #ruby
[22:27:25] allomov: has joined #ruby
[22:27:26] Musashi007: has joined #ruby
[22:27:29] ruurd: has joined #ruby
[22:28:19] benlovell: has joined #ruby
[22:28:55] apeiros: drbrain: capes are bad, m'kay? https://youtu.be/M68ndaZSKa8?t=2m
[22:30:10] drbrain: velcro will love those problems for non-superhero uses
[22:30:19] Mekkis: has joined #ruby
[22:31:59] Mendenhall: has joined #ruby
[22:32:03] Drewch: has joined #ruby
[22:32:07] tno: has joined #ruby
[22:32:27] nofxx: has joined #ruby
[22:33:15] lionra: has joined #ruby
[22:34:13] elia: has joined #ruby
[22:34:19] mistermocha: has joined #ruby
[22:34:58] cored: has joined #ruby
[22:35:31] drewo: has joined #ruby
[22:38:08] pengin: has joined #ruby
[22:39:40] Mekkis: has joined #ruby
[22:40:11] yqt: has joined #ruby
[22:41:23] baweaver: has joined #ruby
[22:41:51] myztic: has joined #ruby
[22:42:10] devbug: has joined #ruby
[22:42:37] htmldrum: has joined #ruby
[22:42:56] v4n: has joined #ruby
[22:43:48] linuxboytoo: has joined #ruby
[22:44:24] hj2007: has joined #ruby
[22:45:16] hj2007: cannot understand the issue with rbenv. I'm getting "Your Ruby version is 2.0.0, but your Gemfile specified 2.1.2" while "bundle install".
[22:45:42] hj2007: "rbenv version" returns 2.1.2, even .ruby-version file has 2.1.2
[22:45:55] centrx: but your Gemfile
[22:46:26] hj2007: centrx: Gemfile has ruby "2.1.2"
[22:46:56] patrickanth0ny: has joined #ruby
[22:47:26] centrx: sorry I don't know much about rbenv
[22:47:29] hj2007: I don't understand where the system is taking ruby version 2.0.0
[22:47:42] centrx: The bundle script might be using ruby2.0
[22:48:17] hj2007: centrx: bundle script? what's that?
[22:48:51] sdothum: has joined #ruby
[22:49:53] zendrix: has joined #ruby
[22:49:57] centrx: hj2007, When you type 'bundle' that calls a script/executable, which may be using ruby2.0 instead of 2.1
[22:50:08] usershell: has joined #ruby
[22:50:33] neoseeker191: has joined #ruby
[22:51:07] hj2007: centrx: I see
[22:51:36] connor_g1odwolf: has joined #ruby
[22:52:02] connor_g1odwolf: has joined #ruby
[22:52:23] connor_g1odwolf: has joined #ruby
[22:53:55] Lucky_: has joined #ruby
[22:54:02] connor_goodwolf: has joined #ruby
[22:54:29] jonee: has joined #ruby
[22:57:00] omegamike: has joined #ruby
[22:57:35] Rhidian: has joined #ruby
[22:58:01] sharpmachine: has joined #ruby
[22:58:09] eggoez: has joined #ruby
[22:59:36] prefixed: yo. is it possible to see if one (or more) strings from an array is a component of another string?
[23:00:49] workmad3: has joined #ruby
[23:01:33] sinkensabe: has joined #ruby
[23:01:46] Guest85414______: has joined #ruby
[23:01:53] jhass: foo.any? {|a| string.include? a }
[23:01:54] centrx: prefixed, array_of_strings.any? { |s| other_string.include?(s) }
[23:01:55] zendrix: has joined #ruby
[23:02:01] centrx: dang too slow
[23:02:21] kapowaz: has joined #ruby
[23:02:21] jhass: heh, basically same second
[23:02:33] neanderslob: has joined #ruby
[23:02:50] prefixed: what does that do?
[23:03:07] jhass: prefixed: look up the used methods and tell us!
[23:03:48] veduardo: has joined #ruby
[23:03:58] rbowlby: has joined #ruby
[23:04:01] apeiros: Regexp.union(array) =~ string
[23:04:06] esantiago: has joined #ruby
[23:05:12] Rinzlit: I think I'm starting to get the hang of this ruby stuffz o-o
[23:05:21] Rhidian: I know this isn't the appropriate channel, but I already tried on on Ruby on Rails channel to no avail.
[23:05:31] veduardo: has joined #ruby
[23:05:48] esantiago: Rinzlit, did you complete your server configuration?
[23:06:11] jhass: Rhidian: you tried of you've been there for 2-4 hours
[23:06:38] Rhidian: I'm currently using the Cloud9 IDE, and I'm following http://guides.rubyonrails.org/getting_started.html guide, and whenever I try to connect to localhost:3000 I get the following error in chrome: This webpage is not available ERR_CONNECTION_REFUSED
[23:07:06] Rhidian: Eh, I have been searching for around 3 or so, I tried all the fixes I found online, but it hasn't worked :/
[23:07:44] prefixed: centrx so that method checks every string in the array against the "other_strung"
[23:07:56] centrx: prefixed, Yes
[23:08:37] craysiii: Rhidian are you typing in localhost:3000 in your actual browser?
[23:08:39] devbug: has joined #ruby
[23:08:49] prefixed: and it returns true / false?
[23:08:58] GeissT: has joined #ruby
[23:09:04] craysiii: since your IDE is online you should be accessing the running server from a url of some sort
[23:09:06] michael_mbp: has joined #ruby
[23:09:19] craysiii: localhost means the computer from which it was referenced
[23:09:28] craysiii: so that would be your computer. which the server does not live on
[23:10:09] prefixed: I'm doing this: unless ignore_list.any? { |s| path.name.include?(s) } == true then
[23:10:29] elliottcable: has joined #ruby
[23:10:54] prefixed: for file names. so, if the ignore list contains /etc, no dirs containing /etc should be listed, right?
[23:11:35] Rhidian: I see, I've also been trying it on here: https://therails-rhidian.c9.io/
[23:11:50] Rhidian: So I'm on around section 5 of the getting started guide
[23:12:03] kies^: has joined #ruby
[23:12:15] Rhidian: But, I haven't been seeing any other changes that i have made on https://therails-rhidian.c9.io/ other than "Hello Rails!"
[23:13:01] failshell: has joined #ruby
[23:13:36] craysiii: have the been frontend or backend changes?
[23:14:09] craysiii: unless you changing a view you not really going to notice anything different
[23:14:14] s00pcan: has joined #ruby
[23:14:42] NeverDie: has joined #ruby
[23:15:52] christiandsg: has joined #ruby
[23:15:54] ixti: has joined #ruby
[23:15:58] safeforge: has joined #ruby
[23:18:51] blandflakes: has joined #ruby
[23:19:36] ght: Question: If I want to remove \t (tab) entries from a string, what is the recommended solution?
[23:20:08] drbrain: remove completely? String#delete
[23:20:25] drbrain: replace with other characters? String#gsub or String#tr
[23:20:40] Rhidian: Umm its been front end mostly I think
[23:20:59] jxf: ruboto: >> "\t123\t456\tabcttt\n".delete("\t")
[23:21:05] alexclark: has joined #ruby
[23:21:16] jxf: >> "\t123\t456\tabcttt\n".delete("\t")
[23:21:17] ruboto: jxf # => "123456abcttt\n" (https://eval.in/404497)
[23:21:20] Rhidian: It's been stuff like "uncomment the # in Config/routes.rb"
[23:21:28] drbrain: thanks jxf
[23:21:36] Kyhz: has joined #ruby
[23:21:37] ght: jxf: thank you
[23:21:59] ght: and thank you drbrain.
[23:22:09] craysiii: okay so Rhidian. When you uncommented it, did you go to the route after to see if the route worked?
[23:22:27] jxf: I tend to use gsub as a general-purpose for all transformations but #delete is probably better here
[23:22:38] jhack: Is this correct? def take(where)
[23:22:38] jhack: where.push @@deck.pop
[23:22:57] jhack: I'm trying to remove the last card from an array and add it onto another array
[23:23:04] jxf: using @@ is almost never correct, so probably not
[23:23:52] jxf: jhack: I have no idea what this method is supposed to do, but whoever consumes it should probably just take the result of deck.pop and do what they like
[23:24:03] Respek: has joined #ruby
[23:24:06] Rhidian: On the guide it said to just chekc the localhost:3000, so I tried that and it worked
[23:24:11] nym: has joined #ruby
[23:24:28] Rhidian: Then I did the "Hello Rails" part, and that worked, but everything I've done after has not
[23:24:35] jxf: jhack: btw, you might like codereview.stackexchange.com
[23:24:54] bricker: jhack: that looks correct
[23:25:12] jhack: I'm getting a undefined method `pop' for nil:NilClass (NoMethodError)
[23:25:23] craysiii: i am really confused as how you got that page to load on localhost:3000 if you dont even have ruby on your computer.
[23:25:30] bricker: jhack: @@deck would only return nil if you explicitly set nil
[23:25:37] craysiii: or if you're doing it all in c9 rather.
[23:25:51] mike___1234: has joined #ruby
[23:26:00] jhack: it gives me the error when i'm not using @@
[23:26:15] bricker: jhack: also be aware that that method is very non-threadsafe
[23:26:25] Rhidian: I do have ruby on my computer
[23:26:30] bricker: jhack: what?
[23:26:36] juanpablo_: has joined #ruby
[23:26:48] Rhidian: But I'm trying out th guide online
[23:27:07] craysiii: i thought you were using cloud9
[23:27:14] Rhidian: I think there might have been some sort of conflict with my computer and cloud9
[23:27:28] ascarter: has joined #ruby
[23:27:39] Rhidian: Yesterday, when I tried it out, I was trying to configure the roots, and it kept pointing to my computer rather than Cloud9
[23:27:53] dudoom: has joined #ruby
[23:28:13] pmarreck: has joined #ruby
[23:28:16] craysiii: doesnt cloud9 run in your browser? i thought it doesn't touch your machine unless via ssh. did you do that?
[23:28:21] lannonbr: has joined #ruby
[23:28:25] alphaatom: has joined #ruby
[23:29:05] Rhidian: Yeah, hmm I don't think so
[23:29:34] drewo: has joined #ruby
[23:29:51] craysiii: okay so. any changes you make on cloud9 i assume will only be reflected through that url, https://therails-rhidian.c9.io/
[23:29:55] zendrix: has joined #ruby
[23:30:27] Rhidian: Sorry Im not being of much help, I haven't done any programming before
[23:30:35] mikecmpb_: has joined #ruby
[23:30:45] robbyoconnor: has joined #ruby
[23:31:01] Rhidian: but the thing was, when I completed some of the guide on cloud9, it affected localhost:3000 yesterday
[23:31:02] workmad3: has joined #ruby
[23:31:26] Rhidian: Then I deleted my ruby projects on my desktop because I couldn't do something about the root correctly, and now I can't connect to localhost
[23:31:46] texasmade: has joined #ruby
[23:33:11] marens: has joined #ruby
[23:33:11] marens: has joined #ruby
[23:33:13] anekos: has joined #ruby
[23:33:18] MVPhelp: has joined #ruby
[23:33:38] craysiii: if you deleted your ruby projects then there wouldn't be a rails app to start in the first place. you could have just stopped the local server. are you sure you deleted the files?
[23:33:39] lnx: has joined #ruby
[23:33:44] ashleyhindle: has joined #ruby
[23:33:46] p7r: has joined #ruby
[23:34:12] freedrull: has joined #ruby
[23:34:21] elaptics: has joined #ruby
[23:34:29] pipework: has joined #ruby
[23:34:32] htmldrum: has joined #ruby
[23:34:32] tekacs: has joined #ruby
[23:34:41] craysiii: what i meant by stopped the local server, is i think that you stopped and thats why you can't access localhost right now.
[23:34:41] phreakocious: has joined #ruby
[23:34:49] EvilJStoker: has joined #ruby
[23:34:55] Rhidian: oh that might be it
[23:35:07] pengin: has joined #ruby
[23:35:07] scottymeuk: has joined #ruby
[23:35:11] Rhidian: I moved the files to 'trash' on my computer and emptied the bin, so im assuming it all deleted
[23:35:26] hachiya: has joined #ruby
[23:35:28] craysiii: well, you should be able to create a new rails app, and start over
[23:36:13] c0ncealed: has joined #ruby
[23:36:28] craysiii: > rails new projectname
[23:37:18] dgutierrez1287: has joined #ruby
[23:37:39] krainboltgreene: has joined #ruby
[23:37:45] htmldrum: has joined #ruby
[23:37:49] crdpink2: has joined #ruby
[23:39:16] meph: has joined #ruby
[23:39:45] im0b: has joined #ruby
[23:40:33] xkef: has joined #ruby
[23:41:05] joneshf-laptop: has joined #ruby
[23:41:26] devbug: has joined #ruby
[23:41:42] mistym: has joined #ruby
[23:42:41] neersighted: has joined #ruby
[23:42:58] yizr: has joined #ruby
[23:43:00] htmldrum: has joined #ruby
[23:44:23] allcentury: has joined #ruby
[23:44:28] seansith: has left #ruby: ()
[23:44:55] shevy: how to elegantly check whether a directory is empty?
[23:45:10] CloCkWeRX: has joined #ruby
[23:45:52] nofxx: shevy, Dir['/foo'].empty? afaik
[23:45:55] centrx: shevy, ls -l |wc -l && rm -rf * && ls -l |wc -l
[23:46:18] nofxx: centrx, oh, I tought I was in #php for a while
[23:46:20] shevy: centrx is drunk again
[23:46:46] centrx: my code works
[23:46:54] shevy: nofxx ok, thought there was some dedicated method... I was looking at things like File.zero? and such
[23:47:06] Rhidian: Yeah, I can create a project, I'm not sure if I should mix up online and local again though, haha.
[23:47:56] ph8: has joined #ruby
[23:49:01] danzilio: has joined #ruby
[23:49:41] myztic: has joined #ruby
[23:49:55] nofxx: shevy, yeah, waiting too for someone with a jedi way heh... but Dir# has only #exist? in his local_methods
[23:50:11] nofxx: maybe File
[23:51:08] shevy: haha jedi way
[23:51:19] shevy: nah it's ok, I settled for Dir now
[23:51:32] shevy: I love .start_with?
[23:51:41] shevy: anyone happens to know without googling when it was added?
[23:51:52] bronson: has joined #ruby
[23:52:51] shevy: centrx is totally broken today :(
[23:53:00] shevy: can somebody fix him?
[23:53:15] centrx: Will code for spare parts
[23:54:33] Scripore: has joined #ruby
[23:55:23] baweaver: has joined #ruby
[23:55:54] WildBamboo-Josh: has joined #ruby
[23:55:59] chipotle: has joined #ruby
[23:57:07] Ox0dea: shevy: grep -R start_with? ruby/doc
[23:57:27] Ox0dea: It was renamed from #startwith? on Sep. 27, 2006.
[23:57:28] shevy: I don't even know where my doc dir is
[23:57:43] Ox0dea: You don't have a local clone of ruby/ruby?
[23:57:44] craysiii: has left #ruby: ()
[23:58:11] zenspider: % ri22 String | grep start
[23:58:12] zenspider: start_with?
[23:58:40] zenspider: oh. you're grepping the doc dir. it doesn't have shit in it
[23:58:42] shevy: whoa... 2006
[23:58:54] Ox0dea: zenspider: It's got changelogs?
[23:59:03] shevy: almost 10 years... did I really miss 10 years? hmmmmmm
[23:59:12] zenspider: it's got the old changelogs
[23:59:28] omegamike: has joined #ruby
[23:59:33] Ox0dea: Which is where I'd expect #start_with?'s addition to the language to be.