fn main() {
for i in 1..=10 {
println!("{}", i);
}
}
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 <stdint.h> | |
#include "sum.h" | |
int main(void) { | |
uint64_t x = sum(7, 1, 2, 3, 4, 5, 6, 7); | |
printf("%llu\n", x); |
YeetSkeet is a stack-based language which uses a primary stack and a secondary stack. for both stacks, the each element shall be exactly one byte.
a program consists of an ordered list of instructions.
YeetSkeet instructions:
0 : push byte 0 to the stack
1 : push byte 1 to the stack
"x : push ascii value of x (which is an ascii char) to the stack
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
global ys_stash | |
%include "macros.asm" | |
ys_stash: | |
pop rbx | |
cmp r14, r15 | |
jne no_allocate | |
getbrk | |
mov rbp, rax |
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> | |
#include <inttypes.h> | |
#define u8 uint8_t | |
#define u32 uint32_t | |
int main(void) { | |
u8 *arr; | |
u32 i, j, x, c; |
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
%define fd_stdin 0 | |
%define fd_stdout 1 | |
%define fd_stderr 2 |
I hereby claim:
- I am nekodjin on github.
- I am nekodjin (https://keybase.io/nekodjin) on keybase.
- I have a public key ASCxd4EFF6ISYsTnWe0AHAAgUwtBhrQj9esbVBSMkltUbQo
To claim this, I am signing this object:
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
<script lang="ts"> | |
let showHamburger = false; | |
const toggleHamburger = () => { | |
showHamburger = !showHambuger; | |
}; | |
</script> | |
<div class="h-screen flex flex-col justify-center items-center content-evenly gap-y-4"> | |
<button on:click={toggleHamburger}> |
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
module Example where | |
printGreeting :: IO () | |
printGreeting = putStrLn "Hello, user!" |