Weekend Law: Habeas, Menendez Brothers & Recipe Wars
https://www.bloomberg.com/news/audio/2025-05-17/weekend-law-habeas-menendez-brothers-recipe-wars-podcast?utm_source=flipboard&utm_medium=activitypub
Posted into Podcasts @podcasts-bloomberg
In 2005, OLPC’s $100 laptop was going to change the world — then it all went wrong
OLPC’s $100 laptop was going to change the world — then it all went wrong
The $100 OLPC laptop was supposed to revolutionize education and close the digital divide. But in just a few years it was recognized as a failure, a symbol of tech industry hubris, a one-size-fits-all American solution to complex global problems.Adi Robertson (The Verge)
adhocfungus likes this.
MODERNIST DOOR KNOCKER
You can download the original file without watermark or signature at:
payhip.com/b/aINlL
#doorknob #blackandwhite #old-door #wood #metal #rustic #ornamental-symmetry #stock #photography
Been playing around with the cameras on the 3DS now that I've gotten it homebrewed.
the fool is trying, yet again, to be some kinda player in this conflict.. he's a no one!
it's been a long time
#photography #photographie #fotografia #fotografie
#blackandwhite #blancoynegro #noiretblanc #schwarzweiß
#monochrome
#streetphotography
#urbanphotography #urbanscape
The Big Picture | Substack
The Big Picture provides a deep dive into the cultural, political, and societal issues shaping our world today, from a variety of unique perspectives. Click to read The Big Picture, a Substack publication.thinkbigpicture.substack.com
Went out for a long walk today - The local water reservoirs are at the lowest I've ever seen, and we're still only in May with a (likely) very hot and dry summer to come.
puntata 163 del 17 maggio 2025
Scaletta dei contenuti: Amptek Alex Marenga in voce - Spazio novità #17 (maggio 2025) H501L - The Fool on the Hill vinylRadiondarossa
De IAdicto digital
Cómo mejorar el SEO en 2025 y adaptarte a la nueva era de la búsqueda IA
El SEO ha cambiado: ya no basta con gustarle a Google, ahora las IAs se comen tu tráfico sin devolverte visitas . Si no adaptas tu… #SEO #SocialMedia
iadictodigital.com/como-mejora…
Cómo mejorar el SEO en 2025 y adaptarte a la nueva era de la búsqueda IA - IAdicto digital
Cómo mejorar el SEO en 2025 con estrategias reales y efectivas. Olvídate de trucos obsoletos y aprende lo que realmente funciona.Tarkion (IAdicto digital)
The image displays a user interface for a social media application, specifically Threads, with a focus on its multi-link feature. The background is predominantly black, with various white and gray elements. On the left side, there is a logo featuring a stylized "a" with the text "THREADS MULTI-LINK" beneath it. The central part of the image shows a video player with a cloud background and a pause button, indicating a paused video. Surrounding this are several interface elements, including a dropdown menu with options like "Anyone," "Your followers," "Profiles you follow," and "Mentioned only." There is also a section labeled "Design Week" with a post by "kylia.kayaks" asking about appreciation for a flip clock. Another section shows a new thread creation interface with a text input field and a "Cancel" button. Additionally, there is a profile section for "Cassandra Taylor" with a post about sharing thoughts on books, coffee, and design. The overall layout is clean and modern, with a focus on user interaction and content sharing.
Provided by @altbot, generated privately and locally using Ovis2-8B
🌱 Energy used: 0.221 Wh
Sensitive content
Die wichtigste politische Konfliktlinie im Land verläuft derzeit durch die Union: der pro- vs. der anti-AfD-Flügel.
"CDU-Ministerpräsident Günther fordert AfD-Verbotsverfahren – und widerspricht dem Kanzler"
spiegel.de/politik/deutschland…
»Gesichert rechtsextrem«: CDU-Ministerpräsident Günther fordert erneut AfD-Verbotsverfahren – und widerspricht dem Kanzler
Schleswig-Holsteins Ministerpräsident Günther möchte, dass die Bundesregierung ein Verbot der AfD antreibt. Parteichef Merz lehnt das ab: Er fürchtet den Vorwurf der »Konkurrentenbeseitigung«.DER SPIEGEL
Lord Caramac the Clueless, KSC reshared this.
Trump’s Embrace of White South Africans Takes Dark, Unnerving New Turn
First, Trump officials cut off refugee resettlement from all over the world. Then they got those white Afrikaners here in three months. Funny how that happened.The New Republic
Gen Z vs. Iconic Techno, Electronic and Dance Music!
We have some of the most iconic techno, electronic and dance music from the 90s and 2000s to see how many of these Gen Z would recognize! How well do you think Gen Z did? Subscribe to @TeensReactOfficial for more videos every week! FOLLOW US EVERYWH…Teens REACT | Invidious
Join us tomorrow at 2pm at #pyconus for an open space. Let's talk about what updates we want to make to our packaging guide. And what things you'd like to see pyOpenSci focus on in the upcoming year.
When: Sunday may 18 2025
Where: Room 316
The Heist cart pod's hidden vault 💰
🎶 "The Heist" - Rick Smith 🎵
youtube.com/watch?v=8sGRAolzfL…
#portland #oregon #pdx #pnw #photo #photos #photography #mobilephotography #digitalphotography #smartphoneography #iphoneography #iphone #shotoniphone #shotinioscamera #editedoniphone #editediniosphotos #nocleanuptool #noai #art #fediverse #pixelfed #money #ricksmith #ost #trance #dannyboyle
Das Bild zeigt eine appetitlich angerichtete Dessertplatte auf einem Tisch. Im Zentrum der weißen Tasse befindet sich ein Stück Tiramisu mit einer Schicht dunklen Schokoladenpulvers darüber. Neben dem Tiramisu sind verschiedene Früchte wie rote Beeren, Kiwi, Ananas, Weintrauben und Erdbeeren angeordnet. Ein großes Eissphere liegt in der Mitte der Tasse, und eine Schicht Schlagsahne mit Schokoladenstreifen ist darüber dekoriert. Zwei Gabeln und ein Messer liegen auf einer weißen Serviette neben der Tasse. Die Tasse ist auf einem grauen Tisch platziert, und das Licht scheint von oben zu fallen, was die Farben der Früchte und des Desserts hervorhebt.
Bereitgestellt von @altbot, privat und lokal generiert mit Ovis2-8B
🌱 Energieverbrauch: 0.215 Wh
"In the future, every drainage pipe will be world-famous for 15 minutes"
Handy Wallhole
#streets #streetart #decoration #pipes #drainagepipes #walls #humor #art #design
#photography #photos #colorphotography #streetartphotography #urbanphotography
#jlbouzou
Diverse centinaia di persone hanno sfidato il divieto di manifestare per le vie di Basilea - La polizia ha tentato di deviare il corteo
rsi.ch/s/2836388
Antonio Brown detained after gunshots outside Adin Ross' boxing event
https://apnews.com/article/antonio-brown-gunshots-adin-ross-bea21d312928850618ea894f5dabae53?utm_source=flipboard&utm_medium=activitypub
Posted into Sports @sports-AssociatedPress
Jetzt im Livestream: Eurovision Song Contest in Basel
In Basel treten 26 Länder an, um den 69. Eurovision Song Contest für sich zu entscheiden. Auf welchem Platz wird Deutschland mit dem Geschwisterduo Abor & Tynna landen? Das Erste überträgt die Show live.
➡️ tagesschau.de/ausland/europa/e…
#EurovisionSongContest #Livestream
Eurovision Song Contest 2025 - Das Finale - hier anschauen
Der große Abend ist gekommen. 26 Länder treten an, um den 69. Eurovision Song Contest in Basel für sich zu entscheiden.www.tagesschau.de
#BabelOfCode 2024
Week 9
Language: Ada (Spark?)
Confidence level: High
PREV WEEK: mastodon.social/@mcc/114463342…
NEXT WEEK: mastodon.social/@mcc/114582208…
So I start reading the manual for Ada. I think: This is *great!* This has all these features, conveniences etc I was wishing for for years in C++, and didn't get until I jumped to Rust. I might have been using this for games in 2010 if I'd dug into it then!
Then I start writing an actual Ada program. It turns out to be basically a pain in the ass.
#BabelOfCode 2024
Week 8
Language: FennelConfidence level: High
PREV WEEK: mastodon.social/@mcc/114433465…
NEXT WEEK: mastodon.social/@mcc/114463342…
RULES: mastodon.social/@mcc/113676228…Lua is my favorite programming language. Because of Reasons¹ I have stopped using it, but it is still a jewel of design to me. Any description of what I want in a programming language will sound like "Lua, but—"
Fennel is "Lua, but with LISP syntax". Which is… if anything the opposite of what I want. Hm.
¹ I NEED TYPES
mcc (@mcc@mastodon.social)
#BabelOfCode 2024 Week 8 Language: Fennel Confidence level: High PREV WEEK: https://mastodon.social/@mcc/114433465965880352 NEXT WEEK: https://mastodon.social/@mcc/114463342416949024 RULES: https://mastodon.Mastodon
Compromises on basic things continue. I want to create an array whose size is not known at compile time. I believe I can declare this with
Mem : Array (Natural range <>) of Integer range -1..Integer'Last;
But this errors there's no initialization. You can initialize an array to a fixed value with (Others => -1), but then it doesn't know the size. I wind up making a sub-procedure *just* because that is the only syntax I can find for initializing an array to a size. github.com/mcclure/aoc2024/blo…
aoc2024/09-01-disk/src/puzzle.adb at b46079ddcb5c45d52af5882e940a593050c7beb9 · mcclure/aoc2024
Advent of Code 2024 challenge (laid-back/"babel" version) - mcclure/aoc2024GitHub
Small observations:
- Inner procedures and functions of a larger procedure and function can access the outer procedure's local variables. That's nice. I suspect this is hiding some sort of horrible restriction on recursion, but it's nice.
- The error messages, at least in "gnat" the open source Ada compiler, are NOT good. I think this is downstream from the language having lots of minor similar-but-distinct concepts instead of single powerful concepts. There's a lot of jargon and lots of edges
inner procedures (in gnat) require executable stack because creating a closure puts a trampoline on stack so that you would not need "fat pointers" like Rust does
this is also why you can't compile GHDL to WebAssembly
Something I don't know how you'll feel about: You know how in every programming language except Lua you index arrays from 0, and in Lua you index arrays from 1? In Ada, if I'm understanding this correctly, you choose whether your code indexes arrays from 0 or 1. *On an array by array basis*. You could mix 0- and 1-indexed arrays in the same code. You could have an array which contains 10 elements at indexes 10 through 19 inclusive, if you wanted. An array is a map with integer keys in a range
…
Maybe the problem with Ada was that the things it was trying to do were too advanced for the tools that were available to the designers at the time.
I'm having an awful problem with a very straightforward bit of code because I want to scan over some code iterating a variable erratically. But I don't have any good value to give *before iteration begins*— because Ada integer types are range-limited, I can't use "0". This would be no problem at all I had Option<>. But I don't have Option<>.
Guh. Part 1 done. It was ok once I actually had my data loaded into memory, but every moment up until there was pulling teeth, and honestly the ergonomics weren't *great* after that. The final insult was it taking a startling amount of time trying to figure out how to convert an Integer to a Long_Integer when it turned out my result was over 32 bits. It's Long_Integer(), but StackOverflow was a bunch of "how do I cast in Ada?" "*bragging* In Ada, you don't NEED to cast!"
github.com/mcclure/aoc2024/blo…
aoc2024/09-01-disk/src/puzzle.adb at 9048d0cd5d29fc8f987c4f7369360279199fc2b0 · mcclure/aoc2024
Advent of Code 2024 challenge (laid-back/"babel" version) - mcclure/aoc2024GitHub
I pushed through Part 2 just to get it over with. I could have done a very clean, efficient implementation in any other language, but Ada makes creating new arrays enough of a pain I just wound up like… doing it the dumb nested loops way. Whatever. I realized in literally the final line of code I wrote that part of why I was struggling with loops was I didn't know "exit" existed.
It works. It's even relatively efficient. I don't feel proud of this code.
github.com/mcclure/aoc2024/blo…
aoc2024/09-02-disk/src/puzzle.adb at 3adbb87169b82453caafd75308837c203247edc4 · mcclure/aoc2024
Advent of Code 2024 challenge (laid-back/"babel" version) - mcclure/aoc2024GitHub
A problem I anticipated with this "Babel of Code" project and sure am hitting now: The AOC puzzles are a great way to learn a language, but they'll always focus on *only part* of a language. When I hit smalltalk, I'll have little opportunity to use objects. Multiprocessing, or verification capabilities like Spark, can be applied in *some* puzzles, but it's hard to know *which* puzzles until it's half complete. Like, what formal properties does THIS puzzle have to verify?
Oblomov reshared this.
#BabelOfCode 2024
Week 9.5??
Language: Spark
Against my better judgement, but since it was one of the main things that intrigued me about Ada, I decide to port my "day 9" solution to Spark.
I put at the top of my program:
with SPARK_Mode => On
And run it. Nothing happens. Or rather it runs normally. I assume that this sets an attribute read by the Spark toolchain, and is ignored by basic Ada.
The docs suggest running gnatprove. Which… isn't in debian apt? I think I have to go to Github?
gnatprove-x86_64-linux-14.1.0-1.tar.gz turns out to be 412MB gzipped, and contains both a complete installation of GCC and a Python 3. That seems like why dpkg exists, but it seems the AdaCore corporation really, really wants me to be using gnatprove as part of their IDE. Which I guess is also why gnatprove unlike gnat itself can't be run on single files and I have to make a project file. Whatever, fine.
It's running. It gives me hundreds of validation errors. Which I guess is what I wanted.
Spark is immediately proving itself interesting. My very first error:
puzzle.adb:47:21: medium: range check might fail, cannot prove upper bound for 1
47 | Mem_Idx := 1;
| ^ here
reason for check: value must fit in the target type of the assignment
What this means: Mem_Idx has type
Mem_Idx : Natural range 1..Mem_Len;
where Mem_Len is a Natural argument of the procedure. But *nothing guarantees Mem_Len is nonzero*. That's a real uninterrogated assumption!
Gonna nerd-snipe you with F* 😉
"is a general-purpose proof-oriented programming language, supporting both purely functional and effectful programming. It combines the expressive power of dependent types with proof automation based on SMT solving and tactic-based interactive theorem proving."
E.g. proving function equivalence:
floss.social/@janriemer/114446…
Crazy language! 😄
Jan :rust: :ferris: (@janriemer@floss.social)
module Part1.Lemmas open FStar.Mul let f1 (x: nat) : Tot nat = x + x let f2 (x: nat) : Tot nat = 2 * x val lemma_f1_f2_equiv : x:nat -> Lemma (ensures (f1 x == f2 x)) let lemma_f1_f2_equiv x = assert (f1 x == f2 x); () When we execute this, v…FLOSS.social
It compiles to OCaml by default, but can also compile to F#, C and even WASM (using a tool called KaRaMeL 😋 github.com/FStarLang/karamel)!
GitHub - FStarLang/karamel: KaRaMeL is a tool for extracting low-level F* programs to readable C code
KaRaMeL is a tool for extracting low-level F* programs to readable C code - FStarLang/karamelGitHub
I'm not sure.
github.com/ucsd-progsys/liquid…
it looks like maybe it will work.
although I don't know if there's any meaningful interaction between the linear and refinement types
LiquidHaskell binary does not work with LinearTypes · Issue #1887 · ucsd-progsys/liquidhaskell
Running the binary for liquidhaskell-0.8.10.2 on any file containing a pragma for the LinearTypes language extension returns this: » liquid .hs liquid: Unsupported extension: LinearTypes Is t...GitHub
Continuing with the "couldn't you do the math yourself?" complaints, it now turns out I can't add Natural (range 0..Natural'Last) to Nonzero (range 1…Natural'Last). These types share a common upper bound and neither may be zero; this addition is safe in all cases!
I guess I expected working with a theorem prover language would have lots of paperwork. I don't know if I expected this. (Also *this* issue is Ada not Spark?) Would Idris have been able to figure this one out? I bet Prolog would have.
@DesChips I'd be curious yes. However if you were about to explain the type/subtype distinction to me, I have received that help already in the time since my post: mastodon.social/@mcc/114535020…
Thanks
@eggrobin Hi, sorry… are you saying that`type Nonzero is new Natural range 1..Natural'Last;`
is introducing the hard "no mixing!" nominal type, whereas
`subtype Nonzero is new Natural range 1..Natural'Last;`
is just like creating a shorthand expansion for `Natural range 1..whatever`, and would have evaded my error above?
Sub-types are indeed important ^^ What I noticed first is that you use anonymous subtypes and constraints a lot, where I would define explicit types. For example, with the array of integers:
type Mem_Length is range 0 .. 20_000;
type Any_Mem_Element is new Integer range -1 .. Integer'Last;
Invalid : constant Any_Mem_Element := -1;
subtype Valid_Mem_Element is Any_Mem_Element range 0 .. Any_Mem_Element'Last;
type Mem_Array is array (Mem_Length range <>) of Any_Mem_Element;
Then you can declare your array like so:
Mem_Len : constant Mem_Length := 42;
Memory : Mem_array (1 .. Mem_Len) := (others => Invalid);
You can also check for valid elements, e.g.:
for Elt of Memory loop
if Elt in Valid_Mem_Element then
--- something
end if;
end loop;
@DesChips This is fascinating! I'm confused by the '(others => Invalid)' value being assigned to Memory in the line
Memory : Mem_array (1 .. Mem_Len) := (others => Invalid);
Mem_Len (set to 42) is limited to the range 0 .. 20000. In the assignment of (others => Invalid), what are the 42 elements of Memory assigned to -- Invalid? Or something else (or undefined, which seems very anti-Ada)? Or is Invalid returned if Memory is accessed with an index outside 1 .. 42, i.e. 0, 43 .. 20000?
I guess I'm mostly confused by what 'others' refers to.
@arclight When "others" is alone in the array literal (aggregate) it means all the elements of the array. Which, in this case, I set to the value of the "Invalid" constant. The word "others" makes more sense when you provide values from some elements of the array and a default value for all other elements, e.g.:
Memory : Mem_array (1 .. Mem_Len) := (1 => 2, 4 => 0, 16 => 13, others => Invalid);
learn.adacore.com/courses/intr…
“learn.adacore.com"
An interactive learning platform to teach the Ada and SPARK programming languages.learn.adacore.com
It's just a constant declared to be the value -1 (matching what you have in the code screenshots in this thread). It's an actual byte value that you can store in a variable of type Any_Mem_Element.
A : Any_Mem_Element := Invalid.
and then I excluded this value from the Valid_Mem_Element subtype by defining the range from 0 to last:
subtype Valid_Mem_Element is Any_Mem_Element range 0 .. Any_Mem_Element'Last;
mcc reshared this.
You are reading the docs wrong, see AARM 4.5(10) ada-auth.org/standards/2yaarm/… and 3.5.4(24) ada-auth.org/standards/2yaarm/….
What this is saying is that the implementation could compute the sum a + x in a type wider than that of a and x, where that sum does not overflow.
mcc reshared this.
I guess you figured it out by now, but the issue here is confusion between types and subtypes; the point of defining a new type (type T is range blah, or type T is new U [range blah];), besides allowing for different representations, is to disallow mixing them (as noted above, here I think it makes sense to have two types).
To describe constrained values, use a subtype (subtype T is U range blah;). The type Integer has subtypes Natural (0 .. Integer'Last) and Positive (1 .. Integer'Last).
@eggrobin Hi, sorry… are you saying that
`type Nonzero is new Natural range 1..Natural'Last;`
is introducing the hard "no mixing!" nominal type, whereas
`subtype Nonzero is new Natural range 1..Natural'Last;`
is just like creating a shorthand expansion for `Natural range 1..whatever`, and would have evaded my error above?
Exactly (well, no `new` in the subtype declaration).
Also, that subtype Nonzero has a name already, it is called Positive, RM A.1(13) ada-auth.org/standards/2yaarm/….
It is used very often, e.g.,
type String is array (Positive range <>) of Character
ada-auth.org/standards/2yaarm/….
Also note that since Ada 2012, you can have subtypes that are fancier than ranges with Static_Predicate, see the example in RM 3.2.4(40) ada-auth.org/standards/2yaarm/….
The thread made me mildly curious, so I took a stab at it.
Caveat, while I am on WG 9 and an observer on the Ada Rapporteur Group, I am there only as a liaison from Unicode; I have only written Ada recreationally, and not much of it at that. My father used to chair the ARG and work on Ada compilers; most of what I know is from him.
github.com/eggrobin/ada-playgr…
ada-playground/src/ada_playground.2.ada at master · eggrobin/ada-playground
Contribute to eggrobin/ada-playground development by creating an account on GitHub.GitHub
I haven’t looked seriously at ADA in 30 years but it was at one time considered to be The Future™️. To many of us, it was what we considered the ultimate “bondage and discipline” language. But it did have good ideas that informed future languages.
I still don’t want to program in it now.
Ada is the language that was used for the intro classes for the CS program I attended in Uni. I already had experience in Java at the time but someone really recommended I go through and do the Ada courses.
I dropped out and didn’t get seriously back into programming for well over a decade because of it. It set the stage for a very unappealing journey at Uni and whomever told me I should do it anyways: I hope they rot in hell.
A lot of the Pascal-influenced languages do that; it may go back to Algol, I don’t remember. You can do stuff like
TYPE FooA ARRAY[7..10] OF FOO;
and set the valid indexes of the array type. When ISO Pascal introduced Conformant Arrays, you could declare functions with formal parameters like
PROCEDURE MyProc(VAR x : ARRAY [low..high : INTEGER] OF INTEGER);
and low and high would be local variables set to the minimum and maximum index of the array (which may not start at 0).
Fun!
yes, I feel seen!
Also, to add one more example, I love flexible array indexing as defined in AWK: indexes can be any number: zero, negatives, sparse series, etc. – but arrays generated by awk itself (e. g. by using 'split') are indexed starting on 1.
and Julia follows MATLAB quite closely (also in row vs column major, plus a lot of sub-indexing methods). Also in Julia there's a package that allows you to create arrays with arbitrary index starts, so I guess that would make it easier to port Ada or Pascal programs. It also has (recommended) array traversal iterators that work regardless of indexing choice, which is actually Very Nice™.
@JamesWidman @riley
true, although that's *technically* because it's lisp and the 0-th element is the head.
In[1]:= l = {1, 2, 3, 4, 5}
Out[1]= {1, 2, 3, 4, 5}
In[2]:= l[[0]]
Out[2]= List
Early PC BASICs let you pick 0/1 indexed on a program by program basis.
Is Ada by variable, or by value held in the variable? Like if it's by value, do functions with array args have to inspect the value before accessing index 5?
if I remember you can put an enum in there too!
Tbh I sorta understand why this isn't common anymore. Explosion in types for mild benefits
As already said, Fortran arrays start with index 1 unless you declare a different range. But also, arrays are column-major order whereas C-based languages use row-major.
Both design choices (on the part of C, to be sure) make sure you'll have extra fun if you need to port complicated numerical code from one to the other.
Well, the main gimmick of ada is the typing. Types are supposed to mean much more than "a range of values" - the idea is that all of your types, even the ones that seem 'trivial' like integers, also encode intent. That includes the types you use to index into arrays.
When you do array(1 .. 5) you're actually creating an anonymous subtype of Integer. If you have two different types where one is not a subtype of the other, and you declare an array with those types, you have to cast between the types to switch between the two. That's Ada's way of forcing you to actually take those cases into account.
Yep! At that point you're SOL.
There are surprisingly few guardrails in quite a few places if you don't use SPARK - especially around dynamic memory allocation.
Also, in Ada, it’s easier to load binary file as you can easily describe the memory layout of types and thus specify a binary serialisation, than to interpret text files.
@Feufochmar @mu @0xabad1dea "in Ada, it’s easier to load binary file as you can easily describe the memory layout of types and thus specify a binary serialisation, than to interpret text files."
I will admit that the absence of a standard way to do this in C is one of my biggest pet peeves about the language.
Have you tried APL? This language (thankfully not replicated in most of its successors like J or BQN) has a global variable called ⎕IO (index offset) which can be set to 0 or 1 to indicate the start index of arrays.
Changing this global variable changes the language behaviour, globally.
Now, it not only changes the way you index variables, but functions that return indexes, or work with indexes also change. So a lot of basic functionality actually remains unchanged when this variable is changed. However, if you want to write a more complicated function that work independently of the value of ⎕IO, you have to be very careful.
In practice, a project decides which one to use, and then you'd better never change it or you'll have a lot of problems.
It's also always fun to discuss APL in a chat, and someone shares some interesting way to solve a problem. You try it and it doesn't work, and of course it's because they used ⎕IO 1.
declare
Mem : array (Positive range 1 .. Some_Size_That_Is_Known_Here) of Integer range -1..Integer'Last;
begin
-- Do things with Mem.
end;
There is a function form of GetLine so I would imagine that the following would work:
Line : constant String := Get_Line; -- From stdin.
or, if you have a file path:
F : File_Type;
begin
Open(F, In_File, "file/path");
declare
Line : constant String := Get_Line(F);
begin
I'm very unfamilliar with Ada overall, so take this with a grain of salt; you've probably come across this context already - but I think your point about "There's really important environments [...] maybe it turns out Ada is *perfect* for this environment" is possibly spot on.
I understand that one of the main drivers of Ada's brief popularity was its adoption by the Department of Defense for safety-critical systems. Indeed, it's the main language for the Space Station's MDM processors.
In that setting, NASA's software reliability group (until recently) had a strict set of predicates called the Power of Ten[2]. Rule #3 is: *"Do not use dynamic memory allocation after initialization."* I think that meshes very well with the friction you're referring to. The same rule is laid out in MISRA standards for safe automotive software.
(in practice, I think it's highly debatable whether these prescriptions actually work - there are some very safe embedded systems that use other paradigms - but that's the working hypothesis for many of these projects)
@0xdbfb7 The fixed-memory environment is a legitimately interesting one. But it's very much not the only environment! For comparison, consider networked server software. This is an important use case which naturally needs use of dynamic memory allocation, virtual memory, and runtime file I/O, but also would benefit immensely from the safety guarantees Ada/Spark claim.
I understand some languages are narrow-application, but Ada is sold as, and feels designed as, a general purpose language…
this is why i don't use VHDL 😁
"it seems good but is a pain in the ass to actually use" is like, The ADA/VHDL experience
Checking your list of candidate languages, one that's not currently listed but seems likely to inspire a similar sense of "interesting in theory, annoying in practice" is Eiffel: en.m.wikipedia.org/wiki/Eiffel…
I learned a lot about OOP in general by learning Eiffel in particular, but I never used it for any actual practical purpose.
hopefully this comes off as helpful and not an "um actually ada's great" cause ergonomics and learning materials are almost non-existent, it makes up a lot of its own jargon, and as you said, gnat's errors are dogshit.
`Text_IO.Get_Line` has overloads that take a file handle (or `File_Type`) and return a `String`
Also `Option` kind of exists with the catchy name `Ada.Containers.Indefinite_Holder`
Compiler Explorer - Ada
pragma Source_File_Name (Main, Body_File_Name => "example.adb"); pragma Ada_2022; with Ada.Text_IO; with Ada.Command_Line; with Ada.Containers.Indefinite_Holders; procedure Main is package TIO renames Ada.godbolt.org
mcc reshared this.
KTM Co-Owner Bajaj Auto Signs €566m Loan Before Funding Deadline
https://www.bloomberg.com/news/articles/2025-05-17/ktm-co-owner-bajaj-auto-signs-566m-loan-before-funding-deadline?utm_source=flipboard&utm_medium=activitypub
Posted into Profiles @profiles-bloomberg
Altbot
in reply to Y Gath Goch • • •The image shows a flat-screen television placed on a stand against a light-colored wall. The TV screen is displaying a blue background with the text "EURIOVISION" in white, centered on the screen. The television is positioned on a wooden floor, with cables visible on the floor beneath it. To the left of the TV, there is a wooden door with a visible hinge. The wall behind the TV is plain and light-colored, with a small device mounted near the top center. The room appears to be dimly lit, with the TV screen being the primary source of light.
Provided by @altbot, generated privately and locally using Ovis2-8B
🌱 Energy used: 0.146 Wh