0.1.0:
- Basic functionality
- Basic morphs
- Basic FPS system
- FPS monitor & mouse down detector
0.1.1:
// Released under GNU GPLv3 license | |
// https://www.gnu.org/licenses/gpl-3.0.en.html | |
// (©) Copyright DeKrain 2022 | |
// The example program is located near the end of this file | |
AttrVM.Executor.CompileAndRunMainProgram(@"MainProgram.Program"); | |
#region VM Implementation | |
namespace AttrVM { | |
using System; |
/** %pmake **/ | |
/* { "target": "counters", "c++ver": "c++17" } */ | |
/* | |
Entry with _ means unimplemented, + means implemented. | |
Controls: | |
+ ArrowDown = next entry | |
+ ArrowUp = previous entry | |
+ ArrowRight = increase counter |
/* | |
* compile with: g++ gorbitsa.cpp -o gorbitsa -ftemplate-depth=99999999 -std=c++2a | |
* Tested with GCC 10.1, does *not* work with Clang 10 | |
* Editor's note: not anymore ;) | |
*/ | |
#include <iostream> | |
#include <string_view> | |
#include <cctype> | |
#include <array> |
/** Snek gaem | |
* To use (vscode): | |
* - open devtools | |
* - inspect a line of code in editor in devtools | |
* - enter command `var snek_parent_node = $0.parentElement;` This will select the correct parent/anchor | |
* - copy and paste this entire file into console & enter | |
* Controls: | |
* - Arrow keys - change direction | |
* - Escape - halt the snek | |
* - To exit, "Reload window" in command palette |
#include <iostream> | |
#include <tuple> | |
template <size_t N> | |
struct FizzBase { | |
char const* msg; | |
bool fizz(int x) const { | |
if (x % N == 0) | |
return (std::cout << msg), true; |
# Python 3 | |
# This algorithm tries to find a complex solution to the complex function | |
# Example: | |
# find_root((lambda n: n**2 + 1), ComplexRect(-2+2j, 2-2j)) | |
# -> [-1j, 1j] | |
import math | |
def complex2polar(n): |
#define float_t _std__float_t | |
#include <stddef.h> | |
#include <math.h> | |
#include <stdio.h> | |
#undef float_t | |
#define PI trig(atan2)(0, -1) | |
#define trig(f) f // Uses trigonometric function for float precision of float_t | |
#define fm "%f" // Format for type float_t (printf) |
/** @fileoverview | |
* This file ISN'T part of Snap!. It's only plug-in made by ~DeKrain | |
*/ | |
var exts = ['#']; | |
function $s(query, | |
wrld /* optional */ | |
) { | |
var ext = query[0], world = wrld || window.world, result, allchilds; |
// A Block Factory for Snap! by (C) ~DK | |
// Based on morphic.js and Snap! | |
// Needs: morphic.js, widgets.js, blocks.js, objects.js, gui.js | |
/*global Morph DialogBoxMorph BlockMorph CommandBlockMorph ReporterBlockMorph AlignmentMorph SpriteMorph ToggleButtonMorph IDE_Morph*/ | |
var BlockFactoryMorph; | |
// BlockFactoryMorph inherits from DialogBoxMorph |