« Back to channel list

#ruby - 10 November 2015

« Back 1 day Forward 1 day »
[00:00:25] Ox0dea: molay: Well, persistence is almost always a precursor to querying; you do intend to query the data, right?
[00:00:32] wldcordeiro: has joined #ruby
[00:01:21] zeroDivisible: has joined #ruby
[00:01:36] djbkd: has joined #ruby
[00:02:41] atomical: has joined #ruby
[00:03:23] zeroDivisible: has joined #ruby
[00:04:01] TomPeed: has joined #ruby
[00:04:16] yfeldblum: has joined #ruby
[00:05:14] cmoneylulz: has joined #ruby
[00:05:56] danneu: molay: it's often a bad sign if you're manually escaping things.
[00:06:04] Ox0dea: has joined #ruby
[00:06:20] molay: Ox0dea: yes I will need to query too
[00:06:27] cicloid: has joined #ruby
[00:07:06] Ox0dea: molay: Then SQLite3 is a fine choice, and the Sequel gem is great for interacting with it.
[00:07:38] EminenceHC: has joined #ruby
[00:07:58] eam: not sqlite4?
[00:08:31] Trynemjoel: has joined #ruby
[00:08:44] Yzguy: has joined #ruby
[00:09:27] molay: Ox0dea: well i'm noticing a lot of comments saying its not a good idea doing it the way i'm doing it... each line of the table has 25 items, and I wasn't sure how else to input that many without building a string as i was writing the query
[00:09:41] tubuliferous_: has joined #ruby
[00:09:42] dorei: how can i find which items of an array are duplicate?
[00:09:47] Ox0dea: molay: You should probably be using a prepared statement.
[00:09:53] Steve_Jobs: has joined #ruby
[00:10:12] molay: Ox0dea: how do you mean "prepared statement" ?
[00:10:21] eam: fun fact: a lot of database drivers just turn prepared statements into interpolated strings within the driver
[00:10:26] Ox0dea: molay: It's very Google-able. :P
[00:10:29] jorb: has joined #ruby
[00:10:41] cicloid: has joined #ruby
[00:11:00] molay: Ox0dea: yep, found it.. thank you
[00:11:20] molay: I sure have a long way to go... the ruby world is huge!!
[00:11:35] Ox0dea: It's... pretty big, yeah.
[00:11:41] eightbellyoct: has joined #ruby
[00:11:57] eam: the sun never sets, etc
[00:11:57] diegoaguilar: has joined #ruby
[00:12:08] molay: haha. eam you must be british
[00:12:08] Steve_Jobs: has joined #ruby
[00:12:12] shevy: is it vampire time again?
[00:12:18] Axsuul: has joined #ruby
[00:12:37] leafybas_: has joined #ruby
[00:12:39] Eiam: has joined #ruby
[00:12:58] molay: ok bbl.. thanks guys
[00:13:14] infamos: has joined #ruby
[00:13:48] eam: spawn of, at least
[00:13:49] Ox0dea: shevy: 1827 is a vampire time, and it's just around the corner for some folks.
[00:13:57] cicloid_: has joined #ruby
[00:14:15] rgb-one: has joined #ruby
[00:16:33] weemsledeux: has joined #ruby
[00:16:46] cicloid: has joined #ruby
[00:17:34] zacts: has joined #ruby
[00:18:32] dreinull75: has joined #ruby
[00:20:16] devgiant: has joined #ruby
[00:20:37] Ox0dea: >> [1,2,3,2,1].each_with_object(Hash.new 0) { |e, h| h[e] += 1 }.select { |_, v| v > 1 }.keys # dorei
[00:20:38] ruboto: Ox0dea # => [1, 2] (https://eval.in/465870)
[00:20:45] Ox0dea: There's one O(n) approach, but there are others.
[00:20:48] kies: has joined #ruby
[00:21:19] Ox0dea: It's better than the O(n^2) approach of assigning your collection to a variable and using `foo.select { |e| foo.count(e) > 1 }`, at any rate.
[00:21:40] jericon: Ox0dea: you helped me a couple weeks ago about finding a Ruby equivilent to MySQL's "to_days" function and it was 2 days off. I figured out why.
[00:21:54] Ox0dea: jericon: Enlighten me. :)
[00:21:56] jericon: Ox0dea: Ruby starts at day 0, while mysql starts at day 1 (0000-01-01).
[00:21:58] jericon: so that's one day
[00:22:07] jericon: also, ruby figured that 0000 was a leap year
[00:22:15] Ox0dea: Ah, interesting.
[00:22:43] Ox0dea: It's hard to say whether those assumptions are entirely wrong or right.
[00:23:11] Ox0dea: We index everything else from zero; why not history?
[00:23:33] Ox0dea: Counting 0 as a leap year seems a little weird, though.
[00:23:34] eam: dealing with dates which span governments is always difficult
[00:23:55] djbkd: has joined #ruby
[00:24:13] Ox0dea: /which span governments/d
[00:24:26] eam: yes, I should say even moreso than usual
[00:24:31] eam: see also: maps
[00:24:33] centrx: has joined #ruby
[00:24:34] charliesome: has joined #ruby
[00:25:13] TPBallbag: has joined #ruby
[00:25:31] jericon: exactly, 0000 was a leap year, and MySQL didn't even recognize 0000-02-29 as a valid day.
[00:26:25] Ox0dea: I think it's probably the case that MySQL's interpretation is more accurate by dint of including some of the "political" information.
[00:26:30] jericon: although ultimately... I updated my script to use this:
[00:26:31] jericon: cur_days = @client.query("SELECT to_days(now()) as days").first["days"]
[00:26:50] patdohere: has joined #ruby
[00:27:18] jericon: Then I can rely on MySQL giving me what it believes is the number, and only using that. No fiddling necessary
[00:28:04] Arkon: has joined #ruby
[00:29:03] atomical: has joined #ruby
[00:29:16] Ox0dea: If it fits, you ships.
[00:30:40] jericon: My fear is that somewhere down the line, something would change and then Ruby would be 1 day off... or 3 days off... and then the script breaks.
[00:30:47] jericon: but thanks for the help :)
[00:33:43] Eiam: has joined #ruby
[00:34:14] centrx: 0 isn't a year at all right?
[00:34:38] predator117: has joined #ruby
[00:34:50] djbkd: has joined #ruby
[00:34:57] Ox0dea: >> Time.new 0
[00:34:58] ruboto: Ox0dea # => 0000-01-01 00:00:00 +0000 (https://eval.in/465871)
[00:35:02] Ox0dea: Ruby certainly thinks so.
[00:35:06] jericon: technically, it is. the MySQL to_days function counts the nubmer of days since 0000-01-01
[00:35:11] Croves: has joined #ruby
[00:36:29] eam: wait, what's the arg to Time.new?
[00:36:52] Ox0dea: It's variadic.
[00:37:01] Ox0dea: >> Time.new 2015, 11
[00:37:02] ruboto: Ox0dea # => 2015-11-01 00:00:00 +0000 (https://eval.in/465872)
[00:37:06] eam: but given a fixnum, what does it treat it as?
[00:37:18] h99h9h88: has joined #ruby
[00:37:21] eam: ok. I read that as a time_t and had a wtf
[00:37:55] Ox0dea: >> Time.new -1
[00:37:56] ruboto: Ox0dea # => -0001-01-01 00:00:00 +0000 (https://eval.in/465873)
[00:38:06] Ox0dea: Huh, I get +0456 on my machine.
[00:38:24] Ox0dea: I wonder why 456 was chosen to represent LMT.
[00:38:35] Ox0dea: What's gonna happen if there's some timezone that actually is +0456 of GMT?
[00:38:46] podman: has joined #ruby
[00:39:42] EminenceHC: has joined #ruby
[00:39:45] Ox0dea: Oh, right, that's why we name things.
[00:39:47] Cyther: has joined #ruby
[00:42:19] uber_: has joined #ruby
[00:42:25] exadeci: has joined #ruby
[00:43:34] goodcodeguy: has joined #ruby
[00:44:09] FailBit: timezones are awkward
[00:44:18] FailBit: I always manage to screw UTC offsets up
[00:44:23] devoldmx: has joined #ruby
[00:44:53] uber_: has left #ruby: ()
[00:50:05] rbowlby: has joined #ruby
[00:50:31] djbkd: has joined #ruby
[00:52:17] weaksauce: FailBit yeah there are a lot of them and some are half offsets
[00:53:02] Kabal: has joined #ruby
[00:53:23] weaksauce: -11 to +14 with some funky borders
[00:53:48] djbkd: has joined #ruby
[00:54:42] shock_one: has joined #ruby
[00:55:20] dorei: and best korea recently changed its time zone from utc + 9 to utc + 8:30
[00:55:44] stannard: has joined #ruby
[00:56:22] swgillespie: has joined #ruby
[00:56:58] weaksauce: I'm sure that didn't mess up any code at all
[00:58:05] Ox0dea: weaksauce: Are you questioning Best Korea's intentions?
[00:58:31] Ox0dea: As I see it, it's the code that was wrong to begin with for not preempting the change.
[00:58:35] weaksauce: would never do such things
[00:58:39] Ox0dea: I should hope not.
[00:58:48] baweaver: has joined #ruby
[01:00:10] newdan: has joined #ruby
[01:00:58] JDiPierro: has joined #ruby
[01:02:17] Ox0dea: FailBit: What ails you?
[01:02:24] Ox0dea: A lack of ale, mayhap?
[01:02:46] FailBit: mainly, users
[01:02:51] FailBit: they're idiots
[01:03:16] weaksauce: that's a constant
[01:03:24] Ox0dea: >> Errno::EDOOFUS # Literally.
[01:03:25] ruboto: Ox0dea # => Errno::NOERROR (https://eval.in/465876)
[01:03:36] FailBit: oh god that made my day
[01:05:02] rgtk: has joined #ruby
[01:06:29] codeurge: has joined #ruby
[01:06:36] bb010g: has joined #ruby
[01:06:53] bubbys: has joined #ruby
[01:07:03] bruno-: has joined #ruby
[01:07:48] CodingWolf: has joined #ruby
[01:09:00] rgtk: has joined #ruby
[01:10:36] JDiPierro: has joined #ruby
[01:12:21] pandaant: has joined #ruby
[01:13:03] _blizzy_: has joined #ruby
[01:13:16] DiCablo: has joined #ruby
[01:13:35] ekinmur: has joined #ruby
[01:13:36] swgillespie: has joined #ruby
[01:13:41] leafybas_: has joined #ruby
[01:14:31] hahuang65: has joined #ruby
[01:14:55] kp666_: has joined #ruby
[01:17:25] rgtk: has joined #ruby
[01:17:26] pkrnj: has joined #ruby
[01:19:00] jobewan: has joined #ruby
[01:19:38] h99h9h88: has joined #ruby
[01:20:44] platzhirsch: has left #ruby: ()
[01:21:29] ellisTAA: has joined #ruby
[01:21:34] tkuchiki: has joined #ruby
[01:23:35] dikaio_: has joined #ruby
[01:23:39] rgtk: has joined #ruby
[01:26:01] errant_rider: has joined #ruby
[01:26:19] errant_rider: anyone here ever play with the google_drive gem?
[01:27:37] hxegon: has joined #ruby
[01:30:29] SamGerber: has joined #ruby
[01:30:35] Sam_Gerber: has joined #ruby
[01:31:19] jim1138: has joined #ruby
[01:32:00] rgtk: has joined #ruby
[01:32:28] Arkon: has joined #ruby
[01:36:55] slash_ni1k: has joined #ruby
[01:38:07] veg: has joined #ruby
[01:38:15] rgtk: has joined #ruby
[01:39:13] cicloid: has joined #ruby
[01:39:54] yfeldblum: has joined #ruby
[01:41:41] Asher: has joined #ruby
[01:41:54] mordocai: has joined #ruby
[01:44:10] Yzguy: has joined #ruby
[01:44:54] bruno-_: has joined #ruby
[01:48:42] rgtk: has joined #ruby
[01:49:41] dorei: >> "3.12".to_f
[01:49:42] ruboto: dorei # => 3.12 (https://eval.in/465898)
[01:49:51] dorei: >> "3,12".to_f
[01:49:52] ruboto: dorei # => 3.0 (https://eval.in/465899)
[01:50:12] dorei: is there some to have to_f take into account locale rules?
[01:50:22] Ox0dea: Probably not. :<
[01:50:33] Sam_Gerber: has joined #ruby
[01:52:22] howdoicomputer: has joined #ruby
[01:52:58] bricker: has joined #ruby
[01:53:31] ccooke: has joined #ruby
[01:53:36] Rinzlit: has joined #ruby
[01:54:44] rgtk: has joined #ruby
[01:56:30] Ox0dea: dorei: C's sprintf() does take locale into account, but Ruby's does not.
[01:58:17] malconis: has joined #ruby
[01:58:44] Ox0dea: http://git.io/v8oE0
[01:58:46] rgtk: has joined #ruby
[01:59:51] baweaver: has joined #ruby
[02:00:00] vdamewood: has joined #ruby
[02:00:01] Rinzlit: has joined #ruby
[02:00:16] rakm: has joined #ruby
[02:00:50] freerobby: has joined #ruby
[02:01:55] jackjackdripper: has joined #ruby
[02:03:08] errant_rider: has left #ruby: ()
[02:03:17] ascarter: has joined #ruby
[02:03:34] infamos: has joined #ruby
[02:04:09] jobewan: has joined #ruby
[02:04:58] rgtk: has joined #ruby
[02:06:31] FailBit: jesus fuck
[02:06:50] FailBit: nexus 5x doesn't come with a regular USB cable so I had to wait to get an adapter
[02:07:02] FailBit: now it takes a nanosim instead of a microsim
[02:07:05] FailBit: so I have to clip my simcard
[02:08:44] TomPeed: has joined #ruby
[02:09:01] northfurr: has joined #ruby
[02:09:03] rgtk_: has joined #ruby
[02:10:06] paradisaeidae: has joined #ruby
[02:12:24] RegulationD: has joined #ruby
[02:13:10] rgtk: has joined #ruby
[02:14:31] poguez_: has joined #ruby
[02:15:56] pkrnj: has joined #ruby
[02:16:58] DLSteve: has joined #ruby
[02:18:44] h99h9h88: has joined #ruby
[02:19:23] rgtk: has joined #ruby
[02:19:43] NeverDie: has joined #ruby
[02:20:31] leafybas_: has joined #ruby
[02:20:32] atomical_: has joined #ruby
[02:21:09] CloCkWeRX: has joined #ruby
[02:22:44] NeverDie: has joined #ruby
[02:23:08] NeverTired: has joined #ruby
[02:23:28] mattwildig: has joined #ruby
[02:25:14] EminenceHC: has joined #ruby
[02:26:31] skweek: has joined #ruby
[02:26:45] s00pcan: has joined #ruby
[02:27:07] baweaver: has joined #ruby
[02:27:42] rgtk: has joined #ruby
[02:29:02] jobewan: has joined #ruby
[02:30:05] |ifei5good: has joined #ruby
[02:31:07] jessemcgilallen: has joined #ruby
[02:32:56] charany1: has joined #ruby
[02:34:04] droptone: has joined #ruby
[02:34:38] droptone: Question: I've been studying YAML for a bit using Ruby, and I'm attempting to write an array to a YAML file.
[02:34:45] droptone: Anyone have any recommendations on a tutorial for such?
[02:35:19] droptone: I read about PSStore, is there a quick way to write, for example, a hash that has a string and an array, to a yaml file?
[02:36:19] NeverDie: has joined #ruby
[02:38:24] rgtk: has joined #ruby
[02:38:41] DiCablo: has joined #ruby
[02:39:19] Ox0dea: droptone: You can use `YAML.dump hash` or `hash.to_yaml` to get a string, and then write that to a file however you know how.
[02:39:24] droptone: Can you simply use Yaml::load_file if the file doesn't exist?
[02:39:30] droptone: Ox0dea: Thank you.
[02:39:48] northfurr: has joined #ruby
[02:40:05] favadi: has joined #ruby
[02:40:53] Ox0dea: droptone: File.write('foo', bar) will open 'foo' in write mode (thus overwriting its previous contents if they existed), write `bar` as a string (by invoking its #to_s method), and then close the file.
[02:41:27] droptone: Ok, so for writing a file in YAML format, are there no YAML-specific methods I should leverage?
[02:41:39] cicloid: has joined #ruby
[02:41:43] droptone: Or just use standard File.write and manually write in YAML-compatible format?
[02:41:50] gambl0re: has joined #ruby
[02:43:21] Ox0dea: droptone: YAML.dump can be given an IO-like as its second argument.
[02:43:28] Ox0dea: I guess that's probably the one you want.
[02:43:33] hxegon: has joined #ruby
[02:43:43] ruby-lang674: has joined #ruby
[02:44:02] ruby-lang674: has left #ruby: ()
[02:44:03] Ox0dea: "IO-like" here means anything which has IO as an ancestor or responds to #write.
[02:44:10] devoldmx: has joined #ruby
[02:44:29] rgtk: has joined #ruby
[02:44:35] droptone: Gotcha, thank you.
[02:44:36] ruby-lang429: has joined #ruby
[02:44:57] ruby-lang429: can someone help me with a webscraper
[02:45:19] ruby-lang429: i need an algorithm to scrape all the text from each profile in angel list
[02:46:17] rickmasta: has joined #ruby
[02:46:20] baweaver: do they have an API?
[02:46:32] baweaver: if not, it's generally considered bad form to scrape
[02:46:50] ruby-lang429: i was able to scrape the names of the people
[02:47:01] ruby-lang429: https://angel.co/people?tag_ids%5B%5D=1664&tag_ids%5B%5D=82532&page=1
[02:47:32] ruby-lang429: i wrote a do loop where page = 1 changes to =2, =3,
[02:47:41] baweaver: https://angel.co/api
[02:48:01] baweaver: that looks like an API
[02:48:09] Ox0dea: > [C]rawling the Service is permissible in accordance with this agreement, but scraping the Service without the prior consent of AngelList except as permitted by this agreement is expressly prohibited.
[02:48:11] Ox0dea: ruby-lang429: ^
[02:48:27] rbowlby: has joined #ruby
[02:48:31] rgtk: has joined #ruby
[02:48:33] scmx: has joined #ruby
[02:48:51] baweaver: Use the API
[02:48:59] baweaver: it'd be easier to use anyways
[02:49:05] paradisaeidae: has joined #ruby
[02:49:47] hxegon: has joined #ruby
[02:50:01] charliesome: has joined #ruby
[02:50:06] ruby-lang429: i'd rather not use it
[02:50:32] Ox0dea: I'm phoning the authorities.
[02:50:39] vigintas: has joined #ruby
[02:50:46] baweaver: ACTION kinda is the law in these here parts
[02:50:50] Sembei: has joined #ruby
[02:50:57] baweaver: ruby-lang429: we're not going to help you break their rules
[02:51:02] houhoulis: has joined #ruby
[02:52:29] havenwood: AngelList Terms of Service ?? XIII(c)(xvii): Participants in the AngelList community will not ... use or launch, develop or distribute any automated system, including, without limitation, any spider, robot (or "bot"), cheat utility, scraper or offline reader that accesses the Service....
[02:52:37] baweaver: The API will be a cleaner and easier interface to work with.
[02:52:42] bruno-: has joined #ruby
[02:52:42] cmoneylulz: has joined #ruby
[02:53:02] diegoaguilar: has joined #ruby
[02:53:11] Ox0dea: ruby-lang429: Scraping is a gateway crime.
[02:53:34] havenwood: And unfortunately probably a Federal crime under the CFAA.
[02:53:43] havenwood: (If you're in the States.)
[02:53:51] baweaver: well, we've already covered that it's bad, so we can leave it at that.
[02:53:52] dorei: scraping is a crime? :O
[02:54:02] baweaver: no need to go over it multiple different ways.
[02:54:12] havenwood: dorei: The Computer Fraud and Abuse Act is incredibly broad.
[02:54:25] Arkon: has joined #ruby
[02:54:56] dorei: how is scraping different from having someone clicking each link and then print screen? or is that a crime too? :O
[02:54:59] tubuliferous_: has joined #ruby
[02:55:16] havenwood: dorei: Everything is a crime. They just pick whom to prosecute.
[02:55:18] baweaver: let's go to offtopic if we want to delve this much deeper
[02:55:41] goodcodeguy: has joined #ruby
[02:55:58] Trieste: has joined #ruby
[02:56:06] karapetyan: has joined #ruby
[02:57:02] cmoneylulz: has joined #ruby
[02:58:56] rgtk: has joined #ruby
[02:59:23] karapetyan: has joined #ruby
[02:59:56] BraddPitt: Can anyone lend an eye to do a code review on a gem I wrote?
[03:00:25] havenwood: BraddPitt: Link?
[03:00:51] nateberkopec: has joined #ruby
[03:01:49] cmoneylulz: has joined #ruby
[03:02:56] rgtk: has joined #ruby
[03:03:42] terminalrecluse: has joined #ruby
[03:04:08] |ifei5g00d: has joined #ruby
[03:06:00] baweaver: havenwood: https://upload.wikimedia.org/wikipedia/en/3/39/Wakerlink.jpg
[03:06:16] havenwood: baweaver: touche
[03:06:27] BraddPitt: havenwood can I PM you?
[03:06:36] vdamewood: has joined #ruby
[03:06:40] havenwood: BraddPitt: sure
[03:07:02] rgtk: has joined #ruby
[03:07:10] ruby-lang038: has joined #ruby
[03:07:41] baweaver: BraddPitt: I likes code reviews too
[03:07:50] arescorpio: has joined #ruby
[03:08:50] asas: has joined #ruby
[03:09:01] TomPeed: has joined #ruby
[03:09:54] edj: has joined #ruby
[03:12:51] markao: has joined #ruby
[03:13:50] ESpiney: has joined #ruby
[03:15:20] rgtk: has joined #ruby
[03:15:52] NeverDie: has joined #ruby
[03:15:54] mary5030: has joined #ruby
[03:19:24] rgtk: has joined #ruby
[03:19:29] devoldmx: has joined #ruby
[03:23:40] djbkd: has joined #ruby
[03:23:58] kp666: has joined #ruby
[03:23:59] Arkon: has joined #ruby
[03:24:34] hxegon: has joined #ruby
[03:25:13] CVTJNII: has joined #ruby
[03:25:48] claw: has joined #ruby
[03:26:05] hahuang65: has joined #ruby
[03:26:45] favadi: has joined #ruby
[03:27:50] rgtk: has joined #ruby
[03:29:38] |ifei5g00d: has joined #ruby
[03:30:05] hxegon: has joined #ruby
[03:30:39] Yzguy: has joined #ruby
[03:32:59] dionysus69: has joined #ruby
[03:36:18] edj: does anyone know aproximately how many hours rubymonk should take?
[03:36:43] DLSteve: has joined #ruby
[03:36:47] Ox0dea: >> rand 42 # edj
[03:36:48] ruboto: Ox0dea # => 6 (https://eval.in/465906)
[03:37:27] sankaber: has joined #ruby
[03:39:28] dorei: >> (1..42).to_a.sample
[03:39:29] ruboto: dorei # => 22 (https://eval.in/465907)
[03:40:03] Arkon: has joined #ruby
[03:43:03] ellisTAA: has joined #ruby
[03:43:08] NeverDie: has joined #ruby
[03:43:21] jorb: has joined #ruby
[03:43:33] karapetyan: has joined #ruby
[03:43:46] ellisTAA: has left #ruby: ()
[03:47:03] solocshaw: has joined #ruby
[03:47:55] NeverDie: has joined #ruby
[03:48:43] wildlander: has joined #ruby
[03:51:24] vigintas: has joined #ruby
[03:51:45] NeverDie: has joined #ruby
[03:54:43] bruno-: has joined #ruby
[03:55:48] CloCkWeRX: has joined #ruby
[03:56:02] Rinzlit1: has joined #ruby
[03:59:54] Rinzlit: has joined #ruby
[03:59:54] charliesome: has joined #ruby
[04:00:55] x-light: has joined #ruby
[04:01:01] EminenceHC: has joined #ruby
[04:01:08] Arkon: has joined #ruby
[04:03:22] Rinzlit1: has joined #ruby
[04:04:34] TPBallbag: has joined #ruby
[04:05:55] samu: has joined #ruby
[04:07:36] Eiam_: has joined #ruby
[04:10:10] agent_white: has joined #ruby
[04:10:46] samu: Hi there, sorry for bothering everyone...a bit of a newbie question here, but I have looked and can't find what I'm looking for. I'd like to see ruby documentation in the command line. I've been trying to massage ri to fit the need, but keep running into issues and have read that when used in conjunction with rvm it will eat a lot of memory. Can anyone recommend a way to find ruby documentation that interrupts one's workflow less than naviga
[04:10:47] samu: ting to ruby-doc.org?
[04:11:25] dionysus69: i know how to access last object in array but how do I access one before last?
[04:11:48] dionysus69: oh nice didnt know negative worked thanks sam_
[04:11:49] skweek: has joined #ruby
[04:11:58] braincrash: has joined #ruby
[04:12:04] paradisaeidae: has joined #ruby
[04:12:35] Yzguy: has joined #ruby
[04:12:43] gix: has joined #ruby
[04:12:44] musou: has joined #ruby
[04:15:20] agent_white: Evenin' folks
[04:16:58] Ox0dea: sam_: I'm not sure I follow; ri is really how you ought to be accessing Ruby documentation from the command line.
[04:18:16] colegatron: has joined #ruby
[04:20:04] freedrull: has joined #ruby
[04:20:51] freedrull: module names matching the file path, convention or hard requirement? eg Foo::Bar::Baz is located foo/bar/baz.rb
[04:22:01] Ox0dea: freedrull: Convention, but there's no particularly compelling reason to break it.
[04:22:17] watsy: has joined #ruby
[04:22:24] DLSteve: has joined #ruby
[04:22:36] freedrull: its kind of hard to make a good case against it in a code review, since it doesn't necessarily break anything
[04:23:10] Ox0dea: It breaks Rails' autoloading mechanism.
[04:23:36] pontiki: breaking a convention is a great reason to flag it
[04:23:57] pontiki: there should be good reasons given for breaking conventions, not the other way 'round
[04:24:46] northfurr: has joined #ruby
[04:25:35] freedrull: Ox0dea: oh right, thats true, i have definitely seen that before
[04:25:48] freedrull: pontiki: makes sense
[04:25:57] fedexo: has joined #ruby
[04:26:04] Yzguy: has joined #ruby
[04:27:33] jackjackdripper: has joined #ruby
[04:27:54] rbowlby: has joined #ruby
[04:28:27] RobertBirnie: has joined #ruby
[04:30:28] maxzda: has joined #ruby
[04:30:45] shock_one: has joined #ruby
[04:31:22] samu: Ox0dea, thank you, I will try harder to get it working.
[04:31:34] bnagy: sam_: I think pry does docs
[04:31:52] bnagy: and most ruby workflows probably involve an open pry (or irb) window
[04:32:14] govg: has joined #ruby
[04:33:36] samu: has joined #ruby
[04:34:40] agent_wh1te: has joined #ruby
[04:36:42] agent_white: has joined #ruby
[04:37:08] samu: bnagy, what would you type in a pry or irb prompt
[04:37:09] rickmasta: has joined #ruby
[04:38:16] Ox0dea: sam_: help
[04:38:30] ThatsNotJack: has joined #ruby
[04:39:20] samu: Ox0dea, thanks
[04:39:26] Ox0dea: sam_: Sure thing.
[04:40:35] sunya7a: how do i sort an array of objects into groups based on a property of the object?
[04:41:35] Ox0dea: &ri Enumerable#sort_by @sunya7a
[04:41:36] `derpy: sunya7a: http://www.rubydoc.info/stdlib/core/Enumerable#sort_by-instance_method
[04:41:46] ThatsNotJack: has joined #ruby
[04:42:31] ngscheurich: has joined #ruby
[04:42:42] swgillespie: has joined #ruby
[04:43:13] willardg: has joined #ruby
[04:43:43] Skull0Inc: has joined #ruby
[04:45:01] bnagy: 'into groups' might be group_by
[04:46:56] charliesome: has joined #ruby
[04:48:46] Arkon: has joined #ruby
[04:51:34] northfurr: has joined #ruby
[04:51:44] willardg: has left #ruby: ("Textual IRC Client: www.textualapp.com")
[04:52:08] pdoherty: has joined #ruby
[04:57:19] Arkon: has joined #ruby
[04:57:31] darkf: has joined #ruby
[04:57:36] ngscheurich: has joined #ruby
[04:57:59] h99h9h88: has joined #ruby
[05:00:10] Arkon: has joined #ruby
[05:00:39] leafybas_: has joined #ruby
[05:05:37] samu: Ox0dea and bnagy, I know you probably think me a fool (and are likely right) but your simple instructions helped me out worlds - I wasn't using half of what pry is good for.
[05:05:53] Ox0dea: sam_: Probably not even a tenth! :P
[05:05:55] samu: Thank you
[05:05:59] Ox0dea: It's a very powerful tool.
[05:06:10] samu: Ox0dea, even that's generous
[05:06:29] Ox0dea: sam_: In any case, I'm glad we've helped you to see that particular light.
[05:16:10] sleetdrop: has joined #ruby
[05:17:25] agent_white: Dese folks, they know thangs.
[05:17:47] sleetdrop: osx 10.11 gem install report ssl related error https://gist.github.com/sleetdrop/f13db1a0188b1eec3c76
[05:18:38] mallu: has joined #ruby
[05:18:54] Arkon: has joined #ruby
[05:20:55] mallu: Can someone please tell me why this is not working? https://gist.github.com/anonymous/4ca7a3958083876fe59f
[05:21:19] Arkon_: has joined #ruby
[05:22:17] Ox0dea: mallu: You've got the parameters backwards in the method definition.
[05:23:21] mallu: Ox0dea: which parameters?
[05:23:36] Ox0dea: mallu: The only parameters in that snippet of code.
[05:23:42] mallu: Here is the full script https://gist.github.com/anonymous/c57ef9f868602bb7d4b9
[05:24:10] Ox0dea: mallu: Yep, just flip the parameters for `calculate`.
[05:25:05] mallu: Then I get this error syntax error, unexpected '=', expecting ')' def calculate(*numbers, options = {} ) ^ from C:/Ruby22-x64/bin/irb:11:in `<main>'
[05:25:17] devoldmx: has joined #ruby
[05:25:49] Ox0dea: mallu: You'll need to make options a keyword argument.
[05:26:24] mallu: Ox0dea: how do you do that? I'm new at this
[05:27:02] Ox0dea: mallu: Er, sorry, that wouldn't quite work. You'll have to use `add` and `subtract` as optional keyword arguments.
[05:27:23] jobewan: has joined #ruby
[05:27:32] Ox0dea: Alternatively, you could just accept *arguments, and then pop the last and use it as the options if and only if it's a Hash, but that's hackish.
[05:29:27] framling: has joined #ruby
[05:29:28] favadi: has joined #ruby
[05:29:29] mallu: "You'll have to use `add` and `subtract` as optional keyword arguments" How do you do that?
[05:29:31] jxie: has joined #ruby
[05:29:50] yfeldblum: has joined #ruby
[05:30:55] Ox0dea: mallu: def foo(*args, add: false, subtract: false) ...
[05:31:09] Ox0dea: As you might be able to see, this is probably not the best way to structure this method.
[05:32:15] Ox0dea: `calculate` should just take an initial argument indicating whether to add or subtract.
[05:32:27] bnagy: mallu: https://eval.in/465957
[05:32:51] bnagy: but tbh idiomatic ruby would probably use procs
[05:33:01] Ox0dea: Or a terminal argument.
[05:33:45] mallu: ok... thanks guys
[05:34:38] agent_white: Huh... never thought to try the catch-rest (*) at the start of an argument.
[05:34:49] deg-: has joined #ruby
[05:36:23] bnagy: mallu: https://eval.in/465970 :P
[05:36:35] Ox0dea: >> *butlast, last = [1,2,3,4]; [butlast, last] # agent_white
[05:36:36] ruboto: Ox0dea # => [[1, 2, 3], 4] (https://eval.in/465972)
[05:36:45] astrobunny: has joined #ruby
[05:36:59] dlitvak: has joined #ruby
[05:37:08] Ox0dea: bnagy: No need for `&` there, mind.
[05:37:31] bnagy: not for + or - because magic
[05:37:44] bnagy: but I wasn't sure if it will to_proc any symbol
[05:37:46] mallu: thanks bnagy
[05:37:46] Ox0dea: They're not particularly special.
[05:38:12] sanjayu: has joined #ruby
[05:38:24] Ox0dea: There's a VM instruction called `opt_send_without_block` that was born for #reduce/#inject.
[05:38:34] hxegon: has joined #ruby
[05:38:47] Musashi007: has joined #ruby
[05:39:21] Ox0dea: >> h = {a: {b: {c: 42}}}; %i[a b c].reduce h, :[] # bnagy
[05:39:22] ruboto: Ox0dea # => 42 (https://eval.in/465979)
[05:39:31] vigintas: has joined #ruby
[05:40:17] Ox0dea: So it's not even that some Symbols are "magically" to_proc'd; they just skip the step as an optimization.
[05:40:42] bnagy: this has possibly changed
[05:41:49] Ox0dea: 19>> h = {a: {b: {c: 42}}}; [:a, :b, :c].reduce h, :[] # bnagy
[05:41:50] ruboto: Ox0dea # => 42 (https://eval.in/465980)
[05:42:32] bnagy: 19>> [1,2,3].inject :|
[05:42:33] ruboto: bnagy # => 3 (https://eval.in/465981)
[05:42:36] bnagy: fair enough :)
[05:47:50] Axsuul: has joined #ruby
[05:49:09] Mon_Ouie: has joined #ruby
[05:50:30] CloCkWeRX: has joined #ruby
[05:52:17] iateadonut: has joined #ruby
[05:56:33] bruno-_: has joined #ruby
[05:57:32] Ox0dea: That we can refine #method_missing but not #const_missing is really shitting in my corn flakes right now.
[06:00:26] watsy: has joined #ruby
[06:02:49] shock_one: has joined #ruby
[06:03:44] samu: Maybe a good day to skip breakfast
[06:04:09] agent_white: sam_: Good idea. Gotta let the whiskey age.
[06:04:53] Ox0dea: "Premium malt whiskey, aged nine minutes."
[06:06:06] agent_white: Ox0dea: Damn those bacon strips must be burnt!
[06:06:37] swgillespie: has joined #ruby
[06:06:51] skade: has joined #ruby
[06:07:03] TPBallbag: has joined #ruby
[06:09:39] charliesome: has joined #ruby
[06:12:45] gusrub: has joined #ruby
[06:13:19] baweaver: has joined #ruby
[06:13:36] dhjondoh: has joined #ruby
[06:17:25] yes`r: has joined #ruby
[06:17:26] agent_white: Or more importantly... if it has time to age upon it's age...
[06:18:50] shock_one: has joined #ruby
[06:19:32] bmalum: has joined #ruby
[06:19:47] krz: has joined #ruby
[06:20:00] Xzanron: has joined #ruby
[06:20:26] gard_: has joined #ruby
[06:22:54] benlieb: has joined #ruby
[06:24:43] kerunaru: has joined #ruby
[06:24:45] deg-: has joined #ruby
[06:31:01] norc: has joined #ruby
[06:31:32] lxsameer: has joined #ruby
[06:31:33] lxsameer: has joined #ruby
[06:32:15] hxegon: has joined #ruby
[06:34:57] stannard: has joined #ruby
[06:40:47] bricker: has joined #ruby
[06:41:31] tagrudev: has joined #ruby
[06:41:37] vigintas: has joined #ruby
[06:43:00] RobertBirnie: has joined #ruby
[06:43:35] aganov: has joined #ruby
[06:45:00] lxsameer: has joined #ruby
[06:48:51] Dreamer3: has joined #ruby
[06:50:08] desmondhume: has joined #ruby
[06:53:12] Olipro_: has joined #ruby
[06:53:22] minimalism: has joined #ruby
[06:53:35] bricker: has joined #ruby
[06:53:58] PlasmaStar: has joined #ruby
[06:54:18] dionysus69: has joined #ruby
[06:57:19] jessemcgilallen: has joined #ruby
[07:02:41] Pupp3tm4st3r: has joined #ruby
[07:04:40] astrobunny: has joined #ruby
[07:05:40] symm-: has joined #ruby
[07:08:43] yardenbar: has joined #ruby
[07:09:56] sinkensabe: has joined #ruby
[07:10:24] ciampix: has joined #ruby
[07:11:09] iateadonut: has joined #ruby
[07:11:29] kerunaru: has joined #ruby
[07:11:40] devbug: has joined #ruby
[07:12:07] scmx: has joined #ruby
[07:12:08] rgtk: has joined #ruby
[07:12:48] desmondhume: has joined #ruby
[07:14:09] jas02: has joined #ruby
[07:14:36] willardg: has joined #ruby
[07:14:56] dropkiss: has joined #ruby
[07:17:16] shock_one: has joined #ruby
[07:20:56] codecop: has joined #ruby
[07:21:36] ss_much: has joined #ruby
[07:24:29] craigp: has joined #ruby
[07:26:35] desmondhume: has joined #ruby
[07:28:52] infamos: has joined #ruby
[07:33:52] Asher: has joined #ruby
[07:34:05] astrobunny: has joined #ruby
[07:34:52] arup_r: has joined #ruby
[07:36:24] supergeek: has joined #ruby
[07:36:57] voker57: has joined #ruby
[07:37:40] eightbellyoct: has joined #ruby
[07:41:10] andikr: has joined #ruby
[07:41:34] Stan: has joined #ruby
[07:41:34] dhjondoh: has joined #ruby
[07:42:27] Asher: has joined #ruby
[07:42:48] Xeago: has joined #ruby
[07:43:03] rgtk: has joined #ruby
[07:45:50] ta: has joined #ruby
[07:46:14] darkf: has joined #ruby
[07:47:51] rgtk: has joined #ruby
[07:51:01] solars: has joined #ruby
[07:52:57] agent_white: has joined #ruby
[07:54:22] rgtk: has joined #ruby
[07:57:55] bruno-: has joined #ruby
[07:58:11] lsmola: has joined #ruby
[07:58:52] SCHAAP137: has joined #ruby
[07:59:15] ruby-lang319: has joined #ruby
[07:59:55] rgtk: has joined #ruby
[08:00:33] Rinzlit: has joined #ruby
[08:01:33] araujo_: has joined #ruby
[08:02:55] skade: has joined #ruby
[08:03:03] araujo_: has joined #ruby
[08:03:36] x-light: has joined #ruby
[08:05:10] teclator: has joined #ruby
[08:07:38] zeroDivisible: has joined #ruby
[08:07:40] znz_jp: has joined #ruby
[08:07:41] TPBallbag: has joined #ruby
[08:09:35] th0m_: has joined #ruby
[08:13:53] solars: has joined #ruby
[08:14:41] rakm: has joined #ruby
[08:15:26] Spami_: has joined #ruby
[08:15:36] moeabdol: has joined #ruby
[08:17:21] desmondhume: has joined #ruby
[08:21:03] kimegede: has joined #ruby
[08:22:57] tvw: has joined #ruby
[08:25:48] aufi: has joined #ruby
[08:29:43] vigintas: has joined #ruby
[08:29:54] adac: has joined #ruby
[08:30:24] benlieb: has joined #ruby
[08:34:35] futilegames: has joined #ruby
[08:39:29] arup_r: has joined #ruby
[08:40:07] blaxter: has joined #ruby
[08:41:55] ibouvousaime: has joined #ruby
[08:44:39] shredding: has joined #ruby
[08:44:48] anisha: has joined #ruby
[08:44:53] timonv: has joined #ruby
[08:48:22] Xeago: has joined #ruby
[08:49:18] lipoqil: has joined #ruby
[08:49:52] RegulationD: has joined #ruby
[08:50:44] shock_one: has joined #ruby
[08:50:54] TheHodge: has joined #ruby
[08:51:06] Hounddog: has joined #ruby
[08:54:49] Coldblackice_: has joined #ruby
[08:55:33] vigintas: has joined #ruby
[08:57:56] wprice: has joined #ruby
[08:58:41] norc: Anyone here around with the current ruby trunk and the gcc kit to build it with?
[09:00:00] havenwood: norc: yeah sure, multiple folk
[09:00:19] treaki: has joined #ruby
[09:01:02] govg: has joined #ruby
[09:01:09] norc: havenwood: Can you try building it with CFLAGS=-DCPDEBUG=3
[09:03:41] DEA7TH: has joined #ruby
[09:05:08] trosborn: has joined #ruby
[09:05:20] TPBallbag: has joined #ruby
[09:06:27] govg: has joined #ruby
[09:06:41] bougyman: heh, I just noticed rubymine is for-pay
[09:06:56] havenwood: norc: ./enc/make_encmake.rb: method `inspect' called on unexpected T_IMEMO object (0x007fb103847270 flags=0x703a) (NotImplementedError)
[09:06:56] havenwood: make: *** [enc.mk] Error 1
[09:07:03] norc: havenwood: Thanks.
[09:08:06] howdoi: has joined #ruby
[09:10:28] teclator: has joined #ruby
[09:10:28] vondruch_: has joined #ruby
[09:12:51] DoubleMalt: has joined #ruby
[09:13:46] benlovell: has joined #ruby
[09:18:03] marr: has joined #ruby
[09:18:19] dhjondoh: has joined #ruby
[09:19:33] shock_one: has joined #ruby
[09:20:08] troulouliou_div2: has joined #ruby
[09:21:21] futilegames: has joined #ruby
[09:24:48] Arkon: has joined #ruby
[09:26:25] neanderslob: has joined #ruby
[09:26:47] mark2: has joined #ruby
[09:28:10] erbesharat: has joined #ruby
[09:28:15] joonty: has joined #ruby
[09:29:56] voodo: has joined #ruby
[09:30:03] subscope: has joined #ruby
[09:30:49] qba73: has joined #ruby
[09:31:05] voodo: has joined #ruby
[09:31:25] weemsledeux: has joined #ruby
[09:32:04] tomphp: has joined #ruby
[09:33:58] FailBit: is apparently a valid symbol literal :Y
[09:34:33] apeiros: as are most utf-8 chars
[09:35:01] ruboto: apeiros # => :???? (https://eval.in/466070)
[09:36:19] norc: So where would I find people knowledged in the MRI?
[09:37:11] FailBit: msot of this channel
[09:37:15] FailBit: has some kind of knowledge with it
[09:38:13] shock_one: has joined #ruby
[09:39:29] rdark: has joined #ruby
[09:40:17] nfk|laptop: has joined #ruby
[09:40:44] claw: has joined #ruby
[09:41:32] stannard: has joined #ruby
[09:42:33] blackmesa: has joined #ruby
[09:44:37] norc: Well, Im trying to figure out how and why the build process is failing at the moment.
[09:45:53] monthy: has joined #ruby
[09:46:03] it_tard: has joined #ruby
[09:46:39] zenguy_pc: has joined #ruby
[09:50:51] asas: has joined #ruby
[09:50:52] apeiros: I suggest you book a flight then :o)
[09:51:06] apeiros: alternatively you might try the ML or ask in here
[09:51:19] mdih: has joined #ruby
[09:51:29] FailBit: https://i.imgur.com/nblcTKl.png
[09:53:18] vigintas: has joined #ruby
[09:53:22] lukaszes: has joined #ruby
[09:53:53] i: has joined #ruby
[09:54:27] TomyWork: has joined #ruby
[09:55:06] Pupp3tm4st3r: has joined #ruby
[09:55:25] apeiros: ACTION wonders why FailBit links the pic of an elephant here
[09:56:43] sjums: that center piece is really annoying
[09:56:57] FailBit: https://i.imgur.com/6HR6A3z.png
[09:57:19] FailBit: it's a cool trick
[09:57:24] FailBit: you can put the hole wherever you want
[09:57:26] stamina: has joined #ruby
[09:57:56] norc: apeiros: I think booking a flight and staying at a Japanese Ruby temple might be the faster option.
[09:58:30] Emmanuel_Chanel: has joined #ruby
[09:58:35] rodfersou: has joined #ruby
[09:58:57] Emmanuel_Chanel: has joined #ruby
[09:58:58] futilegames: has joined #ruby
[09:59:31] __desmondhume: has joined #ruby
[09:59:44] bruno-: has joined #ruby
[10:00:09] skade: has joined #ruby
[10:02:36] blubjr: ruby doesn't have anything like anaphoric macros right
[10:02:44] blubjr: im googling around but not seeing anything
[10:03:37] rgtk: has joined #ruby
[10:04:51] futilegames: has joined #ruby
[10:06:53] adaedra: apeiros: it's irrelephant.
[10:08:29] yorickpeterse: ha ha ha I get it
[10:09:37] bweston92: has joined #ruby
[10:10:06] ccooke: blubjr: Ruby doesn't have macros really, but the metaprogramming supports some anaphoric concepts.
[10:10:19] ccooke: blubjr: https://github.com/raganwald-deprecated/homoiconic/blob/master/2009-09-22/anaphora.md for instance
[10:11:12] rbowlby: has joined #ruby
[10:15:22] sepp2k: has joined #ruby
[10:15:37] vondruch_: has joined #ruby
[10:18:33] blubjr: oh im an idiot i didnt read far enough down that page
[10:18:37] blubjr: thank you
[10:18:45] colegatron: has joined #ruby
[10:18:54] Rollabunna: has joined #ruby
[10:24:42] karapetyan: has joined #ruby
[10:28:51] skade: has joined #ruby
[10:29:20] DEA7TH: has joined #ruby
[10:31:45] voodo: has joined #ruby
[10:33:00] avelldiroll: has joined #ruby
[10:33:14] Peg-leg: has joined #ruby
[10:34:52] favadi: has joined #ruby
[10:37:06] qiukun: has joined #ruby
[10:38:06] weemsledeux: has joined #ruby
[10:39:01] blackmesa: has joined #ruby
[10:41:18] qiukun: has joined #ruby
[10:45:59] doddok: has joined #ruby
[10:52:33] ldnunes: has joined #ruby
[10:53:16] sinkensabe: has joined #ruby
[10:54:21] qiukun: has joined #ruby
[10:56:15] beauby: has joined #ruby
[10:57:54] yeticry: has joined #ruby
[10:57:59] platzhirsch: has joined #ruby
[10:59:40] vondruch: has joined #ruby
[11:00:22] Pupp3tm4st3r: has joined #ruby
[11:00:41] bruno-: has joined #ruby
[11:02:24] __desmondhume: has joined #ruby
[11:02:50] norc: Other than Ripper.sexp or compiling with CPDEBUG, is there a way to get a look at the AST, ideally seeing the actual NODE_ types and underlying structures?
[11:02:58] norc: Or do I have to plug in my debugger for this?
[11:03:41] chriscoffee: has joined #ruby
[11:04:24] yorickpeterse: norc: you can use https://github.com/whitequark/parser
[11:05:40] norc: yorickpeterse: Thank you I shall assess its usability for my scenario. :)
[11:06:20] noodle: has joined #ruby
[11:09:02] dhjondoh: has joined #ruby
[11:09:11] norc: Or maybe I should just figure out whether I can fix this bug in the compiler. CPDEBUG really is what I want in the end.
[11:09:56] dionysus69: has joined #ruby
[11:11:07] senayar: has joined #ruby
[11:11:41] lseactuary: has joined #ruby
[11:12:17] lubekpl: has joined #ruby
[11:12:23] lseactuary: anyone here know of a software where i can build a 'front end' to a manhattan/vertica back end y dragging/dropping elements instead of actually coding. similar to this: http://pinegrow.com/docs/editing/layout.html
[11:13:13] craigp: has joined #ruby
[11:14:32] bruce_lee: has joined #ruby
[11:16:38] rbowlby: has joined #ruby
[11:18:02] dionysus69: has joined #ruby
[11:18:20] baweaver: has joined #ruby
[11:18:25] lubekpl: lseactuary you can try out http://pingendo.com/
[11:19:01] lseactuary: lubekpl can i make charts / graphs in this?
[11:19:49] CodingWolf: has joined #ruby
[11:20:31] rickmasta: has joined #ruby
[11:20:55] htmldrum: has joined #ruby
[11:22:27] marr: has joined #ruby
[11:24:08] norc: shevy: Today I wrote an entire Ruby method. It is true.
[11:24:34] lseactuary: i want to make something like this: http://imgur.com/XVjpT8V
[11:24:40] lseactuary: not just a webpage
[11:25:14] Affix: has joined #ruby
[11:28:11] lubekpl: lseactuary I guess you can create a simple template quickly and easily in this, and then use something like https://github.com/ankane/chartkick for graphs
[11:28:40] lseactuary: lubekpl the problem is i cant code - therefore i need a tool where i can drag/drop/change stuff
[11:30:26] skade: has joined #ruby
[11:31:00] dionysus69: has joined #ruby
[11:31:07] beauby: has joined #ruby
[11:34:51] kiki_lamb: if my class has both an cluded module and a parent class, both containing an initialize method, how do I control which one I am calling with super in my own class's initialize method?
[11:35:00] kiki_lamb: 'an included'
[11:35:16] prestorium: has joined #ruby
[11:35:47] suchness: kiki_lamb: http://makandracards.com/makandra/23171-how-ruby-method-lookup-works
[11:35:51] lseactuary: lubekpl any ideas please?
[11:35:56] UNIMPL: has joined #ruby
[11:35:57] antgel: has joined #ruby
[11:36:41] Musashi007: has joined #ruby
[11:39:25] stamina: has joined #ruby
[11:39:40] kiki_lamb: suchness: if i'm reading that right, there's no way to ensure both intializers are called, assuming the module and parent class don't know about each other
[11:40:07] kiki_lamb: sounds like super will hit the included module, and the parent class's initialize will never be called?
[11:40:23] blackmesa: has joined #ruby
[11:40:56] suchness: You could call super in the module
[11:41:52] govg: has joined #ruby
[11:41:56] subscope: has joined #ruby
[11:42:48] norc: Just remember the difference between super and super()
[11:42:55] kiki_lamb: seems like for that to work properly, the module would need to know something about the parent class
[11:42:56] norc: ACTION is still baffled by that
[11:43:56] avril14th: has joined #ruby
[11:44:21] suchness: kiki_lamb: Well, it depends on what exactly you are trying to accomplish, in some situations the module would know, other times not so much. I don't know what you are implementing, but basically that's the lookup, if you need it to do something different you need to call super where necessary, or implement your architecture differently.
[11:45:04] norc: kiki_lamb: Best way would be to not define an initialize method in a module, but work with callbacks rather.
[11:45:22] norc: Let your class hierarchy call callbacks, that your module can register.
[11:45:26] norc: For example
[11:46:08] Azure: has joined #ruby
[11:46:24] voodo: has joined #ruby
[11:46:34] dionysus69: has joined #ruby
[11:47:01] kiki_lamb: right now i've got something like 'class Instruments < Hash; include TimingScope; ...; end'. Each Instruments needs to initialize it's parent Hash with certain arguments, but it also needs to do the same with it's TimingScope.
[11:47:16] blubjr: super without parens implicitly passes arguments up right
[11:47:33] kiki_lamb: there are plenty of other classeds including TimingScope that are not descendents of Hash, so having TimingScope initialize the Hash seems impractical
[11:47:36] kiki_lamb: blubjr: yup
[11:47:59] norc: blubjr: It also passes a block if present. ;-)
[11:48:17] kiki_lamb: ^ figured that was kind of implied, but yeah
[11:48:20] norc: Ideally just use super() - it is so much more readable.
[11:48:58] kiki_lamb: suchness: so, for my snippet there, is there any possible way for Instruments (not it's included TimingScope) to initialize it's parent Hash?
[11:48:58] norc: kiki_lamb: Heh, internally blocks are considered very much differently from arguments.
[11:50:03] dionysus70: has joined #ruby
[11:50:47] suchness: kiki_lamb: I don't see a snippet
[11:50:50] kiki_lamb: norc: maybe under the hood, sure.. but from a language user perspective, though, they're integrated into the method argument system and at any given time they're a character or two of sugar away from being the same as any typical Proc argument.
[11:51:06] kiki_lamb: suchness: 'class Instruments < Hash; include TimingScope; ...; end'
[11:51:06] tvw: has joined #ruby
[11:52:14] blubjr: blocks are a really ugly wart to me right now still i've only been doing ruby for like a week tho, maybe theyll grow on me
[11:52:18] suchness: kiki_lamb: I think if that's your goal you need to look at composition over inheritance
[11:52:26] dhjondoh: has joined #ruby
[11:52:35] jamo: has joined #ruby
[11:53:21] DEA7TH: has joined #ruby
[11:53:27] kiki_lamb: blubjr: definitely. once you get to the point where you're building your own little task specific DSLs you'll find that often half the arguments you're dealing with are blocks.
[11:55:00] norc: kiki_lamb: The most interesting part about blocks is, is that they are one of the very few things that actually are not objects in Ruby.
[11:56:28] donske: has joined #ruby
[11:56:47] lkba: has joined #ruby
[11:58:04] devbug_: has joined #ruby
[11:58:07] Guest66467: has joined #ruby
[11:58:12] kiki_lamb: norc: sure, just not something you have to think about a lot as a user, given how trivial it is to box/unbox them in Procs
[11:58:15] Musashi007: has joined #ruby
[11:58:27] pontiki: the most interesting part about blocks to me is how i can use them
[11:59:05] favadi: has joined #ruby
[11:59:17] norc: kiki_lamb: I was just trying to make a point. IMO it is not obvious that super should also pass along a block, especially since is neither implemented as an argument, nor does it look like one, or becomes apparent that one can be passed.
[11:59:38] lseactuary: anyone have ideas?
[12:01:55] suchness: lseactuary: You want a drag and drop front end because you can't code and you're asking in an IRC dedicated to coding, I don't think you will get much in the way of help.
[12:02:15] lseactuary: suchness then what do i do?
[12:02:40] suchness: lseactuary: Well, learn to code perhaps.
[12:02:48] pontiki: pay someone(s) to make it for you
[12:02:57] lseactuary: i dont have that option
[12:03:04] lseactuary: and i have tried learning but i dont even know where to start
[12:03:09] suchness: Better start learning then.
[12:03:22] norc: kiki_lamb: And in cases of class hierarchies, an upper method that does fancy things based on block_given? can suddenly lead to bugs. :D
[12:03:37] suchness: There are a lot of first rails app tutorials on the internet, pick one.
[12:03:44] lseactuary: and there is no one at my company who can walk me through stuff
[12:03:57] zacts: has joined #ruby
[12:03:58] lseactuary: i dont even know if rails is what i need
[12:03:59] gusTester: has joined #ruby
[12:04:03] suchness: lseactuary: What is your job?
[12:04:13] lseactuary: my job is to analyse data and scope tools
[12:04:22] lseactuary: the problem is without programming i cant get the data nor build any tools
[12:04:34] lseactuary: so we hired a data engineer who is writing scripts for data
[12:04:41] suchness: lseactuary: I think you might need to find another job then.
[12:04:43] lseactuary: but i need to help him wit hthe front end
[12:04:53] rgtk: has joined #ruby
[12:04:57] lseactuary: because we are under-resources
[12:05:01] suchness: If you aren't willing to learn how to do your job it's better you let someone who is.
[12:05:11] lseactuary: well i didnt say i dont want to learn
[12:05:15] lseactuary: i just have no clue where to start
[12:05:23] lseactuary: people send me a bunch of github links and i dont get it
[12:05:28] lseactuary: i dont have any background in this
[12:05:30] norc: lseactuary: What do you want to learn?
[12:05:31] blubjr: oh, i asked the other day but i dont think anyone answered, does ruby have something like lisp's FRESH-LINE, where it prints a newline unless you're already at the start of the line
[12:05:32] lseactuary: its like learning a newl anguage
[12:05:38] lseactuary: without any help
[12:05:51] suchness: lseactuary: http://www.greenteapress.com/thinkpython/thinkpython.pdf
[12:06:00] suchness: That book started my career.
[12:06:10] lseactuary: i tried python i didnt udnerstand a thing
[12:06:16] suchness: Oh good god.
[12:06:24] lseactuary: and i dont have the time to go through bunch of code books
[12:06:29] lseactuary: i need to build something and quick
[12:06:35] lseactuary: and then he can plug in the data
[12:06:42] pontiki: it seems like you should take classes for a while, as self learning isn't working for you in this area
[12:06:43] lseactuary: im under a lot of pressure here
[12:06:51] lseactuary: i tried sclading classes
[12:06:55] lseactuary: again didnt understand a thing
[12:06:57] norc: blubjr: Someone sadistic seems to have written this in ancient history: https://github.com/now/ruby-lisp
[12:07:01] krz: has joined #ruby
[12:07:06] pontiki: seriously what are you expecting from us?
[12:07:15] lseactuary: surely there is some tool which can help
[12:07:18] lseactuary: me scope the front end
[12:07:22] lseactuary: eg. http://pinegrow.com/docs/editing/layout.html
[12:07:28] lseactuary: but something with graphs and tables and charts
[12:09:30] lseactuary: i need to build a tool so people can input workds and date ranges etc
[12:09:35] lseactuary: excel or tableau or SQL wont cut it
[12:09:52] lseactuary: i dont have this type of data
[12:09:57] lseactuary: i need a tool
[12:10:07] lseactuary: ive got back end help i just need to design the front end
[12:10:30] Spami_: has joined #ruby
[12:10:32] suchness: lseactuary: http://www.highcharts.com/
[12:10:34] lxsameer: has joined #ruby
[12:10:35] norc: lseactuary: Oh I know what you want.
[12:10:40] build22: has joined #ruby
[12:10:54] platzhirsch: has joined #ruby
[12:11:01] beauby: has joined #ruby
[12:12:13] norc: lseactuary: Microsoft Sharepoint obviously meets your requirements. :-)
[12:12:20] suchness: lseactuary: http://d3js.org/
[12:14:37] solocshaw: has joined #ruby
[12:14:56] chipotle: has joined #ruby
[12:15:12] suchness: lseactuary: For the future, HTML and CSS are not 'coding', though javascript is.
[12:15:40] adaedra: CSS is 'torture'.
[12:15:51] norc: CSS is just widely misunderstood.
[12:16:01] suchness: When it's nice and neat
[12:16:08] suchness: But when it's not, then kill me please
[12:16:14] sapslaj: Vanilla CSS can be a pain.
[12:16:25] Ilyes512: has joined #ruby
[12:16:37] sapslaj: Using a preproccessor makes things a little more managable.
[12:16:44] Musashi007: has joined #ruby
[12:17:34] suchness: lseactuary: Did one of those tools help?
[12:17:58] fivnay: has joined #ruby
[12:18:06] lseactuary: yes - exactly what i needed :)
[12:18:12] suchness: lseactuary: Good
[12:19:38] baweaver: has joined #ruby
[12:19:56] arup_r: has joined #ruby
[12:20:26] infamos: has joined #ruby
[12:20:38] TvL2386: has joined #ruby
[12:24:43] syath: has joined #ruby
[12:32:24] dhjondoh1: has joined #ruby
[12:33:21] i: has joined #ruby
[12:36:10] dooo: has joined #ruby
[12:36:16] ccooke: has joined #ruby
[12:37:42] heinrich5991: has joined #ruby
[12:37:43] parus: has joined #ruby
[12:37:52] vondruch: has joined #ruby
[12:38:11] valeri_ufo: has joined #ruby
[12:38:14] LiamW: has joined #ruby
[12:38:21] Ilyes512: has joined #ruby
[12:38:31] FailBit: fuck freenode, okay
[12:38:33] __desmondhume: has joined #ruby
[12:38:44] trabulmonkee: has joined #ruby
[12:39:47] abbe: has joined #ruby
[12:42:14] Mon_Ouie: has joined #ruby
[12:42:24] FailBit: suchness: how did elastic stuff go
[12:44:12] benlovell: has joined #ruby
[12:45:45] ValicekB: has joined #ruby
[12:46:25] MuffinPimp: has joined #ruby
[12:47:40] bruno-: has joined #ruby
[12:48:02] vondruch: has joined #ruby
[12:48:03] CloCkWeRX: has joined #ruby
[12:48:41] lkba_: has joined #ruby
[12:48:50] dooo: I'm trying to translate some code from ruby from python. I stuck on line: .pack('n'). How that would be in python? What struct directive is equivalent to pack('n')?
[12:49:28] prestorium_: has joined #ruby
[12:50:11] dhjondoh: has joined #ruby
[12:50:30] sunya7a__: has joined #ruby
[12:51:13] RegulationD: has joined #ruby
[12:52:16] codecop: has joined #ruby
[12:53:22] __desmondhume: has joined #ruby
[12:54:09] Icey: has joined #ruby
[12:54:19] gowikel: has joined #ruby
[12:54:28] freerobby: has joined #ruby
[12:55:27] AndyBotwin: has joined #ruby
[12:55:27] solocshaw1: has joined #ruby
[12:58:22] zenguy_pc: has joined #ruby
[13:00:49] benlovell: has joined #ruby
[13:01:16] CloCkWeRX: has joined #ruby
[13:02:46] phutchins1: has joined #ruby
[13:02:51] beast: has joined #ruby
[13:03:56] synthroid: has joined #ruby
[13:04:13] CloCkWeRX1: has joined #ruby
[13:04:15] kobain: has joined #ruby
[13:04:24] scmx: has joined #ruby
[13:04:59] suchness: FailBit: Really well, I decided to just do the one to one correlation, we don't really have a requirement to have more than one parent, so it should work out fine. We are collapsing all our indexes to just be in one with different types. It's going to be a couple months before we get through it all though. I have high hopes.
[13:05:53] tkuchiki: has joined #ruby
[13:07:33] tkuchiki: has joined #ruby
[13:07:38] voodo: has joined #ruby
[13:09:53] CloCkWeRX: has joined #ruby
[13:10:00] karapetyan: has joined #ruby
[13:10:33] CloCkWeRX1: has joined #ruby
[13:11:28] norc: dooo: Array#pack
[13:12:19] tknz: has joined #ruby
[13:12:33] _blizzy_: has joined #ruby
[13:14:50] atomical: has joined #ruby
[13:16:27] avril14th: has joined #ruby
[13:17:29] rbowlby: has joined #ruby
[13:18:03] CloCkWeRX: has joined #ruby
[13:18:37] brendan-: has joined #ruby
[13:18:44] jokke: has joined #ruby
[13:18:49] curses: has joined #ruby
[13:18:55] C0r3: has joined #ruby
[13:19:13] sankaber: has joined #ruby
[13:21:14] roxtrongo: has joined #ruby
[13:22:43] govg: has joined #ruby
[13:23:10] Miron: has joined #ruby
[13:23:37] baweaver: has joined #ruby
[13:24:48] EldSEC: has joined #ruby
[13:25:44] mwlang: has joined #ruby
[13:25:54] doddok: has joined #ruby
[13:29:18] jdawgaz: has joined #ruby
[13:30:41] AlexRussia: has joined #ruby
[13:30:48] teclator: has joined #ruby
[13:30:53] jhass: &ri Array#pack
[13:30:53] `derpy: http://www.rubydoc.info/stdlib/core/Array#pack-instance_method
[13:31:12] jhass: n | Integer | 16-bit unsigned, network (big-endian) byte order
[13:31:24] dorei: has joined #ruby
[13:31:34] monthy: has joined #ruby
[13:31:40] jhass: oh, they left already
[13:32:08] adaedra: very efficient, jhass
[13:32:28] jhass: I responded before you did!
[13:32:46] adaedra: What kind of point is that
[13:33:37] adaedra: Meanwhile, there's still the File.exist? mystery
[13:34:20] jani: A mystery?
[13:34:22] Yzguy: has joined #ruby
[13:34:25] subscope: has joined #ruby
[13:34:59] adaedra: https://youtu.be/fq3abPnEEGE
[13:37:52] norc: jhass. You surely know your way around the Ruby source code well enough.
[13:38:22] CodingWolf: has joined #ruby
[13:39:35] norc: Or can someone else tell me what this all is about? http://lists.ruby-lang.org/pipermail/ruby-cvs/2015-July/008916.html
[13:39:45] araujo: has joined #ruby
[13:39:46] araujo: has joined #ruby
[13:39:50] goodcodeguy: has joined #ruby
[13:40:29] coffeejunk: has joined #ruby
[13:40:37] parus: has joined #ruby
[13:41:10] daivyk: has joined #ruby
[13:41:24] slawrence00: has joined #ruby
[13:41:28] mattwildig: has joined #ruby
[13:42:16] jhass: I have no clue about the C code
[13:43:39] diegoaguilar: has joined #ruby
[13:44:45] joonty: has joined #ruby
[13:45:03] rwilcox: has joined #ruby
[13:45:17] ESpiney: has joined #ruby
[13:46:54] diegoaguilar: has joined #ruby
[13:47:02] dstarh: has joined #ruby
[13:47:42] rwilcox_: has joined #ruby
[13:47:57] karapetyan: has joined #ruby
[13:49:10] ayonkhan: has joined #ruby
[13:50:07] stannard: has joined #ruby
[13:52:05] Xeago: has joined #ruby
[13:52:26] s00pcan: has joined #ruby
[13:53:05] sankaber: has joined #ruby
[13:53:33] dmitch: has joined #ruby
[13:53:50] Polysics: has joined #ruby
[13:54:12] Icey: has joined #ruby
[13:55:28] yeticry_: has joined #ruby
[13:55:40] roxtrongo: has joined #ruby
[13:57:06] s00pcan: has joined #ruby
[13:58:04] Musashi007: has joined #ruby
[13:59:07] sankaber: has joined #ruby
[13:59:08] decoponio: has joined #ruby
[13:59:38] rwilcox: has joined #ruby
[14:00:44] karapetyan: has joined #ruby
[14:01:02] gusTester: has joined #ruby
[14:01:18] mikecmpbll: has joined #ruby
[14:01:27] gusTester: has joined #ruby
[14:02:48] mikecmpbll: anyone know what the order of Dir.glob is on ubuntu?
[14:02:54] gusTester: has left #ruby: ()
[14:03:04] mikecmpbll: i can detemine that it's alphabetical on OSX but can't see the pattern on ubuntu
[14:03:07] s00pcan: has joined #ruby
[14:03:20] sinkensabe: has joined #ruby
[14:03:59] apeiros: maybe it doesn't have an order?
[14:04:22] cdg: has joined #ruby
[14:04:40] cdg: has joined #ruby
[14:05:16] davedev24: has joined #ruby
[14:05:42] ekinmur: has joined #ruby
[14:05:43] rgtk: has joined #ruby
[14:06:23] build22: has joined #ruby
[14:08:14] tvw: has joined #ruby
[14:08:41] mikecmpbll: well, it has an order, Dir.glob("/some/dir/*").first is always the same and there's more than one file returned
[14:08:59] Guest53: has joined #ruby
[14:09:10] bougyman: mikecmpbll: LC_COLLATE decides that.
[14:09:19] cfinley: has joined #ruby
[14:09:40] bougyman: if LC_COLLATE ins't populated it'll fall back to a valid locale in LC_ALL Or LANG or a few others.
[14:10:30] agentmeerkat: has joined #ruby
[14:11:24] davedev24: has joined #ruby
[14:13:52] CodingWolf: has joined #ruby
[14:15:35] TomPeed: has joined #ruby
[14:16:34] filipechagas: has joined #ruby
[14:17:20] mikecmpbll: bougyman: very useful, thank you :)
[14:17:54] mikecmpbll: that helps me understand the order from commands like `ls` but for some reason Dir.glob doesn't match ls
[14:18:09] blackmesa: has joined #ruby
[14:18:09] mikecmpbll: it's not important, i can sort in ruby but curiosity got the better of me.
[14:18:18] filipechagas: has joined #ruby
[14:18:41] Ilyes512: has joined #ruby
[14:19:53] bougyman: hrm, I assumed Dir would use the os collation method
[14:20:50] k3asd`: has joined #ruby
[14:21:17] yqt: has joined #ruby
[14:21:30] infamos: has joined #ruby
[14:21:49] momomomomo: has joined #ruby
[14:21:56] bougyman: that's a weird ordering, indeed: Dir.entries(Dir.pwd)[0..10]
[14:21:57] bougyman: => [".", "..", ".bash_logout", ".bash_profile", ".ssh", "Downloads", "quicklisp.lisp", "quicklisp", ".cache", "g", ".sbclrc"]
[14:22:21] synthroid: has joined #ruby
[14:22:22] mikecmpbll: yeah, it's quite odd.
[14:23:14] bougyman: According to the Ruby language docs, Dir.entries() does not guarantee any particular order of the listed files, so if you require some order it's best to do it explicitly yourself.
[14:23:20] bougyman: ^ found on stackexchange
[14:24:10] mikecmpbll: "Note that case sensitivity depends on your system (so File::FNM_CASEFOLD is ignored), as does the order in which the results are returned."
[14:24:18] mikecmpbll: but the results are still consistent for one OS
[14:24:24] mikecmpbll: so it's not like, random.
[14:24:45] bougyman: i think we're seeing cached results
[14:24:51] bougyman: like if we did it again tomorrow it might be different.
[14:25:04] abbe: has joined #ruby
[14:25:15] jdawgaz: has joined #ruby
[14:25:21] bougyman: . and .. are always first.
[14:25:28] bougyman: ah, I jsut got diff results.
[14:25:43] bougyman: copied my dir to another name, did the Dir.entries on that one, and the results are different.
[14:26:00] mikecmpbll: ah, good thinking
[14:26:02] bougyman: the only order that doesn't seem to change is . and ..
[14:26:17] based_pdev_: has joined #ruby
[14:26:23] mikecmpbll: cool :) well now I know!
[14:26:34] null__: has joined #ruby
[14:26:45] C0r3: has joined #ruby
[14:26:51] awk: has joined #ruby
[14:27:02] null__: has joined #ruby
[14:27:15] Hounddog_: has joined #ruby
[14:31:03] whippythellama: has joined #ruby
[14:31:48] FailBit: derpity derp derp
[14:32:19] FailBit: it is only so fitting when I say that, I run a site with "derp" in the name :V
[14:33:22] The_Phoenix: has joined #ruby
[14:33:31] mikecmpbll: underpants.io ?
[14:37:57] Jardayn: has joined #ruby
[14:38:29] Jardayn_two: has joined #ruby
[14:38:46] frode15243: has joined #ruby
[14:39:58] lkba: has joined #ruby
[14:40:58] charliesome: has joined #ruby
[14:41:03] th0m_: has joined #ruby
[14:41:53] dmitch: has joined #ruby
[14:42:44] norc_: has joined #ruby
[14:44:31] karapetyan: has joined #ruby
[14:44:39] CloCkWeRX: has joined #ruby
[14:45:03] sepp2k: has joined #ruby
[14:45:08] dtordable: has joined #ruby
[14:45:12] mostlybadfly: has joined #ruby
[14:45:12] lacrymol1gy: has joined #ruby
[14:45:30] Guest85414______: has joined #ruby
[14:45:33] lacrymol1gy: how can I get an instance variable by name? (name being a string)
[14:45:59] Tempesta: has joined #ruby
[14:46:04] havenwood: >> @example = 'sekret'; instance_variable_get :@example
[14:46:05] ruboto: havenwood # => "sekret" (https://eval.in/466326)
[14:46:21] havenwood: >> @example = 'sekret'; instance_variable_get "@example"
[14:46:22] ruboto: havenwood # => "sekret" (https://eval.in/466327)
[14:46:26] havenwood: lacrymology: ^
[14:47:18] benlovell: has joined #ruby
[14:47:34] funnel: has joined #ruby
[14:47:47] stannard: has joined #ruby
[14:48:10] eggoez: has joined #ruby
[14:48:39] francisco: has joined #ruby
[14:48:54] melter: has joined #ruby
[14:48:57] ujjain: has joined #ruby
[14:48:58] ujjain: has joined #ruby
[14:50:29] uber: has joined #ruby
[14:50:34] umgrosscol: has joined #ruby
[14:50:45] stannard: has joined #ruby
[14:50:46] nfk|laptop: has joined #ruby
[14:51:24] Trieste: has joined #ruby
[14:51:59] CloCkWeRX: has joined #ruby
[14:52:15] francisco1: has joined #ruby
[14:53:04] bruno-: has joined #ruby
[14:53:17] malconis: has joined #ruby
[14:53:37] nibbo: has joined #ruby
[14:57:11] stannard: has joined #ruby
[14:57:38] jdawgaz: has joined #ruby
[14:57:53] filipechagas: has left #ruby: ("WeeChat 1.3")
[14:58:48] futilegames: has joined #ruby
[14:58:51] RegulationD: has joined #ruby
[14:59:22] rippa: has joined #ruby
[14:59:41] RobertBirnie: has joined #ruby
[15:01:26] daivyk: has joined #ruby
[15:02:06] stannard: has joined #ruby
[15:02:17] blubjr: is there a tidier alternative to x = foo(); x = default unless bar?(x)
[15:03:05] dionysus69: has joined #ruby
[15:03:53] arthurix: has joined #ruby
[15:04:17] apeiros: blubjr: not generically. i.e. depends on foo() and bar?.
[15:04:34] dhollinger: has joined #ruby
[15:04:44] blubjr: ok thank you
[15:05:28] gusTester: has joined #ruby
[15:05:41] Hounddog: has joined #ruby
[15:06:04] mary5030: has joined #ruby
[15:07:08] FailBit: https://twitter.com/pinkyswearing/status/632733807762898944
[15:07:27] mary5030: has joined #ruby
[15:07:31] Hounddog: has joined #ruby
[15:08:29] momomomomo: has joined #ruby
[15:09:51] Hounddog: has joined #ruby
[15:10:29] senayar: has joined #ruby
[15:10:29] senayar: has joined #ruby
[15:11:46] gusTester: has left #ruby: ()
[15:12:55] ruboto: this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related topics. Thanks!
[15:13:48] SenpaiSilver: has joined #ruby
[15:15:46] i: has joined #ruby
[15:15:49] adaedra: Wow, this .old
[15:17:14] dopie: has joined #ruby
[15:17:24] dmitch: has joined #ruby
[15:17:31] gregf_: blubjr: whats wrong with: a = bar() || "foo"?
[15:17:58] kernik: has joined #ruby
[15:18:07] benlovell: has joined #ruby
[15:18:08] rbowlby: has joined #ruby
[15:18:19] bigmac_: has joined #ruby
[15:19:07] gregf_: >> def foo a=nil; a;end;[nil,1].each{ |b| a = foo(b) || 2;p a; a = nil }
[15:19:09] ruboto: gregf_ # => 2 ...check link for more (https://eval.in/466333)
[15:19:17] devoldmx: has joined #ruby
[15:19:34] centrx: has joined #ruby
[15:19:39] apeiros: gregf_: that's a quite different thing
[15:19:42] axl_: has joined #ruby
[15:20:20] apeiros: i.e., it's only equivalent if blubjr's `bar?(x)` is `(x)` (i.e. test for truthiness)
[15:20:27] griffindy: has joined #ruby
[15:20:46] bigmac: has joined #ruby
[15:20:56] apeiros: hence "depends on your foo() and bar?()"
[15:21:29] bigmac__: has joined #ruby
[15:21:32] blubjr: (defmacro or-set (place form pred default)
[15:21:32] blubjr: (let ((val (gensym)))
[15:21:32] blubjr: `(let ((,val ,form))
[15:21:32] blubjr: (setf ,place (if (funcall ,pred ,val) ,val ,default)))))
[15:21:38] blubjr: something like that
[15:21:48] blubjr: in ruby obvs..
[15:21:53] _stu_: has joined #ruby
[15:22:02] mallu: has joined #ruby
[15:22:04] gregf_: whats that in btw? clojure?
[15:22:05] agentmeerkat: has joined #ruby
[15:22:10] blubjr: common lisp
[15:23:03] apeiros: blubjr: you can write a method to do that.
[15:23:30] plonk: has joined #ruby
[15:23:36] apeiros: x = or_set(foo(), default) { |x| bar?(x) }
[15:23:51] naftilos76: has joined #ruby
[15:23:51] bigmac_: has joined #ruby
[15:23:56] ekinmur: has joined #ruby
[15:24:03] apeiros: but IMO that signature would be ugly
[15:24:50] tkuchiki: has joined #ruby
[15:25:02] __desmondhume: has joined #ruby
[15:25:11] blubjr: the closure complicates it
[15:25:37] bigmac: has joined #ruby
[15:25:56] dagda1: has joined #ruby
[15:26:08] plonk: hi, when deploying a ruby app that has a Gemfile and a Gemfile.lock in VCS, but also uses a non-VCS Gemfile.plugins that somehow automagically adds stuff to Gemfile.lock when bundle install is run, what's the best practice? Re-Commit Gemfile.lock?
[15:26:36] charliesome: has joined #ruby
[15:26:39] jgpawletko: has joined #ruby
[15:26:41] plonk: sorry, ultimate ruby noob here, just a sysadmin
[15:27:00] kerunaru: has joined #ruby
[15:27:04] freerobby: has joined #ruby
[15:27:15] bigmac__: has joined #ruby
[15:27:20] jordanm: has joined #ruby
[15:27:50] __desmondhume: shouldn't be enough to add Gemfile and Gemfile.lock and let Gemfile.plugins do his job when deploying && bundling on the server?
[15:28:21] EminenceHC: has joined #ruby
[15:28:38] goodcodeguy: has joined #ruby
[15:28:52] hxegon: has joined #ruby
[15:28:57] __desmondhume: I would go for a hook after the deploy that runs bundle install (if it's not already like that)
[15:29:10] benlovell: has joined #ruby
[15:29:40] plonk: the problem here being that my deployment managment borks on the second run after installing because there are uncommitted changes in the repository
[15:29:50] bigmac_: has joined #ruby
[15:30:14] infamos: has joined #ruby
[15:31:31] bigmac: has joined #ruby
[15:31:37] plonk: i read somewhere that Gemfile.lock should be version controlled, but am unsure how to deal with that
[15:31:51] __desmondhume: yeah it should
[15:32:09] __desmondhume: oh ok, sorry i misread it
[15:32:24] bigmac__: has joined #ruby
[15:32:34] __desmondhume: i think the best way then would be to check in the updated Gemfile.lock
[15:32:55] DEA7TH: has joined #ruby
[15:32:56] karmatr0n: has joined #ruby
[15:33:31] __desmondhume: well, it IS the best practice, so that's the way to go (and that's the way i usually go :) )
[15:34:29] bigmac_: has joined #ruby
[15:34:58] step1step2_: has joined #ruby
[15:35:18] teclator: has joined #ruby
[15:35:29] craigp_: has joined #ruby
[15:35:49] kies: has joined #ruby
[15:36:29] waka: has joined #ruby
[15:36:36] mloy: has joined #ruby
[15:37:41] bigmac: has joined #ruby
[15:38:35] ddv: plonk: git add Gemfile.lock
[15:38:41] ddv: that is all?
[15:38:48] roxtrongo: has joined #ruby
[15:38:53] bigmac__: has joined #ruby
[15:39:21] senayar: has joined #ruby
[15:39:21] senayar: has joined #ruby
[15:39:26] plonk: what would happen if I then removed things from the Gemfile?
[15:39:52] bigmac_: has joined #ruby
[15:39:52] FailBit: then you check in changes to both
[15:39:53] guillaume-rb: has joined #ruby
[15:40:07] baweaver: has joined #ruby
[15:40:27] centrx: both Gemfile and Gemfile.lock should be version controlled
[15:40:50] _stu_: has joined #ruby
[15:40:51] centrx: plonk, if you remove gems from the Gemfile, they are no longer in your bundle, but they are not automatically uninstalled
[15:41:26] plonk: the problem I am facing is this btw: https://github.com/opf/openproject/blob/stable/4.2/Gemfile#L240
[15:41:43] rdark: has joined #ruby
[15:41:45] plonk: Additional gemfiles that are not in source control being sourced
[15:43:17] bigmac: has joined #ruby
[15:43:20] Fire-Dragon-DoL: has joined #ruby
[15:43:28] krz: has joined #ruby
[15:43:57] centrx: plonk, Could you comment out that section?
[15:44:45] plonk: centrx: Since I am deploying a tagged revision of that onto a porduction system and I just want to add plugins, I'd rather not commit stuff into VCS or touch any of the sources...
[15:44:54] bigmac__: has joined #ruby
[15:45:18] freerobby: has joined #ruby
[15:45:23] plonk: the idea here being stable automatic deploys :S
[15:45:36] bigmac_: has joined #ruby
[15:46:03] lacrymology: has left #ruby: ()
[15:46:38] Xeago: has joined #ruby
[15:46:58] AlexRussia: has joined #ruby
[15:47:34] guillaume-rb: has joined #ruby
[15:48:06] pandaant: has joined #ruby
[15:48:07] sinkensabe: has joined #ruby
[15:48:16] codeurge: has joined #ruby
[15:48:35] fedexo: has joined #ruby
[15:48:38] aufi: has joined #ruby
[15:48:54] bigmac: has joined #ruby
[15:49:34] bigmac__: has joined #ruby
[15:50:05] shevy: we all have our grand ideas
[15:50:12] shevy: then we end up using wordpress :(
[15:51:08] plonk: ACTION does not use wordpress
[15:51:12] skweek: has joined #ruby
[15:51:40] codeurge: has joined #ruby
[15:51:58] ddv: shevy loads up wordpress inside an iframe in his rails projects
[15:52:12] shevy: I don't use rails
[15:52:26] bigmac_: has joined #ruby
[15:52:44] ddv: what do you use bb?
[15:53:09] polishdub: has joined #ruby
[15:53:12] havenwood: shevy: I knew you were going to say cgi! Ruby Par Avion.
[15:53:15] diegoaguilar: has joined #ruby
[15:53:16] shevy: yorickpeterse: stfu
[15:53:27] ddv: lol what just happened
[15:53:51] mattwildig: has joined #ruby
[15:54:09] bigmac: has joined #ruby
[15:54:22] The_Phoenix: has joined #ruby
[15:54:29] shevy: havenwood oldschool never dies!
[15:54:40] yorickpeterse: shevy: 1990 called, they want their web app setup back
[15:54:43] __desmondhume: shevy loads up wordpress inside an iframe in his rails projects
[15:54:43] __desmondhume: I don't use rails
[15:54:53] bigmac__: has joined #ruby
[15:54:59] ddv: shevy: yorickpeterse practices krav maga better not get him mad
[15:55:01] Hounddog: has joined #ruby
[15:55:03] shevy: ddv something strange is going on, now we have an echo :/
[15:55:28] shevy: Krav Maga is unfair, they kick into the balls
[15:55:59] mark2: has left #ruby: ("PART #RubyOnRails :PART #jquery :PART #reactjs :PART ##javascript :PART #elixir-lang :PART #debian :PART #zsh :PART #nethunter :PONG :kornbluth.freenode.net")
[15:55:59] shevy: though that is indeed effective
[15:56:29] yorickpeterse: it's super effective even
[15:56:31] InternetFriend: has joined #ruby
[15:56:54] yorickpeterse: krav maga doesn't give a shit, it's not a sport for that reason :P
[15:57:14] yorickpeterse: oh somebody comes at you with a knife, better get in your karate pose and get ready to smash some bricks
[15:57:20] yorickpeterse: oh now you're dead with a knife between your ribs
[15:57:36] yorickpeterse: worked real hard on that
[15:57:42] momomomomo: nah jiu jitsu is pretty good at avoiding knifes
[15:57:53] __desmondhume: what about rifles?
[15:58:00] bigmac_: has joined #ruby
[15:58:03] yorickpeterse: __desmondhume: that's working out so well for the US isn't it?
[15:58:10] yorickpeterse: the country really is a lot safer with them
[15:58:25] __desmondhume: but i'm from italy
[15:58:26] shevy: they don't want to get kicked into the balls
[15:58:29] __desmondhume: where people die for taxes
[15:58:30] momomomomo: yorickpeterse: guns/knives/sticks/lead pipes
[15:58:31] tkuchiki: has joined #ruby
[15:58:38] momomomomo: who will stop the damn lead pipe bashings
[15:58:40] shevy: __desmondhume northern italy?
[15:58:56] shevy: well that's like central europe so it's fine
[15:59:05] yorickpeterse: momomomomo: see, krav maga at least teaches you how to sorta deal with that
[15:59:10] hxegon: has joined #ruby
[15:59:13] __desmondhume: fine about taxes? lol
[15:59:15] yorickpeterse: Though guns is mostly higher levels and for the police/army branch of krav maga
[15:59:31] shevy: there even were people doing bioinformatics/bioruby in milano + hiring a few years ago ... I didn't wanna go though
[15:59:36] havenwood: "Ruby, you'll shoot your eye out!"
[16:00:00] bigmac: has joined #ruby
[16:00:04] __desmondhume: yeah i work in milano, but i just moved to my hometown
[16:00:06] karapetyan: has joined #ruby
[16:00:12] __desmondhume: remote work is cool
[16:00:32] shevy: __desmondhume dunno you could be living in Sicilia too :)
[16:00:34] momomomomo: working from home atm but have a meeting in an hour :(
[16:00:45] momomomomo: yay spark job done, time to go in :/
[16:00:57] bigmac__: has joined #ruby
[16:01:11] ekinmur: has joined #ruby
[16:01:16] __desmondhume: the best part of having meeting from home is wearing just ashirt
[16:01:26] __desmondhume: could u please stand up? well no
[16:01:29] bougyman: I did that in a training session last night
[16:01:44] Hounddog: has joined #ruby
[16:01:58] momomomomo: :| my workplace is pretty laid back anyhow, most days I just hang out on the top floor next to the fireplace with my shoes off
[16:02:06] shevy: top floor
[16:02:08] momomomomo: about as comfy as home, but better coffee
[16:02:09] shevy: did they lock you away?
[16:02:18] momomomomo: nah, we have a roof and a penthouse
[16:02:23] __desmondhume: humor is getting better and better
[16:02:28] kernik: has left #ruby: ()
[16:02:30] shevy: ooooh penthouse coding suite!
[16:02:37] shevy: coding like a boss
[16:03:04] dreinull75: has joined #ruby
[16:03:05] __desmondhume: isn't it like a naked women thing?
[16:03:10] indignatio: has joined #ruby
[16:03:19] havenwood: ?ot __desmondhume
[16:03:19] ruboto: __desmondhume, this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related topics. Thanks!
[16:03:25] infamos: has joined #ruby
[16:03:31] __desmondhume: lol i'm just asking guys
[16:03:34] __desmondhume: what is penthouse?
[16:03:38] baroquebobcat: has joined #ruby
[16:03:40] momomomomo: nah it's like the top floor of a hotel / building
[16:03:42] havenwood: ?huys __desmondhume
[16:03:42] ruboto: __desmondhume, I don't know anything about huys
[16:03:44] shevy: no, just top floor, usually the costlier flats
[16:03:57] shevy: I am almost in the basement :(
[16:04:04] bigmac_: has joined #ruby
[16:04:07] __desmondhume: sorry havenwood
[16:04:23] shevy: havenwood codes in a skyscraper, at the very top of the top!
[16:04:42] momomomomo: shevy: he's sauron
[16:04:42] bricker: has joined #ruby
[16:05:14] skade: has joined #ruby
[16:05:45] bigmac: has joined #ruby
[16:06:15] rgtk: has joined #ruby
[16:06:22] bigmac__: has joined #ruby
[16:07:29] __desmondhume: do you guys read medium?
[16:07:39] shevy: what is that
[16:07:44] momomomomo: only when it pops up on HN/reddit
[16:07:50] araujo: has joined #ruby
[16:07:50] araujo: has joined #ruby
[16:07:59] momomomomo: shevy: like a blog for fancy people on someone else's platform
[16:08:03] __desmondhume: blogging platform
[16:08:41] baweaver: has joined #ruby
[16:08:54] __desmondhume: aka 57M investment for dunno-why
[16:09:06] momomomomo: fancy people like fancy things
[16:09:11] __desmondhume: btw, i wrote an article on that lol
[16:09:13] momomomomo: and to sit on fancy soap boxes
[16:09:19] momomomomo: not that there's anything wrong with that
[16:09:21] __desmondhume: wanted to share
[16:09:27] __desmondhume: https://medium.com/moze-stories/developer-by-accident-e8963bdfdcfe
[16:09:30] momomomomo: it's a good platform with a large audience
[16:09:32] thezanke: has joined #ruby
[16:09:39] Hounddog: has joined #ruby
[16:09:40] __desmondhume: yeah, the editor is really good tbh
[16:09:56] Rutix: has joined #ruby
[16:09:57] Rutix: has joined #ruby
[16:10:11] momomomomo: whereas my site is pretty much the base jekyll theme with some tweaks and extremely lazy code
[16:10:23] momomomomo: http://soryy.com
[16:11:40] overcrush: has joined #ruby
[16:11:51] bigmac__: has joined #ruby
[16:12:13] Guest53: has joined #ruby
[16:12:19] Hounddog: has joined #ruby
[16:12:49] overcrush: hey all, n00b here. is rails the right tool for a personal CMS/blog/portfolio project?
[16:12:56] bigmac_: has joined #ruby
[16:13:07] havenwood: overcrush: Maybe look at Jekyll.
[16:13:18] ekinmur: has joined #ruby
[16:13:34] chouhoul_: has joined #ruby
[16:13:49] vondruch: has joined #ruby
[16:14:01] Flipez: has left #ruby: ("Leaving")
[16:14:06] overcrush: cool. looking into it now. i wanted something that looks nice and shows off a little bit as a sort of resume
[16:14:33] bigmac: has joined #ruby
[16:14:40] ruby-lang383: has joined #ruby
[16:15:08] havenwood: ruby-lang383: hi
[16:15:09] momomomomo: overcrush: Jekyll is a good project for that - you write in markdown and it compiles to static html
[16:15:14] __desmondhume: i wouldn't go with rails, tons of useless stuff for that kind of thing, and theming is not a feature
[16:15:35] ruby-lang383: hi i'm doing a scraper project
[16:15:57] __desmondhume: Jekyll is also good for seo things, you can do pretty good stuff with slugs and permalinks
[16:15:58] ericalexander: has joined #ruby
[16:16:01] momomomomo: ruby-lang383: web scraping?
[16:16:12] momomomomo: ruby-lang383: !ask
[16:16:18] momomomomo: ruby-lang383: ?answers
[16:16:20] sebstrax: has joined #ruby
[16:16:20] h99h9h88: has joined #ruby
[16:16:21] __desmondhume: (http://desmondhume.github.io/ <- Jekyll too)
[16:16:24] ruboto: Don't ask to ask. Just ask your question, and if anybody can help, they will likely try to do so.
[16:16:29] ruboto: I don't know anything about getanswers
[16:16:32] ruby-lang383: does anyone know how to write a script to
[16:16:40] ruby-lang383: Here is the URL https://angel.co/people?tag_ids%5B%5D=1664&tag_ids%5B%5D=82532&page=1
[16:16:41] momomomomo: damn this bot
[16:16:56] ruby-lang383: there are profiles in the url
[16:17:01] ruby-lang383: how do I scrape the text from
[16:17:09] ruboto: I don't know anything about enter
[16:17:10] ruby-lang383: and output it to txt file
[16:17:13] havenwood: ruby-lang383: Use their API instead.
[16:17:14] bigmac__: has joined #ruby
[16:17:24] ruby-lang383: does anyone know how to implement it
[16:17:27] __desmondhume: I think he's trying to avoid api limits
[16:17:38] ruby-lang383: you have to wait a few days to register
[16:17:41] ruby-lang383: this is jsut a class project
[16:17:48] __desmondhume: not so polite tbh
[16:17:57] bruno-: has joined #ruby
[16:17:59] havenwood: ruby-lang383: For a class in the United States?
[16:18:30] gagrio: has joined #ruby
[16:18:41] colegatron: has joined #ruby
[16:19:16] ruby-lang383: you can scrape it if it is not for a commercial pages
[16:19:19] Rodya_: has joined #ruby
[16:19:21] ruby-lang383: commercial purposees
[16:19:25] baweaver: has joined #ruby
[16:19:29] ruby-lang383: i just prefer not to use the api
[16:19:38] bigmac: has joined #ruby
[16:19:45] __desmondhume: plain nokogiri should be enough
[16:19:58] ruby-lang383: but I need to implenent a do loop
[16:20:07] __desmondhume: well, if you want to do it dirty :D
[16:20:13] ruby-lang383: that will access all the profile URLs
[16:20:14] weemsledeux: has joined #ruby
[16:20:16] __desmondhume: i'd go with some queue
[16:20:25] bmalum_: has joined #ruby
[16:20:34] __desmondhume: or multithread if you need speed...
[16:20:47] __desmondhume: it's just fetching so you don't need to worry about race conditions
[16:20:52] devoldmx: has joined #ruby
[16:20:59] bigmac_: has joined #ruby
[16:21:07] __desmondhume: you could do it in few lines with an .each loop
[16:21:52] __desmondhume: or do something better with a minimum setup (redis+sidekiq to enable multiple workers to process the pages)
[16:21:58] __desmondhume: dunno your needs
[16:22:27] nfk|laptop: has joined #ruby
[16:22:33] __desmondhume: or just install a scraper gem lol
[16:22:34] stu_: has joined #ruby
[16:22:40] __desmondhume: https://www.ruby-toolbox.com/categories/Web_Content_Scrapers
[16:22:51] bigmac__: has joined #ruby
[16:23:12] guillaume-rb: has joined #ruby
[16:23:16] havenwood: ruby-lang383: I really do think the CFAA needs to be amended to allow tinkering or educational exceptions and to bar prison time for violating TOS... but alas...
[16:23:31] havenwood: ruby-lang383: The EFF is putting for good efforts on that front: https://www.eff.org/issues/cfaa
[16:25:08] wprice: has joined #ruby
[16:25:23] chriscoffee: has joined #ruby
[16:25:30] EminenceHC: has joined #ruby
[16:25:35] bigmac: has joined #ruby
[16:26:18] blackmesa: has joined #ruby
[16:26:26] bigmac_: has joined #ruby
[16:27:18] Fire-Dragon-DoL: has joined #ruby
[16:27:46] polishdub: has joined #ruby
[16:28:26] __desmondhume: ruby-lang383: has been jailed lol
[16:28:31] djstorm: has joined #ruby
[16:28:36] bigmac__: has joined #ruby
[16:29:27] ESpiney_: has joined #ruby
[16:30:10] bigmac: has joined #ruby
[16:30:53] guillaume-rb: has joined #ruby
[16:31:17] bigmac_: has joined #ruby
[16:32:49] hashpuppy: has joined #ruby
[16:33:14] ESpiney__: has joined #ruby
[16:34:31] PaulCape_: has joined #ruby
[16:34:55] bigmac: has joined #ruby
[16:35:04] freerobby: has joined #ruby
[16:35:29] bigmac__: has joined #ruby
[16:35:36] havenwood: i've been enjoying using Oga for HTML parsing
[16:37:05] bigmac_: has joined #ruby
[16:37:17] yorickpeterse: Yeah it's pretty good
[16:37:24] nfk: has joined #ruby
[16:37:25] yorickpeterse: I think the maintainer is a bit of a knob though
[16:39:07] ThatsNotJack: has joined #ruby
[16:39:16] subscope: has joined #ruby
[16:39:48] bigmac: has joined #ruby
[16:40:26] bigmac__: has joined #ruby
[16:40:54] symm-: has joined #ruby
[16:41:18] Maletor: has joined #ruby
[16:41:40] ESpiney_: has joined #ruby
[16:41:46] dopie: has joined #ruby
[16:41:49] bigmac_: has joined #ruby
[16:42:09] ItSANgo: has joined #ruby
[16:42:16] eshy: has joined #ruby
[16:42:22] |ifei5g00d: has joined #ruby
[16:42:26] d10n-work: has joined #ruby
[16:42:38] lemur: has joined #ruby
[16:42:45] ThatsNotJack: has joined #ruby
[16:43:18] psy: has joined #ruby
[16:43:57] roxtrongo: has joined #ruby
[16:44:25] psy: has joined #ruby
[16:44:46] subscope: has joined #ruby
[16:45:20] bigmac: has joined #ruby
[16:45:27] mostlybadfly: has joined #ruby
[16:45:33] marr: has joined #ruby
[16:46:25] krz: has joined #ruby
[16:46:33] bigmac_: has joined #ruby
[16:46:57] bigmac__: has joined #ruby
[16:47:08] DoubleMalt: has joined #ruby
[16:48:49] DoubleMalt: has joined #ruby
[16:49:35] psye: has joined #ruby
[16:50:09] bigmac: has joined #ruby
[16:51:48] charliesome_: has joined #ruby
[16:52:03] bigmac_: has joined #ruby
[16:52:24] simplyianm: has joined #ruby
[16:54:04] bigmac__: has joined #ruby
[16:54:51] wldcordeiro: has joined #ruby
[16:55:26] [Butch]: has joined #ruby
[16:55:38] bigmac: has joined #ruby
[16:56:02] TC: has joined #ruby
[16:56:42] bigmac_: has joined #ruby
[16:56:51] dopie: has joined #ruby
[16:59:08] lukaszes: has joined #ruby
[16:59:39] bigmac__: has joined #ruby
[17:01:12] towski_: has joined #ruby
[17:01:16] bigmac: has joined #ruby
[17:01:23] Axsuul: has joined #ruby
[17:02:00] bigmac_: has joined #ruby
[17:03:52] Xeago: has joined #ruby
[17:04:08] mattwildig: has joined #ruby
[17:04:47] bigmac__: has joined #ruby
[17:05:32] Alayde: has joined #ruby
[17:06:12] Xeago: has joined #ruby
[17:06:14] Alayde: has left #ruby: ()
[17:06:22] bigmac: has joined #ruby
[17:06:58] bigmac_: has joined #ruby
[17:07:02] bmalum: has joined #ruby
[17:08:07] bricker: has joined #ruby
[17:08:46] SCHAAP137: has joined #ruby
[17:08:47] synthroid: has joined #ruby
[17:09:14] __desmondhume: lol ruby is becoming a selfpromoting channel
[17:09:19] bigmac__: has joined #ruby
[17:09:46] troyready: has joined #ruby
[17:10:27] Alayde: has joined #ruby
[17:10:44] _blizzy_: ugh, I can't seem to install rest-client on my comp
[17:13:10] jdawgaz: has joined #ruby
[17:15:03] teclator: has joined #ruby
[17:15:07] craigp: has joined #ruby
[17:16:34] PaulCapestany: has joined #ruby
[17:18:41] momomomomo: has joined #ruby
[17:18:46] rbowlby: has joined #ruby
[17:19:12] indignatio: has joined #ruby
[17:21:19] CodingWolf: has joined #ruby
[17:23:03] |ifei5good: has joined #ruby
[17:24:50] stu_: has joined #ruby
[17:25:56] hxegon: with the stdlib CSV, why won't csv.each { |row| row.headers.each { |h| row[h] = 'foo' } } work?
[17:27:06] ekinmur: has joined #ruby
[17:27:12] hxegon: If you try and read the csv after that, the rows are unchanged
[17:27:25] CrazyEddy: has joined #ruby
[17:31:56] DEA7TH: I have a string which looks like this: "{\"a\":\"some customer data\", (...) ". Notice that there is a backslash before every ". How can I display it without the backslashes?
[17:33:10] DEA7TH: It says that the second character is \" - this is a single character. inspect only makes things worse
[17:33:57] TomPeed: has joined #ruby
[17:34:43] hxegon: DEA7TH: puts it. It shows up in the string rep, but not when you print it. or use single quotes, but I'm not sure how well that would work with what I assume is JSON
[17:35:11] DEA7TH: oh, that worked! I thought that puts = p
[17:35:16] DEA7TH: and it didn't work with p
[17:36:16] adaedra: hxegon: well, you're modifying the data in-memory, you have to write the data back
[17:36:52] hxegon: DEA7TH: I'm looking it up, and I guess p is basically prints foo.inspect vs puts, which uses foo.to_s
[17:36:55] blubjr: 'p foo' == 'puts foo.inspect'
[17:37:05] hxegon: DEA7TH: so, #to_s might be more appropriate
[17:37:24] The_Phoenix: has joined #ruby
[17:37:41] DEA7TH: it's all right, I'll throw away the code in several minutes anyway
[17:38:09] blubjr: #to_s on a string is identity..
[17:40:30] skade: has joined #ruby
[17:41:08] hxegon: adaedra: so your saying its just passing me a copy of the row and not a ref to that row?
[17:41:23] blackmesa: has joined #ruby
[17:41:24] gard_: has joined #ruby
[17:43:06] adaedra: hxegon: well, how did you get your csv variable?
[17:44:00] hxegon: adaedra: csv = CSV.new("foo\nbar", headers: true)
[17:44:24] skweek: has joined #ruby
[17:44:39] adaedra: hxegon: that does not looks like reading from a file
[17:44:53] hxegon: adaedra: its not
[17:45:01] roxtrongo: has joined #ruby
[17:45:13] adaedra: ah, I thought you were speaking about writing back to a file.
[17:45:22] hxegon: adaedra: nope :)
[17:46:03] Fire-Dragon-DoL: has joined #ruby
[17:46:22] hxegon: adaedra: i meant csv.read.to_s when I said read. I see how that could be confusing.
[17:46:24] bb010g: has joined #ruby
[17:46:58] baweaver: has joined #ruby
[17:47:10] djbkd: has joined #ruby
[17:47:28] bruno-: has joined #ruby
[17:48:04] aredridel: has joined #ruby
[17:48:06] UtkarshRay: has joined #ruby
[17:48:43] lukaszes: has joined #ruby
[17:49:00] benlieb: has joined #ruby
[17:49:37] h99h9h88: has joined #ruby
[17:50:54] lukaszes: has joined #ruby
[17:52:19] plonk: i'm having trouble building ruby 2.1.6 which fails building ssl_ossl.c
[17:52:42] plonk: this is on a fresh debian using rbenv with all the recommended packages installed
[17:52:43] EminenceHC: has joined #ruby
[17:52:50] mrtomme: has joined #ruby
[17:52:57] haxrbyte: has joined #ruby
[17:53:19] jhn: has joined #ruby
[17:53:37] gregf: has joined #ruby
[17:53:47] th0m_: has joined #ruby
[17:54:40] hahuang65: has joined #ruby
[17:54:56] alexherbo2: has joined #ruby
[17:55:32] jdawgaz: has joined #ruby
[17:55:41] amclain: has joined #ruby
[17:56:15] arup_r: has joined #ruby
[17:57:00] arup_r: has joined #ruby
[17:57:44] hxegon: plonk: have you tried installing the ssl lib through apt-get?
[17:58:20] freerobby: has joined #ruby
[17:58:47] cicloid: has joined #ruby
[17:59:30] shadoi: has joined #ruby
[17:59:55] luriv: has joined #ruby
[18:00:12] CrazyEddy: has joined #ruby
[18:00:31] User458764: has joined #ruby
[18:00:41] rakm: has joined #ruby
[18:01:01] cicloid: has joined #ruby
[18:01:58] User458764: Hi, how do I correctly define method for handling hash parameters?
[18:03:15] segfalt: User458764: do you mean keyword arguments, or accepting a hash as a parameter?
[18:03:32] segfalt: User458764: In Ruby 2.1, you can do "def my_method(kwarg1:, kwarg2:)"
[18:03:39] User458764: segfalt accepting a hash as parameter
[18:03:54] segfalt: That's just like any other parameter.
[18:04:16] segfalt: h = {} ; def my_method_takes_a_hash(arg_name); puts arg_name; end; my_method_takes_a_hash(h)
[18:04:21] ekinmur: has joined #ruby
[18:04:44] segfalt: User458764: Maybe you could show me a code sample if I'm not understanding correctly.
[18:05:29] jpfuentes2: has joined #ruby
[18:06:39] momomomomo: has joined #ruby
[18:06:47] plonk: hxegon: sure
[18:06:50] Arkon: has joined #ruby
[18:06:59] doddok: has joined #ruby
[18:07:16] goodcodeguy: has joined #ruby
[18:07:16] hxegon: plonk: that's my only suggestion, sorry :P
[18:07:36] chris2: has joined #ruby
[18:08:20] mdih: has joined #ruby
[18:08:28] gusTester: has joined #ruby
[18:09:25] rbowlby: has joined #ruby
[18:10:42] User458764: segfalt I use ruby for years and I am just asking myself how do I build code so that I don't pass an array where an integer is expected?
[18:11:03] RegulationD: has joined #ruby
[18:11:16] gusTester: has left #ruby: ()
[18:11:17] Spaceghost|work: User458764: Always wrap everything into an array?
[18:11:21] Spaceghost|work: Deal with collections rather than singular objects?
[18:11:25] segfalt: User458764: Oh, you want a type system. There are some projects that half-bake in a type system. What I did was switch to another programming language. :)
[18:11:43] Spaceghost|work: type like a duck.
[18:11:46] luriv_: has joined #ruby
[18:11:49] NO_BOOT_DEVICE: has joined #ruby
[18:11:54] platzhirsch: kill the duck
[18:12:06] segfalt: That works for a while, generally until you have 10,000 lines of code in production and wonder why you thought class-level DSLs were cool.
[18:12:08] User458764: but ruby is awesome because it is not type base
[18:12:36] segfalt: User458764: and yet, you're asking how to add a type system.
[18:12:50] Spaceghost|work: segfalt: They can be if you don't screw them up.
[18:13:10] User458764: segfalt yes I think my solution is to better comment my code
[18:13:13] Spaceghost|work: It works whale beyond 10K LOC.
[18:13:22] Spaceghost|work: User458764: Or just wrap everything into an array!
[18:13:27] rwilcox_: has joined #ruby
[18:13:36] User458764: spaceghost|work thanks I will check that
[18:13:38] Spaceghost|work: .Array() is neat.
[18:13:46] yardenbar: has joined #ruby
[18:14:15] segfalt: I definitely use Array() in code that accepts one or many things. Clean approach.
[18:14:20] NO_BOOT_DEVICE: is it possible to on init of a class have it fail gracefully without throwing or the like?
[18:14:44] segfalt: NO_BOOT_DEVICE: your initialize is throwing an exception?
[18:14:47] Spaceghost|work: NO_BOOT_DEVICE: When you say init of a class, do you mean when the class is defined?
[18:14:52] CloCkWeRX: has joined #ruby
[18:14:55] Spaceghost|work: Or when you're instantiating an instance of the class?
[18:15:57] NO_BOOT_DEVICE: segfalt: no, and i don't want it to, but i want it to not do full init and such when it won't work basically saying "fail_gracefully() if [bad init check condition]"
[18:16:11] InternetFriend: has joined #ruby
[18:16:27] segfalt: NO_BOOT_DEVICE: What's gracefully mean? What do you want .new to return instead?
[18:16:28] NO_BOOT_DEVICE: spaceghost|work: instantiating
[18:16:38] Spaceghost|work: NO_BOOT_DEVICE: What have you tried? Did you try raising an exception?
[18:16:44] trav408: has joined #ruby
[18:16:45] CloCkWeRX1: has joined #ruby
[18:17:19] NO_BOOT_DEVICE: spaceghost|work: i'd rather not, i'd like for it to more just say, return "nil", as it's not really an exception, it's just "this functionality isn't implemented"
[18:17:21] ashleyhindle: has joined #ruby
[18:17:36] Spaceghost|work: NO_BOOT_DEVICE: #initialize always returns the instance, override .new if you want to do something else.
[18:17:39] ashleyhindle: has left #ruby: ()
[18:18:02] segfalt: NO_BOOT_DEVICE: I'd find it really confusing for .new to return nil, as a user.
[18:18:05] Spaceghost|work: NO_BOOT_DEVICE: There is NotImplementedError though. That way at least the caller can get a chance to rescue it and handle it themselves.
[18:18:26] segfalt: It seems like immediately after that happens you'll end up with NoMethodErrors on whatever you try to do with the nil, anyway.
[18:18:33] NO_BOOT_DEVICE: spaceghost|work: oh, that's actually probably what i'm looking for, i guess if the program makes it clear that it's just "not implemented"
[18:18:35] h99h9h88: has joined #ruby
[18:18:35] CloCkWeRX: has joined #ruby
[18:18:41] Spaceghost|work: NO_BOOT_DEVICE: Cheers. :D
[18:20:11] skweek: has joined #ruby
[18:20:25] cfinley: has joined #ruby
[18:20:59] blue_deref: has joined #ruby
[18:21:19] CloCkWeRX1: has joined #ruby
[18:21:39] devoldmx: has joined #ruby
[18:21:54] Guest53: has joined #ruby
[18:22:45] last_staff: has joined #ruby
[18:25:43] fantazo: has joined #ruby
[18:25:59] mikecmpbll: has joined #ruby
[18:27:00] mattwildig: has joined #ruby
[18:28:28] _blizzy_: has joined #ruby
[18:30:53] charliesome: has joined #ruby
[18:30:56] fumk: has joined #ruby
[18:31:23] gusTester: has joined #ruby
[18:31:46] dionysus69: has joined #ruby
[18:31:56] gusTester: has left #ruby: ()
[18:31:56] |ifei5g00d: has joined #ruby
[18:32:41] karapetyan: has joined #ruby
[18:33:50] diegoviola: has joined #ruby
[18:33:52] aderium: has joined #ruby
[18:33:56] malcolmva: has joined #ruby
[18:35:37] User458764: has joined #ruby
[18:36:41] fumk: has joined #ruby
[18:37:05] ESpiney__: has joined #ruby
[18:37:27] fumk: has joined #ruby
[18:38:13] fumk: has joined #ruby
[18:39:25] teclator: has joined #ruby
[18:39:40] joonty: has joined #ruby
[18:39:46] baweaver: has joined #ruby
[18:39:57] tomphp: has joined #ruby
[18:40:44] m8: has joined #ruby
[18:41:08] Musashi007: has joined #ruby
[18:43:12] CloCkWeRX: has joined #ruby
[18:44:07] lemur: has joined #ruby
[18:45:48] roxtrongo: has joined #ruby
[18:46:07] skade: has joined #ruby
[18:46:10] arup_r: Why `if` modifier changes the default value of a local variable to nil when if experssion is false? https://gist.github.com/aruprakshit/4f8c28e772d5fb527cac#file-debug-rb-L7
[18:46:17] arup_r: I am missing something
[18:46:55] bmalum: has joined #ruby
[18:46:59] arup_r: it should be `""` when if expression is false .. but it is becoming nil
[18:49:28] johnzorn: has joined #ruby
[18:49:39] johnzorn: anyone use org-babel with ruby?
[18:50:59] blubjr: arup_r: line 2 of helper.rb is initializing search to nil, and line 4 is correctly not overriding that
[18:51:06] weemsledeux: has joined #ruby
[18:51:33] arup_r: >> x = y = ""
[18:51:34] ruboto: arup_r # => "" (https://eval.in/466491)
[18:51:43] arup_r: >> x = y = ""; p [x, y]
[18:51:44] ruboto: arup_r # => ["", ""] ...check link for more (https://eval.in/466492)
[18:51:54] arup_r: I checked, it is correct
[18:52:26] blubjr: line 2 of helper.rb is site_name, search = ""
[18:52:52] arup_r: why it didn't throw error.. :)
[18:52:57] Maletor: has joined #ruby
[18:53:11] arup_r: anyway.. yup that is the problem
[18:53:17] cornerma1: has joined #ruby
[18:53:25] blubjr: ruby tends to prefer nil to errors
[18:53:48] arup_r: yes yes..
[18:54:11] arup_r: I recall it.. I wrote something when I have something else in my head
[18:54:23] swgillespie: has joined #ruby
[18:54:28] craigp: has joined #ruby
[18:54:32] dionysus69: has joined #ruby
[18:56:13] simplyianm: has joined #ruby
[18:57:51] __desmondhume: has joined #ruby
[18:58:23] willardg: has joined #ruby
[18:58:32] ekinmur: has joined #ruby
[18:59:22] unclouded: has joined #ruby
[18:59:48] jackjackdripper: has joined #ruby
[18:59:53] dnewkerk: has joined #ruby
[19:00:04] CloCkWeRX: has joined #ruby
[19:00:20] NeverDie: has joined #ruby
[19:00:36] kies: has joined #ruby
[19:01:09] DEA7TH: has joined #ruby
[19:02:57] rwilcox: has joined #ruby
[19:03:00] chris2: has joined #ruby
[19:04:43] cicloid: has joined #ruby
[19:04:52] kirun: has joined #ruby
[19:06:28] NeverDie: has joined #ruby
[19:06:36] chrisja: has joined #ruby
[19:07:57] cicloid_: has joined #ruby
[19:08:09] freerobby: has joined #ruby
[19:09:13] Arkon: has joined #ruby
[19:10:42] CloCkWeRX: has joined #ruby
[19:11:19] karapetyan: has joined #ruby
[19:11:21] platzhirsch: has left #ruby: ()
[19:12:17] yqt: has joined #ruby
[19:14:48] baweaver: has joined #ruby
[19:14:49] mattwildig: has joined #ruby
[19:17:13] ekinmur: has joined #ruby
[19:19:27] h99h9h88: has joined #ruby
[19:21:02] solenoids: has joined #ruby
[19:21:47] infamos: has joined #ruby
[19:22:37] sye: has joined #ruby
[19:24:05] blackmesa: has joined #ruby
[19:25:24] crankharder: has joined #ruby
[19:25:34] cicloid: has joined #ruby
[19:26:28] CloCkWeRX: has joined #ruby
[19:26:45] hxegon: anyone have experience with the CSV libs? (CSV, FasterCSV, smarter_csv)
[19:28:20] CloCkWeRX: has joined #ruby
[19:29:18] pabs: hxegon: yes, why?
[19:29:46] pabs: hxegon: i just have experience with the stock library (CSV)
[19:33:40] Guest53: has joined #ruby
[19:33:44] Jackneill: has joined #ruby
[19:33:49] moei: has joined #ruby
[19:34:38] swgillespie: has joined #ruby
[19:35:57] diegoaguilar_: has joined #ruby
[19:36:22] diegoaguilar_: has joined #ruby
[19:36:35] _blizzy_: has joined #ruby
[19:36:48] willardg: has left #ruby: ("Textual IRC Client: www.textualapp.com")
[19:37:35] NeverDie: has joined #ruby
[19:37:49] CloCkWeRX: has joined #ruby
[19:38:12] th0m_: has joined #ruby
[19:38:27] jhass: csv was dropped from stdlib and fastercsv renamed to csv with 1.9 (iirc)
[19:39:35] subscope: has joined #ruby
[19:39:57] pabs: jhass: could be, the api is certainly better than 1.8 :/
[19:40:11] pabs: jhass: (i have to use 1.8 for work stuff, it's, uh, clunky)
[19:40:35] th0m_: has joined #ruby
[19:41:40] karapetyan: has joined #ruby
[19:41:42] Fire-Dragon-DoL: has joined #ruby
[19:42:03] th0m_: has joined #ruby
[19:43:36] User458764: has joined #ruby
[19:43:47] hxegon: pabs: do you know why this doesn't work? csv = CSV.new("foo\nbar", headers: true); csv.each { |row| row['foo'] = 'anything' } # it changes row in the scope but not in csv
[19:45:21] Xeago: has joined #ruby
[19:45:59] AccordLTN: has joined #ruby
[19:46:49] wilbert: has joined #ruby
[19:46:52] benlovell: has joined #ruby
[19:47:08] aaeron: has joined #ruby
[19:47:35] wilbert: has joined #ruby
[19:47:37] aaeron: hi. I am trying to write tests for concurrency using concurrent gem.
[19:47:54] aaeron: Is there a good way of testing concurrency?
[19:48:03] aaeron: I did not find anything useful yet.
[19:48:05] diegoaguilar: has joined #ruby
[19:48:19] yorickpeterse: what specifically do you want to test?
[19:49:21] aaeron: I am creating promises for deployments.
[19:49:30] aaeron: I want to test that the deployments are going in parallel
[19:50:39] not_a_robot: has joined #ruby
[19:50:46] _blizzy_: has joined #ruby
[19:51:24] matp: has joined #ruby
[19:51:35] blubjr: hi not a robot
[19:51:55] yorickpeterse: aaeron: parallelism is impossible to test using some form of runtime testing
[19:52:12] yorickpeterse: You can test if something is "most likely" parallel, but it's impossible to get a 100% guarantee
[19:52:49] chris2: has joined #ruby
[19:52:53] atmosx: Anyone knows if AWS will allow me to fetch RDS stats?
[19:52:59] aaeron: Make one blocking
[19:53:03] aaeron: And run the second one.
[19:53:06] yorickpeterse: atmosx: Cloudwatch has them
[19:53:13] atmosx: yorickpeterse: has what?
[19:53:16] adaedra: not_a_robot: beep bop?
[19:53:20] yorickpeterse: atmosx: RDS statistics
[19:53:28] pabs: hxegon: you'll need to read the csv in, make your changes, then write it back out again, it doesn't make the changes on disk when you edit
[19:53:30] atmosx: ah yes, I'm on it (google)
[19:53:47] atmosx: yorickpeterse: and I can access cloudwatch via ruby SDK?
[19:54:07] yorickpeterse: aaeron: then you're no longer really testing parallelism
[19:54:20] adac: has joined #ruby
[19:54:21] hxegon_: has joined #ruby
[19:54:37] opensource_ninja: has joined #ruby
[19:54:51] aaeron: Yeah. But i need to be able to write tests which shows that the process is concurrent
[19:54:59] atmosx: ACTION Sam Cooke - Cupid
[19:55:10] aaeron: If not 100% correct
[19:56:48] x-light: has joined #ruby
[19:58:22] yorickpeterse: aaeron: you can not test something happened in parallel, only _that_ it happened
[19:58:28] Xeago: has joined #ruby
[19:58:55] kopykat: has joined #ruby
[19:58:58] aaeron: That would work
[19:59:01] jdawgaz: has joined #ruby
[19:59:04] kopykat: has left #ruby: ()
[19:59:08] yorickpeterse: e.g. if you have something like `a = nil; b = nil; Thread.new { a = 10 }; Thread.new { b = 20 }` there's no guarantee (or way to ensure) that the two threads actually run in parallel
[19:59:11] yorickpeterse: the same applies to processes
[19:59:21] yorickpeterse: Heck, on MRI the threads won't even run in parallel in the first place
[19:59:23] freerobby: has joined #ruby
[19:59:47] aaeron: I got ur point yorickpeterse
[19:59:50] baweaver: has joined #ruby
[19:59:51] yorickpeterse: also in both cases the OS might take longer to start them up, which could break any timing sensitive tests
[20:00:05] yorickpeterse: so I'd test "did it happen" instead of "did it happen at exactly the same time"
[20:00:20] chouhoulis: has joined #ruby
[20:00:48] h99h9h88: has joined #ruby
[20:00:50] aaeron: I think I am just going to test if the state of all the threads is pending after sleeping for half a second
[20:03:21] yorickpeterse: that does not work at all
[20:03:24] yorickpeterse: read again what I said
[20:03:41] yorickpeterse: timing sensitive execution is seriously difficult when dealing with parallelism
[20:04:45] arthurix_: has joined #ruby
[20:04:48] aaeron: When I call execute on concurrent promises. It would change the status of the promises to pending. It might not execute them
[20:04:55] aaeron: So will that not be a good test?
[20:06:20] yorickpeterse: That sentence makes no sense
[20:06:58] aaeron: Sorry about that yorickpeterse. I am new to concurrency
[20:07:38] skweek: has joined #ruby
[20:07:59] rgtk: has joined #ruby
[20:07:59] roxtrongo: has joined #ruby
[20:08:18] yorickpeterse: The difficulty of concurrency is that there's no guarantee as to when what happens
[20:09:06] aaeron: Got that.
[20:09:14] aaeron: But when I call p = Concurrent::Promise.execute{ "Hello, world!" }
[20:10:00] aaeron: It would make the p.state as pending. Pending does not mean its getting implemented. (afaik)
[20:11:09] yorickpeterse: getting implemented?
[20:11:47] yorickpeterse: If the state is not "pending" by default and it's modified from another thread it could be that when you call "p.state" the state hasn't been set to "pending" yet
[20:11:51] yorickpeterse: so you'd get a race condition
[20:11:58] yorickpeterse: but this depends on how things are implemented
[20:12:19] Arkon: has joined #ruby
[20:12:23] yorickpeterse: for such a condition the code would probably pass 999 out of 1000 runs
[20:12:32] yorickpeterse: and fail one time on Friday the 13th at 17:00
[20:13:00] karapetyan: has joined #ruby
[20:14:26] aaeron: I think I am going to test parallelism by making it sequential. Block the first thread. And wait for the second to finish.
[20:15:03] aaeron: This will just guarantee that one thread does not block the other one.
[20:15:17] aaeron: and hence they are in parallel.
[20:15:41] yorickpeterse: one thread not blocking the other doesn't make them parallel
[20:15:51] yorickpeterse: e.g. a paused thread won't block another, but isn't running in parallel
[20:16:39] Arkon: has joined #ruby
[20:17:06] ekinmur: has joined #ruby
[20:17:33] aaeron: in my case: I was running deploys in sequence running a loop. So lets say jobA, jobB. If I block jobA, jobB would never get executed. As it is sequential.
[20:18:01] baweaver: has joined #ruby
[20:18:03] pglombardo: has joined #ruby
[20:18:17] aaeron: But now that they are running independent of each other. I can block jobA and expect jobB to finish.
[20:18:30] aaeron: It was a single threaded deploy previously.
[20:18:49] mattwildig: has joined #ruby
[20:19:09] Eiam_: has joined #ruby
[20:19:34] EminenceHC: has joined #ruby
[20:21:29] sparr: has joined #ruby
[20:22:24] devoldmx: has joined #ruby
[20:22:38] ta: has joined #ruby
[20:24:01] yfeldblum: has joined #ruby
[20:24:05] podman: has joined #ruby
[20:24:07] freerobby: has joined #ruby
[20:24:43] yaewa: has joined #ruby
[20:27:36] bruno-: has joined #ruby
[20:27:46] moei: has joined #ruby
[20:27:54] karapetyan: has joined #ruby
[20:28:14] Coldblackice_: has joined #ruby
[20:36:02] dfockler: has joined #ruby
[20:36:42] futilegames: has joined #ruby
[20:41:17] EminenceHC: has joined #ruby
[20:43:59] blackmesa: has joined #ruby
[20:44:36] seydar: has joined #ruby
[20:44:40] djbkd: has joined #ruby
[20:44:50] lukaszes: has joined #ruby
[20:44:50] adac: has joined #ruby
[20:44:57] Eiam_: has joined #ruby
[20:44:58] seydar: has left #ruby: ()
[20:45:05] seydar: has joined #ruby
[20:45:11] seydar: what's the hardest part about parsing ruby?
[20:45:23] yorickpeterse: seydar: parsing ruby
[20:45:36] Arkon: has joined #ruby
[20:45:44] newmanships: has joined #ruby
[20:45:58] seydar: yorickpeterse: no further questions, thank you
[20:46:05] willardg: has joined #ruby
[20:46:37] charliesome: has joined #ruby
[20:46:43] chouhoulis: has joined #ruby
[20:47:23] johnkacz: has joined #ruby
[20:49:10] johnkacz: has left #ruby: ()
[20:49:36] arthurix: has joined #ruby
[20:49:40] FailBit: ruby syntax is implicit to the point of near ambiguity
[20:49:44] FailBit: that's the hardest part
[20:50:37] seydar: FailBit: can you expound upon that?
[20:51:25] charliesome_: has joined #ruby
[20:51:30] FailBit: say you wanted to pass a hash to a function
[20:51:34] FailBit: func foo: :bar
[20:51:39] FailBit: no big deal right
[20:52:14] FailBit: what if you wanted to pass 2 hashes?
[20:52:30] FailBit: func {}, foo: :bar
[20:52:35] FailBit: SyntaxError: unexpected ',', expecting $end
[20:52:59] VeryBewitching: has joined #ruby
[20:53:03] FailBit: you have to wrap it in parens to get that to parse
[20:53:55] swgillespie: has joined #ruby
[20:53:58] seydar: FailBit: ahhhhh yes yes yes
[20:54:06] havenwood: VeryBewitching: Hellooo
[20:54:07] seydar: keep going keep going
[20:54:12] seydar: let the rage flow through you
[20:54:44] h99h9h88: has joined #ruby
[20:55:33] zeroDivisible: has joined #ruby
[20:58:11] Arkon: has joined #ruby
[20:59:28] baweaver: has joined #ruby
[21:00:06] blackmesa: has joined #ruby
[21:00:31] hahuang65: has joined #ruby
[21:00:39] lemur: has joined #ruby
[21:01:26] cdg: has joined #ruby
[21:02:57] Xeago: has joined #ruby
[21:03:05] solenoids: has joined #ruby
[21:03:09] TomPeed: has joined #ruby
[21:04:04] Eiam_: has joined #ruby
[21:06:05] kadoppe: has joined #ruby
[21:07:16] willardg: has left #ruby: ("Textual IRC Client: www.textualapp.com")
[21:07:26] CloCkWeRX: has joined #ruby
[21:08:15] shevy: FailBit: ruby allows people to be lazy in what they write; nobody stops you from satisfying the parser with more syntax
[21:08:36] shevy: if less syntax could be achievable then ruby core would do it
[21:08:38] willardg: has joined #ruby
[21:08:48] Meeh: has joined #ruby
[21:09:14] infamos: has joined #ruby
[21:09:27] djbkd: has joined #ruby
[21:09:29] platzhirsch: has joined #ruby
[21:10:42] __desmondhume: has joined #ruby
[21:12:24] seydar: shevy: do you read reddit? did you see the new Rush shell that was posted to /r/ruby?
[21:16:19] northfurr: has joined #ruby
[21:17:52] kies: has joined #ruby
[21:19:11] Papierkorb: That shell that doesn't even offer pipes?
[21:20:16] shevy: seydar I do read reddit sometimes, not regularly though. The rush shell... was that the extension from the old ncurses one, with the in-built dropdown box when someone hits tab?
[21:20:37] shevy: people often fatigue or tire in projects :(
[21:21:10] SenpaiSilver: has joined #ruby
[21:21:35] h99h9h88: has joined #ruby
[21:21:55] wprice: has joined #ruby
[21:22:04] user1138: has joined #ruby
[21:29:50] seydar: shevy: yeah i just remember it as the project that was parsing bash grammar and running it on ruby
[21:29:51] vigintas: has joined #ruby
[21:29:53] seydar: BUT THAT WAS US
[21:29:56] seydar: WE WERE THERE
[21:30:01] seydar: WE WERE SOLDIERS
[21:30:41] eam: well, ruby itself does a bit of shell syntax analysis as well doesn't it
[21:30:49] lukaszes: has joined #ruby
[21:32:22] seydar: eam: i can't remember how the original project was done. me, shevy, and the original guy all kinda worked on our own separate shells under the single banner of "rush"
[21:32:38] seydar: i came back years later and wrote chitin
[21:32:51] seydar: and someone just took the name rush and wrote something similar to chitin
[21:32:52] slash_nick: i've heard of chitlins
[21:33:11] slash_nick: and now, chitin
[21:33:21] seydar: if i could get the startup time down to zilch, i think it'd be more usable as a shell
[21:33:39] seydar: but on my computer it takes like 3 seconds to start up because of gems and my shitty-ass laptop
[21:35:08] charliesome: has joined #ruby
[21:35:48] benlovell: has joined #ruby
[21:37:14] CloCkWeRX: has joined #ruby
[21:37:24] Xeago: has joined #ruby
[21:37:41] jgpawletko: has joined #ruby
[21:40:00] trosborn: has joined #ruby
[21:40:57] lukaszes: has joined #ruby
[21:41:23] overcrush: has joined #ruby
[21:41:35] diegoaguilar: has joined #ruby
[21:41:39] overcrush: has left #ruby: ("Leaving...")
[21:42:53] CloCkWeRX: has joined #ruby
[21:44:37] k3asd`: has joined #ruby
[21:44:42] hxegon_: hmm... so that row mutation works when I do CSV.parse, but not CSV.new...
[21:44:43] TTilus: i'm trying to beat a bit ancient radiant 0.8.0 site into working shape to serve until i figure out where to transition to
[21:44:44] harumph: has joined #ruby
[21:45:24] _blizzy_: has joined #ruby
[21:46:49] jessemcgilallen: has joined #ruby
[21:47:12] harumph: has left #ruby: ()
[21:47:33] TTilus: so i figure i'll just `ruby-install ruby 1.8.7 && chruby 1.8 && gem install radiant --version 0.8.0` and be done with it
[21:48:02] lukaszes: has joined #ruby
[21:48:03] netule: has joined #ruby
[21:48:47] TTilus: but for some weird reason `ruby-install ruby 1.8.7-p358` gives me a ruby without gem :-/
[21:49:29] TTilus: like 'gem: command not found'
[21:50:21] blubjr: i thought gem didn't come with ruby until 1.9
[21:52:02] poguez_: has joined #ruby
[21:52:05] willardg: has joined #ruby
[21:52:14] trosborn: has joined #ruby
[21:53:54] TTilus: blubjr: that would explain
[21:55:15] Ilyes512: has joined #ruby
[21:55:23] Kabal: has joined #ruby
[21:56:39] steven: has joined #ruby
[21:56:51] spider-mario: has joined #ruby
[21:56:57] steven: Is anyone in here?
[21:57:03] havenwood: Steve_: yup
[21:57:10] havenwood: Steve_: A thousand Rubyists.
[21:57:28] steven: Cool. Can anyone help me out with a RoR question?
[21:57:36] havenwood: ?rails Steve_
[21:57:36] ruboto: Steve_, Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[21:58:13] steven: Thanks for pointing me in the right direction ruboto
[21:58:23] ruboto: I don't know anything about bot
[21:58:32] roxtrongo: has joined #ruby
[21:59:23] tiwillia: has joined #ruby
[21:59:43] sinkensabe: has joined #ruby
[21:59:48] hxegon: has joined #ruby
[22:00:33] eluten: has joined #ruby
[22:00:41] kerunaru: has joined #ruby
[22:01:50] eluten: Is anyone getting this error running "make check" on the current trunk? https://gist.github.com/EddyLuten/c63ba2a2ba599b581f34 Running OS X 10.10.5. I haven't tried on a different machine yet.
[22:03:46] Guest53: has joined #ruby
[22:04:07] TheNet: has joined #ruby
[22:04:28] baweaver: has joined #ruby
[22:05:12] infamos: has joined #ruby
[22:05:20] B1n4r10: has joined #ruby
[22:06:42] asas: has joined #ruby
[22:06:45] overcrush: has joined #ruby
[22:06:46] CloCkWeRX: has joined #ruby
[22:06:57] duncannz: has joined #ruby
[22:07:09] overcrush: hey all, is there a channel for rbenv support or can someone in here help a brother out?
[22:07:11] steven: has left #ruby: ()
[22:07:38] havenwood: overcrush: There's a #chruby or #rvm but #rbenv is just lost souls.
[22:07:57] havenwood: overcrush: Already tried?: rbenv rehash
[22:08:02] CloCkWeRX1: has joined #ruby
[22:08:03] havenwood: overcrush: What trouble are you having?
[22:08:42] overcrush: trying to install jekyll with gem and it's not showing up in my PATH
[22:08:51] rgtk: has joined #ruby
[22:09:06] havenwood: overcrush: Did you rehash? Have to water your garden of shims or they'll die!
[22:09:11] tomphp: has joined #ruby
[22:09:18] overcrush: haha... yeah, i haven't tried that. i'm new to rbenv
[22:09:50] overcrush: well shit. that's what i needed
[22:09:53] overcrush: much thanks
[22:10:04] havenwood: overcrush: No prob. :) Save yourself some trouble and just switch to chruby so you'll never have to rehash again.
[22:10:27] overcrush: i was told to move to rbenv from rvm because it's less complicated, etc.
[22:10:53] overcrush: my ruby env isn't complicated so i'm not opposed to the switch. what's the difference?
[22:10:53] havenwood: overcrush: chruby is simpler yet
[22:11:04] adaedra: chruby is the next step in this way.
[22:11:45] havenwood: eluten: Running the tests.
[22:12:06] overcrush: cool. so just `rm -rf` rbenv and jump on the train. the ruby world moves quick
[22:12:14] eluten: havenwood: appreciate it. I want to eliminate my local config as a variable.
[22:13:41] Ropeney: has joined #ruby
[22:15:19] havenwood: eluten: All green with latest trunk on 10.11.2 beta.
[22:15:27] havenwood: eluten: 15690 tests, 2230305 assertions, 0 failures, 0 errors, 39 skips
[22:16:03] Kabal: has joined #ruby
[22:16:26] rodfersou: has joined #ruby
[22:16:33] eluten: havenwood: Crap. Thanks for running the tests, now to hunt down what the problem is :) Thanks again.
[22:17:07] Kabal: has joined #ruby
[22:17:58] gusrub: has joined #ruby
[22:19:21] bruno-: has joined #ruby
[22:19:56] minimalism: has joined #ruby
[22:20:35] solocshaw: has joined #ruby
[22:22:43] h99h9h88: has joined #ruby
[22:23:08] devoldmx: has joined #ruby
[22:23:57] Hanmac: has joined #ruby
[22:23:57] lukaszes: has joined #ruby
[22:24:55] bruno-_: has joined #ruby
[22:24:56] chouhoulis: has joined #ruby
[22:25:02] hahuang65: has joined #ruby
[22:29:36] Ox0dea: has joined #ruby
[22:30:06] Ox0dea: What're some ways the new Hash#to_proc is useful other than, say, in a call to #map as an alternative to Hash#values_at?
[22:30:12] bruno-_: has joined #ruby
[22:30:21] djbkd: has joined #ruby
[22:30:51] maikowblue: has joined #ruby
[22:31:38] Ox0dea: I guess being able to #call a Hash lets you remove the distinction between a lookup and a real invocation in a memoized method, but that's the only other use case I can see.
[22:31:46] Ox0dea: It's kinda weird that it got accepted, I'm saying.
[22:33:09] jessemcgilallen: has joined #ruby
[22:33:49] colegatron: has joined #ruby
[22:34:24] ytti: has joined #ruby
[22:35:09] h99h9h88: has joined #ruby
[22:35:12] djbkd: has joined #ruby
[22:35:22] Guest53: has joined #ruby
[22:36:31] sinkensabe: has joined #ruby
[22:38:03] baweaver: has joined #ruby
[22:38:11] yfeldblum: has joined #ruby
[22:39:27] tAn: has joined #ruby
[22:40:26] CloCkWeRX: has joined #ruby
[22:40:50] bb010g: has joined #ruby
[22:43:50] gambl0re: has joined #ruby
[22:43:52] CloCkWeRX1: has joined #ruby
[22:44:06] chouhoul_: has joined #ruby
[22:44:44] chouhoulis: has joined #ruby
[22:45:02] kies: has joined #ruby
[22:45:28] DoubleMalt: has joined #ruby
[22:48:08] zenguy_pc: has joined #ruby
[22:48:21] Sou|cutter: Ox0dea: wait, you will be able to {}.call(key) now?
[22:48:36] Ox0dea: Sou|cutter: And `[1,2,3].map(&hash)` as well.
[22:48:52] Ox0dea: Er, you'll have to say `{}.to_proc.to_call`, though.
[22:50:16] Ox0dea: It's not as weird as the Hash comparisons that're now a thing.
[22:50:35] Sou|cutter: that's interesting. I do think values_at is more readable
[22:50:45] Ox0dea: It is, but I'll probably use the #map form. :P
[22:51:51] yfeldblum: has joined #ruby
[22:51:52] Ox0dea: I guess the notions of "subhash" and "superhash" are good for checking whether a certain set of options have been passed in.
[22:52:07] sepp2k: has joined #ruby
[22:52:17] Ox0dea: Still weird, though.
[22:53:30] Sou|cutter: I suppose you could use that map thing with lazy enumerables or something now
[22:53:31] vdamewood: has joined #ruby
[22:55:29] mary5030_: has joined #ruby
[22:55:46] Maletor: has joined #ruby
[22:56:12] Ox0dea: $ ruby -e 'h = {a: 1, b: 2}; p %i[a b].cycle.lazy.map(&h).take(4).force'
[22:56:15] Ox0dea: [1, 2, 1, 2]
[22:56:17] Ox0dea: Sou|cutter: Neat, I guess. :P
[22:56:24] mary5030_: has joined #ruby
[22:56:28] ledestin: has joined #ruby
[22:56:59] Sou|cutter: if you had a hash initialized with a block or something, you could prevent creating all the keys
[22:57:45] jgpawletko: has joined #ruby
[22:57:50] arthurix_: has joined #ruby
[22:57:57] Ox0dea: >> h = Hash.new { |h, k| h[k] = k * 2 }; h.values_at 1, 2, 3 # Sou|cutter
[22:57:58] ruboto: Ox0dea # => [2, 4, 6] (https://eval.in/466589)
[22:59:12] Ox0dea: I don't see how Hash#to_proc adds anything, but it wasn't necessarily meant to.
[22:59:14] Ox0dea: It's just a nicety.
[22:59:33] Sou|cutter: sure, I mean ruby's not a minimalist language
[22:59:33] weaksauce: has joined #ruby
[22:59:51] Fire-Dra_: has joined #ruby
[23:00:40] Ox0dea: It can be coerced into one. ^_^
[23:01:07] darix: like mruby?
[23:01:29] Sou|cutter: http://www.nooooooooooooooo.com/
[23:02:17] lemur: has joined #ruby
[23:02:29] CloCkWeRX: has joined #ruby
[23:03:09] htmldrum: has joined #ruby
[23:03:23] CloCkWeRX1: has joined #ruby
[23:03:49] Sou|cutter: amazingly there is nothing parked at yes.com
[23:04:03] ericwood: hmmm is anyone using mruby for anything yet?
[23:05:55] h99h9h88: has joined #ruby
[23:07:21] johnzorn: has joined #ruby
[23:10:06] willardg: has joined #ruby
[23:10:19] iateadonut: has joined #ruby
[23:10:40] baweaver: has joined #ruby
[23:11:13] pdoherty: has joined #ruby
[23:13:29] Ox0dea: darix: I was more referring to Tom Stuart's "Programming with Nothing".
[23:13:39] gambl0re: has joined #ruby
[23:14:46] rontec76: has joined #ruby
[23:15:13] pglombardo: has joined #ruby
[23:16:27] renderful: has joined #ruby
[23:16:47] riotjones: has joined #ruby
[23:19:01] mary5030: has joined #ruby
[23:20:56] overcrush: has left #ruby: ("Leaving...")
[23:23:04] leafybas_: has joined #ruby
[23:23:47] cicloid: has joined #ruby
[23:24:03] benlovell: has joined #ruby
[23:24:53] cicloid: has joined #ruby
[23:27:41] lukaszes: has joined #ruby
[23:28:34] solenoids: has joined #ruby
[23:33:03] shevy: programming with nothing
[23:33:05] shevy: not even a computer
[23:33:45] simplyianm: has joined #ruby
[23:34:17] edj: has joined #ruby
[23:34:48] grill: has joined #ruby
[23:35:24] wldcordeiro: has joined #ruby
[23:35:28] grill: you know how you can add a main method to a module in ruby? this way, you can run the module on its own AND include its methods? how can you do this with ruby?
[23:35:52] shevy: not sure what you are asking
[23:36:02] shevy: you mean both standalone and module methods?
[23:36:08] shevy: one way is private_function :name
[23:36:11] Ox0dea: grill: Use `module_function`.
[23:36:12] shevy: another is: extend self
[23:36:24] shevy: or def self.foo manually, with def foo calling that method
[23:37:11] Ox0dea: grill: https://eval.in/466605
[23:40:40] sye: has joined #ruby
[23:41:07] karapetyan: has joined #ruby
[23:41:13] hahuang65: has joined #ruby
[23:41:14] Yzguy: has joined #ruby
[23:42:05] Arkon: has joined #ruby
[23:42:47] CloCkWeRX: has joined #ruby
[23:42:49] arescorpio: has joined #ruby
[23:43:36] rgrmatt: has joined #ruby
[23:43:44] user083: has joined #ruby
[23:44:44] sye: has joined #ruby
[23:45:42] Arkon: has joined #ruby
[23:45:53] Ox0dea: This is Delta Echo Alpha to grill. grill, do you read?
[23:46:23] nateberkopec: has joined #ruby
[23:46:47] grill: looking now
[23:47:33] shevy: you can do it!
[23:48:34] shevy: >> module Foo; def bla; puts 'bla!'; end; extend self; end; Foo.bla; class Bar;include Foo; end; bar = Bar.new; bar.bla
[23:48:35] ruboto: shevy # => bla! ...check link for more (https://eval.in/466606)
[23:48:53] eluten: has joined #ruby
[23:51:07] TheHodge: has joined #ruby
[23:51:20] sye: has joined #ruby
[23:52:06] Ox0dea: `extend self` doesn't give you any granularity; `module_function` is essentially just a visibility modifier like `public` and `private`.
[23:52:10] grill: ok. i am going to have to look into this later. good to know it's pssible. thanks
[23:52:20] eluten: havenwood: i fixed the build issue I had by restarting the machine. Probably purged a few ghosts or something...
[23:52:43] Ox0dea: eluten: But you still have `rbenv` installed, yeah?
[23:53:08] blackmesa: has joined #ruby
[23:53:31] eluten: Ox0dea: I wasn't the rbenv question guy, I am the "make clean" fails on trunk guy.
[23:53:35] Ox0dea: Oh, right.
[23:53:46] havenwood: eluten: Aha, nice.
[23:54:02] TPBallbag: has joined #ruby
[23:55:24] sye: has joined #ruby
[23:56:46] vF3hNGxc47h8: has joined #ruby
[23:58:44] gccostabr: has joined #ruby