DevHeads.net

Postings by Charles Oliver Nutter

JRuby Summer of Code Student Proposals Open!

It's now time for students to start entering proposals! We would like
you to get proposals in as early as possible, so we can work with you
to improve them and iron out details.

No tests for PKCS7::write_smime

Issue #8274 has been reported by headius (Charles Nutter).

Author: headius (Charles Nutter)
Status: Open
Priority: Normal
Assignee:
Category: test
Target version:
ruby -v: 2.0.0

There are no tests for OpenSSL::PKCS7::write_smime.

That is all :-)

A recent pull request for JRuby attempts to implement write_smime, but we have no way to confirm it is working correctly (and I do not understand it well enough to implement a test).

<a href="https://github.com/jruby/jruby/pull/634" title="https://github.com/jruby/jruby/pull/634">https://github.com/jruby/jruby/pull/634</a>

Transfer feature tracking to CommonRuby

Issue #8272 has been reported by headius (Charles Nutter).

Author: headius (Charles Nutter)
Status: Open
Priority: Normal
Assignee:
Category:
Target version:

If my proposal in #8271 is accepted, we'll need to:

1. Document in appropriate places that CommonRuby is the place to file and track feature changes.

Proposal for moving to a more visible, formal process for feature requests

Issue #8271 has been reported by headius (Charles Nutter).

Author: headius (Charles Nutter)
Status: Open
Priority: Normal
Assignee:
Category:
Target version:

Proposal for moving to a more visible, formal process for feature requests.

1.

Encouraging use of CommonRuby

I think we need to do more to encourage the use of the CommonRuby
project in bugs.ruby-lang.org.

There are currently 429 "feature" issues open in ruby-trunk. The
majority of these would affect all Ruby implementations, and are not
specific to MRI.

Top-level link for CommonRuby issues

I think we need CommonRuby available directly from the
bugs.ruby-lang.org home page. People don't know it exists, and you
have to drill down through "Ruby" to get to it.

Can someone make that happen?

- Charlie

Exception#cause to carry originating exception along with new one

Issue #8257 has been reported by headius (Charles Nutter).

Author: headius (Charles Nutter)
Status: Open
Priority: Normal
Assignee:
Category:
Target version:

Often when a lower-level API raises an exception, we would like to re-raise a different exception specific to our API or library.

JRuby's Google Summer of Code 2013!

Hello, friends!

I'm pleased to announce that JRuby will be participating in this
year's Google Summer of Code! We're looking for students and mentors
to help work on JRuby (and Ruby) related projects (and get paid doing
it, of course).

We have an ideas page here:
<a href="https://github.com/jruby/jruby/wiki/Google-Summer-of-Code-2013" title="https://github.com/jruby/jruby/wiki/Google-Summer-of-Code-2013">https://github.com/jruby/jruby/wiki/Google-Summer-of-Code-2013</a>

The JRuby GSoC mailing list for interested students and mentors is
here: https://groups.google.com/forum/#!forum/jruby-gsoc

If you won't or can't be a student or mentor, I hope you will pass
this information on to others.

Importance of ChangeLog?

I'm about to push my first significant commit and was wondering about
the ChangeLog policy. I ask because...

* It's usually duplicating information already in commit logs.
ChangeLog could be generated very easily if it's desired for src
dists.
* I see no consistency in when ChangeLog entries are added. A random
sample of about a dozen commits only found half of them added
ChangeLog entries.

Can someone clarify the situation? If ChangeLog is supposed to be
used, why isn't it used consistently? If it duplicates commit logs in
most cases, why use it at all?

- Charlie

Raise cached exceptions for nonblocking IO to avoid allocation/stack-copying costs

Issue #8208 has been reported by headius (Charles Nutter).

Author: headius (Charles Nutter)
Status: Open
Priority: Normal
Assignee:
Category:
Target version:
ruby -v: 2.0.0

Currently, all nonblocking IO APIs raise exceptions when the IO channel cannot perform the requested read or write without blocking.

Consistent hashing in the face of HashDOS?

It had to happen eventually...

We received a pull request recently for a change that makes JRuby's
hashing of Strings, Booleans, nil, and Symbols be consistent.
Basically, it provides hardcoded hashes for Booleans and nil, and
makes it possible to disable seeded hashes for String and Symbol.

