Skip to content

Instantly share code, notes, and snippets.

View PsichiX's full-sized avatar
👨‍🔬
For the Symmetry! [mental health vacation]

Patryk Budzyński PsichiX

👨‍🔬
For the Symmetry! [mental health vacation]
View GitHub Profile
@PsichiX
PsichiX / grammar.hpp
Last active July 7, 2016 20:05
Jaeger grammar file
#ifndef __GRAMMAR_H__
#define __GRAMMAR_H__
#include "std_extension.h"
#include <pegtl.hh>
namespace Grammar
{
struct function_call;
struct data;
@PsichiX
PsichiX / test.jg
Last active June 26, 2016 18:02
Design of Jaeger - functional language based on Intuicio4 platform
#!/usr/bin/env jaeger
# directive that tells compiler
# what function from which native module we will use.
/use roar from "jaeger_std"/
/use waitForMilliseconds from "jaeger_std"/
#/jaegerify "file_open(path:*i8, mode:*i8):*i32" from "IO"/
# directive that tells compiler which function is program entry point.
/start main/
@PsichiX
PsichiX / WinnerRandomSelector.cs
Created April 20, 2016 03:55
WinnerRandomSelector
using System;
using System.Collections.Generic;
using System.IO;
namespace WinnerRandomSelector
{
class Program
{
static void Main(string[] args)
{
@PsichiX
PsichiX / arithmetics.i4s
Last active August 9, 2016 07:08
Intuicio4 Assembly Script - design v1.0
#!/usr/bin/env i4s
#intuicio 4.0;
#stack 8k;
#memory 16k;
#entry @Main;
#pointersize 32;
#import from [IO:print] routine print(format:*i8, ...):;
@PsichiX
PsichiX / _test.ipp
Last active January 4, 2016 20:37
Intuicio++ to JavaScript compilation test
class Ass
{
Ass(v:int) { _value = v; }
~Ass() { _value = 0; }
get():int { return _value; }
set(v:int):void { _value = v; }
property:int
{
@PsichiX
PsichiX / CircleFragment.glsl
Last active November 15, 2015 22:33
Circle-cut GLSL shader
varying vec2 vUv0;
uniform vec4 uTint;
void main(void)
{
float f = step(dot(vUv0.xy), 1.0);
gl_FragColor = vec4(uTint.rgb, uTint.a * f);
}
@PsichiX
PsichiX / CustomType.editor.json
Last active September 9, 2015 02:14
PlayGate - custom editors
{
"properties": {
"value": { "editorId" : "number" },
"text": { "editorId" : "string" },
"on": { "editorId" : "boolean" }
}
}
@PsichiX
PsichiX / example.js
Last active August 29, 2015 14:22
Awesome AssetManager API explanation
var assets,
assetRef,
assetRefClone,
assetRefs;
// custom asset class that inherit from AssetManager.Asset class.
function TextAsset(manager, id, config){
AssetManager.Asset.call(this, manager, id, config);
@PsichiX
PsichiX / grammar.h
Last active August 29, 2015 14:19
Intuicio++ language syntax
#ifndef __GRAMMAR_H__
#define __GRAMMAR_H__
#include "std_extension.h"
#include <pegtl.hh>
namespace IntuicioPlusPlus
{
namespace Grammar
{
@PsichiX
PsichiX / intuicio_managed.isc
Created March 31, 2015 10:39
Intuicio - Managed Memory Objects
!intuicio // every Intuicio program must start with header.
!stack 128
!registers-i 8
!data bytes txtCountObj "obj references count: ", 0
!data bytes txtCountCpy "cpy references count: ", 0
!data bytes txtValueObj "obj value: ", 0
!data bytes txtValueCpy "cpy value: ", 0
!data bytes txtCountA "ManagedClass.a references count: ", 0