« Back to channel list

#ruby - 10 September 2015

« Back 1 day Forward 1 day »
[00:00:32] swgillespie: has joined #ruby
[00:01:29] juanpablo_: has joined #ruby
[00:01:57] quazimodo: has joined #ruby
[00:06:02] bigredboots: has joined #ruby
[00:07:04] s00pcan: has joined #ruby
[00:11:17] workmad3: has joined #ruby
[00:11:58] Ketchy: has joined #ruby
[00:12:10] ferz_: has joined #ruby
[00:13:03] CloCkWeRX: has joined #ruby
[00:14:18] patrick_star: has joined #ruby
[00:14:33] shock_one: has joined #ruby
[00:15:27] ekain: has joined #ruby
[00:15:39] Rubie: has joined #ruby
[00:16:07] uber: has joined #ruby
[00:16:24] bubbys: has joined #ruby
[00:17:37] lea: has joined #ruby
[00:18:25] choke: has joined #ruby
[00:21:03] chills42: has joined #ruby
[00:21:26] meatherly: has joined #ruby
[00:21:52] axisys: has joined #ruby
[00:23:02] jeffreylevesque: has joined #ruby
[00:23:05] blueOxigen: has joined #ruby
[00:23:08] jeffreylevesque: do i commit `.travis.yml` for travis continuous integration?
[00:23:30] shortdudey123: jeffreylevesque: yes, and turn on the repo on the travis side
[00:23:59] jeffreylevesque: why is the file prefixed with a period, not to be ignored/
[00:24:25] shortdudey123: most repo config files are that way
[00:24:45] shortdudey123: CircleCI is the only one i know of that doesn't prefix a period
[00:25:24] shortdudey123: rubocop, test kitchen, and rspec all prefix a period on their config files
[00:25:41] iateadonut: has joined #ruby
[00:26:01] jeffreylevesque: shortdudey123: is circle better than travis?
[00:26:13] jeffreylevesque: i heard someone in #python say travis is the new thing
[00:26:28] jeffreylevesque: *circle is the new thng
[00:27:08] roxtrongo: has joined #ruby
[00:27:30] Oog: has joined #ruby
[00:27:52] shortdudey123: personally i like travis more
[00:28:40] Igorshp: has joined #ruby
[00:29:05] jeffreylevesque: travis is made in ruby right?
[00:30:38] shortdudey123: the frontend is erlang, not sure about everything else (https://github.com/ninenines/cowboy)
[00:30:40] rodfersou: has joined #ruby
[00:31:14] ellisTAA: has joined #ruby
[00:31:45] BraddPitt: Are `scopes` a rails-specific thing?
[00:32:07] shortdudey123: jeffreylevesque: skimming over this kinda of explains it https://strongloop.com/strongblog/node-js-travis-circle-codeship-compare/
[00:32:15] devoldmx: has joined #ruby
[00:32:17] BraddPitt: ah yeah, looks like it comes from AR
[00:32:22] Radar: BraddPitt: Yeah, it's an AR thing
[00:34:02] NeverDie: has joined #ruby
[00:35:24] shmilan: has joined #ruby
[00:35:27] Azure: has joined #ruby
[00:37:59] al2o3-cr1: has joined #ruby
[00:38:22] Oog: has joined #ruby
[00:38:42] Valeness: has left #ruby: ("Leaving")
[00:38:55] lucyinthesky_: has joined #ruby
[00:39:48] wldcordeiro: has joined #ruby
[00:43:09] nofxx: jeffreylevesque, using and enjoying gitlab CI
[00:43:11] tejasmanohar: has joined #ruby
[00:43:33] nofxx: they are planning to merge it in next gitlab version
[00:43:44] jeffreylevesque: when will that be?
[00:44:02] nofxx: BraddPitt, no, it's activemodel if least
[00:44:19] nofxx: but anyways, it's just a class method
[00:44:21] tkuchiki: has joined #ruby
[00:44:55] nofxx: jeffreylevesque, need to check the issue... search for CI merge
[00:45:55] s00pcan: has joined #ruby
[00:46:10] lucyinthesky: has joined #ruby
[00:49:26] davedev24: has joined #ruby
[00:49:36] lucyinthesky: has left #ruby: ("Mensagem")
[00:50:02] Ropeney: has joined #ruby
[00:50:32] baweaver: has joined #ruby
[00:50:33] Azure: has joined #ruby
[00:50:55] keen__________16: has joined #ruby
[00:52:55] grenierm: has joined #ruby
[00:53:33] enebo: has joined #ruby
[00:55:26] Oog_: has joined #ruby
[00:55:55] s00pcan: has joined #ruby
[00:57:12] minimalism: has joined #ruby
[00:57:33] krz: has joined #ruby
[00:58:18] sp4rrow: has joined #ruby
[00:59:58] morenoh149: has joined #ruby
[01:00:01] Yzguy: has joined #ruby
[01:01:08] Rollabunna: has joined #ruby
[01:01:43] juanpablo_: has joined #ruby
[01:03:58] UtkarshRay: has joined #ruby
[01:05:04] shazaum_: has joined #ruby
[01:05:13] zenguy_pc: has joined #ruby
[01:06:28] gguggi: has joined #ruby
[01:06:31] djbkd: has joined #ruby
[01:07:30] zenguy_pc: has joined #ruby
[01:09:19] hekin: has joined #ruby
[01:10:31] freerobby: has joined #ruby
[01:11:27] levifig: has joined #ruby
[01:11:41] s00pcan: has joined #ruby
[01:12:26] saddad: has joined #ruby
[01:14:04] bmurt: has joined #ruby
[01:14:25] howdoicomputer: has joined #ruby
[01:15:51] mary5030: has joined #ruby
[01:17:10] JulioPapel: has joined #ruby
[01:18:20] banjara: has joined #ruby
[01:19:06] blue_deref: has joined #ruby
[01:19:16] s00pcan: has joined #ruby
[01:22:40] dgutierrez1287: has joined #ruby
[01:24:23] NeverDie: has joined #ruby
[01:24:52] rickmasta: has joined #ruby
[01:27:11] mary5030: has joined #ruby
[01:27:37] JohnnyTao: has joined #ruby
[01:31:28] toretore: has joined #ruby
[01:31:42] meatherly: has joined #ruby
[01:31:49] s00pcan: has joined #ruby
[01:33:01] devoldmx: has joined #ruby
[01:34:46] ekleog: has joined #ruby
[01:35:11] s00pcan: has joined #ruby
[01:38:34] nofxx: Hm.. quicker way to remove last char from string AND get that char?
[01:39:47] mary5030: has joined #ruby
[01:40:34] blackjid: has joined #ruby
[01:41:45] davedev24: has joined #ruby
[01:43:48] s00pcan: has joined #ruby
[01:43:53] rakm: has joined #ruby
[01:46:08] mmoo2: has joined #ruby
[01:46:34] shmilan: nofxx: String#split("").pop
[01:46:40] shmilan: is that what you want?
[01:47:01] yashinbasement: has joined #ruby
[01:48:38] Scripore: has joined #ruby
[01:49:09] toastytheog: has joined #ruby
[01:49:34] [k-: has joined #ruby
[01:49:50] al2o3-cr: nofxx: why quicker way?
[01:50:57] dorei: >> z = 'abcd' ; z.slice!(-1)
[01:50:58] ruboto: dorei # => "d" (https://eval.in/430814)
[01:51:24] dorei: nofxx: this will work, if you want to mutate the string
[01:51:26] meatherly: has joined #ruby
[01:51:43] toastytheog: anyone feel like looking at my rake task and tell me i'm dumb?
[01:51:44] toastytheog: http://pastebin.com/n9EcDP3A
[01:51:45] ruboto: toastytheog, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/c260b94a464dc092ee36
[01:51:45] ruboto: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[01:51:55] toastytheog: thank you ruboto
[01:52:11] al2o3-cr: "monkey business".chars.pop # does the business
[01:52:26] toastytheog: i will post to gists from now on
[01:52:50] al2o3-cr: as shmilan said
[01:54:43] tkuchiki: has joined #ruby
[01:54:52] BiHi: has joined #ruby
[01:55:05] al2o3-cr: ?code nofxx
[01:55:05] ruboto: nofxx, We can't help you without your code, please post it to https://gist.github.com
[01:55:27] mesamoo: has joined #ruby
[01:55:33] rickmasta: has joined #ruby
[01:55:38] toastytheog: https://gist.github.com/toastytheog/2f4b366886cda168e55a
[01:56:01] al2o3-cr: Because I'm uncertain what your true intention are
[01:56:30] toastytheog: i'm trying to figure out how to find the best number of records per batch, currently set to 100, there are ~239k records
[01:58:45] toastytheog_: has joined #ruby
[01:59:51] workmad3: has joined #ruby
[02:00:17] parkit: has joined #ruby
[02:00:21] parkit: hi everyone i read a lot of css books and watched a lot of videos
[02:00:34] parkit: however i don't know what to do when i'm trying to do something on my own
[02:00:36] parkit: is this normal?
[02:01:38] al2o3-cr: parkit: What this got to do with Ruby?
[02:01:46] parkit: i said *ruby
[02:01:53] parkit: freudan slip
[02:03:15] toastytheog_: parkit: until you start using it regularly, looking up methods is normal. if that's what you mean
[02:04:30] al2o3-cr: Anyway, way to late for me to answer any humble questions. C y'all around like a walnut.
[02:05:03] mrodrigues: has joined #ruby
[02:05:25] grenierm: has joined #ruby
[02:06:34] opensource_ninja: has joined #ruby
[02:06:52] j416_: has joined #ruby
[02:07:17] mrodrigues: I'm looking for wider input on a claim Metz makes in POODR. She argues taht you should "always wrap ivars in methods instead of directly referring to the variables." This seems overkill to me.
[02:10:22] shmilan: In general, she mentions in the introduction that her way is not always THE way that everyone chooses to go. With that said, if you disagree with something she says then you are free to use a solution you find more suitable.
[02:12:23] meatherly: has joined #ruby
[02:12:24] pontiki: has joined #ruby
[02:13:01] mrodrigues: shmilan: I was really just curious to see what other people thought. I guess I could just comb through github and see what projects tend to do.
[02:13:28] Coraline: I use attr_reader and @ if I'm only setting it in one place, e.g. an initializer
[02:14:26] shmilan: I cannot comment on the wider implications, mrodrigues. Others may chime in with better comments.
[02:15:17] mrodrigues: Thanks Coraline, shmilan.
[02:17:07] Coraline: Feathers (I think) on the other hand says that every attr is an interface that you have to maintain. That's why I only use them for setting values. I don't care who reads them.
[02:18:01] Coraline: Oh the other way I use them is for caching
[02:18:08] Coraline: def foo; @foo ||= "Bar"; end
[02:18:42] pontiki: i do that to have nice barewords in a class; but i make the accessor private as well
[02:19:14] shazaum_: has joined #ruby
[02:19:31] havenwood: has joined #ruby
[02:19:55] Coraline: I like to be able to look at a class and see its attrs, so I don't like @vars scattered throughout. Feels messy.
[02:20:20] Motoservo: has joined #ruby
[02:20:58] Rubie: has joined #ruby
[02:21:29] shazaum_: has joined #ruby
[02:21:42] pontiki: where do you put the memoizing methods?
[02:23:00] wldcordeiro: has joined #ruby
[02:23:25] Coraline: No particular place.
[02:24:07] Coraline: Unless I have a good reason to group things, I tend to...
[02:24:13] Coraline: ...alphabetize my methods.
[02:24:30] meatherly: has joined #ruby
[02:25:04] pontiki: you make them all public?
[02:25:19] Coraline: No, I alphabetize under public and under private
[02:25:42] Igorshp: has joined #ruby
[02:25:51] Coraline: Memoizing methods are generally private.
[02:25:59] Coraline: Most methods are private
[02:26:53] Coraline: After I'm done with exploratory testing I'm good about making a discrete interface to the class.
[02:27:47] zenguy_pc2: has joined #ruby
[02:29:49] meatherly: has joined #ruby
[02:31:58] mrodrigues: Coraline: Thanks for all the input. I was worried about cluttering my objects with attrs but I guess they can be private. I sort of liked being able to pick out ivars in the code but I'll see if I find attrs more readable.
[02:32:57] toretore: has joined #ruby
[02:33:10] Coraline: Happy to share.
[02:33:42] mrodrigues: Coraline: Are there any ruby projects that you think exemplify well written Ruby? ie. Prawn is commonly referenced as a well written project.
[02:33:48] devoldmx: has joined #ruby
[02:34:06] Coraline: Hmm, I haven't done code reading in a while.
[02:35:15] mrodrigues: Sorry to put you on the spot. I guess I could have just floated that question out in general.
[02:36:43] roxtrongo: has joined #ruby
[02:36:45] Rubie: has joined #ruby
[02:38:37] morenoh149: has joined #ruby
[02:39:12] ivanskie: has joined #ruby
[02:39:30] arup_r: has joined #ruby
[02:43:36] bb010g: has joined #ruby
[02:45:58] krz: has joined #ruby
[02:47:08] zenguy_pc: has joined #ruby
[02:47:16] gambl0re: has joined #ruby
[02:50:49] juanpablo_: has joined #ruby
[02:53:06] havenwood: has joined #ruby
[02:59:06] gizmore: has joined #ruby
[02:59:54] ohaibbq: has joined #ruby
[03:00:26] mary5030: has joined #ruby
[03:00:35] casadei_: has joined #ruby
[03:00:48] gener1c_: has joined #ruby
[03:01:10] arooni: has joined #ruby
[03:02:01] Rollabunna: has joined #ruby
[03:02:02] JamesDH: has joined #ruby
[03:02:08] baweaver: has joined #ruby
[03:04:05] Trynemjoel: has joined #ruby
[03:04:32] darkf: has joined #ruby
[03:05:22] roxtrongo: has joined #ruby
[03:05:37] arescorpio: has joined #ruby
[03:14:56] braincrash: has joined #ruby
[03:16:00] banjara: has joined #ruby
[03:17:26] RudestBuddhist: has joined #ruby
[03:17:56] j4cknewt: has joined #ruby
[03:17:57] casadei_: has joined #ruby
[03:18:37] RudestBuddhist: Hey everyone, getting into JSON manipulation for the first time tonight and I???m a bit lost on how I can manipulate / compare different things in the array. Can anyone point me in the direction of a good tutorial for JSON manipulation?
[03:18:59] RudestBuddhist: I???m working with a big file and bit confused on the best way to read it in as well
[03:19:25] RudestBuddhist: OJ looks like it might be the way to go?
[03:19:44] baweaver: Define large
[03:20:04] mrodrigues: RudestBuddhist: is the 'json' gem not doing it for you?
[03:20:07] baweaver: and comparing json is just like comparing anything else.
[03:20:23] baweaver: require 'json'; JSON.parse(info)
[03:20:30] RudestBuddhist: baweaver: yeah, actually now that I think about it I can just use a few different sorts to get what I want
[03:20:50] RudestBuddhist: mrodrigues: it works, but it seems a bit slow, maybe 4 minutes to parse a 90 meg file
[03:21:10] baweaver: OJ will be faster, but at that rate Ruby might not be the best idea
[03:21:19] RudestBuddhist: I???m realizing I might have been overthinking this a bit now that I???ve asked my question :)
[03:21:26] baweaver: How large do you anticipate it getting?
[03:21:28] Pharaoh2: has joined #ruby
[03:21:30] Swappticon: has joined #ruby
[03:21:40] baweaver: and how fast do you need results?
[03:21:51] RudestBuddhist: well the faster the better
[03:21:58] baweaver: realistically what's required
[03:22:11] karapetyan: has joined #ruby
[03:22:19] quazimodo: has joined #ruby
[03:22:29] baweaver: Ruby _could_ do it, but I would consider looking into Scala or Clojure instead.
[03:22:29] RudestBuddhist: I???m not really sure what expectations I can set as I???m a Jr. Dev doing this for the first time
[03:22:49] RudestBuddhist: am I looking at ~15 - 20min?
[03:23:00] mrodrigues: RudestBuddhist: what kind of data is it? Is it a big db in json? Is it a captured stream of JSON objects?
[03:23:05] baweaver: probably around 10, but who knows.
[03:23:13] RudestBuddhist: mrodrigues: just a captured stream of json objects
[03:23:33] baweaver: when you say stream, what do you mean
[03:23:35] baweaver: and where from?
[03:24:09] baweaver: Do you anticipate using something like Logstash or Kafka for streaming data?
[03:24:18] baweaver: (message systems basically)
[03:24:35] RudestBuddhist: nah, I???d like to keep the gems as minimum as possible
[03:24:46] baweaver: those aren't gems, so I'll assume no
[03:25:02] baweaver: will, in the future, you have an actual stream of data?
[03:25:23] RudestBuddhist: no it will always be local
[03:25:24] baweaver: or sequential JSON dumps
[03:25:34] baweaver: what's generating that much data?
[03:25:44] RudestBuddhist: it???s a log of another program
[03:25:58] RudestBuddhist: essentially a reference ID, an IP, and some timestamps
[03:26:02] justin_pdx: has joined #ruby
[03:26:09] baweaver: https://www.elastic.co/products/logstash
[03:26:13] RudestBuddhist: I would like to know the averages, fastest slowest, etc. of the timestamps
[03:26:17] baweaver: http://kafka.apache.org/
[03:26:33] mrodrigues: https://github.com/dgraham/json-stream has an example of how to treat the file as an IO object and stream to the parser
[03:26:34] baweaver: you're going to want to use one of those to aggregate logs
[03:26:59] baweaver: If you can get the data to one of those sources, you can stream it into something like Spark
[03:27:22] baweaver: https://spark.apache.org/
[03:27:39] baweaver: which is built to handle that much data, often times well into the petabyte levels
[03:28:01] freerobby: has joined #ruby
[03:28:14] baweaver: but over 100M will give Ruby some serious problems at scale
[03:28:40] Shidash: has joined #ruby
[03:29:12] kikelivestone: has joined #ruby
[03:29:16] RudestBuddhist: this is probably a dumb question, but compression, like gunzipping wouldn???t help at all correct? Ruby is going to need to uncompress the file and read the JSON anyway.
[03:29:19] kikelivestone: what music do you listen to while programming?
[03:29:35] kikelivestone: is there anything better than http://trance.fm?
[03:29:38] kikelivestone: is there anything better than http://trance.fm
[03:30:12] linc01n: has joined #ruby
[03:30:33] baweaver: kikelivestone: you are aware kike is a racial slur
[03:30:45] kikelivestone: are you aware that it's my nickname and that it's not a racial slur
[03:30:46] universa1: has joined #ruby
[03:30:48] sfr^: has joined #ruby
[03:30:54] kikelivestone: kike is short for enrique
[03:31:34] yfeldblum: has joined #ruby
[03:31:39] shevy: it's our old webchat friend
[03:31:42] ebbflowgo: has joined #ruby
[03:31:43] krz: has joined #ruby
[03:31:44] havenwood: !mute kikelivestone
[03:31:45] ruboto: +q kikelivestone!*@*
[03:31:45] ruboto: -o ruboto
[03:32:22] stardiviner: has joined #ruby
[03:33:26] shevy: omg larry wall is on perl 6
[03:33:56] shevy: hmm in early october... will ruby stand the tide of competition
[03:34:11] s00pcan: has joined #ruby
[03:34:43] shevy: that perl6 logo looks as if it was drawn while under influences from fungi
[03:35:23] sevenseacat: has joined #ruby
[03:37:57] ebbflowgo: I'm trying to install pg_jruby, it will stay installed but does not show up in my gem env installation directory or gem path
[03:38:41] ebbflowgo: if i install it locally, it will save down to my installation directory, however, i cannot simply require 'pg' i must require the file with the absolute path
[03:42:04] auzty: has joined #ruby
[03:42:36] HAL2328: has joined #ruby
[03:42:50] leafybasil: has joined #ruby
[03:42:57] ricer2: has joined #ruby
[03:43:14] kikelivestone: has left #ruby: ()
[03:43:54] sharkman: has joined #ruby
[03:44:01] sharkman: i program in ruby
[03:44:02] michaeldeol: has joined #ruby
[03:44:24] sharkman: is this channel active
[03:44:28] havenwood: sharkman: yup
[03:45:05] sharkman: does anyone else here use ruby
[03:45:44] bigredboots: has joined #ruby
[03:45:54] nofxx: sharkman, most ppl here use php, other python. Sometimes we talk about ruby.
[03:46:28] havenwood: sharkman: Most folk here use Ruby. That's why they're here.
[03:46:32] sharkman: craysi you are in a ruby channel shouldnt u know what it is
[03:46:37] sharkman: yeah thats what i thought havenwood
[03:47:42] Oog: has joined #ruby
[03:47:53] craysiii: i don't know how i got here but they wont let me leave.
[03:48:14] Oog: has joined #ruby
[03:48:24] sharkman: craysii is trapped
[03:48:29] sharkman: def help; abort; end
[03:48:29] RudestBuddhist: baweaver mrodrigues: Thanks for the help guys. I think I???ve got an idea how I can make this work.
[03:48:30] ebbflowgo: what does this mean? # Please note that the 1.0 is necessary to let bundler do its dependency management, as there is no .gemspec in the source. From : https://github.com/headius/jruby-pg
[03:48:36] ebbflowgo: where is the 1.0 being used?
[03:48:44] workmad3: has joined #ruby
[03:49:28] chouhoulis: has joined #ruby
[03:49:41] dgutierrez1287: has joined #ruby
[03:49:42] gix: has joined #ruby
[03:50:36] roxtrongo: has joined #ruby
[03:54:47] bigredboots: has joined #ruby
[03:55:18] sharkman: def ruby_program; p 'hello irc'; end
[03:56:15] craysiii: you never called it :)
[03:56:31] sharkman: its ready when we need it
[03:56:51] ebbflowgo: nvm.. holy i had a file named pg
[04:00:32] shevy: awww I am getting good slogans from the www today ... "404 pages are the cold-hearted digital tombstones of a dying web"
[04:02:54] Igorshp_: has joined #ruby
[04:07:25] deg-: has joined #ruby
[04:07:28] Klumben: has joined #ruby
[04:08:45] CHVNX: has joined #ruby
[04:09:55] michael_mbp: has joined #ruby
[04:11:51] ruby-lang756: has joined #ruby
[04:11:55] bruno-: has joined #ruby
[04:13:51] rakm: has joined #ruby
[04:14:56] braincra-: has joined #ruby
[04:15:17] devoldmx: has joined #ruby
[04:15:40] radgeRayden: has joined #ruby
[04:16:07] alem0lars: has joined #ruby
[04:16:29] freezevee: has joined #ruby
[04:19:29] haraoka: has joined #ruby
[04:19:38] j4cknewt: has joined #ruby
[04:22:14] bronson: has joined #ruby
[04:28:04] sharkman: why is there no one on here?
[04:28:11] sharkman: is everyone in the python channel?
[04:28:27] johnhamelink: has joined #ruby
[04:28:38] sevenseacat: theres 1013 people here
[04:28:57] mrodrigues: baweaver: Not really sure what happened.
[04:29:01] baweaver: just most of us don't spend all waking hours actually watching IRC
[04:29:08] baweaver: mrodrigues: who knows.
[04:29:19] baweaver: I've been known to type TMUX commands into slack on occasion.
[04:29:21] Radar: sharkman: good point that nobody is here
[04:29:26] Radar: look at all the discussion which is not happening
[04:29:43] sharkman: no one is talking about coding sweet ruby
[04:29:57] Radar: sharkman: because we're all too busy coding sweet ruby
[04:30:11] i: has joined #ruby
[04:30:20] i: has left #ruby: ()
[04:30:25] Radar: sharkman: It's been a while http://logs.ryanbigg.com/p/sharkman
[04:30:37] dopie: has joined #ruby
[04:31:10] mrodrigues: sharkman: What about Ruby do you want to discuss?
[04:31:16] craysiii: i thought ruby wasn't supposed to be logged?
[04:31:25] Radar: craysiii: It's mentioned in the topic that it's logged.
[04:31:53] Radar: Here's everything you've ever said in #ruby or #rubyonrails http://logs.ryanbigg.com/p/craysiii
[04:32:03] craysiii: yeah im reading now lol.
[04:33:01] TDJACR: has joined #ruby
[04:34:09] mrodrigues: I've seen plenty of users with ZNC messages, they're all likely logging too.
[04:34:36] MVPhelp: has joined #ruby
[04:34:38] Radar: I thought you had to setup ZNC to log?
[04:34:38] craysiii: i wasn't worried, just curious
[04:34:57] quazimodo: has joined #ruby
[04:35:01] sevenseacat: treat IRC like a public forum. anything you say can and will be used against you. >:)
[04:35:43] havenwood: has joined #ruby
[04:36:05] nofxx: and github like activity
[04:37:44] Radar: GH is where I stole the code for that activity graph from
[04:38:08] khebbie: has joined #ruby
[04:38:17] Aeyrix: on the website == open source right?
[04:38:33] Radar: definitely open source
[04:39:22] dopiee: has joined #ruby
[04:39:34] juanpablo_: has joined #ruby
[04:40:51] tejasmanohar_: has joined #ruby
[04:43:48] ledestin: has joined #ruby
[04:45:07] j4cknewt_: has joined #ruby
[04:45:34] wldcordeiro: has joined #ruby
[04:46:03] leat3: has joined #ruby
[04:47:13] naftilos76: has joined #ruby
[04:47:24] lemur: has joined #ruby
[04:48:52] moted: has joined #ruby
[04:49:43] Chau_: has joined #ruby
[04:49:57] kp666: has joined #ruby
[04:50:39] Oog: has joined #ruby
[04:51:10] Soda: has joined #ruby
[04:54:40] psye: has joined #ruby
[04:56:47] freerobby: has joined #ruby
[04:57:35] UtkarshRay: has joined #ruby
[04:57:36] wldcordeiro: has joined #ruby
[04:58:41] krz: has joined #ruby
[04:59:55] CHVNX: has joined #ruby
[05:00:08] agent_white: has joined #ruby
[05:02:33] jenrzzz: has joined #ruby
[05:02:54] Rollabunna: has joined #ruby
[05:04:53] tejasmanohar: has joined #ruby
[05:09:25] Oog: has joined #ruby
[05:11:01] Pharaoh2: has joined #ruby
[05:12:15] SirFunk: has joined #ruby
[05:14:49] riotjones: has joined #ruby
[05:15:22] j4cknewt: has joined #ruby
[05:15:52] ruurd: has joined #ruby
[05:21:08] lorn: has joined #ruby
[05:22:57] ranchodev: has joined #ruby
[05:23:17] brixen: has joined #ruby
[05:23:54] ngscheurich: has joined #ruby
[05:24:41] dhjondoh: has joined #ruby
[05:24:53] karapetyan: has joined #ruby
[05:25:04] karapetyan: has joined #ruby
[05:25:56] opensource_ninja: has joined #ruby
[05:28:35] CloCkWeRX: has joined #ruby
[05:28:48] xcesariox: has joined #ruby
[05:29:49] g3funk: has joined #ruby
[05:30:26] ramfjord: has joined #ruby
[05:31:56] shock_one: has joined #ruby
[05:32:14] khebbie: has joined #ruby
[05:32:54] j4cknewt_: has joined #ruby
[05:33:52] TomyLobo: has joined #ruby
[05:37:28] workmad3: has joined #ruby
[05:38:02] Maletor: has joined #ruby
[05:38:13] shevy: it's atmosx, from the ashes of dust!
[05:40:21] zlogan85: has joined #ruby
[05:41:01] atmosx: shevy: kinda
[05:41:03] atmosx: shevy: how's life?
[05:41:08] atmosx: shevy: I'm writing my thesis
[05:41:27] C1V0: has joined #ruby
[05:42:33] shevy: dunno, I am mostly trying to polish up the things I have in ruby and reading up on boring C tutorials
[05:42:42] atmosx: C tutorials
[05:42:42] CloCkWeRX: has left #ruby: ()
[05:42:42] tagrudev: has joined #ruby
[05:42:54] atmosx: why not get the C bible, it's cheap and makes a great impression in your library.
[05:43:08] pontiki: get the original: K&R
[05:43:18] shevy: yeah I have that
[05:43:22] atmosx: http://www.iups.org/media/meeting_minutes/C.pdf
[05:43:24] shevy: the problem is reading it!
[05:43:24] atmosx: everyone does
[05:43:37] atmosx: actually, I don't think it will be that hard for you at this point
[05:43:41] pontiki: it is the best. the only thing you'd ever need
[05:44:03] codenapper: has joined #ruby
[05:44:13] atmosx: pontiki: it's not good for novice programmers, takes too many things for granted. Actually let's say that you need to 'study it' more than the average "learn to program book".
[05:44:53] pontiki: it is not a "learn to program book"
[05:45:10] pontiki: it is a "learn the C programming language" book
[05:45:17] rippa: has joined #ruby
[05:46:08] claw: has joined #ruby
[05:47:02] shevy: ruby spoiled me immensely
[05:47:41] flughafen: has joined #ruby
[05:48:21] towski_: has joined #ruby
[05:48:31] luksaur: has joined #ruby
[05:49:12] nhhagen: has joined #ruby
[05:49:58] karapetyan: has joined #ruby
[05:51:17] j4cknewt: has joined #ruby
[05:51:18] khebbie: has joined #ruby
[05:54:52] yardenbar: has joined #ruby
[05:56:47] atmosx: pontiki: actually, IMHO it's a better "learn to program book" exactly becuase it's a "learn the C programming way" (procedural that is).
[05:57:06] atmosx: pontiki: makes you write your own loops, define types and so on.
[05:57:22] karapetyan: has joined #ruby
[05:58:07] dhjondoh: has joined #ruby
[06:00:08] arup_r: has joined #ruby
[06:01:27] shevy: like assembler!
[06:02:23] kalzz: has joined #ruby
[06:03:01] Macaveli: has joined #ruby
[06:03:13] wldcordeiro: has joined #ruby
[06:03:53] kalz: has joined #ruby
[06:05:07] Gnomethrower: has joined #ruby
[06:06:13] Gnomethrower: has joined #ruby
[06:07:38] wldcordeiro: has joined #ruby
[06:10:03] jenrzzz: has joined #ruby
[06:12:05] arup_r: has joined #ruby
[06:12:19] allomov: has joined #ruby
[06:12:38] emarlan: has joined #ruby
[06:12:40] emarlan: i've been trying to learn programming for years now what am i doing wrong?
[06:13:10] sevenseacat: uh... what makes you think you're doing something wrong?
[06:13:41] leafybasil: has joined #ruby
[06:14:14] emarlan: because i can't code a webpage properly
[06:14:29] emarlan: i can't style a page that i made in html
[06:15:15] sevenseacat: ok, so you need to practice your css
[06:15:25] emarlan: where and how
[06:15:26] weemsledeux: has joined #ruby
[06:15:31] emarlan: i really want to learn so badly
[06:15:45] emarlan: i've spent thousands of dollars trying to learn
[06:16:55] sevenseacat: by trying different things, asking for help if you get stuck, reading online resources
[06:17:05] emarlan: that doesn't work for me
[06:17:07] claw: has joined #ruby
[06:17:20] emarlan: are there any lab type things where i can push myself
[06:17:20] weemsledeux: has joined #ruby
[06:17:32] sevenseacat: well without knowing exactly what trouble you're having, can only offer very general advice
[06:17:51] leat3: has joined #ruby
[06:18:24] emarlan: i watched and read a lot of material
[06:18:25] pawnbox: has joined #ruby
[06:18:33] emarlan: i try to do something and it's like i can't do it
[06:18:53] emarlan: it's like i'm on the spot and blank out
[06:19:13] Janno: when you watch tutorials, do you try doing it yourself or just watch?
[06:19:22] emarlan: i'm just watching them
[06:19:52] Janno: I have same problem, if I only watch and try doing things after that, it wont work. I have to follow along to learn.
[06:20:04] emarlan: i'm going to try that
[06:20:17] j4cknewt: has joined #ruby
[06:20:36] sevenseacat: a little bemused that the thought of actually following a tutorial didn't occur to you, but good to know you now have something to go on :)
[06:20:59] M-mistake: Notice https://en.wikipedia.org/wiki/Parallel_processing has alternate parts: 1 Parallel processing by the brain. 2 Parallel processing in computers. (:)
[06:21:17] duncannz: has joined #ruby
[06:22:07] emarlan: sevenseacat: i've never done homework and excelled on tests
[06:22:14] emarlan: i guess it might have something to do with it
[06:22:14] prosody: emarlan: Maybe you need someone to talk to about your code.
[06:22:27] emarlan: prosody: i feel like i need some guidance
[06:22:39] emarlan: like a mentor
[06:22:44] Rubie: has joined #ruby
[06:22:47] Oog: has joined #ruby
[06:22:52] prosody: emarlan: Teachers need teachers.
[06:22:53] emarlan: but now i'm broke :(
[06:23:37] tvw: has joined #ruby
[06:23:48] shevy: M-mistake if only you could build computer hardware similar to the human brain
[06:23:53] jenrzzz: has joined #ruby
[06:24:20] Oog_: has joined #ruby
[06:24:24] jmarrec: has joined #ruby
[06:24:29] eGGsha: has joined #ruby
[06:25:00] dhjondoh: has joined #ruby
[06:25:37] emarlan: shevy: it would be nice if i could understand how my brain works
[06:26:08] emarlan: M-mistake: is there a place where you can learn how your brain works and what study methods are good for you?
[06:26:50] dionysus69: has joined #ruby
[06:26:50] astrobunny: has joined #ruby
[06:27:42] dseitz: has joined #ruby
[06:27:48] acke: has joined #ruby
[06:28:05] leat3: has joined #ruby
[06:29:01] grenierm: has joined #ruby
[06:29:01] juanpablo_: has joined #ruby
[06:29:06] prosody: emarlan: id love to work with you, but I need a stabler social network like https://matrix.org/beta/#/room/#ruby:matrix.org (to audit log you need a persistent, decentralized, distributed, secure log = persistent, decentralized, distributed, secure education... and the action of audit is free banking.)
[06:29:17] prosody: shevy: I'm @mistake. I feel 0 and 1 are very human terms. We just added artificial intelligence on top of that emotional intel core. :???
[06:29:32] cgfbee: has joined #ruby
[06:29:41] sevenseacat: prosody: are you a bot...?
[06:30:05] prosody: sevenseacat: No, I just have an IRC account, and a matrix.org bridge account.
[06:30:44] prosody: sevenseacat: Read the logs from matrix.org, then just switched to IRCCloud cause it's used here.
[06:30:54] sevenseacat: ACTION has no idea whats going on
[06:31:34] prosody: sevenseacat: Someone was talking about learning/using/trouble programming.
[06:31:45] sevenseacat: I know that, but I have no idea what youre talking about
[06:32:12] prosody: sevenseacat: Live chat programming help, but with freer-form mayhaps?
[06:32:24] emarlan: matrix seems like an irc server where you have to register to sign up?
[06:32:35] prosody: They were talking about encountering blocks in writing their code, so I just had my two cents.
[06:32:42] TvL2386: has joined #ruby
[06:32:59] prosody: emarlan: Sorta. I do not want to clog by explaining.
[06:33:40] shevy: what happened to the good old days of using classic IRC clients
[06:33:41] acke: has joined #ruby
[06:35:20] MVPhelp: has joined #ruby
[06:35:43] [k-: what happened to using Unicode, shevy?
[06:35:48] jenrzzz: has joined #ruby
[06:36:02] shevy: why would I need that
[06:36:36] emarlan: prosody: are you in the channel?
[06:36:40] prosody: shevy: Theoretically Matrix procol's IRC refit wants to do away with the centralization and maybe let your IRC client be a part of the messaging network as a federated homeserver-client.
[06:36:57] prosody: emarlan: Yes.
[06:37:09] emarlan: okay i'm going to quit this chat
[06:37:14] emarlan: thank you :)
[06:37:58] shevy: yeah, there is quite a bit of movement of "IRC is old-school, let's change it"
[06:38:15] sevenseacat: we'll still be here after those movements are finished.
[06:38:19] shevy: like on http://rubini.us/blog/
[06:38:58] shevy: cats idle to power
[06:39:37] andikr: has joined #ruby
[06:40:00] Oog: has joined #ruby
[06:40:53] baweaver: what just happened?
[06:40:58] sevenseacat: ACTION shrugs
[06:41:02] lucyinthesky: has joined #ruby
[06:41:03] baweaver: yeah, me too
[06:41:48] riotjones: has joined #ruby
[06:41:49] baweaver: I do have a hard time believing that someone never encountered a tutorial before
[06:41:52] baweaver: but to each their own.
[06:42:06] prosody: We're talking about Ruby on Matrix.org. Just needed more room.
[06:42:12] kyoshero: has joined #ruby
[06:42:20] leat3: has joined #ruby
[06:44:54] prosody: First lettering and line of the topic here is "Rules" ;) so it makes sense if there are a lot of shrugs IO:)
[06:45:32] pawnbox: has joined #ruby
[06:45:59] firstdayonthejob: has joined #ruby
[06:47:18] JoL1hAHN: has joined #ruby
[06:47:34] leat3: has joined #ruby
[06:48:12] j4cknewt: has joined #ruby
[06:49:22] bigkevmcd: has joined #ruby
[06:49:39] xcesariox: has joined #ruby
[06:54:40] last_staff: has joined #ruby
[06:56:10] lucyinthesky: has left #ruby: ("Leaving")
[06:56:19] Xzanron: has joined #ruby
[06:56:59] c0ncealed: has joined #ruby
[06:57:58] Macaveli: has joined #ruby
[06:59:27] ta: has joined #ruby
[06:59:35] niemcu: has joined #ruby
[07:00:17] ruurd: has joined #ruby
[07:00:48] zlogan85: has joined #ruby
[07:02:19] greenarrow: has joined #ruby
[07:02:23] lsmola: has joined #ruby
[07:03:33] opensource_ninja: has joined #ruby
[07:03:47] Rollabunna: has joined #ruby
[07:05:54] ta: has joined #ruby
[07:06:32] matp: has joined #ruby
[07:07:42] firstdayonthejob: has joined #ruby
[07:07:51] fxn: has joined #ruby
[07:08:37] patrick_star: has joined #ruby
[07:08:41] joonty: has joined #ruby
[07:09:54] Juanchito: has joined #ruby
[07:10:10] leat3: has joined #ruby
[07:11:20] DoubleMalt: has joined #ruby
[07:13:14] lolmaus: has joined #ruby
[07:14:20] devoldmx: has joined #ruby
[07:17:11] j4cknewt: has joined #ruby
[07:18:37] ordepdev: has joined #ruby
[07:21:36] djbkd: has joined #ruby
[07:22:41] JohnBat26: has joined #ruby
[07:23:54] jgt1: has joined #ruby
[07:24:03] prosody: I wish _why was an op.???
[07:24:13] aganov: has joined #ruby
[07:24:56] shevy: _why is gone
[07:25:30] alphaatom: has joined #ruby
[07:25:33] prosody: I??? _mis _why.
[07:25:59] tkuchiki: has joined #ruby
[07:26:22] workmad3: has joined #ruby
[07:30:11] shevy: he made great cartoons
[07:31:32] prosody: he gave code emotion(s)
[07:31:54] shevy: I have heard about emocode
[07:33:23] prosody: Aha. Renice. Makes cense. i switched Info Sec to Emo Sec, but failed to find that det.
[07:34:29] yfeldblum: has joined #ruby
[07:35:05] rdark: has joined #ruby
[07:35:50] apeiros: emocode??? brilliant :D
[07:35:56] Macaveli: has joined #ruby
[07:37:21] allomov: has joined #ruby
[07:38:56] stanc: has joined #ruby
[07:39:23] allomov: has joined #ruby
[07:41:08] astrobunny: has joined #ruby
[07:41:29] Tempesta: has joined #ruby
[07:42:04] Spami: has joined #ruby
[07:42:28] astrobunny: has joined #ruby
[07:43:25] michael_mbp: has joined #ruby
[07:45:26] mblagden: has joined #ruby
[07:45:38] Voxxit: has joined #ruby
[07:46:06] c0ncealed: has joined #ruby
[07:47:47] nhhagen: has joined #ruby
[07:47:52] cloudbud: has joined #ruby
[07:48:17] cloudbud: this ques is related to chef.I have a rcipe where in recipe node['oms-common'] is used in recipe. I need to figure out from where the attribute value node['oms-common'] is coming. its not even defined in the attributes file
[07:49:30] j4cknewt_: has joined #ruby
[07:51:12] Xzanron: cloudbud, why aren't you asking this in #chef ?
[07:51:27] cloudbud: i asked thr
[07:51:47] senayar: has joined #ruby
[07:53:21] Radar: cloudbud is charged per letter sent though their ISP
[07:54:39] prosody: Radar: Throughwellput.
[07:58:57] astrobunny: has joined #ruby
[07:59:21] faces: has joined #ruby
[08:01:01] deg-: has joined #ruby
[08:01:20] tesuji: has joined #ruby
[08:01:38] Ropeney: has joined #ruby
[08:02:16] astrobunny: i installed rake-compile
[08:02:25] astrobunny: but rake still insists it cannot find rake/extensiontask
[08:02:27] astrobunny: what is wrong
[08:03:07] astrobunny: even in irb rake/extensiontask can be loaded
[08:03:24] Hounddog: has joined #ruby
[08:03:48] astrobunny: what the hell
[08:03:50] blowmage: has joined #ruby
[08:03:53] dionysus69: has joined #ruby
[08:04:31] yeticry: has joined #ruby
[08:04:54] SCHAAP137: has joined #ruby
[08:06:38] JimmyNeutron: has joined #ruby
[08:06:40] apeiros: astrobunny: are you in a project with a Gemfile?
[08:06:54] astrobunny: i have a gemspec
[08:07:14] apeiros: gemspec != Gemfile
[08:07:24] astrobunny: well the Gemfile says gemspec
[08:07:29] krisquigley: has joined #ruby
[08:07:42] astrobunny: of course they are different, but i have a Gemfile that says gemspec
[08:07:47] apeiros: then you're probably running via bundler. you have to add rake-compile to your dependencies.
[08:08:17] apeiros: note that a gem can have development dependencies - stuff needed for development, but not for using the gem.
[08:08:27] astrobunny: i need to test my gem extension
[08:08:45] astrobunny: i have a project requiring the gem by path
[08:08:51] astrobunny: but when i bundle install i dont see it building
[08:08:55] astrobunny: the extension
[08:09:09] astrobunny: thanks, apeiros
[08:09:10] anisha: has joined #ruby
[08:09:16] j4cknewt: has joined #ruby
[08:09:29] apeiros: moin certainty
[08:09:40] mikecmpbll: has joined #ruby
[08:13:13] eam: has joined #ruby
[08:13:20] charliesome: has joined #ruby
[08:14:21] solars: has joined #ruby
[08:14:58] bayed: has joined #ruby
[08:15:09] jgt1: has joined #ruby
[08:16:29] blaxter: has joined #ruby
[08:17:27] skade: has joined #ruby
[08:17:31] yeticry: has joined #ruby
[08:18:18] Balzrael: has joined #ruby
[08:18:20] charliesome: has joined #ruby
[08:19:10] leafybasil: has joined #ruby
[08:19:25] sagittarian: has joined #ruby
[08:19:49] roxtrongo: has joined #ruby
[08:21:37] Zai00: has joined #ruby
[08:21:43] niemcu: has joined #ruby
[08:22:34] lokulin: has joined #ruby
[08:23:18] CustosL1men: has joined #ruby
[08:25:15] lostinmalloc: has joined #ruby
[08:25:22] beast: has joined #ruby
[08:25:24] CustosLimen: has joined #ruby
[08:27:00] leat3: has joined #ruby
[08:27:58] charliesome: has joined #ruby
[08:28:53] tomaz_b: has joined #ruby
[08:28:54] astrobunny: is there a way to invalidate the ruby bundle
[08:29:03] astrobunny: the native extension bundle
[08:32:46] Oog: has joined #ruby
[08:34:07] Oog: has joined #ruby
[08:34:44] zlogan2003: has joined #ruby
[08:34:48] pawnbox_: has joined #ruby
[08:35:17] charliesome: has joined #ruby
[08:36:40] khebbie: has joined #ruby
[08:38:04] michael_mbp: has joined #ruby
[08:42:30] joonty: has joined #ruby
[08:43:39] pontiki: has joined #ruby
[08:44:54] Kallis: has joined #ruby
[08:45:24] rakm: has joined #ruby
[08:48:17] Shoutsid: has joined #ruby
[08:49:05] leafybasil: has joined #ruby
[08:49:39] astrobunny: has joined #ruby
[08:49:43] adeponte: has joined #ruby
[08:52:38] Timba-as: has joined #ruby
[08:52:38] astrobunny: how do i rebuild my gem's native extension?
[08:52:44] astrobunny: it does not seem to be picking up my changes
[08:54:22] _whitelogger: has joined #ruby
[08:55:17] jhass: gem pristine mygem
[08:55:52] dmolina: has joined #ruby
[08:56:00] elektronaut: has joined #ruby
[08:56:01] patrick_star: has joined #ruby
[08:56:23] justin_pdx: has joined #ruby
[08:56:39] astrobunny: i didnt install my gem
[08:56:57] astrobunny: i am in its directory where i am developing it and writing tests
[08:59:13] karapetyan: has joined #ruby
[09:02:46] wldcordeiro: has joined #ruby
[09:03:00] howdoi: has joined #ruby
[09:03:51] yorickpeterse: astrobunny: either install it, or use rake-compiler
[09:03:59] yorickpeterse: https://github.com/rake-compiler/rake-compiler
[09:04:11] astrobunny: i am using rake-compiler
[09:04:17] astrobunny: how do i invalidate
[09:04:17] beast_: has joined #ruby
[09:04:39] Rollabunna: has joined #ruby
[09:04:49] yorickpeterse: rake compile IIRC
[09:05:00] astrobunny: it just puts says install the bundle
[09:05:11] yorickpeterse: Provide the full output
[09:05:15] ruboto: https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
[09:05:17] astrobunny: my changes in the native code dont get reflected
[09:06:04] astrobunny: install -c tmp/x86_64-darwin14.3.0/cocor/2.0.0/cocor.bundle lib/cocor/cocor.bundle
[09:06:05] astrobunny: cp tmp/x86_64-darwin14.3.0/cocor/2.0.0/cocor.bundle tmp/x86_64-darwin14.3.0/stage/lib/cocor/cocor.bundle
[09:06:05] Oog: has joined #ruby
[09:06:09] astrobunny: all it says is this
[09:06:09] yorickpeterse: I said in a gist
[09:06:13] voker57: has joined #ruby
[09:06:18] astrobunny: even if i modified the cpp files
[09:06:22] yorickpeterse: also what did you mean with "it just puts says install the bundle"
[09:06:35] ltd: has joined #ruby
[09:06:39] astrobunny: all it outputs is those two lines above
[09:06:43] yorickpeterse: Typically what you need to do is 1) change your code 2) rake compile 3) run tests
[09:06:45] astrobunny: basically it goes install -c some path
[09:06:48] lokulin: has joined #ruby
[09:06:58] astrobunny: yes. but rake compile does not update the bundle with my code
[09:07:00] yorickpeterse: if that doesn't work then maybe rake-compiler is not set up properly
[09:07:14] astrobunny: how does one "set up" properly
[09:07:35] yorickpeterse: Start by reading the README of rake-compiler
[09:07:35] astrobunny: doesnt work in this case just means any changes in the native code
[09:07:40] astrobunny: do not get picked up
[09:08:27] astrobunny: i have, that is why i am asking here
[09:08:32] leat3: has joined #ruby
[09:08:36] astrobunny: basically i rake compile the first time
[09:08:41] astrobunny: and it compiles everything beautifully
[09:08:45] astrobunny: and creates a bundle
[09:08:54] astrobunny: and then i want to make a change to the native code
[09:08:59] astrobunny: but it does not get picked up
[09:09:04] astrobunny: that is the problem
[09:09:57] dmolina: has joined #ruby
[09:10:55] shock_one: has joined #ruby
[09:13:06] wldcordeiro: has joined #ruby
[09:14:19] FrankD: has joined #ruby
[09:14:56] workmad3: has joined #ruby
[09:15:06] devoldmx: has joined #ruby
[09:16:42] Igorshp: has joined #ruby
[09:18:01] j4cknewt: has joined #ruby
[09:20:36] JamesDH: has joined #ruby
[09:21:42] zerolith: has joined #ruby
[09:25:31] hectortrope: has joined #ruby
[09:25:59] Akagi201: has joined #ruby
[09:28:11] solocshaw: has joined #ruby
[09:28:21] wldcordeiro: has joined #ruby
[09:28:38] solocshaw: has joined #ruby
[09:29:17] fertapric: has joined #ruby
[09:30:15] workmad3: has joined #ruby
[09:32:35] leat3: has joined #ruby
[09:34:31] arup_r: has joined #ruby
[09:34:34] wldcordeiro: has joined #ruby
[09:35:48] matp: has joined #ruby
[09:37:19] j4cknewt: has joined #ruby
[09:39:29] DoubleMalt: has joined #ruby
[09:40:24] Bish: too bad sequel doesn't understand the set datatype of mysql :/
[09:40:51] marr: has joined #ruby
[09:44:04] leat3: has joined #ruby
[09:44:29] atmosx: best way to count source code lines in a sinatra application?
[09:45:55] yorickpeterse: atmosx: "cloc"
[09:47:03] atmosx: I'm trying this metric_fu ... it must have installed ~ 50 gems by now
[09:47:12] atmosx: yorickpeterse: I'll look at it.
[09:48:30] wldcordeiro: has joined #ruby
[09:49:56] Unopoo: has joined #ruby
[09:50:03] j4cknewt: has joined #ruby
[09:50:19] icosa1: has joined #ruby
[09:50:34] leat3: has joined #ruby
[09:51:55] Agis-: has joined #ruby
[09:52:29] stamina: has joined #ruby
[09:53:09] wldcordeiro: has joined #ruby
[09:55:16] sevenseacat: has joined #ruby
[09:55:22] Timba-as: has joined #ruby
[09:55:45] lkba: has joined #ruby
[09:57:41] wldcordeiro: has joined #ruby
[09:58:15] Igorshp: has joined #ruby
[09:58:43] Ketchy: has joined #ruby
[10:00:09] ndrei: has joined #ruby
[10:01:09] senayar: has joined #ruby
[10:01:26] atmosx: yorickpeterse: wow cloc is awesome
[10:02:10] j4cknewt: has joined #ruby
[10:02:23] wldcordeiro: has joined #ruby
[10:07:59] UtkarshRay: has joined #ruby
[10:08:47] wldcordeiro: has joined #ruby
[10:12:36] Rurik: has joined #ruby
[10:15:32] wldcordeiro: has joined #ruby
[10:16:04] Timba-as: has joined #ruby
[10:16:06] iamayam: has joined #ruby
[10:17:41] karapetyan: has joined #ruby
[10:18:08] Timba-as: has joined #ruby
[10:20:31] Rollabunna: has joined #ruby
[10:22:08] Rollabunna: has joined #ruby
[10:23:16] Igorshp: has joined #ruby
[10:23:44] pawnbox: has joined #ruby
[10:25:37] khebbie: has joined #ruby
[10:28:19] platosha: has joined #ruby
[10:28:59] wldcordeiro: has joined #ruby
[10:29:06] Ropeney: has joined #ruby
[10:29:35] Macaveli: has joined #ruby
[10:29:46] ljarvis: >> %w(fo foo f).sort_by(&:length).group_by(&:length)
[10:29:47] ruboto: ljarvis # => {1=>["f"], 2=>["fo"], 3=>["foo"]} (https://eval.in/431050)
[10:32:07] Rurik: has joined #ruby
[10:32:29] David27: has joined #ruby
[10:32:54] shevy: magic numbers!
[10:34:57] yeticry: has joined #ruby
[10:37:39] dhjondoh: has joined #ruby
[10:40:48] khebbie: has joined #ruby
[10:42:30] cgfbee: has joined #ruby
[10:43:33] phutchins: has joined #ruby
[10:43:53] Igorshp: has joined #ruby
[10:44:05] pontiki: has joined #ruby
[10:45:53] devoldmx: has joined #ruby
[10:46:42] Rurik: has joined #ruby
[10:47:19] otisZart: has joined #ruby
[10:48:53] wldcordeiro: has joined #ruby
[10:51:01] astrobunny: i deleted a data file in my gem
[10:51:05] astrobunny: and when i run rake compile
[10:51:07] astrobunny: it still looks for it
[10:51:13] astrobunny: what is this mysterious persistent state
[10:51:20] astrobunny: how do i tell it its gone?
[10:51:28] astrobunny: i am making a gem by the way
[10:52:01] astrobunny: it just says Don't know how to build task 'data/myfile'
[10:52:04] astrobunny: this is annoying
[10:52:21] chills42: has joined #ruby
[10:52:21] quazimodo: has joined #ruby
[10:53:17] sankaber: has joined #ruby
[10:53:20] wldcordeiro: has joined #ruby
[10:53:28] Rurik: has joined #ruby
[10:54:14] astrobunny: does rake keep some sort of hidden state that does not get removed by rake clean
[10:57:09] ruby-lang002: has joined #ruby
[10:57:50] HerpDerpington: has joined #ruby
[10:59:39] pawnbox_: has joined #ruby
[11:01:09] leat3: has joined #ruby
[11:04:08] freezevee: has joined #ruby
[11:04:53] rodfersou: has joined #ruby
[11:05:04] khebbie: has joined #ruby
[11:05:38] wldcordeiro: has joined #ruby
[11:06:11] nw: has joined #ruby
[11:10:14] wldcordeiro: has joined #ruby
[11:12:39] astrobunny: what the hell, it reads git
[11:12:48] astrobunny: much obscure
[11:14:45] bkxd: has joined #ruby
[11:14:45] wldcordeiro: has joined #ruby
[11:17:32] but3k4: has joined #ruby
[11:17:52] apt-get: has joined #ruby
[11:18:54] chthon: has joined #ruby
[11:19:37] but3k4: has joined #ruby
[11:20:03] wldcordeiro: has joined #ruby
[11:21:10] [k-: you sound like me :o
[11:21:13] FernandoBasso: has joined #ruby
[11:22:00] leat3: has joined #ruby
[11:22:30] charliesome: has joined #ruby
[11:24:45] Macaveli: has joined #ruby
[11:24:57] jgt1: has joined #ruby
[11:25:15] dgutierrez1287: has joined #ruby
[11:25:24] wldcordeiro: has joined #ruby
[11:28:12] Timba-as: has joined #ruby
[11:28:32] zlogan2003: has joined #ruby
[11:28:41] astrobunny: its so completely unexpecte
[11:28:48] astrobunny: unless i add to git
[11:28:53] astrobunny: it wont see the file
[11:29:14] Rurik: has joined #ruby
[11:29:56] skullcrasher: has joined #ruby
[11:30:58] zeroDivisible: has joined #ruby
[11:33:30] UtkarshRay: has joined #ruby
[11:34:13] ldnunes: has joined #ruby
[11:34:19] shaman42: has joined #ruby
[11:34:32] wldcordeiro: has joined #ruby
[11:34:40] yorickpeterse: maybe the Gemspec specifies the files based on `git ls-files`
[11:35:21] workmad3: the template you get from `bundle gem` does that
[11:36:14] syath: has joined #ruby
[11:36:54] yorickpeterse: it's quite the anti-pattern
[11:36:57] shevy: has joined #ruby
[11:37:24] yorickpeterse: e.g. doesn't work if you have generated files that you don't want in Git, you'd have to append them in the Gemspec
[11:37:29] yorickpeterse: much easier to just use Dir.glob
[11:37:39] yorickpeterse: e.g. https://github.com/YorickPeterse/oga/blob/master/oga.gemspec#L13-L22
[11:37:46] bkxd: has joined #ruby
[11:38:55] timonv: has joined #ruby
[11:39:44] apeiros: also `git ls-files` does not work if you have the source from anywhere else than git-clone or a full copy of a repo
[11:40:06] arup_r: has joined #ruby
[11:40:08] apeiros: s/also/additionally/
[11:40:38] yorickpeterse: e.g. a tarball
[11:40:58] apeiros: or from a gem install :)
[11:41:04] marwinism: I'm stuck trying to build xml with nokogiri Builder. I want <ns1:foo> <ns2:bar><foo><bar></ns2:bar></ns1:foo> - Any tips, ideas or suggestions? Google has similar hits, but no cigar.
[11:41:28] apeiros: though, it's arguable that the source from a gem install does not need to contain all files to develop on the gem
[11:41:52] sdothum: has joined #ruby
[11:42:00] [k-_: has joined #ruby
[11:42:03] apeiros: marwinism: iirc there's two ways, one is public_send("ns1:foo")
[11:42:24] apeiros: the other I think was using [], e.g. builder["ns1"].foo, not sure anymore about that way
[11:42:26] sepp2k: has joined #ruby
[11:42:42] apeiros: actually, not even sure about the first way anymore. been a while :)
[11:43:12] sebyx07: has joined #ruby
[11:43:32] wldcordeiro: has joined #ruby
[11:45:11] sankaber: has joined #ruby
[11:45:58] shock_one: has joined #ruby
[11:47:02] marwinism: apeiros: thanks! Already doing that, but in some namespaces (not all of them), I need clean tags without namespaces. This is a shitty format called CIN XML, and i'm starting to belive I need to hack it real bad.
[11:47:33] marwinism: I just can't figure out how to stop namespace inheritance on some nodes.
[11:48:06] wldcordeiro: has joined #ruby
[11:48:06] ledestin: has joined #ruby
[11:48:09] marwinism: builder['foo'].root { builder.foo } works like charm
[11:48:13] MasterPiece: has joined #ruby
[11:48:55] marwinism: i'll do some research on public_send tho! Thanks
[11:49:36] Macaveli: has joined #ruby
[11:49:56] dhjondoh: has joined #ruby
[11:50:19] astrobunny: has joined #ruby
[11:50:39] wildlander: has joined #ruby
[11:50:39] sdothum: has joined #ruby
[11:52:33] wldcordeiro: has joined #ruby
[11:52:36] FernandoBasso: I am trying to find more about class instance variables in the docs but I can't seem to find it. Any suggestions?
[11:52:48] leat4: has joined #ruby
[11:52:52] apeiros: FernandoBasso: they are exactly the same as instance variables
[11:53:05] apeiros: (because they *are* instance variables)
[11:53:20] FernandoBasso: What about setting getters and setters for them?
[11:53:26] FernandoBasso: What about inheritance?
[11:53:47] apeiros: the instance to which a class ivar belongs is the class
[11:53:57] apeiros: that means you define accessors on the class of that instance
[11:54:05] FernandoBasso: How is that done?
[11:54:07] jeffreylevesque: has joined #ruby
[11:54:08] pontiki: has joined #ruby
[11:54:24] apeiros: >> class Foo; class << self; attr_reader :x; end; @x = 1; end; Foo.x
[11:54:25] ruboto: apeiros # => 1 (https://eval.in/431099)
[11:54:37] apeiros: Foo is an instance of Foo.singleton_class
[11:54:51] apeiros: (also of Class, you could define the accessor there too, but then *all* classes would have that)
[11:55:10] apeiros: inheritance: ivars are never inherited.
[11:55:25] FernandoBasso: What is an ivar?
[11:55:33] FernandoBasso: instance variable?
[11:55:33] apeiros: instance variable, @ivar
[11:55:39] apeiros: class variable: @@cvar
[11:55:44] apeiros: global variable $gvar
[11:55:55] apeiros: local_variable
[11:56:04] apeiros: those are the 5 variable types which exist in ruby
[11:56:12] yorickpeterse: apeiros: instance variables are available to subclasses
[11:56:18] apeiros: yorickpeterse: no
[11:56:30] apeiros: you're mistaken
[11:56:34] apeiros: the accessors are
[11:56:39] apeiros: but the variables are not.
[11:56:48] yorickpeterse: >> class A; def foo; @number = 10; end; end; class B < A; def bar; @number; end; end; b = B.new; b.foo; b.bar
[11:56:49] ruboto: yorickpeterse # => 10 (https://eval.in/431104)
[11:57:36] apeiros: you're not calling a method on A
[11:57:41] apeiros: you're calling one on B
[11:57:45] apeiros: the variable is not shared
[11:58:09] yorickpeterse: unless you meant they're not shared between class definitions, you're talking out of your arse
[11:58:22] apeiros: you execute code in the context of b, with self being b, which sets an ivar
[11:58:34] apeiros: yorickpeterse: mind your language
[11:58:59] yorickpeterse: If you meant that they're not shared in the same fashion as class variables, then yes, you're right
[11:59:19] yorickpeterse: But instance variables set in a parent class are very much available to sub classes when they're initialized
[11:59:22] apeiros: class A; @x = 1; end; class B < A; end # class B does *not* have access to @x from A. it can define its own @x. it can do so through a method it inherited from A. but that does NOT mean it accesses A's @x
[11:59:36] apeiros: that's the point. you do NOT set it in the parent class
[11:59:55] apeiros: you use *a method inherited* from the parent class. you don't execute that method in the parent class. you execute it in the descendant.
[12:00:00] yorickpeterse: next time you might want to clarify you specifically meant setting ivars on class level
[12:00:03] yorickpeterse: and not on instance level
[12:00:09] apeiros: same thing
[12:00:13] yorickpeterse: _very_ different
[12:00:20] apeiros: works exactly the same.
[12:00:29] yorickpeterse: class Foo; @x = 10; end # you're setting an ivar on an instance of the singleton class
[12:00:36] yorickpeterse: which is _very_ different from setting an ivar on the instance of the class
[12:00:42] leat4: has joined #ruby
[12:00:50] apeiros: the mechanics of what has access to what is precisely the same.
[12:01:05] [k-_: ivars and cvars, the worst things that ever happened to a beginner
[12:01:15] yorickpeterse: ivars are fine, cvars are a farce
[12:01:37] yorickpeterse: They literally should've never existed
[12:01:38] devoldmx: has joined #ruby
[12:01:52] yorickpeterse: but then again constants aren't constant either
[12:02:20] apeiros: yorickpeterse: to understand, change your code slightly. class A; def foo; p self.class; @number = 10; end
[12:02:29] apeiros: you'll see that b.foo will print B, not A
[12:02:38] astrobunny: ho lee fugue
[12:02:41] astrobunny: you are right.
[12:02:41] Rurik: has joined #ruby
[12:02:42] astrobunny: spec.files = `git ls-files -z`
[12:02:48] astrobunny: i do not know why i did not see that
[12:03:04] yorickpeterse: apeiros: oh wow, I totally hadn't noticed
[12:03:05] ebbflowgo: has joined #ruby
[12:03:39] apeiros: or even: b = B.new; c = B.new; b.foo; c.instance_variables
[12:03:46] apeiros: b has @number, c does not.
[12:03:53] JamesDH: has joined #ruby
[12:03:57] apeiros: ivars are registered to a single object alone
[12:03:59] karapetyan: has joined #ruby
[12:04:00] yorickpeterse: ... you're missing what I said
[12:04:19] apeiros: 13:56 yorickpeterse: apeiros: instance variables are available to subclasses
[12:04:19] yorickpeterse: instance variables are inherited from parent classes, but scoped to their instances
[12:04:29] apeiros: you say that. and that's not correct.
[12:04:47] apeiros: no, they are not inherited. you inherit methods.
[12:04:51] apeiros: not ivars.
[12:04:51] bmurt: has joined #ruby
[12:05:00] apeiros: if you would inherit ivars, they'd show up on .instance_variables.
[12:05:00] yorickpeterse: https://eval.in/431108 then how would this work?
[12:05:12] yorickpeterse: oh right, because you can access ivars from the ancestor chain
[12:05:15] TheHodge: has joined #ruby
[12:05:27] apeiros: I think your mental model of objects is quite broken.
[12:05:37] yorickpeterse: I'm pretty aware of how this works
[12:05:43] apeiros: it works by you evaluating #initialize in the context of `b`
[12:05:57] apeiros: and that method adds an ivar to `b` and `b` alone.
[12:06:03] apeiros: no variable has been inherited in the process.
[12:06:09] dionysus69: has joined #ruby
[12:06:15] yorickpeterse: The example you've showed, of `class Foo; @number = 10; end` is a very different thing from what I've showed
[12:06:27] apeiros: it's the same as doing: b.instance_eval do @foo = 10 end # I didn't inherit @foo from anywhere either
[12:07:09] apeiros: so in short: what you inherit is #initialize
[12:07:13] apeiros: you don't inherit @foo
[12:07:14] jgt1: has joined #ruby
[12:07:41] apeiros: the inherited code will define your @foo when it is run. how you get to "that means @foo is inherited" from that is beyond me.
[12:08:00] [k-_: apeiros is so clever!
[12:08:21] [k-_: i thought ivars were inherited too
[12:08:33] monsieurp: has joined #ruby
[12:08:37] [k-_: \??\_(???)_/??
[12:08:42] yorickpeterse: apeiros: it's inherited in the sense that whatever is defined in the ancestor chain (and is called), is available to sub classes
[12:08:52] yorickpeterse: it's not inherited that there's some field like "superclass" or w/e
[12:09:03] apeiros: again, IMO you misunderstand the object model
[12:09:04] yorickpeterse: That is, there's no hard coded chain so to speak (as is the case with classes)
[12:09:30] apeiros: a newly created object has *zero* ivars. it has its own ivar table. which is empty. it has no reference in that table to any class/superclass/chain
[12:09:30] monsieurp: has joined #ruby
[12:09:38] apeiros: ivars are NOT part of inheritance. at all.
[12:09:42] DanielI: has joined #ruby
[12:09:48] apeiros: cvars are. in a weird way.
[12:09:55] yorickpeterse: " it's inherited in the sense that whatever is defined in the ancestor chain (and is called)"
[12:10:12] apeiros: that doesn't even make sense.
[12:10:41] apeiros: tell me, what's the super equivalent for ivars?
[12:11:15] leat4: has joined #ruby
[12:11:15] yorickpeterse: Your initial note made it sound like ivars are not available to subclasses when they're defined in a method that is called from a child class
[12:11:24] yorickpeterse: That in itself is false, which I probably didn't explain entirely clearly
[12:11:37] apeiros: they are not. you get your very own ivar in that child class.
[12:11:56] yorickpeterse: What I meant is that if an instance of a class has a parent class, where something defines an instance variable (e.g. via a method call), then those variables _are_ available to the instance
[12:11:59] apeiros: which is entirely unrelated to the ivar in the superclass.
[12:12:08] apeiros: again: all you share is the code.
[12:12:27] yorickpeterse: And the difference with that vs `class Foo; @number = 10; end` is that this doesn't even set an ivar on the instance of the class, but instead on the singleton class
[12:12:36] FernandoBasso: apeiros: I still don't see where in the docs I would read about this subject.
[12:12:42] apeiros: and again: this code can very well set/assign/define an ivar. but that ivar has absolutely nothing to do with any ivar the same code sets in any other object.
[12:12:46] c0ncealed: has joined #ruby
[12:12:56] apeiros: yorickpeterse: nonsense
[12:13:01] Zai00: has joined #ruby
[12:13:04] yorickpeterse: FernandoBasso: https://rubymonk.com/learning/books/4-ruby-primer-ascent/chapters/45-more-classes/lessons/110-instance-variables covers it
[12:13:09] [k-_: i have a feeling apeiros likes debating this kinds of stuff
[12:13:25] apeiros: >> class Foo; @x = 1; end; Foo.singleton_class.instance_variables # no, it is not set in the singleton_class yorickpeterse
[12:13:26] ruboto: apeiros # => [] (https://eval.in/431129)
[12:13:44] apeiros: >> class Foo; @x = 1; end; Foo.instance_variables # it is set in Foo itself
[12:13:45] ruboto: apeiros # => [:@x] (https://eval.in/431132)
[12:13:50] yorickpeterse: huh, I thought that would go to the singleton class and not the class itself
[12:14:00] yorickpeterse: maybe I'm mixing singleton classes up again
[12:14:02] apeiros: you define the *accessor* in the singleton class
[12:14:05] FernandoBasso: yorickpeterse: Thanks. Still, I mean, where in the "official" docs is that discussed.
[12:14:09] yorickpeterse: Given a bad headache and a flue that's possible
[12:14:11] apeiros: because the accessor defines an *instance* method
[12:14:22] apeiros: and Foo is an instance of Foo.singleton_class
[12:14:23] yorickpeterse: FernandoBasso: not sure actually
[12:14:31] quazimodo: has joined #ruby
[12:15:32] FernandoBasso: This situation reminds me of http://blog.codinghorror.com/learn-to-read-the-source-luke/ where the author says we should read the source because "all the docs probably sucks"...
[12:15:36] Mon_Ouie: The docs seem very misleading actually. Module#attr_accessor states ' creating an instance variable (@name)' which I don't think it does at all.
[12:15:44] yorickpeterse: hm, ruby-doc only seems to cover core/stdlib and some outdated shit
[12:15:55] FernandoBasso: It is either incomplete or inaccurate.
[12:16:10] apeiros: Mon_Ouie: uh, yes, this is indeed very misleading
[12:16:11] yorickpeterse: apeiros: I don't see where this defines accessors in the attr_accessor sense
[12:16:19] yorickpeterse: unless you're referring to something else when you talk about accessors
[12:16:37] apeiros: yorickpeterse: lost where you are. what do you mean?
[12:16:38] yorickpeterse: FernandoBasso: there's an ISO spec, which only covers 1.8, and costs about 200 Euros
[12:16:48] yorickpeterse: apeiros: "you define the *accessor* in the singleton class"
[12:16:54] apeiros: yorickpeterse: not shown in the code
[12:17:01] yorickpeterse: then I'm confused
[12:17:09] apeiros: yorickpeterse: you'd do class << Foo; attr_reader :x; end to access that @x
[12:17:16] yorickpeterse: oh right, that pattern
[12:17:21] mary5030: has joined #ruby
[12:17:33] apeiros: >> class Foo; @x = 1; class << self; attr_reader :x; end; end; [Foo.instance_variables, Foo.x]
[12:17:34] ruboto: apeiros # => [[:@x], 1] (https://eval.in/431136)
[12:17:34] FernandoBasso: yorickpeterse: And which would probably look like gobbledygook to me.
[12:17:35] yorickpeterse: FernandoBasso: either way, instance variables are variables available to an instance of something only
[12:18:04] yorickpeterse: since Ruby doesn't let you pre-define them (e.g. as you'd probably do in something like Java) they're usually set from within a method
[12:18:06] ruby-lang923: has joined #ruby
[12:18:07] apeiros: define the reader as an instance method in Foo's class (where you have 2 options: Class and ancestors, or .singleton_class), define the ivar in the instance (Foo)
[12:18:10] yorickpeterse: e.g. the "initialize" method
[12:18:10] shevy: FernandoBasso the best initial tutorial I always found to be were working examples
[12:18:26] yorickpeterse: ruby-lang923: just ask your question
[12:18:39] yorickpeterse: FernandoBasso: and yes, the ISO spec is meh
[12:18:53] dasher00: has joined #ruby
[12:19:26] shevy: 200 euro for meh documentation hmm
[12:19:29] rbennacer: has joined #ruby
[12:19:30] FernandoBasso: Well, thank you all for your invaluable insights.
[12:19:38] yorickpeterse: shevy: doesn't even cover encodings
[12:19:44] yorickpeterse: or the syntax introduced in 1.9
[12:19:57] Mon_Ouie: Well it is meant to be a spec for Ruby 1.8
[12:20:00] dasher00: has joined #ruby
[12:20:01] mary5030: has joined #ruby
[12:20:38] certainty: workmad3: ltns o/
[12:21:12] yorickpeterse: Mon_Ouie: it was written when 1.9 was out
[12:21:22] yorickpeterse: makes little sense to write an ISO spec for an already deprecated version of your language
[12:21:23] Quandl: has joined #ruby
[12:21:31] yorickpeterse: especially if that version is _very_ different from newer versions
[12:21:40] roxtrongo: has joined #ruby
[12:21:58] maloik: /Users/hannes/Library/Containers/com.apple.mail/Data/Library/Mail Downloads/6794B395-849B-4E21-9A68-564A7C317E38/scan.pdf\
[12:22:19] shevy: all the secretly scan docs are there
[12:22:28] maloik: oopsie daisy
[12:22:37] FernandoBasso: And what is the difference between a variable I defined right inside the body of a class vs those I create inside an initialize method?
[12:22:44] maloik: don't go stealing my docs now
[12:22:45] yorickpeterse: also wtf Mail dumps downloads in ~/Library?
[12:22:48] shevy: FernandoBasso do you mean @ivar or var ?
[12:22:58] yorickpeterse: FernandoBasso: they're available in different contexts
[12:22:58] FernandoBasso: shevy: Just a moment.
[12:22:59] shevy: FernandoBasso but a general answer is, the scope is different
[12:23:16] shevy: class Foo; @foo = 'foo' will be different than class Foo; def initialize; @foo = 'foo'
[12:23:42] Mon_Ouie: @foo always refers to the instance variable called '@foo' of the object referenced to by self
[12:23:48] ruby-lang008: has joined #ruby
[12:23:59] yorickpeterse: FernandoBasso: https://eval.in/431140
[12:24:02] Mon_Ouie: Inside the body of a class statement, self is the class being defined/re-opened
[12:24:15] Mon_Ouie: Inside the body of a method, self is the object that the method was called on
[12:24:28] FernandoBasso: http://sprunge.us/FGfN?ruby
[12:24:48] khebbie: has joined #ruby
[12:25:17] leat4: has joined #ruby
[12:25:19] Mon_Ouie: And we just happen to call the instance variables of objects that are also classes "class instance variables", so your annotations are correct
[12:25:22] FernandoBasso: I misunderstood what apeiros said then. "they are exactly the same".
[12:25:30] yorickpeterse: FernandoBasso: euh, technically I believe "instance variable" and "class instance variable" are the same
[12:25:34] FernandoBasso: Or my question was ill-asked.
[12:25:38] shevy: different scope FernandoBasso
[12:25:40] yorickpeterse: at least in Smalltalk they are 2 terms for the same thing
[12:26:04] shevy: FernandoBasso I would call both instance variables
[12:26:17] yorickpeterse: FernandoBasso: when you do `class Foo; @number = 10; end` then @number is available to Foo
[12:26:20] joonty: has joined #ruby
[12:26:20] Mon_Ouie: They work the same way, just with a different object referenced to by 'self'
[12:26:22] sebyx07: for class instance variable, you can define getter and setters through cattr_(reader/writer/accessor)
[12:26:30] yorickpeterse: when you do `class Foo; def initialize; @number = 10; end; end` then @number is only available to _instances_ of Foo
[12:26:38] Mon_Ouie: sebyx07: Those methods are not part of Ruby.
[12:26:46] shevy: FernandoBasso you can give both the same name btw ... class Foo; @foo = 5; def initialize; @foo = 5 <-- two different @foo variables there
[12:26:47] khebbie: has joined #ruby
[12:27:06] yorickpeterse: also blegh, my whole brain is full of hay today
[12:27:08] Mon_Ouie: And looking them up, they set class variables in Rails
[12:28:01] TvL2386: has joined #ruby
[12:28:21] certainty: i believe the implementation is roughly equivalent to what apeiros already show. Defining attr_reader on the singleton_class
[12:28:46] sebyx07: ah, for normal ruby, you can use class << self; attr_(reader/writer/accessor) :myaccessor; end. You can also checkout my DI library i made for ruby https://github.com/sebyx07/rubybeans
[12:28:52] apeiros: 14:25 yorickpeterse: FernandoBasso: euh, technically I believe "instance variable" and "class instance variable" are the same
[12:29:07] FernandoBasso: In some of my tests, I had to do def self.foo; @foo; end; and def self.foo=(val); @foo = val; end to create getters/setters for "class instance variables".
[12:29:19] yorickpeterse: don't have the book with me, but I'm pretty sure the Smalltalk blue book uses both to refer to the same
[12:29:46] apeiros: FernandoBasso: yes, `class Foo; def self.foo; @foo; end; end` is equivalent to `class Foo; class << self; attr_reader :foo; end; end`
[12:30:01] shevy: FernandoBasso I'd call them instance variables too, just that they reside on the class level
[12:30:42] apeiros: >> class Foo; def self.foo; @foo; end; end; Foo.singleton_class.instance_methods(false) # FernandoBasso
[12:30:43] ruboto: apeiros # => [:foo] (https://eval.in/431148)
[12:31:09] apeiros: a class method on Foo is actually really an instance method in Foo.singleton_class
[12:31:29] apeiros: and instance methods can access an instance's instance variable - makes sense? :D
[12:31:55] apeiros: and to be precise: an instance method can access the instance variables of the instance they are called on ( == the receiver)
[12:32:45] shevy: this be how often we can use the word "instance" in a single sentence :D
[12:33:08] leat4: has joined #ruby
[12:33:13] morenoh149: has joined #ruby
[12:34:02] bkxd: has joined #ruby
[12:34:30] yorickpeterse: FernandoBasso will soon have an instance of a headache
[12:34:46] yorickpeterse: nah, that's just me today
[12:35:03] yorickpeterse: Yesterday I was surprised to see how much liquid can come out of one's nose
[12:35:29] yorickpeterse: that resulted in me using 3 instances of the Towel class to clean up things
[12:35:36] lxsameer: has joined #ruby
[12:36:31] apeiros: your nose is an instance of GooFactory
[12:36:49] [k-_: GooFactory < Factory
[12:37:28] yorickpeterse: apeiros: there weren't any beans coming out of it
[12:37:39] apeiros: give it time to dry
[12:37:54] shevy: beans outta your nose :D
[12:38:07] apeiros: ACTION afk
[12:38:11] yorickpeterse: apeiros: ewwww
[12:38:16] [k-_: persistent beans
[12:40:31] Rurik: has joined #ruby
[12:40:43] yeticry: has joined #ruby
[12:41:29] oshogun: has joined #ruby
[12:41:38] oshogun: print "sup"
[12:41:46] oshogun: has left #ruby: ("WeeChat 1.3")
[12:42:43] livcd: wha is the worst ruby anti-pattern ? :D
[12:43:10] slackR: has joined #ruby
[12:43:18] ljarvis: inheritance
[12:43:39] stardiviner: has joined #ruby
[12:44:30] DefV: mocking. But that's just me.
[12:44:33] karapetyan: has joined #ruby
[12:44:33] [k-_: shevy: continuations are the new hype
[12:45:09] greenarrow: has joined #ruby
[12:45:27] yorickpeterse: ljarvis: well somebody has been doing a lot of Go lately
[12:45:41] yorickpeterse: though I concur, composition > inheritance
[12:45:45] dhjondoh: has joined #ruby
[12:45:52] yorickpeterse: if only languages would implement traits properly for a change
[12:45:57] yorickpeterse: at least PHP now has traits :D
[12:46:12] [k-_: scala has traits too
[12:46:43] ljarvis: yorickpeterse: actually I haven't, I've just been looking at lots of bad Ruby lately
[12:46:51] shevy: [k-_ what is a continuation?
[12:47:00] yorickpeterse: ljarvis: you mean ActiveRecord?
[12:47:04] [k-_: the alternative to monads!
[12:47:09] ljarvis: yorickpeterse: :D
[12:47:12] livcd: swift has traits too
[12:47:14] ljarvis: pretty much
[12:47:15] yorickpeterse: ehm, monads are pretty different from traits
[12:47:29] [k-_: http://blog.paralleluniverse.co/2015/08/07/scoped-continuations/
[12:47:31] yorickpeterse: then again a monad is a pretty generic term
[12:48:05] nfk: has joined #ruby
[12:48:19] dasher00: has joined #ruby
[12:48:51] ljarvis: mo money mo nads
[12:49:48] c0ncealed: has joined #ruby
[12:50:35] shevy: Iterable<Integer> range(int from, int to) {
[12:50:58] yorickpeterse: I hate how Rust doesn't actually have traits but instead has interfaces, _while_ calling them traits
[12:51:21] xcesariox: has joined #ruby
[12:53:46] [k-_: what are traits
[12:53:48] CloCkWeRX: has joined #ruby
[12:54:09] certainty: a collection of methods basically
[12:54:27] s: has joined #ruby
[12:54:33] yorickpeterse: A trait is a collection that defines 2 things:
[12:54:45] yorickpeterse: 1) methods a class that includes the trait should define (or another trait included into the current one)
[12:54:57] yorickpeterse: 2) methods that are fully implemented and ready to be used by a class (or another trait)
[12:55:11] yorickpeterse: when a trait is included in/applied to a class the trait's contents are basically copied over
[12:55:20] clocKwize: has joined #ruby
[12:55:21] yorickpeterse: instead of being injected into the ancestor chain of the class
[12:55:33] yorickpeterse: optionally methods can be renamed or excluded when imported into a class
[12:55:55] certainty: much like a module system
[12:56:01] certainty: not the ruby modules
[12:56:02] yorickpeterse: Ruby modules are mixins
[12:56:08] yorickpeterse: since traits can't add any instance variables
[12:56:16] yorickpeterse: thoguh Ruby modules can't specify required methods
[12:56:17] certainty: i mean the module system in languages in haskell or scheme
[12:56:38] clocKwize: has joined #ruby
[12:56:42] certainty: but constrained to behavior/functions only
[12:57:16] bruno-: has joined #ruby
[12:58:22] certainty: now that I think of it typeclasses are also somewhat akin to it (minus the renaming, exclusion thing)
[12:58:52] zlogan85: has joined #ruby
[12:58:55] charliesome: has joined #ruby
[12:58:55] yorickpeterse: eh, not entirely
[12:58:58] yorickpeterse: a trait can only specify methods
[12:59:07] yorickpeterse: while a module is usually just a container for whatever is defined in a file
[12:59:15] yorickpeterse: (module in the non Ruby sense)
[12:59:37] [k-_: a module is not a trait
[12:59:55] [k-_: although they are a collections of similar methods
[13:00:01] maloik: feature that had been in our app for over a year appeared broken... figured out it was due to a comma in jquery's .on() function separating the multiple events it had to listen to
[13:00:02] [k-_: they serve different purposes
[13:00:05] maloik: (tableflip)
[13:00:10] certainty: the word module is overloaded here
[13:00:11] [k-_: (??????????????????? ?????????
[13:00:34] sgambino: has joined #ruby
[13:00:38] [k-_: i have a table flip macro :D
[13:00:53] certainty: yorickpeterse: yes, that's what i meant when I said: "constrained to behavior/functions only". I wasn't clear here I think
[13:02:24] devoldmx: has joined #ruby
[13:02:26] Guest29473: has left #ruby: ()
[13:02:36] wldcordeiro: has joined #ruby
[13:02:48] leat4: has joined #ruby
[13:03:18] lkba_: has joined #ruby
[13:03:31] maloik: your macro doesn't appear right here because I still havent fixed my encoding
[13:03:36] Flipez-: has joined #ruby
[13:03:43] maloik: but oh well, priorities
[13:03:57] maloik: **continues to try and make a triple oreo cookie**
[13:04:09] maloik: just kidding, I'm not doing that
[13:04:13] maloik: I did that while waiting for my coffee
[13:04:42] bigredboots: has joined #ruby
[13:04:55] Rurik: has joined #ruby
[13:05:39] bluetuna: has joined #ruby
[13:06:13] ndrei: has joined #ruby
[13:08:11] atomical: has joined #ruby
[13:08:58] ruboto: here's a coffee, you seem to need it: ???
[13:10:08] pawnbox: has joined #ruby
[13:10:59] hinbody: has joined #ruby
[13:11:29] shevy: ruboto really has all the useful stuff inbuilt
[13:11:42] ruboto: shevy is the hound of baskerville (see http://irclog.whitequark.org/ruby/2015-08-13#13699759)
[13:11:47] [k-_: ???(?????????)??? ??? ???(?????????)??? ??? ???(?????????)???
[13:11:49] sankaber: has joined #ruby
[13:11:58] shevy: ack... even with timestamps
[13:12:43] bruno-: has joined #ruby
[13:13:09] [k-_: http://logs.ryanbigg.com/p/shevy/activity
[13:13:46] pawnbox_: has joined #ruby
[13:13:49] shevy: ack... an activity pattern
[13:14:17] shevy: aha! http://logs.ryanbigg.com/p/%5Bk-_/activity
[13:14:25] shevy: your nick isn't easy to type in an URL [k-_
[13:14:45] jdawgaz: has joined #ruby
[13:15:01] yorickpeterse: http://logs.ryanbigg.com/p/apeiros/activity well it's pretty clear who needs to stop slacking off
[13:15:40] daemonism: has joined #ruby
[13:16:34] shevy: apeiros was like dead silent at the beginning of 2015
[13:17:04] certainty: contrast that with the activity at #perl
[13:17:07] certainty: ACTION hides
[13:17:15] shevy: hey... perl 6 will revive perl
[13:17:26] shevy: it's already at 700 users!
[13:17:48] markoa: has joined #ruby
[13:17:57] [k-_: look at #haskell
[13:18:12] certainty: apeiros: is not active in #haskell i believe
[13:18:15] bruno-: has joined #ruby
[13:18:19] victortyau: has joined #ruby
[13:18:27] sharkman: has joined #ruby
[13:19:03] [k-_: ?crosspost certainty
[13:19:03] ruboto: certainty, Please do not crosspost without at least telling so and mentioning provided suggestions and their outcome in all channels. Experience shows that people don't do either, and not doing so is considered rude.
[13:19:23] certainty: how was that a crosspost? xD
[13:19:50] [k-_: the world works in mysterious ways, my friend
[13:19:55] certainty: i see i see
[13:20:01] Zai00: has joined #ruby
[13:20:47] dblessing: has joined #ruby
[13:21:03] momomomomo: has joined #ruby
[13:21:09] TvL2386: has joined #ruby
[13:22:04] platzhirsch: has joined #ruby
[13:22:20] shevy: yeah lots of people in #haskell
[13:22:30] leat4: has joined #ruby
[13:22:44] shevy: probably there are free cookies
[13:22:55] tkuchiki: has joined #ruby
[13:23:38] nw: has joined #ruby
[13:23:39] bruno-: has joined #ruby
[13:26:03] wldcordeiro: has joined #ruby
[13:29:05] bruno-: has joined #ruby
[13:29:22] platzhirsch: shevy: They are god-damn friendly folks
[13:29:36] athinggoingon: has joined #ruby
[13:29:43] platzhirsch: Very enlightened spirits roaming in #haskell
[13:30:14] Oka: has joined #ruby
[13:30:32] ljarvis: good ruby talk
[13:30:33] [k-_: unlike me :(
[13:30:53] Zai00: has joined #ruby
[13:31:00] Kallis: has joined #ruby
[13:31:41] charliesome: has joined #ruby
[13:31:42] Seich: has joined #ruby
[13:32:35] but3k4: has joined #ruby
[13:33:50] allomov: has joined #ruby
[13:33:59] shevy: [k-_ you just happen to like haskell the most here :>
[13:34:30] bruno-: has joined #ruby
[13:34:46] certainty: that's not true
[13:34:52] certainty: or probably it is true
[13:35:05] leat4: has joined #ruby
[13:35:06] yorickpeterse: anybody here using Lotus for serious internet business?
[13:35:12] certainty: nope not yet
[13:35:19] yorickpeterse: trying to see how people's experiences are with it
[13:35:28] certainty: ACTION same
[13:35:37] yorickpeterse: definitely looks interesting, but it's a risky choice
[13:35:39] kobain: has joined #ruby
[13:35:44] shevy: Lotus? the office suite from the 1990s?
[13:35:51] certainty: shevy: lotus.rb
[13:36:16] [k-_: lotus.jrb
[13:36:26] beast_: lotus looks sexy
[13:36:50] malconis: has joined #ruby
[13:36:52] Rollabunna: has joined #ruby
[13:36:56] maloik: speaking of srs business, I'm looking into elixir right now... very pleasant experience so far
[13:37:03] maloik: I can see it going places (along with phoenix)
[13:37:17] rbennacer: has joined #ruby
[13:37:18] certainty: it rises like phoenix?
[13:37:39] maloik: yes, except that would imply it having died before
[13:37:49] certainty: phoenix is a library for elixir? pardon my ignorance
[13:38:07] [k-_: havenwood will tell you more!
[13:38:08] certainty: oh it's a framework
[13:38:11] [k-_: oh, he isnt here
[13:38:16] maloik: framework indeed
[13:38:52] maloik: still working on elixir so I haven't looked into it yet, but from a distance it feels like it was inspired by rails, just more lightweight and with a little less magic
[13:39:16] sdwrage: has joined #ruby
[13:39:52] bruno-: has joined #ruby
[13:39:55] Rurik: has joined #ruby
[13:40:16] OrbitalKitten: has joined #ruby
[13:40:37] certainty: maloik: what's the nicest thing about elixir so far?
[13:41:04] platzhirsch: shevy: people just really enjoy writing Haskell, if you ask a question, they solve it for you
[13:41:13] maloik: what's caught my attention so much more than say Go or whatever is its community and leadership
[13:41:14] zlogan2003: has joined #ruby
[13:41:24] niemcu: and speaking of frameworks, what do you guys think about Volt?
[13:41:34] maloik: the fact that its syntax is a little like ruby, and some of the ideologies as well, really helps
[13:41:36] ljarvis: yorickpeterse: lotus is great, but not for srs business yet
[13:42:08] maloik: also, phoenix seems to be the "approved" framework by the elixir team so to speak... if you look at go, there's like over 9000 you need to evaluate
[13:42:23] yorickpeterse: ljarvis: how so?
[13:42:26] s00pcan: has joined #ruby
[13:42:51] ljarvis: yorickpeterse: it's just too young at the moment (for me to invest in, that is). But I really like the look of it
[13:43:09] yorickpeterse: the pros/consts we've gathered so far are...
[13:43:31] yorickpeterse: err where did I put this
[13:43:44] ljarvis: try /documents/rants
[13:43:44] certainty: maloik: ok thanks
[13:43:52] Dopagod: has joined #ruby
[13:44:04] juanpablo_: has joined #ruby
[13:44:29] yorickpeterse: https://gist.github.com/YorickPeterse/9926d9fe3e9d5388c1c6
[13:44:38] yorickpeterse: I then added...
[13:44:38] _blizzy_: has joined #ruby
[13:45:00] ljarvis: "Been around for three years" lul
[13:45:04] yorickpeterse: https://gist.github.com/YorickPeterse/9926d9fe3e9d5388c1c6#file-gistfile1-txt-L22-L30
[13:45:28] yorickpeterse: basically if I wasn't leaving I'd take the risk
[13:45:47] yorickpeterse: ah yes, soon all I have to do is fix Rails performance issues
[13:45:47] tkuchiki: has joined #ruby
[13:45:48] ljarvis: for your big/main app? or smaller apps?
[13:45:51] yorickpeterse: and libgit2 performance issues
[13:45:55] yorickpeterse: ljarvis: for now for one app
[13:45:59] yorickpeterse: but it would be the toolbelt for the future
[13:46:12] [k-_: that was a lacklustre argument
[13:46:18] bluetuna: I have a :git sourced gem, if I run bundle install it doesn't show up in the gem list
[13:46:20] yorickpeterse: basically we're looking into if we want to move away from Rails engines to something a bit less activepainful
[13:46:54] yorickpeterse: also apparently pry doesn't really work https://github.com/lotus/lotus/issues/205
[13:46:56] ljarvis: the biggest issue for me is one you haven't listed; third-party tools. Our gemfile is packed full of stuff we pull in because there are companies/people decicated to maintaining hard to build software. I'm not prepared for us to start writing some of that stuff ourselves
[13:47:03] yorickpeterse: and from what I gather it also has some issues on JRuby 9k
[13:47:13] yorickpeterse: ljarvis: it's there IIRC
[13:47:14] ljarvis: ah you mention ecosystem, so basically the same
[13:47:18] platzhirsch: yorickpeterse: drop that goofy emoticon
[13:47:21] yorickpeterse: platzhirsch: what?
[13:47:28] yorickpeterse: haters gonna hate ???(???)???
[13:47:36] platzhirsch: Be a serious man
[13:47:41] yorickpeterse: (it's actually set to : haters : minus the spaces)
[13:47:45] iateadonut: has joined #ruby
[13:48:45] Igorshp: has joined #ruby
[13:49:14] [k-_: * ****** *?
[13:49:22] [k-_: is that your password?
[13:49:29] jobewan: has joined #ruby
[13:49:43] yorickpeterse: No, it's *******
[13:50:24] ljarvis: inb4 hunter2
[13:51:06] yorickpeterse: hence 7 characters
[13:53:22] leat4: has joined #ruby
[13:53:34] yorickpeterse: I just have an impeccable sense of humor
[13:53:42] apt-get_: has joined #ruby
[13:54:17] yorickpeterse: I just walk into a bar and be like, hey, wanna see my XML parser?
[13:54:25] yorickpeterse: (the first joke is that I don't go into bars)
[13:54:38] maloik: do you powerslide in?
[13:54:44] ljarvis: "sure, is it as fast as Nokogiri?" *necks shot and walks out*
[13:55:05] haxrbyte: has joined #ruby
[13:55:20] yorickpeterse: ljarvis: come say that to my face tough guy
[13:55:26] sharkman: im coding ruby now
[13:55:31] bruno-: has joined #ruby
[13:55:32] yorickpeterse: also actually xpath is now faster than nokogiri in certain cases
[13:55:34] ljarvis: yorickpeterse: <3
[13:55:36] Jammyhammy|Work: has joined #ruby
[13:55:37] platzhirsch: sharkman: that is so good
[13:55:41] morenoh149: has joined #ruby
[13:55:51] sharkman: thanks platzhirsch, you too
[13:56:02] platzhirsch: I know ???(???)???
[13:56:24] yorickpeterse: stop stealing my emoji
[13:56:46] Mives: has joined #ruby
[13:57:17] platzhirsch: It's an emoticon sir
[13:57:30] yorickpeterse: EMOJI, this is not MSN
[13:57:39] platzhirsch: No Emojis are based on Unicode
[13:57:44] sharkman: can i swear on this channel
[13:57:47] yorickpeterse: platzhirsch: so is this
[13:57:49] beast_: I'm in love with Ruby, she is so elegant and beautiful that I never want to leave her...
[13:57:49] sharkman: would i get killed if i do
[13:57:55] platzhirsch: (??????????????????? ????????? vs.????
[13:58:02] platzhirsch: yes, but it is one character unicode
[13:58:07] yorickpeterse: it's still unicode
[13:58:10] bronson: has joined #ruby
[13:58:14] platzhirsch: yes, that doesn't make it an emoji
[13:58:22] yorickpeterse: sharkman: it's preferred not to swear like a sailor
[13:58:34] yorickpeterse: * to not swear
[13:58:49] casadei_: has joined #ruby
[13:58:54] sharkman: but i could swear occasionally like esp. if its funny right
[13:59:30] armyriad: has joined #ruby
[13:59:55] platzhirsch: yorickpeterse: http://unicode.org/reports/tr51/
[14:00:09] platzhirsch: http://unicode.org/reports/tr51/#Emoticons
[14:00:27] krz: has joined #ruby
[14:00:34] yorickpeterse: I know what emoji are
[14:00:50] yorickpeterse: and I'm still going to call ???(???)??? emoji
[14:00:53] bruno-: has joined #ruby
[14:01:03] Soda: has joined #ruby
[14:01:03] adaedra: ???(???)???
[14:01:04] Zai00: has joined #ruby
[14:01:08] yorickpeterse: as the young ones would say: "sex the police"
[14:01:14] [k-_: sharkman: Social norms says not to
[14:01:25] [k-_: Only when appropriate
[14:01:37] freerobby: has joined #ruby
[14:01:37] ljarvis: oh fuck of active record
[14:01:38] OrbitalKitten: has joined #ruby
[14:01:45] sharkman: k im gonna try to do it now
[14:01:56] sharkman: im listening to fucking casino royale theme song
[14:01:59] Ropeney: has joined #ruby
[14:02:03] sharkman: to amp me up to code ruby
[14:02:05] ljarvis: that is not a good enough reason
[14:02:08] Rurik: has joined #ruby
[14:02:53] hashrocket: has joined #ruby
[14:03:47] leat4: has joined #ruby
[14:03:48] bmurt: has joined #ruby
[14:04:01] Igorshp: has joined #ruby
[14:05:53] prosody: ACTION sings _why _mis _why _mis as your backbeat to help you focus.rb
[14:06:01] sevin: has joined #ruby
[14:06:02] sharkman: wait what is focus.rb
[14:06:04] sharkman: i dont have that file
[14:06:11] shevy: you drama queens!
[14:06:35] prosody: (<3) )) ) or (<C)? :)
[14:06:44] redondos: has joined #ruby
[14:06:52] Rubie: has joined #ruby
[14:07:26] michael_mbp: has joined #ruby
[14:07:26] phreakocious: has joined #ruby
[14:07:36] Zai00: has joined #ruby
[14:07:48] certainty: shevy: you drama queen!
[14:07:54] blackjid: has joined #ruby
[14:08:01] nifoc: has joined #ruby
[14:08:43] riotjones: has joined #ruby
[14:08:51] rcs: has joined #ruby
[14:09:09] ruboto: this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related topics. Thanks!
[14:09:13] UtkarshRay: has joined #ruby
[14:09:26] ineb: has joined #ruby
[14:10:00] Kricir: has joined #ruby
[14:10:47] juanpablo_: has joined #ruby
[14:11:23] whippythellama: has joined #ruby
[14:11:26] michael_mbp: has joined #ruby
[14:11:29] jas02: has joined #ruby
[14:11:58] khebbie: has joined #ruby
[14:12:14] Rurik: has joined #ruby
[14:12:22] prefixed: has joined #ruby
[14:13:09] Klumben: has joined #ruby
[14:13:47] jgpawletko: has joined #ruby
[14:14:44] fmcgeough: has joined #ruby
[14:15:49] bigbadbear: has joined #ruby
[14:16:21] umgrosscol: has joined #ruby
[14:17:34] Mives: has joined #ruby
[14:18:47] Mives: has joined #ruby
[14:19:19] sharkman: is there a way to do this
[14:19:26] sharkman: 3.between?(1..5)
[14:19:30] Mives: has joined #ruby
[14:19:31] Swappticon: has joined #ruby
[14:19:36] sharkman: right now it requires two arguments, like 3.between?(1, 5)
[14:19:55] adaedra: >> (1..5).include? 3
[14:19:56] ruboto: adaedra # => true (https://eval.in/431223)
[14:20:12] beast_: (1..5) === 3
[14:20:24] [k-_: it does not make sense for between to have one argument only, anyway
[14:20:32] karapetyan: has joined #ruby
[14:20:35] adaedra: I think it's bad style to use ===
[14:20:40] sharkman: what does this === do? ive never seen it before
[14:20:40] rbennacer: has joined #ruby
[14:20:51] adaedra: it's #===, used for case
[14:20:52] [k-_: case equality
[14:21:00] [k-_: &ri Object#===
[14:21:00] Guest68297: http://www.rubydoc.info/stdlib/core/Object#%3D%3D%3D-instance_method
[14:21:04] dopamean_: has joined #ruby
[14:21:10] [k-_: ha, adaedra, look
[14:21:12] [k-_: poor `derpy
[14:21:18] dravine: has joined #ruby
[14:21:23] bruno-: has joined #ruby
[14:21:24] imperator: has joined #ruby
[14:21:28] adaedra: And I can't rename it right now
[14:21:41] sharkman: okay well here is my code, how would you recommend i change it? i dont like it now because the 2nd line of code is so long
[14:21:42] sharkman: football_weeks.each do |football_week|
[14:21:42] sharkman: if @date.between?(football_week.start_date, football_week.end_date)
[14:21:43] sharkman: return football_week.week
[14:21:50] adaedra: ?gist sharkman
[14:21:50] ruboto: sharkman, https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
[14:21:58] enebo: has joined #ruby
[14:22:25] adaedra: looks ok to me tho
[14:22:55] blackjid: has joined #ruby
[14:23:16] zlogan2003: has joined #ruby
[14:23:26] sharkman: how would i use find here? isnt that for locating rails entries via their ID
[14:23:44] adaedra: &ri Enumerable#find
[14:23:44] Guest68297: http://www.rubydoc.info/stdlib/core/Enumerable#find-instance_method
[14:23:58] jgt1: has joined #ruby
[14:24:08] aganov: has joined #ruby
[14:24:23] Alayde: has joined #ruby
[14:24:30] adaedra: I should have precised the class, my bad
[14:25:00] bkxd: has joined #ruby
[14:25:11] rushed: has joined #ruby
[14:25:46] jgpawletko: has joined #ruby
[14:25:48] [k-_: football_week.week?
[14:26:16] Mives: has joined #ruby
[14:26:37] havenwood: has joined #ruby
[14:27:02] Hrorek: has joined #ruby
[14:27:12] k3asd`: has joined #ruby
[14:27:30] dopie: has joined #ruby
[14:28:32] symm-: has joined #ruby
[14:29:24] [k-_: hello to your face!
[14:29:46] radgeRayden: has joined #ruby
[14:30:31] xcesariox: has joined #ruby
[14:31:06] OrbitalKitten: has joined #ruby
[14:31:42] acke: has joined #ruby
[14:31:49] bruno-: has joined #ruby
[14:32:04] c0m0: has joined #ruby
[14:32:08] terlar: has joined #ruby
[14:33:00] Mives: has joined #ruby
[14:33:43] karapetyan: has joined #ruby
[14:33:56] webopsx: has joined #ruby
[14:34:04] Zai00: has joined #ruby
[14:34:11] sonjab: has left #ruby: (".")
[14:35:42] saddad: has joined #ruby
[14:36:16] c0ncealed: has joined #ruby
[14:37:09] bruno-: has joined #ruby
[14:37:39] mary5030: has joined #ruby
[14:39:06] ruurd: has joined #ruby
[14:42:57] justin_pdx: has joined #ruby
[14:43:52] bigredboots: has joined #ruby
[14:44:09] sebyx07: has joined #ruby
[14:44:15] mustmodify_: has joined #ruby
[14:44:26] tkuchiki: has joined #ruby
[14:44:49] wldcordeiro: has joined #ruby
[14:45:03] fostertheweb: has joined #ruby
[14:45:11] freetimeruby: has joined #ruby
[14:45:33] [k-_: hello to your face!
[14:45:37] freetimeruby: why 2.methods doesnt have between? method
[14:46:15] [k-_: they have .include?
[14:46:21] freetimeruby: https://rubymonk.com/learning/books/1-ruby-primer/chapters/6-objects/lessons/36-more-objects-and-methods
[14:46:29] mustmodify_: using ruby 2.2.3 and bundler, I'm seeing an issue where bundler says a gem failed to install, but I'm able to install it using `gem install xxx`. Then another 10 or 20 gems later, another fails. just bundling again does not work. Any ideas?
[14:47:12] shevy: freetimeruby you must invoke it on the correct object
[14:47:20] karapetyan: has joined #ruby
[14:47:32] freetimeruby: 2.methods.sort
[14:47:53] dionysus69: has joined #ruby
[14:47:54] EXID123: has joined #ruby
[14:48:03] shevy: 4.between? 2,5
[14:48:43] wmoxam: freetimeruby: what version of Ruby are you running?
[14:48:51] freetimeruby: what does 4.methods give
[14:49:02] shevy: 4.between? works here
[14:49:13] UtkarshRay: has joined #ruby
[14:49:15] shevy: ruby 2.2.3p173 (2015-08-18 revision 51636) [x86_64-linux]
[14:49:21] EXID123: has joined #ruby
[14:49:52] ljarvis: wtf, formtastic doesn't allow you to change the label html attributes?
[14:49:53] weemsledeux: has joined #ruby
[14:49:58] freetimeruby: searched in docs too http://ruby-doc.org/core-2.2.3/Integer.html
[14:50:00] ruurd: has joined #ruby
[14:50:03] Zai00: has joined #ruby
[14:50:17] freetimeruby: there is no between method
[14:50:26] shevy: freetimeruby yeah it gets mixed in, it can be found here -> http://ruby-doc.org/core-2.2.1/Comparable.html#method-i-between-3F
[14:50:29] wldcordeiro: has joined #ruby
[14:51:31] freetimeruby: ruby is really hard
[14:52:23] shevy: the docs can be weird
[14:52:48] shevy: there should be a way to view all mixed-in methods, perhaps in different colours or something like that
[14:53:14] EXID123: has joined #ruby
[14:53:20] symm-: has joined #ruby
[14:53:21] freetimeruby: i dont know what is mixed in methods
[14:53:44] shevy: it's just if you usually do "include Module", the methods from that module will become available to your class
[14:53:59] shevy: the idea is to make it easier to re-use code
[14:54:08] mustmodify_: has left #ruby: ()
[14:54:15] freetimeruby: how its available to Integer class i dont get it shevy
[14:54:17] shevy: subclassing works in a somewhat similar way, but single-path
[14:54:21] shevy: freetimeruby for instance:
[14:54:29] freetimeruby: isnt Integer is already predefined
[14:54:30] a346: has joined #ruby
[14:54:30] Rurik: has joined #ruby
[14:54:39] shevy: class Integer; include Comparable; end
[14:54:54] shevy: I think this is defined on the C level actually... let me search...
[14:55:17] polishdub: has joined #ruby
[14:55:57] shevy: ok so Comparable resides in the C file compar.c
[14:56:00] wldcordeiro: has joined #ruby
[14:56:20] linuxboytoo: has joined #ruby
[14:56:31] thang: has joined #ruby
[14:56:40] sharkman: this is psuedo code, how do i make this work
[14:56:40] sharkman: https://gist.github.com/anonymous/8b08a227005a52d1725e
[14:56:46] c0ncealed: has joined #ruby
[14:56:54] banister: has joined #ruby
[14:57:04] Shoutsid: has joined #ruby
[14:57:08] Mon_Ouie: If you look at ri Numeric, it will say that the Numeric class (which is Integer's superclass) includes the module Comparable. This means that all of Comparable's instance methods are also available to integers.
[14:57:12] Ox0dea: has joined #ruby
[14:57:20] thang: has joined #ruby
[14:57:35] Mon_Ouie: sharkman: Using if/elsif
[14:57:38] sharkman: week is passed to the case statement, and in a couple situations i want to convert it to an integer to analyze
[14:57:42] Ox0dea: Mon_Ouie: No.
[14:58:04] freetimeruby: docs should say all
[14:58:06] shevy: freetimeruby aha, found it... rb_include_module(rb_cNumeric, rb_mComparable); in the file numeric.c - this may be hard to read but this should be equivalent to "include Comparable" in pure ruby
[14:58:20] shaman42: has joined #ruby
[14:58:48] Ox0dea: sharkman: Ruby 2.3 defines #positive? and #negative? on Integers, but I imagine you're not using 2.3. :/
[14:59:00] sharkman: lol no im not
[14:59:11] freetimeruby: i'm afraid to do any actual work in ruby :! u dont have actual docs
[14:59:16] Ox0dea: sharkman: You can use `when -> n { n < 0 }`.
[14:59:20] sharkman: too bad it cant work on a case statement. it would look nicer that way
[14:59:22] podman: has joined #ruby
[14:59:26] Ox0dea: sharkman: See above.
[14:59:28] shevy: freetimeruby yeah, it's only for the brave :>
[14:59:32] Ox0dea: You can get close enough.
[14:59:41] Mon_Ouie: The docs do say it. You can use 'ri Integer#between?' and it will show the documentation from Enumerable
[14:59:42] Ox0dea: freetimeruby: Bollocks.
[14:59:46] Mon_Ouie: Comparable*
[15:00:01] ruurd: has joined #ruby
[15:00:12] freetimeruby: docs say anything and still you can use it
[15:00:17] gener1c: has joined #ruby
[15:00:32] shevy: you include a module freetimeruby so the methods are available
[15:00:47] Ox0dea: >> Enumerable.instance_methods.size # freetimeruby
[15:00:48] ruboto: Ox0dea # => 51 (https://eval.in/431227)
[15:00:58] tjohnson: has joined #ruby
[15:00:59] Ox0dea: All you have to do is define #each on your class and you get 50 other methods for free.
[15:01:04] binoymichaelp: has joined #ruby
[15:01:07] Ox0dea: Mixins are fookin' awesome.
[15:01:34] shevy: freetimeruby try to use ri as Mon_Ouie showed
[15:01:40] freetimeruby: is it like inheritance to particular class ?
[15:01:52] Ox0dea: freetimeruby: No, it's composition.
[15:02:17] Mon_Ouie: Yes, including modules is similar to inheriting from a class. Adds an entry to the ancestry chain in the same way.
[15:02:42] Ox0dea: I'd argue that's an implementation detail.
[15:02:47] freetimeruby: any class can access this ?
[15:03:07] shevy: inheritance is similar but stricter; a subclass can have only one direct parent class
[15:03:10] devoldmx: has joined #ruby
[15:03:14] shevy: but you can include as many modules as you want to into your class
[15:03:32] Ox0dea: It's "multiple composition". :P
[15:03:40] Ox0dea: >> Class.instance_methods.include?(:include) # freetimeruby: Yes.
[15:03:41] ruboto: Ox0dea # => true (https://eval.in/431228)
[15:04:07] dblessing: has joined #ruby
[15:04:16] dopie: has joined #ruby
[15:04:26] Mon_Ouie: I'd argue it's not composition at all. The same object gets all the methods and all the state. You're not composing multiple objects together.
[15:04:28] shevy: freetimeruby your class can access it if you do a "include" statement inside, so for instance: class Car; include Doors; end <--- the car may have Doors. In this case, subclassing might not make equal sense... like class Car < Door
[15:04:50] mprelude: has joined #ruby
[15:05:15] freetimeruby: words = ["foo", "bar", "baz"] words.[](1)
[15:05:22] freetimeruby: its gives error
[15:05:28] freetimeruby: so i tried this
[15:05:39] wldcordeiro: has joined #ruby
[15:05:41] iBrito: has joined #ruby
[15:06:00] Ox0dea: >> words = ["foo", "bar", "baz"]; words.[](1) # freetimeruby
[15:06:01] ruboto: Ox0dea # => "bar" (https://eval.in/431229)
[15:06:06] shevy: now how did you find 1.+(3)
[15:06:13] Ox0dea: freetimeruby: Statements must be separated with semicola or newlines.
[15:06:23] shevy: isn't it more natural for people to do 1 + 3 ?
[15:06:32] dgutierrez1287: has joined #ruby
[15:06:59] grenierm: has joined #ruby
[15:07:20] freetimeruby: ur right Ox0dea
[15:07:35] bruno-: has joined #ruby
[15:07:53] Ox0dea: I hope he's not gone off to commit Sudoku.
[15:08:12] shevy: I dunno...
[15:08:13] chouhoul_: has joined #ruby
[15:09:02] Mon_Ouie: Today is also world Sudoku awareness day
[15:09:04] shevy: can not use semicolon but can use advanced syntax...
[15:09:11] TPBallbag: has joined #ruby
[15:10:46] Sou|cutter: has joined #ruby
[15:10:58] Ox0dea: Wow, a third of all Sudoku is played with pesticides?
[15:12:27] Sigma00: has joined #ruby
[15:15:33] okay: has joined #ruby
[15:17:56] Oka: has joined #ruby
[15:17:56] mary5030: has joined #ruby
[15:18:13] michaeldeol: has joined #ruby
[15:19:08] Shoutsid: has joined #ruby
[15:19:30] finisherr: has joined #ruby
[15:20:06] dblessing: has joined #ruby
[15:20:42] sebyx07: has left #ruby: ()
[15:21:22] youknownothing: has joined #ruby
[15:21:29] Shoutsid: has joined #ruby
[15:21:29] ruboto: Though inclusion was probably intended, not everyone relates to being "one of the guys". Maybe consider using "folks", "all", "y'all", or "everyone" instead?
[15:21:30] youknownothing: http://dictionary.reference.com/browse/guy
[15:21:44] youknownothing: claiming "guys" is sexist is actually sexist
[15:22:04] Ox0dea: youknownothing: Get out, Jon Starkgaryen.
[15:22:23] youknownothing: i demand the removal of the ?guys alias
[15:22:39] Ox0dea: You will be assimilated.
[15:22:42] shevy: you have to convince apeiros :>
[15:22:44] youknownothing: it should not be allowed to be used in #ruby
[15:22:48] dionysus69: has joined #ruby
[15:22:48] imperator: pfft, stay out of the midwest US then
[15:22:53] imperator: "yous guys"
[15:23:07] youknownothing: imperator: does that phrase exclude females?
[15:23:08] roxtrongo: has joined #ruby
[15:23:20] RegulationD: has joined #ruby
[15:23:23] imperator: youknownothing, nope, it's like "y'all" but the northern version
[15:23:23] youknownothing: im guessing "no"
[15:23:26] Ox0dea: youknownothing: Are all females of like mind?
[15:23:30] niemcu: has joined #ruby
[15:23:42] youknownothing: the ?guys alias is offensive and sexist
[15:23:51] Mon_Ouie: !mute youknownothing troll
[15:23:51] ruboto: +q youknownothing!*@*
[15:23:51] ruboto: -o ruboto
[15:28:15] eam: it's not sexist, but it certainly is culturally insensitive and dogmatic
[15:28:22] sufyan```: has joined #ruby
[15:28:52] Shoutsid: has joined #ruby
[15:28:59] imperator: guys! GAIZ! settle down
[15:29:07] leat4: has joined #ruby
[15:29:41] jas02: has joined #ruby
[15:29:42] eam: https://rubygems.org/gems/guys
[15:29:43] Ox0dea: eam: I like how it's not crystal-clear for which side you're arguing.
[15:29:48] Oog: has joined #ruby
[15:30:06] eam: Ox0dea: isn't that the best kind of insight?
[15:30:54] eam: I have to be careful though; everyone hates a moderate
[15:31:22] camm2: has joined #ruby
[15:31:25] Ox0dea: ~ $ pacaur -Ss guys
[15:31:28] Ox0dea: aur/fortune-mod-tgagaapp 1403181321-1 (4, 0.88)
[15:31:30] Ox0dea: Fortune quotes from Two Guys, a Girl and a Pizza Place
[15:31:35] Ox0dea: Why didn't they just call it "Three Guys and a Pizza Place", hm?
[15:31:43] eam: what gender is the pizza place?
[15:31:50] shmilan: has joined #ruby
[15:31:52] Ox0dea: Ah, good observation.
[15:32:15] camm2: Hi guys, may you know a style guide for writing documentation with rdoc?
[15:32:22] eam: Ox0dea: might be three girls though
[15:32:23] shevy: camm2 yes rubocop
[15:32:36] Ox0dea: eam: How does that follow?
[15:32:42] shevy: https://github.com/bbatsov/rubocop
[15:32:49] shevy: https://github.com/bbatsov/ruby-style-guide
[15:32:56] eam: Ox0dea: well, "guys" is gender neutral in some local dialects
[15:33:00] Ox0dea: eam: There would be at most two girls if the piza place identified as female.
[15:33:11] eam: (thus the whole kerfluffle)
[15:33:13] Ox0dea: "Two Guys and Two Gals (One of Whom Is a Pizza Place)"
[15:33:27] camm2: Thank you.
[15:33:42] imperator: man, now i'm hungry for pizza
[15:34:00] leat4: has joined #ruby
[15:34:04] camm2: The next time I'll say: Hi, everyone. xD
[15:34:10] camm2: has left #ruby: ()
[15:34:12] tkuchiki: has joined #ruby
[15:34:25] eam: Ox0dea: just like how various nouns change between masculine and feminine between languages
[15:34:36] Ox0dea: That's an implementation detail.
[15:34:42] eam: it all is
[15:34:49] Ox0dea: Prove it.
[15:35:01] Ox0dea: At least, tell me where Peano went wrong.
[15:35:29] shevy: imperator I think that is the secret plan
[15:35:35] shevy: both eam and Ox0dea must work for some pizza brand
[15:35:41] paulcsmith: has joined #ruby
[15:35:45] Ox0dea: has left #ruby: ("He's onto us!")
[15:35:46] jmanpa: has joined #ruby
[15:35:48] eam: Ox0dea: he didn't eat enough pizza; no one does
[15:36:38] Kyle__: has joined #ruby
[15:36:42] chouhoulis: has joined #ruby
[15:36:53] shevy: pizza can be quite expensive
[15:37:01] tomchapin: has joined #ruby
[15:37:04] bmurt: has joined #ruby
[15:37:09] RobertBirnie: has joined #ruby
[15:37:12] imperator: this whole thing reminds of that colin quinn bit
[15:37:58] Kyle__: Is there a standard pretty-print for ruby source like there is for C? I've tried googling, but the results are all about the built-in PrettyPrint or awesome_print modules, which appear to be for the REPL loop, and not for formatting an existing source-code file.
[15:38:32] imperator: kyle__, you can use rubocop
[15:39:07] rcvalle: has joined #ruby
[15:39:22] Kyle__: imperator: I thought that was a lint like thing, to identify possible issues?
[15:39:35] eam: shevy: it's expensive because it's worth it
[15:39:55] imperator: kyle__, you can automatically apply your rules as well
[15:40:43] Kyle__: imperator: Ahh. I never knew that.
[15:40:47] Kyle__: Thank you.
[15:41:01] imperator: and you can hook it into vim, too
[15:41:27] RobertBirnie: has joined #ruby
[15:41:46] imperator: (maybe other editors, too, dunno)
[15:41:52] Ox0dea: has joined #ruby
[15:41:54] Macaveli: has joined #ruby
[15:42:10] Kyle__: Humm. I'm going to have to look this up.
[15:42:12] Ox0dea: /join should take a greeting argument.
[15:42:27] arup_r: has joined #ruby
[15:42:39] Ox0dea: kyle__: Are you looking for something that could conceivable take an entire program mushed into a single line and spit out pretty?
[15:42:51] but3k4_: has joined #ruby
[15:42:57] Ox0dea: *conceivably
[15:43:04] Ox0dea: There's rubyfmt: https://github.com/wojtekmach/rubyfmt
[15:43:20] Ox0dea: But Ruby's syntax is sufficiently insane that it almost certainly doesn't handle everything.
[15:43:20] Kyle__: Ox0dea: Yes. Because I sometimes bang out horrid things in irb, then realize I want to use them, and copy them out to a file.
[15:43:41] Ox0dea: kyle__: Well, as long as you're not doing anything too fancy, rubyfmt should do.
[15:44:35] Kyle__: I rarely do anything too fancy. But too ugly/batshit insane... that I do.
[15:45:02] leat4: has joined #ruby
[15:45:37] tomchapin: has joined #ruby
[15:46:13] fostertheweb: has joined #ruby
[15:48:08] fostertheweb: has joined #ruby
[15:48:11] Rollabunna: has joined #ruby
[15:51:02] howdoicomputer: has joined #ruby
[15:51:11] sharkman: is any1 else coding in here
[15:51:15] jxv: has joined #ruby
[15:51:30] vipaca: has joined #ruby
[15:51:49] Ox0dea: sharkman: I trust you appreciate the paradoxical nature of your inquiry.
[15:52:02] eGGsha: has joined #ruby
[15:52:03] mistergibson: has joined #ruby
[15:52:07] sharkman: whats paradoxy mean?
[15:52:31] jxv: has left #ruby: ("Leaving")
[15:52:47] Sigma00: it means getting doxxed in parallel
[15:52:49] Sigma00: be careful
[15:53:12] Ox0dea: Sigma00: That's generally how it's done.
[15:53:18] [k-_: mean what paradoxy:?
[15:53:31] but3k4: has joined #ruby
[15:53:43] ranchodev: has joined #ruby
[15:53:53] havenwood: sharkman: This is the Ruby programming language on IRC so there are a bunch of Rubyists writing code here.
[15:54:30] sharkman: me too. i asked two questions in here today and learned 2 new things allready
[15:54:42] anrgywombat: has joined #ruby
[15:55:20] anrgywombat: has left #ruby: ()
[15:55:34] leat4: has joined #ruby
[15:58:13] jmanpa: has joined #ruby
[15:58:14] bricker: has joined #ruby
[15:59:30] jmanpa: has joined #ruby
[16:00:13] pietr0: has joined #ruby
[16:00:51] ndrei: has joined #ruby
[16:00:54] shevy: I write a lot of ruby code
[16:01:06] segfalt: has joined #ruby
[16:01:19] shevy: I don't write a lot of very useful code though
[16:04:11] Ox0dea: I beg to differ: https://rubygems.org/gems/scan_for_http_links
[16:04:24] krz: has joined #ruby
[16:04:38] shevy: this is required in one project
[16:04:44] leat4: has joined #ruby
[16:05:21] j4cknewt: has joined #ruby
[16:05:49] shevy: class SnowmanArmy
[16:05:53] [k-_: aha! shevy's email
[16:06:39] shevy: don't email me, I have enough russian brideseekers and nigerian connections incoming
[16:07:38] mleung: has joined #ruby
[16:07:55] Ox0dea: Hey, why haven't those two joined forces yet?
[16:08:03] Ox0dea: 409 brides.
[16:08:48] tejasmanohar: has joined #ruby
[16:08:48] Ox0dea: Nigerian princesses with claims to the Iron Throne^W Curtain.
[16:09:16] shevy: for a while there also were some rails recruiters, usually in the UK
[16:09:16] chouhoulis: has joined #ruby
[16:09:22] shevy: I dunno why but apparently rails was popular in the UK
[16:09:24] fidalgo: has joined #ruby
[16:10:02] Ox0dea: Rails is popular from Azerbaijan to Zimbabwe.
[16:10:20] Ox0dea: Hey, fidalgo.
[16:11:14] petricore: has joined #ruby
[16:11:31] minotep: has joined #ruby
[16:11:33] fidalgo: I have a question regarding hieritance and constants. I have this example: https://gist.github.com/fidalgo/ef8ad2d31ad57787d588 why can't I use the constant SIDES ?
[16:11:45] towski_: has joined #ruby
[16:12:18] tsunamie: hi there, my ruby script is'nt working and I suspect it's because the hash won't let me split it http://pastebin.com/jpKDUZJD
[16:12:18] ruboto: tsunamie, as I told you already, please use https://gist.github.com
[16:12:52] amclain: has joined #ruby
[16:12:55] Ox0dea: fidalgo: The error message is quite clear about the problem.
[16:13:02] shevy: ohhhh ruboto keeps track?
[16:13:12] autrilla: has joined #ruby
[16:13:17] Ox0dea: fidalgo: You're trying to access Shape::SIDES, which doesn't exist since you're declaring it separately in the subclasses.
[16:13:36] MichaelSmith: has joined #ruby
[16:13:47] pawnbox: has joined #ruby
[16:13:52] shevy: tsunamie you should add the specific error + line of error; also pastebin is inferior to gist and other pasties
[16:14:09] fidalgo: Ox0dea: I understand in part, but I'm creating an Triangle instance...
[16:14:14] leslie: has joined #ruby
[16:14:15] leslie: has joined #ruby
[16:14:33] Ox0dea: fidalgo: Yes, but Triangle gets its initializer from Shape.
[16:15:05] fidalgo: Ox0dea: so I need to use an instance var to hold the number of sides, right?
[16:15:06] Mon_Ouie: fidalgo : Doesn't matter, the list of classes where constants are looked up inside the method body is figured out at the moment when the method is defined, not called
[16:15:16] Ox0dea: fidalgo: No, you could just use `self.class::SIDES`.
[16:15:29] dfockler: has joined #ruby
[16:15:54] fostertheweb: has joined #ruby
[16:15:57] fidalgo: Ox0dea: great!!! thanks!
[16:16:00] Ox0dea: Happy to help.
[16:17:19] tsunamie: shevy, http://hastebin.com/odexawojas.vbs
[16:18:27] tsunamie: shevy, sorry wrong one one sec
[16:19:06] tsunamie: shevy, http://hastebin.com/aqibujeqib.vbs
[16:19:47] darix: tsunamie: that doesnt look like valid json indeed
[16:20:02] dionysus69: has joined #ruby
[16:20:53] shevy: tsunamie you call .split on a hash
[16:20:56] dmolina: has joined #ruby
[16:21:39] tsunamie: shevy, I call split on a key in a hash
[16:21:44] karapetyan: has joined #ruby
[16:22:07] tsunamie: as you can see from the script. I take the key value which has a / in the middle of it to deperate the group id and the artifact id f the app and split it.
[16:22:17] Ox0dea: tsunamie: `packages` is an array of Hashes.
[16:23:03] Ox0dea: Thus, in `packages.each { |key, value| ... }`, `key` is a Hash and `value` is `nil`.
[16:23:12] techminer: has left #ruby: ()
[16:23:24] lkba: has joined #ruby
[16:23:30] tsunamie: Ox0dea, does that mean I am also iterating throught the values in correctly?
[16:23:54] brendan-: has joined #ruby
[16:24:02] shevy: well your code is put under the assumption that you have a hash
[16:24:04] RobertBirnie: has joined #ruby
[16:24:10] shevy: you could try to ensure that, before calling .each
[16:24:17] Ox0dea: tsunamie: I think it's more likely the case that you've chosen the wrong data structure.
[16:24:37] Ox0dea: You probably want `{'example1'=>'1', 'example2'=>'2'}`.
[16:25:09] n008f4g_: has joined #ruby
[16:25:10] shevy: >> x = [{cat: 'tom', mouse: 'jerry'}]; x = Hash[*x]; x
[16:25:12] ruboto: shevy # => {:cat=>"tom", :mouse=>"jerry"} (https://eval.in/431242)
[16:25:13] leafybasil: has joined #ruby
[16:25:49] tsunamie: shevy, Ox0dea I need to stick with the data structure [{"com.examnple/test.apps":"0.0.1-SNAPSHOT-7"}] where multiple's of that can exist
[16:25:52] bruno-: has joined #ruby
[16:26:02] tsunamie: in an array
[16:26:08] dopie: has joined #ruby
[16:26:19] tsunamie: and process them as an when required as thats the format other systems share this information
[16:26:25] shevy: ok then you have an array right ;)
[16:27:06] negev: has joined #ruby
[16:27:13] banjara: has joined #ruby
[16:27:15] negev: p "/one/two/three/four.mp3".match(/\/(.*?)\z/)[1] why does non-greedy not work?
[16:27:16] Ox0dea: tsunamie: Could you clarify "multiples of that"?
[16:27:29] tsunamie: {"com.examnple/test2.apps":"0.0.1-SNAPSHOT-2"},{"com.examnple/test.apps":"0.0.1-SNAPSHOT-7"}
[16:27:46] Ox0dea: Right, so an Array of Hashes, but can those Hashes contain multiple key-value pairs, or is it always just the one?
[16:27:58] tsunamie: Ox0dea, ^^ example, multiple key/value pairs of applications tha
[16:28:08] Ox0dea: tsunamie: That's not multiple key-value pairs.
[16:28:17] Ox0dea: That's an Array of Hashes, and each Hash contains a single pair.
[16:28:29] tsunamie: Ox0dea, no, they will always be in the single formate as shown
[16:28:33] Igorshp: has joined #ruby
[16:28:49] Ox0dea: tsunamie: packages.each { |package| key, value = package.to_a }
[16:28:52] yeticry_: has joined #ruby
[16:28:55] rbennacer: has joined #ruby
[16:28:59] tsunamie: the loop I created should loop throught each has and perform an action based on each hash
[16:29:24] Maletor: has joined #ruby
[16:29:42] Ox0dea: tsunamie: Better than an Array of single-pair Hashes would be to just have one big Hash.
[16:30:06] Ox0dea: packages.reduce(:merge).each do { |key, value| ... }
[16:30:36] khebbie: has joined #ruby
[16:30:36] tsunamie: the array may change in size and I don't know what may come throught. All I know is what comes throught will bean array of hashs. With a possibilitiy of n hashs all in the same format. anything in another format is invalid
[16:31:06] wldcordeiro: has joined #ruby
[16:31:08] Ox0dea: tsunamie: You want packages.reduce(:merge).
[16:31:20] bruno-: has joined #ruby
[16:32:12] ytti: [1] pry(main)> Pathname.new('/one/two/three/four.mp3').each_filename.to_a'
[16:32:13] ytti: => ["one", "two", "three", "four.mp3"]
[16:32:18] Mon_Ouie: negev: I believe lazy repetitions means that it will stop matching as early as it can, but it still starts matching immediately.
[16:32:34] freerobby: has joined #ruby
[16:32:38] tsunamie: Ox0dea, thanks. reading http://nishacodes.tumblr.com/post/80652377352/using-reduce-aka-inject-in-ruby to understand what that does
[16:32:44] Mon_Ouie: (and of course, File.basename for that particular example)
[16:33:14] Ox0dea: >> [{1=>1}, {2=>2}, {3=>3}].reduce(:merge) # tsunamie
[16:33:15] ruboto: Ox0dea # => {1=>1, 2=>2, 3=>3} (https://eval.in/431246)
[16:33:49] Ox0dea: See how it goes from an Array of single-pair Hashes (not particularly useful) to a simple Hash (very useful)?
[16:34:01] hinbody_: has joined #ruby
[16:36:16] poguez_: has joined #ruby
[16:36:44] bruno-: has joined #ruby
[16:36:53] Ox0dea: tsunamie: Think of #reduce as taking a collection and some operator and just sticking the operator between each element.
[16:37:01] Ox0dea: >> [1, 2, 3].reduce(:+) == 1 + 2 + 3
[16:37:02] ruboto: Ox0dea # => true (https://eval.in/431249)
[16:37:05] bb010g: has joined #ruby
[16:37:21] centrx: has joined #ruby
[16:37:38] tsunamie: Ox0dea, okay, so I don't understand how to use that sorry for my ignorance
[16:37:49] tsunamie: give me a moment while I try to absorb what your teach me
[16:37:58] Rubie: has joined #ruby
[16:38:02] justin_pdx: has joined #ruby
[16:38:20] Trieste: has joined #ruby
[16:38:29] izzol: I need to create "really" nice graphs. There is any gem for that?
[16:38:46] Ox0dea: tsunamie: No worries. Maybe read up on what Hash#merge does first?
[16:39:06] imperator: izzol, https://www.ruby-toolbox.com/categories/graphing
[16:39:09] Ox0dea: > quotation marks for emphasis
[16:39:32] Pugsley: has joined #ruby
[16:40:16] izzol: imperator: thanks :-) nice list.
[16:40:39] saddad: has joined #ruby
[16:40:48] tsunamie: Ox0dea, thanks will be right back thanks for your patients with me. I just really want to understand this
[16:41:10] shmilan: has joined #ruby
[16:41:27] hinbody: has joined #ruby
[16:42:14] finisherr: has joined #ruby
[16:42:16] bruno-: has joined #ruby
[16:42:24] Outlastsheep: has joined #ruby
[16:43:39] bronson: has joined #ruby
[16:44:10] ekain: has joined #ruby
[16:44:16] craysiii: is there a way i can place many rescues into a block so i can do something after any one of them is triggered?
[16:45:23] shevy: craysiii isn't that how it is always done? begin; rescue Foo; rescue Bar; rescue Bla ?
[16:45:34] craysiii: i honestly don't know
[16:45:37] jhass: you can list multiple exceptions inside a rescue as well as add multiple rescue's
[16:45:41] shevy: and if they have to do the same, rescue Foo, Bar, Bla
[16:46:05] shevy: hmm I should test it ...
[16:46:08] craysiii: i haven't done much of any error handling
[16:46:18] Ox0dea: shevy: Yes, that's correct.
[16:46:35] Ox0dea: But you can't, for instance, say `rescue Foo => a, Bar => b`.
[16:46:44] rehat: has joined #ruby
[16:46:51] Ox0dea: Which is probably for the better, but still.
[16:46:59] shevy: craysiii ok but you know the exceptions you want to rescue?
[16:47:03] djbkd: has joined #ruby
[16:47:15] craysiii: yes i do, from the stripe api
[16:47:16] Mon_Ouie: You can `rescue Foo, Bar => a'
[16:47:21] cornerma1: has joined #ruby
[16:47:43] bruno-: has joined #ruby
[16:47:59] axisys: how do I add a check for this e = entry.mail.first so if not present instead of saying `method_missing': undefined method `mail' I like to feed entry.cn.first
[16:48:02] shevy: ok good then you are already done! begin; your_scary_code_here; rescue AllScaryExceptionsThere => error; p error; end
[16:48:10] craysiii: well i do want different code in each error handler, i just want to redirect to something in my rails app after regardless of which error.
[16:48:12] Ox0dea: Mon_Ouie: Is there still some rationale to it?
[16:48:16] Mon_Ouie: begin/rescue works kind of like case/when
[16:48:21] axisys: error detail: http://dpaste.com/0NNHD7P
[16:48:42] Mon_Ouie: What do you mean? You might want to do the same thing for multiple type of exceptions
[16:48:49] Ox0dea: Mon_Ouie: I meant `foo'.
[16:48:53] axisys: I like to say e = entry.mail.first || entry.cn.first if entry.mail.first not found
[16:49:02] SCHAAP137: has joined #ruby
[16:49:18] shevy: axisys you could check if it responds to a method first: if entry.respond_to? :mail
[16:49:21] rippa: has joined #ruby
[16:49:28] Ox0dea: axisys: entry.send(entry.respond_to?(:mail) ? :mail : :cn).first
[16:49:31] Ox0dea: Kinda gross, though.
[16:49:37] siemprefresco: has joined #ruby
[16:51:09] AccordLTN: has joined #ruby
[16:51:34] axisys: shevy, Ox0dea : thanks a lot!
[16:53:10] bruno-: has joined #ruby
[16:54:26] Jackneill: has joined #ruby
[16:54:36] sankaber: has joined #ruby
[16:54:43] Fraeon: has joined #ruby
[16:54:52] leat4: has joined #ruby
[16:54:52] last_staff: has joined #ruby
[16:54:58] rakm: has joined #ruby
[16:55:56] sharkman: how do i see if an array contains one entry of nil or more
[16:56:03] sharkman: something like, thearray.has_any?(nil)
[16:56:14] psy: has joined #ruby
[16:56:25] apeiros: .include?(nil)
[16:56:31] apeiros: @ sharkman
[16:56:38] sharkman: oh right thanks
[16:57:09] justin_pdx: has left #ruby: ()
[16:57:19] psy: has joined #ruby
[16:57:20] j4cknewt: has joined #ruby
[16:57:32] voltalio: has joined #ruby
[16:58:35] bruno-: has joined #ruby
[16:58:58] shmilan: i've been stuck for the past 2 hours and all I needed was '.include?'.. thanks, apeiros
[16:59:09] but3k4_: has joined #ruby
[16:59:52] Ox0dea: sharkman: There are in fact methods called #any?, #all?, #one?, and #none?, mind.
[17:00:10] Ox0dea: So if your array doesn't contain `false`, you could just use #all?.
[17:00:14] firstdayonthejob: has joined #ruby
[17:00:29] Ox0dea: (And negate it, of course.)
[17:00:30] RegulationD: has joined #ruby
[17:00:52] sharkman: okay, include seems pretty intuitive here
[17:01:07] sharkman: any sounds okay too...
[17:02:56] apeiros: any?, all?, one? and none? are quite nice for custom predicates. but in the given case, .include? is the most efficient and least code to write too
[17:03:05] shevy: it's like terse pseudo english
[17:03:13] Ox0dea: apeiros: They all stop as soon as they can.
[17:03:20] apeiros: Ox0dea: sure
[17:03:47] apeiros: but yielding is more expensive than calling #== from C
[17:03:55] devoldmx: has joined #ruby
[17:04:03] apeiros: as is iterating using #each instead of a counter in C
[17:04:08] Ox0dea: You're right.
[17:04:33] Ox0dea: Do you reckon #=== is slower than #==?
[17:05:01] apeiros: depends on the implementation of #===
[17:05:10] bmurt: has joined #ruby
[17:05:11] Ox0dea: https://bugs.ruby-lang.org/issues/11286
[17:05:28] shevy: Ox0dea should I use https://twitter.com/yukihiro_matz or rather https://twitter.com/matz_translated
[17:05:37] ramfjord: has joined #ruby
[17:05:40] Ox0dea: If that proposal went through, `any?(nil)` would be the same as `include?(nil)`.
[17:05:42] shevy: I am scared that I will equally well understand nothing at all...
[17:05:50] alphaatom: has joined #ruby
[17:06:01] Ox0dea: shevy: Do you not trust Google Translate? /s
[17:06:05] shevy: "herokujp: Japan guys your waiting has"
[17:06:09] shevy: ok this is yoda translate
[17:06:31] shevy: that has decided it - I'll go with the translation. While I don't understand anything, yoda is fun
[17:06:42] arup_r: has joined #ruby
[17:07:33] shevy: "yukihiro_matz come to us! Coding power becomes so 5 times"
[17:08:08] Ox0dea: >> [true, false, nil].map { |x| x.to_i rescue :/ }
[17:08:09] ruboto: Ox0dea # => [:/, :/, 0] (https://eval.in/431260)
[17:08:16] Ox0dea: I really feel like that should be [1, 0, 0].
[17:08:29] Rubie: has joined #ruby
[17:08:32] shevy: what's with those smileys in code
[17:09:01] Ox0dea: They are not smiling.
[17:09:03] bruno-: has joined #ruby
[17:09:28] xcesariox: has joined #ruby
[17:09:30] shadoi: has joined #ruby
[17:10:10] shevy: a sceptical smile
[17:10:14] RegulationD: has joined #ruby
[17:10:52] NightMonkey: has joined #ruby
[17:12:04] ruboto: shevy # => :"-]" (https://eval.in/431262)
[17:14:31] bruno-: has joined #ruby
[17:15:04] shadoi: has joined #ruby
[17:15:05] shmilan: has joined #ruby
[17:17:45] shadoi1: has joined #ruby
[17:17:57] bronson: has left #ruby: ()
[17:18:02] bronson: has joined #ruby
[17:18:24] veg: has joined #ruby
[17:20:14] redmaverick: has joined #ruby
[17:22:26] CorySimmons: has joined #ruby
[17:23:28] yardenbar: has joined #ruby
[17:23:29] Spami: has joined #ruby
[17:24:32] minimalism: has joined #ruby
[17:25:04] Hanmac: has joined #ruby
[17:25:11] ta: has joined #ruby
[17:27:01] naftilos76: has joined #ruby
[17:27:54] ta: has joined #ruby
[17:28:07] The_Phoenix: has joined #ruby
[17:28:22] n1lo: has joined #ruby
[17:29:03] voltalio: has joined #ruby
[17:29:40] bruno-: has joined #ruby
[17:30:16] renderful: has joined #ruby
[17:31:45] ht__: has joined #ruby
[17:31:52] skade: has joined #ruby
[17:32:10] n1lo: What means: * here: *'0'..'9' ?
[17:33:28] eladmeidar: has joined #ruby
[17:33:44] shevy: n1lo this might help: https://endofline.wordpress.com/2011/01/21/the-strange-ruby-splat/
[17:33:50] Ox0dea: >> [*?0..?9]
[17:33:51] ruboto: Ox0dea # => ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"] (https://eval.in/431275)
[17:35:04] bruno-: has joined #ruby
[17:36:29] jackjackdripper: has joined #ruby
[17:36:39] FernandoBasso: has joined #ruby
[17:37:25] khebbie: has joined #ruby
[17:38:22] n1lo: thks. :)
[17:38:49] siempref_: has joined #ruby
[17:39:01] sharkman: how do i search in sql for any entries where the name column contains the world "north"
[17:39:11] miah: has joined #ruby
[17:39:13] dorei: has joined #ruby
[17:39:14] Jardayn: has joined #ruby
[17:39:17] n1lo: I use it to get args.
[17:39:48] mikecmpbll: has joined #ruby
[17:40:22] mary5030: has joined #ruby
[17:40:35] miah: has joined #ruby
[17:41:01] karapetyan: is this code ok ? https://gist.github.com/anonymous/bf7055a0f9f75ea93b3c
[17:42:01] radgeRayden: has joined #ruby
[17:42:25] spider-mario: has joined #ruby
[17:42:27] shevy: you do not use an initialize method
[17:42:44] shevy: so your read() method has the file name hardcoded: File.open("./input",
[17:43:19] shevy: so you have to manually invoke .read
[17:43:40] shevy: you can get rid of the manual check.read if you use an initialize method
[17:44:06] shevy: alternatively you could also use a Equation.read variant
[17:45:20] karapetyan: shevy: ok. You know this is my 3rd try to become a programmer and i feel really mess when i need to build a loop (for in this example)
[17:45:36] shevy: yeah the loop is also strange
[17:45:41] bruno-: has joined #ruby
[17:45:42] shevy: but you have to move in small steps anyway
[17:46:00] karapetyan: shevy: thanks, understand about initialize method
[17:46:42] shevy: but your code works right? so you are one step above the usual newbiew stage :)
[17:47:18] karapetyan: i am not sure about it, i think i just in same place and i reached limits of my mind :(
[17:47:43] karapetyan: yes, my code works.
[17:47:55] karapetyan: but i spent about 1 hour to write this
[17:48:03] karapetyan: may be 1,5 :)
[17:48:08] pixelhan_: has joined #ruby
[17:48:58] pixelhan_: has left #ruby: ()
[17:49:03] Rollabunna: has joined #ruby
[17:49:03] A124: has joined #ruby
[17:49:39] pixelhan_: has joined #ruby
[17:49:44] havenwood: has joined #ruby
[17:49:49] speakingcode: has joined #ruby
[17:49:57] karapetyan: and if i remove this code now i am not sure that i can write it again faster than first time
[17:50:02] pixelhan_: Does anyone use a selenium webdriver for testing end-to-end? if so which one? how about Watir ?
[17:50:05] casadei_: has joined #ruby
[17:50:12] Dopagod: has joined #ruby
[17:50:50] Junaos: has joined #ruby
[17:50:53] shevy: karapetyan well just takes more practice, after you did the same ~100 times, it'll become a no-thinking procedure!
[17:50:59] alphaatom: has joined #ruby
[17:51:35] karapetyan: shevy: sure? even if i dumb? :D
[17:52:25] choke: has joined #ruby
[17:52:31] Ox0dea: self.deprecate
[17:52:33] alphaatom: has joined #ruby
[17:53:23] Alayde: has joined #ruby
[17:53:24] Rurik: has joined #ruby
[17:54:25] izzol: I need to write something like command tool. Where I can log in and type some commands. How should I start? ;-) There is any gem which can help me to do this?
[17:54:28] jackjackdripper: has joined #ruby
[17:54:31] shevy: karapetyan yeah. practice helps a lot
[17:54:32] ScriptGeek: has joined #ruby
[17:54:46] Rurik: has joined #ruby
[17:55:01] shevy: izzol what do you mean with "log in"?
[17:55:28] izzol: shevy: type login/pass and have a "Console" with my commands.
[17:55:30] karapetyan: izzol: you can create your_app.rb file and put there some ruby-code. That code can accept input from command line
[17:55:54] shevy: oh, you mean like via a webinterface?
[17:55:58] bruno-: has joined #ruby
[17:56:00] choke: has joined #ruby
[17:56:04] Rurik: has joined #ruby
[17:56:15] izzol: karapetyan: I know but I was thinking about something more useful, with history of commands and so on.
[17:56:18] shevy: karapetyan see, you can't be that dumb, you understood izzol better than I did
[17:56:34] shevy: well, "history of commands" - that's an array :)
[17:56:42] dorei: >> local_variables
[17:56:43] ruboto: dorei # => [] (https://eval.in/431322)
[17:56:44] shevy: every time you press enter, you append to the array
[17:57:08] karapetyan: izzol: first of all i reccomend you start from Pine book
[17:57:27] Rurik: has joined #ruby
[17:57:28] dorei: >>begin; local_variables; rescue Exception => e; end
[17:57:29] ruboto: dorei # => [:e] (https://eval.in/431324)
[17:57:47] karapetyan: there more ex
[17:57:52] chills42: has joined #ruby
[17:58:03] ScriptGeek: #can I do something like this?
[17:58:03] ScriptGeek: puts "Some string here: #{if foo == bar ? string : some_other_string}"
[17:58:04] razrunelord: has joined #ruby
[17:58:13] grenierm: has joined #ruby
[17:58:15] baweaver: has joined #ruby
[17:58:24] jhass: ?try ScriptGeek
[17:58:24] ruboto: ScriptGeek, Why don't you try it and see for yourself?
[17:58:25] petricore: has joined #ruby
[17:58:34] jhass: (hint, drop the if
[17:58:35] Rurik: has joined #ruby
[17:59:02] ScriptGeek: it gave some syntax error
[17:59:06] apeiros: or use a full and correct if: if cond then "a" else "b" end
[17:59:21] nhhagen: has joined #ruby
[17:59:46] izzol: karapetyan: Pine book? you mean pine.fm ?
[18:00:02] izzol: karapetyan: and I also want to share the screen with other users ;-)
[18:01:24] karapetyan: izzol: not sure that i understand you :)
[18:02:39] izzol: karapetyan: well is I will log in to the console as usera and type some command, userb should see it as well :)
[18:02:40] karapetyan: izzol: in pine.fm you could find base information about ruby and can try to develop easy console-based ruby apps
[18:03:03] dorei: >> f = 5 ; z = local_variables; e = 1 ; z
[18:03:04] ruboto: dorei # => [:f, :z, :e] (https://eval.in/431330)
[18:03:09] mary5030: has joined #ruby
[18:03:12] dorei: could someone help me with the output of 'local_variables' ? i guess that it includes not only already "declared" local variables but ones that will be declared in the current scope...
[18:03:40] Ox0dea: dorei: It's to do with them all of those statements being on the same line, I believe.
[18:04:09] Ox0dea: Never mind.
[18:04:34] Rutix: has joined #ruby
[18:04:34] Rutix: has joined #ruby
[18:05:03] Ox0dea: >> @f = 5 ; z = instance_variables; @e = 1 ; z
[18:05:04] ruboto: Ox0dea # => [:@f] (https://eval.in/431331)
[18:05:09] Ox0dea: dorei: You might've found a bug.
[18:05:30] dorei: i think it's more complicated
[18:05:58] mwlang: has joined #ruby
[18:06:13] shevy: You might have found two bugs.
[18:06:26] dgutierrez1287: has joined #ruby
[18:06:51] huddy: has joined #ruby
[18:07:11] dorei: >> w = eval('defined? f'); z = 5; f=3; w
[18:07:12] ruboto: dorei # => "local-variable" (https://eval.in/431332)
[18:07:42] dorei: >> w = defined? f; z = 5; f=3; w
[18:07:43] ruboto: dorei # => nil (https://eval.in/431333)
[18:08:01] ngscheurich: has joined #ruby
[18:08:10] Ox0dea: > Returns the names of the *current* local variables.
[18:08:15] Ox0dea: Emphasis mine.
[18:10:35] ramfjord: has joined #ruby
[18:11:16] jas02: has joined #ruby
[18:13:00] flak: has joined #ruby
[18:16:26] Musashi007: has joined #ruby
[18:16:37] ht__: has joined #ruby
[18:16:55] j_suth: has joined #ruby
[18:17:09] blik71: has joined #ruby
[18:17:33] Kyle__: Is there a class/gem/module that will let you essentially File.read a remote file over ssh? Other than just use Net::SSH to the target host and catting the file?
[18:17:44] baweaver: has joined #ruby
[18:17:50] havenwood: has joined #ruby
[18:17:57] pecpec: has joined #ruby
[18:18:16] Ox0dea: kyle__: What's wrong with the latter?
[18:18:18] blik71: can someone tell me whats wrong with this method I wrote to open a file I'm quite new to ruby
[18:18:37] Kyle__: Ox0dea: Nothing, other than I have to write it, instead of just gem-installing and letting magic happen ;)
[18:19:01] Kyle__: Admittedly it is trivial, isn't it....
[18:19:08] testingbot123: has joined #ruby
[18:19:28] ScriptGeek: this syntax worked: puts "Some string here: #{if foo == bar then string else some_other_string end}"
[18:19:30] blik71: http://pastebin.com/C37Fuugz
[18:19:31] ruboto: blik71, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/df9725dee053c5dbc6d8
[18:19:31] ruboto: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[18:19:34] shevy: blik71 just delegate to File.open() or File.readlines()
[18:20:00] shevy: you don't need trailing ; blik71
[18:20:31] shevy: alot of the code can be written shorter
[18:20:34] Ox0dea: ScriptGeek: Are you opposed on principle to the ternary operator?
[18:20:41] blik71: i'm getting this error when trying to use gets
[18:20:45] shevy: opencells += 1 if check rather than if check == true opencells = opencells + 1;
[18:21:05] Ox0dea: http://odestcj.net/wp-content/uploads/2012/02/ros_alot-300x168.png
[18:21:07] blik71: maze.rb:48:in `open': private method `gets' called for "./inputs/maze1":String (NoMethodError)
[18:21:07] shevy: use File.open() if you really must use .gets
[18:21:11] ruurd: has joined #ruby
[18:21:11] Ox0dea: shevy: That's the only alot of code I could find on short notice.
[18:21:20] toretore: has joined #ruby
[18:21:29] shevy: lol what is this beast
[18:21:32] Ox0dea: It's an alot.
[18:21:45] Ox0dea: http://hyperboleandahalf.blogspot.com/2010/04/alot-is-better-than-you-at-everything.html
[18:22:04] shevy: you are sending me to the dark parts of the internet here
[18:22:13] Ox0dea: More than you know.
[18:22:25] ScriptGeek: Ox0dea: I tried that, but when the compiler whined about a syntax error and gave a lame description I tried something else until it worked
[18:22:35] shevy: now this is kinda cute http://3.bp.blogspot.com/_D_Z-D2tzi14/S8TTPQCPA6I/AAAAAAAACwA/ZHZH-Bi8OmI/s400/ALOT2.png
[18:22:44] Ox0dea: ScriptGeek: "#{foo == bar ? string : other}" should work just fine.
[18:23:37] ScriptGeek: yeah, it jumped into my string and started complaining about that like a nagging wife who wanted a different color of wallpaper
[18:23:41] jackjackdripper1: has joined #ruby
[18:23:48] demiurgen: has joined #ruby
[18:23:53] blik71: if i use the file.open method does that return line by line?
[18:23:59] ruboto: Why don't you try it and see for yourself?
[18:24:18] ScriptGeek: is that some kind of pun?
[18:24:23] Ox0dea: No, it's solid advice.
[18:24:24] shevy: blik71 capitalize; File.open not file.open; if you need each line check http://ruby-doc.org/core-2.1.0/IO.html#method-i-each_line
[18:24:32] shevy: It's laziness
[18:24:36] toretore: File.open returns a File object, not the contents
[18:25:22] choke: has joined #ruby
[18:25:49] senayar: has joined #ruby
[18:25:49] senayar: has joined #ruby
[18:27:52] nhhagen: has joined #ruby
[18:28:07] voltalio: has joined #ruby
[18:28:12] Ox0dea: dorei: That #local_variables lies is to do with control frames, but that's about all I could surmise. :/
[18:28:12] Ox0dea: Whether or not it should actually do what the documentation says it does is unclear.
[18:28:45] wildlander: has joined #ruby
[18:29:27] dorei: kyle__: i'm pretty sure you can mount a remote filesystem over ssh
[18:30:04] DoubleMalt: has joined #ruby
[18:30:22] Kyle__: dorei: Using fuse+sshfs yes.
[18:30:39] dorei: kyle__: i think that's the cleanest way :)
[18:30:47] Kyle__: dorei: I was selfishly hoping someone had written a glorious wrapper as a gem do do this already :)
[18:30:58] Kyle__: dorei: That's OK. I'm hacking up a tiny function.
[18:31:02] blik71: i figured it out it was the way I named my method lol
[18:31:19] Fraeon: has joined #ruby
[18:31:58] ndrei: has joined #ruby
[18:32:55] ruurd: has joined #ruby
[18:33:19] cndiv: has joined #ruby
[18:33:33] braincrash: has joined #ruby
[18:33:40] leat: has joined #ruby
[18:34:04] cndiv: Hey all, Ruby noobie here. I'm writing some command line applications for practice - is it possible to run those with a tiny framework (Camping, Cuba) in a browser? Or am I missing something obvious?
[18:34:43] cndiv: I'd like to share them with people over the internet who have no idea what Terminal is and without learning / re-writing them.
[18:35:17] leat1: has joined #ruby
[18:36:03] centrx: cndiv, There might be some special library that will do that for you, but in general there will need to be some additions/changes in order to use a web interface instead of command line
[18:36:15] Mia: has joined #ruby
[18:36:15] Mia: has joined #ruby
[18:36:21] jhooker: has joined #ruby
[18:36:22] bluOxigen: has joined #ruby
[18:36:39] cndiv: centrx: Big crazy additions, you think? Or more like, the right gem?
[18:36:46] havenwood: cndiv: Converting a command line app to a Rack app is a worthwhile exercise. Sinatra is quite popular. I really like Roda, which is a descendant of Cuba with a great plugin system.
[18:36:50] jhooker: has joined #ruby
[18:37:05] shevy: Cuba Roda this is like Samba here
[18:37:14] ruurd: has joined #ruby
[18:37:21] havenwood: cndiv: You can do CGI with Ruby but it's not a popular route because it has to restart for each request.
[18:37:21] centrx: Hey Macarena
[18:37:33] cndiv: havenwood: I totally get that it's worthwhile, but is it a huge exercise? I'm eventually learning Rails, but want to get my Ruby solid first.
[18:37:53] cndiv: havenwood: and sorry, CGI stands for?
[18:38:09] miah: common gateway interface?
[18:38:14] havenwood: cndiv: Forget I mentioned CGI. Start with a vanilla Rack app.
[18:39:03] havenwood: cndiv: Make a simple Rack app that responds with HTML or JSON. Then add in a 404 error. Then I'd suggest turning that into a Roda app. Look through each Roda plugin for a very good idea of features you might want to add.
[18:39:27] cndiv: havenwood: But see what I'm saying? I have to learn HTML and JSON?
[18:39:46] havenwood: cndiv: No, you can use JSON from Ruby's stdlib.
[18:39:56] DLSteve: has joined #ruby
[18:40:24] cndiv: havenwood: Ah, ok. Seems like a good start, then. Thanks for your help.
[18:40:41] toretore: cndiv: if you're going to have people interact with your app in a browser, you kind of have to know html
[18:40:46] havenwood: >> require 'json'; {aim: true}.to_json
[18:40:47] ruboto: havenwood # => "{\"aim\":true}" (https://eval.in/431338)
[18:40:48] nofxx: has joined #ruby
[18:40:53] cndiv: toretore: Why's that?
[18:41:07] toretore: because that's the only thing browsers understand
[18:41:12] havenwood: cndiv: Or for example, Roda has a JSON plugin that automatically returns a JSON representation of that route's return value.
[18:41:27] cndiv: toretore: Literally I'm fine with scrolling text like a terminal window. I was hoping there was something that could handle that without learning another language.
[18:41:42] havenwood: cndiv: You can serve up plain text with a Rack app if you prefer.
[18:41:45] cndiv: Think like 2400 baud BBS style text scrolling, in a web window.
[18:41:52] Igorshp: has joined #ruby
[18:41:59] toretore: cndiv: i assume you're talking about an in-browser ui
[18:42:12] toretore: which is by definition going to have to be html
[18:42:18] havenwood: cndiv: {'Content-Type' => 'text/plain'}
[18:42:52] cndiv: toretore: Right. Zero more fancy than a Terminal window. I was hoping this was a "use X software/gem" and not "learn HTML from scratch"
[18:43:03] havenwood: cndiv: [200, {'Content-Type' => 'text/plain'}, 'nothing fancy, just text!']
[18:43:04] mprelude: has joined #ruby
[18:43:06] ngscheurich: has joined #ruby
[18:43:21] havenwood: cndiv: Oops, I mean: [200, {'Content-Type' => 'text/plain'}, ['nothing fancy, just text!']]
[18:43:23] jenrzzz: has joined #ruby
[18:43:48] havenwood: cndiv: That ^ would be an example of a Rack serving up some plain text.
[18:44:10] cndiv: havenwood: That seems totally doable, and worth learning in this situation.
[18:44:14] havenwood: cndiv: Here are some Hello, World! examples in various Rack adapters and Rack itself: https://github.com/luislavena/bench-micro/tree/master/apps
[18:44:46] dionysus69: has joined #ruby
[18:44:48] havenwood: cndiv: The normal convention is to name it `config.ru` and you can run your Rack app with just the command: rackup
[18:45:32] leat1: has joined #ruby
[18:46:17] cndiv: Great, thanks all!
[18:48:38] crdpink2: has joined #ruby
[18:49:27] karapetyan: has joined #ruby
[18:52:02] renier: has joined #ruby
[18:53:54] leat1: has joined #ruby
[18:54:01] ruurd: has joined #ruby
[18:54:10] Musashi007: has joined #ruby
[18:54:11] Pumukel: has joined #ruby
[18:55:24] snockerton: has joined #ruby
[18:55:48] rushed: has left #ruby: ()
[18:56:11] mary5030: has joined #ruby
[18:57:03] pocketprotector: has joined #ruby
[18:57:44] nhhagen_: has joined #ruby
[18:58:06] bmurt: has joined #ruby
[18:58:19] JamesDH: has joined #ruby
[19:00:23] pixelhan_: izzol have you tried commander? https://github.com/commander-rb/commander
[19:01:45] dfockler: has joined #ruby
[19:03:32] kirun: has joined #ruby
[19:04:23] mary5030: has joined #ruby
[19:04:49] CustosLimen: has joined #ruby
[19:04:51] devoldmx: has joined #ruby
[19:05:46] freezevee: has joined #ruby
[19:06:08] sepp2k: has joined #ruby
[19:06:25] futilegames: has joined #ruby
[19:08:04] finisherr: has joined #ruby
[19:09:11] bestbrents_: has joined #ruby
[19:09:15] nhhagen: has joined #ruby
[19:09:21] symm-_: has joined #ruby
[19:10:08] acke: has joined #ruby
[19:10:29] futilegames_: has joined #ruby
[19:10:56] ruurd: has joined #ruby
[19:11:05] BeatNick_: has joined #ruby
[19:12:30] al2o3-cr: has joined #ruby
[19:13:03] roxtrongo: has joined #ruby
[19:14:41] karapetyan: has joined #ruby
[19:15:41] Limix: has joined #ruby
[19:16:33] howdoicomputer: has joined #ruby
[19:16:48] minimalism: has joined #ruby
[19:17:06] yalue: has joined #ruby
[19:18:11] bricker1: has joined #ruby
[19:19:25] arooni: has joined #ruby
[19:21:03] dblessing: has joined #ruby
[19:22:15] gix: has joined #ruby
[19:22:33] swgillespie: has joined #ruby
[19:23:41] sharkman: has joined #ruby
[19:23:48] BeatNick_: has left #ruby: ("Leaving")
[19:24:35] blue_deref: has joined #ruby
[19:26:43] nym: has joined #ruby
[19:27:07] Eiam: has joined #ruby
[19:27:09] ruurd: has joined #ruby
[19:27:28] yqt: has joined #ruby
[19:29:14] freerobby: has joined #ruby
[19:29:29] dmolina: has joined #ruby
[19:29:45] jamesaxl: has joined #ruby
[19:30:06] j4cknewt: has joined #ruby
[19:30:36] bruno-: has joined #ruby
[19:30:45] ht__: has joined #ruby
[19:31:16] agent_white: has joined #ruby
[19:33:06] linuxboy_: has joined #ruby
[19:34:31] jenrzzz: has joined #ruby
[19:35:29] mary5030: has joined #ruby
[19:35:54] baweaver: has joined #ruby
[19:35:59] Zai00: has joined #ruby
[19:36:27] j_suth: has joined #ruby
[19:36:46] thbar: has joined #ruby
[19:37:53] DexterLB: has joined #ruby
[19:38:51] VeryBewitching: has joined #ruby
[19:39:06] leat1: has joined #ruby
[19:39:12] khebbie: has joined #ruby
[19:39:14] CustosLimen: has joined #ruby
[19:40:51] Pharaoh2: has joined #ruby
[19:41:26] ruurd: has joined #ruby
[19:42:13] Stalkr_: has joined #ruby
[19:42:22] yeticry: has joined #ruby
[19:45:15] JamesDH: has joined #ruby
[19:46:09] jmroark: has joined #ruby
[19:46:29] fantazo: has joined #ruby
[19:48:09] yeticry: has joined #ruby
[19:49:56] Rollabunna: has joined #ruby
[19:50:04] mleung: has joined #ruby
[19:50:40] bruno-: has joined #ruby
[19:53:11] gamename: has joined #ruby
[19:54:17] kadoppe: has joined #ruby
[19:55:11] banjara: has joined #ruby
[19:55:45] ejnahc: has joined #ruby
[19:57:03] grenierm: has joined #ruby
[19:57:15] Zai00: has joined #ruby
[19:57:57] grenierm: has joined #ruby
[19:58:39] banjara: has joined #ruby
[19:59:45] Zamyatin: has joined #ruby
[20:01:07] Rubie: has joined #ruby
[20:01:07] yeticry_: has joined #ruby
[20:01:56] shevy: code code code
[20:02:02] shevy: agent_white code
[20:02:06] shevy: everybody code
[20:02:17] razrunelord: has joined #ruby
[20:03:15] mary5030: has joined #ruby
[20:03:34] slash_nick: a-well-a code code code, well, code is the mode
[20:03:42] scottschecter: has joined #ruby
[20:04:53] ordepdev: has joined #ruby
[20:05:01] nhhagen: has joined #ruby
[20:05:11] dfockler: has joined #ruby
[20:06:01] Ox0dea: Post code.
[20:06:04] yeticry: has joined #ruby
[20:06:15] shevy: Cost pode.
[20:06:43] leat1: has joined #ruby
[20:07:03] davidhq: has joined #ruby
[20:08:06] jhass: coding coder codes coding code
[20:09:28] firstdayonthejob: has joined #ruby
[20:09:54] ta: has joined #ruby
[20:10:01] slash_nick: >> count = 0; loop { count += 1; break if rand(6) == 0 }; puts count # <3 Ox0dea
[20:10:02] ruboto: slash_nick # => 7 ...check link for more (https://eval.in/431367)
[20:10:37] cisco: has joined #ruby
[20:11:38] skade: has joined #ruby
[20:11:49] Ox0dea: >> (0..1/0.0).find { rand(6) == 0 } # slash_nick: I 'member.
[20:11:50] ruboto: Ox0dea # => 1 (https://eval.in/431370)
[20:12:22] Ox0dea: Would've love a double-digit number at least.
[20:12:56] slash_nick: just the one digit... and it's one.
[20:13:10] leat1: has joined #ruby
[20:13:11] Ox0dea: I got 11 at the REPL. :(
[20:14:04] ruboto: I don't know anything about random
[20:15:25] ruboto: I'm the channel bot, linker of the rules, adept of the facts, wielder of the banhammer.
[20:15:34] dopie: has joined #ruby
[20:15:35] slash_nick: ACTION believes he knows in which direction jhass's wheels are turning
[20:16:33] Coldblackice: has joined #ruby
[20:16:58] baweaver: has joined #ruby
[20:17:52] bmurt: has joined #ruby
[20:18:18] ruboto: shevy is the hound of baskerville (see http://irclog.whitequark.org/ruby/2015-08-13#13699759)
[20:18:29] shevy: hmmmmmmmm
[20:18:34] ruboto: I don't know anything about Ox0dea
[20:18:35] pglombardo: has joined #ruby
[20:18:37] ruboto: jhass is anybody. They're a member of the op staff in #ruby, contributor to ruboto and ruby-community.com
[20:18:44] shevy: someone has to add a factoid to Ox0dea ok?
[20:18:54] bmurt: has joined #ruby
[20:18:57] Ox0dea: Would be inappropriate, I think.
[20:18:58] ruboto: I don't know anything about someone
[20:19:29] slash_nick: ?domoarigato
[20:19:29] ruboto: I don't know anything about domoarigato
[20:19:36] slash_nick: #=> I'm Mr. ruboto!
[20:19:54] Flipez: has joined #ruby
[20:22:32] cschneid_: has joined #ruby
[20:23:20] cschneid_: I am working on a gem that has a C extension component that only works on newer rubies. But I'd like to fall back to a pure-ruby version for older rubies, or if no c compiler is present. Where can I find docs on the nitty-gritty of developing a gem like that?
[20:23:31] speakingcode: has joined #ruby
[20:23:58] shevy: hmmm docs :D
[20:24:06] Ox0dea: cschneid_: Just translate the C to Ruby?
[20:24:23] cschneid_: Ox0dea: yeah, more of the mechanics of the gemspec & such.
[20:24:40] jenrzzz: has joined #ruby
[20:24:44] DLSteve: has joined #ruby
[20:24:52] cschneid_: Ox0dea: like, how do I say: "compile here if you can, then if you fail, that's cool, but I need to know when I do my requires in lib/mygem.rb"
[20:25:10] demiurgen: so when you use a ruby library that is just a wrapper around a C library, and a library function you want to use is supposed to be sent a function pointer as a callback, can you actually send it a ruby method somehow? specifically, it's ruby-guestfs and Guestfs.set_event_callback() I'm trying here.
[20:26:46] solocshaw: has joined #ruby
[20:27:10] solocshaw: has joined #ruby
[20:27:42] leat1: has joined #ruby
[20:27:53] lkba_: has joined #ruby
[20:28:02] demiurgen: ah, you just send a Proc. Cool! Ruby is pretty awesome! :)
[20:29:10] Ox0dea: cschneid_: Ah, right. Well, a gemspec is just Ruby code, so `RUBY_VERSION` + `File.exist?('/bin/cc')` would get you most of the way there.
[20:29:43] cschneid_: Ox0dea: I've never done anything fancy. The gemspec is resolved on the client during a `gem install`?
[20:29:57] cschneid_: if so yeah, something like that would work out ok
[20:30:17] luckyme: has joined #ruby
[20:30:22] cschneid_: then I `require mynativelib rescue require 'myrubylib'`
[20:30:58] stobijah: has joined #ruby
[20:31:49] j4cknewt: has joined #ruby
[20:33:05] jmroark: has joined #ruby
[20:33:24] senayar: has joined #ruby
[20:33:25] dgutierrez1287: has joined #ruby
[20:33:29] imperator: A reminder for anyone interested in a code bounty for the VCR gem: http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/433878
[20:33:47] senayar: has joined #ruby
[20:34:24] eTM_: has joined #ruby
[20:34:45] Tuxero: has joined #ruby
[20:34:45] eTM_: has left #ruby: ()
[20:35:04] dblessing: has joined #ruby
[20:35:27] blik71: has joined #ruby
[20:37:15] leat2: has joined #ruby
[20:39:13] roxtrongo: has joined #ruby
[20:39:18] dblessing: has joined #ruby
[20:39:21] Ox0dea: cschneid_: Apparently the best approach is to generate a dummy Makefile in extconf.rb.
[20:40:13] Ox0dea: cschneid_: No, sorry, that's if the C extension bits are optional.
[20:41:49] mauvehed: has joined #ruby
[20:42:06] mauvehed: if I'm using the default project and default gem profile for ruby, how do I properly cron that? all the examples I see assume a unique project name and gem set name. which I didn't do before hand.
[20:42:51] havenwood: has joined #ruby
[20:43:52] dgs: has joined #ruby
[20:44:54] neanderslob: has joined #ruby
[20:46:08] leafybasil: has joined #ruby
[20:47:20] platosha: has joined #ruby
[20:49:44] leat2: has joined #ruby
[20:50:01] DeweyD: has joined #ruby
[20:50:50] mauvehed: apparently 'ruby cron setup' is the quick answer!
[20:50:52] mauvehed: has left #ruby: ()
[20:51:19] cschneid_: Ox0dea: the C bits are optional and easily jettisoned. As long as the gem can then later figure that out and fall back to pure-ruby impl.
[20:51:23] shmilan: has joined #ruby
[20:52:04] imperator: cschneid_, FFI an option?
[20:52:30] cschneid_: imperator: tl;dr - I'm wrapping & extending the stackprof gem to build out a tool. So it's very tightly tied to the innards of ruby code
[20:52:43] cschneid_: and it only works on newer rubies
[20:52:58] cschneid_: so there are various levels of fallback I can do depending on what the user really has
[20:53:08] imperator: do you have to support older rubies?
[20:53:12] Ox0dea: cschneid_: http://stackoverflow.com/q/17406246
[20:53:17] k3asd`: has joined #ruby
[20:53:19] Ox0dea: A couple useful answers in there.
[20:54:12] Ox0dea: OP didn't pull a denvercoder9 if you'd prefer to skip to the end.
[20:56:28] cschneid_: cool - that would seem to work
[20:58:34] ta: has joined #ruby
[20:58:59] imperator: don't suppose either of you know how to hook into RSTRING so I can call a custom free() function, do you?
[20:59:59] cschneid_: sorry! I'm totally new to native extensions. :)
[21:00:06] ruby-lang621: has joined #ruby
[21:00:08] leat2: has joined #ruby
[21:00:48] ruby-lang621: is there anybody here?
[21:01:26] dfockler: Yes, there are people here
[21:01:47] yfeldblum: has joined #ruby
[21:02:23] platosha_: has joined #ruby
[21:03:11] ordepdev: has joined #ruby
[21:04:16] JamesDH: has joined #ruby
[21:05:04] Ox0dea: imperator: You want a custom destructor for Strings?
[21:05:24] Rurik: has joined #ruby
[21:05:27] devoldmx: has joined #ruby
[21:06:25] imperator: Ox0dea, yes, need _aligned_free for Windows: https://github.com/djberg96/memory_buffer/blob/cross_platform/ext/memory_buffer/memory_buffer.c
[21:06:47] platosha__: has joined #ruby
[21:07:43] Ox0dea: imperator: You'll almost certainly need to use TypedData_Make_Struct().
[21:08:05] imperator: oh? i'll have to research it, never used it
[21:10:02] Ox0dea: imperator: http://git.io/vZR7R
[21:10:07] Ox0dea: There's a pretty straightforward call.
[21:10:35] HoGiHung: has joined #ruby
[21:10:43] Ox0dea: See also the definition therein of `closure_data_type`, which is where the deallocator gets specified.
[21:11:32] pegasuspect: has joined #ruby
[21:12:01] Ox0dea: pegasuspect: Nice portmanteau.
[21:12:19] Ox0dea: Perfect sharing and everything.
[21:12:24] ReK2: has joined #ruby
[21:12:24] ReK2: has joined #ruby
[21:12:57] pegasuspect: Is anybody here?
[21:13:01] pegasuspect: im new to irc
[21:13:06] imperator: yes, we are here
[21:13:09] imperator: we're ALL here
[21:13:35] imperator: Ox0dea, thanks, will try to figure that out
[21:13:41] Ox0dea: imperator: Godspeed.
[21:13:44] havenwood: pegasuspect: Careful not to wake them!
[21:14:08] pegasuspect: well i was wondering if there is a posible way to compile ruby for windows and unix
[21:14:12] petricore: has joined #ruby
[21:14:36] Ox0dea: Unlikely.
[21:15:12] gregf: has joined #ruby
[21:15:17] imperator: you mean a common binary? don't think so
[21:15:22] bruno-: has joined #ruby
[21:15:36] pegasuspect: no not a common one, two seperate files are ok
[21:15:52] Ox0dea: pegasuspect: You're basically asking if C compilers are still a thing.
[21:16:16] pegasuspect: yea.. maybe :D sorry if i sound kinda stupid
[21:16:29] imperator: so, just stick your precompiled binaries where you want them - probably under 'lib/unix' and 'lib/windows' or something
[21:16:32] grenierm: has joined #ruby
[21:16:54] pegasuspect: actually i am new to ruby as well
[21:17:09] imperator: then create a stub file under lib that just does "if windows; require 'lib/windows/file'; else; require 'lib/unix/file'; end"
[21:17:14] pegasuspect: so i never compiled ruby yet
[21:17:23] Ox0dea: pegasuspect: Why do you want to compile it?
[21:17:41] pegasuspect: to make an executable like from terminal u could just run it
[21:17:49] havenwood: pegasuspect: You might take a look at Traveling Ruby if you're interested in how one might distribute Ruby: http://phusion.github.io/traveling-ruby/
[21:17:57] pegasuspect: say ./myAwesomeCode
[21:18:08] ta: has joined #ruby
[21:18:41] Ox0dea: pegasuspect: Open Notepad.
[21:18:55] FernandoBasso: has joined #ruby
[21:19:09] jackjackdripper: has joined #ruby
[21:19:17] swgillespie: has joined #ruby
[21:19:38] mary5030: has joined #ruby
[21:19:43] pegasuspect: havenwood: thanks
[21:19:44] ngscheurich: has joined #ruby
[21:22:41] jenrzzz: has joined #ruby
[21:24:04] ponga: has joined #ruby
[21:26:58] yardenbar: has joined #ruby
[21:27:31] karapetyan: has joined #ruby
[21:28:59] robbyoconnor: has joined #ruby
[21:29:14] clarkenciel: has joined #ruby
[21:30:51] bruno-: has joined #ruby
[21:31:30] solocshaw: has joined #ruby
[21:32:43] linuxboytoo: has joined #ruby
[21:33:29] robbyoconnor: has joined #ruby
[21:33:46] robbyoconnor: has joined #ruby
[21:34:47] linuxboy_: has joined #ruby
[21:36:17] bruno-: has joined #ruby
[21:39:22] ivanskie: has joined #ruby
[21:39:27] centrx: has joined #ruby
[21:40:58] khebbie: has joined #ruby
[21:41:46] Rurik: has joined #ruby
[21:42:42] baweaver: has joined #ruby
[21:43:01] solocshaw1: has joined #ruby
[21:43:02] Rurik: has joined #ruby
[21:43:03] banjara1: has joined #ruby
[21:44:08] mroark: has joined #ruby
[21:46:09] ndrei: has joined #ruby
[21:46:27] workmad3: has joined #ruby
[21:46:39] bruno-: has joined #ruby
[21:48:15] platzhirsch: has joined #ruby
[21:49:26] shevy: so many ruby-C experts
[21:50:52] Rollabunna: has joined #ruby
[21:51:26] k3asd`: has joined #ruby
[21:52:06] bruno-: has joined #ruby
[21:52:50] Igorshp: has joined #ruby
[21:54:05] yfeldblum: has joined #ruby
[21:54:31] Swappticon: has joined #ruby
[21:55:10] havenwood: shevy: ARuby, BRuby, CRuby
[21:55:29] jgpawletko: has joined #ruby
[21:56:19] Ox0dea: {C,D,E,M}Ruby are all actual things.
[21:56:33] Ox0dea: Modulo some capitalization details.
[21:57:30] senayar: has joined #ruby
[21:58:06] senayar: has joined #ruby
[22:00:02] ngscheurich: has joined #ruby
[22:00:16] jamesaxl|2: has joined #ruby
[22:00:39] symm-: has joined #ruby
[22:01:41] niemcu: has joined #ruby
[22:03:11] Motoservo: has joined #ruby
[22:03:34] Tuxero: has joined #ruby
[22:04:04] Ox0dea: I am become shame.
[22:05:39] BraddPitt: has joined #ruby
[22:06:16] ytti: the destroyer of confidence
[22:07:10] diegoviola: has joined #ruby
[22:08:18] garethrees: has joined #ruby
[22:10:05] dfockler: has joined #ruby
[22:13:56] Ox0dea: >> [].to_enum.next rescue $!
[22:13:57] ruboto: Ox0dea # => #<StopIteration: iteration reached an end> (https://eval.in/431408)
[22:14:00] Ox0dea: Why "an"?
[22:14:54] sharkman: how would i parse this with strptime? Thu, September 10th at 8:30 PM EDT
[22:15:01] sharkman: all i need is september 10th
[22:15:04] shevy: must it be strptime
[22:15:09] firstdayonthejob: has joined #ruby
[22:15:19] sharkman: i just need the data, september 10th though, the rest can be discarded
[22:15:52] shevy: so you need month and day
[22:16:10] duoi: has joined #ruby
[22:16:33] shevy: I am sure there are better variants. one is:
[22:16:35] shevy: result = Time.parse("Thu, September 10th at 8:30 PM EDT"); [result.month, result.day] # => [9, 10]
[22:16:55] havenwood: strftime("%B #{time.day.ordinalize}")
[22:17:21] shevy: never seen .ordinalize before
[22:17:27] havenwood: shevy: Rails
[22:17:34] havenwood: shevy: ActiveSupport more specifically.
[22:17:36] Rurik: has joined #ruby
[22:17:53] Ox0dea: >> 'Thu, September 10th at 8:30 PM EDT'[/\w+ \d+../] # sharkman
[22:17:54] ruboto: Ox0dea # => "September 10th" (https://eval.in/431409)
[22:17:59] shevy: oh now I see
[22:18:08] mblagden_: has joined #ruby
[22:18:08] shevy: active has put the world inside
[22:18:30] Ox0dea: ActiveSupport should be called Atlas, you say?
[22:18:37] shevy: ActivePlanet
[22:18:52] baweaver: has joined #ruby
[22:19:09] Ox0dea: shevy: http://sundial.csun.edu/wp-content/uploads/2010/09/atlas3-400x843.jpg
[22:19:18] havenwood: shevy: require 'active_support/core_ext/integer/inflections'
[22:19:20] alphaatom: has joined #ruby
[22:21:30] sharkman: thanks for the help guys
[22:21:48] Ox0dea: sharkman: I'm a unicorn.
[22:22:13] atomical: has joined #ruby
[22:22:55] Ox0dea: Unicorns are genderless, bro. Do your research.
[22:23:01] Ox0dea: Me, by the way: https://i.imgur.com/0yc1wiH.jpg
[22:23:03] sharkman: k sorry undercoin
[22:23:15] abdulrehman: has joined #ruby
[22:23:23] platzhirsch: has left #ruby: ()
[22:24:22] Ox0dea: http://logs.ryanbigg.com/ruby?date=2014-01-19#1633308
[22:25:31] Swappticon: has joined #ruby
[22:26:11] senayar: has joined #ruby
[22:28:26] Trieste: has joined #ruby
[22:29:17] chuy: has joined #ruby
[22:31:54] jenrzzz: has joined #ruby
[22:32:19] finisherr: has joined #ruby
[22:32:32] bruno-: has joined #ruby
[22:32:51] Kallis: has joined #ruby
[22:34:00] shevy: is this a flying ponicorn
[22:34:33] shevy: you do like pink
[22:34:37] Ox0dea: Every ponicorn is capable of flight.
[22:34:53] ordepdev: has joined #ruby
[22:36:36] Ox0dea: > Uber-for-dogwalkers is going to accidentally provide the solution to climate change.
[22:36:51] Ox0dea: Some people have all the smart.
[22:36:52] firstdayonthejob: has joined #ruby
[22:37:12] bubbys: has joined #ruby
[22:37:22] dfockler: Uber-for-ruby, I'll come over and write your ruby code and you can pay me
[22:37:38] ytti: how much per hour?
[22:37:51] adam12: My mind is drawing a blank. `foo, bar = ["foo", "bar"]` is called .. ? destructuring?
[22:37:52] bruno-: has joined #ruby
[22:37:59] senayar^: has joined #ruby
[22:38:18] Ox0dea: >> _,(_,_,((_,(foo,_)),_)) = [1, [2, [3, 4], [[5, [:target], 6], [7], 8, [9], 10]]]; foo
[22:38:19] ruboto: Ox0dea # => :target (https://eval.in/431410)
[22:38:23] Ox0dea: There's how to destructure in anger.
[22:38:28] adam12: Right. Destructuring assignment. I don't know why I can never remember the damn term.
[22:38:37] dfockler: Ox0dea: where did you pull that one out of?
[22:38:42] dorei: btw, in a block like { |x| something... } does x has a name? like block parameter or smt ?
[22:38:52] Ox0dea: dorei: Nailed it.
[22:39:02] Ox0dea: So many people accidentally knowing exactly what something's called.
[22:39:03] adam12: I do love (_, foo) inside each, etc. Super handy.
[22:41:03] luckyme: has joined #ruby
[22:41:26] workmad3: adam12: you know that block params will automatically destructure without () in a lot of cases, too
[22:41:38] Ox0dea: >>-> x, y {}.parameters # dorei
[22:41:39] ruboto: Ox0dea # => [[:req, :x], [:req, :y]] (https://eval.in/431411)
[22:41:42] adam12: workmad3: I didn't know that. Good to know.
[22:41:45] Ox0dea: In case you wanted canonical confirmation.
[22:41:48] workmad3: e.g. some_hash.each_pair { |key, value| }
[22:42:31] dfockler: what does that -> do in ruby?
[22:42:38] Ox0dea: >>->{}.class
[22:42:39] ruboto: Ox0dea # => Proc (https://eval.in/431412)
[22:43:10] bricker1: >> ->{}.inspect
[22:43:11] ruboto: bricker_ # => "#<Proc:0x421fc088@/tmp/execpad-62256801e525/source-62256801e525:2 (lambda)>" (https://eval.in/431413)
[22:43:49] workmad3: dfockler: stabby lambda syntax
[22:43:50] sharkman: if i have a time object, 2015-09-11 00:00:00 UTC
[22:43:50] sharkman: , how do i convert that to EST
[22:43:52] gambl0re: has joined #ruby
[22:43:55] Ox0dea: sharkman: Move to Florida.
[22:44:15] Ox0dea: It's the only way.
[22:44:18] sharkman: i like 2 throw snow
[22:44:23] sharkman: at old people
[22:44:43] Ox0dea: >> proc { |a, b| a + b }.call(1, 2) == -> a, b { a + b }[1, 2] # dfockler
[22:44:44] ruboto: Ox0dea # => true (https://eval.in/431414)
[22:45:03] dfockler: Procs and lambdas are something I don't know much about in ruby
[22:45:16] Ox0dea: You should fix that with due haste.
[22:45:32] dfockler: Can I pass around functions with Procs?
[22:45:40] Ox0dea: More or less, anyhow.
[22:45:48] sharkman: boy this is tough
[22:45:49] dorei: i think procs are like anonymous functions in other languages
[22:45:55] sharkman: boy this is tough
[22:45:58] dfockler: Is it not quite 'first-order' behind the scenes?
[22:46:15] Ox0dea: dfockler: No, they are in fact first-class.
[22:46:17] naftilos76: has joined #ruby
[22:46:19] Ox0dea: It's methods which aren't.
[22:46:44] workmad3: dfockler: procs and lambdas are first-class anonymous methods that capture a lexical closure
[22:46:45] Ox0dea: You can't "return a method", as it were.
[22:47:07] workmad3: Ox0dea: well, there's some_obj.method(:foobar) which gives you a bound method object
[22:47:14] Ox0dea: Not quite the same thing, though.
[22:47:18] dfockler: Are blocks implemented using Procs
[22:47:21] workmad3: but it's clunky, and it's not quite first-order in several ways :)
[22:47:28] workmad3: dfockler: sort-of
[22:47:55] workmad3: dfockler: if you make a 'block-param' explicit in a method e.g. def foobar(&blk) then the class of `blk` is Proc
[22:48:13] workmad3: dfockler: but pretty much every ruby interpreter will optimise away that object creation if the block param isn't explicit
[22:48:42] Swappticon: has joined #ruby
[22:49:12] Ox0dea: workmad3: It's still there waiting to be turned into an explicit Proc, mind.
[22:49:15] workmad3: so at the 'ruby level', you only really have procs conceptually, but if you delve into the low-level details, you'll see 'blocks' which are almost like an anonymous function without the Proc wrapper on it :)
[22:49:32] djbkd: has joined #ruby
[22:50:14] nettoweb: has joined #ruby
[22:50:15] athinggoingon: has joined #ruby
[22:50:32] ScriptGeek: what do y'all use for unit tests?
[22:50:34] arcanez: when using Lumberjack::Device::DateRollingLogFile with :roll => :daily, the current day is always in file.log and the date is only appended to old logs?
[22:50:49] sankaber: has joined #ruby
[22:50:55] arcanez: I'm trying to figure out why I'd have file.log.2015-07-31 and file.log.2015-08-02 but no file.log.2015-08-01
[22:50:56] FernandoBasso: When I run ruby --debug myprogram.rb I get rubygems/defaults/operating_system
[22:51:08] FernandoBasso: What is that operating_system thing?
[22:51:34] tkuchiki: has joined #ruby
[22:52:41] sevenseacat: has joined #ruby
[22:53:06] platosha_: has joined #ruby
[22:53:38] sharkman: wow time objects are immutable in ruby
[22:53:41] sharkman: is this a joke
[22:54:00] Ox0dea: You're like some kind of semi-troll.
[22:54:15] Ox0dea: FernandoBasso: http://git.io/vZ0nq
[22:54:17] GeissT: has joined #ruby
[22:54:35] Ox0dea: So, a hack, straight from the horse's mouth.
[22:54:56] FernandoBasso: Ox0dea: I saw that in my local files.
[22:55:03] FernandoBasso: Should I just comment it?
[22:55:18] Ox0dea: FernandoBasso: It's not actually stopping your program from being run.
[22:55:31] Ox0dea: It's just being "reported" because --debug ups the verbosity.
[22:55:52] FernandoBasso: Ox0dea: But it is a good idea that I learn ruby using -d, is it not?
[22:56:01] Ox0dea: Eh, -w is fine.
[22:56:11] dfockler: So proc affects the context that it's being executed in?
[22:56:27] Ox0dea: dfockler: No, it introduces a new one.
[22:56:32] FernandoBasso: Ox0dea: Thanks.
[22:56:48] ScriptGeek: Ox0dea: are you a ruler of the ruby residers?
[22:57:06] Ox0dea: dfockler: You can modify existing locals from within a Proc, if that's how you meant.
[22:57:43] dfockler: well this article says the return causes the method it's being proc.call from, to return
[22:58:07] Ox0dea: That's right, but "context" isn't quite the right word for that behavior.
[22:58:40] bubbys: has joined #ruby
[22:59:13] arcanez: looks like Lumberjack::Device::DateRollingLogFile will only roll if I log to it.. so not having a file.log.2015-08-01 means there was nothing logged to it during that timeframe, at least not until 2015-08-02
[22:59:58] sharkman: okay i figured it out. DateTime.new(blah blah) - 4.hours
[23:00:00] dfockler: So a proc acts like a closure, and can capture variables in the local scope?
[23:00:05] darwingr: has joined #ruby
[23:00:26] dgutierrez1287: has joined #ruby
[23:00:42] scottschecter: has joined #ruby
[23:01:28] Ox0dea: dfockler: https://eval.in/431419
[23:01:53] dfockler: hey it's just like javascript! :P
[23:02:09] Ox0dea: JavaScript wanted to be Scheme.
[23:02:20] rafaelcout: has joined #ruby
[23:02:34] northfurr: has joined #ruby
[23:02:39] Ox0dea: Brendan Eich sold his soul, but the devil was the only one in the market at the time. :(
[23:02:55] Rollabunna: has joined #ruby
[23:03:00] rickmasta: has joined #ruby
[23:03:09] Ropeney: has joined #ruby
[23:03:09] rafaelcout: Hello friends! Learning ruby. Starting today! =D
[23:03:14] sevenseacat: rafaelcout: welcome :)
[23:03:38] Ox0dea: rafaelcout: Hiya! Which resource(s) are you using?
[23:03:51] ScriptGeek: at least until someone thinks your question is dumb
[23:03:55] paulcsmith: has joined #ruby
[23:04:01] dfockler: Ox0dea: that syntax to pass arguments to the returned procs is weird
[23:04:20] Ox0dea: dfockler: It's less noisy than all the alternatives.
[23:04:37] dfockler: is it to distinguish between a method call?
[23:04:45] Jardayn: has joined #ruby
[23:04:53] Ox0dea: Well, you don't have a choice in that matter.
[23:05:09] Ox0dea: You can invoke Procs about ten different ways, but none of them is `proc(foo, bar)`.
[23:06:12] devoldmx: has joined #ruby
[23:06:41] NeverDie: has joined #ruby
[23:07:08] Ox0dea: matz must've been for it at some point, but he changed his mind: https://github.com/ruby/ruby/commit/7b5d9d7
[23:07:22] juanpablo_: has joined #ruby
[23:08:13] shock_one: has joined #ruby
[23:08:17] arcanez: sharkman: that just subtracts 4 hours..
[23:08:32] sharkman: yeah that is how i convert from UTC to EST
[23:09:20] sevenseacat: daylight savings is gonna break you
[23:09:23] Rubie: has joined #ruby
[23:09:48] ScriptGeek: has left #ruby: ()
[23:09:54] dfockler: dst and timezones are potent mix
[23:10:15] bricker: ACTION has DST PTSD
[23:10:33] Ox0dea: >> Time.new.dst?
[23:10:34] ruboto: Ox0dea # => false (https://eval.in/431425)
[23:10:49] bricker: one of my favorite videos: https://www.youtube.com/watch?v=-5wpm-gesOY Tom Scott talking about programming for Timezones
[23:10:53] Swappticon: has joined #ruby
[23:10:57] Ox0dea: And nearly rips his hair out.
[23:11:05] sevenseacat: ACTION downloads it to watch later
[23:11:14] Ox0dea: Did someone say youtube-dl?
[23:11:20] sevenseacat: thats what i was using :P
[23:11:20] chills42: has joined #ruby
[23:11:26] platzhirsch: has joined #ruby
[23:11:29] platzhirsch: has left #ruby: ()
[23:11:41] Ox0dea: mpv + youtube-dl = <3
[23:11:42] BLuEGoD: has joined #ruby
[23:12:00] arcanez: I think DateTime.new.in_time_zone('America/New_York') would work
[23:12:09] arcanez: I'm in Arizona though, so I don't deal with DST.
[23:12:12] paulcsmith: has joined #ruby
[23:12:33] Motoservo: has joined #ruby
[23:12:59] arcanez: I'm always GMT-0700 or UTC-0700
[23:13:05] dfockler: ACTION is refraining from saying mean things about Arizona
[23:13:14] arcanez: dfockler: :)
[23:13:29] sevenseacat: ACTION also doesn't do DST and sits firmly in UTC+8
[23:13:52] sevenseacat: (though I build apps for places that do have DST. the joys)
[23:15:10] arcanez: I work out of an office in Annapolis, MD. so I'm painfully aware of EST vs EDT..
[23:15:28] mohikaner: has joined #ruby
[23:15:57] sevenseacat: yeah my company is in Sydney AU which does do DST. so much fun.
[23:16:11] postmodern: has joined #ruby
[23:17:26] northfurr: has joined #ruby
[23:18:33] theery: has joined #ruby
[23:18:41] Rurik: has joined #ruby
[23:18:47] Rurik: has joined #ruby
[23:19:41] rakm: has joined #ruby
[23:21:20] snockerton: has left #ruby: ()
[23:22:10] bender_unit: has joined #ruby
[23:23:09] theRoUS: cucumber question: i want to test something that deals with a specific sequence. telling it to 'grow' or 'shrink' the sequence should alter the current value. unfortunately, at the beginning of each scenario things get re-initialised.
[23:23:13] theRoUS: how can i build a scenario outline that uses the same object, unmodified, for each scenario in the outline?
[23:23:25] Radar: You can't.
[23:23:29] Radar: Group them into the same scenaril
[23:23:33] Radar: scenario*
[23:23:57] mohikaner: has left #ruby: ()
[23:24:17] theRoUS: Radar: ew. so much for short simple scenaria :-)
[23:25:09] theRoUS: Radar: no best-practice magic using tags, Around() hooks, and instance/module variables?
[23:25:53] sankaber: has joined #ruby
[23:25:54] blueOxigen: has joined #ruby
[23:27:38] Rurik: has joined #ruby
[23:28:55] Rurik: has joined #ruby
[23:30:13] Rurik: has joined #ruby
[23:32:31] Mives: has joined #ruby
[23:33:18] roxtrongo: has joined #ruby
[23:33:29] shmilan: has joined #ruby
[23:34:49] bootstrappm: has joined #ruby
[23:34:57] Mives: has joined #ruby
[23:35:19] Mives: has joined #ruby
[23:35:55] yfeldblum: has joined #ruby
[23:37:32] ivanskie: has joined #ruby
[23:40:13] symm-: has joined #ruby
[23:40:19] Mives: has joined #ruby
[23:42:46] khebbie: has joined #ruby
[23:42:50] davidhq: has joined #ruby
[23:44:15] symm-_: has joined #ruby
[23:44:30] baweaver: has joined #ruby
[23:44:43] swgillespie: has joined #ruby
[23:44:59] Ox0dea: postmodern: Yours is so far from the name I would've expected to find on Bug #11520.
[23:45:44] platzhirsch: has joined #ruby
[23:45:46] bffff_: has joined #ruby
[23:47:21] chills42: has joined #ruby
[23:47:23] Ox0dea: theRoUS: Wrap your sequence in a Proc and invoke it in each scenario?
[23:47:28] Ox0dea: Kinda silly, though.
[23:50:43] postmodern: Ox0dea, hmm? whenever i find something that sticks out, i tend to submit a bug.
[23:51:03] mase-chatter: has joined #ruby
[23:51:33] siempref_: hey I need to dynamically build a pdf using image from a remote url and a generated barcode and then upload it to s3
[23:51:59] bronson: has joined #ruby
[23:52:20] siempref_: what would be the best way to do this using Grape?
[23:52:21] Ox0dea: postmodern: It shouldn't've stuck out to somebody such as yourself was the sentiment I meant to convey there.
[23:53:31] weemsledeux: has joined #ruby
[23:53:39] dfockler: siempref_: those are two separate things, Grape should basically take the arguments to build the PDF from an HTTP request
[23:54:01] Ox0dea: Array#compact! is just another of many such methods which return `nil` if they didn't end up mutating the receiver.
[23:54:03] siempref_: ok, what would be the simplest way to combine these elements?
[23:54:56] dfockler: siempref_: well grape just routes to a method, so have your method build and upload the pdf
[23:55:03] postmodern: Ox0dea, your assuming that i know everything ;)
[23:55:22] Ox0dea: postmodern: More than many is all.
[23:55:54] postmodern: Ox0dea, i actually never heard of that rule until today, i always heard that in-place mutation methods returned nil, or that you should expect a nil
[23:56:27] rbennacer: has joined #ruby
[23:57:45] Ox0dea: postmodern: I guess the fact that you're the reason I get to switch between Rubies so conveniently has you on a sort of pedestal in my mind.
[23:57:51] duoi: has joined #ruby
[23:58:04] dfockler: i just like chruby
[23:58:06] sevenseacat: ACTION bows down to postmodern 
[23:58:06] Ox0dea: In any case, I apologize for wording it such that my praise might've been misconstrued as insult.
[23:58:21] Ox0dea: ACTION joins sevenseacat and advises the channel to follow suit.
[23:58:21] dfockler: i just like typing chruby really fast
[23:58:22] postmodern: Ox0dea, smash that pedestal. we're all just humans, not heroes
[23:58:25] arcanez: if I am reading it right, Lumberjack::Device::DateRollingLogFile rolls the files before_flush so a dated file won't be created if you do not log to it for that day?
[23:59:55] Ox0dea: arcanez: Is that not the behavior you've observed?