Debugging an Amber project on VSCode with GDB and Native Debug.
- Crystal
- Amber Project
- GNU Debugger (GDB)
- VSCode + Crystal Support + Native Debug.
# Huffman Tree generator for Ruby and Crystal | |
# @faustinoaq | |
# Jan, 2017 | |
class Element | |
def initialize(sym = '\0', fr = 1.0) | |
@ch = nil | |
if sym != '\0' | |
@ch = [Element.new] |
# Tic Tac Toe on Crystal based on C implementation https://gist.github.com/MatthewSteel/3158579 | |
def grid_char(i) | |
case i | |
when -1 | |
'X' | |
when 0 | |
' ' | |
when 1 | |
'O' |
<?xml version="1.0"?> | |
<m> <p x="0.550563524346" y="0.758024984088" z="-0.349682612032"/> | |
<p x="0.62319582135" y="0.436643142534" z="0.648821804759"/> | |
<p x="0.975676690271" y="-0.177816333299" z="-0.12820432003"/> | |
<p x="-0.32007250628" y="0.0780544757795" z="0.944172171553"/> | |
<p x="0.437594031513" y="-0.598061218782" z="0.671441912732"/> | |
<p x="0.32007250628" y="-0.0780544757795" z="-0.944172171553"/> | |
<p x="0.250253520018" y="-0.916161840828" z="-0.313082508502"/> | |
<p x="-0.437594031513" y="0.598061218782" z="-0.671441912732"/> | |
<p x="-0.62319582135" y="-0.436643142534" z="-0.648821804759"/> |
Debugging an Amber project on VSCode with GDB and Native Debug.
require "kemal" | |
get "/stream" do |env| | |
env.response.print "START" | |
env.response.flush | |
sleep 3 | |
env.response.print "MIDDLE" | |
env.response.flush | |
sleep 5 | |
env.response.print "END" |