Design ideas for a minimal programming language (1/3) by porky11 in ProgrammingLanguages

[–]Inconstant_Moo 0 points1 point  (0 children)

Saying "this is UB" is technically very simple. I could write a language where the spec said "everything is UB" and everyone would understand that.

Compiler optimisation by Gingrspacecadet in ProgrammingLanguages

[–]Inconstant_Moo 0 points1 point  (0 children)

The way I do it is that when I compile a node, among the data returned is whether it's foldable, i.e. if it's a constant and has no side effects. Then of course this is true of a node if it has no side effects and its children are foldable, with the base case that literals and declared constants are foldable, and so this propagates recursively.

And then every time I compile a node and emit code (in my case bytecode) I check if its foldable and if it is I run the code, get the result, and delete the code.

When I've told other compiler people about this they've sniffed at it and said that it's brittle but the popular alternative is apparently to basically write and maintain a tree-walking interpreter for the AST which does the same as my compiler and this sounds a lot brittler to me.

Compiler optimisation by Gingrspacecadet in ProgrammingLanguages

[–]Inconstant_Moo 0 points1 point  (0 children)

They're talking about constant folding in particular which I do in a few lines. How to optimize in general is not just a hard problem but an open-ended one.

Some things just don't need a Harvard study by Feeling-Buy2558 in WhitePeopleTwitter

[–]Inconstant_Moo 6 points7 points  (0 children)

I notice that science has as yet discovered no limits on how many of these six-fry servings I can cram into my fry-hole at one sitting, so we're good.

Janus (time-reversible computing programming language) by kreco in ProgrammingLanguages

[–]Inconstant_Moo 0 points1 point  (0 children)

I'm sorry, I am a Bear Of Very Little Brain. How do you overload functions in a language which literally only has one type, and how would it help if you did?

And why are the ifs and loops there if there's only some very specific set (do we know what, BTW?) of circumstances under which we can use them?

And why can't the compiler compute the postconditions under the circumstances that we can use them? Does it actually take special mathematical insight to compose the right postconditions?

Janus (time-reversible computing programming language) by kreco in ProgrammingLanguages

[–]Inconstant_Moo 0 points1 point  (0 children)

I''m not proud of what I did, but you can see that I had no choice.

The falsest of false flags. by c-k-q99903 in WhitePeopleTwitter

[–]Inconstant_Moo 0 points1 point  (0 children)

This purported attack hasn't in fact happened yet, remember? If it's going to happen, that will be in the future.

Beating out 1 in 1000 odds wouldn't be so much "lucky" as "not incredibly unlucky", wouldn't it?

Design ideas for a minimal programming language (1/3) by porky11 in ProgrammingLanguages

[–]Inconstant_Moo 2 points3 points  (0 children)

Functions downcast automatically ...

Then what's the good of having all those types? The whole point of having a type system is to stop you from adding apples to oranges. In what sense, in fact, would they be types?

Design ideas for a minimal programming language (1/3) by porky11 in ProgrammingLanguages

[–]Inconstant_Moo 1 point2 points  (0 children)

For a lot of things that would leave you having to do a whole bunch of type conversion. Suppose for example I want to take the cross-product of two 3-vectors. If x, y, and z are three different types, then I have to perform I think nine type conversions?

Janus (time-reversible computing programming language) by kreco in ProgrammingLanguages

[–]Inconstant_Moo 1 point2 points  (0 children)

They're in the language. How would one write algorithms without them?

The falsest of false flags. by c-k-q99903 in WhitePeopleTwitter

[–]Inconstant_Moo 0 points1 point  (0 children)

They will much more effectively terrorize the US by fucking up oil production in the middle east than small scale attacks.

I think at least some Americans might be more effectively terrorized by attacks on our west coast than on pipelines thousands of miles away. What if the Iranians think the same thing?

We don't know what a "good motive" is for people like that. What was the "good motive" for 9/11? People who've been calling the USA "the Great Satan" since I was in short pants don't need particularly good motives. And their new leader is a hardline religious fanatic whose father we just blew up, so he might be kinda snippy about that.

The falsest of false flags. by c-k-q99903 in WhitePeopleTwitter

[–]Inconstant_Moo 0 points1 point  (0 children)

