module Developer | |
extend self | |
delegate :establish_connection, :clear_all_connections!, :to => ActiveRecord::Base | |
def delayed_debug(scope) | |
detach_process do | |
close_io_objects | |
establish_connection | |
setup_process_name | |
notify_developers |
This guide likely applies to other models and, potentially, even laptops from other OEMs that have NVME drives. However, I've only tested this on my Dell XPS 15 (9560) with the OEM Windows installation from the Signature Edition model.
Switching from RAID to AHCI is significantly simpler than switching from AHCI to RAID. All that's needed is a successful boot to Safe Mode.
- To set the default boot mode to Safe Mode, use
msconfig.exe
or open an admin cmd/PowerShell window and run:
Ruby | Core methods written in Ruby | Total number of core methods | % written in Ruby |
---|---|---|---|
CRuby 2.3 | 3 | 1637 | 0.2% |
CRuby 2.4 | 3 | 1636 | 0.2% |
CRuby 2.5 | 6 | 1680 | 0.4% |
CRuby 2.6 | 5 | 1767 | 0.3% |
CRuby 2.7 | 38 | 1802 | 2.1% |
CRuby 3.0 | 89 | 1830 | 4.9% |
CRuby 3.1 | 112 | 1884 | 5.9% |
CRuby 3.2 | 128 | 1924 | 6.7% |
I've been using this technique in most of my Ruby projects lately where Ruby versions are required:
- Create
.rbenv-version
containing the target Ruby using a definition name defined in ruby-build (example below). These strings are a proper subset of RVM Ruby string names so far... - Create
.rvmrc
(withrvm --create --rvmrc "1.9.3@myapp"
) and edit theenvironment_id=
line to fetch the Ruby version from.rbenv-version
(example below).
Today I learned about another Ruby manager, rbfu, where the author is using a similar technique with .rbfu-version
.
require 'rubygems' | |
require 'rack' | |
class Object | |
def webapp | |
class << self | |
define_method :call do |env| | |
func, *attrs = env['PATH_INFO'].split('/').reject(&:empty?) | |
[200, {}, send(func, *attrs)] | |
end |
# will substitute :author with the variable author in your file (also works with defaults). | |
permalink: /:author/:slug/ | |
# You need to have this extra permalink_custom_vars array to tell the plugin which substitutions to make | |
permalink_custom_vars: ['author'] | |
# Note that you don't have to include the supported variables in this list as jekyll takes care of that | |
# For a complete list of variables jekyll supports, see: https://jekyllrb.com/docs/permalinks/#template-variables |
require "json" | |
struct = { "a" => 1, "b" => 2, "c" => [1, 2, 3], "d" => [{ "e" => 3 }, nil, false, true, [], {}] } | |
source = JSON.dump(struct) | |
tokens = [] | |
index = 0 | |
until source.empty? | |
tokens << |
Last night, Brian Shirai unilaterally "ended" the RubySpec project, a sub-project of Rubinius (the alternative Ruby implementation which Brian was paid to work on full-time from 2007 to 2013). The blog post describing his reasons for "ending" the project led to a big discussion on Hacker News.
When a single, competing Ruby implementation tells that you its test suite is the One True Way, you should be skeptical. Charles Nutter, Ruby core committer and JRuby head honcho, spent a lot of time last night on Twitter talking to people about what this decision means. He's probably too busy and certainly too nice of a guy to write about what is a political issue in the Ruby community, so I'm going to do it on behalf of all the new or intermediate Rubyists out there that are confused by Brian's decision and what it me
-
Add Graal JIT Compilation to Your JVM Language in 5 Steps, A Tutorial http://stefan-marr.de/2015/11/add-graal-jit-compilation-to-your-jvm-language-in-5-easy-steps-step-1/
-
The SimpleLanguage, an example of using Truffle with great JavaDocs. It is the officle getting-started project: https://github.com/graalvm/simplelanguage
-
Truffle Tutorial, Christan Wimmer, PLDI 2016, 3h recording https://youtu.be/FJY96_6Y3a4 Slides