<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Hacker News: ultimaweapon</title><link>https://news.ycombinator.com/user?id=ultimaweapon</link><description>Hacker News RSS</description><docs>https://hnrss.org/</docs><generator>hnrss v2.1.1</generator><lastBuildDate>Sun, 03 May 2026 08:45:51 +0000</lastBuildDate><atom:link href="https://hnrss.org/user?id=ultimaweapon" rel="self" type="application/rss+xml"></atom:link><item><title><![CDATA[New comment by ultimaweapon in "Comparing Rust to Carbon"]]></title><description><![CDATA[
<p>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 into Rust too so you can retain the whole functionalities while migrating to Rust. I have done this with Lua and it work wonderfully.<p>The good news is Linux now adopt Rust. In the end it will be all Rust although it may take a long time to migrate from C.</p>
]]></description><pubDate>Mon, 29 Sep 2025 03:34:25 +0000</pubDate><link>https://news.ycombinator.com/item?id=45410106</link><dc:creator>ultimaweapon</dc:creator><comments>https://news.ycombinator.com/item?id=45410106</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=45410106</guid></item><item><title><![CDATA[New comment by ultimaweapon in "Redox OS Development Priorities for 2025/26"]]></title><description><![CDATA[
<p>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 written in Rust with limited unsafe it should be almost impossible for vulnerabilities related to memory.</p>
]]></description><pubDate>Fri, 26 Sep 2025 04:27:17 +0000</pubDate><link>https://news.ycombinator.com/item?id=45382633</link><dc:creator>ultimaweapon</dc:creator><comments>https://news.ycombinator.com/item?id=45382633</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=45382633</guid></item><item><title><![CDATA[New comment by ultimaweapon in "Tracking trust with Rust in the kernel"]]></title><description><![CDATA[
<p>Rust give more ergonomic to this. In C++ it need a lot of typing for creating a new type compared to Rust.</p>
]]></description><pubDate>Fri, 19 Sep 2025 07:26:07 +0000</pubDate><link>https://news.ycombinator.com/item?id=45298880</link><dc:creator>ultimaweapon</dc:creator><comments>https://news.ycombinator.com/item?id=45298880</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=45298880</guid></item><item><title><![CDATA[Show HN: Tsuki – Lua 5.4 ported to Rust]]></title><description><![CDATA[
<p>Tsuki is a port of Lua 5.4 to Rust via C2Rust. I started working on this because I was tried to build a Lua bindings with overhead less than mlua and found out the approach I use is unsound due to Drop implementation on Rust is not guarantee to run. I can't find a solution for this so I decided to try C2Rust on Lua to see if it works. Turnout everything working as expected so I start to refactor the transpiled code to make it idiomatic to Rust.</p>
<hr>
<p>Comments URL: <a href="https://news.ycombinator.com/item?id=45125116">https://news.ycombinator.com/item?id=45125116</a></p>
<p>Points: 3</p>
<p># Comments: 0</p>
]]></description><pubDate>Thu, 04 Sep 2025 08:51:35 +0000</pubDate><link>https://github.com/ultimaweapon/tsuki</link><dc:creator>ultimaweapon</dc:creator><comments>https://news.ycombinator.com/item?id=45125116</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=45125116</guid></item><item><title><![CDATA[New comment by ultimaweapon in "Matt Godbolt sold me on Rust by showing me C++"]]></title><description><![CDATA[
<p>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.<p>Your example code is not because it is faster to write, it is because it is impossible for its to overflow on that line.</p>
]]></description><pubDate>Wed, 07 May 2025 10:04:08 +0000</pubDate><link>https://news.ycombinator.com/item?id=43913890</link><dc:creator>ultimaweapon</dc:creator><comments>https://news.ycombinator.com/item?id=43913890</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=43913890</guid></item><item><title><![CDATA[New comment by ultimaweapon in "Matt Godbolt sold me on Rust by showing me C++"]]></title><description><![CDATA[
<p>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.</p>
]]></description><pubDate>Wed, 07 May 2025 07:06:40 +0000</pubDate><link>https://news.ycombinator.com/item?id=43912986</link><dc:creator>ultimaweapon</dc:creator><comments>https://news.ycombinator.com/item?id=43912986</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=43912986</guid></item><item><title><![CDATA[New comment by ultimaweapon in "Understanding Memory Management, Part 5: Fighting with Rust"]]></title><description><![CDATA[
<p>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 fixed all of those problems. At the beginning I very frustrated with Rust because the borrow checker prevent me from doing what I usually do in C++ but I keep going.</p>
]]></description><pubDate>Tue, 06 May 2025 07:01:33 +0000</pubDate><link>https://news.ycombinator.com/item?id=43902469</link><dc:creator>ultimaweapon</dc:creator><comments>https://news.ycombinator.com/item?id=43902469</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=43902469</guid></item><item><title><![CDATA[New comment by ultimaweapon in "Reflecting on a Year of Gamedev in Zig"]]></title><description><![CDATA[
<p>> Rust is still popular but it turns out the developer joy is pretty low.<p>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 it is too hard.</p>
]]></description><pubDate>Fri, 02 May 2025 11:09:50 +0000</pubDate><link>https://news.ycombinator.com/item?id=43868272</link><dc:creator>ultimaweapon</dc:creator><comments>https://news.ycombinator.com/item?id=43868272</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=43868272</guid></item><item><title><![CDATA[New comment by ultimaweapon in "A year of Rust in ClickHouse"]]></title><description><![CDATA[
<p>> C++ can be safe enough if you proceed with care.<p>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 still possible to missed some memory bugs since the reviewer need to fully understand each object lifetime, which is time consuming during code review.<p>I'm working on a company that run on a server application written in C/C++. The code base is very large and we always have memory bugs that required ASAN on production to fix the bugs. We have started migrating each part to Rust one year ago and we never have a single crash from Rust code. The reason we choose Rust is because it is a server application that computation intensive, latency sensitive and large amount of active connections.<p>Try keep using Rust until you comfortable with it and you will like it. It fit with your simple mental model. I can say this because I was a C++ users for the whole life and switched to Rust recently.</p>
]]></description><pubDate>Wed, 09 Apr 2025 09:16:10 +0000</pubDate><link>https://news.ycombinator.com/item?id=43630291</link><dc:creator>ultimaweapon</dc:creator><comments>https://news.ycombinator.com/item?id=43630291</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=43630291</guid></item><item><title><![CDATA[New comment by ultimaweapon in "My Rust experience after eight years"]]></title><description><![CDATA[
<p>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 function and trait upcasting, which just solved by 1.86 that released yesterday. For iterator type mismatched it does not cause much problem since I can create a dedicated generic function to handle that.<p>The major problem for me with Rust is deadlock. In Rust it is very easy to cause a deadlock compared to other languages. In other languages you need to think a lot before locking a mutex but in Rust you just `foo.lock().unwrap()`, which can easily cause a deadlock if you have multiple mutexes and someone in your team does not aware the lock order.</p>
]]></description><pubDate>Fri, 04 Apr 2025 07:07:11 +0000</pubDate><link>https://news.ycombinator.com/item?id=43579171</link><dc:creator>ultimaweapon</dc:creator><comments>https://news.ycombinator.com/item?id=43579171</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=43579171</guid></item><item><title><![CDATA[New comment by ultimaweapon in "Taming the UB Monsters in C++"]]></title><description><![CDATA[
<p>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 code in Rust is to isolate unsafe operations and provide a safe interface to it. As long as you wrote that unsafe code correctly the rest of your safe code will never have memory safety problems.</p>
]]></description><pubDate>Mon, 31 Mar 2025 12:32:30 +0000</pubDate><link>https://news.ycombinator.com/item?id=43534221</link><dc:creator>ultimaweapon</dc:creator><comments>https://news.ycombinator.com/item?id=43534221</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=43534221</guid></item><item><title><![CDATA[New comment by ultimaweapon in "7.7 magnitude earthquake hits Southeast Asia, affecting Myanmar and Thailand"]]></title><description><![CDATA[
<p>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.</p>
]]></description><pubDate>Fri, 28 Mar 2025 10:47:56 +0000</pubDate><link>https://news.ycombinator.com/item?id=43503782</link><dc:creator>ultimaweapon</dc:creator><comments>https://news.ycombinator.com/item?id=43503782</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=43503782</guid></item><item><title><![CDATA[New comment by ultimaweapon in "A Guide to Undefined Behavior in C and C++ (2010)"]]></title><description><![CDATA[
<p>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.</p>
]]></description><pubDate>Mon, 17 Mar 2025 07:10:35 +0000</pubDate><link>https://news.ycombinator.com/item?id=43385888</link><dc:creator>ultimaweapon</dc:creator><comments>https://news.ycombinator.com/item?id=43385888</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=43385888</guid></item><item><title><![CDATA[New comment by ultimaweapon in "Greg K-H: "Writing new code in Rust is a win for all of us""]]></title><description><![CDATA[
<p>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 need to think about the memory safety in Rust is when using unsafe keyword, which can be isolated into a dedicated function.<p>Most C++ developers may don't understand what I mean. You need to proficient in Rust in order to understand it. When I was still using C++ as my primary language I have the same feeling as the other C++ developers about Rust. Once you start to comfortable with Rust you will see it is superior than C++ and you don't want to use C++ anymore.</p>
]]></description><pubDate>Fri, 21 Feb 2025 07:30:13 +0000</pubDate><link>https://news.ycombinator.com/item?id=43125011</link><dc:creator>ultimaweapon</dc:creator><comments>https://news.ycombinator.com/item?id=43125011</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=43125011</guid></item><item><title><![CDATA[New comment by ultimaweapon in "It is time to standardize principles and practices for software memory safety"]]></title><description><![CDATA[
<p>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.<p>One of the reason is you get the whole program optimization automatically in Rust while C/C++ you need to use put the function that need to be inline in the header or enable LTO at the link time. Bound checking in Rust that people keep using as an example for performance problem is not actually a problem. For example, if you need to access the same index multiple times Rust will perform bound-checking only on the first access (e.g. <a href="https://play.rust-lang.org/?version=stable&mode=release&edition=2021&gist=31e0d0b5283303d10f71a939c3bfa938" rel="nofollow">https://play.rust-lang.org/?version=stable&mode=release&edit...</a>).<p>Borrow checker is your friend, not an enemy once you know how work with it.</p>
]]></description><pubDate>Fri, 07 Feb 2025 07:50:49 +0000</pubDate><link>https://news.ycombinator.com/item?id=42970438</link><dc:creator>ultimaweapon</dc:creator><comments>https://news.ycombinator.com/item?id=42970438</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=42970438</guid></item><item><title><![CDATA[New comment by ultimaweapon in "It is time to standardize principles and practices for software memory safety"]]></title><description><![CDATA[
<p>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.</p>
]]></description><pubDate>Fri, 07 Feb 2025 06:47:24 +0000</pubDate><link>https://news.ycombinator.com/item?id=42970121</link><dc:creator>ultimaweapon</dc:creator><comments>https://news.ycombinator.com/item?id=42970121</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=42970121</guid></item><item><title><![CDATA[New comment by ultimaweapon in "Resistance to Rust abstractions for DMA mapping"]]></title><description><![CDATA[
<p>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.</p>
]]></description><pubDate>Tue, 04 Feb 2025 06:55:46 +0000</pubDate><link>https://news.ycombinator.com/item?id=42928989</link><dc:creator>ultimaweapon</dc:creator><comments>https://news.ycombinator.com/item?id=42928989</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=42928989</guid></item><item><title><![CDATA[New comment by ultimaweapon in "Bringing SerenityOS to real hardware, one driver at a time"]]></title><description><![CDATA[
<p>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 application that run on the OS since it is a job of the kernel to prevent the application to direct access the hardware memory. Here are the roughly steps if you want to get into this field:<p>1. You need a programming language that capable of output the machine code for your target CPU. Better to be a language that does not have GC or runtime like Rust/C++/C/Zig. If you are not familiar with low-level language I recommend C as a first step since it is easy to find examples on the internet.<p>2. Learn the basic of assembly language of your target CPU. You need this because the above language may not provide the intrinsic functions for some instructions.<p>3. Start writing a hello world kernel. You can find a bunch of tutorial on the internet, especially for x86.<p>4. With step 3 you should already learned how the CPU start your kernel and how many mode and privilege level available on the CPU. Usually the CPU will give you the highest privilege level when jumping into your code.<p>5. Now you need to setup the CPU into whatever you want. For example, you likely need to switch the CPU to long mode on x86 so you can use 64-bits instructions. In this step you likely need to setup a virtual memory. You can find a reference for your CPU from their website.<p>6. If you have reached this step then congratulations! You should already have some idea how the CPU is working with the OS and how to enumerate available devices to discover its memory location. There are a ton of works that need to be done once you are here like implementing filesystem, scheduler, etc.<p>Remember that the only different between the software that run on the OS and the OS kernel is mode of the CPU currently executing its code. With highest privilege level you can use some instructions that are not available to the normal application.</p>
]]></description><pubDate>Thu, 09 Jan 2025 11:30:26 +0000</pubDate><link>https://news.ycombinator.com/item?id=42644209</link><dc:creator>ultimaweapon</dc:creator><comments>https://news.ycombinator.com/item?id=42644209</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=42644209</guid></item><item><title><![CDATA[New comment by ultimaweapon in "The mystery of why left-handers are so much rarer (2016)"]]></title><description><![CDATA[
<p>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 comfortable no matter how much I practice.</p>
]]></description><pubDate>Wed, 09 Oct 2024 13:11:33 +0000</pubDate><link>https://news.ycombinator.com/item?id=41787592</link><dc:creator>ultimaweapon</dc:creator><comments>https://news.ycombinator.com/item?id=41787592</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=41787592</guid></item><item><title><![CDATA[New comment by ultimaweapon in "ShadPS4 – PlayStation 4 emulator"]]></title><description><![CDATA[
<p>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 information has been decrypted and dumped. The official PS4 SDK also leaked.<p>Now we know how the console run the game. The next step is how to use this information run the game outside the console. The good news is PS4 system is just a modified version of FreeBSD, which mean how it works is very similar to the PC. A PS4 executable is just a custom ELF file. So to run a PS4 game outside the console we need to manually map the game executable and provide the symbol it needed somehow (e.g. a custom implementation or reuse the PS4 library).</p>
]]></description><pubDate>Wed, 21 Aug 2024 12:28:34 +0000</pubDate><link>https://news.ycombinator.com/item?id=41309605</link><dc:creator>ultimaweapon</dc:creator><comments>https://news.ycombinator.com/item?id=41309605</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=41309605</guid></item></channel></rss>