#ruby - 13 June 2017
« Back 1 day Forward 1 day »
[00:24:28] matthewd: zenspider: Not AFAIK: https://github.com/rails/rails/blob/master/activesupport/lib/active_support/core_ext/object/duplicable.rb
[00:27:25] matthewd: We monkey with core classes more than most, but even we don't like to change behaviour of existing methods when we can avoid it
[00:32:10] matthewd: I guess the [very theoretical] risk would be on something like Method -- not dup-able, but mutable. So if someone thinks they've got a copy and starts changing it, ...
[00:36:57] matthewd: Particularly with upstream moving towards making [almost] everything support dup, it does seem more justifiable for us to backport that behaviour
[00:39:21] matthewd: Apparently Method is literally the only thing left in trunk.. and I wonder whether that's deliberate or just an oversight
[01:34:38] catphish: i am trying to rewrite it to use pure EM, the alternative of dropping EM is less pleasant
[01:35:26] catphish: whoever wrote this code was naive to the fact that 2 libraries they used were thread driven and EM driven :(
[01:41:16] bsamorim: Hi guys! I've been trying to mess around a bit with ruby's bnf grammar. From the grammar file, it seems to me that the parsing is preceded by a tokenizing stage
[01:44:11] bsamorim: zenspider: Yes... actually, not exactly its bnf, but rather the yacc code defined in 'parse.y'
[01:46:28] bsamorim: zenspider: you know, that's the amazing thing about computers: they save you a lot of trouble, if you know how to use them :)
[05:54:43] dminuoso: zenspider: Such truth.. the Ruby lexer is one of the most strange things I have ever read.
[07:28:27] devilsadvocate: would there be anything wrong with this piece of code https://pastebin.com/vcQ6RsgL
[07:28:29] ruby[bot]: devilsadvocate: we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/d713769fac5c77301fec7efd63dfbc7d
[07:28:30] ruby[bot]: devilsadvocate: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[07:30:29] devilsadvocate: what I mean is, can the laziness in anyway cause the sort or select to work on a smaller chunk?
[09:35:30] zenspider: what doesn't make sense to me is how you think going lazy works in the context of sorting. how do you sort lazily?
[10:22:30] ddffg: hi , i use capybara/poltergeist , i want to dump http req headers? is it possible&
[10:23:00] ddffg: hi , i use capybara/poltergeist , i want to dump http req headers, is it possible?
[10:58:50] KrzaQ: I want to install ruby on a Windows machine that cannot connect to the internet, but the new rubyinstaller requires 'ridk install' that attempts to download msys2. How can I install this offline?
[11:07:53] KrzaQ: it's a machine connected to production plotter that doesn't seem to have non-windows drivers and I am hoping to use ruby to generate documents to be plotted
[11:08:17] KrzaQ: the machine isn't connected to the internet due to company policy, I can only RDP to it
[11:11:17] ChilledOut: Hi all ...I am new to Ruby..got PowerShell background.Is Ruby a good language to start with programming?Mainly wanna learn it for Chef
[11:13:04] ChilledOut: @universal :thanks..please suggest me a book I can read to start from scratch ? I know nothing about classes,objects etc...
[11:18:05] ChilledOut: universal: Thank you.The name itself sounds so good.Just reading the preface.Thanks again universal
[13:04:48] frsnow: hi there, I have an old ruby book (v1.9) can I use it for reference to learn ruby?
[13:31:08] umdstu: is there a way to generate header files when building ruby from source on centos?
[14:49:20] mark_66: has left #ruby: ("PART #elixir-lang :PART #crystal-lang :PONG :wolfe.freenode.net")
[20:48:06] Xyvir: Anyways, all that I'm trying to do is add a newline inside a text widget. This should be relatively simple right? I tried adding data-text="foo \n bar" in home.erb but this didn't seem to work. Am I missing something?
[21:04:13] anotherpi: Case Equality – For class Object, effectively the same as calling #==, but typically overridden by descendants to provide meaningful semantics in case statements.
[21:05:23] matthewd: (okay, it's called a type of equality because it uses equals signs.. but it's not equality by your intuitive definition)
[21:12:51] havenwood: anotherpi: It's for internal object implementation for elegant case statement handling.
[22:09:07] catphish: i'm thinking it should be possible with a special kind of IO that triggers after a timeout, but i forget how
[22:11:44] matthewd: You can #wakeup a selector from the timer's thread (if you don't need extra info), or monitor an IO.pipe (I think?)
[22:14:12] catphish: http://bogomips.org/sleepy_penguin/ provides a timerfd, linux specific but beautifully doesn't need a thread
[22:54:50] haylon: well, this is silly. For some reason when I print the lines of a file, and specify, unless line.eof!, it erases the file.
[22:57:02] haylon: anyone know of a gem or method to remove white space and empty lines from the end of a file?
[22:57:37] zenspider: weeks and weeks of work: http://www.zenspider.com/releases/2017/06/sexp_processor-version-4-10-0b1-has-been-released.html
[22:58:08] zenspider: haylon: "when I print the lines of a file" ... "it erases the file" does not compute
[22:59:14] haylon: give me a sec, asking someone near me to make sure I'm doing this correctly. but yes, for some reason when I comment out the .eof! part, its doesn't wipe the file its reading. Hold on
[23:15:58] haylon: yeah, for whatever reason, when I was printing the lines that were .eof? of a file, my file was being wiped out. I just changed my method to be #gsub!(/\s+$/, '') now its not happening.
[23:22:27] haylon: it shoudln't have nuked anything, it was just a puts statement, it should've just printed the line
[23:23:13] ruby[bot]: zenspider: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `' for nil:NilClass
[23:26:27] zenspider: that's what he called for, I thought. I dunno. no real example of his code so I have no idea how he thought he'd get help or why he shared anything at all for that matter