Hacker News new | past | comments | ask | show | jobs | submit | seg_lol's comments login

I'd like to checkout the web version, but it blocks me with a signup. Just let me use it, I am not signing up to test the app.


Please feel free to put in any non-existant e-mail address to try it out, we don't do email checks for now, because there are a small number of users. Make sure to remember the credentials if you would like to store your progress, especially across devices. Thank you for your interest!


Create a Rust program that writes a PPM file to stdout of a shape you want to draw.

Ask ChatGPT to give you example programs you need to implement based on part of rust you want to learn.


Rust gives you data race freedom and memory safety and a myriad of other great correctness preserving qualities like Options, `unsafe {` and a high quality type system.

Not to mention that it is blazingly fast.


Rust is literally designed to constrain what you can do much more tightly than C(++)/Python/Lisp. That's basically the opposite of the common definition of "freedom".

You can argue that what you give up in exchange for this freedom is more valuable, but don't twist the definitions of words.


> That's basically the opposite of the common definition of "freedom".

It depends on which "common definition" you're working from. To make an analogy, both GPL advocates and MIT/BSD license advocates argue that their conception of freedom is "more free."

Rust is closer to the GPL here. By limiting certain things that you can do, you are free to do things that would be harder if you're allowed to do anything. The canonical example here is Stylo; the project was attempted with C++ multiple times, but was too buggy. But Rust's restrictions allowed the Rust version to succeed. You can argue it both ways: Rust limits certain kinds of code patterns (outside of unsafe, of course...) but that may enable you to do things that were too hard to do when there were no safeguards.

(A more generalized version of this debate is the distinction between "positive liberty" and "negative liberty," this debate transcends software.)


Yeah Rust forces your program to use certain patterns. But in return, other users can assume those patterns exist. In result, Rust is one of the best programming languages to do refactorings in that exist. You are less free to write code that can be refactored badly, you are more free to do refactors. A sensible trade in my opinion.


Rust is literally designed with the `unsafe` keyword that tells the compiler: "hey you won't be to prove this is correct, but I'm going to do it anyway, don't check it".

The restrictions merely apply to provably correct code.

I'm not sure how telling the compiler to disable the safety features so you can do your thing is unbearably limiting.


Indeed, but in a similar manner, lisp restricts you out of the low level architecture, and you operate in a higher free-er plane where most ideas will work fine. Rust constraints are mostly liberating because you're safe to assume things will work.


Yes, Rust is much easier to write and faster to learn than C++. This makes Rust better for many cases, but you can't really say it is more powerful.

C++ templates are hard to learn and understand, but they are one of the most powerful constructs we have in any programming language, I miss them when I work in other languages.


This is a good point. Rust is better than C++ in many ways but when it comes to templates and compile time optimizations then its flipped and C++ is much better. The Rust trait system also feels pretty limited too.

Though as far as compile time templates go I think Nim templates generally meets or exceeds C++ templates in most areas. But I've become addicted to compile time type ducking, which is antithetical to Rust's vision of programming.


DBT (Dynamic Binary Translation) counts, https://github.com/copy/v86


Except you can run the wasm through wasm2c and run that on Arm. So that needless thing gives you exactly what you want.


Schism (Scheme) also self hosts on Wasm. https://github.com/schism-lang/schism



We should send in Sassy Justice to investigate right now!

https://www.youtube.com/c/SassyJustice/featured


Jeffrey had to bear that brunt.


C itself was the attack. We would be in a much better place across many dimensions had we stuck with the Wirthian family of languages. If not for strings alone, in terms of security and cycles wasted running strlen.

http://www.cs.virginia.edu/~evans/cs655/readings/bwk-on-pasc...


Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: