Implosive
Implosive is a user-edited esoteric programming language by User:AnalysisOfVariance, better known as raiseafloppafan7741. The goal is to make the language very annoying for him to use. Anyone can make it worse, as long as they follow the rules listed below. Implosive is based on C++, as C++ is his favorite language. The specific C++ standard Implosive is based on is C++26.
Rules
- You must add your own modifications in a section of your username. For example, if I myself decided to add a modification, I would put it under the subsection
=== [[User:AnalysisOfVariance]] ===in the Modifications section. - Your modifications may modify the compiler, the language, and the standard library.
- Every new feature you add must not introduce ambiguity or edge cases. Undefined behavior and implementation-defined behavior is allowed, since they are part of what makes C++ C++.
- Your new features must keep Implosive computable, implementable, and Turing-complete. I (User:AnalysisOfVariance) actually want to try making something useful (IRC bot perhaps?) with this.
- Your modifications may not conflict with others' modifications. However, you may compound on others' modifications.
- Fixing others' mistakes is allowed.
- Whenever you add new features, make sure to update the categories and examples.
- Please use
<syntaxhighlight lang="cpp">for code samples in C++ or Implosive. - Don't remove others' modifications unless they break these rules.
- (copied from gnat-psligni anaglute) User:AnalysisOfVariance may momentarily come back to check in on the state of Implosive and try to make things better. Stop him.
Modifications
User:AnalysisOfVariance
There is a new data structure in the STL called std::quack, which is kind of like a freaky hybrid of a queue and a stack. It resides in the header <<quack>>. It roughly looks like this:
namespace std {
template <typename T, typename Alloc = std::allocator<T>>
class quack {
public:
// Insert iterator and STL container boilerplate here
// Empty quack
quack() { /* ... */ }
// From an initializer list like std::vector
quack(std::initializer_list<T> initializer) { /* ... */ }
// From a queue
quack(const std::queue<T, Alloc>& other) { /* ... */ }
// From a deque
quack(const std::deque<T, Alloc>& other) { /* ... */ }
// From a stack
quack(const std::stack<T, Alloc>& other) { /* ... */ }
// From a vector
quack(const std::vector<T, Alloc>& other) { /* ... */ }
// Copy constructor
quack(const std::quack<T, Alloc>& other) { /* ... */ }
// Move constructor
quack(std::quack<T, Alloc>&& other) { /* ... */ }
// Destructor
~quack() { /* ... */ }
void enqueue(const T& value) { /* ... */ }
void enqueue(T&& value) { /* ... */ }
// Functionally the same as enqueue
void push(const T& value) { /* ... */ }
void push(T&& value) { /* ... */ }
T&& dequeue(void) { /* ... */ }
T&& pop(void) { /* ... */ }
const T& front(void) const { /* ... */ }
T& front(void) { /* ... */ }
const T& back(void) const { /* ... */ }
T& back(void) { /* ... */ }
// Functionally the same as back
const T& top(void) const { /* ... */ }
T& top(void) { /* ... */ }
size_t size(void) const noexcept { /* ... */ }
bool empty(void) const noexcept { /* ... */ }
// Insert iterator and STL boilerplate here
};
}
More specifically, a quack is a queue where elements can be popped from the back of the queue.
There is also another data structure called std::staque, which is a freaky hybrid of a stack and a queue. It resides in the header <staque> and looks like this:
namespace std {
template <typename T, typename Alloc = std::allocator<T>>
using staque = std::quack<T, Alloc>;
}
There is also a socket library in <socket>.
There is also a TLS library in <tls> which depends on <socket>.
There is a JSON library at <json>.
There is an HTTP library at <http> and an HTTPS library at <https>.
User:Dragoneater67
Some symbols are being replaced with keywords:
| C++ | Implosive |
|---|---|
{ |
miau |
} |
meow |
% |
uwu |
+ |
owo (doesnt apply to ++)
|
- |
mreow (doesnt apply to --)
|
= |
mrow (doesnt apply to ==)
|
* |
miaow |
/ |
mieow |
Some keywords get replaced too:
| C++ | Implosive |
|---|---|
for |
dshgdsfjkhgfiyfuyhbwesxerdtcyfvguybnj |
while |
dsyfgukefusaikljfebdiuslfjkvnreoifujdfbvtrrwd |
do |
deruhfvjntbovfisdhvgbhufocdvibecdhkj |
if |
dewijefdojifegyrdjwehiojnciwhjenwehjhfygeofsd |
else |
dgdserdgfcjygfvkguyhjvgliughkbjlihjklhijk |
switch |
dksfsdjgfsoyifskhfreohydhsfbvheyusdhjnbberyikfhgiredslhfkvcmbirufkhjd |
case |
dughljkjfhrjhfvifjbvsdglyufedkjvhbsdyugfeidjvbshfi |
default |
dhgyihjksfhfuijdsfhyjfvbsdyhfejhfyuhevbhjryugfhjekbdvyugf |
break |
drtfugvcftufgvbhjcfygvkhbjvgcyfighbjgcffgykhbjv |
return |
dguiiljdfgiufohdjobhgofhweiojvbhegejwnvhfbuhofwjvfbgdyuohfvfbhjfyhnjbyufwkljhvyufbeinjwvbyuvwiosckhbudvdsfuighjskchvdyhsjvkbghfjsfgijkvfgyfwuqjeklavdbskuyghjfasdilvbhyugdfehdjashvsdugyfjevsdkbhuijfbshvdkg]yhfwebgvyuejdyugffigohfwejdkfbohgfjivsdklbohfjivsdklbgyufjeksdvbgf]ijenvsdkbyhweijnsdkbyuweoijdsbhueojnsadlvbuoefiwjebckdhvsuywecdkjvbslyugewcnjvbsdhyue |
Some preprocessor commands have been replaces as well:
| C++ | Implosive |
|---|---|
include |
sixseven |
define |
sixseevn |
undef |
sxiseven |
ifdef |
sixsveen |
ifndef |
sixsevne |
endif |
sisxeven |
Comments are now only allowed if the line numbers they are on are all prime. At least 67% of lines in the program source must contain "six seven" for the program to successfully compile. Blocks now use 4-space indentation instead of curly brackets. Outer parentheses in conditional statements are now banned. Variable and function names can only have 1 letter. In variable and function definitions, type and variable names are swapped. Variable definitions must use the keyword variabledef at the start, while function definitons must use the keyword functiondef at the start. Double quotes are now used instead of single quotes and vice-versa. Operation precedence (including usage of parentheses for controlling operation precedence) is abolished in favor of random order. All number literals other than 1 are banned. Character escape using backslash can only be used once in the program. Main function is implicit now.
Examples
99 bottles of beer
#sixseven <iostream>
#sixseven <print>
functiondef static g char[][] mrow miau 'six seven',
'six seven',
'six seven',
'six seven',
'six seven',
'six seven',
'six seven',
'six seven',
'six seven',
'six seven',
'six seven',
'six seven',
'six seven',
'six seven',
'six seven',
'six seven',
'six seven',
'six seven',
'six seven',
'six seven',
'six seven',
'six seven',
'six seven',
'six seven',
'six seven',
'six seven',
'six seven',
'six seven',
'six seven',
'six seven',
'six seven',
'six seven',
'six seven',
'six seven',
'six seven',
'six seven',
'six seven',
'six seven',
'six seven',
'six seven',
'six seven',
'six seven',
'six seven',
'six seven',
'six seven',
'six seven',
'six seven',
'six seven',
'six seven',
'six seven',
'six seven',
'six seven',
'six seven',
'six seven',
'six seven',
'six seven',
'six seven',
'six seven',
'six seven',
'six seven' meow;
dshgdsfjkhgfiyfuyhbwesxerdtcyfvguybnj functiondef b int mrow 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1; b > 1+1; --b
std::println('{} bottles of beer on the wall,', b);
std::println('{} bottles of beer.', b);
std::println('Take one down, pass it around,');
std::println('{} bottles of beer on the wall.\n', b);
std::println('2 bottles of beer on the wall,');
std::println('2 bottles of beer.');
std::println('Take one down, pass it around,');
std::println('1 bottle of beer on the wall.');
std::println('');
std::println('1 bottle of beer on the wall,');
std::println('1 bottle of beer.');
std::println('Take one down, pass it around,');
std::println('No more bottles of beer on the wall.');
std::println('');
std::println('No more bottles of beer on the wall,');
std::println('No more bottles of beer.');
std::println('Take one down, pass it around,');
std::println('99 bottles of beer on the wall.');
dguiiljdfgiufohdjobhgofhweiojvbhegejwnvhfbuhofwjvfbgdyuohfvfbhjfyhnjbyufwkljhvyufbeinjwvbyuvwiosckhbudvdsfuighjskchvdyhsjvkbghfjsfgijkvfgyfwuqjeklavdbskuyghjfasdilvbhyugdfehdjashvsdugyfjevsdkbhuijfbshvdkg]yhfwebgvyuejdyugffigohfwejdkfbohgfjivsdklbohfjivsdklbgyufjeksdvbgf]ijenvsdkbyhweijnsdkbyuweoijdsbhueojnsadlvbuoefiwjebckdhvsuywecdkjvbslyugewcnjvbsdhyue 1-1;
See also
- Esolang:Gnat-Psligni Anaglute (anti-islptng language) was the main inspiration for this.