?

Log in

About this Journal
Current Month
1234567
891011121314
15161718192021
22232425262728
293031
Jan. 17th, 2017 @ 03:18 pm Not being sarcastic
There's a title I didn't expect to use :)

I've always enjoyed sarcasm: not as a put-down, but as crafting just the perfect thing to say. And I still do, when I'm not arguing with the person I'm talking to. If I'm expressing frustration, or ranting, or humorously exaggerating, or doing anything where I don't expect someone to disagree, I often express things sarcastically if I find it funny.

But inspired by ciphergoth, I've recently been noticing that I often have an impulse to be sarcastic when someone says something I massively disagree with, but it usually means that I'm very certain, but I *don't* have any facts to hand which will be convincing to *someone else*. (It may be effective to onlookers who aren't already entrenched against what I think, but not at persuading someone who disagrees.)

If I think, "how would I phrase the basic point I'm making in a non-sarcastic way", it's generally something like, "I think that's really wrong", but without much specifics. And I've been making an effort to say nothing, or say the straight-forward version.

You can also comment at http://jack.dreamwidth.org/1013352.html using OpenID. comment count unavailable comments so far.
About this Entry
jack
Jan. 12th, 2017 @ 04:54 pm Meaning of "evil"
A recent conversation about Defence against the Dark arts teachers made me realise I use "evil" in two different ways. Sometimes I mean, "doing something bad on purpose". Sometimes I mean, "doing harm to other people". The greatest harm is often done by people who are indifferent to it. But people who maliciously hurt others are awful is a special way.

A couple of the professors were very indifferent-evil. They didn't set out to hurt people, but they didn't see any of the awful things they did to people. Others were malicious-evil, they were killing people all over the place.

And of course, it's more complicated by that. Most people who cause harm by inattention SHOULD notice, and exist somewhere on a scale from "I'm 8 and I haven't broken away from the worldview I'm immersed in" to "I'm really really really wilfully ignorant, and I must be actively avoiding thinking about this."

But insofar as it's helpful to be able to think about bad things, it's useful to realise that they often overlap, but when I say "very evil" I might mean one of two different things.

You can also comment at http://jack.dreamwidth.org/1013203.html using OpenID. comment count unavailable comments so far.
About this Entry
jack
Jan. 2nd, 2017 @ 09:28 pm Yuletide fic that I received and wrote (incl smut)
Tags:
The fic I received was all the words that ever were or ever will be , a telling of some of the events in Bujold's Curse of Chalion from the Daughter's perspective. It didn't tell anything new, but I loved how it empathised with the Daughter's frustration, and told some of the story of her Father's curse from her point of view.

And I wrote Escape from the Orc Lair of Unnecessarily Revealing Armour, a Rat Queens and Oglaf crossover. It is told in a script-for-cartoon-panels format (although, as a literary device, it might not translate that well to an actual comic). It is quite smutty with bdsm and dubcon, in the general vein of both original works. If you like the sound of that, awesome, if you don't, you probably don't want to read it, although I include a break to read the set-up and ending if you'd like (see author's note).

ETA: Fixed link to my story.

You can also comment at http://jack.dreamwidth.org/1012524.html using OpenID. comment count unavailable comments so far.
About this Entry
jack
Jan. 1st, 2017 @ 03:53 pm Sign up to Ghoti's book swap if you want)
Tags: ,
http://ghoti.livejournal.com/804124.html

Ghoti started a book swap. The idea is, like a secret Santa, but you post your favorite book (or one of them) to a randomly chosen recipient. It would be cool if more people signed up.

Extra people who don't already know everyone on the list would be good :) Probably most people well be UK, but people from any country are welcome (I think?)

Deadline us tomorrow-ish (?)

You can also comment at http://jack.dreamwidth.org/1012073.html using OpenID. comment count unavailable comments so far.
About this Entry
jack
Dec. 28th, 2016 @ 11:32 pm Defence Professors at Hogwarts, a statistical summary
Tags: ,
Read more...Collapse )

You can also comment at http://jack.dreamwidth.org/1011906.html using OpenID. comment count unavailable comments so far.
About this Entry
jack
Dec. 28th, 2016 @ 07:45 pm I won nanowrimo!
Tags: ,
So, I was too busy to actually spod about it, other than a constant stream of oblique hints (thank you, cheering section on twitter!) but I did nanowrimo.

I was confident I had MORE time, and ability to schedule a large chunk of time without dropping everything else. But I didn't know if I had enough, or if it was a sensible decision.

But I was excited to try a large personal project and see if I could do it. I've toyed with the idea before, but never felt like it was a serious possibility -- I was always too likely to push myself too hard and flare out, without any ability to pace myself.

I think it was about the most I could possibly manage in a month, without a really significant impairment of work or of all other social things. Not parkinson's law, but that was about as much writing as I could manage in a day, even under good circumstances.

As it happened, the first week didn't really get started, so I ended up writing 2k words a day for the rest of the time, but I stuck to that almost all the way through. And that was usually about right -- I had about that much ideas in my head, and I could mostly go ahead and write them, and after that, I had to *think* about what would happen next.

I really enjoyed the setting and characters, they did often come alive for me (waiting on reports if that actually made it into the fic or not).

When I did pause, it was one of a couple of things. Once or twice, because what came next needed a bunch of stuff to build a story out of (a bunch of characters for the protagonist to meet, or a problem for them to encounter). More often, but less fatally, because what I wanted to happen wasn't clicking, and I had to review what I intended, what was actually needed for the novel, and what I was attached to but could be compromised if it didn't fit.

Many thanks to everyone who expressed an interest in seeing the finished work. I noted everyone down just in case. I am really, really excited to share the novel, and am very serious about getting it to anyone who would like to see. But on balance, it really is better if I fix a lot of minor problems first (things like characters having names Placeholder1 etc :)). That should be fairly easy, but I officially took December as a break where I didn't have to write any more on it :)

Yuletide was comparatively easy afterwards :) I'd already come up with a basic idea, and it took a few evenings rather than just 2 hours to complete 2k words, so a lot slower than one day's nano writing, but still, finished without any last minute panic (go me!)

You can also comment at http://jack.dreamwidth.org/1011676.html using OpenID. comment count unavailable comments so far.
About this Entry
jack
Dec. 19th, 2016 @ 01:59 pm Error handling in Rust
Tags: ,
I am still mulling this over after reading some articles on it (thanks, fanf, Kaela).

Background

Imagine you have a fairly simple function.

RetType func1(arg1, arg2)
{
   return func3(func2(arg1),func2(arg2)).func4();
}


But those other functions may encounter errors. Eg. they involve opening files, which may not be there.

Assume the error return can't usually be passed to a follow-up function.[1] The obvious then necessary step is for each function call, test the return value, if it's an error, return an error from this function. Else continue with the calculation. But this usually involves several lines of code for each of these functions, which obscures the desired control flow.

If you are willing to accept exceptions, you can just write the code above an allow any exceptions to propagate. But that represents a lot of hidden complexity from not knowing what might be thrown. And often overhead in runtime.

And in fact, this may obscure a common pattern, that for some function (eg. "parse this"), you SOMETIMES want to treat the failure as an error, and sometimes to interrogate it. As in, choose in the calling code whether failure is an error-value or exception.

Also remember, in C-like languages, many values unavoidably have a possible error case which can't be passed to other functions, null pointer. Ideally it would be clear which pointers might be null and which have already been assumed not to be.

In Rust

In Rust (if I understand correctly), these possibilities are often wrapped up in a try macro.

There is a conventional "Result" return type from most functions which may succeed or fail, which has one of two values. Either 'Ok' (usually though not required wrapping a return value). Or 'Err', wrapping a specific error (just a string, or an error object).

The try macro combines the "test return value, if it's an error, return that error from this function, else, evaluate to the successful value" into a brief expression:

try!(func2(arg))

Which seems like often what you want. Obviously if you want to handle the error in some way (say, you're interested in whether it succeeds, not just the successful result), you can interrogate the result value for ok or err.

And there's also a macro for "assume success, unwrap the result value, panic if it's not there", just like you can access a pointer without checking for null if you want. But functions which can't return an error shouldn't return "Result", so if you do that, it's clear you *might* fail. Which is exactly what you want for throw-away code. But it does mean, you can search for the unwrap macro if you want to find all the points where you did that and fix them.

Rust recent innovation: ?

I mention try! for historical reasons, but just recently, Rust has promoted it into a language feature, reducing the overhead further from four to six characters, to 1: '?' after a value means the same thing as the try macro.

Result<int, errtype="ErrType"> func1(arg1, arg2)
{
   return func3(func2(arg1)?,func2(arg2)?)?.func4()?; // Pseudocode, not actual rust syntax
}


Rust recent innovation: chaining

This is also really new and not standard yet, but I like the idea. Error chaining. The function .error_chain(|| "New error") is applied to the result of a function call. If it was a success, that's fine. If not, this error is added to the previous error. It is typically then followed by the try macro or ?. (I think?)

That means that your function can return a more useful error, eg. "could not open log file" or "could not calculate proportion". Which carries along the additional information of WHY it couldn't, eg. "could not open file XXXX in read mode" or "div by zero".

And then a higher level function can decide which of those it cares about handling -- usually not the lowest level one.

In some ways like exceptions, but (hopefully, because Rust) with no runtime overhead.

Footnotes

[1] I often think of it as, an error-value is one that, under any future operation of any sort, stays the same error value, but that's usually not how it's actually implemented.

You can also comment at http://jack.dreamwidth.org/1010801.html using OpenID. comment count unavailable comments so far.
About this Entry
jack
Dec. 6th, 2016 @ 10:50 pm Topology / complex analysis / what
Tags: ,
For a plot bunny (yes, really :)):

You have a multivalued function from a sphere onto "some surface", continuous everywhere except two points. (Or, equivalently, a function from "some surface" to the sphere, I guess?)

If you look at points on the surface which map onto the same point on the sphere, and connections between them of "paths" on the sphere (up to continuous deformation), I feel like they end up acting like the integers, where "+1" and "-1" correspond to a clockwise of anticlockwise circumnavigation. Or possibly some subset, a cyclic group of some finite order, if there are repeats. Is that right?

If you have *three* points, what can the relationship between the points look like? What about more?

I remember doing something like that but not what it's called.

I'm trying to put something like the shadows of amber onto a more concrete mathematical footing :)

You can also comment at http://jack.dreamwidth.org/1010608.html using OpenID. comment count unavailable comments so far.
About this Entry
jack
Dec. 6th, 2016 @ 02:25 pm Fictional depictions of extra-legal bookies
Tags: ,
In Lucky Number Slevin, there's a bit where a guy who's life is a disaster gets a second hand tip and makes a bet on a horse race with an (illegal) bookie he can't afford, and unsurprisingly it goes horrible wrong and they try to kill him.

The main moral is "prohibition makes for good films and disastrous government policy".

But then I got to thinking about the mechanics of running a bookie without access to law enforcement and banking infrastructure, and I didn't actually understand it.

I assumed, illegal bookies would exist on a spectrum. The more honest implementation being like a legal bookie: accept bets with cash up-front, or from people you're pretty sure are a good credit risk. Pay out if they win. That's it.

The other end of the spectrum being like a loan shark: extend credit to as many people as possible, let people get in over their heads, and then milk them for as long as possible before their life falls apart in ruins. If anyone decides to just not pay, force them or make an example out of them with physical violence.

But in Slevin, it seems like, the organised crime people knew in advance the mug was broke and could never really pay. So why do they accept the bet at all? As soon as the horse loses, they make a move on him. So they never expected to get *any* money from him whatever the race outcome. Even if you're *willing* to messily kill people, what do they gain by getting into that in the first place?

Is it just to get a splashy example so other people pay up? But don't you want them to dig themselves in FIRST? If you START by scaring everyone, maybe they just won't borrow money from you?

You can also comment at http://jack.dreamwidth.org/1010337.html using OpenID. comment count unavailable comments so far.
About this Entry
jack
Nov. 25th, 2016 @ 12:30 am Fallen angels, dinosaurs, and atheists
Tags:
To give context to my previous tweets, in my novel, something like a creation narrative literally happens: God, angels, adam and eve, the war in heaven, six thousand years later, the present day. It's not exactly the same as any accepted belief system, but something along those lines.

I have not decided if that's *instead* of the geological history we have evidence of in this world. If so, I need to, um, explain biodiversity, and dinosaur bones, and geology, etc, etc, etc. And coming up with a plausible present day derived from that history is more world-building than I want, I'm basing it on "like the present day, but with fallen angels occasionally wandering about".

Alternatively, the two histories are sort of parallel, God "smoothing out" the older history somehow. Which makes sense, but is a bit of a cop-out.

So far, I've just not mentioned it, but it feels like a question hard not to have any idea of.

In terms of certainty, there are still characters, like the main character, who personally remember the war in heaven and the creation of the world, and interacting directly with God. Not remember *very* well, because time passes, but have a reasonable certainty that things happened like that. And some knowledge of magic etc supporting their assertion of knowing how the universe works.

(What happens *outside* this world *since* the creation is left uncertain, because that really would overload my worldbuilding.)

But I haven't really addressed what non-religious philosophies exist. People who don't find the evidence for God convincing? Presumably those people do exist, and for people who think the evidence is convincing in *this* world, they will seem exactly the same as atheists in this world. But for me, they're more like flat-earthers. People who think God created that universe much as described, but hasn't intervened since and/or has no special moral place? They presumably exist. I think I have those characters, though they haven't had conversations about it yet.

That's what I meant by "can I have dinosaurs" and "can I have atheists" :)

ETA: And as London Crawling points out on twitter, it would be plausible to have people who believe in dinosaurs and angels, but find the account of a prime mover who personally created angels unconvincing. In fact, that might even be accurate in this world -- my account of creation is all given second hand.

You can also comment at http://jack.dreamwidth.org/1010054.html using OpenID. comment count unavailable comments so far.
About this Entry
jack