expected
AECforWebAssembly
Our great sponsors
expected | AECforWebAssembly | |
---|---|---|
18 | 51 | |
1,397 | 31 | |
- | - | |
2.1 | 8.2 | |
4 months ago | about 1 month ago | |
C++ | C++ | |
Creative Commons Zero v1.0 Universal | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
expected
- Functional Programming in Modern C++: The Imperatives Must Go – Victor Ciura [video]
- Functional exception-less error handling with C++23's optional and expected
-
C++23's New Fold Algorithms - C++ Team Blog
On this topic Sy Brand is a guarantee, in fact he did the https://github.com/TartanLlama/expected and several presentation of the subject.
-
What is the status of the monadic operations for std::expected? It seems like they made it into the standard for C++23, but they don't actually seem to be available in the std::expected implementation (in MSVC's STL)
In the meantime, I may use the TartanLlama implementation (here) and plan around replacing it with the real deal in the near future.
-
ADSP Episode 114: Rust, Val, Carbon, ChatGPT & Errors with Barry Revzin!
Sy Brand's tl::expected
-
Daily bit(e) of C++ | Error handling
expected is my favourite little part of cpp23, I’m using it often in codebase with https://github.com/TartanLlama/expected 😁
- Noticing the the difference in coding when going back to C++
-
What are some cool modern libraries you enjoy using?
outcome and/or expected
- Do you use builder pattern?
-
Why should I have written ZeroMQ in C, not C++ (2012)
Eventually you'll be able to use std::expected in C++23!
https://en.cppreference.com/w/cpp/header/expected
Don't throw exceptions, require the caller to handle errors and propagate them up the stack (everything returns an expected) if they cannot be handled. You are forced to model the error domains instead of just throwing an exception and assuming the caller knows to catch it and do something with it.
Java has checked exceptions, but, Kotlin decided to abandon them.
The nice codebases I have worked on stick to the Result type in Swift or Kotlin. And thus you are forced to 'translate' errors (exceptions?) as described in Alan Griffith's 'Exceptional Java'.
https://accu.org/journals/overload/10/48/griffiths_406/
"If a checked exception is thrown (to indicate an operation failure) by a method in one package it is not to be propagated by a calling method in a second package. Instead the exception is caught and "translated". Translation converts the exception into: an appropriate return status for the method, a checked exception appropriate to the calling package or an unchecked exception recognised by the system. (Translation to another exception type frequently involves "wrapping".)"
If you can't wait for C++23, there's a single header implementation here.
https://github.com/TartanLlama/expected
AECforWebAssembly
-
Gren 0.3: Source maps
Great! I have not yet made source maps for my programming language that compiles to WebAssembly, and I probably never will.
- Mislite li da okolina ima potpuno pogrešno mišljenje o ljudima koji rade u IT-u?
- Koja je najapsurdnija poruka o pogrešci koju je neki vaš program ispisivao?
-
What is the most absurd error message your compiler/interpreter was once outputting?
Up until today, my AEC-to-WebAssembly was, if somebody tried to use two structures of different types as the second and the third operand to the ?: (ternary conditional) operator, as in this example: ``` Structure First Consists Of Nothing; EndStructure
- Poteškoće s pronalaskom posla
-
Good languages for writing compilers in?
Well, I have written the first compiler for my programming language, targetting x86, in IE6-compatible JavaScript, and the second compiler, targetting WebAssembly, has been written in C++11. I think that, to choose a language to write a compiler in, you need to look at at least two things:
-
Why does GCC run in Docker produce around 30% smaller statically linked C++ executables than GCC run on Linux? AECforWebAssembly is 1.08 MB large if compiled using GCC 13.1 in Docker, but it is 1.59 MB if compiled using GCC 13.1 on Debian.
You can see the releases v2.5.3 and v2.5.2 of AECforWebAssembly on GitHub. They are produced with the same version of GCC, the only difference (as far as I know) is that v2.5.2 was produced directly on Debian, whereas v2.5.3 was cross-compiled from Windows to Linux using Docker.
-
Let's Make Sure Github Doesn't Become the only Option
That could be true. I host my AEC-to-WebAssembly compiler on GitHub, GitLab and SourceForge, and it's only on GitHub that it has 21 stars and 2 forks. On GitLab and SourceForge, it has zero of both.
- koliko vam je bilo tesko nac posao u programiranju?
-
Does the JVM / CLR even make sense nowadays?
Well, the main compiler for my programming language is targetting the JavaScript Virtual Machine by outputting WebAssembly. I think it's even better than targetting Java Virtual Machine, because, for one thing, your executables can run in any modern browser if you output WebAssembly. If you target Java Virtual Machine, the users need to actually download your app. Furthermore, there is an official assembler for WebAssembly called WebAssembly Binary Toolkit (WABT), so your compiler can output assembly and not have to deal with binary files. There is nothing equivalent to that for Java Virtual Machine.
What are some alternatives?
libCat - 🐈⬛ A runtime for C++26 w/out libC or POSIX. Smaller binaries, only arena allocators, SIMD, stronger type safety than STL, and value-based errors!
Lark - Lark is a parsing toolkit for Python, built with a focus on ergonomics, performance and modularity.
cpp-libp2p - C++17 implementation of libp2p
wasm-fizzbuzz - WebAssembly from Scratch: From FizzBuzz to DooM.
Thrust - [ARCHIVED] The C++ parallel algorithms library. See https://github.com/NVIDIA/cccl
mal - mal - Make a Lisp
magnum - Lightweight and modular C++11 graphics middleware for games and data visualization
stb - stb single-file public domain libraries for C/C++
gdal-js - This is an Emscripten port of GDAL, an open source X/MIT licensed translator library for raster and vector geospatial data formats.
PEGTL - Parsing Expression Grammar Template Library
Drogon-torch-serve - Serve pytorch / torch models using Drogon