コミットを比較

...

4 コミット

作成者 SHA1 メッセージ 日付
00478b3a0d Don't use dependencies, only standard libraries 2023-02-18 00:01:08 +09:00
40ea3b4f65 How to write a Code of Conduct correctly (no meme edition) 2023-02-18 00:00:51 +09:00
c91e2e7fe1 Added Swindles McCoop. 2023-02-18 00:00:22 +09:00
329da37098 Fuck. 2023-02-18 00:00:06 +09:00
5個のファイルの変更147行の追加2行の削除

1
.gitignore vendored
ファイルの表示

@ -1,4 +1,5 @@
www/
out/
ass/
tor/
i2p/

2
config
ファイルの表示

@ -1,6 +1,6 @@
TEMPLATES = site.tmpl
SOURCE = src
OUTPUT = www
OUTPUT = out
TITLE = Ryo's Izakaya
URL = http://ryocafe.site
AUTHOR = 寮

96
src/blog/only-use-standard-libs/index.md ノーマルファイル
ファイルの表示

@ -0,0 +1,96 @@
title: Don't use dependencies, only standard libraries
author: 寮
date: 2023-02-14
tags: technology,programming,webdev
----
BITCH!! Gimme chocolate!\
It's Valentine's Day!
As you guys already know, I hate dependencies.\
I write all functionality by myself, unless I absolutely need to use a dependency (for example ncurses for desktop programs, or SDL for video games, or MySQL for web development).\
But what if I told you that all these dependencies, including the absolutely necessary ones, are all written using standard libraries?\
And if not, then it has a chain of dependencies, and at the very end of it it's pure standard libraries.
Especially Javascript and Python programs are ALWAYS massive dependency hells, even if you only initialize a JS project, so you only initialize a new Vue.js, Alpine.js, or whatever other engine you're using, it's already pulling in hundreds of Mebibytes of unwanted cruft, only to display a blank page of nothingness, it's absolutely absurd!\
Though it's kind of understandable, since both languages are commonly used by people who don't know how to code, don't know how computers work, and only want to make a quick buck, while both languages are pretty much empty (only a few basic keywords and nothing else).
But I'm seeing the same shit with PHP, which is more likely to be used by more advanced programmers/computer users, and by default provides an abundance of functionality.\
PHP is so complete, in my entire 20+ years of working in it I never pulled a single external dependency ever!\
The only time I did work with PHP dependencies was when I got handed a frameworked PHP project that's full of bugs, and even then I never added any new dependencies, and if I did finger with the dependencies, I only ever reduced the amount of dependencies.\
But despite that, there's still things like Composer and Packagist, and a lot of dependencies available for download.\
I just can't get the point...
To me there's no such a thing as "traditional development" and "modern development".\
To me there's only the right way of programming, and the wrong way of programming.\
Everything soydevs consider "modern development" is pretty much the wrong way.
EYE BREAK!!\
![](http://ass.ryocafe.site/__nekomata_okayu_and_inugami_korone_hololive_drawn_by_kkato__sample-25536e588342f663055d06e4a0eaee6a.jpg)
If you have to verify by yourself, just take any random framework as-is, inspect the dependencies it comes with by default, and follow the chain all the way down until you get to a project that has no dependencies at all.\
You'll quickly see that standard libraries provide you everything you need in every single language.\
In C and C++ that's the STD libraries, in Go that's FMT, in C# and Java that's System, PHP doesn't have a name for it because everything is already imported by default anyway.\
C is known for not having strings, Go is known for not having arrays, Rust is known for not having nulls.\
And you can still write implementations of these using their standard libraries.\
For example, since PHP 8.0 there's the `str_starts_with()` function.\
All this is, is this (for those who use PHP 7.4 or older):
```php
<?php
function str_starts_with ($haystack, $needle) {
return (string)$needle !== '' && strncmp($haystack, $needle, strlen($needle)) === 0;
}
$string = "Fuck you you fucking nigger";
echo "\"$string\" starts with \"Fuck you\": ".str_starts_with($string, "Fuck you")."\n";
echo "\"$string\" starts with \"fucking\": ".str_starts_with($string, "fucking")."\n";
?>
```
Let's rewrite the same thing in C:
```c
#include <stdio.h>
#include <string.h>
int str_starts_with (char* haystack, char *needle) {
return needle != "" && strncmp(haystack, needle, strlen(needle)) == 0 ? 1 : 0;
}
int main () {
char* string = "Fuck you you fucking nigger";
printf("\"%s\" starts with \"Fuck you\": %d\n", string, str_starts_with (string, "Fuck you"));
printf("\"%s\" starts with \"fucking\": %d\n", string, str_starts_with (string, "fucking"));
return 0;
}
```
Output:
```
"Fuck you you fucking nigger" starts with "Fuck you": 1
"Fuck you you fucking nigger" starts with "fucking": 0
```
And in Go:
```go
package main
import (
"fmt"
"strings"
)
func main () {
str := "Fuck you you fucking nigger"
fmt.Printf("\"%s\" starts with \"Fuck you\": %t\n", str, strings.HasPrefix(str, "Fuck you"))
fmt.Printf("\"%s\" starts with \"fucking\": %t\n", str, strings.HasPrefix(str, "fucking"))
}
```
Output:
```
"Fuck you you fucking nigger" starts with "Fuck you": true
"Fuck you you fucking nigger" starts with "fucking": false
```

47
src/blog/writing-cock-correctly/index.md ノーマルファイル
ファイルの表示

@ -0,0 +1,47 @@
title: How to write a Code of Conduct correctly (no meme edition)
author: 寮
date: 2023-02-13
tags: coding,programming,bloat,
----
If you've read this blog enough, you'll know my stance on Code of Conducts in general:
1. They're a waste of time.
2. They destroy projects.
3. It's bloat.
And in general, CoCks are a controversy in itself, they're always designed to deprive everyone of fun, and create a hostile environment in which developers, users, and everybody else need to constantly walk on eggshells, and any miliscule """violation""" gets you cancelled for life.\
[Which is why my Code of Conduct is basically just a meme](/codeofconduct/).\
You can however make a serious CoCk that's actually reasonable.\
What a CoCk needs is:
1. Filename is "CODE_OF_CONDUCT.md", so that Goyhub (and maybe Gitlab too, I wouldn't be surprised if they did) can recognize it and add a fancy emblem to the project's main page.
2. Title is "Code of Conduct", though variations are possible.
3. Say what's considered good and bad behavior.
4. Sign off.
5. Preferrably jump into an active volcano and have regrets for being such a fucking janny while your soul is on its way to hell.
## Wall of Shame
First let's take a look at examples of how it should NOT be (I2P-only, random order), so we have a little wall of shame, like if hosting on Goyhub alone wasn't shameful enough:
1. [Zig](http://goyhub.i2p/file/ziglang/zig/master/.github/CODE_OF_CONDUCT.md)
2. [Mastosoc](http://goyhub.i2p/file/mastodon/mastodon/main/CODE_OF_CONDUCT.md)
3. [Electron](http://goyhub.i2p/file/electron/electron/main/CODE_OF_CONDUCT.md)
4. [TypeScript (and Microshaft as a whole)](http://goyhub.i2p/file/microsoft/TypeScript/main/CODE_OF_CONDUCT.md)
5. [Misskey](http://goyhub.i2p/file/misskey-dev/misskey/develop/CODE_OF_CONDUCT.md)
6. [PeerTube](http://goyhub.i2p/file/Chocobozzz/PeerTube/develop/CODE_OF_CONDUCT.md)
7. [Tor](http://goyhub.i2p/file/torproject/tor/main/CODE_OF_CONDUCT)
8. [SoystemD](http://goyhub.i2p/file/systemd/systemd/main/docs/CODE_OF_CONDUCT.md)
9. [Krita (and KDE as a whole)](http://goyhub.i2p/file/KDE/krita/master/CODE_OF_CONDUCT.md)
## The correct way of making a Code of Conduct
The one below is literally all you need.
```md
# Code of Conduct
By contributing to this project, you agree that we assume you're a responsible adult who knows how to code.\
The development team is not responsible for babysitting the community, and if you don't like that, then do not join,\
and either fork this project and make your own, or make your own from scratch.
```
And that's literally all you need!\
In a development project, all what should matter is that you can contribute code, and everything else is irrelevant.

ファイルの表示

@ -140,4 +140,5 @@ For address helpers: go find them on [http://reg.i2p/]().
<a href="https://monero.observer/">Monero Observer</a><br />
<a href="https://www.japan-secure.com/?PageSpeed=noscript">ネットセキュリティブログ</a><br />
<a href="https://densankiblog.wordpress.com/">電算機孝行2</a><br />
<a href="https://project-mage.org/">Project Mage</a>
<a href="https://project-mage.org/">Project Mage</a><br />
<a href="https://swindlesmccoop.xyz/">Swindles McCoop</a>