Better HN
topnewbestaskshowjobs
Log inSign up

chiffaa

122 karma · joined May 14, 2024 (2y ago) · 55 submissions

aspe:keyoxide.org:TGG7II7PR65X7T5ZFI45B3ZYCA
Submissions

comment 5h ago · link · parent

The former is just a shortcut taken for the specific example - types are omitted because state modification is missing

The latter is literally just a normal closure. Sure, you get a move which is an ownership semantic, but otherwise it's a very normal closure with an unused parameter, writing

  (_) => container::background(c)
doesn't make it much better, does it?

comment 1w ago · link · parent

While true, deprecating modules is still possible, if barely, as can be seen by RFC 3550 deprecating legacy ranges in I believe Edition 2027[1]

[1]: https://rust-lang.github.io/rfcs/3550-new-range.html

comment 1w ago · link · parent

There is a fairly long running joke from recursivedoubts that everyone is the CEO of HTMX. You can become one too, if you apply at https://htmx.ceo/

It is outlined in "htmx lore" at https://htmx.org/essays/lore/#htmx-ceo

comment 1w ago · link · parent

Rust does VERY limited breaking changes, the largest one probably being the `!` type inference change that was very carefully vetted, deemed a necessity and saw contributions to fix the issue in all crates in the official registry

comment 1w ago · link · parent

To my knowledge this is what crABI is all about

comment 1mo ago · link · parent

I wanted to give Laravel a spin to have PHP+Laravel under my belt for future. `laravel new` couldn't even initialize a project fully, which might be the first time I've seen a framework-specific setup tool fail this fast

comment 1mo ago · link · parent

Ah, fair enough, makes the whole situation a bit more lame

comment 1mo ago · link · parent

isn't that fairly irrelevant if Deno dies out? Does anything else use JSR?

comment 1mo ago · link · parent

There may be use-cases (and the RFC allows ignoring the SHOULD clause with enough reasoning), but GET does not have a request body as per specification, and a LOT of things drop it because of that (most notably - nginx! Also applies to HAProxy and Apache HTTP server afaik, but also a bunch of load balancers)

comment 2mo ago · link · parent

I referenced Boa without linking, so: https://github.com/boa-dev/boa

comment 2mo ago · link · parent

Setting aside the fact that using Rust for a JIT won't help that much - a new JS engine is a huge undertaking, especially if the goal is to compete with V8. They could eventually switch to Boa[1] if they wanted more safety, but it's still ways off and doesn't seem necessary enough just yet

Also, isn't the goal of Servo to effectively compete with CEF first and foremost? Because you don't need memory safety for that really

comment 3mo ago · link · parent

> we should be taking a more “batteries included” approach to language and library design.

Okay, but how do we decide which approach to a problem should be standardised?

Rust's approach of "provide a minimal core to build libraries on top of" provides a fairly significant benefit - flexibility.

A prominent example is async: Rust has three fairly prominent async runtimes (being Tokio for general server-side use, smol for a simple non-work-stealing approach and embassy for embedded). Which one do you make the default? Tokio is very complex and work-stealing is arguably a very bad default in terms of development complexity. smol doesn't fit some workloads because of a simpler execution model. Embassy is way lower level and much more constrained than most applications need. Standardising over one implementation instead of the current (even if still messy due to early portability woes) standardisation around traits and general async semantics would make switching runtimes more problematic, even though the general case is solved with the same approach as Python's

Database access is also a complicated topic. Rust has multiple fairly popular DB libraries. The first two that come to mind are SQLx and Diesel. Both are too complex to be a part of the standard library, both required a fair bit of breaking changes, and if you wanted a raw core to build on top of - you can't really build SQLx on the type of core e.g. Go's database/sql has, you'd be basically forced to implement it all from scratch to handle the compile time type checks anyway

RNG sounds simple, except there are good reasons behind both rand and fastrand existing, and behind rand not being stabilised at 1.0.

DateTime handling is notoriously complicated, has multiple competing implementations (chrono, time, jiff) with various trade offs

Where do you draw the line? What do you standardise and which implementation do you standardise against?

