« Back to channel list

#ruby - 06 November 2017

« Back 1 day Forward 1 day »
[00:00:08] alnewkirk: has joined #ruby
[00:09:10] cam27: has left #ruby: ()
[00:13:46] alnewkirk: has joined #ruby
[00:22:48] alnewkirk: has joined #ruby
[00:27:39] cschneid_: has joined #ruby
[00:29:18] workmad3: has joined #ruby
[00:36:06] def_jam: has joined #ruby
[00:36:11] Hexafox[I]: has joined #ruby
[00:36:24] alnewkirk: has joined #ruby
[00:36:49] eb0t: has joined #ruby
[00:43:34] lucz: has joined #ruby
[00:44:23] lucz: hey folks, how does one install ruby development tools on a mac?
[00:45:31] eb0t: has joined #ruby
[00:45:35] def_jam: has joined #ruby
[00:45:37] Nilium: Which dev tools?
[00:45:41] Nilium: Whoa, whitespace
[00:47:14] cdg: has joined #ruby
[00:48:46] alveric3: has joined #ruby
[00:49:34] lucz: Nilium: I'm trying to install a few things but occasionally get this message: "You have to install development tools first."
[00:50:00] alnewkirk: has joined #ruby
[00:50:16] Nilium: You might need to install Xcode and the command-line tools.
[00:50:35] lucz: Nilium: those are installed
[00:50:39] lucz: Nilium: and updated
[00:50:54] Nilium: And if you run clang, it doesn't ask you to accept a license?
[00:51:01] lucz: Nilium: I can double check they're correct though, is there a command I can run to do that?
[00:51:08] lucz: Nilium: lemme see
[00:51:15] Nilium: And what're you trying to install?
[00:51:39] lucz: Nilium: http://drksephy.github.io/2014/04/09/jekyll/
[00:52:24] lucz: Nilium: clang output: xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
[00:52:58] Nilium: What version of OS X are you on?
[00:53:14] lucz: 10.13.1 (17B48)
[00:53:20] lucz: high sierra
[00:53:30] Nilium: How did you install xcode?
[00:53:49] lucz: That was a while ago, but likely via the app store
[00:53:59] Nilium: How recently have you updated it?
[00:54:07] lucz: I updated it yesterday via the app store
[00:54:24] lucz: oh hang on
[00:54:28] lucz: I may need to run it
[00:54:30] RickHull: what's in Library/blabblah/usr/bin
[00:55:26] ResidentBiscuit: has joined #ruby
[00:56:08] lucz: blahblah?
[00:56:17] RickHull: path/to/usr/bin
[00:57:22] RickHull: /Library/Developer/CommandLineTools/usr/bin
[00:57:39] lucz: ah I see
[00:57:45] RickHull: is clang saying it can't find xcrun in there, or that the xcrun in there is "wrong" ?
[00:57:53] RickHull: or did you figure out your issue?
[00:58:06] Nilium: I'm guessing it needed to do the usual update-components thing
[00:58:24] lucz: hm, that path doesn't exist
[00:58:52] RickHull: two ways to approach it: 1. top down -- what's up with the app store updates or whatever?
[00:58:57] lucz: Yeah I updated the components, still getting the clang error output, I haven't tried running the gem install again though
[00:59:01] RickHull: 2. bottom up -- look at the error message and figure out what's wrong
[00:59:35] lucz: hang on lemme paste you the error output
[01:00:04] RickHull: i'm not an osx person, just giving you some general pointers :)
[01:00:08] RickHull: but I'll take a look
[01:00:10] Nilium: Also, what's returned when you run `which clang`? Should be /usr/bin/clang.
[01:01:11] lucz: http://dpaste.com/328FEVN
[01:01:19] lucz: RickHull: thank you :)
[01:01:49] lucz: Nilium: yeah it's the right path when I run which clang
[01:01:50] Nilium: Also try running `xcode-select --install` and see if reinstalling commandline tools works.
[01:02:36] RickHull: are you still missing xcrun ?
[01:02:55] RickHull: I'd go top down and try to make sure all the normal osx dev tools are happy
[01:03:35] RickHull: if you're still getting errors about missing tools, then try to figure out why your tools are missing ;)
[01:03:36] alnewkirk: has joined #ruby
[01:03:45] Nilium: That's actually harder than it sounds
[01:04:10] RickHull: i was going to suggest the Feynman Problem Solving Method next
[01:04:12] Nilium: Usually just easier to force reinstallation of things.
[01:04:28] RickHull: step 1. write the problem down step 2. think really hard step 3. solve it
[01:04:36] lucz: Okay, it's downloading/installing command line tools. There doesn't seem to be a CommandLineTools directory under /Library/Developer
[01:04:45] lucz: lol RickHull
[01:05:03] Nilium: I like to subsitute #2 with "ask the fairies in the back yard"
[01:05:27] RickHull: sometimes step 3 is formulated as: write down the solution
[01:06:33] RickHull: if you're still not getting the CommandLineTools where expected, then you can search for: why is $X looking for my stuff there? or why isn't $Y putting my stuff there?
[01:06:55] RickHull: but probably the top down / install / update approach will work
[01:07:08] Nilium: In unrelated news, I've been trying to collect more programming / systems books and it turns out they're all really expensive because they're used as textbooks.
[01:07:36] RickHull: i'd think you can get them used cheaply, particularly prior versions
[01:07:36] Nilium: I might have to mug students for their books next.
[01:07:58] Nilium: Latest book was $160 -- found it used for $33, though there aren't a lot of copies of it.
[01:10:57] Nilium: Guessing it's working now?
[01:11:02] lucz: This --> xcode-select --install fixed it
[01:11:07] lucz: Thank youuu!
[01:11:12] Nilium: Coolbeans.
[01:11:49] cdg: has joined #ruby
[01:14:42] ap4y: has joined #ruby
[01:20:49] c0ncealed: has joined #ruby
[01:25:35] eblip: has joined #ruby
[01:25:54] eb0t_: has joined #ruby
[01:26:16] alnewkirk: has joined #ruby
[01:29:36] lucz: has joined #ruby
[01:37:53] shortdudey123: has joined #ruby
[01:38:08] cschneid_: has joined #ruby
[01:41:14] hinbody: has joined #ruby
[01:41:50] PaulCapestany: has joined #ruby
[01:42:06] lucz: has joined #ruby
[01:44:23] jottr: has joined #ruby
[01:45:37] alfiemax: has joined #ruby
[01:47:55] sioux: has joined #ruby
[01:48:06] sioux: i i'm using Debian 9, Apache, MySQL(Mariadb) server, Redmine 3.4.3., ruby 2.3.3p22. When i try install a new pluging, download the plugin redmine_checklists, into /opt/redmine/plugins/, and try " bundle exec rake redmine:plugins:migrate RAILS_ENV=production" show this error: https://pastebin.com/vQz234Ya
[01:48:08] ruby[bot]: sioux: we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/3e7fb264f5ada14ab84880292b6500ce
[01:48:09] ruby[bot]: sioux: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[01:49:32] alnewkirk: has joined #ruby
[01:49:45] JsilverT: has joined #ruby
[01:56:50] danman: has joined #ruby
[02:03:08] benjen: has joined #ruby
[02:03:56] lucz: has joined #ruby
[02:06:03] d^sh: has joined #ruby
[02:06:20] jdawgaz: has joined #ruby
[02:07:19] alnewkirk: has joined #ruby
[02:07:59] cdg: has joined #ruby
[02:13:42] arescorpio: has joined #ruby
[02:17:19] Technodrome: has joined #ruby
[02:19:36] eightlimbed: has joined #ruby
[02:21:04] alnewkirk: has joined #ruby
[02:29:44] workmad3: has joined #ruby
[02:30:12] alnewkirk: has joined #ruby
[02:30:41] lele: has joined #ruby
[02:31:49] eb0t: has joined #ruby
[02:31:59] def_jam: has joined #ruby
[02:35:06] dtzuzu: has joined #ruby
[02:39:56] cdg: has joined #ruby
[02:43:57] alnewkirk: has joined #ruby
[02:45:28] ramfjord: has joined #ruby
[02:50:49] lele: has joined #ruby
[02:53:52] Iambchop: sioux: "gems/activerecord-5.1.2" but redmine 3.4 should be rails 4.2: http://www.redmine.org/projects/redmine/wiki/redmineinstall
[02:54:44] Iambchop: sioux: (alias_method_chain was deprecated then removed in rails 5.x)
[02:54:55] gizmore: has joined #ruby
[02:56:50] Iambchop: sioux: bundle exec rake redmine:plugins:migrate RAILS_ENV=production http://www.redmine.org/projects/redmine/wiki/Plugins
[02:57:46] alnewkirk: has joined #ruby
[02:57:57] sioux: Iambchop: my rails is (Rails 5.1.2)
[02:58:05] cschneid_: has joined #ruby
[02:58:23] sioux: so i need install rails 4.2?
[02:58:38] pb122-two: has joined #ruby
[02:59:18] Iambchop: sioux: I would think the redmine Gemfile would specify rails 4.2
[03:00:25] sioux: Iambchop: i will try install rails 4.2
[03:00:29] Iambchop: yes https://github.com/redmine/redmine/blob/3.4-stable/Gemfile gem "rails", "4.2.8"
[03:01:14] Iambchop: sioux: are you running bundle exec from the redmine directory root?
[03:04:08] d^sh: has joined #ruby
[03:04:28] sioux: Iambchop: yeap
[03:08:03] sioux: Iambchop: i'm installing rails 4.2
[03:09:36] lucz: has joined #ruby
[03:10:20] sioux: Iambchop: i needed uninstall ruby and rails togheter ?
[03:11:28] alnewkirk: has joined #ruby
[03:13:29] Iambchop: from that link 3.4 is compatible with ruby ruby 1.9.3, 2.0.0, 2.1, 2.2, 2.3, 2.4 so your ruby should be ok
[03:14:45] Iambchop: then the bundle install should get the right version of rails
[03:22:14] alfiemax: has joined #ruby
[03:22:50] bruce_lee: has joined #ruby
[03:22:50] bruce_lee: has joined #ruby
[03:23:55] uZiel: has joined #ruby
[03:26:13] jenrzzz: has joined #ruby
[03:26:14] jenrzzz: has joined #ruby
[03:29:42] enterprisey: has joined #ruby
[03:31:07] oetjenj: has joined #ruby
[03:33:05] rhyselsmore: has joined #ruby
[03:34:39] darkmorph: has joined #ruby
[03:37:10] cschneid_: has joined #ruby
[03:43:35] alnewkirk: has joined #ruby
[03:45:30] jottr: has joined #ruby
[03:52:10] Hanmac: has joined #ruby
[03:52:48] alnewkirk: has joined #ruby
[03:53:27] eightlimbed: has joined #ruby
[03:58:56] sioux: Iambchop: if i run ruby -v, show ruby 4.2, but when i run bundle install, make show this list: https://gist.github.com/anonymous/527154f6da91bf6efeb4b0399fbbd1c8 and in this list show ruby 5.1.
[03:59:19] FahmeF: has joined #ruby
[04:03:44] jrafanie: has joined #ruby
[04:06:30] alnewkirk: has joined #ruby
[04:11:09] mikecmpbll: has joined #ruby
[04:11:51] cdg: has joined #ruby
[04:15:42] alnewkirk: has joined #ruby
[04:18:40] lucz: has joined #ruby
[04:19:27] lucz: has joined #ruby
[04:20:14] lucz: has joined #ruby
[04:21:09] lucz: has joined #ruby
[04:21:48] lucz: has joined #ruby
[04:22:36] lucz: has joined #ruby
[04:23:23] lucz: has joined #ruby
[04:24:10] lucz: has joined #ruby
[04:24:51] alnewkirk: has joined #ruby
[04:24:57] lucz: has joined #ruby
[04:25:45] lucz: has joined #ruby
[04:26:32] lucz: has joined #ruby
[04:27:09] growp: has joined #ruby
[04:27:19] lucz: has joined #ruby
[04:27:19] growp: How many feet are in a gallon?
[04:28:06] lucz: has joined #ruby
[04:28:48] Technodrome: has joined #ruby
[04:28:53] lucz: has joined #ruby
[04:29:40] lucz: has joined #ruby
[04:29:51] PaulCapestany: has joined #ruby
[04:30:18] workmad3: has joined #ruby
[04:30:27] lucz: has joined #ruby
[04:30:52] guacamole: has joined #ruby
[04:36:25] weaksauce: has joined #ruby
[04:38:39] alnewkirk: has joined #ruby
[04:43:20] gix: has joined #ruby
[04:47:51] al2o3-cr: has joined #ruby
[04:51:57] dionysus69: has joined #ruby
[04:52:21] alnewkirk: has joined #ruby
[04:52:50] ramfjord: has joined #ruby
[04:54:33] SteenJobs: has joined #ruby
[04:57:38] milardovich: has joined #ruby
[04:58:50] Technodrome: has joined #ruby
[05:04:26] ogres: has joined #ruby
[05:04:43] iamarun: has joined #ruby
[05:04:56] mson: has joined #ruby
[05:06:41] jrabe: has joined #ruby
[05:11:13] Technodrome: has joined #ruby
[05:15:14] alnewkirk: has joined #ruby
[05:28:59] alnewkirk: has joined #ruby
[05:32:34] jackjackdripper: has joined #ruby
[05:38:15] alnewkirk: has joined #ruby
[05:38:17] cschneid_: has joined #ruby
[05:39:15] lucz: has joined #ruby
[05:40:35] ur5us: has joined #ruby
[05:43:47] k3rn31: has joined #ruby
[05:46:20] jottr: has joined #ruby
[05:52:00] alnewkirk: has joined #ruby
[06:03:15] aupadhye: has joined #ruby
[06:05:43] alnewkirk: has joined #ruby
[06:10:15] enterprisey: has joined #ruby
[06:12:32] mattp__: has joined #ruby
[06:14:25] chaos95_: has joined #ruby
[06:14:37] David_H_Smith: has joined #ruby
[06:15:29] tcopeland: has joined #ruby
[06:17:20] Gadgetoid: has joined #ruby
[06:17:33] canton7: has joined #ruby
[06:17:34] bokayio: has joined #ruby
[06:17:37] gix: has joined #ruby
[06:17:44] alfiemax: has joined #ruby
[06:21:19] erlend: has joined #ruby
[06:22:41] dionysus69: has joined #ruby
[06:23:16] mjolnird: has joined #ruby
[06:24:04] alnewkirk: has joined #ruby
[06:24:20] ur5us: has joined #ruby
[06:25:52] atmosx: has joined #ruby
[06:26:59] anisha: has joined #ruby
[06:29:29] alfiemax: has joined #ruby
[06:31:59] Gadgetoid: has joined #ruby
[06:32:09] solos: has joined #ruby
[06:32:59] konsolebox: has joined #ruby
[06:34:09] clamstar: has joined #ruby
[06:34:59] noodle: has joined #ruby
[06:36:45] bokayio: has joined #ruby
[06:36:45] InternetFriend: has joined #ruby
[06:37:01] A124: has joined #ruby
[06:37:14] shortdudey123: has joined #ruby
[06:37:23] funnel: has joined #ruby
[06:37:48] alnewkirk: has joined #ruby
[06:39:29] ahrs: has joined #ruby
[06:40:12] veeti: has joined #ruby
[06:40:21] aspiers: has joined #ruby
[06:41:51] biberu: has joined #ruby
[06:44:20] ur5us: has joined #ruby
[06:45:49] milardovich: has joined #ruby
[06:46:13] rrichardsr3: has joined #ruby
[06:52:54] tao_: has joined #ruby
[06:54:23] ta: has joined #ruby
[06:56:09] alnewkirk: has joined #ruby
[06:57:38] reber: has joined #ruby
[07:01:37] lele: has joined #ruby
[07:07:47] ur5us: has joined #ruby
[07:07:58] alex``: has joined #ruby
[07:11:59] David_H_Smith: has joined #ruby
[07:11:59] JsilverT: has joined #ruby
[07:11:59] nowhereman: has joined #ruby
[07:11:59] coderphive: has joined #ruby
[07:11:59] Guest76467: has joined #ruby
[07:11:59] Guest57943: has joined #ruby
[07:11:59] iNs: has joined #ruby
[07:11:59] cosimo_: has joined #ruby
[07:11:59] Guest31297: has joined #ruby
[07:11:59] mahlon_: has joined #ruby
[07:12:00] nicesignal: has joined #ruby
[07:12:00] Sembei: has joined #ruby
[07:12:00] kies: has joined #ruby
[07:12:00] romain_t: has joined #ruby
[07:12:00] hfp_work: has joined #ruby
[07:12:00] TheRealMattM: has joined #ruby
[07:12:00] heinrich5991: has joined #ruby
[07:12:00] cgfbee: has joined #ruby
[07:12:00] biox-: has joined #ruby
[07:12:00] fuzzyhorns: has joined #ruby
[07:12:00] Axsuul: has joined #ruby
[07:12:00] leonthemisfit: has joined #ruby
[07:12:00] kenichi: has joined #ruby
[07:12:00] irick: has joined #ruby
[07:12:00] Fridtjof: has joined #ruby
[07:12:00] waveprop: has joined #ruby
[07:12:00] epochwolf: has joined #ruby
[07:12:00] nickjj: has joined #ruby
[07:12:00] cajone: has joined #ruby
[07:12:00] flori: has joined #ruby
[07:12:00] miah: has joined #ruby
[07:12:00] iszak: has joined #ruby
[07:12:00] mistym: has joined #ruby
[07:12:01] jnollette: has joined #ruby
[07:12:01] hays: has joined #ruby
[07:12:01] Kilo`byte: has joined #ruby
[07:12:01] bhaak: has joined #ruby
[07:12:01] dminuoso: has joined #ruby
[07:12:01] olblak: has joined #ruby
[07:12:01] shaman42: has joined #ruby
[07:12:01] Archrover: has joined #ruby
[07:12:01] zenspider: has joined #ruby
[07:12:01] ged: has joined #ruby
[07:13:20] Archrover: has joined #ruby
[07:13:25] iNs: has joined #ruby
[07:13:47] TheRealMattM: has joined #ruby
[07:13:49] Axsuul: has joined #ruby
[07:14:21] nicesignal: has joined #ruby
[07:14:24] HTTP_____GK1wmSU: has joined #ruby
[07:14:26] Sembei: has joined #ruby
[07:16:06] EXCHGR: has joined #ruby
[07:17:15] rrichard_: has joined #ruby
[07:17:35] HTTP_____GK1wmSU: has left #ruby: ()
[07:18:45] majoh_: has joined #ruby
[07:19:18] minimalism: has joined #ruby
[07:19:26] heinrich5991: has joined #ruby
[07:19:36] cgfbee: has joined #ruby
[07:21:20] romain_t: has joined #ruby
[07:22:50] oetjenj: has joined #ruby
[07:23:15] snickers: has joined #ruby
[07:23:18] bokayio: has joined #ruby
[07:24:49] quobo: has joined #ruby
[07:27:49] anisha: has joined #ruby
[07:29:22] ur5us: has joined #ruby
[07:31:39] ur5us: has joined #ruby
[07:32:43] oetjenj: has joined #ruby
[07:46:58] mtkd: has joined #ruby
[07:47:20] r3QuiEm_cL: has joined #ruby
[07:47:56] jottr: has joined #ruby
[07:50:06] ^mtkd: has joined #ruby
[07:53:39] anas: has joined #ruby
[07:56:03] conta: has joined #ruby
[07:57:18] lucz: has joined #ruby
[07:57:45] ramfjord: has joined #ruby
[08:03:34] ldepandis: has joined #ruby
[08:06:24] dopie: has joined #ruby
[08:06:40] r3QuiEm_cL: has joined #ruby
[08:09:34] r3QuiEm_cL: has joined #ruby
[08:20:10] claudiuinberlin: has joined #ruby
[08:21:14] feal: has joined #ruby
[08:23:19] ur5us: has joined #ruby
[08:24:10] tomphp: has joined #ruby
[08:26:24] aupadhye: has joined #ruby
[08:27:59] ta: has joined #ruby
[08:29:06] mark_66: has joined #ruby
[08:29:21] aufi: has joined #ruby
[08:31:06] vondruch: has joined #ruby
[08:31:12] workmad3: has joined #ruby
[08:31:34] mikecmpbll: has joined #ruby
[08:34:04] vondruch: has joined #ruby
[08:34:05] milardovich: has joined #ruby
[08:34:12] MyMind: has joined #ruby
[08:38:30] ur5us: has joined #ruby
[08:40:23] charliesome: has joined #ruby
[08:41:36] InfinityFye: has joined #ruby
[08:43:05] Fraeon: has joined #ruby
[08:46:15] Fraeon: has joined #ruby
[08:47:34] alfiemax: has joined #ruby
[08:51:34] ramfjord: has joined #ruby
[08:51:39] Fraeon: has joined #ruby
[08:53:25] jottr: has joined #ruby
[08:53:51] dminuoso: baweaver, havenwood: https://gist.github.com/dminuoso/07827d599de13e004be2007ad1a65074
[08:53:57] dminuoso: Van Laarhoven Lenses, Ruby-style.
[08:54:00] dinfuehr: has joined #ruby
[08:54:32] dminuoso: That auto-currying method style is really useful.
[09:00:28] jidar: has joined #ruby
[09:01:48] Lyfe_: has joined #ruby
[09:02:38] mikecmpbll: has joined #ruby
[09:05:38] mim1k: has joined #ruby
[09:08:04] Silthias: has joined #ruby
[09:08:42] rabajaj: has joined #ruby
[09:13:07] burgestrand: has joined #ruby
[09:13:13] andikr: has joined #ruby
[09:13:46] apeiros: has joined #ruby
[09:15:35] Tagami[m]: has joined #ruby
[09:19:43] dminuoso: Im not entirely sure yet why they dont compose, must be some subtle bug. :(
[09:20:15] cdg: has joined #ruby
[09:31:12] r3QuiEm_cL: has joined #ruby
[09:34:02] hs366: has joined #ruby
[09:39:23] kapil___: has joined #ruby
[09:39:46] rippa: has joined #ruby
[09:40:58] dminuoso: Next up I should write some traversal optics, this is truly fun.
[09:41:00] rahul_bajaj: has joined #ruby
[09:41:51] def_jam: has joined #ruby
[09:43:00] shortdudey123: has joined #ruby
[09:43:16] eb0t_: has joined #ruby
[09:43:42] Tagami[m]: has joined #ruby
[09:45:43] enterprisey: has joined #ruby
[09:47:18] burgestrand: has joined #ruby
[09:48:11] iamarun: has joined #ruby
[09:48:51] lucz: has joined #ruby
[09:50:15] Serpent7776: has joined #ruby
[09:54:25] tomphp: has joined #ruby
[09:54:57] Beams: has joined #ruby
[09:56:20] rabajaj: has joined #ruby
[09:59:15] r3QuiEm_cL: has joined #ruby
[10:07:18] mim1k_: has joined #ruby
[10:07:38] aviraldg: has joined #ruby
[10:07:39] Hanma[m]: has joined #ruby
[10:07:39] lasenna[m]: has joined #ruby
[10:07:39] M107262[m]: has joined #ruby
[10:07:39] jonjits[m]: has joined #ruby
[10:07:39] dtcristo: has joined #ruby
[10:07:40] watzon: has joined #ruby
[10:07:40] yana[m]: has joined #ruby
[10:07:40] torarne: has joined #ruby
[10:07:40] astronavt[m]: has joined #ruby
[10:07:40] zalipuha[m]: has joined #ruby
[10:07:40] itmerc[m]: has joined #ruby
[10:07:40] Orbixx[m]: has joined #ruby
[10:07:40] haylon: has joined #ruby
[10:07:41] KevinMGranger: has joined #ruby
[10:07:41] Giphy[m]: has joined #ruby
[10:07:41] turt2live: has joined #ruby
[10:07:41] dman[m]: has joined #ruby
[10:07:47] velu_aon[m]: has joined #ruby
[10:07:47] Matt[m]2: has joined #ruby
[10:07:47] aagdbl[m]: has joined #ruby
[10:07:48] gokul_mr[m]: has joined #ruby
[10:07:48] kua[m]: has joined #ruby
[10:09:22] ur5us: has joined #ruby
[10:11:28] workmad3: has joined #ruby
[10:12:41] Devalo: has joined #ruby
[10:14:13] snickers: has joined #ruby
[10:15:35] ferr: has joined #ruby
[10:19:02] jaruga: has joined #ruby
[10:20:29] JsilverT: i install ruby, rails with rbenv
[10:21:07] JsilverT: every used rails, i must sourc ~/.zshrc, if not rails dont show. How to fix?
[10:23:23] ur5us: has joined #ruby
[10:24:18] sneep: Are you using zsh?
[10:25:44] alnewkirk: has joined #ruby
[10:26:17] adlerdias: has joined #ruby
[10:28:34] JsilverT: yes, i use zsh
[10:39:27] ludova: has joined #ruby
[10:41:38] konsolebox: has joined #ruby
[10:41:53] ldnunes: has joined #ruby
[10:43:26] kristofferR: has joined #ruby
[10:49:51] ludova_: has joined #ruby
[10:54:41] HTTP_____GK1wmSU: has joined #ruby
[10:56:14] HTTP_____GK1wmSU: has left #ruby: ()
[11:00:47] HTTP_____GK1wmSU: has joined #ruby
[11:02:15] alex``: has joined #ruby
[11:03:43] anisha: has joined #ruby
[11:03:58] HTTP_____GK1wmSU: has left #ruby: ()
[11:07:28] ta: has joined #ruby
[11:10:08] anas: has joined #ruby
[11:10:46] claudiuinberlin: has joined #ruby
[11:12:13] ramfjord: has joined #ruby
[11:14:11] tvw: has joined #ruby
[11:16:34] HTTP_____GK1wmSU: has joined #ruby
[11:19:11] TvL: has joined #ruby
[11:19:44] HTTP_____GK1wmSU: has left #ruby: ()
[11:22:47] alfiemax: has joined #ruby
[11:24:08] anisha: has joined #ruby
[11:24:17] r3QuiEm_cL: has joined #ruby
[11:25:31] DrCode: has joined #ruby
[11:36:47] tlaxkit: has joined #ruby
[11:38:18] milardovich: has joined #ruby
[11:40:10] aupadhye: has joined #ruby
[11:42:33] HTTP_____GK1wmSU: has joined #ruby
[11:43:01] TvL: has joined #ruby
[11:44:17] Psybur: has joined #ruby
[11:45:04] HTTP_____GK1wmSU: has left #ruby: ()
[11:47:37] mostlybadfly: has joined #ruby
[11:54:42] lucz: has joined #ruby
[12:00:42] jdawgaz: has joined #ruby
[12:01:03] tvw: has joined #ruby
[12:03:14] milardovich: has joined #ruby
[12:14:17] troulouliou_div2: has joined #ruby
[12:15:41] robert_: has joined #ruby
[12:15:56] robert_: i wish to learn ruby and rails
[12:16:25] Guest44850: i have just a few knowledges on html/css and shell scripting
[12:16:31] Guest44850: what do you advice me ?
[12:17:06] blackbaba: has joined #ruby
[12:18:45] aupadhye: has joined #ruby
[12:18:56] Guest44850: has left #ruby: ()
[12:22:14] blackbaba: has joined #ruby
[12:27:48] marr: has joined #ruby
[12:30:51] milardov_: has joined #ruby
[12:38:38] noizex: hmm.. what's the most "Rubish" way to make sure that the object passed to some generic method is the right one?
[12:38:49] noizex: (note, not rubbish though)
[12:39:04] noizex: is checking for respond_to? on every corner make sense?
[12:39:30] creat: has joined #ruby
[12:40:19] tcopeland: has joined #ruby
[12:41:38] ta: has joined #ruby
[12:42:15] mikecmpbll: why are you trying to check?
[12:42:51] hahuang65: has joined #ruby
[12:44:00] r3QuiEm_cL: has joined #ruby
[12:44:02] mikecmpbll: it's not typical to check an object's capabilities if that method only handles one set of capabilities, if the object doesn't meet the expectations of the method you'll get an exception.
[12:44:14] darkmorph: has joined #ruby
[12:45:43] mson: has joined #ruby
[12:46:22] dkam__: has joined #ruby
[12:46:40] faces: has joined #ruby
[12:49:54] matthewd: +1 the most rubyish way to do that is not to do that
[12:50:56] Iambchop: sioux: looks like you're in "/opt/redmine/plugins" but should be in "/opt/redmine" e.g. https://www.redmineup.com/pages/plugins/agile/installation
[12:53:24] blackbaba: has joined #ruby
[12:54:27] Sylario: has joined #ruby
[12:56:36] nofxx: has joined #ruby
[13:00:23] shinnya: has joined #ruby
[13:01:30] synthroid: has joined #ruby
[13:01:39] GodFather: has joined #ruby
[13:01:51] jphase: has joined #ruby
[13:02:59] noizex: so we just push that weight on the caller
[13:03:14] noizex: sounds fine to me, as it becomes madness if you start checking for these things
[13:04:07] jrafanie: has joined #ruby
[13:05:01] dminuoso: noizex: For what its worth, there's a library called `rdl` that gives you type inference based static typing.
[13:05:35] ramfjord: has joined #ruby
[13:05:40] noizex: hehe didn't know about it, thanks
[13:05:49] cschneid_: has joined #ruby
[13:05:57] noizex: won't be using it but interesting to see this in Ruby
[13:06:00] dminuoso: (Well its mixed dynamic and static even)
[13:06:09] dminuoso: I had that exact same thought. ;-)
[13:06:15] noizex: to be honest I liked Ruby 12 years ago for small apps, now I ended up working for 500k line of code project
[13:06:21] noizex: and I'm just terrified
[13:06:36] noizex: I can't reason about this code at all it would seem
[13:06:38] eb0t: has joined #ruby
[13:06:41] eblip: has joined #ruby
[13:09:01] dminuoso: noizex: I've had a major ruby break that lasted for maybe 9 months, in which I started to learn JS with Flow and Haskell. It was very difficult to return to this dynamic and duck-typed environment. :(
[13:10:40] matthewd: dminuoso: We've noticed :trollface:
[13:11:30] dminuoso: matthewd: What can I say. Have you seen my take on van Laarhoven lenses earlier? :P
[13:12:12] dminuoso: I even changed all camelCase to snake_case because you made fun of me the last time.
[13:12:12] milardovich: has joined #ruby
[13:12:35] matthewd: \o/ success
[13:13:34] cabotto: has joined #ruby
[13:15:50] alfiemax: has joined #ruby
[13:15:58] matthewd: dminuoso: class Module; def spicy_method(name, &body); define_method(name) {|*args| body.curry[*args] }; end; end
[13:16:22] dminuoso: Mmmm, oh yeah. That one was too obvious. :P
[13:16:31] dminuoso: I love the name.
[13:19:48] matthewd: class Module; def spicy_method(name, &body); body = body.curry; define_method(name) {|*args| body[*args] }; end; end
[13:19:52] matthewd: Save an allocation ¯\_(ツ)_/¯
[13:21:13] ramfjord: has joined #ruby
[13:21:27] tsglove: has joined #ruby
[13:21:54] alfiemax: has joined #ruby
[13:24:03] doublyx: has joined #ruby
[13:24:07] colstrom: has joined #ruby
[13:24:08] vayan: has joined #ruby
[13:24:11] pfg: has joined #ruby
[13:24:12] avdi: has joined #ruby
[13:24:14] stephenh: has joined #ruby
[13:24:14] t-richards: has joined #ruby
[13:24:15] andywojo: has joined #ruby
[13:24:18] craysiii: has joined #ruby
[13:24:18] jxf: has joined #ruby
[13:24:24] KnownSyntax: has joined #ruby
[13:24:51] Meow-J: has joined #ruby
[13:28:44] Axsuul: has joined #ruby
[13:28:49] friday: has joined #ruby
[13:30:09] dminuoso: matthewd: That just introduces the interesting problem of turning that proc into a lambda.
[13:30:19] dopie: has joined #ruby
[13:30:28] dminuoso: I remember seeing some weird not ideal hacks on SO about this topic.
[13:31:32] dminuoso: Oh wait! I know how to fiddle. Surely being a lambda is just a matter of flipping a bit.
[13:37:39] dtzuzu: has joined #ruby
[13:38:28] alfiemax: has joined #ruby
[13:38:31] selim: has joined #ruby
[13:38:43] dkam__: has joined #ruby
[13:41:37] ramfjord: has joined #ruby
[13:48:45] jphase: has joined #ruby
[13:49:09] mensvaga: has joined #ruby
[13:52:01] alfiemax: has joined #ruby
[13:53:29] cabotto: has joined #ruby
[13:53:35] milardov_: has joined #ruby
[13:53:56] lucz: has joined #ruby
[13:54:36] tomphp: has joined #ruby
[13:57:13] karapetyan: has joined #ruby
[13:57:16] ramfjord: has joined #ruby
[14:00:45] alnewkirk: has joined #ruby
[14:01:36] alex``: has joined #ruby
[14:05:02] milardovich: has joined #ruby
[14:05:17] milardovich: has joined #ruby
[14:07:06] jphase: has joined #ruby
[14:07:51] cdg: has joined #ruby
[14:14:32] conta: has joined #ruby
[14:15:18] jottr: has joined #ruby
[14:16:29] Devalo: has joined #ruby
[14:18:41] bmurt: has joined #ruby
[14:18:50] sucks: has joined #ruby
[14:23:07] apparition: has joined #ruby
[14:23:14] alan_w: has joined #ruby
[14:27:46] Psybur: has joined #ruby
[14:28:20] Devalo: has joined #ruby
[14:32:35] ramfjord: has joined #ruby
[14:34:27] DLSteve_: has joined #ruby
[14:34:58] milardov_: has joined #ruby
[14:36:18] oleo: has joined #ruby
[14:39:02] tomphp: has joined #ruby
[14:45:42] jackjackdripper: has joined #ruby
[14:46:49] lamduh: has joined #ruby
[14:48:03] lamdah: has joined #ruby
[14:48:16] ramfjord: has joined #ruby
[14:49:54] netherwolfe: has joined #ruby
[14:53:41] InfinityFye: has joined #ruby
[14:53:54] PaulCape_: has joined #ruby
[14:53:59] safetypin: has joined #ruby
[14:54:47] lucz: has joined #ruby
[15:01:24] johno84: has joined #ruby
[15:02:19] jrafanie: has joined #ruby
[15:06:31] Rapture: has joined #ruby
[15:06:51] jackjackdripper: has joined #ruby
[15:10:38] Silox|: has joined #ruby
[15:13:36] Devalo: has joined #ruby
[15:16:11] milardovich: has joined #ruby
[15:20:27] chouhoulis: has joined #ruby
[15:21:02] zipkid: has joined #ruby
[15:22:17] nadir: has joined #ruby
[15:24:29] wogi: has joined #ruby
[15:28:44] eclm: has joined #ruby
[15:33:29] brw: has joined #ruby
[15:33:45] Diogo: has joined #ruby
[15:36:29] tomphp: has joined #ruby
[15:36:49] bmurt: has joined #ruby
[15:37:54] ramfjord: has joined #ruby
[15:37:55] brw_: has joined #ruby
[15:40:13] troys: has joined #ruby
[15:41:06] cdg: has joined #ruby
[15:42:05] chouhoulis: has joined #ruby
[15:44:38] lucz: has joined #ruby
[15:45:16] jrafanie: has joined #ruby
[15:46:18] lucz: has joined #ruby
[15:47:41] bdonnahue1: has joined #ruby
[15:47:47] cschneid_: has joined #ruby
[15:51:18] bdonnahue: has joined #ruby
[15:53:26] ramfjord: has joined #ruby
[15:53:53] lacour: has joined #ruby
[15:57:35] milardov_: has joined #ruby
[16:02:03] synthroid: has joined #ruby
[16:02:44] aufi: has joined #ruby
[16:03:07] chouhoulis: has joined #ruby
[16:03:27] jrafanie_: has joined #ruby
[16:05:51] brw: has joined #ruby
[16:06:44] brw_: has joined #ruby
[16:07:12] synthroid: has joined #ruby
[16:08:32] bdonnahue: has joined #ruby
[16:19:50] brw: has joined #ruby
[16:20:19] uZiel: has joined #ruby
[16:21:56] rfoust: has joined #ruby
[16:22:27] Papierkorb: has joined #ruby
[16:23:15] conta: has joined #ruby
[16:23:28] lucz: has joined #ruby
[16:26:42] chouhoul_: has joined #ruby
[16:26:54] dionysus69: has joined #ruby
[16:27:27] Sammichmaker: has joined #ruby
[16:27:27] Sammichmaker: has joined #ruby
[16:27:50] lucz: has joined #ruby
[16:29:42] alfiemax: has joined #ruby
[16:31:08] micalexander_: has joined #ruby
[16:31:22] micalexander__: has joined #ruby
[16:31:41] jackjackdripper: has joined #ruby
[16:32:41] alfiemax: has joined #ruby
[16:33:38] uZiel: has joined #ruby
[16:33:45] lucz: has joined #ruby
[16:37:57] cagomez: has joined #ruby
[16:39:04] milardovich: has joined #ruby
[16:41:06] kculpis: has joined #ruby
[16:44:19] lucz: has joined #ruby
[16:44:59] lucz: has joined #ruby
[16:45:29] lucz: has joined #ruby
[16:46:19] konsolebox: has joined #ruby
[16:47:58] marr: has joined #ruby
[16:49:20] HTTP_____GK1wmSU: has joined #ruby
[16:50:44] cdg: has joined #ruby
[16:50:55] HTTP_____GK1wmSU: has joined #ruby
[16:51:10] gheegh: has joined #ruby
[16:51:54] alfiemax_: has joined #ruby
[16:51:56] cdg_: has joined #ruby
[16:52:34] HTTP_____GK1wmSU: has joined #ruby
[16:53:17] jottr_: has joined #ruby
[16:55:01] milardovich: has joined #ruby
[16:55:06] HTTP_____GK1wmSU: has joined #ruby
[16:55:07] jottr__: has joined #ruby
[16:56:37] TinkerTyper: has joined #ruby
[16:57:30] cdg: has joined #ruby
[16:57:59] marxarelli: has joined #ruby
[16:58:29] HTTP_____GK1wmSU: has joined #ruby
[16:59:45] banisterfiend: has joined #ruby
[16:59:56] banisterfiend: has joined #ruby
[17:02:04] HTTP_____GK1wmSU: has joined #ruby
[17:02:15] Xiti: has joined #ruby
[17:04:14] zanoni: has joined #ruby
[17:07:37] c0ncealed: has joined #ruby
[17:08:59] karapetyan: has joined #ruby
[17:13:52] guardian: has joined #ruby
[17:18:14] conta1: has joined #ruby
[17:18:27] guardian: hello, I'm looking for an elegant/idiomatic of converting an array of strings and hashes into another array, where flat strings are grouped. Since I'm not sure how to express it I created a paste: https://paste.debian.net/994433/
[17:20:09] chmurifree: has joined #ruby
[17:34:56] orbyt_: has joined #ruby
[17:35:00] dminuoso: This is the moment to bring in a rarely known ruby secret, guardian!
[17:35:05] dminuoso: let me introduce...
[17:35:15] dminuoso: http://nithinbekal.com/posts/ruby-flip-flop/
[17:35:42] dminuoso: This is hilariously good!
[17:35:55] Papierkorb: just why man
[17:36:03] dminuoso: Papierkorb: This is the perfect time to use it?!
[17:36:10] milardov_: has joined #ruby
[17:36:29] dminuoso: ACTION has always wanted to use it
[17:36:55] darkmorph: has joined #ruby
[17:37:01] Papierkorb: Except there's Enumerable#chunk (cc guardian)
[17:37:41] micalexander_: has joined #ruby
[17:37:55] dminuoso: Buut.. flip flop!
[17:38:03] dminuoso: Look! This is me not doing the functional thing.
[17:38:15] dminuoso: I thought you'd be proud :(
[17:38:45] dminuoso: But fair enough, Enumerable#chunk is the cooler way.
[17:40:01] guardian: let me have look
[17:41:37] whippythellama: has joined #ruby
[17:42:16] impermanence: has joined #ruby
[17:44:00] jenrzzz: has joined #ruby
[17:45:04] chouhoulis: has joined #ruby
[17:45:38] wald0: has joined #ruby
[17:47:18] RickHull: has joined #ruby
[17:47:34] dminuoso: Papierkorb: You will now be mentioned in this public gist: https://gist.github.com/dminuoso/a4d1f3f86fcada1ffdde9fed81fa7e12
[17:49:55] rhyselsmore: has joined #ruby
[17:50:41] baweaver: dminuoso: chunk_while is better
[17:50:52] mson: has joined #ruby
[17:50:55] dminuoso: baweaver: but flip flop :(
[17:51:22] dminuoso: baweaver: also look! you're my friend!
[17:51:25] dminuoso: ACTION has a friend
[17:51:27] baweaver: If I look back far enough I'd replied to one of avdi's tweets showing you could use flip-flops to tokenize HTML :D
[17:51:31] RickHull: dminuoso: can I get an honorable mention? ability: :holds_breath
[17:51:33] Quentinius: has joined #ruby
[17:51:45] dminuoso: RickHull: Oh. Why are you still typing?
[17:51:52] dminuoso: Shouldn't you be dead? :(
[17:51:53] claudiuinberlin: has joined #ruby
[17:52:20] RickHull: i passed out and the limbic system took over :)
[17:52:29] micalexander__: has joined #ruby
[17:52:41] dminuoso: You need to meditate more often so that you can die when others require it of you.
[17:53:03] malice`: has joined #ruby
[17:53:11] RickHull: we have all died a thousand deaths
[17:53:13] RickHull: or something
[17:53:24] malice`: Hi! Noob question here - in Ruby, everything's an object, and every function is a method, right?
[17:53:29] malice`: On what object is puts called?
[17:53:34] malice`: Or is it a static method of some object?
[17:53:36] elomatreb: It's turtles all the way down
[17:53:38] ramfjord: has joined #ruby
[17:53:38] dminuoso: malice`: On the main object
[17:53:50] hays: has joined #ruby
[17:53:50] hays: has joined #ruby
[17:53:51] dminuoso: malice`: which itself (through ancestory) passes it on to the module Kernel
[17:53:53] RickHull: Kernel is the default receiver, I believe
[17:53:57] chouhoul_: has joined #ruby
[17:53:58] dminuoso: RickHull: Nope.
[17:54:00] elomatreb: Methods without an explicit receiver are called on self, which usually involves the Kernel module somewhere
[17:54:04] Papierkorb: dminuoso: Nope, `#puts` in a method is called on implicit-self
[17:54:05] dminuoso: RickHull: If that was the case, you would have to invoke it as Kernel.puts.
[17:54:07] malice`: dminuoso: Can I somehow check this in Ruby? Like class_of(:puts)
[17:54:15] elomatreb: method(:puts)
[17:54:18] RickHull: malice`: I like to call $stdout.puts and $stderr.puts
[17:54:21] dminuoso: asm>> puts "foo"
[17:54:22] ruby[bot]: dminuoso: I have disassembled your code, the result is at https://eval.in/894076
[17:54:29] dminuoso: Papierkorb: ^-
[17:54:35] dminuoso: Papierkorb: as you can see `self` is the receiver
[17:54:42] dminuoso: which outside method scope defaults to the main object
[17:54:46] Papierkorb: dminuoso: Of course, if you call it on the toplevel
[17:55:07] malice`: That's useful
[17:55:19] dminuoso: malice`: Also note, there's tiny bits and pieces that are not objects
[17:55:28] dminuoso: Blocks and variables for examples
[17:55:32] elomatreb: Even more useful when working with library code is that you can call .source_location on the result of that method(:something)
[17:55:38] dminuoso: Though the former can trivially be turned into an object
[17:56:19] dminuoso: (The fact that blocks are not an object is actually just an optimization for Proc)
[17:56:43] dminuoso: 18:54 Papierkorb | dminuoso: Nope, `#puts` in a method is called on implicit-self
[17:56:48] dminuoso: I just understood what you meant by that
[17:56:51] dminuoso: My head was completely twisted.
[17:57:18] dminuoso: baweaver: what useful optics would you like to see in ruby lenses?
[17:57:21] dminuoso: First I mean
[17:57:25] dminuoso: traversals? query adapters?
[17:57:39] dminuoso: *query? adapters?
[17:57:49] mjolnird: has joined #ruby
[17:58:35] mikecmpbll: has joined #ruby
[18:01:12] guardian: I came up with .chunk { |e| e.is_a?(String) }.to_a.map { |e| e[0] ? { :nil => e[1] } : e[1] }.flatten
[18:01:16] guardian: what do you think?
[18:02:05] hays: has joined #ruby
[18:02:05] hays: has joined #ruby
[18:02:14] kishmesh: has joined #ruby
[18:02:47] dminuoso: guardian: I'd say there's no chance you even tried this.
[18:02:57] dminuoso: You'll see why if you try to.
[18:03:31] bmurt: has joined #ruby
[18:04:24] jackjackdripper1: has joined #ruby
[18:05:24] jackjackdripper1: has joined #ruby
[18:05:40] kishmesh: hi there. i'm looking for something like an "OrderedSetQueue", a FIFO Queue, that is threadsafe and does not accept duplicates. I couldn't find anything like this in standard Ruby libary nor on the net. So I'd have to self implement or what can you suggest?
[18:06:18] guardian: dminuoso: it works
[18:06:40] kies: has joined #ruby
[18:06:50] dminuoso: kishmesh: concurrent-ruby is kind of the de-facto library for multithreading containers, it brings a threadsafe Array that can be trivially used.
[18:07:06] jackjackdripper: has joined #ruby
[18:07:11] dminuoso: https://github.com/ruby-concurrency/concurrent-ruby
[18:10:42] hays: has joined #ruby
[18:11:08] kishmesh: dminuoso: yes thank you. Though an array is not really a set, is it? Do you mean I should check if element is in array before adding it?
[18:12:11] dminuoso: kishmesh: Yeah. It's probably not ideal, but it will work at least.
[18:12:25] bmurt: has joined #ruby
[18:13:01] cagomez: why are is my @res variable not being memoized? https://hastebin.com/zehusejuhi.rb
[18:13:27] RickHull: kishmesh: see Queue in the stdlib
[18:13:32] RickHull: oh, dupes, hm
[18:13:49] jackjackdripper1: has joined #ruby
[18:13:59] minimalism: has joined #ruby
[18:14:08] RickHull: if you are going to walk the structure to look for dupes, Queue would be a good place to start
[18:14:25] RickHull: there is also Set, which is implemented with the key portion of the Hash structure to enforce uniqueness
[18:14:32] RickHull: but not sure about the threadsafety there
[18:14:37] kishmesh: RickHull: as I understand you can not see if element is contained by standard ruby queue.
[18:14:52] michael1: has joined #ruby
[18:14:58] kishmesh: RickHull: standard set is not threadsafe
[18:15:22] RickHull: if there was a threadsafe Hash, you could take the Set approach there
[18:15:42] micalexander__: has left #ruby: ()
[18:15:56] dviola: has joined #ruby
[18:16:01] RickHull: i think you could patch Queue to allow walking it
[18:16:42] baweaver: dminuoso: what was that link? I'd tabbed it on the home computer before I left for work
[18:16:58] dminuoso: baweaver: https://gist.github.com/dminuoso/a4d1f3f86fcada1ffdde9fed81fa7e12
[18:17:00] eckhardt: has joined #ruby
[18:17:02] banisterfiend: has joined #ruby
[18:17:15] baweaver: and banisterfiend is here
[18:17:19] baweaver: now we can start the party
[18:17:22] dminuoso: This is how you write methods by the way.
[18:17:25] baweaver: dminuoso: shoot him a link too
[18:17:33] dminuoso: Autocurrying first-class methods.
[18:17:49] karapetyan: has joined #ruby
[18:19:31] cagomez: if I create different procs a,b,c calling the same method foo, and foo memoizes @bar... will a,b,c each have a unique method foo, and thus a need to memoize @bar for every unique method foo?
[18:19:43] RickHull: cagomez: show an example with actual behavior vs expected behavior
[18:19:52] cagomez: RickHull: https://hastebin.com/zehusejuhi.rb
[18:20:04] SeepingN: has joined #ruby
[18:20:09] RickHull: it took forever to load and just has method definitions. no behavior
[18:20:16] RickHull: unless you just updated it :)
[18:20:34] enterprisey: has joined #ruby
[18:20:48] dminuoso: cagomez: Also your testcase is not self contained. The db_calls method is not defined.
[18:21:05] cagomez: so I'm wondering if do_stuff maps over items, and each item should call a Proc which calls _bar, if @res will be computed for each item
[18:21:07] dminuoso: And Im unsure why you have also shown foo and do_stuff. Are they related?
[18:21:33] dminuoso: Is this supposed to be part in module (included into a class) or a class itself?
[18:21:42] dminuoso: Please make a working testcase.
[18:22:25] chouhoulis: has joined #ruby
[18:22:53] jrafanie: has joined #ruby
[18:23:05] crova: has joined #ruby
[18:23:06] dminuoso: Also *cry* that you cant do (++ '!!!') :(
[18:23:26] ur5us: has joined #ruby
[18:23:38] crova: Greetings everyone. Does anyone know a gem/app that can validate emails through a csv file?
[18:23:44] kishmesh: has left #ruby: ("WeeChat 1.6")
[18:23:54] hinbody: has joined #ruby
[18:24:44] dminuoso: "validate emails through a csv file" ?
[18:24:49] jenrzzz: has joined #ruby
[18:24:49] jenrzzz: has joined #ruby
[18:24:57] dminuoso: How would that work?
[18:24:59] workmad3: has joined #ruby
[18:25:12] conta2: has joined #ruby
[18:25:16] hackeron: has joined #ruby
[18:25:26] SeepingN: likely would not
[18:25:38] mjolnird: has joined #ruby
[18:25:40] crova: I got csv files that have multiple data (name, email and other info). Before accepting the whole data from a single row I want to validate the email
[18:26:04] crova: if it is a possible one (johndoe@gmal.com does not pass, johndoe@gmail.com passes)
[18:26:29] bmurt: has joined #ruby
[18:26:44] dminuoso: crova: do a DNS lookup and check for MX record presence?
[18:26:52] dminuoso: Im not an expert whether thats enough though.
[18:26:56] ramfjord: has joined #ruby
[18:27:11] baweaver: make sure to cache if you do
[18:27:14] crova: dminuoso, this would be the best of the options to be honest
[18:27:26] apeiros: MX, A, AAAA
[18:27:45] crova: I would settle for a valid format though
[18:27:46] apeiros: that only tells you whether the domain exists and might accept emails
[18:28:11] baweaver: ooo, we're doing IPv6?
[18:29:18] RickHull: has joined #ruby
[18:29:49] dminuoso: ACTION was told that https://gist.github.com/dminuoso/079267f4fcecb0568cd938d6c13733e7 was an RFC conform email validity regex.
[18:30:08] crova: baweaver, I only have the md5 :/
[18:30:47] crova: checking it dminuoso, thanks
[18:31:14] dminuoso: ACTION hides
[18:31:24] hackeron: has joined #ruby
[18:31:40] RickHull: crova: my comment was somewhat in jest and I meant to follow it up more helpfully. but freenode disconnected me, and is still pretty messed up for me right now
[18:32:15] crova: RickHull, I only saw "tests" from you
[18:32:36] RickHull: ok, good :) sorry for that too
[18:34:54] milardovich: has joined #ruby
[18:35:40] RickHull: has joined #ruby
[18:37:46] workmad3: has joined #ruby
[18:38:25] orbyt_: has joined #ruby
[18:38:38] weaksauce: has joined #ruby
[18:41:17] _main_: has joined #ruby
[18:42:16] alfiemax: has joined #ruby
[18:43:39] jenrzzz: has joined #ruby
[18:43:40] jenrzzz: has joined #ruby
[18:44:44] RickHull: banisterfiend: what are you working on / towards these days?
[18:45:06] dminuoso: baweaver: So. Which functionality would you like to see next?
[18:45:53] orbyt_: has joined #ruby
[18:46:43] baweaver: Admittedly you're at the practical edge of my FP knowledge, so not sure
[18:46:45] ledestin: has joined #ruby
[18:48:18] RickHull: what is a lens? is that an FP term?
[18:48:57] dminuoso: RickHull: It's a setter + getter that somehow focuses on some property/properties in some meaningful way.
[18:49:22] blackmesa: has joined #ruby
[18:49:28] nicesignal: has joined #ruby
[18:51:11] chouhoulis: has joined #ruby
[18:52:14] Guest734: has joined #ruby
[18:52:57] dminuoso: Wrapped in a function, so you can chain them together with just plain function composition
[18:53:26] blackmesa1: has joined #ruby
[18:54:17] dminuoso: If you ignore how they are implemented and just look at the bottom how they are used, they are quite simple in their basic form.
[18:58:53] hays: has joined #ruby
[18:59:24] RickHull: FP is tough for me in ruby -- that old steve yegge post about the kingdom of nouns
[18:59:35] RickHull: objects are all about nouns, functions about verbs
[19:00:00] RickHull: i think ruby has done a lot to bridge the gap in a way that java may not
[19:00:33] RickHull: but then, is ruby's object basis all that useful in FP?
[19:00:45] dviola: has joined #ruby
[19:01:02] baweaver: Java has lambdas now among other things
[19:01:12] baweaver: So that argument isn't _as_ valid as it used to be
[19:01:25] baweaver: ACTION still greatly dislikes Java
[19:02:03] Ober: you ever get hired for this dislike?
[19:02:15] RickHull: a greenfield java project with no dependencies may be able to approximate some FP elegance
[19:02:21] RickHull: but legacy dooms that effort, I suspect
[19:02:32] RickHull: a greenfield java project with no dependencies may be able to approximate some FP elegance
[19:02:32] RickHull: but legacy dooms that effort, I suspect
[19:03:15] darix: well the latest JVM hype seems to be kotlin
[19:05:25] RickHull: and clojure even
[19:05:36] RickHull: and clojure even
[19:09:36] quobo: has joined #ruby
[19:09:56] Devalo: has joined #ruby
[19:11:16] ephemera_: has joined #ruby
[19:11:48] alfiemax: has joined #ruby
[19:12:04] guardian: dminuoso: why did you say it can't possibly work? I'm curious
[19:12:21] _main_: has joined #ruby
[19:12:42] dminuoso: guardian: Because :nil and nil are not the same thing? *shrugs*
[19:13:24] _main_: has joined #ruby
[19:15:28] romain_t: has joined #ruby
[19:16:10] hays: has joined #ruby
[19:16:10] hays: has joined #ruby
[19:16:25] milardov_: has joined #ruby
[19:17:04] baweaver: I get hired for Ruby and Javascript.
[19:17:52] cdg: has joined #ruby
[19:17:58] banisterfiend: has joined #ruby
[19:19:16] alfiemax: has joined #ruby
[19:19:38] baweaver: I dislike Java so I don't pursue Java jobs. Simple as that.
[19:21:04] lucz: has joined #ruby
[19:21:56] planigan: has joined #ruby
[19:22:26] hays: has joined #ruby
[19:25:02] guardian: dminuoso: I see
[19:26:00] guardian: dminuoso: thanks for your hawk eye :)
[19:29:32] hays: has joined #ruby
[19:29:33] hays: has joined #ruby
[19:29:54] ramfjord: has joined #ruby
[19:30:20] _main_: has joined #ruby
[19:34:51] chrisarcand: ...wrong window ;)
[19:34:51] dionysus69: has joined #ruby
[19:36:16] dminuoso: RickHull: Clojure is quite nasty.
[19:36:56] RickHull: yeah, I haven't used it in anger yet. but I hear debugging is frustrating
[19:37:20] rfoust: has joined #ruby
[19:37:39] dminuoso: Stack traces separate people with implicit knowledge where the code was sabotaged, and clueless people.
[19:37:50] RickHull: I like Lisp, but I think I like types better
[19:37:52] dminuoso: If someone looks at one and finds the cause, you know he was the culprit.
[19:38:48] dminuoso: RickHull: Just look at SML then.
[19:39:01] dminuoso: It's functionall equivalent, but it gives you a full HM type system
[19:39:16] RickHull: I did about a decade ago, before I could appreciate it
[19:39:53] dminuoso: Or just straight up Haskell? ;p
[19:40:26] RickHull: that's probably ahead of SML in my queue
[19:40:49] RickHull: but not for any justifiable reasons besides maybe mindshare
[19:40:59] dhollin3: has joined #ruby
[19:41:29] RickHull: I was around for the early days of http://www.impredicative.com/ur/ but again, zero appreciation :)
[19:44:27] milardovich: has joined #ruby
[19:44:49] cr3: has joined #ruby
[19:45:34] Ney: has joined #ruby
[19:45:40] cr3: when I "bundle exec rake test", for example, does it look for a Gemfile(.lock) in all the parent directories? bundle exec --help seems to have just one option, --keep-file-descriptors, so is there a way to see what it's actually doing?
[19:45:56] dminuoso: cr3: This should be easy to test.
[19:46:08] dminuoso: cr3: Also I could not reproduce your issue.
[19:46:37] dminuoso: So I suggest you: create a fresh directory, clone the repo (do not copy, I dont trust your old repo), checkout the revision, bundle install, and run the testsuite
[19:46:55] dminuoso: If you then still have the issue, then we can talk. :p
[19:47:07] ta: has joined #ruby
[19:48:06] cr3: dminuoso: I can't reproduce with pristine upstream so I'm still trying to troubleshoot my setup. if the only solution to troubleshooting this problem is delete everything and try again, that's a bit sad :(
[19:48:24] dminuoso: cr3: diff pristine upstream against your directory.
[19:49:19] cr3: dminuoso: it's something to do with the environment, like maybe the directory where it's running for example, hence my question about bundler maybe recursing up parent directories. is there no way to get any visibility into what bundler does?
[19:49:45] dminuoso: Bundler does magic™
[19:52:25] RickHull: cr3: that answer is almost certainly documented or easily testable
[19:52:52] cr3: RickHull: I tried bundler exec --help but maybe the source is the documentation :(
[19:52:56] RickHull: at the risk of being uncharitable, I think the "l" is misplaced in "bundler"
[19:53:51] RickHull: it solves/solved some important problems, particularly for rails projects
[19:54:25] RickHull: but I don't think it should be as ubiquitous as it is now
[19:54:30] jrafanie: has joined #ruby
[19:55:09] mtkd: has joined #ruby
[19:56:36] cr3: I tried removing the Gemfile in ../../.. but now bundle exec rake test says the file is "not found", so bundle was recursing to the top-most directory with a Gemfile rather than first directory with a Gemfile, like ../Gemfile. interesting and confusing at the same time :)
[19:56:38] miah: iirc, bundler only searches the local directory for a Gemfile.lock.
[19:57:03] miah: right, the project-root
[19:57:31] cr3: miah: my cwd doesn't have a Gemfile.lock but I had a ../Gemfile.lock and ../../../Gemfile.lock. after deleting the latter one, that's when I now get "not found". I'm getting somewhere, just a bit more digging :)
[19:57:49] miah: good luck =)
[19:58:07] cr3: miah: I'll share my findings as soon as I find something, this spelunking is intriguing :)
[19:58:11] RickHull: it took 2 minutes to confirm `bundle exec` will look to the parent dir for a Gemfile
[19:58:16] RickHull: relative to CWD
[19:59:31] miah: if you're execing in a sub-directory of a project root that makes sense
[20:00:05] miah: if your project is missing a Gemfile or a gemspec i can imagine bundler would be like 'whats my job here?'
[20:00:05] RickHull: https://gist.github.com/rickhull/e48cc2a00ccb42fda1b996444f393e9e
[20:00:22] Xiti: has joined #ruby
[20:00:36] miah: thanks for the gist
[20:05:14] cdg: has joined #ruby
[20:06:08] zacts: has joined #ruby
[20:07:42] mkroman: has joined #ruby
[20:10:20] def_jam: has joined #ruby
[20:10:26] eb0t_: has joined #ruby
[20:10:33] klaas: has joined #ruby
[20:11:01] cdg_: has joined #ruby
[20:11:31] Bilge: has joined #ruby
[20:11:44] ur5us: has joined #ruby
[20:14:17] cagomez: has joined #ruby
[20:16:06] johno84: has joined #ruby
[20:16:06] snapcase: has joined #ruby
[20:16:56] jenrzzz: has joined #ruby
[20:18:22] uZiel: has joined #ruby
[20:19:55] bokayio: has joined #ruby
[20:21:42] alfiemax: has joined #ruby
[20:23:46] conta1: has joined #ruby
[20:24:37] michael1: has joined #ruby
[20:26:02] lacour: has joined #ruby
[20:26:29] veeti: has joined #ruby
[20:29:45] cr3: Let's say I'm in the directory /app/tmp/rails-4-2-stable-mri-2.4.1/activejob, typing bundle env returns "No such file or directory @ rb_sysopen - /app/Gemfile", so how does bundle decide to look for the Gemfile all the way in /app? I tried running the command with strace -e trace=open but I can't figure this out :(
[20:30:24] cagomez: has joined #ruby
[20:31:24] RickHull: i think it just recurses upwards until /
[20:31:51] RickHull: maybe it quits before / :)
[20:32:11] orbyt_: has joined #ruby
[20:32:28] cr3: RickHull: I do have /app/tmp/rails-4-2-stable-mri-2.4.1/Gemfile though
[20:32:49] Technodrome: has joined #ruby
[20:32:49] cr3: RickHull: also, I find it weird that it recurses until one-directory-before-root :/
[20:32:52] RickHull: that seems pretty weird then. see if you can replicate it as in my gist
[20:32:57] RickHull: like with a toy example
[20:33:36] RickHull: cr3: one plausible explanation is that / should not contain files, let alone user files
[20:33:56] RickHull: i'm just swinging wildly though :)
[20:34:10] RickHull: also, do you have any symlinks pointing to /app ?
[20:34:40] cr3: what if "/app" is a special name... trying to rename that
[20:34:46] Dimik: has joined #ruby
[20:35:18] cr3: RickHull: good idea, no symlinks though
[20:35:30] milardovich: has joined #ruby
[20:35:42] RickHull: bundler should not have any special case for a dir name that it doesn't own
[20:35:42] milardovich: has joined #ruby
[20:35:49] RickHull: aside from maybe / :)
[20:36:23] RickHull: also, have you tried #bundler ? if not, and you do, let them know you also asked here
[20:37:15] cr3: RickHull: ln -s /app /foo; cd /foo/tmp/rails.../activejob; bundle env; same thing, so I'll ask in #bundler. thanks for the tip
[20:37:30] RickHull: also -- I can execute `bundle env` without any Gemfiles in parent dirs
[20:37:34] RickHull: e.g. my homedir
[20:37:48] RickHull: It omits the ## Gemfile portions
[20:38:16] Ney: has joined #ruby
[20:38:32] RickHull: it may take a while to get a response in some of the smaller channels, just FYI
[20:39:43] cr3: RickHull: grep -r /app/Gemfile /usr/local returned: /usr/local/bundle/bin/bundle: File.expand_path("../../../../../app/Gemfile", __FILE__)
[20:40:04] cr3: what the heck is the Gemfile doing hard-coded in a bin!
[20:40:04] RickHull: that is almost certainly related
[20:41:16] cr3: I've seen this before in python venvs so maybe /usr/local/bundle is a kind of venv, now I'm getting somewhere :/
[20:41:24] RickHull: definitely a question for #bundler, you won't get a charitable answer from me
[20:42:15] RickHull: not to preempt anyone else here who can explain. don't all speak up at once :)
[20:42:35] milardovich: has joined #ruby
[20:44:24] weaksauce: has joined #ruby
[20:46:08] DWSR: has joined #ruby
[20:46:11] cagomez: has joined #ruby
[20:46:15] nofxx: has joined #ruby
[20:46:54] cdg: has joined #ruby
[20:47:12] DWSR: Hey all, I'm trying to rewrite the Dockerfile of my company's app to slim down the images from 1.75GB (>.<). I'm doing OK so far, but am running into an issue with trying to get json-1.8.3 into the image without install make, etc. Anyone have suggestions on an approach here? I'm basing off of the ruby Alpine image.
[20:48:06] dminuoso: DWSR: What issue is that?
[20:48:20] dminuoso: DWSR: And why dont you want to build json in the docker container?
[20:49:41] DWSR: dminuoso: The issue is "Why the hell do I want build tools in my images?"
[20:49:48] nofxx: DWSR, can help with the keywords to goog: 'precompiled linux gem' , or install and them remove devtools
[20:50:14] dminuoso: DWSR: Because Ruby uses native extensions?
[20:50:30] karapetyan: has joined #ruby
[20:51:38] dminuoso: I mean Im just trying to understand your reasoning.
[20:52:17] micalexander_: has joined #ruby
[20:52:38] RickHull: i think the basic idea is that the build can happen "offline" and that you don't build on the production target platform
[20:52:41] DWSR: dminuoso: I'm not arguing against native extensions. I'm just kind of confused as to the fact that I'm building it from source as opposed to getting something like a Python wheel.
[20:53:33] dinfuehr: has joined #ruby
[20:54:40] troulouliou_div2: has joined #ruby
[20:55:01] micalexander: has joined #ruby
[20:55:04] dminuoso: DWSR: Ruby comes with a different json version out of the box (2.1.0 I believe)
[20:55:27] dminuoso: DWSR: So if you have something that specifically needs 1.8.3 for some reason, well then it has to be compiled.
[20:55:36] DWSR: nofxx: So if I do `bundle install devtools` then install from the Gemfile then `bundle remove devtools`, this should work?
[20:55:49] dminuoso: DWSR: You will still have those layers.
[20:56:01] dminuoso: Or I guess if you do this in a single step, it could
[20:56:11] DWSR: A single RUN, right?
[20:56:58] nofxx: DWSR, no, by 'devtools' I mean your OS package with gcc & friends
[20:57:29] dminuoso: alpine-sdk would be a kind of equivalent
[20:57:31] nofxx: package group*
[20:58:16] jenrzzz: has joined #ruby
[20:58:16] jenrzzz: has joined #ruby
[20:59:11] fmcgeough: has joined #ruby
[20:59:48] DWSR: yeesh. 333MiB in packages. Luckily this should be slimmer though
[21:00:21] DWSR: We'll see. Looks like compilation is going through.
[21:00:32] DWSR: Hope I don't get burned by the differences in libc, but who knows?
[21:01:17] tomphp: has joined #ruby
[21:01:45] chouhoulis: has joined #ruby
[21:02:23] impermanence: has joined #ruby
[21:04:51] s3nd1v0g1us: has joined #ruby
[21:09:02] orbyt_: has joined #ruby
[21:09:13] RickHull: what's the big picture for deploying ruby artifacts? can "binaries" possibly be shipped or is always inherently source code, particularly in the case of extensions which are built at install time?
[21:09:19] RickHull: does mruby offer a different model?
[21:09:24] nofxx: has joined #ruby
[21:09:40] eckhardt: has joined #ruby
[21:11:01] Devalo: has joined #ruby
[21:11:21] RickHull: BTW, by "binaries" I don't mean shipping the ruby interpreter + source code :)
[21:12:40] RickHull: I would expect you ship the platform guts onto something like Alpine, then you ship your application artifact. like the java model or whatever
[21:13:32] RickHull: building on the production runtime platform is icky
[21:14:44] ap4y: has joined #ruby
[21:18:31] jrafanie: has joined #ruby
[21:19:56] yabbes: has joined #ruby
[21:21:35] jmusits: has joined #ruby
[21:22:54] cagomez: has joined #ruby
[21:24:55] ^mtkd: has joined #ruby
[21:25:49] cagomez: has joined #ruby
[21:28:13] Silthias1: has joined #ruby
[21:32:06] arquebus: has joined #ruby
[21:39:24] kozrar: has joined #ruby
[21:39:53] michael1: has joined #ruby
[21:41:32] kozrar: has joined #ruby
[21:45:25] thuryn: has joined #ruby
[21:54:11] _whitelogger: has joined #ruby
[21:58:03] eb0t: has joined #ruby
[21:58:51] eblip: has joined #ruby
[21:59:38] Tagami[m]: has joined #ruby
[22:01:01] alan_w: has joined #ruby
[22:01:20] thuryn: ugh. okay i'm a long-term perl scripter, but still a novice with Ruby, and i need to do a DNS lookup
[22:01:27] thuryn: and I can't quite figure it out
[22:02:32] thuryn: i need to look up the SOA record for the zone that an address falls within. most of the time, you can just look up the SOA for the address itself, and you'll get the SOA record for the "deepest" reverse zone that it belongs to
[22:03:10] milardovich: has joined #ruby
[22:03:15] thuryn: but looking at this: http://www.rubydoc.info/stdlib/resolv/2.2.2/Resolv/DNS/Resource/SOA
[22:03:28] thuryn: i don't see how i can confirm the name of the zone that it fell into.
[22:04:15] RickHull: this is over my head as far as DNS goes. what methods are you looking at?
[22:04:57] kozrar: has joined #ruby
[22:05:10] RickHull: can you write a quick example script with this lib, that shows basically what you want to do, against say a google IP address or something?
[22:05:12] GodFather: has joined #ruby
[22:05:20] RickHull: something trivial that works as expected
[22:06:09] orbyt_: has joined #ruby
[22:08:07] dminuoso: RickHull: I lied.
[22:08:18] dminuoso: RickHull: An unordered set is of course a proper Functor.
[22:08:30] dminuoso: I might have been slightly drunk that evening.
[22:08:51] RickHull: i got a little lost in functors vs endofunctors vs monads
[22:09:10] dminuoso: Just remember as far as programmers are concerned, endofunctors are functors.
[22:09:36] RickHull: my FP abilities (and abilities in general) wither quickly when not in use
[22:09:58] RickHull: I'm sort of trying to reboot that :)
[22:11:23] RickHull: as far as that goes, I have lots of tiny independent modules here: https://github.com/rickhull/compsci I'd be interested in a concrete example of translating to a more FP style
[22:11:23] dminuoso: Well, basically ignoring more exotic cases, any type of container that you can map over (and get the same type back, yes Im looking at you Range) is a functor.
[22:11:25] RickHull: lambdas etc
[22:12:17] dminuoso: RickHull: Great stuff. You could turn Node into an (identity) functor, and those trees in proper functors. Quite trivially.
[22:12:22] dminuoso: Just implement #map for each one of them. :)
[22:13:07] milardovich: has joined #ruby
[22:13:08] darix: has joined #ruby
[22:13:34] RickHull: see also the refactor branch; i'm starting to get annoyed with inheritance handcuffs for various node semantics
[22:14:32] RickHull: the names module is really simple, but it feels a little hacky
[22:15:53] cdg: has joined #ruby
[22:16:09] dminuoso: RickHull: [*'A'..'Z'] is probably better written as ('A'..'Z').to_a
[22:16:57] RickHull: ok, yeah. i stole that from some stackoverflow code golf
[22:17:08] RickHull: i imagined it wouldn't create as many objects
[22:17:23] dminuoso: It's not a big deal. It just looks a bit cleaner thats all.
[22:17:28] brent__: has joined #ruby
[22:17:34] baweaver: It's slower as well iirc
[22:17:54] RickHull: i'll take clarity of expression over trivial performance
[22:18:36] RickHull: see Names::Greek -- that's where it gets a little hairy
[22:19:28] dminuoso: RickHull: You gain both in fact.
[22:19:29] baweaver: >> require 'benchmark';n=10_000;print "splat: #{Benchmark.measure{n.times{[*'A'..'Z']}}.real} - to_a: #{Benchmark.measure{n.times{('A'..'Z').to_a}}.real}"
[22:19:31] ruby[bot]: baweaver: # => splat: 0.08737298846244812 - to_a: 0.07744374871253967nil (https://eval.in/894159)
[22:19:46] baweaver: >> require 'benchmark';n=1_000_000;print "splat: #{Benchmark.measure{n.times{[*'A'..'Z']}}.real} - to_a: #{Benchmark.measure{n.times{('A'..'Z').to_a}}.real}"
[22:19:48] ruby[bot]: baweaver: # => (https://eval.in/894161)
[22:19:57] baweaver: >> require 'benchmark';n=100_000;print "splat: #{Benchmark.measure{n.times{[*'A'..'Z']}}.real} - to_a: #{Benchmark.measure{n.times{('A'..'Z').to_a}}.real}"
[22:20:03] ruby[bot]: baweaver: # => splat: 0.8721756562590599 - to_a: 0.8727261573076248nil (https://eval.in/894162)
[22:20:13] goyox86: has joined #ruby
[22:20:13] dminuoso: That's surprising
[22:20:22] baweaver: ok, so maybe little to no measurable difference
[22:20:28] dminuoso: asm>> [*'A'..'Z']
[22:20:29] ruby[bot]: dminuoso: I have disassembled your code, the result is at https://eval.in/894164
[22:20:30] dminuoso: asm>> ('A'..'Z').to_a
[22:20:31] ruby[bot]: dminuoso: I have disassembled your code, the result is at https://eval.in/894165
[22:20:49] dminuoso: baweaver: That is optimized away at compile time.
[22:20:52] dminuoso: That explains why.
[22:21:08] baweaver: Looks like it
[22:21:27] RickHull: are real and wall times meaningful there?
[22:21:48] baweaver: that said, it's way different for array concats
[22:21:59] dminuoso: baweaver: And since we just do this once, the splat will be faster since no method lookup has to be done (which would be uncached for the first)
[22:22:12] baweaver: << is faster than push is faster than concat is faster than splat
[22:22:13] dminuoso: So this proves, [*a..b] is the way to go.
[22:22:27] RickHull: noo, the darkside is winning
[22:22:40] baweaver: I think + was vaguely around concat's time
[22:22:46] baweaver: though this assumes single value addition
[22:22:48] dminuoso: baweaver: I wish we had ++.
[22:22:58] dminuoso: Buuut.. I guess I should accept that Ruby is not Haskell.
[22:23:04] baweaver: which means that concat and + get an extra array init
[22:23:08] dminuoso: ACTION goes back writing lenses
[22:24:55] milardovich: has joined #ruby
[22:25:23] baweaver: dminuoso: you could always join me and teach the masses programming with adorable coding Lemurs
[22:27:09] goyox86: has joined #ruby
[22:28:45] thuryn: RickHull, the problem is, i've never used it before, so i don't have anything that works yet. :P
[22:28:53] mim1k: has joined #ruby
[22:29:00] thuryn: all i have to compare to is the output from the command-line utility 'dig'
[22:29:03] RickHull: thuryn: start with something trivial before getting to the hard stuff
[22:29:18] RickHull: e.g. use the Resolv lib to get an ip address for 'google.com'
[22:29:25] thuryn: oh i know how to do THAT
[22:29:38] RickHull: ok, so let's see a working example for something close to your problem
[22:29:44] RickHull: but without getting into the deep zone stuff or whatever
[22:30:05] thuryn: the problem is, with a normal DNS lookup, you know the thing you're looking up
[22:30:08] thuryn: like "google.com"
[22:30:27] RickHull: yeah, i'm unsure about SOA records
[22:30:43] RickHull: and anything getting into recursive/authoritative/zone stuff is not intuitive to me
[22:30:51] RickHull: aside from the very basics
[22:31:13] thuryn: in this case, i'm looking up, say, 36.9.217.172.in-addr.arpa, but i'm going to get back 9.217.172.in-addr.arpa (missing the "36" in this case)
[22:32:04] veeti: has joined #ruby
[22:32:05] thuryn: it's like this: imagine you did a lookup for the IP address of "www.google.com" but when the answer came back, it says "google.com is 8.8.8.8"
[22:32:11] thuryn: (note that the "www" is missing in the answer)
[22:32:22] RickHull: with you so far
[22:32:37] thuryn: so the "google.com" is the "name" part of the record you get in return
[22:33:03] thuryn: i need to see where that is in a Resolv::DNS::Resource object
[22:33:04] goyox86: has joined #ruby
[22:33:05] Technodrome: has joined #ruby
[22:33:34] thuryn: because the answer is highly likely to not exactly match the question
[22:34:01] thuryn: (when you query for SOAs, you basically get the "closest match")
[22:34:08] RickHull: ok, makes more sense now
[22:34:16] RickHull: I see the resource represents the query
[22:34:22] RickHull: does it also represent the response?
[22:34:54] RickHull: apologize if i'm misusing DNS-specific terms. I mean in the general sense, where your query would be 36.9 and the response would be 9.217
[22:35:29] thuryn: well, i see it has attributes for the TTL (inherited) as well as MNAME and so on, all parts of the "right hand side" of the SOA record. so it has details from the response.
[22:35:55] thuryn: i just don't see where it has the name of the record itself. it seems to be assumed that the name of the record is still the thing you asked for. or i'm not looking in the right place. :/
[22:36:02] RickHull: I believe this ruby lib is going to be a thin wrapper around the standard C resolv lib
[22:36:37] RickHull: one thing that can help for this is using pry as a REPL (irb is the default REPL)
[22:36:48] RickHull: familiar with REPLs?
[22:36:49] thuryn: with Perl, I could use "Data::Dumper" to have it spew out all of the different characteristics of an object like this.
[22:37:05] RickHull: yes, pry will give you something similar but interactive
[22:37:08] goyox86: has joined #ruby
[22:37:12] thuryn: no, i'm afraid not. at least, not by that name. i've used irb before.
[22:37:13] RickHull: though you don't need pry for Dumper functionality
[22:37:16] thuryn: (it has been a while.)
[22:37:25] RickHull: Read Eval Print Loop -- the interactive version of the interpreter
[22:37:40] RickHull: anyway, pry is like irb on steroids with introspection and live debugging
[22:37:41] thuryn: ah, okay. a "shell" for the interpreter. (using the term loosely)
[22:38:20] RickHull: `ruby` wants a source file. `irb` waits for expressions and shows their evaluation result
[22:38:36] enterprisey: has joined #ruby
[22:39:24] RickHull: i can't think what the most faithful version of a ruby dumper is. maybe 'pp' or 'awesome_print'
[22:39:35] RickHull: 'pp' is in stdlib (pretty print)
[22:39:49] aeaeaeae1: has joined #ruby
[22:39:58] thuryn: i'm going to try 'pp' and see if i don't learn something,
[22:40:03] RickHull: >> require 'pp'; pp String.class
[22:40:04] ruby[bot]: RickHull: # => Class ...check link for more (https://eval.in/894168)
[22:40:09] PaulCapestany: has joined #ruby
[22:40:30] RickHull: i would try `gem install pry`
[22:40:45] RickHull: and then inside pry: require 'resolv' # and go from there
[22:41:19] RickHull: once you have an object that represents the response (SOA::Resource or w/e)
[22:41:33] RickHull: you can: cd response_obj
[22:41:46] RickHull: and it's like change-dir into the object. and you can poke around
[22:41:59] RickHull: list its methods and attributes
[22:42:15] thuryn: that's.... pretty cool
[22:42:22] thuryn: pry installing now
[22:42:32] RickHull: do a 5 min tutorial on pry, it will pay off
[22:42:40] apeiros: lists its contents
[22:42:47] apeiros: $ obj.some_method
[22:42:50] thuryn: that's FAR too intuitive
[22:43:01] apeiros: shows the source code. those 2 are the most common used commands by me in pry
[22:43:04] thuryn: you're going to have to obfuscate it a bit
[22:43:39] RickHull: there's still plenty of line noise to play with ;)
[22:43:51] thuryn: going to ruin my reputation as a miracle worker
[22:44:04] apeiros: doubt that
[22:44:22] baweaver: I'd look into Conrad Irwin's talk on Pry
[22:44:38] baweaver: https://www.youtube.com/watch?v=jDXsEzOHb2M
[22:47:09] thuryn: ACTION looks at apeiros suspiciously.
[22:47:17] thuryn: that can be read two ways....
[22:47:23] apeiros: thuryn: why are you suspicious?
[22:47:39] apeiros: maybe that's intentional
[22:48:13] raynold: Ahh it's a wonderful day
[22:51:08] thuryn: okay i see
[22:51:40] thuryn: the built-in resolver doesn't work the same way as some others do. if there isn't an SOA record EXACTLY like what I asked for, it doesn't do "best match." it just returns zilch.
[22:52:15] thuryn: so i'll have to pop off the last element and try again until i get an answer (or I run into 'in-addr.arpa')
[22:52:58] Psybur: has joined #ruby
[22:53:33] troys: has joined #ruby
[22:54:13] thuryn: okay stupid ruby question. this is one of the attributes of the object that is returned: @expire=604800
[22:54:28] thuryn: how do i reference that so that i get "604800"?
[22:55:18] veeti: has joined #ruby
[22:56:45] thuryn: i tried soa_record.expire but that just gave me "undefined method"
[22:57:25] thuryn: oh! it's a list!
[22:57:33] thuryn: soa_record[0].expire <- ta da!
[23:02:28] jdawgaz: has joined #ruby
[23:03:03] apeiros: thuryn: note, @expire is an instance variable. you always need a method to access instance variables from outside.
[23:03:59] blackmesa1: has joined #ruby
[23:04:38] apeiros: (though, often named the same as the @ivar)
[23:05:17] thuryn: is it misleading that soa_record[0].expire worked in pry?
[23:05:40] thuryn: (meaning that i was able to assign the returned value to another variable)
[23:06:04] apeiros: no? I was explaining this detail to help you understand how it works
[23:06:18] bdonnahue: has left #ruby: ("Leaving")
[23:06:38] thuryn: yes, i think i get that. if there isn't a method to expose that attribute, then it's an internal value that i "can't have"
[23:06:47] ramfjord: has joined #ruby
[23:07:19] apeiros: well, there's always ways
[23:07:27] thuryn: right, but i mean
[23:07:30] thinkpad: has joined #ruby
[23:07:32] thuryn: there are buttons we shouldn't press ;)
[23:08:03] apeiros: the button not to press is instance_variable_get(:@ivar) btw. ;-)
[23:08:10] apeiros: or instance_eval
[23:08:12] thuryn: according to RubyDoc, for example, the right way to get at the mname attribute is with foo[0].mname.to_s
[23:08:42] thuryn: since the "mname" method returns a Resolv::DNS::Name object, and THAT wants to have to_s called against it to return just the value.
[23:08:45] al2o3-cr: thuryn: private methods become public methods within repl
[23:09:16] apeiros: no? they don't?
[23:09:19] thuryn: i'm running late to the Next Thing. i'll get a chance to try this out for realz later this week.
[23:09:28] thuryn: thanks for the help. i think i'm well on my way now.
[23:09:52] RickHull: thuryn: briefly, if you see an ivar like @expire, probably there is a good way to access it. if not, the bad way :)
[23:09:58] baweaver: with send, every method is public :D
[23:11:08] baweaver: If you ever want to know if something is the bad way, just tag apeiros and see how many wtfs you get
[23:11:22] apeiros: great, I'm a wtfmeter
[23:11:30] baweaver: Me, I'm the opposite
[23:11:40] Devalo: has joined #ruby
[23:11:40] baweaver: show me something esoteric and fun and I'll applaud
[23:11:41] apeiros: he's the wtfmaximizer
[23:11:45] baweaver: I'm a bad influence :D
[23:12:25] shinnya: has joined #ruby
[23:12:27] jottr__: has joined #ruby
[23:12:57] baweaver: I've taken up the mantle of Ox0dea and shevy
[23:13:36] Tagami[m]: has joined #ruby
[23:13:51] Papierkorb: I'm conflicted if that's good or bad
[23:14:15] baweaver: that's what makes it so awesome
[23:14:32] baweaver: Also seeing about taking up _why's mantle as well :)
[23:14:36] jenrzzz: has joined #ruby
[23:14:57] baweaver: We need more cartoon tutorials, and I'm of a mind to make them
[23:15:31] RickHull: whitequark was always a great source of ruby quirks
[23:16:57] baweaver: Except I teach with Lemurs because Lemurs are awesome - https://twitter.com/keystonelemur/status/927417389230178304
[23:17:33] baweaver: Also, for some completely unrelated reason you can normally find me around Lemur exhibits at the Oakland Zoo on weekends with a sketchpad
[23:18:57] baweaver: Coming up close on 7k words for the initial draft of "An Illustrated Guide to Ruby"
[23:19:14] baweaver: Need to refine the ToC a bit and get at least three solid chapters out before it comes up live on Github
[23:19:17] jdawgaz: has joined #ruby
[23:21:03] apeiros_: has joined #ruby
[23:22:11] sucks: has joined #ruby
[23:23:52] RickHull: baweaver: awesome. 7k words in 3 chapters?
[23:24:01] baweaver: Across more than a few
[23:24:16] baweaver: I basically started filling out sections as it occurred to me
[23:24:35] baweaver: Need to refine in at least 3 and get that out first
[23:24:41] RickHull: that's as good a way as any, I figure. strike while the iron's hot
[23:24:57] baweaver: Reviewers welcome :)
[23:25:27] baweaver: Naturally credit extended in the mentions. May well end up doing a LYAH type deal where I have it online for free and publish a paper version
[23:28:19] _main_: has joined #ruby
[23:30:39] RickHull: the old pickaxe model worked pretty well I think
[23:30:48] RickHull: the first version was free
[23:31:09] RickHull: or write a 5 chapter core, published for free
[23:31:18] RickHull: (and updated for free)
[23:31:21] jenrzzz: has joined #ruby
[23:31:21] jenrzzz: has joined #ruby
[23:31:36] RickHull: published == online there
[23:32:37] naprimer2: has joined #ruby
[23:34:53] orbyt_: has joined #ruby
[23:39:59] tcopeland: has joined #ruby
[23:48:37] jphase: has joined #ruby
[23:51:48] zenspider: UGH bundler ... just fucking kill me already
[23:52:17] zenspider: RickHull: the free pickaxe edition was actually pretty problematic
[23:52:51] RickHull: yeah, it was old and primitive and had some bad ideas in it IIRC
[23:53:02] RickHull: but it really inspired me, turned on the lightbulb
[23:53:04] cdg: has joined #ruby
[23:53:07] RickHull: and I was glad it was free
[23:53:08] zenspider: aaaand it was free... which fucked up sales a measurable amount
[23:53:37] zenspider: it caused problems between DT and addison
[23:54:00] RickHull: I can imagine
[23:54:01] bmurt: has joined #ruby
[23:54:09] RickHull: i think the freemium model is more accepted these days
[23:54:10] zenspider: all subsequent editions weren't free as a result... but the free one stuck around and (almost) nobody updated
[23:54:19] RickHull: though publishers are dinosaurs
[23:54:36] jphase: has joined #ruby
[23:55:00] RickHull: using updates as paid DLC definitely has that downside
[23:55:24] RickHull: but I think you could provide the equivalent of security updates twice a year
[23:55:31] Tagami[m]: has joined #ruby
[23:55:33] RickHull: for free or w/e
[23:56:03] RickHull: probably core/periphery is a better cleavage
[23:57:58] RickHull: I expect pragmatic press and oreilly have their models fairly well figured out by now. not sure if freemium fits in there
[23:58:36] RickHull: for an author, I think there is something to be said for having an open portfolio to build a following
[23:59:19] mtkd: has joined #ruby
[23:59:26] RickHull: i guess blog posts does that. avdi chime in whenever :)
[23:59:28] mikecmpbll: has joined #ruby