PR: <a href="https://github.com/jruby/jruby/pull/590" title="https://github.com/jruby/jruby/pull/590">https://github.com/jruby/jruby/pull/590</a>

My question for ruby-core: at what point did you decide to make hash
for e.g.

Tidying up old quiet issues of mine

I've had a number of bugs outstanding for years that I want to get
eyes on. Many of these will just get closed right away.

Backport fix for time.send(:initialize) reinitializing and modifying value

Issue #8101 has been reported by headius (Charles Nutter).

Author: headius (Charles Nutter)
Status: Open
Priority: Normal
Assignee:
Category:
Target version:

I filed <a href="https://bugs.ruby-lang.org/issues/8099" title="https://bugs.ruby-lang.org/issues/8099">https://bugs.ruby-lang.org/issues/8099</a> to get Time to prevent reinitialization, and nobu fixed it in r39766. I am requesting that it be backported to 1.9.3 along with tests I will be adding shortly.

Time can be mutated by send :initialize

Issue #8099 has been reported by headius (Charles Nutter).

Author: headius (Charles Nutter)
Status: Open
Priority: Normal
Assignee:
Category:
Target version:
ruby -v: 2.0.0p0

It is possible to alter the value of a given Time object by re-sending :initialize.

resolv.rb checks platform based on RUBY_PLATFORM, which is insufficient for JRuby

Issue #8090 has been reported by headius (Charles Nutter).

Author: headius (Charles Nutter)
Status: Open
Priority: Normal
Assignee:
Category: lib
Target version: next minor

JRuby shares stdlib with MRI, and as a result we've had to patch a number of things.

Method#parameters (and friends) should provide useful information about core methods

Issue #8088 has been reported by headius (Charles Nutter).

Author: headius (Charles Nutter)
Status: Open
Priority: Normal
Assignee:
Category:
Target version:

I was wiring up #parameters to work for native methods today when I realized MRI doesn't give very good information about variable-arity native methods:

ext-jruby-local ~/projects/jruby $ ruby2.0.0 -e "p ''.method(:gsub).to_proc.parameters"
[[:rest]]

ex

Botched my first tiny commit...

Ok, something went haywire on my end and I committed a minor test
tweak with no commit message. Should I revert and re-commit properly
or just leave it?

- Charlie

Exception#backtrace_locations to go with Thread#backtrace_locations and Kernel#caller_locations

Issue #7895 has been reported by headius (Charles Nutter).

Author: headius (Charles Nutter)
Status: Open
Priority: Normal
Assignee:
Category:
Target version:

Thread#backtrace_locations and Kernel#caller_locations were added in Ruby 2.0.0, but no equivalent method was added to Exception to get backtrace locations.

Non-optional (required) keyword args

Issue #7701 has been reported by headius (Charles Nutter).

Author: headius (Charles Nutter)
Status: Open
Priority: Normal
Assignee:
Category:
Target version:

I would like to see keyword args expanded to include a non-optional form, to force callers to pass in keyword arguments.

Currently, we have required, optional, and rest positional args but only optional and rest keyword args.

Concurrent loads fail with mutex errors

Issue #7530 has been reported by headius (Charles Nutter).

Author: headius (Charles Nutter)
Status: Open
Priority: Normal
Assignee:
Category:
Target version:
ruby -v: ruby 2.0.0dev (2012-12-01 trunk 38126) [x86_64-darwin11.4.2]

I have no idea what's going on here.

jruby-1.7.0 ~/projects/vts-jruby $ cat bench_load_path.rb
require 'benchmark'

FAKE_PATHS = ARGV[0].to_i || 100
THREADS = 8
ITERATIONS_PER_THREAD = 1000

FAKE_PATHS.times do |i|
$:.unshift "foo

Test for HMAC signing with UTF-8 String

Issue #7512 has been reported by headius (Charles Nutter).

Author: headius (Charles Nutter)
Status: Open
Priority: Normal
Assignee:
Category:
Target version:
ruby -v: 2.0.0

From <a href="https://jira.codehaus.org/browse/JRUBY-7017" title="https://jira.codehaus.org/browse/JRUBY-7017">https://jira.codehaus.org/browse/JRUBY-7017</a>

