Skip to content

Instantly share code, notes, and snippets.

View unn4m3d's full-sized avatar
💎
sudo emerge -a dev-lang/crystal

unn4m3d

💎
sudo emerge -a dev-lang/crystal
  • FEFU
  • Russky Island, Russia
View GitHub Profile
local gml = require("gml")
local term = require("term")
local thread = require("thread")
local component = require("component")
local vpx, vpy, vpw, vph = term.getViewport()
local app = gml.create(vpx, vpy, vpw, vph)
app:addButton(0,0, 1, 1, 'X', app.close)
@unn4m3d
unn4m3d / log
Created December 22, 2017 12:48
$ crystal spec
BUG: trying to upcast Foo <- Bar
Error opening file 'crystal' with mode 'r': No such file or directory (Errno)
Failed to raise an exception: END_OF_STACK
[0x561ffb588175] *CallStack::print_backtrace:Int32 +117
[0x561ffb5530f6] __crystal_raise +86
[0x561ffb55381e] ???
[0x561ffb5d93a5] *File#initialize<String, String, Int32, Nil, Nil>:(Int32 | Nil) +213
[0x561ffb5d92b0] *File::new<String, String, Int32, Nil, Nil>:File +224
[0x561ffb57f96d] *CallStack::read_dwarf_sections:(Array(Tuple(UInt64, UInt64, String)) | Nil) +93
unn4m3d@asus ~/Projects/nya_serializable $ crystal spec
BUG: trying to upcast Foo <- Bar
???
Crystal::CodeGenVisitor#upcast_distinct<LLVM::Value, Crystal::Type+, Crystal::Type+>:NoReturn
Crystal::CodeGenVisitor#upcast<LLVM::Value, Crystal::Type+, Crystal::Type+>:LLVM::Value
Crystal::CodeGenVisitor#codegen_primitive_proc_call<Crystal::Primitive+, Crystal::Def+, Array(LLVM::Value)>:LLVM::Value
Crystal::CodeGenVisitor#codegen_primitive<Crystal::Call, Crystal::Primitive+, Crystal::Def+, Array(LLVM::Value)>:LLVM::Value
Crystal::CodeGenVisitor#codegen_call<Crystal::Call, Crystal::Def+, Crystal::Type+, Array(LLVM::Value)>:(Bool | LLVM::Value | Nil)
Crystal::CodeGenVisitor#visit<Crystal::Call>:Bool
Crystal::ASTNode+
require "../object"
module Nya::Render
class Mesh < Nya::Component
@vertices = [] of CrystalEdge::Vector3
@normals = [] of CrystalEdge::Vector3
@texcoords = [] of CrystalEdge::Vector3
@colors = [] of Color
@filename = ""
serializable_array vertices, normals, texcoords, of: CrystalEdge::Vector3
require "xml"
module Nya
module Serializable
alias Node = XML::Node
alias Builder = XML::Builder
@@children = Hash(String, Proc(Node, Serializable)).new
macro serializable(name, type)
%xpath = "property[@name='{{name}}']"
@unn4m3d
unn4m3d / log.log
Last active December 24, 2016 10:02
Completed 500 Internal Server Error in 400ms (ActiveRecord: 4.8ms)
ActionView::Template::Error (undefined method `to_a' for #<Thredded::TopicPostsPageView:0x007feb18573068>):
8: id: dom_id(topic),
9: class: ['thredded--main-section', 'thredded--topic', *topic_css_classes(topic)] do %>
10: <%= render 'thredded/topics/header', topic: topic %>
11: <%= render partial: 'thredded/posts/post', collection: @posts, cached: true %>
12: <%= paginate @posts %>
require 'webrick'
require 'json'
class Object
def transform(&b)
yield self
end
end
def disk_usage
#!/usr/bin/ruby
#Bitmap generator for Arduino
#Usage : genbmp.rb image w h f
require 'rmagick'
include Magick
class String
def pad(s,c)
st = self.clone
while st.length < s
[20:35:21] [Thread-8/INFO]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker
[20:35:21] [Thread-8/INFO]: Using primary tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker
[20:35:21] [Thread-8/INFO]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLTweaker
[20:35:21] [Thread-8/INFO]: Forge Mod Loader version 11.14.4.1563 for Minecraft 1.8 loading
[20:35:21] [Thread-8/INFO]: Java is Java HotSpot(TM) 64-Bit Server VM, version 1.8.0_101, running on Linux:amd64:3.19.0-32-generic, installed at /usr/lib/jvm/java-8-oracle/jre
[20:35:21] [Thread-8/INFO]: Loading tweaker com.mumfrey.liteloader.launch.LiteLoaderTweaker from liteloader-1.8-DEV-b53.jar
[20:35:21] [Thread-8/INFO]: Loading tweaker optifine.OptiFineForgeTweaker from OptiFine_1.8.0_HD_U_H2.jar
[20:35:21] [Thread-8/INFO]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker
[20:35:21] [Thread-8/INFO]: Loading tweak class name com.mumfrey.liteloader.launch.LiteLoaderT
class SEditable
{
public:
bool isActive()
{
return active;
}
bool setActive(bool b)
{