I've seen golang exemplified a lot in adjacent threads, but golang's standard library both has fairly significant issues (json, no set type, very limited CLI flag parsing, UUID took until 1.28) and is standardised around a relatively specific goal (unix server usage)

Dunno, I'm not entirely sold on the whole "extend the standard library" idea for a language meant to run both high level applications and embedded stuff. If anything, recommending blessed.rs more is a better way IMO

comment 3mo ago · link · parent

I wouldn't really say DeltaDB is a showcase project, given Zed has been working on it for at least a year, so it's likely been a focal point of development for quite some time. If there is funding to secure, they either should've been louder on the initial announcement, or not thrown a year on this, right?

comment 4mo ago · link · parent

Lem can also render via ncurses, which works fairly fine if you don't need mouse support. It used to also have an SDL2 frontend, but it was deprecated for reasons I don't remember

comment 4mo ago · link · parent

The compatibility layer mention is valid for many projects, and I personally greatly appreciate that it exists, even if it's a bit buggy

osu! however, is only officially distributed on Linux via AppImage (and semi-officially via Flatpak) and bundles its own SDL for the reasons that, to my knowledge, range from the general pinning to a known stable version approach to the team backporting functionality from SDL3 to SDL2 (last one I remember is non-text-based clipboard functionality, not entirely sure though)

comment 4mo ago · link · parent

osu! has spent a lot of time trying to switch from SDL2 to SDL3, but due to their high platform coverage (all three major desktop OSes + iOS and Android) and an attempt to keep all functionality native (so properly working Wayland supporr, along with other things) delayed the switch by around 2 years total. For the first time, the current switch seems actually final

comment 6mo ago · link · parent

That's mostly because BEAM uses an actor-style approach while predating the concept of actors, isn't it? Interesting artefact of history if so

Edit: upon rechecking, apparently that's not exactly right, and Erlang designers learned of actors after designing the language, which makes it all the more interesting

comment 6mo ago · link · parent

Unsafe code can break certain invariants of Rust, as `unsafe` is just a compiler "hold my beer" flag, which is why you're meant to do safety checks in your safe interface around unsafe code. If the unsafe code is wrapped in a way that does no guarding (or does something stupid in general), it is technically marked safe (because you said "rustc, hold my beer" as `unsafe` is also a contract) despite actually being unsafe

comment 6mo ago · link · parent

Google people were specifically talking about memory safety. Logic bugs happen. All of the issues in TFA are effectively logic bugs or POSIX stuff, which is a different category entirely that Rust never claimed to solve

comment 6mo ago · link · parent

Few things to note

1. uutils as a project started back in 2013 as a way to learn Rust, by no means by knowledgeable developers or in a mature language

2. uutils didn't even have a consideration to become a replacement of GNU Coreutils until.... roughly 2021, I think? 2021 is when they started running compliance/compatibility tests, anyway

3. The choice of licensing (made in 2013) effectively forbids them from looking at the original source

comment 7mo ago · link · parent

I wanted to avoid Emacs so I discovered Lem (so now I live in a different Emacs when writing CL), so it's not always this way

comment 7mo ago · link · parent

Very tangentially related comment, but I remember seeing a post on a local Facebook clone with a prompt to throw at Claude to "make a custom YouTube downloader for MacOS", so the general "Here is a prompt to feed an LLM" is somewhat real for some, apparently

comment 7mo ago · link · parent

A lot of software projects have names ranging from silly associations to very cheesy puns, and IMO this should never discourage anyone - everyone should have some whimsy when naming things, because it makes names more memorable. After all, people use Python, and name doesn't even refer to snakes!

I personally wouldn't be able to remember "kitty" if it was named "featureful-python-terminal-emulator", and I certainly wouldn't want to recommend it to others under this name

comment 7mo ago · link · parent

Please note that I explicitly said "past year 2". I believe the first two years were fairly decent, especially those who had worse basics than mine (not that mine were that good).

