Blog 2020/5/7
<- previous | index | next ->
EDIT 2024/12/1: I updated a few of these commands to work with qemu 9.x.
| Code from PyCon India 2019 Keynote Talk | |
| David Beazley (https://www.dabeaz.com) | |
| ====================================== | |
| This code is presented "as is" and represents what was live-coded | |
| during my closing keynote presentation at PyCon India, Chennai, | |
| October 13, 2009. I have made no changes to the files. | |
| Requires: Python 3.6+, numpy, pygame |
Blog 2020/5/7
<- previous | index | next ->
EDIT 2024/12/1: I updated a few of these commands to work with qemu 9.x.
| cross_compiling=yes | |
| ac_cv_file__dev_ptmx=no | |
| ac_cv_file__dev_ptc=no |
| #!/bin/bash | |
| EVENT=flow.AccountContractAdded | |
| START=32795233 | |
| END=$(flow blocks get latest -n mainnet -o json | jq '.height') | |
| echo "Start: ${START}" | |
| echo "End: ${END}" | |
| echo "Event: ${EVENT}" | |
| for (( i=${START}; i<=${END}; i += 251 )); do |
This tutorial shows you how to make a simple Hello World work with AssemblyScript and w2c2. For this example we will create a simple print function in C and pass it through to AssemblyScript, and try to explain the concepts behind how it works.
Create a file called hello.ts with the following content:
print("Hello, world!")Now if you try to compile it with asc -o hello.wasm hello.ts, you will get this error:
ERROR TS2304: Cannot find name 'print'.
| protocol NullaryFunction { | |
| associatedtype Result | |
| func callAsFunction() -> Result | |
| } | |
| protocol ExpressionResult { | |
| associatedtype Expression: NullaryFunction where Expression.Result == Self; | |
| } | |
| typealias Expr<T: ExpressionResult> = T.Expression |