Skip to content

Instantly share code, notes, and snippets.

View jnicklas's full-sized avatar

Jonas Nicklas jnicklas

View GitHub Profile
Compiling graphers v0.1.0 (file:///Users/jonasnicklas/Projects/graphers)
src/parse/grammar.rs:390:13: 390:60 error: unreachable pattern [E0001]
src/parse/grammar.rs:390 Some((__loc1, Tok::Identifier(__tok0), __loc2)) => {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/parse/grammar.rs:390:13: 390:60 help: run `rustc --explain E0001` to see a detailed explanation
src/parse/grammar.rs:438:13: 438:60 error: unreachable pattern [E0001]
src/parse/grammar.rs:438 Some((__loc1, Tok::Identifier(__tok0), __loc2)) => {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/parse/grammar.rs:438:13: 438:60 help: run `rustc --explain E0001` to see a detailed explanation
src/parse/grammar.rs:481:13: 481:45 error: unreachable pattern [E0001]
<!doctype html>
<html>
<body>
<ul>
</ul>
<script>
(function() {
var a = 10, b = 20;
@jnicklas
jnicklas / test.md
Last active December 7, 2015 13:24

| hello | world | | ----- + ------| | Fooo | Bar |

@jnicklas
jnicklas / post.md
Last active October 14, 2015 20:30
Why do .env files exist?

Why do .env files exist?

Lately I've seen a lot of projects use .env files to store application configuration, files which look something like this:

FOO=bar
Bar=baz
class Underscore < BasicObject
def initialize(invocations = [])
@invocations = invocations
end
def to_proc
invocations = @invocations
::Kernel.lambda do |val|
invocations.reduce(val) do |val, (name, args, block)|
val.send(name, *args, &block)
require 'benchmark/ips'
require 'memoit'
class Tested
def manual
@manual ||= 123
end
def manual_hash(key)
@manual_hash ||= {}
standard_error.rs:14:28: 14:35 error: cannot infer an appropriate lifetime for pattern due to conflicting requirements
standard_error.rs:14 StandardErrorWrapped(ref err) => err.description()
^~~~~~~
standard_error.rs:14:40: 14:43 note: first, the lifetime cannot outlive the expression at 14:39...
standard_error.rs:14 StandardErrorWrapped(ref err) => err.description()
^~~
standard_error.rs:14:40: 14:43 note: ...so that pointer is not dereferenced outside its lifetime
standard_error.rs:14 StandardErrorWrapped(ref err) => err.description()
^~~
standard_error.rs:12:5: 15:6 note: but, the lifetime must be valid for the match at 12:4...
# Activate the gem you are reporting the issue against.
gem 'activerecord', '4.1.7'
require 'active_record'
require 'minitest/autorun'
require 'logger'
# Ensure backward compatibility with Minitest 4
Minitest::Test = MiniTest::Unit::TestCase unless defined?(Minitest::Test)
# This connection will do for database-independent bug reports.
@jnicklas
jnicklas / config.ru
Created July 21, 2014 20:22
Minimal Rails app
require 'bundler/setup'
require "action_controller/railtie"
Bundler.require(:default, Rails.env)
module Blurgh
class Application < Rails::Application
config.secret_key_base = "xyz"
end
end
fn join(&self) -> String {
...
}
fn join(&self, separator: String) -> String {
...
}
// compile error, because the first parameter's type doesn't match the type of to_str already declared.
fn join(separator: String) -> String {