Skip to content

Instantly share code, notes, and snippets.

@porky11
porky11 / dynamic.sc
Last active November 13, 2018 16:03
Dynamic bindings in scope
let model model-normal =
static mat4
static mat3
typefn& Node 'render (self)
dynamic-let model model-normal =
'transform model self.transform
'transform model-normal self.transform-normal
if ('is-leaf self)
render-mesh self.mesh model model-normal
@porky11
porky11 / ExplorationGame.md
Created November 23, 2018 16:13
Exploration Game Idea

Story

Introduction

You are a boy/girl living in the city. Now you are old enough to travel alone. Since you are a cyborg, you are interested in some island, which was famous for different kinds of technology, even cyborg extensions. Nowadays there's nothing going on anymore. It's just a small island, where some nature people live. Because of their era of prosperity, there also still live many different kinds of people of different races.

You assume it's going to be a relaxing vacation, where you explore the landscape and talk to native people there.

@porky11
porky11 / Concept.md
Last active November 27, 2018 16:17
Story based game

Motivation

  • description of a fantasy world
  • replayable adventure experience with many possibilities
  • rather normal people living in a fantasy world
  • realistic reactions in weird situations
  • description of futuristic societies
  • boys in the age, where they get interests in relationships, while still being more interested in action
  • communicating some values, but with options not to accept them
@porky11
porky11 / natural-language-programming.md
Last active February 12, 2019 13:02
Natural Language Programming

Introduction

It's interesting to think about making programming lanugages more like natural languages. The problems with most existing approaches is, the langauge designers try to stick to grammatical structures of natural languages, but don't implement these structures into code directly. Instead they just implement a pretty simple program, which is basically just a traditional programming language, but with a mostly more verbose syntax of the natural language.

A more reasonable approach would be to define a programming language and only add benefits from natural language. The concepts from the natural langauges should be mapped to the programming language in a simple way. The english language will be used as reference, when needed.

So let's just start with the language design.

@porky11
porky11 / dmesg.txt
Created January 2, 2019 14:02
Command Output
[ 0.000000] Linux version 4.20.0-arch1-1-ARCH (builduser@heftig-29859) (gcc version 8.2.1 20181127 (GCC)) #1 SMP PREEMPT Mon Dec 24 03:00:40 UTC 2018
[ 0.000000] Command line: BOOT_IMAGE=/vmlinuz-linux root=UUID=b41dad63-9655-4feb-ba54-1846d2b74fb8 rw quiet resume=UUID=2b3b2132-7083-4bbf-9c18-c0825d1d0022
[ 0.000000] KERNEL supported cpus:
[ 0.000000] Intel GenuineIntel
[ 0.000000] AMD AuthenticAMD
[ 0.000000] Hygon HygonGenuine
[ 0.000000] Centaur CentaurHauls
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x001: 'x87 floating point registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x002: 'SSE registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x004: 'AVX registers'
@porky11
porky11 / scopes build error message
Created January 3, 2019 22:23
scopes build error message
make: Entering directory '/home/porky11/build/scopes/build'
==== Building scopesrt (debug) ====
make[1]: *** No rule to make target '../SPIRV-Cross/spirv_cfg.cpp', needed by 'obj/debug/scopesrt/SPIRV-Cross/spirv_cfg.o'. Stop.
make: *** [Makefile:17: scopesrt] Error 2
make: Leaving directory '/home/porky11/build/scopes/build'
@porky11
porky11 / events.md
Created January 4, 2019 23:41
Event system

Basically, what I want to do is following. First I have a state. The state can generate a list of available events. This could look like this:

struct State;

impl State {
  fn get_events(&mut self) -> impl Iterator<Item = Event> {...}
}
@porky11
porky11 / factorial.sc
Last active January 10, 2019 18:48
New loop semantics
fn factorial (arg)
loop (x = arg)
if (x == 1)
break 1
else
x * (repeat (x - 1))
print (factorial 5)
@porky11
porky11 / minicil.md
Created January 27, 2019 21:17
Minimalistic C inspired programming language.

Minimalistic C inspired language

General structure

The program is a list of process calls and type definitions.

The language is line based, so every line is one of these.

A process call looks like this:

@porky11
porky11 / grammar.scn
Created March 7, 2019 09:50
Current grammar of the speakable language I'm working on
primitives
noun
property
particle
suffix-to-noun
suffix-to-property
suffix-to-particle
suffix-to-same
grammar