#prog #abnormalprogramming #db #article
Making Postgres 42,000x slower because I am unemployed
(thanks @nosingularity)
Making Postgres 42,000x slower because I am unemployed
<...> I decided someone needed to try to create a Postgres configuration optimized to process queries as slowly as possible. Why? I am not sure, <...>
I can’t make this too easy. This is a Postgres tuning challenge, not a throttle-your-CPU-to-one-megahertz-and-delete-indexes challenge, so all changes must be on parameters in postgresql.conf. Additionally, the database will still need to have the capability to process at least one transaction within a reasonable amount of time—it would be too simple just to grind Postgres to a halt.
(thanks @nosingularity)
🌚7
#prog #abnormalprogramming
HTML, The Programming Language
Язык программирования (внезапно, стековый), программы на котором выглядят, как разметка HTML.
HTML, The Programming Language
Язык программирования (внезапно, стековый), программы на котором выглядят, как разметка HTML.
😐5👍4🤯2🍌1
#prog #rust #rustlib #ml #abnormalprogramming
unwrap_or_ai
unwrap_or_ai
Tired of manually handling unwrap() results? Let AI do the heavy lifting!
🤩19🤡2
#prog #rust #abnormalprogramming
fibonacci-numbers crate with self-recursive dependencies
fibonacci-numbers crate with self-recursive dependencies
I have created a crate called fibonacci-numbers. There are 187 different major versions of the crate, each exporting the Fibonacci number corresponding to that version.
<...>
Version 186 depends on version 184 and 185 and exports the largest Fibonacci number that fits in a u128:
pub const VALUE: u128 = fib184::VALUE + fib185::VALUE;
😁28🔥7🤡3🤯1
#prog #abnormalprogramming
spellscript
output: the power is amplified: 49
spellscript
esotoric [sic!] programming language that's read like a spellbook
begin the grimoire.
summon the power with essence of 7.
conjure ritual named amplify with value to return value multiplied by value.
enchant power with essence 0 of through ritual amplify with power.
inscribe whispers of "the power is amplified: " bound with power.
close the grimoire.
output: the power is amplified: 49
❤11🤯3🤡3😁1
#abnormalprogramming
wiki.archlinux.org/title/Swap_on_video_RAM
wiki.archlinux.org/title/Swap_on_video_RAM
In the unlikely case that you have very little RAM and a surplus of video RAM, you can use the latter as swap.
😁10🤯6👍1🤣1
#prog #c #article #abnormalprogramming
Серия из трёх (на текущий момент) статей о странностях C
Weekend projects: getting silly with C
Getting silly with C, part (void*)2
Getting silly with C, part ~(~1<<1)
Наверное, мои самый любимые примеры кода из статей — это многострочный комментарий:
и абьюз type punning-а на сигнатуре
Серия из трёх (на текущий момент) статей о странностях C
Weekend projects: getting silly with C
Getting silly with C, part (void*)2
Getting silly with C, part ~(~1<<1)
Наверное, мои самый любимые примеры кода из статей — это многострочный комментарий:
#include <stdio.h>
int main() {
puts("Hello world");
asm("/*");
/* Nested comment */
for (int i = 0; i < 10; i++) puts("I LIKE PANCAKES!");
asm("*/");
puts("Goodbye world");
}
и абьюз type punning-а на сигнатуре
main для доставания "Главного ответа о вселенной, смысле жизни и всего такого" из воздуха:#include <stdio.h>
int main(int i) {
do do do do "baby shark!";
while (++i % 2);
while (i == 2);
while (i % 3);
while (i % 7);
printf("The answer is %d.\n", i);
}
😁12👍2🤯2🍌1