Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
ultimaweapon
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
6 ms
·
1.
▲
by
ultimaweapon
3mo ago
Not the author but I also moved from C# to Rust. In the first place I did not consider Rust for C# works like REST API but after I proficient with Rust I no longer want to work with C# for the following reasons: 1. Microsoft don't want
2.
▲
by
ultimaweapon
4mo ago
> After never catching covid Maybe it is because you are vaccinated?
3.
▲
by
ultimaweapon
4mo ago
What language you are trying to port from?
4.
▲
by
ultimaweapon
1y ago
My observation is most people who suggest Rust alternative don't use Rust. People who actually use Rust known it is worth to rewrite C/C++ software in Rust, either the whole or part by part. There is a tool to convert C source int
5.
▲
by
ultimaweapon
1y ago
The benefit of drivers being in the user-space is it will limit the damage if that driver has vulnerabilities. The downside is, I don't think the performance will be great. The kernel already written in Rust and if all drivers also wri
6.
▲
by
ultimaweapon
1y ago
Rust give more ergonomic to this. In C++ it need a lot of typing for creating a new type compared to Rust.
7.
▲
Show HN: Tsuki – Lua 5.4 ported to Rust
(github.com)
3 points
by
ultimaweapon
1y ago
|
0 comments
8.
▲
by
ultimaweapon
1y ago
Checked addition by default will have too much overhead and it will hurt performance, which unacceptable in Rust since it was designed as a system language. Swift can use checked add by default since it was designed for application software
9.
▲
by
ultimaweapon
1y ago
Rust is the only language I can easily control how integer overflow should behave. I can use `var1.wrapping_add(var2)` if I want the result to be wrapped or `var1.checked_add(var2)` if I don't want it to overflow.
10.
▲
by
ultimaweapon
1y ago
I'm coming from C++ now I don't want to use C++ anymore. When C++ was still my primary language I always frustrated with some of its feature like non-destructive move, copy by default and dangling references then I found Rust fixe
11.
▲
by
ultimaweapon
1y ago
> Rust is still popular but it turns out the developer joy is pretty low. Rust is one of the language I enjoy to use. The problem is you need to overcome its steep learning curve in order to enjoy it, which people tend to give up because
12.
▲
by
ultimaweapon
1y ago
> C++ can be safe enough if you proceed with care. The problem with this is if you have a team working on a C++ product you will need some people who can catch memory bugs to review every code before merging. Even with this approach it s
13.
▲
by
ultimaweapon
2y ago
For me lack of language specification is not a problem and it is good that Rust only have one implementation so I don't have a headache to support multiple compilers like C++. The only problems I have with trait is lack of const functi
14.
▲
by
ultimaweapon
2y ago
Most C/C++ users don't understand how Rust achieve memory safety because they don't know Rust enough. They always underestimate Rust memory safety. The truth is Rust can give you nearly 100% memory safety. The point of unsafe
15.
▲
by
ultimaweapon
2y ago
I'm living in Thailand for almost 40 years and this is the first time I have a nausea due to earthquake even it is very far from its origin. I can't imagine how much catastrophe the Myanmar has from this earthquake.
16.
▲
by
ultimaweapon
2y ago
To be fair the UB caused by this function come from the underlying C implementation and this function already marked as unsafe on 2024 edition.
17.
▲
by
ultimaweapon
2y ago
Of course the modern C++ are safer but you can still shoot yourself in the foot. Compared to Rust you still need to think about the memory safety when writing C++ while Rust you don't need to think about it at all. The only time you ne
18.
▲
by
ultimaweapon
2y ago
Once you know how Rust works it is likely your Rust code will be faster than C/C++ with less effort. I can say this because I was using C++ for a long time since Visual C++ 6.0 and moved to Rust recently about 3 years ago. One of the r
19.
▲
by
ultimaweapon
2y ago
You are very unlikely to hit this bug in a real world Rust project while C/C++ you can easily hit by a memory safety bug.
20.
▲
by
ultimaweapon
2y ago
Actually the interoperability is very good. C can directly call into Rust and Rust can directly call into C. Rust can construct any C type and can expose opaque pointers to C world.
21.
▲
by
ultimaweapon
2y ago
Actually it is very simple to communicate with the modern hardware (both x86 and ARM). All you need to do is read/write the hardware memory. This called Memory-mapped I/O (or MMIO in short). Of course you cannot do this from the a
22.
▲
by
ultimaweapon
2y ago
I always use left hand for everything that does not requires right hand. The only activities I need to use right hand is when I use a desktop computer or writing. I was tried to use right hand for the other activities but it is never comfor
23.
▲
by
ultimaweapon
2y ago
I don't know about the older generation so I'll explain how PS4 emulation can be achieve. The first step is to understand how the console run the game. The good news is the PS4 has been hacked and almost all of its file and inform
24.
▲
by
ultimaweapon
2y ago
Most PS4 emulators work in the same way as Wine.
25.
▲
by
ultimaweapon
2y ago
Those wiki has some incorrect information. How shadPS4 and fpPS4 works are the same. Almost of them can be categorized as a compatibility layer. The only one that can be called a PS4 emulator is Orbital because it virtualize (and emulate) t
26.
▲
by
ultimaweapon
2y ago
Actually shadPS4 is a compatibility layer. What it does is re-implement the PS4 libraries and translate PS4 shading language into SPIR-V.
27.
▲
by
ultimaweapon
2y ago
It is really depend on the hardware you want to make the emulator. Usually there are 2 kind: 1. Emulate the whole system. 2. Emulate the system API. The first one you write the code to emulate the CPU of target system like OP code interpret
28.
▲
by
ultimaweapon
3y ago
Seems like we are looking for the same thing so I invent a new language to fit my need: https://github.com/ultimaweapon/nitro