- How to Design Programs: https://htdp.org/
- Structure and Interpretation of Computer Programs: https://sarabander.github.io/sicp/
- Programming Language Foundations in Agda: https://plfa.github.io/
- Think Julia - How to Think Like a Computer Scientist: https://benlauwens.github.io/ThinkJulia.jl/latest/book.html
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
# Image: stateoftheartio/qt6:6.5-mingw-aqt | |
FROM stateoftheartio/qt6:6.5-mingw-aqt | |
ARG ECM_DIR=${QT_PATH}\\share\\ECM | |
ENV DEBIAN_FRONTEND=noninteractive \ | |
DEBCONF_NONINTERACTIVE_SEEN=true \ | |
QT_PATH=${QT_PATH} \ | |
ECM_DIR=${ECM_DIR} \ | |
WINEDEBUG=-all |
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 <iostream> | |
#include <chrono> | |
#include <array> | |
#include <thread> | |
#include <asio/thread_pool.hpp> | |
#include <asio/post.hpp> | |
void sleepSort(const std::array<int,8>& numbers) { | |
asio::thread_pool pool(numbers.size()); | |
for (const auto& num : numbers) { |
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
//! Zig version: 0.11.0 (std.Thread.Pool) | |
const std = @import("std"); | |
pub fn main() !void { | |
std.debug.print("Sleep sorting\n", .{}); | |
const values = [_]usize{ 9, 40, 10, 1, 6, 45, 23, 50 }; | |
var arena = std.heap.ArenaAllocator.init(std.heap.page_allocator); | |
const allocator = arena.allocator(); | |
defer arena.deinit(); |
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
@nogc nothrow: | |
extern(C): __gshared: | |
////////////////////////////////////////////////////////// | |
// This file was auto-generated by tb_client_header.zig // | |
// Do not manually modify. // | |
////////////////////////////////////////////////////////// | |
import core.stdc.stdint; | |
import core.int128; |
Need: https://github.com/kassane/xml (forked: updated to zig 0.11)
nfe_sample.xml
<?xml version="1.0" encoding="UTF-8"?>
<NFe xmlns="http://www.portalfiscal.inf.br/nfe">
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
{ | |
"items": [ | |
{ | |
"sigla": "STF", | |
"nome": "Supremo Tribunal Federal", | |
"busca_processo": 1, | |
"busca_nome": 1, | |
"busca_oab": 0, | |
"disponivel_autos": 0, | |
"busca_documento": 0, |
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
//! ref: https://github.com/TwoClocks/repr-c/blob/arocc-test-gen/repc/arocc/RustToZigTargets.zig | |
//! updated to v0.11.0 | |
// at attemp to convert between rust and zig targets. | |
// rustc must be in the path. | |
// compile with `zig build-exe RustToZigTgarets.zig | |
const std = @import("std"); | |
const CrossTarget = std.zig.CrossTarget; | |
var general_purpose_allocator = std.heap.GeneralPurposeAllocator(.{}){}; |
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
// Reference: http://plum-umd.github.io/adapton/ | |
#include <stdio.h> | |
#include <stdlib.h> | |
typedef struct Adapton_Int { | |
int value; | |
int (*compute)(struct Adapton_Int *, struct Adapton_Int *); | |
struct Adapton_Int *arg1; | |
struct Adapton_Int *arg2; |
// main.cpp
import moduleTest;
#include <cstdio>
auto main() -> int
{