SpComb

Activity Graph

Page 1 of 1

2017-10-31

[10:01:41] SpComb: Ping timeout: 248 seconds

2017-10-04

[04:17:04] SpComb: Ping timeout: 240 seconds
[04:24:08] SpComb: has joined #ruby

2017-09-04

[14:12:49] SpComb: but that function will be locked by the GVL
[14:13:24] SpComb: https://www.jstorimer.com/blogs/workingwithcode/8100871-nobody-understands-the-gil-part-2-implementation
[14:14:02] SpComb: it's an MRI C function. Between the call to getpwnam and setup_passwd (which I assume copies the strings), it's implicitly locked against any other ruby threads
[14:14:18] SpComb: yeah, not safe against other non-ruby threads, if that's a concern
[14:19:21] SpComb: riton: then you can ignore all of those links
[14:21:15] SpComb: yeah, I would be surprised if the jruby implementation of that didn't use getpwnam_r
[14:28:48] SpComb: https://github.com/jnr/jnr-posix/blob/cc072ac7ce89410e881bbd140c88a58334024cba/src/main/java/jnr/posix/BaseNativePOSIX.java#L192 AFAICT it does actually call getpwnam though, not _r
[14:28:55] SpComb: so I'm surprised

2017-08-15

[22:18:19] SpComb: Ping timeout: 246 seconds
[22:19:59] SpComb: has joined #ruby

2017-08-07

[16:05:23] SpComb: has joined #ruby

2017-08-06

[19:07:55] SpComb: *.net *.split

2017-07-13

[10:20:13] SpComb: https://gist.github.com/SpComb/6f8dca298474b7f88fb52b7e0ef603ad I noticed something odd on alpine linux ruby 2.3.3... OpenSSL does not respect the SSL_CERT_FILE= env?

2017-06-20

[00:17:11] SpComb: *.net *.split
[00:23:08] SpComb: has joined #ruby

2017-06-07

[22:34:48] SpComb: Ping timeout: 240 seconds
[22:36:49] SpComb: has joined #ruby

2017-05-30

[21:51:06] SpComb: Ping timeout: 240 seconds
[21:53:05] SpComb: has joined #ruby

2017-05-24

[08:51:05] SpComb: kassav_: https://rubygems.org/gems/vmstat/

2017-05-23

[12:23:55] SpComb: require './helpers' or require_relative 'helpers'
[12:24:30] SpComb: require normally looks in the $LOAD_PATH

2017-05-22

[08:25:30] SpComb: /bin/grep
[08:33:55] SpComb: depending on the substring, something optimized like grep is presumably going to be significantly faster than `lines.each do line.include? ... end`. How much that matters depends on how big your logfiles are
[08:37:53] SpComb: http://blog.burntsushi.net/ripgrep/#mechanics also this blog post about benchmarking grep implementations
[08:50:12] SpComb: for a 35MB logfile with 300k lines, grepping for 'foo' with 12 matches, ruby -e `STDIN.read.split("\n").each do |line| puts line if line.include? "foo" end` is ~1100ms real 600ms user, ruby -e `'STDIN.each do ... end` is ~600ms real 460ms user, and `grep -F` is ~130ms real 50ms user
[08:50:27] SpComb: so an ~order of magnitude difference for grep vs ruby loop with String#include?
[08:52:08] SpComb: you might already start noticing that difference with 1GB logfiles :)

2017-04-25

[12:04:13] SpComb: morfin: JSON.parse() and JSON.load() behave differently. JSON.parse expects a JSON object, whereas JSON.load will also parse scalars
[12:05:03] SpComb: not that the stdlib docs would actually tell you that
[12:07:34] SpComb: JSON.load() uses load_default_options which includes `quirks_mode: true`, and indeed, `JSON.parse('1', quirks_mode: true) => 1`
[12:08:00] SpComb: (the quirks_mode option is also undocumented in the stdlib docs)

2013-01-09

[13:01:15] SpComb: if I have debian redmine installed in /usr/share/redmine, using debian rails 2.3, is the CVE-2013-0156 workaround just config/initializers/cve-2013-0156.rb: `ActionController::Base.param_parsers.delete(Mime::XML)`? How can I test if it worked?
[13:01:48] SpComb: I tried some `curl -v -H 'Content-type: text/xml' -X POST -d '...'` but not sure what kind of error I should be getting