This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'bundler/inline' | |
gemfile do | |
source 'https://rubygems.org' | |
gem 'dry-monads' | |
gem 'rspec' | |
end | |
module ConvertToUpperCase |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
There was a problem expanding macro 'sequential' | |
Code in src/minimal_example.cr:8:1 | |
8 | sequential do | |
^ | |
Called macro defined in src/minimal_example.cr:1:1 | |
1 | macro sequential(&block) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ResultError < Exception; end | |
abstract class Result(V, E) | |
abstract def value : V | |
abstract def error : E | |
abstract def ok? : Boolean | |
abstract def error? : Boolean | |
abstract def andThen(&block : self -> self) : self |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Error in /Users/andy/projects/consider_crystal/macro.cr:6: expanding macro | |
JSON.mapping( | |
^~~~~~~ | |
in /Users/andy/projects/consider_crystal/macro.cr:6: expanding macro | |
JSON.mapping( | |
^ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Error in /Users/andy/projects/consider_crystal/macro.cr:6: expanding macro | |
JSON.mapping( | |
[32;1m^~~~~~~[0m | |
in /Users/andy/projects/consider_crystal/macro.cr:6: expanding macro | |
JSON.mapping( | |
[32;1m^[0m |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "benchmark" | |
Benchmark.bm do |x| | |
(1..10).each do |i| | |
x.report "ENV[PATH]: in a block" do | |
# i.times { C.getenv("PATH") } | |
i.times { 1 * i } | |
end | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0x87463408915D544Ca4a4dFA90A68e7735024C124 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
user system total real | |
Run 0 14.010000 0.470000 14.480000 ( 2.773481) | |
Run 1 2.700000 0.210000 2.910000 ( 0.635449) | |
Run 2 1.170000 0.010000 1.180000 ( 0.300033) | |
Run 3 1.930000 0.080000 2.010000 ( 0.372750) | |
Run 4 1.430000 0.020000 1.450000 ( 0.325396) | |
Run 5 1.460000 0.020000 1.480000 ( 0.346627) | |
Run 6 1.350000 0.060000 1.410000 ( 0.366876) | |
Run 7 1.230000 0.020000 1.250000 ( 0.356951) | |
Run 8 1.020000 0.010000 1.030000 ( 0.452953) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# frozen_string_literal: true | |
require 'bundler/setup' | |
require_relative '../config/environment' | |
require 'rack' | |
# Take the whole script down if anything goes remotely wrong | |
Thread.abort_on_exception = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu | |
MAINTAINER Andy Nicholson <andrew@anicholson.net> | |
RUN apt-get update && \ | |
apt-get install -y apt-transport-https && \ | |
apt-key adv --keyserver keys.gnupg.net --recv-keys 09617FD37CC06B54 && \ | |
echo "deb https://dist.crystal-lang.org/apt crystal main" > /etc/apt/sources.list.d/crystal.list && \ | |
apt-get update && \ | |
apt-get install -y crystal |
NewerOlder