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

2019.06.20 12:44

You don’t have time to play games

Filed under: Games,Science & Tech,Society — Tags: , , , , — zxq9 @ 12:44

There is only one way to develop graduate-level expertise in more than one narrow specialty: self education.

The time commitment required is larger than most people are willing to consider — so large that the people who tend to apply themselves to the degree required don’t notice they are doing it.

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.

2019.06.18 18:43

Zombies

Filed under: Computing,Society — Tags: , , , , — zxq9 @ 18:43

IRC will never die.
It will never die because its minimal implementation is useful.

Windows will die, but only after rotting all the way through.
It will continue to persist for the next few decades not because its minimal definition is useful (there is no minimal definition), but as a consequence of deliberate strategic choices that were highly effective at fostering dependency (not entirely unlike social welfare programs).

Linux will never die.
Its super power is the same as its curse: it is Shoggoth.

2019.06.12 15:53

Free Expression: Personal Sites > Social Media

Filed under: Computing,Society — Tags: , , , , — zxq9 @ 15:53

As major social media platforms morph into comic parodies of their former selves people who want to express original ideas will continue to seek alternatives that avoid the warring robot hordes and put them back in charge of regulating their own expression. Over the next few years I find it possible (though maybe not likely) that the biggest changes in online expression could be a return to personal sites and blogs. This is a viable alternative considering the latitude of expression possible, both in form and content, and the ready availability of interlinked comment and discussion systems.

There are some annoyances and responsibilities inherited with managing one’s own site, but to those for whom expression is paramount and “follower” count is not a primary goal personal sites provide everything but a captive audience — and finding an audience today, now that Google’s monopoly on search seems to be breaking in at least some communities, is not anywhere near as hard as it once was.

Until a distributed alternative to gated-community style social media comes along that is low-friction enough to find gain mindshare among non-tech types (something I would love to create, but currently lack the time) it seems likely that some combination of personal sites, aggregate sites (group-run news/op-ed blogs), blogs, non-YouTube video shares, and alternative social media sites will be the home of most censor-averse communities.

It will be interesting to see how things turn out.

2019.05.11 15:46

Erlang doc mirror

Filed under: Computing — Tags: , , , — zxq9 @ 15:46

erlang.org is undergoing scheduled maintenance this weekend.
In the meantime here is the doc mirror link:
http://zxq9.com/erlang/docs/

2018.08.14 15:37

Silly: Hextexting via the command line…

Filed under: Computing,Society — Tags: , , , , , , , — zxq9 @ 15:37

A silly thread on Twitter came to my attention today that stirred some late 1980’s/1990’s phreak/hax0r nostalgia in me. So, of course, I did what any geek would do, wrote a one-off utility script for it. Have fun confusing your parents, kids.

#! /usr/bin/env escript

-mode(compile).

main([Command | Input]) ->
    ok = io:setopts([{encoding, unicode}]),
    Output = convert(Command, Input),
    io:format("~ts~n", [Output]).

convert("t", Input) ->
    String = string:join(Input, " "),
    string:join(lists:map(fun(C) -> integer_to_list(C, 16) end, String), " ");
convert("h", Input) ->
    lists:map(fun(C) -> list_to_integer(C, 16) end, Input);
convert(_, _) ->
    "hextext usage: `hextext t|h [text]".

(Also, look up rot13 — ’twas all the rage 30 years ago, and still makes an appearance as a facilitator of hidden easter eggs in some games. A lot of “garbled alien/monster/otherling speech” text is rot13.)

2018.07.11 18:00

Micro Aggression

Filed under: Uncategorized — zxq9 @ 18:00

Prepare to be pitied, fools.

Erlang: Getting Started Without Melting

There are two things that might be meant when someone references “Erlang”: the language, and the environment (the EVM/BEAM and OTP). The first one, the language part, is actually super simple and quick to learn. The much larger, deeper part is learning what the BEAM does and how OTP makes your programs better.

It is clear that without an understanding of Erlang we’re not going to get very far in terms of understanding OTP and won’t be skilled enough to reliably interact with the runtime through a shell. So let’s forget about the runtime and OTP for a bit and just aim at the lowest, most common beginners’ task in coding: writing a script that tells me “Hello, World!” and shows whatever arguments I pass to it from the command line:

#! /usr/bin/env escript

% Example of an escript
-mode(compile).

main(Args) ->
    ok = io:setopts([{encoding, unicode}]),
    ok = io:format("Hello, world!~n"),
    io:format("I received the args: ~tp~n", [Args]).

Let’s save that in a file called e_script, run the command chmod +x e_script to make it executable, and take a look at how this works:

