« Back to channel list

#ruby - 22 December 2015

« Back 1 day Forward 1 day »
[00:00:08] dlitvak: has joined #ruby
[00:00:51] agit0: has joined #ruby
[00:01:46] Vile`: has joined #ruby
[00:02:14] blackmesa: has joined #ruby
[00:02:37] jbrhbr1: has joined #ruby
[00:03:29] nkwsy: so I have a question on parcing text. I am using mechanize to parse a table, I use table = page.at("table.ticketList").text.partition(" ") and I get the full list of stuff, titles and all. Now how can I pull the table data in a format where I can put it through to a csv. the pages I am parcing will vary in rows and such.
[00:03:37] shevy: hmm if autoload will be removed in ruby 3.0, what alternative way should be done? plain old require?
[00:04:25] zenspider: nkwsy: .text.partition(" ") ??
[00:04:28] zenspider: what's that about?
[00:05:32] nkwsy: it makes it a bit neater in the cmdline, but not nessisary
[00:07:38] solocshaw: has joined #ruby
[00:09:14] zenlot1: has joined #ruby
[00:09:53] zenspider: nkwsy: mechanize has already parsed your page. when you access via #at, you get the node at that level/tag/whatever. you're done. By asking for the text, you're essentially UN-parsing it
[00:10:36] nkwsy: how could I separate it so that I can put it into a DB or csv
[00:10:36] charliesome: has joined #ruby
[00:11:18] jcdesimp_: has joined #ruby
[00:12:52] marr: has joined #ruby
[00:13:57] Eising: has joined #ruby
[00:14:03] sugardrunk: has joined #ruby
[00:14:06] SamGerber: has joined #ruby
[00:14:44] sluukkonen: has joined #ruby
[00:14:44] nkwsy: I guess it wouldnt really have to do with mechanize once I parced it. but I want to separate it and define parts to throw in a database
[00:14:52] Coldblackice: has joined #ruby
[00:16:03] hxegon: nkwsy parsed* what format is it in once it is parsed? array of arrays?
[00:16:10] ur5us: has joined #ruby
[00:17:25] nkwsy: its a string
[00:17:31] mjw56: has joined #ruby
[00:17:54] ellisTAA: has anyone read this: http://www.amazon.com/The-Nature-Code-Simulating-Processing/dp/0985930802/ref=pd_sim_14_45?ie=UTF8&dpID=41CMjsHNB3L&dpSrc=sims&preST=_AC_UL160_SR130%2C160_&refRID=05E6V2XDBKMKPY7H2MTC
[00:18:10] hxegon: nkwsy before you call #text though.
[00:18:45] hxegon: nkwsy that is what makes it a string, and it's harder to manipulate unless you turn it back into structured date
[00:19:12] mistermocha: has joined #ruby
[00:19:13] hxegon: not that strings are unstructured, but...)
[00:20:55] nkwsy: so the css defines it as a table.
[00:21:29] hxegon: nkwsy sorry, I should have been clearer. what does page.at("table.ticketList").class return
[00:22:55] skcin7: has joined #ruby
[00:23:30] deuterium: has joined #ruby
[00:24:15] codeurge: has joined #ruby
[00:24:37] nkwsy: Nokogiri::XML::Element
[00:24:37] `derpy: No results
[00:25:53] shadoi: has joined #ruby
[00:30:03] SamGerber: has joined #ruby
[00:30:51] duncannz: has joined #ruby
[00:32:02] ascarter: has joined #ruby
[00:32:04] charliesome: has joined #ruby
[00:32:56] dwfait: has joined #ruby
[00:34:28] sdothum: has joined #ruby
[00:36:38] snguyen: has joined #ruby
[00:37:40] build22: has joined #ruby
[00:39:04] Xiti: has joined #ruby
[00:39:22] zdman135: has joined #ruby
[00:40:20] build22: has joined #ruby
[00:42:04] hxegon: nkwsy hmm... look at this https://gist.github.com/sandys/3910840 and this http://www.rubydoc.info/github/sparklemotion/nokogiri/Nokogiri/XML/Node#to_html-instance_method
[00:42:57] ta: has joined #ruby
[00:45:35] dwfait: has joined #ruby
[00:47:06] nkwsy: thanks! I will check this out and report back
[00:47:22] jackjackdripper: has joined #ruby
[00:48:08] n_blownapart: has joined #ruby
[00:48:22] devoldmx: has joined #ruby
[00:48:24] mark06: has joined #ruby
[00:49:42] cpup: has joined #ruby
[00:51:07] zenspider: obviously really not getting through on this whole "unparse" concept.
[00:53:08] ElFerna: has joined #ruby
[00:53:55] nkwsy: what do mean zen
[00:55:59] DLSteve: has joined #ruby
[00:58:04] Domaldel: has joined #ruby
[00:58:16] atomical: has joined #ruby
[00:58:33] nerium: has joined #ruby
[00:59:00] wolffles: has joined #ruby
[00:59:02] bousquet: has joined #ruby
[01:02:04] Arcaire: has joined #ruby
[01:05:56] Arcaire: has joined #ruby
[01:07:46] Mojo_Nixon: has joined #ruby
[01:10:51] Cyther_: has joined #ruby
[01:11:11] auzty: has joined #ruby
[01:11:49] mark06: has left #ruby: ("http://pidgin.renatosilva.me - Pidgin++")
[01:11:58] Cyther_: has left #ruby: ()
[01:12:41] idefine_: has joined #ruby
[01:12:59] devoldmx: has joined #ruby
[01:15:29] ryxai: has joined #ruby
[01:16:33] lessless: has joined #ruby
[01:19:10] dlitvak: has joined #ruby
[01:19:30] SamGerber: has joined #ruby
[01:21:08] charliesome: has joined #ruby
[01:25:08] ascarter: has joined #ruby
[01:27:25] PsionTheory: has joined #ruby
[01:30:08] benlieb: has joined #ruby
[01:31:19] hxegon: has joined #ruby
[01:31:36] woodruffw: has joined #ruby
[01:31:46] ur5us: has joined #ruby
[01:32:05] sankaber: has joined #ruby
[01:34:14] cassioscabral: has joined #ruby
[01:37:07] siddharth_: has joined #ruby
[01:37:15] sankaber: has joined #ruby
[01:38:34] bogn: has joined #ruby
[01:40:02] sankaber: has joined #ruby
[01:42:03] ledestin: has joined #ruby
[01:42:45] PsionTheory_: has joined #ruby
[01:43:01] Pupeno: has joined #ruby
[01:43:16] idefine: has joined #ruby
[01:44:24] FrankD: has joined #ruby
[01:46:01] arescorpio: has joined #ruby
[01:47:46] treaki_: has joined #ruby
[01:47:56] dr3w: has joined #ruby
[01:48:27] psye: has joined #ruby
[01:49:30] psye: has joined #ruby
[01:49:45] lannonbr: has joined #ruby
[01:50:20] ta: has joined #ruby
[01:51:48] grassdog_: has joined #ruby
[01:54:23] ascarter: has joined #ruby
[01:54:41] yfeldblum: has joined #ruby
[01:56:19] idefine: has joined #ruby
[01:57:08] bkxd: has joined #ruby
[02:00:10] Trynemjoel: has joined #ruby
[02:00:42] jackjackdripper1: has joined #ruby
[02:01:07] mary5030: has joined #ruby
[02:05:03] devbug: has joined #ruby
[02:05:13] PaulCapestany: has joined #ruby
[02:10:03] ohaibbq: has joined #ruby
[02:10:41] Viata: has joined #ruby
[02:11:29] mistermocha: has joined #ruby
[02:12:06] RobertBirnie: has joined #ruby
[02:12:15] mistermocha: has joined #ruby
[02:13:46] dlitvak: has joined #ruby
[02:18:04] nonopposition: has joined #ruby
[02:18:17] Coldblackice: has joined #ruby
[02:18:54] Viata: has left #ruby: ("Leaving")
[02:20:52] krz: has joined #ruby
[02:23:34] pawnbox: has joined #ruby
[02:24:21] blackmesa: has joined #ruby
[02:24:42] aibot: has joined #ruby
[02:26:01] mbrumbelow: has joined #ruby
[02:28:43] rkazak: has joined #ruby
[02:31:48] eytanfb: has joined #ruby
[02:33:07] dr3w: has joined #ruby
[02:36:02] hxegon: has joined #ruby
[02:36:41] houhoulis: has joined #ruby
[02:39:37] stannard: has joined #ruby
[02:40:04] SamGerber: has joined #ruby
[02:42:39] krobzaur: has joined #ruby
[02:46:54] mattpatt: has joined #ruby
[02:47:12] idefine_: has joined #ruby
[02:47:23] hfp_work: has joined #ruby
[02:51:29] krobzaur_: has joined #ruby
[02:52:35] SamGerber: has joined #ruby
[02:52:56] ta: has joined #ruby
[02:53:36] andywojo: has joined #ruby
[02:54:07] ohaibbq_: has joined #ruby
[02:54:28] momomomomo: has joined #ruby
[02:54:36] krobzaur: has joined #ruby
[02:57:57] bkxd: has joined #ruby
[02:58:15] Rodya_: has joined #ruby
[02:58:24] ruby-lang975: has joined #ruby
[03:00:34] skcin7: has joined #ruby
[03:02:45] sekrit: has joined #ruby
[03:02:54] hagabaka: has joined #ruby
[03:04:02] SleepySensei: has joined #ruby
[03:04:58] ruby-lang387: has joined #ruby
[03:05:25] djbkd: has joined #ruby
[03:09:11] dr3w: has joined #ruby
[03:10:03] cassioscabral_: has joined #ruby
[03:10:06] yes`r: has joined #ruby
[03:10:11] nonopposition: has joined #ruby
[03:10:31] wolffles: has joined #ruby
[03:10:36] idefine_: has joined #ruby
[03:14:42] SleepySensei: has joined #ruby
[03:16:37] idefine: has joined #ruby
[03:19:39] symm-: has joined #ruby
[03:20:31] bronson: has joined #ruby
[03:20:53] gambl0re: has joined #ruby
[03:21:02] PovAddict: has joined #ruby
[03:21:07] dr3w: has joined #ruby
[03:24:34] Coldblackice: has joined #ruby
[03:24:42] idefine_: has joined #ruby
[03:28:27] dlitvak: has joined #ruby
[03:30:54] pawnbox: has joined #ruby
[03:31:03] ohaibbq: has joined #ruby
[03:31:13] mary5030: has joined #ruby
[03:34:09] bronson: has joined #ruby
[03:35:03] cpup: has joined #ruby
[03:35:04] idefine_: has joined #ruby
[03:36:52] chouhoulis: has joined #ruby
[03:37:15] hxegon: has joined #ruby
[03:37:25] ESpiney: has joined #ruby
[03:40:07] RobertBirnie: has joined #ruby
[03:42:28] dylanjhoulihan: has joined #ruby
[03:42:51] colegatron: has joined #ruby
[03:43:22] StevenXL: has joined #ruby
[03:43:23] StevenXL: has joined #ruby
[03:45:10] idefine_: has joined #ruby
[03:47:51] stannard: has joined #ruby
[03:48:10] dlitvak: has joined #ruby
[03:48:21] mistermocha: has joined #ruby
[03:49:02] ammar: has joined #ruby
[03:50:37] pawnbox: has joined #ruby
[03:52:54] grassdog_: has joined #ruby
[03:57:03] snguyen: has joined #ruby
[03:59:12] yeticry: has joined #ruby
[03:59:49] ponga: has joined #ruby
[04:00:07] devbug: has joined #ruby
[04:01:21] arooni: has joined #ruby
[04:01:24] treaki__: has joined #ruby
[04:02:11] blackmesa: has joined #ruby
[04:02:17] colegatron: has joined #ruby
[04:02:56] djbkd: has joined #ruby
[04:05:18] idefine_: has joined #ruby
[04:05:38] hxegon: has joined #ruby
[04:06:08] DavidDudson: has joined #ruby
[04:08:00] ascarter: has joined #ruby
[04:08:21] user083: has joined #ruby
[04:11:48] dsdeiz: has joined #ruby
[04:13:18] atumzin: has joined #ruby
[04:15:41] lacuna: has joined #ruby
[04:15:41] lacuna: has joined #ruby
[04:15:42] braincrash: has joined #ruby
[04:18:28] Kn|t3: has joined #ruby
[04:18:45] ramfjord: has joined #ruby
[04:21:03] minimalism: has joined #ruby
[04:21:51] idefine: has joined #ruby
[04:22:00] zast: has joined #ruby
[04:23:08] pawnbox: has joined #ruby
[04:23:35] adgtl: has joined #ruby
[04:25:35] howdoi: has joined #ruby
[04:26:27] lacuna: has joined #ruby
[04:26:27] lacuna: has joined #ruby
[04:27:50] dlitvak: has joined #ruby
[04:30:57] PovAddict: has left #ruby: ("Konversation terminated!")
[04:33:49] dsdeiz: has left #ruby: ()
[04:33:56] LightStalker: has joined #ruby
[04:35:39] idefine: has joined #ruby
[04:37:18] chouhoulis: has joined #ruby
[04:37:31] fullofcaffeine: has joined #ruby
[04:38:56] the_nick_me: has joined #ruby
[04:41:22] idefine: has joined #ruby
[04:41:28] nkwsy: has joined #ruby
[04:42:35] inferno5677: has joined #ruby
[04:43:12] BTRE: has joined #ruby
[04:43:51] eytanfb: has joined #ruby
[04:44:10] cmoneylulz: has joined #ruby
[04:44:26] dr3w: has joined #ruby
[04:44:36] cwong_on_irc: has joined #ruby
[04:47:50] yes`r: has joined #ruby
[04:48:07] bronson: has joined #ruby
[04:49:06] govg: has joined #ruby
[04:49:57] dwfait: has joined #ruby
[04:54:03] varunwachaspati: has joined #ruby
[04:54:08] yfeldblum: has joined #ruby
[04:55:08] msankhala: has joined #ruby
[04:56:31] ta: has joined #ruby
[04:57:13] centrx: has joined #ruby
[04:58:43] bkxd: has joined #ruby
[04:58:45] braincra-: has joined #ruby
[05:00:18] treaki_: has joined #ruby
[05:00:39] DavidDudson: has joined #ruby
[05:00:40] Kn|t3: has joined #ruby
[05:01:38] tildes: has joined #ruby
[05:01:42] jcdesimp: has joined #ruby
[05:02:44] sdothum: has joined #ruby
[05:03:10] mary5030: has joined #ruby
[05:05:21] DavidDudson: has joined #ruby
[05:05:54] astrobun_: has joined #ruby
[05:06:21] Anderson69s: has joined #ruby
[05:06:32] plonk: has joined #ruby
[05:06:33] plonk: has joined #ruby
[05:10:44] adgtl: has joined #ruby
[05:11:52] minimalism: has joined #ruby
[05:13:04] cyfr0n: has left #ruby: (".")
[05:14:22] makenoise: has joined #ruby
[05:15:04] jessemcgilallen: has joined #ruby
[05:15:54] mistermocha: has joined #ruby
[05:16:33] mistermocha: has joined #ruby
[05:17:04] atumzin: has joined #ruby
[05:21:12] cpup: has joined #ruby
[05:21:22] doublemalt_: has joined #ruby
[05:22:50] devbug: has joined #ruby
[05:23:11] arup_r: has joined #ruby
[05:23:35] baweaver: has joined #ruby
[05:24:18] Lewix: has joined #ruby
[05:25:44] dwfait: has joined #ruby
[05:26:49] dlitvak: has joined #ruby
[05:26:54] shaileshg: has joined #ruby
[05:27:13] ramfjord: has joined #ruby
[05:29:12] inferno5677: has joined #ruby
[05:38:22] chouhoulis: has joined #ruby
[05:38:51] pawnbox: has joined #ruby
[05:39:09] dr3w: has joined #ruby
[05:39:52] cpup: has joined #ruby
[05:40:09] mistermocha: has joined #ruby
[05:40:41] ruu_: has joined #ruby
[05:41:48] adgtl: How is this pattern to load a class var from a file?
[05:41:49] adgtl: https://gist.github.com/anildigital/3e699541d7cb165a3c5b
[05:42:40] adgtl: Basically initialising a class variable by reading a file
[05:43:40] rickmasta: has joined #ruby
[05:46:21] agent_white: adgtl: Seems fine? Though instead of a class variable, maybe toss it into a module as a constant instead.
[05:46:38] dlitvak: has joined #ruby
[05:46:50] agent_white: module Config; Options = YAML.load... etc.
[05:47:03] idefine: has joined #ruby
[05:47:06] RobertBirnie: has joined #ruby
[05:47:22] lacuna: has joined #ruby
[05:47:23] lacuna: has joined #ruby
[05:48:11] andywojo: has joined #ruby
[05:49:39] lessless: has joined #ruby
[05:51:37] adgtl: agent_white: okay
[05:51:59] SamGerber: has joined #ruby
[05:52:24] adgtl: agent_white: constant cane be defined like this right OPTIONS instead of Options
[05:52:34] adgtl: agent_white: which one fits well with ruby idioms
[05:52:46] Cihan: has joined #ruby
[05:54:39] agent_white: adgtl: All uppercase.
[05:54:54] adgtl: agent_white: okay so OPTIONS is right.
[05:55:16] agent_white: Yes, it fits the style guide.
[05:55:42] adgtl: cool. thanks agent_white
[05:56:21] hxegon: has joined #ruby
[05:59:52] ur5us: has joined #ruby
[05:59:55] ta: has joined #ruby
[06:02:12] blackmesa: has joined #ruby
[06:04:29] dr3w: has joined #ruby
[06:07:03] ascarter: has joined #ruby
[06:10:17] idefine: has joined #ruby
[06:11:15] lxsameer: has joined #ruby
[06:14:03] jdelaney: has joined #ruby
[06:14:20] astrobun_: has joined #ruby
[06:14:33] darkf: has joined #ruby
[06:14:57] ur5us: has joined #ruby
[06:16:18] SCHAAP137: has joined #ruby
[06:19:19] rippa: has joined #ruby
[06:21:22] lacuna: has joined #ruby
[06:21:22] lacuna: has joined #ruby
[06:23:32] bronson: has joined #ruby
[06:23:42] snguyen: has joined #ruby
[06:24:53] snguyen: has joined #ruby
[06:26:11] pawnbox: has joined #ruby
[06:30:03] idefine: has joined #ruby
[06:33:23] celly: has joined #ruby
[06:34:46] yardenbar: has joined #ruby
[06:34:49] ellisTAA: has joined #ruby
[06:36:07] jessemcgilallen: has joined #ruby
[06:36:44] karapety_: has joined #ruby
[06:38:13] ellisTAA: has joined #ruby
[06:39:07] chouhoulis: has joined #ruby
[06:40:48] ledestin: has joined #ruby
[06:42:51] tagrudev: has joined #ruby
[06:43:40] stannard: has joined #ruby
[06:44:00] krz: has joined #ruby
[06:44:21] hahuang61: has joined #ruby
[06:44:28] bkxd: has joined #ruby
[06:45:11] RobertBirnie: has joined #ruby
[06:47:50] pawnbox_: has joined #ruby
[06:48:57] pawnbox__: has joined #ruby
[06:54:09] zanzarel: has joined #ruby
[06:55:25] fullofcaffeine: has joined #ruby
[06:56:55] fullofcaffeine: has joined #ruby
[06:58:18] ur5us: has joined #ruby
[06:59:41] idefine: has joined #ruby
[07:00:40] cyberfawkes: has joined #ruby
[07:00:41] cyberfawkes: has joined #ruby
[07:03:01] ta: has joined #ruby
[07:04:38] sigurding: has joined #ruby
[07:10:24] pawnbox: has joined #ruby
[07:11:06] anisha: has joined #ruby
[07:11:11] nocd: has joined #ruby
[07:18:03] Dimik: has joined #ruby
[07:18:36] solars: has joined #ruby
[07:23:48] charliesome: has joined #ruby
[07:25:25] karapetyan: has joined #ruby
[07:25:37] luckyme: has joined #ruby
[07:25:43] tildes: has joined #ruby
[07:26:35] karapetyan: has joined #ruby
[07:31:00] lokulin: has left #ruby: ()
[07:32:13] blackmesa: has joined #ruby
[07:32:40] ankitkulshrestha: has joined #ruby
[07:33:00] ankitkulshrestha: hi, I'm a very new ruby and rails dev
[07:33:09] ankitkulshrestha: I've got a simple question.
[07:33:12] moeabdol1: has joined #ruby
[07:33:46] ankitkulshrestha: I didn't know the existence of rbenv/rvm earlier so I had installed rails against the system ruby
[07:34:21] ankitkulshrestha: I've got an app built there, now since I have installed rbenv, how do I port my app to that environment
[07:34:50] dwfait: has joined #ruby
[07:35:51] dr3w: has joined #ruby
[07:37:31] pawnbox: has joined #ruby
[07:38:23] dlitvak: has joined #ruby
[07:39:17] idefine_: has joined #ruby
[07:39:51] chouhoulis: has joined #ruby
[07:39:57] yfeldblum: has joined #ruby
[07:40:38] lyoshajapan: has joined #ruby
[07:41:19] wolffles: has joined #ruby
[07:46:29] nkwsy: has joined #ruby
[07:48:02] lessless: has joined #ruby
[07:48:47] adgtl_: has joined #ruby
[07:48:55] idefine: has joined #ruby
[07:48:56] andywojo: has joined #ruby
[07:51:56] benhuda: has joined #ruby
[07:52:02] snguyen: has joined #ruby
[07:53:51] n0vo: has joined #ruby
[07:54:58] certainty: has joined #ruby
[07:59:03] idefine: has joined #ruby
[08:00:06] bkxd: has joined #ruby
[08:04:30] SamGerber: has joined #ruby
[08:04:57] bmalum: has joined #ruby
[08:06:12] [dmp]: has joined #ruby
[08:09:08] waka: has joined #ruby
[08:13:13] joonty: has joined #ruby
[08:14:48] the_nick_me: has joined #ruby
[08:14:50] dmolina: has joined #ruby
[08:15:02] ta: has joined #ruby
[08:16:02] ta: has joined #ruby
[08:19:06] armyriad: has joined #ruby
[08:19:20] idefine: has joined #ruby
[08:21:30] celly: has joined #ruby
[08:24:34] dotix: has joined #ruby
[08:24:34] dotix: has joined #ruby
[08:24:44] firstdayonthejob: has joined #ruby
[08:27:45] armyriad: has joined #ruby
[08:28:40] idefine: has joined #ruby
[08:29:16] krz: has joined #ruby
[08:29:20] idefine_: has joined #ruby
[08:29:57] armyriad: has joined #ruby
[08:30:32] dr3w: has joined #ruby
[08:31:16] armyriad: has joined #ruby
[08:31:32] nonopposition: has joined #ruby
[08:31:50] nunchuck: has joined #ruby
[08:32:05] jcdesimp: has joined #ruby
[08:32:08] lyoshajapan: has joined #ruby
[08:34:21] bronson: has joined #ruby
[08:34:50] bkxd: has joined #ruby
[08:36:25] agent_wh1te: has joined #ruby
[08:36:36] agit0: has joined #ruby
[08:39:52] BSaboia: has joined #ruby
[08:40:08] agent_white: has joined #ruby
[08:40:39] chouhoulis: has joined #ruby
[08:41:00] adgtl: has joined #ruby
[08:42:46] ur5us: has joined #ruby
[08:42:48] Mon_Ouie: has joined #ruby
[08:42:50] arup_r: has joined #ruby
[08:43:30] sandstrom: has joined #ruby
[08:43:34] edwinvdgraaf: has joined #ruby
[08:44:26] skade: has joined #ruby
[08:46:35] curses: has joined #ruby
[08:48:22] plsk: has joined #ruby
[08:48:24] crowell: has joined #ruby
[08:48:25] crowell: has joined #ruby
[08:48:36] gregf_: has joined #ruby
[08:48:44] Gadgetoid: has joined #ruby
[08:49:07] Hounddog: has joined #ruby
[08:50:15] joonty: has joined #ruby
[08:50:50] eytanfb: has joined #ruby
[08:51:39] domgetter: has joined #ruby
[08:52:20] domgetter: havenwood: Check this out: https://gist.github.com/domgetter/e6edc10303347a1084e1
[08:52:42] Cihan: has joined #ruby
[08:52:45] domgetter: A much leaner implementation of transducers in Ruby than Cognitect's :P
[08:52:50] ur5us_: has joined #ruby
[08:56:00] Cihan: has joined #ruby
[08:57:07] tildes: has joined #ruby
[08:57:30] blub: hi adaedra
[08:58:08] sandstrom: has joined #ruby
[08:59:57] idefine: has joined #ruby
[09:01:33] snowy: has joined #ruby
[09:02:43] blackmesa: has joined #ruby
[09:02:49] adaedra: lol `derpy
[09:05:38] mark2: has joined #ruby
[09:05:43] snowy: has joined #ruby
[09:06:27] AlexRussia: has joined #ruby
[09:06:59] dlitvak: has joined #ruby
[09:09:26] lyoshajapan: has joined #ruby
[09:10:07] idefine: has joined #ruby
[09:10:11] yes`r: has joined #ruby
[09:11:49] pawnbox: has joined #ruby
[09:13:45] Snowy_: has joined #ruby
[09:13:54] dwfait: has joined #ruby
[09:14:54] marr: has joined #ruby
[09:14:55] ximus: has joined #ruby
[09:15:37] blaxter: has joined #ruby
[09:17:30] pawnbox: has joined #ruby
[09:17:53] blaxter: has joined #ruby
[09:19:08] pawnbox: has joined #ruby
[09:20:50] Bloomer: has joined #ruby
[09:24:16] dr3w: has joined #ruby
[09:26:28] ruu_: has joined #ruby
[09:26:46] dlitvak: has joined #ruby
[09:27:51] Jackneill: has joined #ruby
[09:29:52] mistermocha: has joined #ruby
[09:30:51] drptbl: has joined #ruby
[09:31:35] astik_: has joined #ruby
[09:33:53] adaedra: TIL about un.rb
[09:34:32] adaedra: http://www.rubydoc.info/stdlib/un
[09:34:37] puria: has joined #ruby
[09:34:53] pawnbox: has joined #ruby
[09:35:39] chussenot: has joined #ruby
[09:35:41] ledestin: has joined #ruby
[09:36:29] dwfait: has joined #ruby
[09:37:14] dwfait: Can someone tell me where idSize comes from here? https://github.com/ruby/ruby/blob/trunk/numeric.c#L1731
[09:40:56] IdanM: has joined #ruby
[09:41:22] chouhoulis: has joined #ruby
[09:42:02] dwfait: From what I can tell, it???s of type ID which is typedef???d as uintptr_t, like VALUE, and I was expecting it to be defined as a #DEFINE or an enum, but my searches of the codebase have failed me
[09:42:13] dwfait: and lldb can???t evaluate it on a breakpoint on that line
[09:42:44] pawnbox: has joined #ruby
[09:43:09] dr3w: has joined #ruby
[09:43:51] emilkarl: has joined #ruby
[09:44:23] colli5ion: has joined #ruby
[09:45:03] colli5ion: has joined #ruby
[09:46:29] dlitvak: has joined #ruby
[09:47:04] andikr: has joined #ruby
[09:49:23] jschmid: has joined #ruby
[09:49:39] colegatron: has joined #ruby
[09:49:46] andywojo: has joined #ruby
[09:50:27] blackmesa: has joined #ruby
[09:50:29] idefine: has joined #ruby
[09:52:28] rodfersou: has joined #ruby
[09:52:56] WeiJunLi: has joined #ruby
[09:57:34] idefine: has joined #ruby
[10:00:11] chthon: has joined #ruby
[10:02:31] monthy: has joined #ruby
[10:04:40] ElFerna: has joined #ruby
[10:08:21] FernandoBasso: has joined #ruby
[10:08:34] joonty: has joined #ruby
[10:09:42] celly: has joined #ruby
[10:10:36] idefine: has joined #ruby
[10:11:44] atomical: has joined #ruby
[10:11:49] DaniG2k: has joined #ruby
[10:11:53] drptbl: has joined #ruby
[10:11:54] senayar: has joined #ruby
[10:13:17] waka: has joined #ruby
[10:14:14] qiukun: has joined #ruby
[10:14:35] qiukun: how do you parse the log logging logged?
[10:15:00] lyoshajapan: has joined #ruby
[10:15:00] adaedra: What do you call "the log logging logged"?
[10:15:18] DefV: did you log the logged loggong the log logged?
[10:15:34] qiukun: the log logging module logged
[10:15:45] qiukun: the log which the module logging logged
[10:16:05] qiukun: oh, sorry, im talking about python
[10:16:19] DefV: well my friend, there's a channel for that
[10:16:30] qiukun: DefV, tks
[10:17:23] idefine: has joined #ruby
[10:20:24] dr3w: has joined #ruby
[10:20:56] tomphp: has joined #ruby
[10:21:25] Ishido: has joined #ruby
[10:23:14] puria: has joined #ruby
[10:23:57] arup_r: has joined #ruby
[10:24:07] dwfait_: has joined #ruby
[10:25:34] nfk|laptop: has joined #ruby
[10:26:21] joonty: has joined #ruby
[10:27:54] codecop: has joined #ruby
[10:30:39] dr3w: has joined #ruby
[10:30:53] idefine: has joined #ruby
[10:31:09] zamerick_: has joined #ruby
[10:33:01] tvw: has joined #ruby
[10:36:24] skade: has joined #ruby
[10:36:46] bronson: has joined #ruby
[10:36:55] M-shine: has joined #ruby
[10:37:29] dlitvak: has joined #ruby
[10:38:05] krz: has joined #ruby
[10:40:54] lyoshajapan: has joined #ruby
[10:42:09] chouhoulis: has joined #ruby
[10:43:51] pandaant: has joined #ruby
[10:44:38] beast: has joined #ruby
[10:45:19] M-Kodo: has joined #ruby
[10:47:05] idefine: has joined #ruby
[10:51:12] idefine_: has joined #ruby
[10:52:01] cibs: has joined #ruby
[10:52:21] davedev24: has joined #ruby
[10:52:28] fexilal: has joined #ruby
[10:53:32] Pupeno: has joined #ruby
[10:53:32] Pupeno: has joined #ruby
[10:54:58] M-mistake: has joined #ruby
[10:54:59] M-prosodyContext: has joined #ruby
[10:58:55] davedev24: has joined #ruby
[11:02:10] the_nick_me: has joined #ruby
[11:04:36] adgtl: has joined #ruby
[11:04:48] cibs: has joined #ruby
[11:06:42] idefine: has joined #ruby
[11:09:19] mdw: has joined #ruby
[11:12:58] TomyLobo: has joined #ruby
[11:13:35] lyoshajapan: has joined #ruby
[11:14:20] aryaching: has joined #ruby
[11:15:35] AlexRussia: has joined #ruby
[11:15:40] dr3w: has joined #ruby
[11:18:49] cibs_: has joined #ruby
[11:18:50] norc: has joined #ruby
[11:20:27] pdoherty: has joined #ruby
[11:21:41] alphaatom: has joined #ruby
[11:23:08] dlitvak: has joined #ruby
[11:23:19] blackgoat: has joined #ruby
[11:23:51] cibs: has joined #ruby
[11:25:27] darkf: has joined #ruby
[11:26:46] shanemcd: has joined #ruby
[11:28:02] firstdayonthejob: has joined #ruby
[11:28:50] cibs: has joined #ruby
[11:29:22] sandstrom: has joined #ruby
[11:32:24] pawnbox: has joined #ruby
[11:33:27] nfk|laptop: has joined #ruby
[11:34:56] Bish: has joined #ruby
[11:40:20] ElFerna: has joined #ruby
[11:41:39] Stan: has joined #ruby
[11:42:54] chouhoulis: has joined #ruby
[11:44:35] pawnbox: has joined #ruby
[11:46:10] norc: apeiros: Did you succeed getting ruby-oci8 running under El Capitan?
[11:47:01] blackmesa: has joined #ruby
[11:47:22] devbug: has joined #ruby
[11:48:07] pawnbox: has joined #ruby
[11:50:35] andywojo: has joined #ruby
[11:53:27] qiukun: has joined #ruby
[11:53:29] krz: has joined #ruby
[11:53:44] consti: has joined #ruby
[11:53:45] puria: has joined #ruby
[11:54:15] mistermocha: has joined #ruby
[11:56:35] pawnbox: has joined #ruby
[11:57:51] celly: has joined #ruby
[11:58:17] Vitor_: has joined #ruby
[12:01:01] pawnbox: has joined #ruby
[12:01:38] big|bad|wolf: has joined #ruby
[12:02:30] CloCkWeRX: has joined #ruby
[12:02:34] CloCkWeRX: has left #ruby: ()
[12:02:41] nofxx: has joined #ruby
[12:02:42] nofxx: has joined #ruby
[12:05:00] cassioscabral: has joined #ruby
[12:05:10] Ishido: has joined #ruby
[12:07:22] sandstrom: has joined #ruby
[12:08:33] sdothum: has joined #ruby
[12:09:50] jcdesimp: has joined #ruby
[12:09:51] dr3w: has joined #ruby
[12:11:53] blackmesa: has joined #ruby
[12:12:46] idefine: has joined #ruby
[12:12:56] InvGhostt: has joined #ruby
[12:12:58] ferr: has joined #ruby
[12:13:27] _axx: has left #ruby: ("I Must Go, My Planet Needs Me")
[12:14:05] last_staff: has joined #ruby
[12:14:50] BSaboia: has joined #ruby
[12:16:28] certainty: has joined #ruby
[12:24:09] big|bad|wolf: has joined #ruby
[12:24:33] apeiros: norc: see https://github.com/kubo/ruby-oci8/issues/111#issuecomment-160558724
[12:24:43] Tricon: has joined #ruby
[12:25:48] Asher1: has joined #ruby
[12:28:39] pawnbox: has joined #ruby
[12:32:44] idefine: has joined #ruby
[12:34:27] freerobby: has joined #ruby
[12:34:47] kobain: has joined #ruby
[12:35:42] idefine_: has joined #ruby
[12:36:04] tricon_: has joined #ruby
[12:36:43] senayar: has joined #ruby
[12:38:45] pawnbox: has joined #ruby
[12:39:17] bronson: has joined #ruby
[12:41:04] FooMunki: has joined #ruby
[12:41:48] j2k: has joined #ruby
[12:42:37] p0wn3d_: has joined #ruby
[12:42:39] sankaber: has joined #ruby
[12:43:36] chouhoulis: has joined #ruby
[12:43:57] dotix: has joined #ruby
[12:45:15] silverdust: has joined #ruby
[12:45:41] silverdust: What's the difference between Foo::bar and Foo.bar ?
[12:46:11] scepticulous: has joined #ruby
[12:46:39] silverdust: My guess is Foo::bar has a static bar method but I don't even know if that exists in ruby
[12:48:10] pawnbox: has joined #ruby
[12:49:11] norc: apeiros: Ah, so it was a buggy brew package?
[12:49:39] dotix: has joined #ruby
[12:50:27] millerti: has joined #ruby
[12:52:10] andywojo: has joined #ruby
[12:52:39] DoubleMalt: has joined #ruby
[12:53:00] idefine: has joined #ruby
[12:53:21] prestorium: has joined #ruby
[12:55:26] idefine_: has joined #ruby
[12:57:16] norc: silverdust: tCOLON2 also provides you with access to the constants table of a class.
[12:58:20] norc: Also you have tCOLON3, like: ::Array
[13:02:15] shevy: silverdust in your case, when it is bar and not Bar, there should not be any difference between either variants, you call a class/module method in both cases
[13:02:31] rippa: has joined #ruby
[13:02:43] shevy: silverdust now if it would be Foo::Bar or Foo.Bar it could either be a method or a constant (in the first case, for a constant, the second would always be a method call)
[13:02:58] claw: hey guys
[13:03:13] norc: shevy: And that is a shorthand for Object:: I think.
[13:03:23] claw: How to : "C61810AC" => ["C6", "18", "10", "AC"] ?
[13:03:38] ElFerna: has joined #ruby
[13:03:45] claw: any nice solution for this ?
[13:04:07] claw: couldn't find anything mostly because i dont know how to name it
[13:04:34] canton7: something involving .chars.each_cons(2)?
[13:05:03] canton7: "C61810AC".chars.each_cons(2).map{ |x| x.join } works. Dunno if there's anything neater
[13:05:08] prosody: has left #ruby: ()
[13:05:33] synthroid: has joined #ruby
[13:05:41] norc: ?guys claw
[13:05:41] ruboto: claw, Though inclusion was probably intended, not everyone relates to being "one of the guys". Maybe consider using "folks", "all", "y'all", or "everyone" instead?
[13:06:03] claw: its "STRING".chars.each_slite(2).to_a
[13:06:22] norc: >> "aabbccdd".split /ss/
[13:06:23] ruboto: norc # => ["aabbccdd"] (https://eval.in/489207)
[13:06:30] norc: >> "aabbccdd".split /../
[13:06:31] ruboto: norc # => [] (https://eval.in/489208)
[13:06:40] norc: >> "aabbccdd".scan /../
[13:06:41] ruboto: norc # => ["aa", "bb", "cc", "dd"] (https://eval.in/489209)
[13:06:54] psye: has joined #ruby
[13:06:55] millerti: has joined #ruby
[13:06:56] sgambino: has joined #ruby
[13:06:56] norc: Had a little brainfart there. :)
[13:07:15] canton7: ah yeah, each_slice not each_cons
[13:07:33] norc: claw: Dont think there is a more elegant way than str.scan(/../) :)
[13:07:39] puria: has joined #ruby
[13:07:51] atomical: has joined #ruby
[13:08:16] claw: scan is perfect thank you norc
[13:10:17] norc: claw: Depending on what you intend to do, String#unpack might also be of interest to you.
[13:10:35] cassioscabral: has joined #ruby
[13:11:28] djbkd: has joined #ruby
[13:12:35] Kn|t3: has joined #ruby
[13:12:37] lxsameer: has joined #ruby
[13:15:12] idefine: has joined #ruby
[13:15:33] dionysus69: has joined #ruby
[13:17:58] blackmesa: has joined #ruby
[13:18:18] shanemcd: has joined #ruby
[13:20:16] d0nn1e: has joined #ruby
[13:20:42] emilkarl: has joined #ruby
[13:21:03] moeabdol: has joined #ruby
[13:21:27] sigurding: has joined #ruby
[13:22:33] skade: has joined #ruby
[13:23:28] idefine: has joined #ruby
[13:24:02] krz: has joined #ruby
[13:25:11] prestorium: has joined #ruby
[13:25:26] FooMunki: has joined #ruby
[13:25:36] shanemcd_: has joined #ruby
[13:27:57] millerti: has joined #ruby
[13:30:41] senayar: has joined #ruby
[13:30:41] senayar: has joined #ruby
[13:31:39] prestorium: has joined #ruby
[13:33:19] duderonomy: has joined #ruby
[13:33:21] freerobby: has joined #ruby
[13:34:19] dotix: has joined #ruby
[13:34:20] dotix: has joined #ruby
[13:35:02] big|bad|wolf: has joined #ruby
[13:35:19] millerti: has joined #ruby
[13:36:15] yes`r: has joined #ruby
[13:39:15] dstarh: has joined #ruby
[13:39:15] alphaatom: has joined #ruby
[13:43:47] duckpuppy: has joined #ruby
[13:43:47] idefine: has joined #ruby
[13:44:22] chouhoulis: has joined #ruby
[13:45:57] celly: has joined #ruby
[13:48:43] SenpaiSilver: has joined #ruby
[13:49:37] ramortegui: has joined #ruby
[13:50:15] Bloomer: has joined #ruby
[13:51:01] bweston92: has joined #ruby
[13:51:25] millerti: has joined #ruby
[13:52:21] dr3w: has joined #ruby
[13:54:00] ElFerna: has joined #ruby
[13:54:59] stannard: has joined #ruby
[13:55:05] hectortrope: has joined #ruby
[13:55:29] adgtl: has joined #ruby
[13:55:39] adgtl: has joined #ruby
[13:57:00] cornerma1: has joined #ruby
[14:01:10] zanzarel: has joined #ruby
[14:01:37] zanzarel: has left #ruby: ()
[14:04:22] idefine: has joined #ruby
[14:05:04] Kn|t3: has joined #ruby
[14:05:24] yeshacker: has joined #ruby
[14:06:08] the_nick_me: has joined #ruby
[14:06:47] zotherstupidguy: has joined #ruby
[14:06:48] arup_r: has joined #ruby
[14:09:22] PedramT: has joined #ruby
[14:12:41] aryaching: has joined #ruby
[14:14:35] idefine: has joined #ruby
[14:15:22] davejlong: has joined #ruby
[14:16:10] ElFerna: has joined #ruby
[14:17:25] the_nic__: has joined #ruby
[14:18:01] bkxd: has joined #ruby
[14:18:08] iateadonut: has joined #ruby
[14:20:30] Voxxit: has joined #ruby
[14:23:29] BSaboia: has joined #ruby
[14:24:40] idefine: has joined #ruby
[14:27:20] sankaber: has joined #ruby
[14:27:57] djbkd: has joined #ruby
[14:27:58] flori: has joined #ruby
[14:28:13] shanemcd: has joined #ruby
[14:28:19] jokester: has joined #ruby
[14:28:39] babblebre: has joined #ruby
[14:31:36] joonty: has joined #ruby
[14:31:37] krobzaur: has joined #ruby
[14:32:03] ascarter: has joined #ruby
[14:34:16] futilegames: has joined #ruby
[14:34:56] idefine_: has joined #ruby
[14:35:43] chussenot: has joined #ruby
[14:36:33] achamian: has joined #ruby
[14:40:11] shevy: hmm if I have a big hash, is there a simple way to do a hash-to-SQL conversion? such as a standalone .sqlite database?
[14:42:45] adgtl: has joined #ruby
[14:43:24] adgtl: has joined #ruby
[14:43:49] krobzaur: has joined #ruby
[14:45:07] idefine: has joined #ruby
[14:45:08] chouhoulis: has joined #ruby
[14:45:20] freerobby: has joined #ruby
[14:46:17] momomomomo: has joined #ruby
[14:47:02] Rodya_: has joined #ruby
[14:47:28] norc: shevy: hash-to-SQL?
[14:47:48] Encapsulation: has joined #ruby
[14:47:49] norc: You mean like what AR does`?
[14:48:16] norc: If you just want to write out a Hash to a file, use Marhsal.
[14:48:20] norc: Marshal even.
[14:49:21] jcdesimp: has joined #ruby
[14:49:31] stannard: has joined #ruby
[14:50:06] hectortrope: has joined #ruby
[14:52:23] whippythellama: has joined #ruby
[14:52:25] dotix: has joined #ruby
[14:53:18] andywojo: has joined #ruby
[14:53:58] idefine: has joined #ruby
[14:54:56] learnme_: has joined #ruby
[14:57:07] mary5030: has joined #ruby
[14:57:31] cassioscabral: has joined #ruby
[14:58:24] duckpuppy: has joined #ruby
[15:00:14] cassioscabral: has joined #ruby
[15:00:54] symm-: has joined #ruby
[15:02:06] arup_r: has joined #ruby
[15:02:12] blackmesa: has joined #ruby
[15:02:54] davejlong: has joined #ruby
[15:03:33] cassioscabral_: has joined #ruby
[15:04:03] davedev24: has joined #ruby
[15:04:22] PedramT_: has joined #ruby
[15:04:34] arup_r1: has joined #ruby
[15:05:48] n0vo: has joined #ruby
[15:06:53] shanemcd: has joined #ruby
[15:07:04] nettoweb: has joined #ruby
[15:07:05] davedev24: has joined #ruby
[15:08:27] drys: has joined #ruby
[15:08:47] stannard: has joined #ruby
[15:09:05] stannard: has joined #ruby
[15:09:52] shanemcd_: has joined #ruby
[15:10:47] Kn|t3: has joined #ruby
[15:11:29] cassioscabral: has joined #ruby
[15:11:35] krz: has joined #ruby
[15:12:55] djbkd_: has joined #ruby
[15:13:42] idefine: has joined #ruby
[15:14:27] idefine_: has joined #ruby
[15:16:27] jnj: has joined #ruby
[15:18:43] bkxd: has joined #ruby
[15:19:35] bronson: has joined #ruby
[15:21:05] jnj: I'm learning ruby and I'm trying to implement a singly linked list but I'm running issues with my contains? function. For my while loop it checks to see if the current nodes element(elt) is equal to the given elt, and check to see if its not null and if both are true then the cursor moves onto the next element. So if you give it an element that is not contained in the list, then eventually the cursor will become nil so when I check to see if it's element is equal
[15:21:05] jnj: to the given element I get undefined method error
[15:21:41] zapata: has joined #ruby
[15:22:33] idefine: has joined #ruby
[15:22:57] ljarvis: jnj: could you show your code?
[15:23:37] apeiros: norc: not sure what it effectively was. but starting over and not having 2 installations helped.
[15:24:39] ramfjord: has joined #ruby
[15:24:43] jnj: ljarvis: Sure, but also I just fixed it haha. Turned out my while loop checked to see if the cursor's elt was equal to the given elt and then checking if it was nil, when I switched it around it worked
[15:27:32] Kn|t3: has joined #ruby
[15:27:54] jnj: ljarvis: https://gist.github.com/jonathancyr/88d9aa028e92d90610bc
[15:28:16] jnj: feel free to give me any tips, like anything I can do thats better I wanna code in the Ruby way
[15:29:10] karapetyan: has joined #ruby
[15:29:21] adaedra: attr_accessor = attr_reader + attr_writer
[15:29:43] adaedra: You don't need to do reader and writer if you do accessor.
[15:29:44] shanemcd: has joined #ruby
[15:29:54] jnj: adaedra: Ah, ok, thanks!
[15:30:14] adaedra: The extra spaces inside initialize's ()
[15:30:59] adaedra: to_string usually denotes a method that returns a string, not print it.
[15:31:46] mrtomme: has joined #ruby
[15:32:05] ljarvis: also if you're using reading, then I would remove the ivar references in the class. i.e just use head, not @head
[15:32:07] adaedra: You could implement #each to be compatible with Enumerable and have a truly Ruby collection.
[15:32:40] fullofca_: has joined #ruby
[15:33:03] ljarvis: also, I would rename next_elt to next_node
[15:33:19] jnj: Thanks so much for all your input!
[15:33:29] jnj: ljarvis: what do you mean by using reading?
[15:33:36] mustmodify: has joined #ruby
[15:34:01] jnj: adaedra: is #each the same as for each in java? I'm fluent in java so comparing things to java will help me out
[15:34:06] ljarvis: jnj: you refer to head inside your SinglyLinkedList class as @head, but since you defined attr_reader's you can use head without the @
[15:34:11] celly: has joined #ruby
[15:34:21] adaedra: &ri Enumerable#each jnj
[15:34:22] `derpy: No results
[15:34:39] ljarvis: that just relies on each, not implement?
[15:34:50] ljarvis: ri Enumerable would probably do it
[15:35:04] adaedra: &ri Array#each jnj
[15:35:05] `derpy: jnj: http://ruby-doc.org/core-2.2.4/Array.html#method-i-each
[15:35:30] mustmodify: I have medical tests that are graded on a college-four-point-scale. 0 = F, 4 = A. Tests are grouped into sections, and we provide a GPA for each section, and, obviously, a grade. Just realized I'm calculating the average once in javascript and once in Ruby. Anyone have any experience with float math on both? I know that floats suck, but do they suck differently in JS vs Ruby? Could I end up with different averages?
[15:36:14] adaedra: Is it me or the bot that is slow?
[15:36:34] Papierkorb: &ri Array#each
[15:36:34] `derpy: http://ruby-doc.org/core-2.2.4/Array.html#method-i-each
[15:36:42] rgtk: has joined #ruby
[15:37:41] jnj: thanks guys!
[15:38:35] jnj: how would i implement my linked list with each? Should I just switch to using an array or collection instead of the ndoes? Or could I pass the nodes into each?
[15:38:45] jnj: Or should I pass the nodes into a collection?
[15:39:00] adaedra: has joined #ruby
[15:39:58] adaedra: Sorry for the mess -_-
[15:41:12] adaedra: jnj: you should pass each node, one by one
[15:41:58] B1n4r10: has joined #ruby
[15:42:40] adaedra: Each node value, in fact
[15:43:38] StevenXL: has joined #ruby
[15:43:38] StevenXL: has joined #ruby
[15:44:26] ljarvis: jnj: something like this: https://eval.in/489255 probably not how I'd write each if I thought about it properly but you get the idea
[15:44:49] ljarvis: it also means you can just add methods simple like this now: def contains?(value); to_a.include?(value); end
[15:45:12] adaedra: Once you include Enumerable
[15:45:25] jnj: Ah ok, I'll definitely switch to that
[15:45:32] ljarvis: you dont need to actually for to_s, but yeah
[15:45:48] ljarvis: er ignore me
[15:45:53] adaedra: Look at Enumerable doc to see all the methods implemented for you!
[15:45:53] chouhoulis: has joined #ruby
[15:45:57] ljarvis: was thinking of .each.to_a :)
[15:46:28] jnj: ljarvis: I'm still not sure what you meant earlier when you said that if I'm using reading, what is reading?
[15:46:47] ljarvis: jnj: I meant if you're using a reader
[15:46:53] ljarvis: i.e attr_reader or attr_accessor
[15:47:07] ljarvis: sorry, sometimes I type bad
[15:47:24] jnj: OH, ok~
[15:47:30] jnj: it's all good!
[15:48:08] jnj: ljarvis: So I can replace all @head, and @tail with just head, tail?
[15:48:16] gizmore: has joined #ruby
[15:48:24] ljarvis: jnj: yep, except the assignments of course
[15:48:29] jnj: ah, ok!
[15:48:37] jnj: the assignments in the initializer right?
[15:49:40] podman: has joined #ruby
[15:50:26] ruby-lang407: has joined #ruby
[15:51:47] karapetyan: has joined #ruby
[15:51:49] arup_r: has joined #ruby
[15:52:13] karapetyan: has joined #ruby
[15:52:25] jessemcgilallen: has joined #ruby
[15:52:53] atomical: has joined #ruby
[15:52:59] karapetyan: has joined #ruby
[15:53:14] idefine_: has joined #ruby
[15:53:16] jnj: What is a good resource to cover all ruby syntax, and maybe something that does comparisons with java?
[15:53:41] adaedra: there's a cheatsheet somewhere
[15:53:59] karapetyan: has joined #ruby
[15:54:08] adaedra: ?cheatsheet
[15:54:08] ruboto: I don't know anything about cheatsheet
[15:54:14] c355E3B: jnj: http://hyperpolyglot.org/
[15:56:08] ruboto: http://www.zenspider.com/Languages/Ruby/QuickRef.html
[15:56:18] jnj: thanks guys!
[15:57:09] build22_: has joined #ruby
[15:57:12] build22_: has left #ruby: ()
[16:00:30] pawnbox: has joined #ruby
[16:00:53] jnj: Does anyone know a good resource that'll teach you all things ruby but it's geared towards people that already know how to program? I keep on finding tutorials that assume I've never programmed before
[16:00:58] djbkd: has joined #ruby
[16:01:20] ljarvis: jnj: honestly reading code will probably the best thing
[16:01:33] mustmodify: has left #ruby: ()
[16:01:37] adaedra: There's this https://www.ruby-lang.org/en/documentation/ruby-from-other-languages/
[16:01:39] ljarvis: if you have a solid programming background there should be quite little that doesn't make sense
[16:01:40] nunchuck: has joined #ruby
[16:02:40] dhollinger: has joined #ruby
[16:02:42] jnj: Word, I guess I'll go on github and find some good ruby projects
[16:02:45] colegatron: has joined #ruby
[16:03:05] decoponio: has joined #ruby
[16:03:39] ljarvis: then you might only have a handful of questions, of which we can answer :)
[16:04:05] adaedra: sorry, I only answer answers.
[16:04:39] shanemcd: has joined #ruby
[16:07:12] snockerton: has joined #ruby
[16:08:12] duckpuppy: has joined #ruby
[16:08:16] shevy: I question your questions
[16:10:00] arup_r: shevy: Why we have only "monkey" patch, not like a "dog" or "cat" patch etc.. ? :)
[16:10:31] Papierkorb: arup_r: https://de.wikipedia.org/wiki/Infinite-Monkey-Theorem
[16:10:33] arup_r: What is the histroy behind this word ..
[16:10:42] Papierkorb: arup_r: ah sorry https://en.wikipedia.org/wiki/Infinite_monkey_theorem
[16:11:41] adaedra: Papierkorb: Was war das Problem mitt erste Link? :p
[16:12:46] shevy: arup_r yeah no idea, someone must have thought that monkeys patch things
[16:13:05] karapetyan: has joined #ruby
[16:13:24] arup_r: That is very good one liners.. +1 shevy
[16:13:38] shevy: I bet that some monkeys would make for better programmers than some humans would!
[16:14:01] djbkd_: has joined #ruby
[16:14:02] karmatr0n: has joined #ruby
[16:14:24] lacuna: has joined #ruby
[16:16:15] jull: has joined #ruby
[16:19:37] jull: has left #ruby: ()
[16:21:48] jcdesimp: has joined #ruby
[16:23:26] cpup: has joined #ruby
[16:26:09] GinoManWorks: has joined #ruby
[16:27:27] treaki_: has joined #ruby
[16:28:08] harrison_: has joined #ruby
[16:28:23] skooks: has joined #ruby
[16:28:34] rgtk: has joined #ruby
[16:29:16] certainty: has joined #ruby
[16:30:36] havenwood: good mornin'
[16:31:17] adaedra: hi havenwood
[16:31:37] adaedra: ACTION takes havenwood's only arm
[16:33:04] _whitelogger: has joined #ruby
[16:33:18] BSaboia: has joined #ruby
[16:33:27] the_nick_me: has joined #ruby
[16:33:38] voker57: has joined #ruby
[16:33:38] voker57: has joined #ruby
[16:34:00] cassioscabral: has joined #ruby
[16:34:10] JStoker: has joined #ruby
[16:34:55] karapetyan: has joined #ruby
[16:35:18] kobain: has joined #ruby
[16:38:34] kobain: has joined #ruby
[16:39:47] cwong_on_irc: has joined #ruby
[16:39:49] kobain: has joined #ruby
[16:40:45] nertzy: has joined #ruby
[16:41:12] roger_rabbit: has joined #ruby
[16:41:42] Fezzler: has joined #ruby
[16:43:52] chouhoulis: has joined #ruby
[16:44:09] gambl0re: has joined #ruby
[16:44:38] jottr: has joined #ruby
[16:46:06] duckpuppy: has joined #ruby
[16:46:29] saltsa: has joined #ruby
[16:47:16] alphaatom: has joined #ruby
[16:47:28] nkwsy: has joined #ruby
[16:48:28] alphaatom: has joined #ruby
[16:50:23] nateberkopec: has joined #ruby
[16:52:53] inukshuk_: has joined #ruby
[16:53:12] sandstrom: has joined #ruby
[16:53:28] ElFerna: has joined #ruby
[16:53:41] moeabdol: has joined #ruby
[16:53:52] rgtk: has joined #ruby
[16:54:07] andywojo: has joined #ruby
[16:56:19] harrison_: has left #ruby: ("Leaving")
[16:58:43] nkwsy: has joined #ruby
[17:02:40] jgpawletko: has joined #ruby
[17:03:02] dionysus69: has joined #ruby
[17:03:13] synthroid: has joined #ruby
[17:04:29] ruu_: has joined #ruby
[17:05:09] jcdesimp: has joined #ruby
[17:09:12] dhollinger: has joined #ruby
[17:10:20] dhollinger: has joined #ruby
[17:14:06] zapiano: has joined #ruby
[17:14:06] ElFerna: has joined #ruby
[17:14:29] karapety_: has joined #ruby
[17:15:31] IdanM: has joined #ruby
[17:16:05] djbkd_: has joined #ruby
[17:16:29] agit0: has joined #ruby
[17:17:41] cyfr0n: has joined #ruby
[17:18:04] yardenbar: has joined #ruby
[17:19:52] ElFerna: has joined #ruby
[17:20:01] bkxd: has joined #ruby
[17:21:54] bronson: has joined #ruby
[17:22:05] rvchangue: has joined #ruby
[17:22:07] jessemcgilallen: has joined #ruby
[17:22:19] celly: has joined #ruby
[17:24:00] SCHAAP137: has joined #ruby
[17:24:07] rodfersou: has joined #ruby
[17:25:13] amclain: has joined #ruby
[17:26:35] LetItSnow-y: has joined #ruby
[17:26:35] skade: has joined #ruby
[17:26:36] Fire-Dragon-DoL: has joined #ruby
[17:29:27] dr3w: has joined #ruby
[17:30:05] Dimik: has joined #ruby
[17:30:35] karapetyan: has joined #ruby
[17:31:56] certainty: has joined #ruby
[17:34:14] Spami: has joined #ruby
[17:35:53] therealGent: has joined #ruby
[17:36:09] przemoskPL: has joined #ruby
[17:37:07] benlieb: has joined #ruby
[17:37:42] zeroDivisible: has joined #ruby
[17:37:46] Jardayn: has joined #ruby
[17:39:17] shanemcd: has joined #ruby
[17:40:51] centrx: has joined #ruby
[17:40:59] renderful: has joined #ruby
[17:44:35] adgtl: has joined #ruby
[17:44:52] moeabdol: has joined #ruby
[17:45:18] momomomomo: has joined #ruby
[17:47:08] ibouvousaime: has joined #ruby
[17:48:33] gambl0re: has joined #ruby
[17:51:31] agit0: has joined #ruby
[17:51:37] jds: has joined #ruby
[17:54:49] shanemcd_: has joined #ruby
[17:55:39] cpup: has joined #ruby
[17:56:40] sneakerhax: has joined #ruby
[17:56:56] renderful: has joined #ruby
[17:57:06] domypy: has joined #ruby
[17:57:19] eytanfb: has joined #ruby
[17:57:25] domypy: has left #ruby: ()
[17:57:40] Phage-: has left #ruby: ()
[17:58:44] davedev24: has joined #ruby
[18:01:38] adgtl: has joined #ruby
[18:01:51] adgtl: has joined #ruby
[18:01:56] adgtl: has joined #ruby
[18:02:51] bronson: has joined #ruby
[18:02:57] kmckelvi1: has joined #ruby
[18:05:16] jbrhbr: has joined #ruby
[18:06:38] harrison_: has joined #ruby
[18:06:47] hectortrope: has joined #ruby
[18:07:10] harrison_: has left #ruby: ("Leaving")
[18:08:38] ruby-noob: has joined #ruby
[18:10:03] mostlybadfly: has joined #ruby
[18:10:24] dorei: has joined #ruby
[18:10:27] gmci: has joined #ruby
[18:12:29] ruby-noob: I have a set of report classes that essentially follow the interface of building a report (i.e. having a report instance method that returns a hash). Do ruby programmers have an agreed way of making this pattern explicit (via modules or inheritance) or am I not breaking free from my static typing roots?
[18:12:33] jbrhbr: has joined #ruby
[18:14:20] certainty: has joined #ruby
[18:15:03] centrx: has joined #ruby
[18:18:10] Anderson69s: has joined #ruby
[18:19:24] jamto11: has joined #ruby
[18:20:17] davedev24: has joined #ruby
[18:20:42] spider-mario: has joined #ruby
[18:21:05] davedev24: has joined #ruby
[18:22:37] nettoweb: has joined #ruby
[18:24:52] shevy: what "pattern"
[18:27:27] davedev24: has joined #ruby
[18:28:04] ashemark: has joined #ruby
[18:29:42] ibouvousaime: has joined #ruby
[18:32:05] A124: has joined #ruby
[18:32:17] jottr: has joined #ruby
[18:32:35] apeiros: ruby-noob: we don't have patterns to enforce it. we only have patterns to make use of something like that. i.e. cf. Enumerable module which depends on the presence of "each".
[18:33:19] freerobby: has joined #ruby
[18:33:22] colegatron: has joined #ruby
[18:34:14] dotix: has joined #ruby
[18:36:55] Neronfapper: has joined #ruby
[18:37:15] karapetyan: has joined #ruby
[18:39:42] build22: has joined #ruby
[18:39:51] shanemcd: has joined #ruby
[18:40:13] karapetyan: has joined #ruby
[18:41:44] ohaibbq: has joined #ruby
[18:42:16] ico: has joined #ruby
[18:44:15] skade: has joined #ruby
[18:45:13] djbkd_: has joined #ruby
[18:46:41] nkwsy: has joined #ruby
[18:46:54] adgtl: has joined #ruby
[18:46:56] adgtl: has joined #ruby
[18:50:42] bkxd: has joined #ruby
[18:52:30] ruu_: has joined #ruby
[18:53:05] inferno5677: has joined #ruby
[18:54:08] baroquebobcat: has joined #ruby
[18:54:35] slackbotgz: has joined #ruby
[18:54:53] andywojo: has joined #ruby
[18:56:20] hxegon: has joined #ruby
[18:57:47] agentmeerkat: has joined #ruby
[18:58:30] Neronfapper: has joined #ruby
[18:58:41] aryaching: has joined #ruby
[18:59:28] rubynoobie: has joined #ruby
[18:59:50] mistermocha: has joined #ruby
[19:00:30] domgetter: has joined #ruby
[19:00:38] atomical: has joined #ruby
[19:04:24] TheMoonMaster: has joined #ruby
[19:04:42] rikkipitt: has joined #ruby
[19:05:03] ElFerna: has joined #ruby
[19:06:13] Coldblackice: has joined #ruby
[19:06:46] quesker_: has joined #ruby
[19:07:19] jnj: has joined #ruby
[19:07:58] andrew9184: has joined #ruby
[19:08:08] andrew9184: anyone know how I should debug errors with this message: "\xEC" on US-ASCII
[19:08:43] domgetter: havenwood: Using lambdas for transducers is also faster than Cognitect's transducer gem
[19:08:50] shevy: will we make it to a new ruby release in 2 days?
[19:09:09] shevy: andrew9184 that is some encoding related issue isn't it?
[19:10:09] andrew9184: not sure. i???m basically just using rest-client to make api calls
[19:10:26] fullofcaffeine: has joined #ruby
[19:10:31] celly: has joined #ruby
[19:11:31] adaedra: you may want to add a little more context, andrew9184. Libraries used, maybe some code.
[19:12:05] apeiros: andrew9184: us-ascii is the wrong encoding
[19:12:06] jbrhbr: has joined #ruby
[19:12:18] apeiros: andrew9184: us-ascii is only bytes 0x00-0x7f
[19:12:47] adaedra: that looks like it's only a symptom tho.
[19:12:48] apeiros: if you say you use rest-api, then you probably use something json based? then it'd be required to be utf-8.
[19:13:16] andrew9184: ah I see, thanks for the suggestions ??? looking into it
[19:13:26] apeiros: if it's not json based, then make sure you come back with more infos.
[19:15:35] jnj: So I've implemented my linked list using the enumerator interface (makes things so much easier), now I'm trying to traverse the list in reverse order using reverse_each. It prints out the list in reverse order but instead of ending with => nil in irb, it ends with => #<Enumerator: #<SinglyLinkedList:0x007ff06900ec98 @head=#<Node:0x007ff069009360 @element="a", @next_node=#<Node:0x007ff069001890 @element="b", @next_node=nil>>, @tail=#<Node:0x007ff069001890 @element
[19:15:36] jnj: ="b", @next_node=nil>>:each>
[19:15:39] jnj: Why is that?
[19:15:53] crime: has joined #ruby
[19:16:13] adaedra: can you share the revised code?
[19:16:25] certainty: has joined #ruby
[19:16:53] domgetter: jnj: presumably the last thing you enumerated over was the head of the list, not the tail. Your tail is nil
[19:17:10] domgetter: or, your tail's next_node is nil, anyway
[19:17:28] jnj: domgetter: Ah, ok, gotcha
[19:17:33] ico: has joined #ruby
[19:18:07] codecop: has joined #ruby
[19:18:17] baroquebobcat: has joined #ruby
[19:18:20] adaedra: >> [1, 2, 3].reverse_each { |*| }
[19:18:21] ruboto: adaedra # => [1, 2, 3] (https://eval.in/489373)
[19:18:35] Hanmac: shevy: did you hear? Oracle does need to say that their Java is shitty ;P http://www.theregister.co.uk/2015/12/22/ftc_oracle_java/
[19:18:35] adaedra: jnj: see, #reverse_each return the object, not nil.
[19:18:51] domgetter: adaedra: That's the more correct answer :P
[19:19:05] shevy: hanmac well it's "under new management" syndrome so
[19:19:12] karapetyan: has joined #ruby
[19:19:49] jnj: adaedra: https://gist.github.com/jonathancyr/cdbf9ca3a3fda7c037b0
[19:20:05] shevy: hanmac I wonder if they would sue ruby if ruby-people have old ruby versions on their machine as well
[19:20:20] colegatron: has joined #ruby
[19:20:45] domgetter: shevy: Don't give them any ideas
[19:20:46] adaedra: jnj: now that you've defined #each, you can just include Enumerable, you know :p
[19:21:13] jnj: One of my professors this semester said that Oracle is basically 80% lawyers and 20% programmers
[19:21:15] ico: has joined #ruby
[19:21:21] jessemcgilallen: has joined #ruby
[19:21:46] domgetter: jnj: if you include Enumerable, and you define an #each method, ruby will leverage your #each method to do all the other enumerable methods for your class
[19:22:08] jnj: adaedra: Ah, ok. Does that mean I write require enumerable up top? (I'm thinking of include enumerable like an import)
[19:22:16] djbkd: has joined #ruby
[19:22:53] jnj: domgetter: Does that mean that Enumerable's delete will work? Or would I have to implement my own?
[19:22:56] karapetyan: has joined #ruby
[19:23:00] PedramT: has joined #ruby
[19:23:01] duckpuppy: has joined #ruby
[19:23:05] domgetter: jnj: you include it in the class like this: https://gist.github.com/domgetter/3275ba8f981a20545b32
[19:23:19] psye: has joined #ruby
[19:23:39] adaedra: that will import all the methods in the Enumerable module which will rely on your #each
[19:23:58] domgetter: jnj: That's a good question. Lemme go find out
[19:24:07] dagda1: has joined #ruby
[19:24:43] jnj: adaedra: Does this now mean that instead of doing self.each.include, I can just do each.include?
[19:24:45] adaedra: There's no Enumerable#delete?
[19:25:07] adaedra: jnj: you can just do include?
[19:25:53] arup_r: has joined #ruby
[19:26:14] adaedra: Enumerable has no mutating methods, its methods always return a new array
[19:26:16] ta: has joined #ruby
[19:26:42] Lildirt: has joined #ruby
[19:27:04] ta: has joined #ruby
[19:27:12] ico: has joined #ruby
[19:28:09] jnj: adaedra: Ah, ok. But if I still want to have a count function defined for my class, then it should return each.count, right?
[19:28:16] build22: has joined #ruby
[19:28:39] domgetter: jnj Enumerable has count
[19:28:42] adaedra: Bad example I guess, since there's already Enumerable#count.
[19:28:53] radgeRayden: has joined #ruby
[19:29:01] domgetter: jnj: http://ruby-doc.org/core-2.2.3/Enumerable.html
[19:29:05] domgetter: You get all those
[19:29:07] adaedra: What you're doing when using each. something is just delaying, as Enumerator is Enumerable.
[19:29:25] dlitvak: has joined #ruby
[19:29:29] havenwood: domgetter: nice! :)
[19:29:29] jnj: Ah, ok, then do I just call #count?
[19:29:52] domgetter: my_list = SinglyLinkedList.new; my_list.count #=> 0
[19:29:58] jnj: dogmetter: Haha, I feel liked an idiot I did it without the hash and got a ton of errors
[19:30:26] adaedra: All the methods of Enumerable should work. Note that things returning a new collection, like #map, will return an Array, not an instance of your class.
[19:30:27] jnj: Also, just wanted to say thanks for helping me out. You guys are making ruby my new favorite langauge
[19:30:44] domgetter: No problem, I'm glad you're learning :)
[19:30:51] ico: has joined #ruby
[19:31:54] adaedra: jnj: what you're doing here is a 'mix-in': you have methods defined in a module and copy them in your own class.
[19:32:53] jnj: adaedra: So is this basically inheritance then, where Enumerator would be the parent class?
[19:33:06] cassioscabral: has joined #ruby
[19:33:10] jnj: adaedra: Also, do I just call count as #count? It's showing as a comment
[19:33:17] adaedra: Not exactly, as Enumerable (not Enumerator) is a module, so not instantiable
[19:33:20] adaedra: No, you do .count
[19:33:38] adaedra: "#count" means "the instance method count", but you call it with . on an instance
[19:33:42] domgetter: jnj: You can do the same with the Comparable module. I did this with notes on a piano. If you define how two things compare when sorted, then you get a few methods for free.
[19:34:01] jnj: oooh, ok so whenever it'
[19:34:08] jnj: s #count, its really just .count? Gotcha
[19:34:27] crime: # is notation for instance method of that object
[19:34:36] crime: in code, its just a comment
[19:34:46] adaedra: The method String#length is called by doing "string".length
[19:35:02] Danishman: has joined #ruby
[19:35:23] nfk|laptop: has joined #ruby
[19:35:31] momomomomo: has joined #ruby
[19:35:38] blub: its so bad haha
[19:35:39] jbrhbr: jake worth sure does like fixing typos
[19:36:13] jbrhbr: ruby core commits
[19:36:21] duckpuppy: has joined #ruby
[19:37:00] koba: has joined #ruby
[19:37:20] ico: has joined #ruby
[19:38:10] snguyen: has joined #ruby
[19:38:19] jackjackdripper: has joined #ruby
[19:38:27] jackjackdripper1: has joined #ruby
[19:38:28] agit0: has joined #ruby
[19:38:36] jackjackdripper: has joined #ruby
[19:38:48] jackjackdripper1: has joined #ruby
[19:39:16] symm-: has joined #ruby
[19:39:37] ur5us: has joined #ruby
[19:39:59] yqt: has joined #ruby
[19:40:55] blackmesa: has joined #ruby
[19:41:14] jmdade: has joined #ruby
[19:41:29] jnj: adaedra: Since enumerable has no mutating methods, that means that something like #drop would copy my linked list, then drop elements from the copy, but not the actual linked list, correct?
[19:42:17] adaedra: no, just adding the kept elements to a new array and dropping directly the other ones
[19:42:52] unreal_: has joined #ruby
[19:44:37] adaedra: the fact that Enumerable is based on #each means that all its method sees are the values in order
[19:45:17] kadoppe: has joined #ruby
[19:45:33] cschneid_: has joined #ruby
[19:45:57] djbkd_: has joined #ruby
[19:46:25] cschneid_: I am Marshal.loading an object w/ an instance var (a Hash), no custom marshalling logic - any thoughts on why that hash would come back as nil? There's zero chance it was serialized as nil.
[19:46:44] dlitvak: has joined #ruby
[19:46:45] dylanjhoulihan: has joined #ruby
[19:47:27] mbeasley: has joined #ruby
[19:47:36] yfeldblum: has joined #ruby
[19:47:54] mbeasley: has left #ruby: ()
[19:48:38] cschneid_: oh, of course a minute after asking, it appears like an old version of the app is writing a slightly different name out to the file... :-/
[19:49:00] mbeasley: has joined #ruby
[19:50:33] JakFrist: has joined #ruby
[19:50:38] _djbkd: has joined #ruby
[19:51:24] dotix: has joined #ruby
[19:52:27] CihanKaygusuz: has joined #ruby
[19:52:30] synthroid: has joined #ruby
[19:52:54] mbeasley: has joined #ruby
[19:53:13] ico: has joined #ruby
[19:54:33] nateberkopec: has joined #ruby
[19:57:20] ico: has joined #ruby
[19:57:21] djbkd: has joined #ruby
[19:57:51] stannard_: has joined #ruby
[19:58:29] ElFerna: has joined #ruby
[19:58:40] freerobby: has joined #ruby
[19:58:43] jackjackdripper: has joined #ruby
[19:59:17] shanemcd_: has joined #ruby
[19:59:32] eytanfb: has joined #ruby
[20:03:03] JakFrist: has joined #ruby
[20:03:33] baweaver: has joined #ruby
[20:04:30] ico: has joined #ruby
[20:06:53] cyfr0n1: has joined #ruby
[20:07:05] devster31: has joined #ruby
[20:07:31] unreal: has joined #ruby
[20:08:42] Vitor: has joined #ruby
[20:09:02] lemur: has joined #ruby
[20:09:27] ico: has joined #ruby
[20:09:38] CihanKaygusuz: has joined #ruby
[20:09:55] ico: has joined #ruby
[20:10:03] jottr: has joined #ruby
[20:11:09] PedramT: has joined #ruby
[20:12:43] Dimik: has joined #ruby
[20:14:44] emilkarl: has joined #ruby
[20:16:38] lenwood: has joined #ruby
[20:16:40] nfk|laptop: has joined #ruby
[20:16:58] dlitvak: has joined #ruby
[20:17:21] DoubleMalt: has joined #ruby
[20:17:21] domgetter: adaedra: Unless each is defined not to take things in any particular order, like with Sets
[20:19:38] skcin7: has joined #ruby
[20:20:20] Frem: has joined #ruby
[20:20:54] jessemcgilallen: has joined #ruby
[20:21:25] bkxd: has joined #ruby
[20:21:37] aevitas: has joined #ruby
[20:23:04] replay: has joined #ruby
[20:23:33] djbkd: has joined #ruby
[20:23:33] duckpuppy: has joined #ruby
[20:24:14] djbkd: has joined #ruby
[20:25:09] bronson: has joined #ruby
[20:25:38] devbug: has joined #ruby
[20:28:33] dagda1: has joined #ruby
[20:29:12] dlitvak: has joined #ruby
[20:29:22] aevitas: has left #ruby: ()
[20:30:43] eytanfb: has joined #ruby
[20:30:45] kirun: has joined #ruby
[20:31:44] nfk|laptop: has joined #ruby
[20:32:13] Shadyz: has joined #ruby
[20:33:04] akem: has joined #ruby
[20:33:36] allcentury: has joined #ruby
[20:34:15] wsewolod: has joined #ruby
[20:36:39] Hanmac: has joined #ruby
[20:40:31] dnewkerk: has joined #ruby
[20:44:45] Pumukel: has joined #ruby
[20:45:41] atomical: has joined #ruby
[20:47:10] kobain: has joined #ruby
[20:48:31] dlitvak: has joined #ruby
[20:48:38] ico: has joined #ruby
[20:50:47] certainty: has joined #ruby
[20:51:53] dlitvak_: has joined #ruby
[20:53:30] peeja: has joined #ruby
[20:54:34] nfk|laptop: has joined #ruby
[20:54:41] nkwsy: I am parcing data with mechanize/nokogiri and putting it into a csv. I have a few things. how do I remove blank lines from csv? I am parcing like this doc.xpath('//table/tbody/tr').each do |row|
[20:54:44] nkwsy: tarray = []
[20:54:47] nkwsy: row.xpath('td[@class="bodytextsmall"]').each do |cell|
[20:54:50] nkwsy: tarray << cell.text.strip
[20:54:55] nkwsy: sorry for that
[20:55:37] FernandoBasso: has joined #ruby
[20:55:41] andywojo: has joined #ruby
[20:55:59] apeiros: nkwsy: you reset the array on each iteration
[20:56:19] nkwsy: but <tr> is extreamly prevelant which returns like 40 blank lines before my data located at <td class='bodytextsmall'>
[20:56:19] apeiros: ah, you have an inner loop???
[20:56:43] nkwsy: interesting
[20:57:00] ico: has joined #ruby
[20:57:06] apeiros: I'd try to adapt the css, but you can always use .reject to remove rows which are empty
[20:57:45] StevenXL: has joined #ruby
[20:58:12] nkwsy: okay ill try .reject
[20:58:36] shanemcd: has joined #ruby
[20:58:42] celly: has joined #ruby
[20:59:17] dylanjho_: has joined #ruby
[20:59:30] shanemcd_: has joined #ruby
[20:59:30] ico: has joined #ruby
[20:59:31] freerobby: has joined #ruby
[21:02:13] nkwsy: how can I tell I have an inner loop?
[21:02:29] ico: has joined #ruby
[21:03:05] tomphp: has joined #ruby
[21:04:05] ico: has joined #ruby
[21:04:19] shevy: foo.each {|bar| bar.each
[21:05:22] unreal_: has joined #ruby
[21:05:47] agent_white: has joined #ruby
[21:06:15] andywojo: has joined #ruby
[21:06:30] dlitvak: has joined #ruby
[21:07:34] dagda1: has joined #ruby
[21:10:01] bubbys: has joined #ruby
[21:10:18] blackgoat: has joined #ruby
[21:10:52] ruby-lang011: has joined #ruby
[21:11:24] ruby-lang011: testing, can anyone see this?
[21:11:42] adaedra: nobody, ruby-lang011.
[21:13:45] atomical_: has joined #ruby
[21:14:23] AnoHito: has joined #ruby
[21:14:42] akem: has joined #ruby
[21:15:14] baweaver: has joined #ruby
[21:15:28] ruby-lang011: anyone familiar with the odin project?
[21:16:07] lemur: has joined #ruby
[21:17:38] nkwsy: now where would I add the .reject?
[21:17:58] renderful: has joined #ruby
[21:18:17] nkwsy: I put it after tarray << cell.text.strip.reject { |c| c.empty? }
[21:18:35] dotix: has joined #ruby
[21:18:43] dotix_: has joined #ruby
[21:19:36] nkwsy: I also did
[21:19:36] nkwsy: cells = cell.reject { |c| c.empty? }
[21:19:37] nkwsy: tarray << cells.text.strip
[21:19:40] ico: has joined #ruby
[21:20:15] atomical: has joined #ruby
[21:20:20] gizmore: has joined #ruby
[21:20:24] bijjr: has joined #ruby
[21:20:35] bubbys: has joined #ruby
[21:20:54] nertzy: has joined #ruby
[21:21:36] last_staff: has joined #ruby
[21:22:41] blackgoat: has joined #ruby
[21:22:59] shevy: does it work or does it work
[21:23:03] shevy: and - use a pastie
[21:23:10] shevy: cell.reject! will be faster than .reject
[21:25:00] dagda1: has joined #ruby
[21:25:12] kobain: has joined #ruby
[21:25:23] crowell_: has joined #ruby
[21:25:23] nkwsy: it does not work
[21:27:11] nkwsy: tab2.rb:20:in `block (2 levels) in <main>': undefined method `reject' for "9189531900":String (NoMethodError) from /Users/Dood/.gem/ruby/2.2.3/gems/nokogiri-1.6.7/lib/nokogiri/xml/node_set.rb:187:in `block in each' from /Users/Dood/.gem/ruby/2.2.3/gems/nokogiri-1.6.7/lib/nokogiri/xml/node_set.rb:186:in `upto'
[21:27:16] nkwsy: from /Users/Dood/.gem/uby/2.2.3/gems/nokogiri-1.6.7/lib/nokogiri/xml/node_set.rb:186:in `e ach' from tab2.rb:19:in `block in <main>' from /Users/Dood/.gem/ruby/2.2.3/gems/nokogiri-1.6.7/lib/nokogiri/xml/node_set.rb:187:in `block in each' from /Users/Dood/.gem/ruby/2.2.3/gems/nokogiri-1.6.7/lib/nokogiri/xml/node_set.rb:186:in `upto' from /Users/Dood/.gem/ruby/2.2.3/gems/nokogiri-1.6.7/lib/nokogiri/xml/node_set
[21:27:22] nkwsy: .rb:186:in `each' from tab2.rb:17:in `<main>'
[21:27:23] shevy: pastie man
[21:27:23] shanemcd: has joined #ruby
[21:27:25] shevy: not paste
[21:27:49] shevy: you apply .reject onto a string; apply it on your array instead
[21:27:52] nkwsy: I am sorry I do not know what pastie is
[21:28:08] shevy: http://pastie.org/ or https://gist.github.com/
[21:28:33] pwnd_nsfw: has joined #ruby
[21:29:59] nocd: has joined #ruby
[21:30:33] ico: has joined #ruby
[21:30:58] crowell_: has joined #ruby
[21:31:24] renderful: has joined #ruby
[21:31:58] ico: has joined #ruby
[21:32:21] dylanjhoulihan: has joined #ruby
[21:32:28] nateberkopec: has joined #ruby
[21:32:35] Yzguy: has joined #ruby
[21:33:33] nkwsy: http://pastie.org/10648005#
[21:33:48] nkwsy: no error but does not skip lines
[21:34:19] JakFrist: has joined #ruby
[21:34:32] nkwsy: http://pastie.org/10648009
[21:34:39] nkwsy: actually it does fai/
[21:34:50] atomical_: has joined #ruby
[21:35:13] shevy: nkwsy see
[21:35:17] shevy: above on IRC you showed ruby code
[21:35:24] shevy: now you just show some results - but no ruby code
[21:35:44] nkwsy: ruby code got me this result
[21:37:07] build22_: has joined #ruby
[21:37:10] marsjaninzmarsa: has joined #ruby
[21:38:00] nkwsy: my csv that is generated does not have results. this is the errer that it gives me
[21:38:41] shevy: <nkwsy> cells = cell.reject { |c| c.empty? }
[21:38:44] shevy: you showed code earlier
[21:38:47] shevy: you did not show code in the pastie
[21:38:52] shevy: you are not serious
[21:39:06] blackgoat: has joined #ruby
[21:39:16] nkwsy: I changed that after you said apply it to your array
[21:39:27] nkwsy: not string
[21:40:11] ElFerna: has joined #ruby
[21:40:43] baroquebobcat: has joined #ruby
[21:42:11] nateberkopec: has joined #ruby
[21:43:56] thisirs: has joined #ruby
[21:44:30] bijjr: has joined #ruby
[21:45:59] sandstrom: has joined #ruby
[21:47:02] marsjaninzmarsa: has joined #ruby
[21:48:04] moei: has joined #ruby
[21:50:08] bronson: has joined #ruby
[21:51:13] ico: has joined #ruby
[21:51:20] certainty: has joined #ruby
[21:52:03] bubbys: has joined #ruby
[21:54:21] smactive: has joined #ruby
[21:55:27] tectonic: has joined #ruby
[21:56:07] tomphp: has joined #ruby
[21:56:56] jaequery: has joined #ruby
[21:57:31] jbrhbr: has joined #ruby
[21:57:34] mdw: has joined #ruby
[21:57:41] CihanKaygusuz: has joined #ruby
[21:58:59] marr: has joined #ruby
[22:00:43] FooMunki: has joined #ruby
[22:01:28] jgpawletko: has joined #ruby
[22:01:58] jottr: has joined #ruby
[22:03:06] jottr_: has joined #ruby
[22:04:12] shevy: is there a shortcut to check: if hash.has_key? 'foo' or hash.has_key? 'bar' ?
[22:05:22] atomical: has joined #ruby
[22:05:38] djbkd_: has joined #ruby
[22:05:49] sankaber: has joined #ruby
[22:06:29] nkwsy: I am not sure
[22:06:35] Papierkorb: shevy: #include? :P .. but requires more context
[22:07:28] arian0n: shevy, perhaps hash['foo' || 'bar']? so long as you aren't holding falsy values on your hash
[22:07:38] atomical_: has joined #ruby
[22:07:39] shevy: arian0n aha hmm let me think
[22:08:09] bubbys: has joined #ruby
[22:08:14] Papierkorb: >> 'arian0n: ' + ('foo' || 'bar')
[22:08:16] ruboto: Papierkorb # => "arian0n: foo" (https://eval.in/489398)
[22:08:38] dlitvak: has joined #ruby
[22:08:58] [Butch]: has joined #ruby
[22:09:24] bithon: has joined #ruby
[22:10:06] adaedra: shevy: %w[foo bar].any?(&has.method(:has_key?)) # but not really good if you have only two values.
[22:10:17] adaedra: s/has\./hash./
[22:10:48] ico: has joined #ruby
[22:12:49] wildlander: has joined #ruby
[22:13:03] arian0n: >> 'Papierkorb: hmm...? ' + {pi: 3.14, tau: 6.28}[:pi || :tau].to_s
[22:13:04] ruboto: arian0n # => "Papierkorb: hmm...? 3.14" (https://eval.in/489401)
[22:13:40] Papierkorb: Let's hope the engine is smart enough to constant-fold the ||
[22:15:12] bubbys: has joined #ruby
[22:15:14] adaedra: >> 'arian0n: ' + {pi: nil, tau: 6.28}[:pi || :tau].to_s
[22:15:15] ruboto: adaedra # => "arian0n: " (https://eval.in/489402)
[22:15:32] adaedra: the inside of [] gets evaluated first.
[22:16:02] havenwood: shevy: h.fetch(:gah) { h[:bah] }
[22:16:55] arian0n: adaedra, ah
[22:17:16] adaedra: havenwood: that's hash['gah'] || hash['bah'], not really what he wanted?
[22:17:19] ramfjord: has joined #ruby
[22:17:27] gizless: has joined #ruby
[22:17:32] havenwood: adaedra: Guess I read it wrong.
[22:17:37] adaedra: (nvm the symbols)
[22:17:38] havenwood: It's not pretty anyways!
[22:17:55] adaedra: the advantage of %w[].any? is that it's trivial to add/remove cases.
[22:17:56] havenwood: I retract. :)
[22:18:18] ico: has joined #ruby
[22:19:00] nateberkopec: has joined #ruby
[22:19:08] shanemcd: has joined #ruby
[22:19:23] yfeldblum: has joined #ruby
[22:20:17] bijjr: has joined #ruby
[22:20:54] atomical: has joined #ruby
[22:21:01] abronca: has joined #ruby
[22:22:12] shevy: I grew so fond of case x; when 'a','b','cdf',/ghi/
[22:22:21] bkxd: has joined #ruby
[22:22:29] ta: has joined #ruby
[22:22:32] sgambino: has joined #ruby
[22:23:32] Papierkorb: shevy: when String; ftw!
[22:23:39] boorad420: has joined #ruby
[22:23:53] benlieb: has joined #ruby
[22:24:38] minimalism: has joined #ruby
[22:25:30] Cihan_: has joined #ruby
[22:25:36] gagrio: has joined #ruby
[22:25:46] ico_: has joined #ruby
[22:25:53] boorad420: Hi friends, I'm trying to install a somewhat dated rails app, but I'm getting 'make' errors without much description when installing a common gem (json). Gist here: https://gist.github.com/RyanMorgan/dbf9feed77cca1e9aca0 Anyone got any suggestions? I've re-installed xcode and libxml2
[22:25:56] elico: has joined #ruby
[22:27:33] elico: I want to create a 3 digit long number that starts with 001 and end in 999.
[22:27:33] elico: I can use a range 1..999 to get the right number but is there a method to get it padded with 0? or Should I create it by myself?
[22:27:40] minimalism: has joined #ruby
[22:28:07] shevy: elico if you only want '0' you can use rjust and ljust
[22:28:29] shevy: >> '1'.ljust 3,'0'
[22:28:30] ruboto: shevy # => "100" (https://eval.in/489407)
[22:28:37] stu314: has joined #ruby
[22:28:38] shevy: >> '1'.rjust 3,'0'
[22:28:39] ruboto: shevy # => "001" (https://eval.in/489408)
[22:28:41] dorei: elico: there's no point for a number to be padded, its string representation is padded
[22:28:44] alphaatom: has joined #ruby
[22:29:14] elico: dorei: I am using it as a string.. this is the main reason for that but I assumed it would be understood from my question..
[22:29:17] elico: shevy: thanks!!
[22:29:21] ElFerna: has joined #ruby
[22:29:54] elico: shevy: this is what I was looking for!
[22:30:00] havenwood: elico: For example: ('001'..'100').take 3 #=> ["001", "002", "003"]
[22:30:47] Maletor: has joined #ruby
[22:31:10] havenwood: elico: [*'001'..'100']
[22:32:10] elico: havenwood: this is something I was never expecting!!!
[22:32:26] elico: this is great!!
[22:32:38] d5sx43: has joined #ruby
[22:33:04] build22: has joined #ruby
[22:33:52] paha80: has joined #ruby
[22:34:14] gizmore: has joined #ruby
[22:34:34] Cihan: has joined #ruby
[22:34:56] shevy: yeah havenwood knows the naughty tricks
[22:35:23] gizmore|2: has joined #ruby
[22:36:09] eytanfb: has joined #ruby
[22:36:20] elico: shevy: I wrote more then one script in ruby but I always need to learn it back from 0.
[22:36:33] bubbys: has joined #ruby
[22:36:48] shevy: I forget a lot of things as well
[22:36:54] nertzy: has joined #ruby
[22:37:13] shevy: I keep tricks-o-bag I mean bag-o-tricks in some local files for easier access, but the [*'001'..'100'] trick I did not store yet
[22:37:44] jcdesimp: has joined #ruby
[22:37:59] elico: shevy: This is a great idea to store some of the tricks in some place.
[22:37:59] elico: I have a local gitlab so I might use this for that.
[22:38:24] elico: Yes!!!! 600+ links were created!!
[22:38:29] duckpuppy: has joined #ruby
[22:39:29] last_staff: has joined #ruby
[22:40:49] minimalism: has joined #ruby
[22:41:18] bradleyprice: has joined #ruby
[22:42:02] cassioscabral: has joined #ruby
[22:42:02] minimalism: has joined #ruby
[22:42:55] build22_: has joined #ruby
[22:44:15] ledestin: has joined #ruby
[22:44:16] build22: has joined #ruby
[22:44:58] zenlot2: has joined #ruby
[22:45:37] bronson: has joined #ruby
[22:46:50] celly: has joined #ruby
[22:48:09] elico: shevy: the issue was that I need to create a list of links to download and the simplest way is to use gsub and then download them one by one... and they created the nubmers in a 3 digit form.
[22:50:29] dylanjho_: has joined #ruby
[22:52:04] celly: has joined #ruby
[22:52:05] certainty: has joined #ruby
[22:53:55] Eising: hey, what do you call syntax like #map(&:split)?
[22:54:02] qhartman: has joined #ruby
[22:54:40] lemur: shorthand
[22:54:49] lemur: or Symbol#to_proc
[22:55:06] baweaver: every time...
[22:55:10] baweaver: lemur === baweaver
[22:56:10] dylanjhoulihan: has joined #ruby
[22:57:47] dylanjho_: has joined #ruby
[22:58:17] paha80: has joined #ruby
[22:59:03] dylanjho_: has joined #ruby
[23:00:26] dylanjho_: has joined #ruby
[23:00:38] alphaatom: has joined #ruby
[23:01:37] rgtk: has joined #ruby
[23:02:43] pwnd_nsfw: has joined #ruby
[23:03:10] robbyoconnor: has joined #ruby
[23:08:09] robbyoconnor: has joined #ruby
[23:08:16] gizmore: has joined #ruby
[23:09:20] gizless: has joined #ruby
[23:12:25] siddharth: has joined #ruby
[23:12:33] eytanfb: has joined #ruby
[23:12:50] Harry: has joined #ruby
[23:14:37] nertzy: has joined #ruby
[23:14:41] mistermocha: has joined #ruby
[23:15:14] bogn: has joined #ruby
[23:16:21] edwinvdgraaf: has joined #ruby
[23:18:49] al2o3-cr: has joined #ruby
[23:19:39] gizmore: has joined #ruby
[23:21:41] eytanfb: has joined #ruby
[23:22:49] robbyoconnor: has joined #ruby
[23:25:17] dopie: has joined #ruby
[23:26:01] celly: has joined #ruby
[23:26:44] iateadonut: has joined #ruby
[23:26:57] shevy: hmm say you have a string like x = "tioga-1.19.1.gem" but it could also be x = "tioga-1.19.1.tar.xz", is there a reliable way to obtain the last part, in the first case ".gem" but in the second case ".tar.xz" ?
[23:27:14] jbrhbr: has joined #ruby
[23:27:39] houhoulis: has joined #ruby
[23:28:57] grn: has joined #ruby
[23:29:09] xybre: considering some extensions have numbers in them, it's best if you make a list of expected extensions.
[23:33:00] `derpy: has joined #ruby
[23:34:08] ta: has joined #ruby
[23:35:22] boorad420: has joined #ruby
[23:36:07] abronca: has left #ruby: ()
[23:36:51] crdpink: has joined #ruby
[23:37:36] blackmesa: has joined #ruby
[23:38:17] ysz: has joined #ruby
[23:38:20] gizless: has joined #ruby
[23:38:41] shazaum_: has joined #ruby
[23:39:48] StevenXL: has joined #ruby
[23:39:48] StevenXL: has joined #ruby
[23:39:57] al2o3-cr: shevy: probably File.extname if just comparing the two
[23:40:52] ysz: are there that many gems written in C for Ruby as for PHP where that's a norm? I've started learning Ruby after PHP and would appreciate a hint
[23:40:53] dorei: let's say i have an array like ['a', 41, 5, 'b', 41, 'zz', 'd'] , is there a way to split it at 41 so as to have an array like [['a'], [41], [5, 'b'], [41], ['zz', 'd']] ?
[23:41:17] xybre: ysz: there's quite a few, but not a majority
[23:42:15] shevy: al2o3-cr problem is that File.extname will only take the last part so it will return a ".xz", I solved it in a similar way how xybre suggested though, I already have another project that splits into "program_name", and "version_name", so to get the part that comes afterwards, I just have to replace the former two from the full string
[23:42:18] ysz: xybre, If I use rails casually will I step across those? are those required?
[23:42:25] ysz: I hope to avoid that.
[23:42:42] jottr_: has joined #ruby
[23:43:13] shevy: ysz the amount of C hackers using ruby and still writing a lot of C code is somewhat rather low... surely less than 5% of the people here I would say
[23:43:16] Mon_Ouie: the gems to talk with SQLite/MySQL are most often implemented in C (and then there are pure Ruby APIs built on top of them)
[23:43:25] havenwood: dorei: one way: chunk { |e| e == 41 }.map &:last
[23:43:26] VeryBewitching: has joined #ruby
[23:43:54] ysz: thanks gents! now I'm not that afraid :)
[23:43:57] dopie: has joined #ruby
[23:44:08] ysz: xybre, shevy ^^
[23:44:21] duckpuppy: has joined #ruby
[23:44:29] ysz: Mon_Ouie, that makes sense to me.
[23:44:37] dorei: havenwood: that's magic, thanx :)
[23:44:56] xybre: ysz: There's a couple of C gems that are required by Rails IIRC, the #rubyonrails channel might know more.
[23:45:59] Mon_Ouie: slice_when { |x, y| x == 41 || y == 41 } is another solution, not sure it's better
[23:46:06] dopie: has joined #ruby
[23:46:45] tectonic: has joined #ruby
[23:47:22] dopie: has joined #ruby
[23:47:57] shevy: dopie rescue!
[23:48:15] crdpink: has joined #ruby
[23:49:55] grn: has joined #ruby
[23:51:34] dopie: has joined #ruby
[23:52:06] gizmore: has joined #ruby
[23:52:57] bkxd: has joined #ruby
[23:54:44] dlitvak: has joined #ruby
[23:58:03] certainty: has joined #ruby
[23:58:25] rvchangue: has joined #ruby