List of freely available resources to study computer graphics programming.
This is translation of https://zenn.dev/mizchi/articles/introduce-moonbit from japanese
Recently, I came across a language called MoonBit, and the more I looked into it, the more I liked it, so I'd like to introduce it.
Logging functionality that supports:
- If a log message should be printed is determined at comptime, meaning zero overhead for unprinted messages (so just leave the code peppered with debug logs, but when it makes sense scope them; so downstream users can filter them out)
- Scoped log messages
- Different log levels per scope
- Overrideable log output (write to file, database, etc.)
- All the standard
std.fmtformatting magic
| LBITS := $(shell getconf LONG_BIT) | |
| MARCH ?= $(LBITS) | |
| PREFIX ?= /usr/local | |
| INSTALL_DIR ?= $(PREFIX) | |
| INSTALL_BIN_DIR ?= $(PREFIX)/bin | |
| INSTALL_LIB_DIR ?= $(PREFIX)/lib | |
| INSTALL_INCLUDE_DIR ?= $(PREFIX)/include | |
| LIBS=fmt sdl ssl openal ui uv mysql |
今年(2021)9/12 这一天 Cardano 迎来了一次对于 Cardano 来说史上最大的更新 Alonzo,支持智能合约并推出 Plutus 等一些列用于在 Cardano 上开发智能合约的工具,当然了,在此之前,Alonzo Testnet 早已经于 5/21 上线进行测试。作为市值前五十的链之一,如此重大的利好怎能不吸引来一群认为是发现了财富密码的开发者呢,因此 Cardano 社区并不缺少先锋
大部分程序员更熟悉的都是类 Ethereum account model 这样的编程模型,而 Cardano 采用的是一种受 UTXO 启发的 EUTXO(Extended Unspend Output Transaction) ,虽然大抵都知道 BTC 的 UTXO 概念,但估计没有多少人想象过 general UTXO 的模型是怎样的。
WARNING: This process is EXTREMELY experimental and not officially supported yet!
Thanks to the ongoing work on .NET WebAssembly support, it is now possible to build FNA games for the web!
If you decide to give this a try, be sure to tell us about it in the FNA Discord! I'm happy to help if you run into problems or have any further questions that are not answered here.
This is inspired by https://fasterthanli.me/blog/2020/a-half-hour-to-learn-rust/
the command zig run my_code.zig will compile and immediately run your Zig
program. Each of these cells contains a zig program that you can try to run
(some of them contain compile-time errors that you can comment out to play
with)
| const std = @import("std"); | |
| const system = switch (std.builtin.os.tag) { | |
| .linux => std.os.linux, | |
| else => std.os.system, | |
| }; | |
| const ThreadPool = @This(); | |
| max_threads: u16, | |
| counter: u32 = 0, |
I recently ran into a classic case of "our code is using way more memory than it should". So I took my first dive into memory profiling Rust code. I read several posts about this, including the following
In case anyone else wants to play with Zig on webassembly, here's what you need to do to make it work on a mac today.
You'll need LLVM to output to the WASM target. This has just been added by default in trunk, so if LLVM >7 is available, you might be able to just brew install llvm.
If you have wasm support already you should see:
$ llc --version