The Intellectual Wilderness There is nothing more useless than doing efficiently that which should not be done at all.

2021.05.11 15:36

A personal appeal

Filed under: Uncategorized — zxq9 @ 15:36

Hello, World!

UPDATE: Things are looking better, but I’m not out of the woods yet. I have been surprised, amazed and humbled by the generosity and concern of the Erlang community. Wow.

Things are still up in the air, so if you happen to need someone to tackle one of the things I’m good at, please let me know. My core competencies:

  • Programming (Erlang, Python, Elixir, Go, C, asm, Lisp, SQL, etc. pretty much anything but K)
  • Project management
  • Distributed systems architecture (or evaluation and restructuring roadmap)
  • Robust systems architecture (or evaluation and restructuring)
  • Teaching (programming, design, English, Japanese, intelligence cycle, decision making process, etc.)
  • Geopolitical analysis and assessment
  • Intelligence analysis

I’ve tried to publish information and working projects for the open source community, however minor my contributions, and at the very least if you happen to be a user of one of my projects and decide to donate on that bases please at least tell me something I can improve for you so that I don’t feel like a total leech.

Donation methods — but if you donate please send me an email and let me know why and what you want it to go towards in terms of existing projects or projects you hope for:

ETH: 0xdaAa0a6789C7ab85c20d3af50475d0f2aCb72D9
BTC: 3F3es8UgDrcxWRKrSBeotcexDHqe7PhpPf
SubscribeStar: https://www.subscribestar.com/zxq9
PayPal: zxq9@zxq9.com

If you read this far, thank you for your patience.

2021.04.30 09:10

Valgrind “Hello, World!”: Python 3.6 VS Python 2.7 VS Erlang R23

I’ll just leave this here…

Python 3.6

ceverett@icecream:~/Code/python$ cat hello.py
#! /usr/bin/python3

print("Hello, world!")
ceverett@icecream:~/Code/python$ ./hello.py
Hello, world!
ceverett@icecream:~/Code/python$ valgrind ./hello.py
...
==19264== HEAP SUMMARY:
==19264==     in use at exit: 320,946 bytes in 166 blocks
==19264==   total heap usage: 1,698 allocs, 1,532 frees, 2,505,946 bytes allocated
==19264== 
==19264== LEAK SUMMARY:
==19264==    definitely lost: 0 bytes in 0 blocks
==19264==    indirectly lost: 0 bytes in 0 blocks
==19264==      possibly lost: 5,608 bytes in 10 blocks
==19264==    still reachable: 315,338 bytes in 156 blocks
==19264==         suppressed: 0 bytes in 0 blocks
...
==19264== ERROR SUMMARY: 8163 errors from 116 contexts (suppressed: 0 from 0)
ceverett@icecream:~/Code/python$

Python 2.7

ceverett@icecream:~/Code/python$ cat hello2.py 
#! /usr/bin/python

print "Hello, world!"
ceverett@icecream:~/Code/python$ ./hello2.py
Hello, world!
ceverett@icecream:~/Code/python$ valgrind ./hello2.py
...
==19416== HEAP SUMMARY:
==19416==     in use at exit: 417,246 bytes in 199 blocks
==19416==   total heap usage: 2,958 allocs, 2,759 frees, 3,085,205 bytes allocated
==19416== 
==19416== LEAK SUMMARY:
==19416==    definitely lost: 0 bytes in 0 blocks
==19416==    indirectly lost: 0 bytes in 0 blocks
==19416==      possibly lost: 528 bytes in 1 blocks
==19416==    still reachable: 416,718 bytes in 198 blocks
==19416==         suppressed: 0 bytes in 0 blocks
...
==19416== ERROR SUMMARY: 489 errors from 30 contexts (suppressed: 0 from 0)
ceverett@icecream:~/Code/python$

Erlang R23

(On this one I can include the entire output.)

ceverett@icecream:~/Code/erlang$ cat hello_world 
#! /usr/bin/env escript

% Example of an escript
-mode(compile).

