@user Ok, I have studied it a bit more and I can understand it now. It's not a rounding problem, the algorithm is incorrect. At each step it takes a number n and looks for a number m>n for which m^2-n^2 is a square number; the problem is that it never checks that n<(m-n), so it finds some triples that should not be in the sequence
I don't really see how that needs attribution. It's a pretty generic word search challenge, it's entirely possible (and reasonable) to just come up with that challenge idea by yourself
Cosmic ray hacking
code-golf cops-and-robbers kolmogorov-complexity atomic-code-golf
Cosmic background radiation can cause random bit flips in electronics. For this reason, some mission-critical computers
undergo radiation hardening. Your task is to use your magic bit
flip gun to hack in to a pro...
I have an idea for a fun challenge but it will require access to IPA phonetic transcriptions (in English at least). An API that serves up the same would also do, though it would tend to favor languages with integrated support for external APIs.
Web searching has not revealed any such dictionaries...
I think for the two underappreciated categories self nomination is the best way to find them, but it's also the category that's probably hardest to nominate yourself in
@RedwolfPrograms While it is of course one of the great challenges ever in the world because I made it, it's not that deserving of more appreciation. I've seen good challenges where the author worked really hard on them, more than I did on this one.
Peano arithmetic at compile time scala code-golf
Peano numbers represent nonnegative integers as zero or successors of other Peano numbers.
Task
Implement the following operations on Peano numbers, at compile time, in Scala:
Addition
Subtraction - You will never be required to subtract a greater...
There's an operator that takes two functions and makes an array from their outputs on the same input, so I use that on the functions for is-divisble-by-three and is-divisible-by-five, then the quaternary operator uses that
So [false, false] would run the else, [false, true] would run the second if, [true, true] would run both ifs, etc
@RedwolfPrograms I mean, I've had conversations with someone who says more or less "It bad when government does things, but if a mega-corporation does the same things, it's good" i.e. I don't want Obamacare, I want Bezoscare included in my Amazon Prime membership
@RedwolfPrograms If you're talking about the mainstream ones, yeah, in theory, they might all work about the same, but there are some out there that just sound like nonsense.
@RedwolfPrograms Technically, we could live without an economic model, as it's all based in something we arbitrarily give value to. But we choose otherwise
As for systems of government, I think I have an idea for one that would work better than most of the modern ones, but the implementation would be near impossible.
@RedwolfPrograms "Ok, so the premise is that exactly one person each day is allowed to spend money, and that person changes each day, determined by whoever is winning in an ongoing guinea pig race. Once you're chosen, your guinea pigs goes back to the start"
@user Basically anybody can propose a bill. It doesn't have to be at all formal. Then, for a little while, people can make arguments for and against it and propose changes. Over time these will be merged and/or cleaned up until there is a bill that is well specified enough to be a law, then a sort of jury will review the arguments for and against it and decide whether it should be ratified.
@cairdcoinheringaahing ? How does their name change their accomplishments? You can just ignore it and say "they."
@RedwolfPrograms This is going to be hard to implement on a bigger level (which you did mention). Also, you might want a board to make quick decisions in times of crisis.
But yeah, a democracy like that would be really good.
@user "Dingus" (at least where I grew up) is used as a mild insult for someone who isn't too bright. Obviously the user isn't (hence the nomination), but it's a bit like writing it for someone with the username "fool"
@RedwolfPrograms The issue there is that the existence of a "jury" gives extra power to people in a system that's clearly designed so that people have as much equal power as possible
@user Oh, I don't expect people to vote differently based on a username (and I hope that's the case) but I do kinda chuckle a bit when writing "Dingus wrote some truly great answers" :P
@user Then all it takes for a populist to take power and the entire system will be reformed to favour them
Any system that allows to populist to easily take power is not a stable system, because such politicians are never interested in the good of the people/nation, but instead their own interests
I think a jury of somewhat-qualified people works better than a popular vote, as they could research the topic in much more depth and would be more resistant to emotional bias
That was the original point of the Electoral College in the US - to prevent the election of a populist - but that's been corrupted over the past 250 years
There's a tradeoff between checks and efficiency. If you have more checks, it gets pretty slow, if you don't have a lot of checks to make it fast, radical changes may be made.
I think this system is much more adaptable for different speeds. If you need a bill passed quickly that very few people disagree with, it will happen quickly.
Whereas important and controversial issues that don't need to be immediately resolved could have years of debate and research, maybe multiple juries, etc.
I'm still not totally clear on how that would work, but I guess it could.
Of course, it's unlikely any country is going to overhaul its constitution and laws and organization, and new countries are rare these days, so reforming the governments we have bit by bit seems like the only way to make progress.
@RedwolfPrograms I do the appeal of such a system, and it does work in smaller groups. Some key issues tho: it'd require near-constant involvement in the political sphere, or else it becomes easy for a populist dictator to gain a supermajority by just encouraging their opponents that "politics is boring" while their supporters get more and more involved. The jury falls victim to accusations of "elitism" ("why do they get more power?" etc.) and either (cont).
(cont). the voting base votes to remove them (which doesn't look good if that's shot down by the jury) or the jury gets elevated to a much stronger legislative process that just develops into a parliamentary system over time. It'd be far too easy for a populist to gain power by running on a platform of "get rid of the jury, give power back to the people", then once they have power, never relinquish it. (cont).
(cont). Eventually, not everyone will want to be involved in proposing a bill, and will instead ask people they trust to do it for them, leading to a parliamentary system
The reason most countries use parliamentary systems or similar is because most of the time, they work
The point of the iterative sort of process is that it doesn't take much work at all to propose something.
A populist wouldn't be able to remove the jury, because which side is more popular doesn't affect which side wins, so unless the populist could make a really good case for why removing the jury would be better it wouldn't work
@RedwolfPrograms Populists don't need to make good arguments, that's the entire danger of them. This hypothetical leader (who wouldn't have any actual leadership position aside from a majority of people agreeing with what they say and then voting for the bills that do that) would simply say "the jury is bad, this is a bill to get rid of them" and if they had enough support, the jury would be removed.
@cairdcoinheringaahing If the jury can only be removed with, say, 75% of the popular vote, it's unlikely a populist will be able to do that. People can be swayed like that, but not so many.
I see no need for a jury. Just have people propose something, have experts refine it and produce different versions of it, and then have people vote on it again (or vote to refine it further).
Let's say that through whatever process people got onto this jury, a majority of the jury became old/powerhungry/unwilling to change. The people, tired of this, propose a bill to completely revamp the jury so that it's more reflective of the people's views with near 100% support, and this jury turns around and says "Good arguments. No"
But the people voting on it would probably not read the actual arguments. The resulting bill and arguments would probably be thousands of pages of lawyer-speak.
> Eventually, not everyone will want to be involved in proposing a bill, and will instead ask people they trust to do it for them, leading to a parliamentary system
Surely a system like the current US Congressional system, but where anyone can fill out a form to their representative to request a bill be filed to do something would be a better version of this?
I'd imagine they'd be pretty normal people. You don't regard someone as a higher up just because they were in a jury that ruled on an important court case, right?
@RedwolfPrograms No, but someone who ruled on the OJ case wouldn't get to determine if black people have the same rights as white people
People with the power to regulate people's lives must be accountable someway, and just randomly choosing these people is not a way to hold them accountable
I'd think they'd be required to write a paper on why they picked what they did, and "I don't like this law" wouldn't really hold up. Ideally the arguments would be at the point where a typical person could tell which side should win just by reading them.
It's not like they'd just hear the proposal and some arguments and decide; they'd see the product of months or years of refinement into a few core arguments for each side.
@RedwolfPrograms Unfortunately, that falls victim to the fact that most laws aren't about easily understood things. Without e.g. food regulation, many people get sick or die, but the typical person knows barely anything about how beef is treated, or if one chemical is ok and others aren't
@cairdcoinheringaahing That's why the arguments would be clarified and expanded on by experts. Ideally they'd be at the point where a typical person could understand them.
Sure, most people can make an argument on whether abortion should be legal or not, but your average Joe won't be able to tell you if you should ban chemical X or Y, even if an expert went "X is good, Y is poison"
@RedwolfPrograms We literally have thousands of experts world wide saying things such as "Abortion is perfectly safe, and helps save lives", "Guns kill people if in the wrong hands", "Global warming is real", yet millions of people choose to just ignore them
@RedwolfPrograms I think it'd work if people were perfectly logical and fully engaged in the political process. Unfortunately, that isn't the case, so we choose people who are (at least in our opinions)
The main advantage of this is that if you don't know or care about an issue, you just don't submit an argument. If you do know a reason for or against it, you can argue against it or provide evidence of why other arguments are wrong.
@RedwolfPrograms I do like that aspect of it. I know it seems a bit like I'm just shitting on your idea, but there are some real merits of such a system
I think the main issue of it is that is falls too easily into Just Another Parliamentary System, as people get disillusioned with the system and realise that politics is and should be boring
It's the central proposal/argument process that I think is the main draw of this system. In theory it's compatible with any type of government I guess.
The goal is to raise the error message with the most bytes! The error message may not be generated by the program itself, such as Python's raise. here is an example in python that raises 243041 bytes of error code:
def a(m):
try:-''
except:
if m>0:
a(m-1)
else:...
Your goal is to write a program that prints a number. The bigger the number, the more points you'll get. But be careful! Code length is both limited and heavily weighted in the scoring function. Your printed number will be divided by the cube of the number of bytes you used for your solution.
So...
@rak1507 Agreed, barring one exception: I do kinda want the site to have a “Biggest number in 100 bytes” challenge, where the only restriction is that it must finish within a finite, measurable amount of time. All the restrictions on “no digits/power/constants” is what ruins them
Four is Cosmic
Four is the only self-referential number in the English language. No other positive number has an equivalent number of letters in its name. This made for a fun game my friends and I would play when we wanted to mess with some people. We called this game Four is Cosmic!
How to play:...