#ruby - 05 October 2018
« Back 1 day Forward 1 day »
[00:03:24] JJonah: Nice trick here: `meta_klass = class << self; self end`. I've been doing a lot of meta-programming lately but never thought to do that. Thanks for sharing.
[00:10:26] cthu|: in this log file I have lines that start with garbage or Category: or Action: or Label: C,A,L lines go one after another.
[00:12:05] cthu|: but I don't have access to the next lines from here and I don't want awkward logic
[00:15:24] JJonah: cthu: if the file large enough to load into memory, do one pass where you filter out the junk, then each_slice to get your C,A,L lines as chunks, then map to make the objects.
[01:00:16] aleph-: Hey there, so I was curious if anybody had a good quick primer for Ruby centered towards admins/devops?
[01:07:11] aleph-: baweaver: Intermediate in Python, Bash, Rust, semi competent in C, Java and x86/MIPS/Thumb ASM, meh in Haskell, Scheme, etc.
[01:07:55] baweaver: Past that it depends heavily on what you want to do or what type of work it is.
[01:09:30] aleph-: Gotcha, mainly scripts to plug in to the k8s api, general scripting work, plugins for Chef, auto provisioning over ssh in a pinch, graphing of data etc.
[02:39:12] edwardthefma: ACTION is looikng for someone who can dev a rbot plugin using My anime list plugin
[03:55:54] baweaver: Did a writeup on destructuring in Ruby: https://medium.com/@baweaver/destructuring-in-ruby-9e9bd2be0360
[03:58:23] sp3ncer: I'm trying to build a gem for an executable ruby project and am having a lot of trouble
[04:10:47] uplime: is there a method for arrays like collect, but if the return value is nil don't add it to the array?
[09:35:44] asphyxia: hey y'all, I have a uni assignment that is asking me to create a method with a parameter of (a). And I have no idea what they mean. Is that a built in ruby thing? so method_name(a) <-- I'm currently thinking they mean a for array?
[10:49:14] canton7: asphyxia, that just means a method which has a single parameter, called 'a'. It could be an array, or anything else: there's no enough information to say
[11:23:38] zenspider: working on a emacs mode to color methods based on flog scores... I'm undecided on how to do the score -> shading at this point. Suggestions?
[11:24:12] zenspider: (right now it goes from white through pink all the way up to full red linearly
[16:21:23] havenwood: edwardthefma: In the meantime, here's a little wrapper around TupleSpace - Ruby's lesser-used, thread-safe data structure: https://gist.github.com/havenwood/08e859ddd53c84be6c56
[21:27:23] apeiros: just wanted to check the logs. but new macbook, so my keychain is in disarray… :-S
[21:28:25] apeiros: since when is the verify step when mounting a disk image mandatory? is that a mojave thing? o0
[21:30:30] havenwood: ed25519 ftw, it's time: https://latacora.micro.blog/2018/08/03/the-default-openssh.html
[21:30:33] apeiros: wanted to do that too. but new laptop. thought maybe it fixes my stupid target disk mode issues.
[21:35:39] ruby[bot]: apeiros: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `' for nil:NilClass
[21:36:03] apeiros: ah yeah, eval.in still broken. but don't know why it failed to recognize it as a command before. that's new and weird.
[21:36:48] apeiros: well, my 3 month work timeout is soon-ish. will devote a few days for bot & website updates.
[22:29:33] StuckMojo: hi. i've got a rakefile that's causing rake to bail immediately with "Don't know how to build task 'coverage'" and the only mention of "coverage" in it is: Rake::Task[:coverage].clear along with a comment about rcov not working. am i reading that right (zero ruby experince) as being a line that's supposed to *remove* the coverage task?