# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- # | |
# RayLib h2nim autoconverter v0.05 | |
# Developed in 2*20 by Guevara-chan | |
# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- # | |
[fs, rl, http] = [require('fs'), require('readline'), require('https')] if process? | |
#.{ [Procedures] | |
sanity = (name, undes = /\*/g) -> | |
name = name.replace(undes, '') | |
if name in ['type', 'end', 'from', 'div', 'ptr'] then name + 'x' else name |
#include "HashTable.h" | |
#include <stdio.h> // fprintf | |
#include <stdlib.h> // exit | |
#include <string.h> // memset | |
#include <stdint.h> // uint8_t | |
#include <stdbool.h> // true | |
#include <assert.h> // assert | |
void* dmalloc(size_t size) { |
[life.b -- John Horton Conway's Game of Life | |
(c) 2021 Daniel B. Cristofani | |
http://brainfuck.org/] | |
>>>->+>+++++>(++++++++++)[[>>>+<<<-]>+++++>+>>+[<<+>>>>>+<<<-]<-]>>>>[ | |
[>>>+>+<<<<-]+++>>+[<+>>>+>+<<<-]>>[>[[>>>+<<<-]<]<<++>+>>>>>>-]<- | |
]+++>+>[[-]<+<[>+++++++++++++++++<-]<+]>>[ | |
[+++++++++brainfuck.org-------->>>]+[-<<<]>>>[>>,----------[>]<]<<[ | |
<<<[ | |
>--[<->>+>-<<-]<[[>>>]+>-[+>>+>-]+[<<<]<-]>++>[<+>-] |
Ook! Ook! Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook? Ook. Ook. Ook. Ook? Ook. Ook? Ook. Ook. Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook? Ook. Ook. Ook. Ook? Ook. Ook? Ook. Ook. Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook? Ook. Ook. Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook? Ook. Ook. Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook? Ook. Ook. Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook? Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook? Ook. Ook? Ook. Ook? Ook. Ook. Ook. Ook? Ook. Ook? Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook? Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook? Ook. Ook. Ook. Ook? Ook. Ook? Ook. Ook? Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook? Ook. Ook. Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook? Ook. Ook? Ook. Ook. Ook. Ook? Ook. Ook? Ook. Ook. Ook. Ook? Ook |
[siercarpet.b -- Sierpinski Carpet | |
(c) 2021 Daniel B. Cristofani | |
http://brainfuck.org/] | |
>-->->->>>>>(>>>>>>>>>)+++++[>++++++<-]>+[>+>+++<<-]>+[ | |
[<]<++[<++]--<[>>[-->]>..<<<]>>[[-->]>>--.++.<<]<<<<<<<+[ | |
[--->++++++<[+++>--------->>[->>>]->>>]+<<<+] | |
>[<->>>[->>>]++++++++++.[-]<<+>+++[-]]< | |
]>>>->> | |
] |
I feel somewhat pressed to give a negative review of this book. This comes from someone who has worked on various Lisp implementations, and written some amount of C, but that isn’t an excuse to be overly harsh. This book, however, does not provide many nice things to say, and plenty of un-nice things. My apologies in advance.
First off: God help you if you are going to write your first interpreter in C of all things. No one I know thinks it’s a good idea to start
This project is a tiny compiler for a very simple language consisting of boolean expression.
The language has two constants: 1
for true and 0
for false, and 4 logic gates:
!
(not), &
(and), |
(or), and ^
(xor).
It can also use parentheses to manage priorities.
Here is its grammar in BNF format:
expr ::= "0" | "1"
module Factorial | |
open FStar.Mul // Give us * for multiplication instead of pairs | |
open FStar.IO | |
open FStar.Printf | |
let rec factorial (n:nat) : nat = | |
if n = 0 then 1 | |
else n * factorial (n-1) |
aahed | |
aalii | |
aapas | |
aargh | |
aarti | |
abaca | |
abaci | |
aback | |
abacs | |
abaft |