Skip to content

Instantly share code, notes, and snippets.

View aziis98's full-sized avatar

Antonio De Lucreziis aziis98

View GitHub Profile
#!/bin/bash
# Colors
end="\033[0m"
black="\033[0;30m"
blackb="\033[1;30m"
white="\033[0;37m"
whiteb="\033[1;37m"
red="\033[0;31m"
redb="\033[1;31m"
@aziis98
aziis98 / colors.sh
Created September 14, 2020 14:53
Basic coloring for bash
# Colors
end="\033[0m"
black="\033[0;30m"
blackb="\033[1;30m"
white="\033[0;37m"
whiteb="\033[1;37m"
red="\033[0;31m"
redb="\033[1;31m"
green="\033[0;32m"
greenb="\033[1;32m"
@aziis98
aziis98 / jstp.md
Last active July 23, 2020 15:25
BTL - A backtick extensible templating language (prototype specification)

BTL - Backtick Templating Language

A backtick centered extensible templating language inspired by Javascript template litterals.

Examples

h1`A title`

This is a paragraph.
@aziis98
aziis98 / extract-lesson.sh
Created November 30, 2019 01:52
Script per estrarre l'ultima lezione attraverso git diff
#!/bin/bash
if [ "$#" -eq "0" ] ; then
echo "Passa come primo parametro il nome del file in cui mettere la lezione!"
exit 1
fi
FILE_NAME=$1
cat "./lezioni/template.tex" > "./lezioni/$FILE_NAME.tex"
@aziis98
aziis98 / main.py
Created July 10, 2019 15:17
A boilerplate script for the pygame library
import pygame
import random
WIDTH = 720
HEIGHT = 480
FPS = 30
WHITE = (255, 255, 255)
BLACK = (0, 0, 0)
@aziis98
aziis98 / Unicode Markdown.md
Last active June 23, 2019 23:52
Unicode Markdown

Unicode Markdown

All text is processed in blocks, there is a top
block and then more can be nested by using 「those
brackets」.They count as a single character so
tokenizing is easier and they are also less intrusive
in the text. 
@aziis98
aziis98 / !README.md
Last active May 25, 2020 23:55
Mio template per le cose in LaTeX.

LaTeX Template

Perché è sempre cosa buona e giusta mettere i README:

  • Font: Linux Libertine
  • Geometry: Margine di soli 30mm
  • Section: Linee sotto le section
  • Babel: Supporto per l'italiano
@aziis98
aziis98 / template.tex
Created April 16, 2019 20:46
Mio template per le cose in LaTeX. Font: Linux Libertine,
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[italian]{babel}
\usepackage{libertine}
\usepackage{libertinust1math}
\usepackage[T1]{fontenc}
\usepackage{titlesec}

WebVM (SmallTalk VM)

This is the actual definition of the custom VM to run web bytecode.

The various options for the VM are:

  • Stack based (like the JVM)
  • Register based (like LUA (?))
  • Functional (?) (Some Lisp-like thingy)

Nah, let's go for the stack based one that seems decent. So one bytecode can be one of the following operation

(A number := 12)
(A bit of text := "Here there is some text")
(println (join (A bit of text) " and the number " (A number)))
(Sum of things := ((A number) + 5))
(i, j := (tuple of 12 and 16))