684 karma · joined Aug 29, 2021 (5y ago) · 200 submissions
comment 2w ago · link · parent
I'm not scratching my head about a "2025 Corolla." Windows 95 and 2000 had this built in, but then they lost it.
I'd prefer it was called Omni 2026.2 instead. It embeds a date and model and would package it as a product for on-premise or local hosting. It'd be easier to sell to the bean counters in the future: "We're running Omni 2026.2, we want to upgrade to Omni 2028."
comment 2mo ago · link · parent
4.
Software and AI – Plotting vs. Pantsing(pyjarrett.github.io ↗)
1 points · by pyjarrett · 4mo ago · 1 comment
comment 6mo ago · link · parent
> the tool is so fricken slow.
How old is "old hardware"? I've had no issues running CLion on a 2020 M1 Macbook Air and a i5-10400 (Linux). These projects are only in the hundreds of thousands of lines of code though.
> The install is gigantic on disk, leading me to avoid it on my older machines where space is limited.
I found that by default toolbox likes to keep old versions of the IDEs available for rollback. I disabled that and reclaimed tens of GB across all the products I use.
6.
2026 Annual C++ Developer Survey "Lite"(isocpp.org ↗)
1 points · by pyjarrett · 7mo ago · discuss
comment 7mo ago · link · parent
Python (decent standard library) - It's pretty much everywhere. There's so many hidden gems in that standard library (difflib, argparse, shlex, subprocess, cmd)
C#/F# (.NET)
C# feels so productive because of how much is available in .NET Core, and F# gets to tag along and get it all for free too. With C# you can compile executables down to bundle the runtime and strip it down so your executables are in the 15 MiB range. If you have dotnet installed, you can run F# as scripts.
comment 8mo ago · link · parent
There's instructions on running a Git server in the git book: https://git-scm.com/book/en/v2/Git-on-the-Server-The-Protoco...
comment 1y ago · link · parent
Every "type" you use in Ada is actually a subtype.
In Ada, "A subtype of a given type is a combination of the type, a constraint on values of the type, and certain attributes specific to the subtype".
You don't ever refer to actual types in Ada, since creating a type with "type" actually creates an anonymous type and the name refers to the first subtype.[1]
type Token_Kind is (
Identifier,
String_Literal,
-- many more ...
-- These are character symbols and will be part of Token_Character_Symbol.
Ampersand,
-- ...
Vertical_Bar,
);
-- A subtype with a compile-time checked predicate.
subtype Subprogram_Kind is Token_Kind
with Static_Predicate => Subprogram_Kind in RW_Function | RW_Procedure;
subtype Token_Character_Symbol is Token_Kind range Ampersand .. Vertical_Bar;
> If you have a pointer with more permissions, it should still be usable in a place that only requires a pointer with fewer permissionsThis is exactly how "accessibility" of access types works in Ada[2]. If you have a pointer ("access type") to something on the heap, you can use it wherever an anonymous access type can be used. You can also create subtypes of access types which have the constraint of a "null exclusion".
comment 1y ago · link · parent
Other languages focus on terseness and expressiveness. Ada expresses a bunch of constraints directly and forces you to do things in organized ways (e.g. use namespaces appropriately).
comment 2y ago · link · parent
> When "out" and "in out" parameters are distinguished, there is no need for the existence of constructors as a separate concept.
I don't agree with this. You can get I need to do things "post-init" with controlled types, or use a `return X : Thing do ... end return` block. Constructors help ensure invariants. You can make a type `is private` to prevent instantiation, only allowing creation via functions (sort of like Rust `new` associated functions), or initialization via an `out` param. It's OK but not perfect, but you can also tag on a `Type_Invariant` aspect if there are conditions which have to be met by a type. My big problem with Controlled types is that forces a type to be `tagged` (i.e. it has a vtable) which means it affects storage layout of values of that type, which isn't a problem in C++.
You can forbid copies by making something a `limited` type, but you'd have to write your own "Move" equivalent, and some of the containers have `Move` subprograms implemented to transfer contents. Limited types might elide the copy when returned from a function, but it's been a while since I looked at those rules.
comment 2y ago · link · parent
- https://blog.adacore.com/ada-on-any-arm-cortex-m-device-in-j...
comment 2y ago · link · parent
The amazing thing to me is that Ada code can call SPARK code just fine, and there's crates of SPARK code in Alire that you can use. It's a huge boost of confidence in the quality of a library that you're using when it has some form of verification.
comment 2y ago · link · parent
Ada has this as well, including using any arbitrary continuous range for array indexing which handles remapping indices for you. e.g. if the key range is 20-40 the language handles associating it with array indices for you.
comment 2y ago · link · parent