ceverett@takoyaki:~$ ./e_script foo bar
Hello, world!
I received the args: ["foo","bar"]
ceverett@takoyaki:~$

Cool! So it actually works. I can see a few things already:

  1. I need to know how to call some things from the standard library to make stuff work, like io:format/2
  2. io:setopts([{encoding, unicode}]) seems to makes it OK to print UTF-8 characters to the terminal in a script
  3. An escript starts execution with a traditional main/1 function call

Some questions I might have include how or why we use the = for both assignment and assertion in Erlang, what the mantra “crash fast” really means, what keywords are reserved, and other issues which are covered in the Reference Manual (which is surprisingly small and quick to read and reference).

An issue some newcomers encounter is that navigating an unfamiliar set of documentation can be hard. Here are the most important links you will need to know to get familiar and do useful things with the sequential language:

This is a short list, but it is the most common links you’ll want to know how to find. It is also easy to pull up any given module for doing a search for “erlang [module name]” on any search engine. (Really, any of them.)

In the rare case that erlang.org is having a hard time I maintain a mirror of the docs for various Erlang release versions here as well: http://zxq9.com/erlang/

Start messing with sequential Erlang. Don’t worry about being fancy and massively concurrent or maximizing parallelization or whatever — just mess around at first and get a feel for the language using escript. It is a lot of fun and makes getting into the more fully encompassing instructional material much more comfortable.

2018.06.29 16:16

Erlang: ZJ v1.0.1 + JSON Test Suite (aka “What happens when you go public”)

Filed under: Computing,Science & Tech — zxq9 @ 16:16

TL;DR

ZJ has been run through the JSON Test Suite at the recommendation of Michał Muskała, patched for compliance to all the cases required (and many optional behaviors), and now updated to v1.0.1. Complete results on this ZJ wiki page.

Story

When I wrote ZJ my intention was only to scratch my own little itch: I needed a tiny, portable, single module JSON encoder/decoder for use on a relatively restricted set of data. I wanted a particular mapping between types, and writing it to work the way I wanted was easy.

I announced it when I felt meaningfully “done” because I thought someone else might like it. Some did. Some had suggestions. Some folks wondered where the tests were or if I was going to include any. I didn’t give these things much thought because it did what I wanted it to do already.

But then Oleg Tarasenko — someone I know well, have worked with in the past and respect very much — made a public query. In short, “Hey, what’s the plan with this? I want to use it, too.” Well crap. I don’t really have the time — or rather, I have other things I’d rather spend my time on but it’s Oleg and so I suddenly care again. So now I’m roped into something — maybe not hand-writing a bunch of tests or cranking up PropEr (which I’ve never been good at teaching how to create structured string input like JSON), but since the wonderful JSON Test Suite project already exists I can at least validate it as a JSON decoder using its pre-built example data.

With everything fresh in my mind it only took a few hours to clean everything up to the point that ZJ is actually now fully compliant with all the “must” features, many of the implementation specific features, and a few extensions that are technically illegal but occur frequently in practice.

That’s the sort of thing that happens when you share you work. It starts off as a “works for me” tool, and then your friends get a hold of it. Because you’ve known them a while and trust them you care a lot about what they have to say — even when they are just making gentle recommendations (or maybe especially when they are making gentle recommendations). The thing is, your friends are your friends because they have your best interests at heart, and in a software community just as in a neighborhood community very often your best interests are also their best interests. In fact, having another option for JSON parsing is better for everyone because there really is no One True Mapping, and it is especially good for everyone if a core piece of generic infrastructure has as permissible a license as possible (thanks, Marc) and the project can verify its claims to correctness — or at least vet its level of wrongness.

Zj is a tiny project, but even such a small project demonstrates the positive dynamic that exists among people within a community. So thanks Oleg Tarasenko, MichaÅ‚ MuskaÅ‚a, Loïc Hoguin, and others who took the time to discuss the vagaries of JSON and prod me a little to clean things up a bit more. I’m much happier with v1.0.1 than v1.0.0 (and will like v1.0.2 even more because of this and that).

Appeal to New Coders

Joe Armstrong convinced me about two years ago that it was better to release half-grown ideas to let them germinate and grow in the light of the sun than rot and be forgotten in the darkness of obscurity and personal temerity. Once again his position is validated. If you’re just getting into FOSS for the first time, release stuff. Don’t pester folks about it, but do announce your work so that eyes other than yours can get on it. Nothing but good comes of that (but sometimes it can be embarrassing — because you’ll occasionally be wrong, or lazy, or wrong because you were lazy…).

« Newer PostsOlder Posts »

Powered by WordPress