main(_) ->
    ok = io:setopts([{encoding, unicode}]),
    io:format("Hello, world!~n").
ceverett@icecream:~/Code/erlang$ ./hello_world 
Hello, world!
ceverett@icecream:~/Code/erlang$ valgrind ./hello_world
==25872== Memcheck, a memory error detector
==25872== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==25872== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info
==25872== Command: ./hello_world
==25872== 
Hello, world!
ceverett@icecream:~/Code/erlang$

Hey, Python! What the actual fsck is going on here?!? Jeebus… The Good Idea Fairy came along and convinced the webtarded among you to start throwing kitchen sink features in (“walrus operator” — yeah, great idea, that, and totally worth losing the sober guidance of Guido over…) along with 8163 memory errors. Sweet! Oh how far the great have fallen…

Honorable mention: Ruby 2.5

I didn’t expect much better from Ruby as the Good Idea Fairy has been forwarding all xer mail there for years, but wow… just wow

ceverett@icecream:~/Code/ruby$ cat hello_world.rb 
#! /usr/bin/ruby

print "Hello, World!\n"
ceverett@icecream:~/Code/ruby$ ./hello_world.rb 
Hello, World!
ceverett@icecream:~/Code/ruby$ valgrind ./hello_world.rb
...
==27051== HEAP SUMMARY:
==27051==     in use at exit: 2,921,234 bytes in 20,690 blocks
==27051==   total heap usage: 65,312 allocs, 44,622 frees, 16,447,358 bytes allocated
==27051== 
==27051== LEAK SUMMARY:
==27051==    definitely lost: 385,479 bytes in 4,421 blocks
==27051==    indirectly lost: 640,953 bytes in 5,808 blocks
==27051==      possibly lost: 1,626,429 bytes in 9,663 blocks
==27051==    still reachable: 268,373 bytes in 798 blocks
==27051==         suppressed: 0 bytes in 0 blocks
...
==27051== ERROR SUMMARY: 162050 errors from 402 contexts (suppressed: 0 from 0)
ceverett@icecream:~/Code/ruby$

162,050 memory errors. For Hello, World. How can there even be 162,050 instructions in the resulting set of commands to the system?

2019.06.22 14:29

Mojibake3

Filed under: Uncategorized — zxq9 @ 14:29

After updating the MySQL tables to a UTF8 multibyte encoding…

どうなるかな?

Hopefully that isn’t just a bunch of nonsense.

UPDATE:

WOW! Now things work like they are supposed to!
Unfortunately, however, it seems that all of my previous posts that used UTF-8 are lost… and I have no idea how to recover them. That’s super disappointing.

2019.06.19 14:02

Mojibake2

Filed under: Uncategorized — zxq9 @ 14:02

Hmmm… I’ve changed the encoding definition. Let’s see what happens…

?????????????

Nope! Still borked. Nice.

Mojibake

Filed under: Uncategorized — zxq9 @ 13:45

WP????????????????UTF-8?????????????????

??????????????…

??????????

Hmmmm… This is super annoying. After some WordPress update I’ve completely lost the ability to use UTF-8 on my blog. Utterly ridiculous.

I was hoping it was simply some silly thing going on with encoding tags embedded in a theme or something similar, but nope — all UTF-8 seems to be utterly broken at the moment. I don’t really feel like mucking about with MySQL right now, either, though that seems a possible place to check.

I might move back to using boring old hand-written pages and drop a comment plugin into them instead of messing with this increasingly annoying and arcane blogging system. I have more freedom with hand-written pages, anyway, and a script can generate the necessary interlinks.

Bleh. The utter state of technology today. I feel the urge to write something snarky in Japanese here, but it wouldn’t be readable — so just use your imagination.

2018.07.11 18:00

Micro Aggression

Filed under: Uncategorized — zxq9 @ 18:00

Prepare to be pitied, fools.

2017.10.14 11:49

Web Designers: Stop making SPAs for inherently web 1.0 style sites

