#ruby - 31 January 2016
« Back 1 day Forward 1 day »
[00:34:21] volty: Ox0dea: I got crazy with passing a Float to a qt lib that expects qreal. In the end I did it passing a string ( "%f" % the_num), and converted it on c's side with atof
[00:34:33] Ox0dea: volty: If you're wanting to go from a Ruby float to a C floating-point type, you want NUM2DBL().
[00:44:51] volty: damn, I messed so much, had an idiot decl on c's side, like void set_value(VALUE, qreal)"
[01:11:56] bottiger: I have small ruby "hello world" script in utf-32. However, when I run it nothing is printed to stdout. "ruby s.rb" runs, but "ruby s.rb | hexdump" doesn't show anything
[01:18:21] bottiger: volty: yeah, that screenshot turned out pretty bad :( but no, since I pipe the result into hexdump I should see whatever it prints
[01:21:30] bottiger: volty: hmm - I had that error in my shell before. I don't know why I doesn't see it now
[01:56:04] Pintor: someone knows where can I see some codes made by another users (to take it as examples)?
[02:00:06] volty: ops, that's italian, here are the english ones https://www.google.it/search?q=ruby+code+examples // np :)
[03:51:23] ChanServ: ChanServ kicked thepower1488: Unacceptable nick - http://ruby-community.com/pages/user_rules#rule_2_10
[12:14:01] Voyage: my redmine says Installed: 3.0~20140825-8 in ubuntu "apt-cache policy redmine" but 2.5 in url/redmine/information page
[12:51:46] Voyage: my redmine says Installed: 3.0~20140825-8 in ubuntu "apt-cache policy redmine" but 2.5 in url/redmine/information page. Any clue why?
[12:57:30] Papierkorb: Voyage: please note that your question was cross-posted in #RubyOnRails. Everything else is unfair.
[12:59:22] Papierkorb: Voyage: the difference is *a single minute*. Have some patience. That is cross-posting.
[13:04:22] apeiros: Voyage: it's irrelevant. when you cross-post, inform the channels that you're doing so.
[13:04:59] Voyage: my redmine says Installed: 3.0~20140825-8 in ubuntu "apt-cache policy redmine" but 2.5 in url/redmine/information page. Any clue why?
[13:06:25] Papierkorb: Why are you using that outdated version anyway? Why are you not just downloading the current one yourself?
[13:06:28] shevy: I am sure the debian/ubuntu folks have some policy to follow pertaining to above oddities
[14:15:55] Ox0dea: Regarding the difficulty of typing `bundle`, "neurotoxicity" and "antiskepticism" are quite fun.
[14:17:33] Ox0dea: The latter is the longest entry in words-insane that's typed with alternating hands, to clarify.
[14:46:12] Ox0dea: Hey, a Pry bug! It treats `?\\` as a continuation even though it should immediately evaluate to "\\".
[14:48:34] Ox0dea: It makes sense to have a character type and Ruby shouldn't've done away with the one it had. :(
[14:49:23] ruby[bot]: Ox0dea: # => #<ArgumentError: %c requires a character> (https://eval.in/510745)
[15:12:27] seydar: i've got a rack proxy sitting at :80 that redirects traffic to :4000-4006 based on subdomain http://lpaste.net/151314
[15:14:03] seydar: about once a day, it hangs and can't recover itself, and its logs are a mess http://lpaste.net/151316
[18:18:37] pushrax: what's the absolute worst thing you could do in ruby if you can call any global method without any arguments?
[18:22:46] Zarthus: if you suspect such an issue to be present you should also probably be handling it with the devs in private.
[18:24:02] pushrax: In JS it's really easy to reference `window` but I don't think the same is true for Ruby and Kernel
[18:25:12] jhass: wait, it doesn't have a manual map from "functions" or whatever you call it to methods?
[18:25:56] apeiros: pushrax: hm? not knowing liquid - but generally you can always reference Kernel via ::Kernel
[18:26:27] apeiros: and short of either having your own evaluator or a proper sandbox, there's nothing you could do against that - afaik.
[18:26:54] pushrax: jhass: there is usually no send, but something I found makes it possible to send under very specific situations
[18:27:28] jhass: yeah I mean I'd avoid using send at all in the codebase when I'd make the promises liquid makes
[18:27:46] pushrax: if you're using to_liquid and Liquid::Drop correctly then it's impossible to do anything bad
[19:09:08] shevy: wheeee yorickpeterse used to do ruby-gtk! https://github.com/YorickPeterse/ruby-gtk3
[20:02:59] yorickpeterse: shevy: heh yeah, back in the day I thought I could just write a GTK3 wrapper in Ruby
[22:12:35] Ox0dea: Negative, Glenboi. Systems largely on standby due to weekend conditions. Radio silence for the next T-minus six hours.
[22:31:15] shevy: I here have PREFIX/lib/ruby/gems/2.3.0/ ... have to go away from the computer for a while, be back in half an hour or so
[22:38:29] Atomic_LduoX: hi. any way to obfuscate a string except first and last character with gsub? like "a string" to "a *****g"
[22:48:11] baweaver: >> def obfuscate(str) str + str[1..-2].gsub(/\w/, '*') + str[-1] end; obfuscate 'a string'
[23:14:26] ruby-lang782: Hi, I am looking for a ruby library that would monitor live stream video, the task is to monitor live stream; been looking for days with no success. Please can anyone suggest, Thanks in advance.
[23:28:17] ruby[bot]: volty: # => undefined local variable or method `v' for main:Object ...check link for more (https://eval.in/510846)
[23:29:28] volty: 1) how to get rid of warning when using it with if 2) anything simpler to 'fire' just once ?
[23:35:22] volty: asynchronous code (btw), I have booleans that I have to test against for true and set to false -> do_it() if @tick && !(@tick = false)