Notes (because the reply might sound weird without them): I do live in an authoritharian pseudo-democratic country which I will not mention explicitly for reasons; I do think some parts of the education system are effectively brainwashing (primarily the way we study history), but it doesn't affect my statements; I do think (or at least hope) that this is an issue of my university specifically and not our education system as a whole; I do admit that I slightly exaggerated, and that technically speaking there was some useful material in more courses than one, but I do stand by the opinion that the way we were taught only makes few of them actually useful. Also, I use the word "teacher" as there is only one professor in our department, which should've been a weird sign from the beginning, but as this is a story from a local university, you might imagine I didn't have much choice thanks to circumstances of my life.

Now, the fun way to start this would be to mention the specifics first.

Our databases course (now extended into database administration) did have a little bit of theory, primarily normalization and transactions. However, in practice, most of the information we were actually allowed to use within assignments are something you'd learn within 10 minutes of learning SQL (so very basic operations). We were not taught or (effectively) allowed to use constraints until last semester (4 semesters into learning about databases), we did not have a single mention of joins or indices, we did not have any discussions of ACID. It took us a year to even get close to data integrity. We were not allowed to use primary keys until the last semester. A lot of the course (the entire first year of it, really) was focused either on FoxPro DBMS or the visual parts of Microsoft Access, so much so that our assignments required basically documenting our GUI navigation of the latter without letting us do actual database work. We did switch to Oracle SQL DB in semester 7, except that we are forced to work with Oracle APEX and working with raw queries was basically self-sabotage due to the description requirements for the assignment write-ups.

As an extension of the above, we received a frankly ridiculous amount of scrutiny for everything BUT the actual database management. I was once forced to spend 2 hours staring at a Word document in far commander (which the teacher was obsessed with) as Microsoft Word weirded out at me typing out a word and screwed up an error underline, which triggered the teacher so much he forced me to find a reason it happened, or I would have my grade decreased. The same person made us spend the entire first lab class of this semester writing up what Oracle as a company is and what other non-Oracle products are named Oracle. This person alone soured my higher education to a degree that nearly made me quit university.

Our mobile development course consisted of the person running it making us choose a topic and implement a mobile application and effectively screwing off for the rest of the semester. As a result of no guidance, I would argue this is about as useful as making us watch and follow a Flutter (or Compose or whatever) tutorial and making a 10k words long write-up based on that. Also, a single mixup of "phone" and "smartphone" was punishable by extra assignments, initially in a form of making us make a presentation on what's the difference between a telephone and a smartphone.

Our operating systems course was relatively decent, except for the fact that due to the reduced hour count for the program, the only practical things were: write up some Windows batch scripting commands; write up some bash/coreutils commands; launch some Windows utilities from the command line and screenshot the process. The lectures were decent though, even though it was just a fairly high level overview of OSes people use and not what an OS really is. Not having an assignment on multithreading was funny when we got one for oru Java course.

Our neural networks course had us solve a set of quizzes about neural networks. We had no lectures, despite having no proper introduction to what a neural network even is. The course was stolen from a paid one, which I know because, incidentally, after half-intentionally breaking the grading system of the LMS ours was running on (tldr Python ACE due to unescaped evaluation in code runner tasks, go figure), I was tasked with rewriting this same course in a hardened way. The only benefit of this one was that I got paid for it, though you could argue that forcing us to learn on our own was technically useful under the guise of "you need to learn to learn"

Our project management course's exam (or, well, pass/fail oral attestation?) had us talking about Windows COM, Waterfall architecture and manual testing. There was a single mention of unit testing. The course material also assumed that debuggers still could only debug 16-bit code.

Our pre-diploma course project on project management forced us to pre-plan the whole application we were going to write. Architecture, specific library structure, specific class hierarchies, specific classes, fields and methods. While actively forbidding us from writing code. People were also forced to write up about database structure even if their projects did not imply having one. All while we had no choice over our project topics, as those are supposed to be work we do for a company. My friend has a 9k word long write-up about an S3 cache microservice, as that's the only way to pass the requirements.

These are just some parts of the torment we've seen here, as I am only listing out things from years 3+4, ignoring years 1+2 (which had their problems, making a C++ per-symbol parser was a fun one). The history of bias and straight up bullying from the tutors is long, documented and not acted on. The only reason corruption isn't openly involved is that one of the people teaching here was sued for taking a bribe about a year before I got into the university.