It is 2017. What’s with the drive to make everything an SPA whether it needs to be or not? This is getting a little ridiculous. I’m going to ramble on below a bit because I’ve got a hankering to do so — pay this no mind.

All around the web I see sites that are best represented as a collection of inter-linked documents, and all around the web I see many of those being changed into single-page application (SPAs). Even more stupid is when the SPA in question was built by some naive dope who included a little bit of almost every JS framework in existence — including a random selection from the thousands of obsolete and dead ones.

What is the goal? What’s the deal? Do web authors today not know how the web was actually intended to work originally? That document publication is actually its reason for existence in the first place and that “web applications” are a new thing that is a backhack to an incomplete standard that only sorta-kinda-works?

Granted, the reason it only sorta-kinda-works is due mostly to the problems inherent in the fact that only a single language is allowed in scripts… which is ridiculous. Was nobody paying attention to the Guile2 approach all those years? The only lesson learned from the Java applet and Flash experience seems to have been that “it sucks to force users to install runtimes as plugins”. Ugh.

Anyway, back to web applications…

I get it. For the moment we don’t have a solid distinction between “a document browser” and “an application browser” so we are stuck with this insufficient worst-of-both-worlds nether region of “applications that masquerade as documents”. And that drives anyone nuts who has given this much thought.

Not that a lot of people have considered the difference deeply. I imagine that is probably because very few new coders today have ever written more than a line or two of code intended to run natively on a user’s local system. Nearly everyone has written thousands of lines of code intended to run natively on server-side systems, but even that is getting wonky because many youngsters today don’t know how to deploy without using Docker yet lack the faintest inkling as to what problems Docker actually is intended to solve and wind up bypassing better solutions when they exist.

Tools shine when they are used in a focused way, performing they job for which they were intended. The web is the same way. Yes, it is a big jumble of crap. So let’s just leave that there. Networks are a big jumble of crap, too, and so are human societies — so we’ve adopted dirty ways of dealing with the dirt. The jumbly pile of shit that is the web is one of our ways of dealing with that. Everything times out. Everything is sent in text. Protocols are bloated and redundant. There isn’t even a proper definition of what “valid” HTML and XML and JSON and whatever else is in most cases. Its all racing toward a singularity where everything is uniformly stupid. But… whatever, it sort of kind of still works — and humans just barely work themselves, so that’s par for the course.

The original web was designed to function as an insecure document publication system where documents could be interlinked. We realized that we could include more interesting stuff by expanding the definition of “document” to include more than just text, and quite recently with HTML5 the way in which documents can be written is only a few orders of magnitude behind, say, LaTeX, in its ability to arrange things on the screen (that’s feature lag is not entirely the fault of the HTML5 authors).

This gives a lot of freedom to website authors — perhaps too much.

If a website is a set of news articles or academic papers (or even tweets) then you really don’t need a SPA, you need a more traditional sort of “web site”. It can be dressed up all pretty with shiny things sprinkled around, of course, but we don’t want a SPA that mysteriously changes state in ways that users cannot bookmark things, can’t easily send links to one another to specific resources (something Twitter got right despite some initial confusion over how to frame their content), etc.

If a website is actually just a delivery front end for a graphical RPG, well, obviously the game part of the site is probably best designed as a SPA, but the rest of the site — the forums, armory, character pages, beastiary, fan wiki, manual, guild rankings, lore pages, etc. — are absolutely best presented outside of that SPA as an actual website.

See the difference?

The game example is actually quite useful to contemplate for a variety of reasons. I’ll probably come back and cut this post down to just that part. Either that or eventually come back and rewrite the first bits to more accurately convey the humor with which I, as a graybeard resident in cyberspace for about 30 years now, view the state of the web today.

Whatever you do, dear reader, have fun coding, and remember: Don’t outsmart yourself!

2015.02.20 11:12

Sweet styling

Filed under: Uncategorized — zxq9 @ 11:12

This is what happens when you let the Japanese nurse dress you at a hospital where they lack a coat your size.

mamma_baby_beardguy2

Powered by WordPress