Hacker Newsnew | past | comments | ask | show | jobs | submit | howerj's commentslogin

I find it weird that people would downvote this, I know you should not complain about it, but this comment is correct. The UK does have a (uncodified) constitution. Also of note; even countries with a codified constitution have parts that are uncodified.


>> There is absolutely a Constitution in the UK, it is simply not codified into a single document. <link>

That's got to be the understatement of (many) centuries. AFAIK the UK constitution isn't even even codified into millions of documents, let alone a "single" one. Saying it's not in a "single" document is like saying my trillions of dollars aren't in a "single" bank account. The number of partitions really isn't the problem with that statement here.

Is there a single human (or even computer program) that could even definitively list all the sentences in this "constitution", let alone an arbitrary citizen who needs to be able to become aware of them to be able to follow them? (Note I'm not asking for interpretation, but literally just listing the sentences.) Could they even do this with infinite time? Is it even possible to have an oracle that, given an arbitrary sentence, could indisputably tell you if it is in the constitution?

Maybe that's asking too much. Forget enumerating the laws. Per your own link: "...this enables the constitution to be easily changed as no provisions are formally entrenched."

If this doesn't itself sound silly, hopefully you can at least forgive people for getting irritated at the proposition that there totally exists a "constitution"... that nobody can point to... and that doesn't actually do the one thing many people want from a constitution: being more entrenched than statutes.

> Also of note; even countries with a codified constitution have parts that are uncodified.

Not sure what countries you're referring to, but at least in the US, this is not the case. There is a single document that is the constitution, and (thankfully, so far) nobody is disputing what words are in fact written on that document. And that document absolutely is supreme to statutes.

Interpretation of the words is obviously left to courts in the US, and courts can interpret it differently changing the effective law, but "constitution" is not a synonym for "effective law", and nobody argues over what the words to be interpreted are. And even those interpretations are still written down!


I believe interpretation is a part of the definition of a constitution, you do not, we have different definitions, oh well. I also believe the uncodified/codified distinction is not binary, it is obvious that the US constitution is far more codified than the UK constitution, the two are at opposite extremes.


> I believe interpretation is a part of the definition of a constitution, you do not, we have different definitions, oh well.

You can't just brush it aside as some quibble about definitions. It's a fundamentally substantive difference in the two structures: one of these has an indisputable source of truth (a foundation everyone can witness) that everything else is built on top of -- however shakily! -- and the other does not. Regardless of whether you include the upper parts of this metaphorical building in your definitions or not, the foundations are not the same.


> It's a fundamentally substantive difference in the two structures

Yes, it is a substantive difference but it does not follow that this difference provides the 'constitution' property.

> one of these has an indisputable source of truth... the foundations are not the same

They are so similar as to be almost the same and if an 'indisputable source of truth' exists anywhere, it is not in the written documents or their structure but unwritten norms and rituals sit beneath both.

What stops a President from simply choosing to ignore a Supreme Court ruling and what prevents the King from returning to personal rule?

The lack of arbitrary rule is a defining feature of both and relies on something that emerged rather than something imposed from without by written words.


> What stops a President from simply choosing to ignore a Supreme Court ruling and what prevents the King from returning to personal rule?

Legally? The fact that everybody under the president -- including those in the military -- understand they are swearing their oath to the constitution -- not the King, not the Crown, not God, not the Supreme Court, not anything else. And that the Supreme Court says what the constitution means. And that if there is a clear and direct contradiction between the Supreme Court and the president, the former trumps (no pun intended) the latter.

Physically? "Nothing", yeah. Same goes for non-presidents. If you can get enough people to follow you (or maybe at least enough of the people with guns) everything else becomes irrelevant, including whether your title was president or King or God or Constitution or whatever.

> The lack of arbitrary rule is a defining feature of both

It is emphatically not. There are lots of countries with constitutions that nevertheless have arbitrary rule. As there are countries without constitutions or arbitrary rule.

> They are so similar as to be almost the same and if an 'indisputable source of truth' exists anywhere, it is not in the written documents or their structure but unwritten norms and rituals sit beneath both.

No, that's exactly what those are not. Unwritten stories, traditions, and rituals are very much disputable. That's kind of the entire point of writing things down, and the point of the game we call Telephone. The indisputable bits are physical artifacts everyone can see with their own eyes.


> And that if there is a clear and direct contradiction between the Supreme Court and the president, the former trumps (no pun intended) the latter.

The extent to which members of the executive branch adhere to their oaths is not written down. Ofc the oath is written and its power may partly derive from its written nature (clear; predictable; well publicised etc) but there is a lot more than its written nature that might cause a general to refuse to follow a Presidential order to arrest all people suspected of voting for their opponent.

> The lack of arbitrary rule... is emphatically not [a defining feature of both]

I guess it depends on whether you (or most reasonable people) would call countries like Russia a 'constitutional republic'. Of course there are plenty of dysfunctional and dictatorial countries which superficially describe themselves as XYZ but it lacks substance.

While there may be a textbook answer, I strongly suspect it is debatable within the field and comes down (like so many things) to how you define your terms. Do you define 'constitutional' as attaching more to the codified and written nature of any rules or whether it is more to do with predictable and enforceable rules limiting arbitrary government. My view is that it attaches more the latter.

If you go into the etymology of the term, I don't think codification is baked in - that you can find a large number of books discussing the English or UK constitution (using that term) is testament to the fact that it's not just some niche view. I do suspect the influence of US popular culture (e.g. Hollywood) has biased the term towards the US' arrangement vs. the alternatives.


> The extent to which members of the executive branch adhere to their oaths is not written down. Ofc the oath is written

So... it is written down...

Notice the president isn't even mentioned. [1] And it even says all enemies, foreign and domestic. The oath is 100% unambiguous and crystal clear that in the event that the president becomes an enemy of the constitution, you defend the constitution, not the president.

> but there is a lot more than its written nature

We're not playing no-true-Scotsman here, right? There are always going to be more factors both in favor and against such a position than any human can enumerate ahead of time. This in no way contradicts anything I wrote.

>>> definition of a constitution

>> The lack of arbitrary rule... is emphatically not [a defining feature]

> I guess it depends on whether you (or most reasonable people) would call countries like Russia a 'constitutional republic'

No, the fact that Russia has a constitution doesn't depend on what I (or most reasonable people) may call Russia or its form of government at all.

> I strongly suspect it is debatable within the field and comes down (like so many things) to how you define your terms.

Russia has a constitution, end of story. There's even a Wikipedia article on it! [2]

If you believe otherwise, just assert "Russia doesn't have a constitution" directly. No need to dive into the debate over whether "Russia is a constitutional republic" when Russia clearly has a constitution. Of course, you're not going to claim it doesn't have a constitution (otherwise you already would've), which... well, I rest my case.

> Do you define 'constitutional' as attaching more to the codified and written nature of any rules

I'm not defining "constitutional" (adjective), whose definition comes in conjunction with the noun following it. I am merely defining "constitution", which is a simple noun. Recall that the sentence I was originally replying to -- word for word -- was: "there is absolutely a Constitution in the UK." Not "the UK is a constitutional <noun>." That's all. The debate is not over anything that involves the <noun> following the word "constitutional". The dispute is over whether the UK has a constitution, and in that debate, it is indisputable that e.g. Russia indeed has a constitution, whether it is well-followed or not, or whether we like it or not.

I think what's becoming pretty clear that people just really desperately want to say the UK has a constitution regardless of how many contortions of the definition of "constitution" that requires, because... well, a constitution is a good thing, the UK sees its form of government as good, so of course it must have a good basis. (Global virtue-signaling, I guess?) Which I find ironic, because a good constitution-less government would be something to be proud of, not something embarrassing to avoid.

If this is hard to wrestle with, consider this: imagine a world where the UK was the same as it is today, but everything else was flipped. i.e. the US & every other country that has a constitution was suffering, and every other monarchy was flourishing. Do you really believe the experts "in the field" would still be arguing the UK has a constitution today, or would they just stick with calling it a monarchy and vehemently deny any constitution existing? It's pretty obvious to me the answer is the latter, but of course, I can't prove anything about an alternate timeline.

[1] https://www.law.cornell.edu/uscode/text/5/3331

[2] https://en.wikipedia.org/wiki/Constitution_of_Russia


Yes, the foundations of the constitutions are not the same, one of them has a mostly codified constitution, the other has a mostly uncodified (uncodified but mostly written down, that is not a contradiction!) constitution. They both have constitutions however, so the phase "Britain has no constitution" is wrong. To be clear, I am not saying that is good or bad that Britain has an uncodified constitution, just that from my definition (and most political and legal definitions) of what a constitution is the phrase "Britain has no constitution" is wrong. Britain of course has laws, and laws about how new laws are made, etcetera. This forms a constitution.


> Is there a single human (or even computer program) that could even definitively list all the sentences in this "constitution"

No, it's a living thing. Why is this your sticking point on the existence of a constitution or not?


>> Is there a single human (or even computer program) that could even definitively list all the sentences in this "constitution"

> No, it's a living thing. Why is this your sticking point on the existence of a constitution or not?

Do you never write down or sign contracts? Are verbal promises adequate for you in all transactions?

If you don't see the value of laws being written down - especially the most important ones! - I can't really convince you of it here on HN.

But what I can tell is that most people who care about the legitimacy of government believe it is fundamental to fairness that there be a single source of truth that can tell them the laws under which they would be rewarded or punished, before those happen.


I think you have diverged too much...well from reality, in order to try to prove a point. Do you think most people, or lawyers, or judges in the UK spend their time trying to enumerate all the laws of the land before they proceed in their court cases? Do you think that people think that the UK system of government is illegitimate? What point are you trying to make? Because it is not grounded in reality. You can debate the merits of a codified constitution versus an uncodified one, but the UK does have a constitution, the vast majority of which is codified into many documents. The following two links might help you:

https://en.wikipedia.org/wiki/Uncodified_constitution

https://en.wikipedia.org/wiki/Convention_(political_norm)#Un...

Note the second one applies to the US - a country with a mostly but not completely codified constitution.


> I think you have diverged too much...well from reality

> What point are you trying to make? Because it is not grounded in reality.

Your comment would have been much more valuable without these insults and I would have been much more likely to respond, to point you to where you seemed to be misunderstanding my point. But it seems you're not here for a discussion so let's leave it.


> If you don't see the value of laws being written down

I don't think this is helping much in the US right now. The orangefuhrer has shown he is willing to ignore clauses that are inconvenient.


Nobody claimed it's helping or hurting. The debate is over what constitutes a constitution, whether good or bad. There have been great governments without a constitution and terrible governments with one. "You don't have a constitution" does not mean "your government sucks", but it seems somehow people take it as such.


> If you don't see the value of laws being written down - especially the most important ones! - I can't really convince you of it here on HN.

It's a shame you can't really explain it. It's ineffable, isn't it.


"I like scrambled eggs."

"I do too, but the way Trump is behaving, pretty soon it will be illegal to ..."


Pretty soon you won't be able to afford eggs.


> Do you never write down or sign contracts? Are verbal promises adequate for you in all transactions?

I generally deal with written contracts but verbal contracts are recognised as having equal legal validity. I'm not sure how that's relevant.

> If you don't see the value of laws being written down - especially the most important ones! - I can't really convince you of it here on HN.

Where have I made a value judgement either way? I'm only pointing out that the constitution needn't be explicitly codified in order to exist.

> But what I can tell is that most people ...

[citation needed]


That's an excuse for the list being not bang up to date. It is no excuse for the list being non-existent.


It does exist, it's the house of lords.


The UK has an extremely entrepreneurial culture as well, which is shown in the data (number of businesses registered, number of startups, both per capita), it ranks very highly, along with other indicators of innovation, it might not be as entrepreneurial as the USA, but globally it ranks very highly. The fact that you mention the Soviet Union and its central planned economy and the (outdated and stereotyped view of the) British class system almost like they are equivalent really undermines your point as well.


Other's have mentioned that Forth isn't an esoteric language, however if you want a Forth written for an esoteric language I have written one for SUBLEQ (see https://esolangs.org/wiki/Subleq). Although SUBLEQ is more of an esoteric machine than a language, it also sort of qualifies as one (and has an entry on the esolangs Wiki).

It's available at https://howerj.github.io/subleq.htm if you want to try it online.


Also, while Forth may not be esoteric, there’s always Chuck Moore’s other creation, colorForth. https://colorforth.github.io/


I have heard that this is how it is done before. I wonder how that works with a third party? If they happened to come across the binaries some how they could demand the source. I also wonder if that clause is enforceable.


AIUI the entity distributing it has to provide the source. So if Google were to (try to) (re-)distribute that compiler, they'd be legally fucked because they'd have to provide the source… which they don't have and can't get.

(But presumably that agreement also restricts Google from redistributing the binaries anyway.)


Is there an implementation of an APL language (or other any other array language) written in *readable* C that is around 1000 LoC? There are for LISP, FORTH, Prolog, TCL and the like.


What, you don't like Arthur's style?

https://www.jsoftware.com/ioj/iojATW.htm

https://github.com/kparc/ksimple/blob/main/ref/a.c

Slightly less factiously, the ksimple repository has a version with comments.

https://github.com/kparc/ksimple

https://github.com/kparc/ksimple/blob/main/a.c

Note, these aren't APL, but they are in the same family of array languages.


Unlikely, at least for what I think you mean by "readable" here.

APL isn't really one of these exhibitions of computational simplicity in the way of the languages you mention. It's inventor, Kenneth Iverson, was more focused on the human side of thinking in and using the language.

Forth, Lisp, et al are quite easy to implement, but they require considerable library layers on top to make them useful for expressing application-level logic, even if we just focus on the pure functions. APL, on the other hand, has a larger core set of primitives, but you're then immediately able to concisely express high-level application logic.

Are you looking for a kind of reference implementation for learning purposes? If so, I'd say the best route is just go with the docs. Arguably the Co-dfns compiler is a precise spec, but it's notably alien to non-practitioners.


Any pointers on how to get better at expressing high-level application logic in APL? Any good resources on programming in APL? So far I have only found tutorials and basic stuff for learning APL but not much on applying APL. I am slowly improving and think I sort of get it but probably don't.


Not that I know of, unfortunately. This is, IMHO, the biggest pain point of APL pedagogy at the moment. I'm actually working on some resources, but they're still gestating.

For non-event driven systems, the short story is to organize application state as a global database of inverted tables and progressively normalize them such that short APL expressions carry the domain semantics you want.

For event driven systems, we have token enumeration over state machines, which can be expressed as literal Branches to state blocks.

Granted, the above likely doesn't communicate well unless you're already primed with all the necessary ideas. If you're interested, I'm willing to chat. Email is in my profile description.

source: Current day-to-day is greenfield APL dev.


>IMHO, the biggest pain point of APL pedagogy at the moment

It is the one that always trips me up. I just started in on my third attempt at learning APL/array languages, both previous times I got to the same point where I was mostly at a loss of how to apply it all. So I move on and forget all that I learned until the next time and have to start over. Thankfully the last attempt seems to have mostly stuck as far as keyboard layout goes, makes progress much quicker.

I may take you up on that email offer once I get a bit further along in this current attempt, can't quite form reasonable questions yet and only know what tripped me up in the previous attempts. I believe you are a regular on APL Orchard? I will be joining it soon so perhaps will see you there.


Yes, I'm one of the few regularly in the Orchard. There's also the APL Farm discord, which is chattier.

In the off chance you've not see this: https://aplwiki.com/wiki/Chat_rooms_and_forums


What would you consider "high-level application logic"?


The logic of the system instead of the pieces of the system; how the language's core data structure applies/relates towards expressing that system. I could very well be overthinking things and seeing some sort of magic which is not there but this line in the previous response to me, makes me think I am still missing a piece of the puzzle:

>organize application state as a global database of inverted tables and progressively normalize them such that short APL expressions carry the domain semantics you want.


Ok. I have some idea I think of where you are at, so I will give it a shot. I think this sort of thing is an emergent property in the design of APL applications, and so there's nothing to "see" in terms of an example unless you can see that design process.

But first, "database" here is just the list of global variables. If that wasn't obvious, it is important.

My application processes weblogs, and "clicks" is the bit-array of which event was a click (redirect), as opposed to having a variable called "weblog" which contains a list of records each possibly having an event-type field.

Normalizing them that acknowledges that the weblog (input) probably looked like the latter, but it's easier to do work on the former. APL makes that transformation very easy: Just rotate the table. In k this is flip. Simples.

Those "domain semantics" are simply the thing I want to do with "clicks" which in my application comes from the business (users), so I want them to provide a bunch of rules to do that.

Now with that in mind, take a look here:

https://code.jsoftware.com/wiki/Vocabulary/bdot#bitwise

and here:

http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec...

Look carefully at the tables, because they're given in a slightly different way, but they are the same. And these are all of them, so it should be obvious at this point you can represent any boolean operation against any matrix of variables with a matrix of these numbers.

For example, you might have a sql-like expression (from a user of your application) of x=y, and x<y and so on that you want to use to filter some data set.

Now if you are to think about how you might do this in Javascript (for example; probably in scheme too) you would probably organise such a table as a chain of closures. And I think if you look at any ORM in just about any language you'll see this kind of pattern (maybe they use classes or use a tree, but these are obviously the same as closures), but such a tree can only be traversed, and the closure can only be called. Maybe you can batch or shard, but that's it, and since I would bet there are a lot of dependant loads/branching in this tree of closures, it is slow.

But if you understand that this tree is also a matrix of boolean operators, it is obviously parallelisable. And each operation is simple/cache-friendly and so therefore fast. This leads to your "queries" being a set of projected indexes or bitmaps (whichever is convenient), which you probably also store in global variables someplace (because that is convenient) while you're doing what you need to do (make xml, json, bar charts, run programs, whatever)


I may be reading too much into this but it sounds like you’re searching for templates to stimulate ideas similar to how there are examples for smaller puzzle type problems.

I think most sizable stuff is proprietary. I implemented an lsp in an open source K which uses json/rpc. But the open source K is probably best considered a hobby project.

https://github.com/gitonthescene/ngnk-lsp/blob/kpath/k/lsp.k

You might consider joining one of the APL forums if you haven’t already.


Not that I have found, closest is an incomplete one done in python.

https://mathspp.com/blog/tag:lsbasi-apl#body-wrapper


Readable is probably in the eye of the beholder but here’s a partially expanded version of ngn/k https://codeberg.org/growler/k/src/branch/expand/a.c

The expansion is mechanical and thus not really at attempt at readability.


Beyond what others have mentioned, I think another big differentiating factor between APL and the rest of those languages is that APL isn't focused on allowing the user to expand the language meaningfully, but rather on being a well-rounded language by itself (which is how it can be reasonably useful without objects with named fields, mutation, explicit loops (or only gotos in APLs infancy!), no first-class functions, no macros, and only one level of higher-order function (though of course most APL implementations have some of those anyway)).

As such there's really no pretty "core" that pulls its weight to implement in 1000LoC and is useful for much.

Here's a simple minimal APL parser in JS that I wrote once to display one way of parsing APL: https://gist.github.com/dzaima/5130955a1c2065aa1a94a4707b309...

Couple that with an implementation of whatever primitives you want, and a simple AST walker, and you've got a simple small APL interpreter. But those primitive implementations already take a good chunk of code, and adding variables/functions/nested functions/scoping/array formatting/etc adds more and more bits of independent code.

Perhaps if you accept defining bits in the language in itself via a bootstrap step, BQN is a good candicate for existing small implementations - a BQN vm + minimal primitive set is ~500LoC of JS[0] (second half of the file is what you could call the native components of a stdlib), 2KLoC for first public commit of a C impl[1], both of those having the rest of the primitives being self-hosted[2], and the compiler (source text → bytecode) being self-hosted too[3]. (the C impl also used r0.bqn for even less required native primitives, but modern CBQN uses very little of even r1.bqn, having most important things native and heavily optimized)

[0]: https://github.com/mlochbaum/BQN/blob/master/docs/bqn.js though earlier revisions might be more readable

[1]: https://github.com/dzaima/CBQN/tree/bad822447f703a584fe7338d...

[2]: https://github.com/mlochbaum/BQN/blob/master/src/r1.bqn (note that while this has syntax that looks like assigning to primitives, that's not actual BQN syntax and is transpiled away)

[3]: https://github.com/mlochbaum/BQN/blob/master/src/c.bqn


ngn's k is publicly available, around 1000 lines and readable, in that I can read it.


I had a lot of fun writing this and it is great to see this submitted here, I just did it to see what was possible. It is an incredibly niche processor with little practical use. If you have any questions let me know.

I have also started contracting in the UK and I'm looking for work, details are in my profile.


Nothing involving forth (only Java really) where I'm working, but I wanted to send some appreciation for Embed forth (meta-compiler), the documentation is particularly good :)


You may be interested in #forth on Libera, though it's unlikely to lead to work.


It’s unlikely to find paid Forth work, though I hope there is still someone hiring engineers that write Forths and LFSR CPUs in their spare time. One will find they are quite versatile and eager to learn :)


Ah yeah, I'm not looking for Forth work, it would be nice, but not likely. Just C/C#/.Net/Linux and Embedded work.


I find those Schuko / Europlugs terrible, they never fit correctly (wildly different manufacturing tolerances between countries) and break easily.


If only American mains power were 230V...


I know that's what I do! It's a fun exercise, and Forth is uniquely suited to writing Forth interpreters. Forth really only has a few areas where it excels and they are incredibly niche ones at that.


I do not know how this can be justified at all. It does not make any sense.


It makes perfect sense, trump wants russia to conquer Ukraine, and wants Ukraine to pay for it.

BTW US is still blocking transfer of Swedish AVACS planes, build in Sweden by Saab.


As this gets more and more serious, the "Kompromat Hypothesis" starting to look like the only remaining explanation.


If you want to cut up Ukraine and you are starting to feel impatient, it makes great sense.


The full quote would be "The dmac and smac are pretty self-explanatory fields. They contain the MAC addresses of the communicating parties (destination and source, respectively).", it does explain them. However, this is an article about how to make a network stack, it is safe to assume the reader should know something about networking before hand.


Consider applying for YC's Summer 2026 batch! Applications are open till May 4

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

Search: