Julia More Packaging & Code

I don't just drink coffee or booze, watch movies and Internet drama, and look cool. I code sometimes, too! Who knew?!

Carrying on with my experiment in Julia, packaging has another step needed to make references. For instance, Ansi uses Geometry, so:

Geometry/Project.toml:


authors = ["Mark Damon Hughes "]
name = "Geometry"
uuid = "e3172796-a620-11e8-2cbf-612649bb77f8"
version = "0.1.0"

[deps]

Ansi/Project.toml:


authors = ["Mark Damon Hughes "]
name = "Ansi"
uuid = "72992c94-a620-11e8-3d05-55611ea0dbd0"
version = "0.1.0"

[deps]

Geometry = "e3172796-a620-11e8-2cbf-612649bb77f8"

Ansi/Manifest.toml:


[[Geometry]]
repo-rev = "master"
repo-url = "/Users/mdh/Code/CodeJulia/Geometry"
uuid = "e3172796-a620-11e8-2cbf-612649bb77f8"
version = "0.1.0"

All the boldface code is what I wrote/copy-pasted, the rest is generated by juliaMakePackage.zsh. I may go ahead and make a tool to link projects, because it's so error-prone. In fact, I cheated, and made a single Manifest.toml which I copy to all projects so far, and can replace whenever something updates.

Anyway, this gets me to a nice state where I can write using Ansi in my project and it'll just find it. IIUC, if I move all the libraries to a public repository, I can just change the repo-url and the packages are downloaded into ~/.julia cache somewhere.

I still haven't followed up on making a binary application; the more I look into that, the jankier it seems, more like something to defer until there's an official solution. Putting a real UI on it is also something to work on, but that's much more doable.

Coding

I've written a lot more code, over 1000 LOC, not just screwing around with packages. Mostly this is enjoyable, it's a nice systems programming language. The ugly parts haven't yet driven me insane, they're just things to work around or ignore. Far less frustrating than almost any other new language; Rusty Nail In Your Head and Go Fuck Yourself Its Google aren't my favorites.

Strong typing really is a pain in the ass. Declare a variable or struct field foo, and it takes anything. Type it with foo::AbstractString, and you soon learn nothing is not a string; foo::Union{AbstractString,Nothing} is necessary to be nullable. Ick.

Enumerations

Enumerated types @enum are disappointing. They're a little smarter than C enums, but not as useful as Java enums. They just represent a value; but you have to cast them to Int every time you use them for their value, so too painful to use them as array indices. Or as characters, a thing I like a lot for debugging. And they're not easy to reflect on:

julia> @enum Terrains begin
               Ter_Floor = Int('.')
               Ter_Wall = Int('#')
       end
julia> Ter_Wall
Ter_Wall::Terrains = 35
julia> Int(Ter_Wall)
35
julia> Char(Int(Ter_Wall))
'#': ASCII/Unicode U+0023 (category Po: Punctuation, other)
julia> String(Char(Int(Ter_Wall)))
ERROR: MethodError: no method matching String(::Char)
julia> string(Char(Int(Ter_Wall)))
"#"
julia> # FFS
julia> string(Ter_Floor)
"Ter_Floor"
julia> # Surprisingly easy!
julia> instances(Terrains)
(Ter_Floor::Terrains = 46, Ter_Wall::Terrains = 35)
julia> # Shit, this is a named tuple, not a dictionary!
julia> useful_instances = Dict()
Dict{Any,Any} with 0 entries
julia> for v in values(instances(Terrains))
           useful_instances[ string(v) ] = v
           useful_instances[ string(Char(Int(v))) ] = v
       end
julia> useful_instances
Dict{Any,Any} with 4 entries:
  "Ter_Floor" => Ter_Floor
  "Ter_Wall"  => Ter_Wall
  "#"         => Ter_Wall
  "."         => Ter_Floor
julia> # JFHC

That was an annoying adventure to get a simple reverse lookup.

Don't Be a Dick

So, Wil Wheaton ( previously "I Hate Twitter" ) was just chased off the Fediverse (he still has an account on a siloed non-federating instance, which isn't really useful to anyone else). His last statement's pretty clear, so I put that down below.

"Please do your very best to be kind to each other. The world is a terrible place right now, and that's largely because it is what we make it."

I know some of the people doing the harassing. There's no point in even arguing with them: They've decided he's in Two Minutes Hate, perhaps because he has a friend whom they don't like, and won't consider "Don't be a Dick", or having empathy, tolerance, or self-awareness that some of them aren't such great friends to have, for one hot second.

While Gargron has condemned harassment, it doesn't fix the problem, since there are entire instances where 4chan-like behavior is accepted; all you can do is block accounts or those entire instances, and it still poisons the Federated timeline for a while.

I'm not sure any level of moderation fixes this shit.

This is why I highly recommend owning your own blog, and broadcasting that out to other services where people can read it; even better, read this and many other blogs in your RSS aggregator or RSS reader ( currently free! ) of choice. It's OK to put some ephemeral chat on other services, but remember those are owned by other people, and are easily attacked by angry, stupid mobs. If a stupid mob shows up here, I don't approve their comments and it's done. It's the Castle Doctrine of online posting.

Wil Wheaton @wilw@mastodon.cloud August 29, 2018, 3:02 PM https://mastodon.cloud/@wilw/100635779449174251 (will be a dead link soon)
I have been notified by an Admin here that they are getting 60 reports a day about my account. As far as I can tell, I'm not breaking any rules, and I've done my best to be a good person here. But this admin is going to suspend my account.

It's the Admin's instance, so I fully support their choice to eliminate a source of frustration, but something to consider: a person who is doing nothing wrong can be run off one instance by a mob from another instance. That seems ... not cool. 1/x

But it's been made very, very clear to me that I am not welcome in the Fediverse, and I hear you. I hoped to find an alternative to the birdsite where I could find the same fun community that existed over there in the beginning, and it's clear to me that I won't be finding that. Before I leave, I want to just make something very clear, because I've spent most of my life being yelled at by people who don't know me at all, and I want the record to be clear. 2/x

During GamerGate, I was dogpiled and mobbed and brigaded and attacked by thousands of accounts. I started using a blocklist that was supposed to help stop that. I did not know that the blocklist I signed up for also had a lot of trans women on it. When I found out, I did everything I could to remove those women from the list I shared. When there were still innocents on the list, I stopped sharing the list entirely. Despite this, a mob has decided that I'm anti-trans. 3/x

This lie that I am anti-trans, or anti-LGBQ, is deeply hurtful to me (I know it's nothing like the pain LGBTQ people deal with every day, as they simply try to exist in a world that treats them so badly, but it is still hurtful in its own way to me). I just want to make it extremely clear: that is a lie, and the people spreading it are misinformed.

So I'm leaving the Fediverse, which has treated me with more cruelty, vitriol, hatred, and contempt than than anyone on the birdsite ever did. 4/x

I know that I'm well-off, well-known, and as a CIS white hetro dude in America, I live life on the lowest difficulty setting. I know that I have very little to complain about.

But I still have feelings, and I really do care about the world and the people in it. What I see is a lot of anger and cruelty directed at the IDEA of me, from people who I just hope don't realize that it really does hurt me, in my heart, to be accused of being someone I am not, and to be the target of a hateful mob. 5/x

Anyway, take your victory lap and collect your prizes. You've made it clear that I'm not welcome here, and even though I disagree with the action this Admin is taking (banning me when I didn't break any rules doesn't seem right), I respect and support the Admin's decision to run their instance the way they see fit.

Please do your very best to be kind to each other. The world is a terrible place right now, and that's largely because it is what we make it.

Bye.

6/end

What I'm Watching: Star Wars the Last Jedi

In the "that took a long time" category, I finally hit play on SWTLJ in my Netflix queue. I've been disappointed in all the new ones, so I didn't expect to like this. I'm drinking cheap wine and not in a great mood, perfect.

SPOILING THE ENTIRE MOVIE STOP DO NOT CONTINUE UNLESS YOU DON'T CARE, WHICH IS TOTALLY REASONABLE. THIS SUCKS

Holy shit this starts dumb, with Poe crank-calling Hux. I thought that was a joke meme, but no, it's actually a scene with "Admiral Hugs" and "your mother" jokes. The single fighter vs giant starship point defenses thing is nonsense especially since they should have learned since the Death Star. The bombers have really shitty fire control systems, and then somehow are gravity-fed. In space. They're not missiles, they're "bombs" which drop "down". What is down? So stupid.

Old Man Luke is annoying, but he's doing the Yoda thing, so annoying is in character for once. That's the only plot- and character-consistent thing I see in this shitshow.

Drinking intensifies.

The long tail chase with the few Resistance and First Order ships, and the centralized command system they use where one shot can behead the fleet, is so stupid. Scatter the ships to the wind, with randomized meetup locations, and no amount of tracking will help. Everyone in here is an idiot; Finn's attempt to flee is the only sign of sanity.

Now let's zoom off to a sidequest at a casino, like I do in JRPGs; sure, sure, fate of the world, first I have to race and breed Chocobos. The casino should be fun, altho it looks too much like a modern Vegas casino. Instead it's preachy because Rose hates fun. Also there's no way these scruffy degenerates get into a classy casino with a dress code. Also nobody in this will be implanted with Ovion eggs, or have Cait Sith join their party, which is what they deserve.

The endless "psychic phone calls" between Rey and Kylo are like a teenage soap opera, and the low-tech camera cutting is awful. Can't be bothered to even project force ghosts in the scene? Actually, now that I think of it, there are very few scene wipes for transitions in this, which is why it feels so jarring. It's all hard cuts with no context. The director's incompetent.

Burning down the Jedi "library" is typically ham-fisted metaphor for Disney Star Wars burning all the Expanded Universe and classic Star Wars. They don't care, and the callow youts of today aren't capable of reading. Yoda drones on and on, which is not at all Yoda-like, but the writer's a moron and doesn't know or care.

The mutiny is terribly executed. Admiral Bligh, er, Holdo is incompetent, but Poe has no idea how to use handcuffs or a brig? Abandoning warships so you can hide, when the First Order fleet still has scanners, is moronic. Instead of all but 6 ships exploding, it really should be all.

Drinking intensifies.

Snoke's always been a bad ripoff of the Emperor, but at least the hologram in The Force Awakens left the possibility he'd be 1m like Yoda; nope, he's human-sized, and basically parrots the Emperor's lines from Return of the Jedi. The duel in the throne room isn't bad, not amazing but the only good, Star Wars-like content in this film so far.

The only characters with any chemistry in the entire movie are Poe and BB-8. In The Force Awakens, it looked like Poe and Finn were gonna hump right on camera; they barely look at each other here. Rose tries to pull off a relationship with Finn, but it's not there.

I look back at Star Wars, and the love quadrangle between Luke, Leia, Han, and Chewie was amazing. They were junkies hooked on each other. Leia and Luke only meet once in this movie and it's a quick, tired goodbye. Chewie has some cameos (and a bizarre infestation of CGI animals) but is never around Leia, and then vanishes. R2-D2 and C-3PO also get one line together.

The CGI animals and rocks in multiple scenes are so awful, they make Lucas' "special editions" look tasteful. This isn't quite Star Wars Rebels level of shitty cartoon CGI, but it's bad, very inappropriate.

Luke's death is pointless, repetitive of Kenobi's duel with Vader, because the moron writer can't write anything new, only recycle. The Just For Men beard before that is preposterous, though (worse than fake-young CLU in TRON: Legacy, which at least A) was set in a videogame, and B) is a vastly better film than this).

I knew going in that this would be bad, Extruded Star Wars-Like Product, but holy fuck. It's one of the worst-written, worst-acted things I've seen in forever.

In The Last Star Wars Movie, I suggested terminating the franchise, but still ranked TLJ above the Prequels-Which-Don't-Exist. I may have overestimated this trash.

★☆☆☆☆ and may the Force not ever be with you, Rian Johnson.

Spirits in Saturday Music

I'm actually listening to the versions of these in Message in a Box: The Complete Recordings, which has all the B-sides and non-album tracks, and I highly recommend it if you like The Police.

I think all of their albums were basically perfect (though I do prefer these two from the end of their run, to the earlier ones) and should be listened to straight through, not just tracks in shuffle, so I moved all the non-album tracks to their own "album" in iTunes.

For a really authentic experience of teenage Mark listening to these albums over and over, I should wrap the tracks in a script that only plays 4 tracks at a time, then makes me type "GET UP AND FLIP THE RECORD OVER" like the world's most annoying text adventure. But I certainly don't want scratchy vinyl hissing at me, that's too authentic. Tho on the gripping hand, I had a better amp and speakers, and no hearing loss, back then. Can I even hear these songs, or is it just playing out in my memories?

What I'm Reading: Rogue Protocol, by Martha Wells

Murderbot #3, see Murderbot #1: All Systems Red and Murderbot #2: Artificial Condition.

While the page count is about the same as the previous two novellas, this one feels really short and thin, largely because there's only a very short and mostly uneventful ship ride and then a single main story of hijinks, and for most of that Murderbot is an observer.

The facility where most of the time is spent is given only a desultory description, often I have to piece together how it looks and fits together when something is introduced, like windows along the service tunnels. I still have very little idea of what the planet surface is like. There's some "haunted spaceship" atmosphere for a bit, and then reality sets in and Murderbot just has to solve problems, i.e. do some hacking and then very destructive combat.

A bot named Miki is somewhat interesting, as the exact opposite of Murderbot in every way. The humans in this are, as always, dumb, slow, and annoying, whether helpful or antagonistic. It's the reverse of how most SF treats robotics, where the people are interesting and the bots are all the same.

But I can't say this one's that great, full price is excessive on a novella that doesn't deliver. ★★★½☆

Next novella should finish this story, and I'd hope after that Martha writes full novels in the setting.

What I'm Watching: Deadwind

It's that season again: Grim Scandinavian crime dramas with troubled detectives!

Deadwind has it all: A widowed detective returning to work too soon, a rookie partner, a dead woman half-buried in a beach, a real-estate company with shady dealings and a Lex Luthor-looking playboy/fixer. Finland is shot in moody lighting, always night, morning, evening (I think they said it's October? So no sunlight anyway). I love the sets, too, sterile white/black perfect surfaces, inside scruffy weatherbeaten houses. Nobody could live that neat, but it's perfect for mood.

Plot seems to move fast but this is a 12-ep season, with another being written, so expecting a lot more complexity.

★★★★★ so far