Patch: <a href="https://gist.github.com/9bf14142e174891db0dc" title="https://gist.github.com/9bf14142e174891db0dc">https://gist.github.com/9bf14142e174891db0dc</a>

Provide options for core collections to customize behavior

Issue #7429 has been reported by headius (Charles Nutter).

Author: headius (Charles Nutter)
Status: Open
Priority: Normal
Assignee:
Category:
Target version: 2.0.0
ruby -v: 2.0.0

Many folks know that Matz is a fan of having a few classes that handle a wide range of behavior. For this reason, I think we're unlikely to get a set of parallelism-safe collections added to Ruby.

English.rb says that $_ is thread-local, but it is frame-local

Issue #7406 has been reported by headius (Charles Nutter).

Author: headius (Charles Nutter)
Status: Open
Priority: Normal
Assignee:
Category:
Target version:
ruby -v: 2.0.0preview1

system ~/projects/jruby/gist-4110634 $ jirb
irb(main):001:0> $_ = 'foo'
=> "foo"
irb(main):002:0> def blah; p $_; end
=> nil
irb(main):003:0> p $_
"foo"
=> "foo"
irb(main):004:0> blah
nil
=> nil

Not thread-local.

Blog post: Refining Ruby

Several folks requested that I summarize my thoughts on refinements in
a blog post, so here it is:
<a href="http://blog.headius.com/2012/11/refining-ruby.html" title="http://blog.headius.com/2012/11/refining-ruby.html">http://blog.headius.com/2012/11/refining-ruby.html</a>

Please comment on it and raise any concerns you might have.

- Charlie

Blog post: Refining Ruby

I've been trying to sort out Ruby 2.0's refinements from an
implementation and usability perspective, and I figured a blog post
might get more people involved in the discussion.

I've posted that here: <a href="http://blog.headius.com/2012/11/refining-ruby.html" title="http://blog.headius.com/2012/11/refining-ruby.html">http://blog.headius.com/2012/11/refining-ruby.html</a>

I'm really hoping folks will jump into the conversation to help
refinements move forward the right way (or else to help get them
removed) so that Ruby 2.0 isn't irreparably damaged by a bad feature
or bad implementations of it.

Thanks for your time :)

- Charlie

Missing tags for 2.0.0.preview1, 1.9.3p286, 1.9.3p327

Issue #7372 has been reported by headius (Charles Nutter).

Author: headius (Charles Nutter)
Status: Open
Priority: Normal
Assignee:
Category:
Target version:
ruby -v: multiple

All released versions of Ruby should have tags, so we can grab the right versions of stdlib to use in JRuby.

Invalid UTF-8 from emoji allowed through silently

Issue #7282 has been reported by headius (Charles Nutter).

Author: headius (Charles Nutter)
Status: Open
Priority: Normal
Assignee:
Category:
Target version:
ruby -v: 2.0.0

On my system, where the default encoding is UTF-8, the following should not parse:

ruby-2.0.0 -e 'p "Hello, \x96 world!\"}'

But it does.

Perf fix: use symbols instead of strings for const/ivar access methods

Issue #7161 has been reported by headius (Charles Nutter).

Author: headius (Charles Nutter)
Status: Open
Priority: Normal
Assignee:
Category:
Target version:
ruby -v: 2.0.0

From pull request: <a href="https://github.com/ruby/ruby/pull/195" title="https://github.com/ruby/ruby/pull/195">https://github.com/ruby/ruby/pull/195</a>

Fixes a number of places where literal, non-dynamic strings are used as the first argument for constant and instance variable get, set, and defined? methods.

ERB#run and ERB#result are not safe for concurrent use

Issue #7046 has been reported by headius (Charles Nutter).

Author: headius (Charles Nutter)
Status: Open
Priority: Normal
Assignee:
Category: lib
Target version:
ruby -v: 2.0.0.dev

ERB#run and ERB#result both accept an optional binding under which to execute the template. However, if none is given, they both use TOPLEVEL_BINDING by default.

float formatting inconsistently rounds half to even

Issue #7037 has been reported by headius (Charles Nutter).

Author: headius (Charles Nutter)
Status: Open
Priority: Normal
Assignee:
Category: core
Target version:
ruby -v: 2.0.0dev

MRI does not appear to consistently round half to even.