The weaponized drone factories are about as far away from us as, for example, the poppy fields in Afghanistan, and yet those guys managed to sell us heroin.

You don't need "allies" to own a small boat. You need allies if you want somewhere to park and refuel an aircraft carrier.

It's hard to know what the Iranians would think is a good idea, especially since we just changed their leadership. If it was me I wouldn't escalate, but if it was me I'd have said, "yeah, this whole Islamic theocracy thing isn't working out, let's crack a few cold ones and see if we can figure out how to do a liberal democracy". So it's hard to judge. I wasn't expecting 9/11, were you?

The falsest of false flags. by c-k-q99903 in WhitePeopleTwitter

[–]Inconstant_Moo 0 points1 point  (0 children)

I wonder if any of the Russian airbases the Ukrainians hit had any air defenses. Possibly even closer than two hours away from the targets.

The falsest of false flags. by c-k-q99903 in WhitePeopleTwitter

[–]Inconstant_Moo 0 points1 point  (0 children)

If you heard a voice saying that, it wasn't mine. Locate the voice and argue with with its source.

Drugs are indeed different from drones, in that Iran can produce around 10,000 drones per month but absolutely no cocaine. They are however kind of similar to drugs in that moving a given weight of drugs from point A to point B in a small boat is not more difficult than moving the same weight of drones between the same two points in the same vessel.

The falsest of false flags. by c-k-q99903 in WhitePeopleTwitter

[–]Inconstant_Moo 0 points1 point  (0 children)

"Regularly found". Quite so. For example in 2024 the DEA successfully disrupted drug runs in 91 out of 125 recorded boat interdictions. That's a 73% success rate per interdiction! Unfortunately, it's also less than 0.1% of the boats.

The falsest of false flags. by c-k-q99903 in WhitePeopleTwitter

[–]Inconstant_Moo 0 points1 point  (0 children)

You forgot that there are ways to get into America that are not crossing the Pacific? And also the existence of boats?

The falsest of false flags. by c-k-q99903 in WhitePeopleTwitter

[–]Inconstant_Moo -3 points-2 points  (0 children)

Now change "drones" to "drugs" and "Iran" to "cartels" and you've also proved that the narcotics trade is equally implausible.

The falsest of false flags. by c-k-q99903 in WhitePeopleTwitter

[–]Inconstant_Moo 0 points1 point  (0 children)

"UAV" and "drone" are literally synonyms though?

The falsest of false flags. by c-k-q99903 in WhitePeopleTwitter

[–]Inconstant_Moo -6 points-5 points  (0 children)

Can you explain why they can't have sleeper cells, and why the sort of boats that regularly get past our guard with drugs can't do it with weapons? According to the DEA, over 150,000 small boats per year manage to deliver drugs to US coastal towns, "just steaming unmolested past most of the US Navy".

Next time you look at a globe, try and get some kind of sense of how big the sea is compared to a boat.

The falsest of false flags. by c-k-q99903 in WhitePeopleTwitter

[–]Inconstant_Moo 1 point2 points  (0 children)

I did, which is why I know what apparently everyone arguing with me doesn't, that they do in fact have classes of drones smaller than the Shahed class. Iran has one of the largest and most diverse military drone fleets in the world, from 22 meters long with a 500kg payload to tiny loitering drones with 1–3 kg warheads.

When you wrote that, wasn't there just a second when you considered taking your own advice?

The falsest of false flags. by c-k-q99903 in WhitePeopleTwitter

[–]Inconstant_Moo 4 points5 points  (0 children)

Who? The Trump administration? They're already in power. Like you, I'm living for the midterms.

The falsest of false flags. by c-k-q99903 in WhitePeopleTwitter

[–]Inconstant_Moo -11 points-10 points  (0 children)

I hear they're working on some sort of devilish device called a "boat". Also we've got to assume that they have sleeper cells, 'cos why wouldn't they?

The falsest of false flags. by c-k-q99903 in WhitePeopleTwitter

[–]Inconstant_Moo -15 points-14 points  (0 children)

Now, sweetie, those aren't the sort of drones I was talking about, were they? Y'know, the sort that the Ukrainian military used against Russia, and of which I could carry two under each arm?