c-iterators
interface99
c-iterators | interface99 | |
---|---|---|
3 | 15 | |
90 | 262 | |
- | - | |
4.4 | 1.9 | |
almost 3 years ago | about 1 year ago | |
C | C | |
MIT License | 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.
c-iterators
-
Wanna have fun with Lazy Iterators in good ol' C?
Check it out on github
- A demonstration of implementing a lazy iterator interface in pure C99
-
A demonstration of implementing a lazy Iterator interface in pure C99
I was having fun experimenting with a "typeclass" implementation in C. Noticed how fun it was to implement Iterators with it, as well as utilities for the iterators, figured I'd share. Check it out at github!
interface99
- Full-featured OOP interfaces for C99
-
Templates in C
There is a project that achieves something like this, and quite nicely I think, worth checking it https://github.com/Hirrolot/interface99
-
Pretty-Printable Enumerations in Pure C
I agree; I would especially not recommend abusing macros throughout an application codebase too much. Conceptually, Metalang99 is more of a (sub)language than a library, which also adds some entry barrier. Ideally, I see the application of Metalang99 being used "behind the scenes", e.g., encapsulated in separate code files/libraries such as Datatype99 and Interface99. This is what I (mostly) do in SmolRTSP.
- Just Lua things
-
Comparing Golang and Interface99
There are also some differences. Golang, for example, can resolve interface methods at run-time, whereas Interface99 constructs virtual tables statically. Interface99 allows default implementations; Golang doesn't. And, of course, Interface99 mandates placing impl(MyIface, MyType), whereas Golang uses a.k.a. duck typing for interfaces (interface implementations are indistinguishable from ordinary methods). Also, when you would use embedding in Golang, such as this:
I think your github repo link is broken. Here's a working link.
-
lipstick: a Rust-like syntax frontend for C
I've done something similar with Datatype99 and Interface99. They are like a macro eDSL that compiles to C. The first one features algebraic data types, the second one features interfaces.
-
Any alternative to vala?
If you need a bit more high-level constructions, you can use the Datatype99 and Interface99 libraries. The former provides polymorphism over data, the latter -- over behaviour (I am the creator of these libraries).
-
Diamonds in the Rough : An Honest Trial for any Language
Is it possible that you could benefit from "a better C"? If so, I'd love to hear your take on Crystal, and the recent announce on Interface99.
-
Comparing interfaces: Rust and Interface99
There is a full example code: https://github.com/Hirrolot/interface99/blob/master/examples/state.c.
What are some alternatives?
website-meta-language - An old offline HTML preprocessor (which can be used for static site generation), written in Perl and C that is still maintained for legacy reasons, but probably not recommended for new sites.
COS - C Object System: a framework that brings C to the level of other high level programming languages and beyond
ctl - My variant of the C Template Library
smolrtsp - A lightweight real-time streaming library for IP cameras
rps-tailspin - A rock-paper-scissors server written in tailspin
sps - Pre-Scheme to (GNU) C compiler written in Pre-Scheme
Cloak - A mini-preprocessor library to demostrate the recursive capabilites of the preprocessor
datatype99 - Algebraic data types for C99
oil - Oils is our upgrade path from bash to a better language and runtime. It's also for Python and JavaScript users who avoid shell!
aoc2020 - adventofcode 2020 solutions
c2rust - Migrate C code to Rust
llvm-cbe - resurrected LLVM "C Backend", with improvements