This file contains hidden or 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
<system_prompt> | |
<credit>https://www.blog.philodev.one/posts/2024-07-writing-documentation</credit> | |
<persona> | |
You are an expert Technical Writer AI. Your core function is to create clear, accurate, accessible, and audience-centric technical documentation that is genuinely useful and easy to understand. | |
You MUST embody and apply the following principles in all your outputs: | |
</persona> | |
<principles> |
This file contains hidden or 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
module Clarity | |
alias Value = Nil | String | Bool | | |
Int64 | | |
Int32 | | |
Float64 | | |
Array(Value) | | |
Hash(String, Value) | |
def self.dismantler(a) |
This file contains hidden or 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
# Acts like an array and receives futures. Will yield them as | |
# they become ready. | |
class HackedMultiplexer | |
include Celluloid | |
include Enumerable | |
def initialize | |
@not_ready = [] | |
end |
This file contains hidden or 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 'celluloid/current' | |
class Mocker | |
include Celluloid | |
MAX_INTERVAL = 20 | |
MAX_WORK = 30 | |
MAX_ID = 1000 | |
attr_reader :id | |
def initialize(id) | |
@id = id |
This file contains hidden or 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
module System | |
extend self | |
def cpu_count | |
return Java::Java.lang.Runtime.getRuntime.availableProcessors if defined? Java::Java | |
return File.read('/proc/cpuinfo').scan(/^processor\s*:/).size if File.exist? '/proc/cpuinfo' | |
require 'win32ole' | |
WIN32OLE.connect("winmgmts://").ExecQuery("select * from Win32_ComputerSystem").NumberOfProcessors | |
rescue LoadError | |
Integer `sysctl -n hw.ncpu 2>/dev/null` rescue 1 | |
end |
This file contains hidden or 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
# | |
# A fatal error has been detected by the Java Runtime Environment: | |
# | |
# SIGSEGV (0xb) at pc=0x00007f425049b4c1, pid=19966, tid=139922265310976 | |
# | |
# JRE version: Java(TM) SE Runtime Environment (8.0_25-b17) (build 1.8.0_25-b17) | |
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.25-b02 mixed mode linux-amd64 compressed oops) | |
# Problematic frame: | |
# V [libjvm.so+0x3e94c1] CallGenerator::for_method_handle_inline(JVMState*, ciMethod*, ciMethod*, bool&)+0x591 | |
# |
This file contains hidden or 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
$ gem install nio4r -v '1.0.0' | |
ERROR: Error installing nio4r: | |
ERROR: Failed to build gem native extension. | |
/Users/qrohlf/.rbenv/versions/2.2.0/bin/ruby -r ./siteconf20150120-2702-11w6zzo.rb extconf.rb | |
checking for rb_thread_blocking_region()... no | |
checking for sys/select.h... yes | |
checking for poll.h... yes | |
checking for sys/epoll.h... no | |
checking for sys/event.h... yes |
This file contains hidden or 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 Muile | |
include Celluloid | |
def router method, *args | |
puts "Called Muile.#{method}" | |
if respond_to? "#{method}!" | |
puts "Calling Muile.#{method}!" | |
send "#{method}!", *args | |
else |
This file contains hidden or 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
NoMethodError: undefined method `request_path' on an instance of HTTP::Parser. | |
kernel/delta/kernel.rb:81:in `request_path (method_missing)' | |
/mu/penultimatix/reel/lib/reel/request_parser.rb:14:in `__script__' | |
/mu/penultimatix/reel/lib/reel/mixins.rb:51:in `path' | |
/mu/penultimatix/reel/lib/reel/rack_worker.rb:135:in `env' | |
/mu/penultimatix/reel/lib/reel/rack_worker.rb:95:in `request_env' | |
/mu/penultimatix/reel/lib/reel/rack_worker.rb:74:in `handle_request' | |
/mu/penultimatix/reel/lib/reel/rack_worker.rb:65:in `handle' | |
/usr/local/rvm/gems/rbx-head/bundler/gems/celluloid-594e63068e98/lib/celluloid/calls.rb:25:in `dispatch' | |
/usr/local/rvm/gems/rbx-head/bundler/gems/celluloid-594e63068e98/lib/celluloid/calls.rb:67:in `dispatch' |
This file contains hidden or 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
root@two:~# cat /root/.rbx/rubinius_last_error_7339 | |
Rubinius Crash Report #rbxcrashreport | |
Error: signal SIGSEGV | |
[[Backtrace]] | |
ruby[0x5904a0] | |
/lib/x86_64-linux-gnu/libpthread.so.0(+0xfcb0)[0x7fdd3877acb0] | |
ruby(_ZN8rubinius11MachineCode11interpreterEPNS_5StateEPS0_PNS_20InterpreterCallFrameE+0x41eb)[0x5b5c5b] | |
ruby(_ZN8rubinius11MachineCode19execute_specializedINS_12TwoArgumentsEEEPNS_6ObjectEPNS_5StateEPNS_9CallFrameEPNS_10ExecutableEPNS_6ModuleERNS_9ArgumentsE+0x2a5)[0x5ef465] |
NewerOlder