This is inspired by A half-hour to learn Rust and Zig in 30 minutes.
Your first Go program as a classical "Hello World" is pretty simple:
First we create a workspace for our project:
| # Godot 3.x version of a Godot 4 script written by anthonyec at: | |
| # https://gist.github.com/anthonyec/5342fce79b2b7b22ada748df0ad7f7c0 | |
| # This Godot 3.x version available at: | |
| # https://gist.github.com/belzecue/025d8829f69dead512e58f44e990ce30/edit | |
| # Attach script to a Control node. | |
| tool | |
| extends Control | |
| export var device: int = 0 |
| extension View { | |
| @ViewBuilder | |
| func `if`<Content: View>(_ conditional: Bool, @ViewBuilder content: (Self) -> Content) -> some View { | |
| if conditional { | |
| content(self) | |
| } | |
| else { | |
| self | |
| } | |
| } |
This is inspired by A half-hour to learn Rust and Zig in 30 minutes.
Your first Go program as a classical "Hello World" is pretty simple:
First we create a workspace for our project:
| -- happy avril 14th :))))))))))))))))))))))))))))))))))))))) | |
| do | |
| let bars = 4 | |
| key = "8" | |
| righthand = "[[4 -3] [0 _ _ _ _ _ 0]] [[-3, -8] [7 5 4 0]]" | |
| lefthand = "[0 9 12 16] [4 12 16 19] [5 12 17 19] [2 12 17 16]" | |
| d1 $ slow bars | |
| $ stack [ | |
| n (righthand + key + "<24 36>/2"), |
.git folder to appsGIT_DIR and GIT_WORK_TREE environment variables to containers| /* global createImageBitmap */ | |
| function loadImageWithImageTag(src) { | |
| return new Promise((resolve, reject) => { | |
| const img = new Image; | |
| img.crossOrigin = ''; | |
| img.src = src; | |
| img.onload = () => { resolve(img); }; | |
| img.onerror = () => { reject(img); }; | |
| }); |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>Sine Wave</title> | |
| <script type="text/javascript"> | |
| function showAxes(ctx,axes) { | |
| var width = ctx.canvas.width; | |
| var height = ctx.canvas.height; | |
| var xMin = 0; |
| { | |
| "presets": ["es2015", "react"] | |
| } |
Since Twitter doesn't have an edit button, it's a suitable host for JavaScript modules.
Source tweet: https://twitter.com/rauchg/status/712799807073419264
const leftPad = await requireFromTwitter('712799807073419264');