On top of all this, we've not learned anything about actual system design, security, distributed systems, functional programming, Linux, ethics, embedded, performance engineering. Our parallel programming class was just a set of questions in a quiz about OpenMP without an actual introduction. Our graphics class was us making models in Blender and p much nothing else. Our web development course forced us to write everything in Notepad in pure HTML4, and using JS was punishable. Our OOP class was overfocused on C++ so much that we've got `std::function` as an exam question because "well, it's a callable object, who cares that it's actually used for HOFs". Anything related to deployments and DevOps was only mentioned thanks to the fact that one PhD student was forced to run a subject that was meant to be entirely about Windows Active Directory and made a proper course of "from zero to CRUD in production" instead, which was arguably the most useful course in those 4 years for the majority of my peers, as it actually forced people to learn about CRUD workflows, frontend, REST API design and Docker.

I strongly believe that the way we were taught things related to most subjects actively harmed students, as we were not allowed to do our research and use results thereof, with the lecture material being either mostly useless or grossly outdated and out of touch with reality, even though the subject structure is pretty good and seemingly on par with normal universities.

comment 7mo ago · link · parent

I am in my final year of my bachelors in Software Engineering. I was (mostly still am) very interested in both SWE and CS in various angles - I studied a decent bit of PL theory, I tried to get into systems programming, I've built a bunch of "portfolio crud" software and had a short internship in a real company, with all of the above being roughly equally interesting to me. All this is to say I genuinely love the field so far.

However, the only benefit I've got from my local university is that it saves me from military while I study. Past year 2 (out of 4, country-specific quirks) there was roughly one subject actually worth paying attention to, so I also have switched to a "just get a decent grade at any cost" mode, as most of the material we're studying (and especially most of the assignments we've done) has negative value in real world.

Most of my peers consider me both more enthused and more knowledgeable than the average student, which mostly makes me realise that roughly 95% of my peers don't care about the contents of the courses.

All this is to say that, while grading is hard, the only thing that might get people to actually care is a proper course, no matter what threats you make.

comment 8mo ago · link · parent

Oh, then I misremembered and misunderstood the note, my apologies

On that note, thank you for all your work!

comment 8mo ago · link · parent

You can't cut down a language without breaking changes. And there fairly often are internal changes to simplify the compiler and the tooling. Just in the latest release, annotation internals were finally fully unified between rustc, cargo, clippy and other tools. This was a fairly considerable effort in deduplicating code. Borrow checker is being rewritten to move to tree borrows, trait resolution is being refactored for a variety of reasons. Code is being simplified where possible, but this doesn't mean Rust doesn't have areas to improve in, especially if there is a goal of replacing Ada/SPARK

comment 8mo ago · link · parent

There are ways to handle these effects without bloating up normal applications. For example, using attributes implemented as intrinsics, which wouldn't really affect anything that isn't using them.

The thing is, some of these things are very useful in specific domains, and all these domains are closely related to the ideas of safety. Nondeterminism and IO are important for purity/referential transparency, which is a fairly important effect for business logic IMO. Guaranteed termination matters for formal verification. Unwind removal matters for embedded. I don't think wishing for these things is really all that unwarranted

> I actually don’t see how this is any more beneficial than the existing no_panic macro

no_panic and similar macros are doing a very hacky workaround which isn't really a great static guarantee. The simple fact that building with panic = abort makes the macro useless is an annoyance in and of itself. dtolnay did great when figuring out some path forward but it's somewhat shaky

comment 9mo ago · link · parent

> What I need is an emacs with more lisp and less javascript

Lem[0] in ncurses mode might be your friend. Unfortunately the BDFL deprecated the SDL frontend seemingly due to the SDL3 breakages, but the web one uses webview + a homegrown system instead of electron and framework magic, so it's still fairly lightweight

its main proposition is that the whole thing is written in Common Lisp, so it retains the hackable model of traditional Emacses without retaining the legacy of GNU Emacs

[0] https://lem-project.github.io/

12