Orthodox C++ (sometimes referred as C+) is minimal subset of C++ that improves C, but avoids all unnecessary things from so called Modern C++. It's exactly opposite of what Modern C++ suppose to be.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
setmetatable(_ENV, { __index=lpeg }) | |
Scopes = { {} } | |
function eval_expr(expr) | |
local accum = eval(expr[2]) -- because 1 is "expr" | |
for i = 3, #expr, 2 do | |
local operator = expr[i] | |
local num2 = eval(expr[i+1]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
000(023Rb|001Rb) | |
001(017La|002Rb) | |
002(021La|003Rb) | |
003(021La|004La) | |
004(009Rb|005Lb) | |
005(004Ra|005La) | |
006(008La|007La) | |
007(009Rb|007La) | |
008(009Ra|008La) | |
009(010Ra|026Ra) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# This script is a simple test to do image operations on pyopencl in combination with PIL | |
# | |
# based on the code of: https://gist.github.com/likr/3735779 | |
import pyopencl as cl | |
import numpy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import uuid | |
import json | |
# Returns a python dictionary given a file containing a JSON-based | |
# component definition. Every definition *must* contain a 'type' | |
# and 'schema' field inside a top-level dictionary. Here is an | |
# example of a simple schema file that defines a 'meta' component | |
# containing a 'name' field. | |
# |
This is inspired by https://fasterthanli.me/blog/2020/a-half-hour-to-learn-rust/
the command zig run my_code.zig
will compile and immediately run your Zig
program. Each of these cells contains a zig program that you can try to run
(some of them contain compile-time errors that you can comment out to play
with)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!python | |
# -*- mode: python; Encoding: utf-8; coding: utf-8 -*- | |
# Last updated: <2022/07/13 01:32:08 +0900> | |
""" | |
Yliluoma's ordered dithering algorithm 1, 2, 3 and adobe like | |
Arbitrary-palette positional dithering algorithm | |
https://bisqwit.iki.fi/story/howto/dither/jy/ | |
Usage: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
// ----------------------------------------------------------------------------- | |
// Cross platform high resolution timer | |
// From https://gist.github.com/ForeverZer0/0a4f80fc02b96e19380ebb7a3debbee5 | |
#include <stdint.h> | |
#include <stdbool.h> | |
#if defined(__linux) |