What are the criteria for HNQ questions? I say that, because the question above has the message This question was selected for the Hot Network Questions list. and it's not exactly a great question
CMC: A bigot is a program that reads a program and outputs whether that program is a bigot.
Bigots are impossible in any Turing-complete language. Define a programming language with the highest computational class possible, but which still accepts bigots.
Perfectly stable code
You are a.... Let's say prepared, programmer. You are working on the code to end all code, and it must be perfectly stable. No crashes, memory corruptions, mispellings, or anything else must get in your way. Everything else was set, but to your horrer you discovered that yo...
@EsolangingFruit If the program has an ! in it, output if the input has a ! in it, otherwise remove !s from the input and act as a normal Turing complete language.
@JoKing Busted! This reminds me of some discussion over at the esolang wiki about TC languages without quines (the example was a language where a program couldn't start printing with its own first character).
@EsolangingFruit There may be many groups of bigotry. All programs in each group only recognise each other but no other programs. There may be non-bigots that can correctly determine whether a particular program is a certain type of bigot, without that program being a bigot.
My initial thought was a trivial example where a language wouldn't output until the program had halted, and only if the output didn't match the program itself
@Adám Ah, so in my example, I wouldn't need to remove the !s from the input
@JoKing No, a TC language program would be able to obtain an ! without containing one explicitly (e.g. by using the ASCII code), and then check if the input has that.
@JoKing Hm, that might just work. Also: if the program has an odd number of bytes, it returns whether the input has an odd number of bytes, otherwise the program run like normal on the input followed by a trailing newline. In this language, trailing whitespace is insignificant (as long as the program has an even number of bytes).
Dave is learning about JavaScript. He just learnt an awesome function to convert a string into an integer.
Six months ago, he had written a useless code, which produces a random string 'line' of alphabets (uppercase & lowercase), digits and whitespaces. It has no special characters
Now he wants...
Being a developer, you should know how to process a large number of records with scripts.
You are given records of T customers of your company. Each record has the following information in the following format:
<customer_name>,<customer_no>,<date_of_birth>,<record_processing_date>
Where:
1.: N...
Dave is learning about JavaScript. He just learnt an awesome function to convert a string into an integer.
Six months ago, he had written a useless code, which produces a random string 'line' of alphabets (uppercase & lowercase), digits and whitespaces. It has no special characters
Now he wants...
> I Know Bassdrop. But I Plz Need Your Help In Solving These Two Questions Only. I Am Very Behind On My Syllabus & I Have Just Started Javascript. It Would Be very helpful Of You Guys If you Help Me On This One. Plz – Karandeep Singh
Target of programming languages can not be the smart one people , but average IQ people... If one write something nobody but the CPU understand: Where is the gain?
@RosLuP Target of my speech's keywords' slip cannot be the speaker, but average IQ people… If one writes something nobody but the speaker understands, then what is the point? /s
Could you please stop shuffling the deck and play already?..
code-golfarray-manipulationintegernumber
Challenge:
Input: A list of distinct positive integers within the range [1, list-size].
Output: An integer: the amount of times the list is riffle-shuffled. For a list, this means the list is...
Input:
An integer \$n\$, which is guaranteed to be \$\ge3\$.
An integer \$d\$, which is one of \$[-1,0,1]\$.
Output:
A road of size \$n\$, which will be in a north-west direction if \$d=-1\$; a north direction if \$d=0\$; or a north-east direction if \$d=1\$. The road will always be three ch...
I think problem-solving is a more important skill than programming. Euler failed most elementary Math early on in life. But now he is the most widely praised in Mathematics and the father of many fields.
also, IQ is a poor indicator of intelligence, it's just the way society assigns social value. You have access to knowledge and the time to focus on it is more a measure of social fitness and wealth. I think drive and passion is a better indicator of intelligence.
Introduction
I got this in an interview and am basically here to appeal for solutions for my own curiosity and learning.
Puzzle
Expression => Return Value
f('l') => 'fl'
f()()('l') => 'fool'
f()()()('l') => 'foool'
var a = f();
a('l') => 'fol'
@ngn Rust's borrowchecker is basically the whole advertising point
when you're not working in a unsafe {} block with raw pointers, the borrow checker will give you a nice fat "no" if it can't prove your code wont UD
result is, if you learn to work with the borrow checker (It's not magic, you have to cooperate with it and learn to work with it!), a lot of common C/C++ errors basically vanish
i.e. nullpointer deref is outright impossible without unsafe blocks
(Well its suppost to be, the occasional bug shows up in the rust STD, but that's pretty rare)
what i find hilarious is that originally, rust was suppost to be more like Erlang, with a large runtime, and now it's a low level language intended to compete with C
@moonheart08 i've seen some fastest-code winning answers on ppcg in rust, so maybe i should look at it more closely. what puts me off for now is its extreme verbosity
I.e. in specs' case, it can automatically dispatch systems in parallel thanks to being able to verify what is used where
and unless you use unsafe code in your systems/components, specs' can maintain the "your stuff wont break when we parallelize system execution for you" guarantee without issue
oh i just realised i mistakenly tried to take over the APL orchard with rust
@moonheart08 that guy (kaseorg) is amazing, btw, he quickly comes up with these incredibly efficient algorithms, and that's probably the reason why his code is verbose
i.e. it's much faster at pi digits than C (EDIT: Turns out the timing is off, it's near the same, probably because the devs for it just embedded gmp via bindings)
however it seems rust currently has the fastest n-body impl of the bunch
bugs me that they told the rust compiler not to do reordering in the n-body code, but eh
(Sometimes rustc can be really smart about reordering structs)
RLS is still a WIP, those features will come eventually, but i dont blame you for that
but i personally never spoiled myself with features from IntelliJ and Visual Studio, mostly been a Atom person, and have been happy with the smaller featureset there
@Ven I'm just waiting for you to update that post with description of the input format and ∊ → , to award the bounty. Also, you have a "bytes" link in the TIO.
@Adám C# package management with NuGet is per-project. For each project, you have to have a file dedicated to declaring dependencies. After installing packages for one project, you need to do it again to use them in a different one. Python packages with pip are installed globally. You just install them once and can use them from any python code run on your system.
@Ven CPAN, the Comprehensive Perl Archive Network, is an amazing package ecosystem. cpan.pm, the package manager used to install these, is shite. cpanm.pm is better but I still wouldn't use Perl as an example of good package management. Also it's global.
The dotnet build and dotnet run commands automatically restore packages if they aren't already, and you can easily add package with dotnet add package whatever.
Most package managers, even local ones, are happy to restore packages from configuration files for you but .NET Core's interface allows you to manage your project's dependencies without editing configuration files by hand.
> I Know Bassdrop. But I Plz Need Your Help In Solving These Two Questions Only. I Am Very Behind On My Syllabus & I Have Just Started Javascript. It Would Be very helpful Of You Guys If you Help Me On This One. Plz – Karandeep Singh
PPCG has graduated. Some features for graduated sites come immediately after graduating. However, other features are held off for an indefinite amount of time:
The site gets a custom theme, and
Privilege levels, which are initially lowered to help growing beta sites grow, are raised to match th...
the association bonus, where you automatically earn +100 rep on every SE community if you have at least 200 rep in one; it's referred to as "assoc" in the reputation log
Develop a C++ program to sort items of a structs-of-array. Assume that the struct is
struct invoice
{
unsigned int custNo;
unsigned short amount;
string owner;
};
Create an array with 20 invoices, which are randomly initiated with custNO (100-10000), amount (100-2000 as dollar amount), owner (...