rustlings-solutions-5
zig
Our great sponsors
rustlings-solutions-5 | zig | |
---|---|---|
26 | 808 | |
19 | 29,799 | |
- | 4.5% | |
0.0 | 10.0 | |
about 1 year ago | 1 day ago | |
Rust | Zig | |
- | 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.
rustlings-solutions-5
-
Give me the best Resources to learn Rust
https://doc.rust-lang.org/book/ https://github.com/rust-lang/rustlings https://doc.rust-lang.org/rust-by-example/
-
Learn WebAssembly by writing small programs
i think you've found what i'm looking for! https://github.com/rust-lang/rustlings
-
Managed to land a junior role need help!
I would recommend rustlings as a way to get used to semantics. It starts from absolute basics but it gave me a more intuitive understanding of the language.
-
The Rust Programming Language has recently made it possible to compile your code to the PS Vita! This potentially mean an increase in projects released as Rust is to a certain extent easier than the C programming language. I’m excited about this!
rustlings — Small exercises to get you used to reading & writing Rust code!
-
Testing Vlang, Rust and Zig and more!
I had finished this Udemy course, which was a bit too fast towards the end but still enjoyable, I read THE BOOK and done the Rustlings (here are my old solutions and here the new ones).
-
Fellow Rust enthusiasts: What "sucks" about Rust?
You will get used to it when you write more Rust code. Read the book, implement some exercises and watch some tutorial YT videos, everything will make sense eventually.
-
THE BOOK IS AMAZING.
Check out rustlings. Simple exercises with writing rust code, introducing new concepts along the way.
-
You don't say
There's an official "book" that you can look up online. It goes through Rust step by step, like a tutorial. Alternatively there's the rustling's course where you learn Rust by doing small exercises. I have only ever looked at the book, which is fantastic. But if you know a bit of C and some sort of class-system like in OOP or Haskell's typeclasses you can just look up the syntax when you need to, it is really easy. Also, the compiler warnings/errors usually tell you what you need to do in order to fix your error (especially for simple stuff in the beginning) so often you don't even need to google the issue.
-
Is this an idiomatic or an idiotic use of '?' ?
It's an exercise from the rustlings set of exercises. I guess it teaches you how you would implement a From trait with arbitrary conditions.
-
My Rust journey and how to learn Rust
rust-lang/rustlings: Small exercises to get you used to reading and writing Rust code!
zig
-
Zig, Rust, and Other Languages
https://github.com/ziglang/zig/blob/5cd7fef17faa2a40c8da23f0...
Generally speaking, it’s as mentioned just a convention. A zig library might not allow its users to pass allocators for example.
In C++, stl containers can take an allocator as a template parameter. Recent C++ versions also provide several polymorphic allocators in the stdlib. You can also override the global allocator or a specific class’ allocator (override placement new).
-
Nanos – A Unikernel
We need to remove that. We did have a channel on freenode a while back but got rid of it.
Outside of gh discussions there is also https://forums.nanovms.com/. We made a decision a while ago to follow Zig's lead here and have no 'official' community space (https://github.com/ziglang/zig?tab=readme-ov-file#community) instead letting people form their own spaces.
Zig also has an IRC channel on libera (#zig) that is moderated by Andrew Kelley.[1]
- Ask HN: What Underrated Open Source Project Deserves More Recognition?
-
Top Paying Programming Technologies 2024
1. ZIG - $103,611
-
MicroZig: Unified abstraction layer and HAL for Zig on several microcontrollers
ESP32 and STM32 support is very welcome!
I have been following https://github.com/ziglang/zig/issues/5467 for a while and progress seemed to have slowed significantly
-
Asynchronous Clean-Up (in Rust)
I have never used it directly, take what I say with a grain of salt.
As far as I know at least part of the idea was to eliminate the function coloring problem by letting the compiler do some nifty compile-time deductions. This had some issues (I don't know if this is still planned, it seems like the kind of thing that should not work in practice). Additionally, there were all sorts of hard technical issues with LLVM, debugging, etc.
I recommend checking the issue tracker, eg. https://github.com/ziglang/zig/issues/6025
I personally don't understand the domain well enough at all, but honestly, I feel like (if possible) Zig should try to double down on its allocator approach.
Instead of trying to use some compile-time deduction magic explicitly pass around an "async runtime/executor" struct which you explicitly have to interact with. Why not?
-
Show HN: Tokamak – A Dependency Injection-Centric Server-Side Framework for Zig
Atop your readme, you point out that nginx or another reverse proxy should be used. Kudos for that.
As for performance, I'd be curious what gains you get using `std.http.Server` with keepalive and a threadpool. Possibly you can re-use your ThreadContext - having 1 per thread in the threadpool that you can re-using. `std.Thread.Pool` is also very poorly tuned for a large number of small batch jobs, but that's a place to start.
[1] https://github.com/ziglang/zig/blob/b3aed4e2c8b4d48b8b12f606...
Yes, fundamentally. In Rust if you take a parameter of generic type T without any bounds, you cannot call anything on it except for things which are defined for all types. If you specify bounds, only things required by the bounds can be called (+ the ones for all types). Another difference is where you get an error when you try pass something which doesn't adhere to a certain trait. In Rust you will get an error at the call site, not at the place of use (except if you don't specify any bounds).
Zig is doing just fine without any trait mechanism and it simplifies the language a lot but it does come up from time to time. The usual solution is to just get type information via @typeInfo and error out if the type is something you're not expecting [0]. Not everybody is happy about it though [1] because, among other things, it makes it more difficult to discover what the required type actually is.
[0] https://github.com/ziglang/zig/blob/b3aed4e2c8b4d48b8b12f606...
What are some alternatives?
Nim - Nim is a statically typed compiled systems programming language. It combines successful concepts from mature languages like Python, Ada and Modula. Its design focuses on efficiency, expressiveness, and elegance (in that order of priority).
Odin - Odin Programming Language
v - Simple, fast, safe, compiled language for developing maintainable software. Compiles itself in <1s with zero library dependencies. Supports automatic C => V translation. https://vlang.io
rust - Empowering everyone to build reliable and efficient software.
go - The Go programming language
rust - Rust for the xtensa architecture. Built in targets for the ESP32 and ESP8266
ssr-proxy-js - A Server-Side Rendering Proxy focused on customization and flexibility!
TinyGo - Go compiler for small places. Microcontrollers, WebAssembly (WASM/WASI), and command-line tools. Based on LLVM.
crystal - The Crystal Programming Language
regex - An implementation of regular expressions for Rust. This implementation uses finite automata and guarantees linear time matching on all inputs.
llvm-project - The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
Beef - Beef Programming Language