Uses Blitz Kt
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
: print ( ptr len -- ) | |
0 do | |
dup | |
i + C@ | |
dup 0= if | |
drop | |
leave | |
then | |
emit | |
loop |
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 sys | |
import subprocess | |
start = sys.argv[2] | |
ty = sys.argv[3] | |
newty = sys.argv[4] | |
cmd = "ctags -x --c-kinds=f --_xformat=\"%N %S\" " + sys.argv[1] | |
output = subprocess.check_output(cmd, stderr=subprocess.STDOUT).decode('utf-8') | |
fns = output.split("\n") |
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
/* | |
Example usage: | |
``` | |
char *url; | |
char *params[2] = { "name", "mail" }; | |
urlGETAll(url, params, 2); | |
printf("name: %s\n", params[0]); | |
printf("mail: %s\n", params[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
# 6502 32-bit vector extension | |
This extension is based on [16-bit vector extension)[https://gist.github.com/alex-s168/4affe0004397688aeb88fbd6e194bdc0]. | |
All instructions and registers from the "old" extension are assumed to be present here. | |
## Registers | |
This extension adds one single SIMD register: | |
### W | |
A 32-bit single instruction multiple data (SIMD) register. | |
The low word of this register overlaps with the full `V` reigster. |
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
# 6502 16-bit vector extension | |
(The opcodes of this extension are choosen with the w65c02 in mind) | |
This extension is designed to speed up 2-D vector and memory operations. | |
## Registers | |
This extension adds one single SIMD register: | |
### V | |
A 16-bit general purpose register. |
What happens in the background when we enter tcc main.c -o out
? - To find out, we need to explore the stages that a compiler goes trough.
takes in code, parses it, includes files, parses them, includes files, expands macros, ... Can also happen after (or during) main lexing (which is waaay smarter)
Tokenizes your code
example: printf("Hello, %s\n", getName());
-> printf
(
"Hello, %s\n"
,
getName
, (
)
)
;
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
use std::net::{TcpListener,TcpStream,Shutdown}; | |
use std::result::Result; | |
use std::io::{Write,Read,BufRead,BufReader}; | |
use std::thread; | |
use std::io; | |
use std::process::exit; | |
use std::path::Path; | |
use std::fs::{File,read_dir}; | |
use std::env; |