HNHacker News
TopNewBestAskShowJobs

dfawcus

574 karma · joined March 23, 2019

submissionscomments
dfawcus··on Problems with Go channels (2016)
Yup, most of my uses were unbuffered, or with small buffers (i.e. 3 slots or fewer), often just one slot.
dfawcus··on Problems with Go channels (2016)
That was two main developers, one doing most of the code and design, the other a largely closed subset of 3 or 4 nodes. Plus three other developers co-opted for implementing some of the nodes. [1]

The problem space itself could have probably grown to twice the number of lines of code, but there wouldn't have needed to be any more developers. Possibly only the original two. The others were only added for meeting deadlines.

As to the graph, it was fixed, but not a full mesh. A set of pipelines, with no power of N issue, as the collection of places things could talk to was fixed.

A simple diagram represented the major message flow between those 30 nodes.

Testing of each node was able to be performed in isolation, so UT of each node covered most of the behaviour. The bugs were three deadlocks, one between two major nodes, one with one major node.

The logging around the trigger for the deadlock allowed the cause to be determined and fixed. The bugs arose due to time constraints having prevented an analysis of the message flows to detect the loops/locks.

So for most messages, there were a limited number of destinations, mostly two, for some 5.

For a given "request", the flow of messages to the end of the fixed graph would be passing through 3 major nodes. That then spawned the creation of the dynamic graph, with it having two major flows. One a control flow through another 3, the other a data flow through a different 3.

Within that dynamic graph there was a richer flow of messages, but the external flow from it simply had the two major paths.

Yes, reading the bodies of the methods does not inform as to the flows. One either had to read the "main" routine which built the graph, or better refer to the graph diagram and message flows in the design document.

Essentially a similar problem to dealing with "microservices", or plugable call-backs, where the structure can not easily be determined from the code alone. This is where design documentation is necessary.

However I found it easier to comprehend and work with / debug due to each node being a prodable "black box", plus having the graph of connections and message flows.

[1] Of those, only the first had any exerience with CSP or Go. The CSP expereince being with a library for C, the Go experience some minimal use a year earlier. The other developers were all new to CSP and Go. The first two developers were "senior" / "experienced".

dfawcus··on Problems with Go channels (2016)
Context is not need for any code which can block.

Context is only needed where one has a dynamic graph where one wishes to cleanly tear down that graph. One can operate blocking tx/rx within a fixed graph without the need for any Context to be present.

Possibly folks are thinking of this only for "web services" type of things, where everying is being exchanged over an HTTP/HTTPS request.

However channels / CSP can be used in much wider problem realms.

The real gain I found from the CSP / Actor model approach to things is the ability to reason through the problems, and the ability to reason through the bugs.

What I found with CSP is that I accept the possibility of accidentally introducing potential deadlocks (where there is a dependancy loop in messaging) but gain the ability to reason about state / data evolution. As opposed to the "multithreaded" access to manipulate data (albeit with locks/mutexes) where one can not obviously reason through how a change occurred, and its timing.

For the bugs which occur in the two approaches, I found the deadlock with incorrect CSP to be a lot easier to debug (and fix) vs the unknown calling thread which happened to manipulate a piece of (mutex protected) shared state.

This arises from the Actor like approach of a data change only occurring in the context of the one thread.

dfawcus··on Problems with Go channels (2016)
How large do you deem to be large in this context?

I had success in using a CSP style, with channels in many function signatures in a ~25k line codebase.

It had ~15 major types of process, probably about 30 fixed instances overall in a fixed graph, plus a dynamic sub-graph of around 5 processes per 'requested action'. So those sub-graph elements were the only parts which had to deal with tear-down, and clean up.

There were then additionally some minor types of 'process' (i.e. goroutines) within many of those major types, but they were easier to reason about as they only communicated with that major element.

Multiple requested actions could be present, so there could be multiple sets of those 5 process groups connected, but they had a maximum lifetime of a few minutes.

I only ended up using explicit mutexes in two of the major types of process. Where they happened to make most sense, and hence reduced system complexity. There were about 45 instances of the 'go' keyword.

(Updated numbers, as I'd initially misremembered/miscounted the number of major processes)

dfawcus··on Why training AI can't be IP theft
How about not simply summarising, but creating a broadly similar novel, with similar characters which undergo broadly similar story arcs?

I can see how it could end up as infringement, but also how one could avoid infringement. The issue would seem to be if the original author wishes to sue.

As an example, compare Brooks "The Sword of Shannara" with Tolkein's "Lord of the Rings". It is widely accepted that the former is heavily derivative for the latter; in my view essentially being an example of the above broadly similar novel.

Yet AFAIK, Tolkein's estate didn't sue Brooks. However if they had, how likely would a victory have been?

Now in the case of "Generative LLM", we may have an even closer "derivative work". However the LLM users could well get away with it if they consume a wide enough canon, and the source authors either do not learn of the derivation, or do not have the means to sue.

dfawcus··on Flying Somewhere? You May Need That Real ID.
https://archive.ph/910Ez
dfawcus··on The Insanity of Being a Software Engineer
It is possibly to earn over £100k as a software engineer employee in the UK, however those tend to be very specialised fields. (Not all of them are finance related).

I do recall a software manager (OK apples to oranges) grumbling about 10 years ago about him exceeding that level, and having to play games to avoid being bit by the tax impact which cuts in between £100k and £125k.

That said, I do know engineers who indicate they earn in excess of £100k, and they're not lead nor founder level - just experienced in the appropriate area.

dfawcus··on Xee: A Modern XPath and XSLT Engine in Rust
> I worked on projects which refused to use anything more modern than XSLT & XPATH 1.0 because of lack of support in the non Java/Net World (1.0 = tech from 1999).

For some things that may just be down to how uses are specified. For YANG, the spec calls out XPath 1.0 as the form in which constrains (must and when statements) must be expressed.

So one is forced to learn and use XPath 1.0.

dfawcus··on Blasting Past WebP - An analysis of the NSO BLASTPASS iMessage exploit
Insecure how? The fact that someone could listen in to the phone call is (to me) largely irrelevant.

The real point being that it still has wider coverage in remote parts (of the UK), and draws less power.

dfawcus··on I tried making artificial sunlight at home
He's doing it wrong, the obvious approach being to extract sunbeams from cucumbers!

:-)

dfawcus··on Blasting Past WebP - An analysis of the NSO BLASTPASS iMessage exploit
I've been using an iphone in lockdown mode for a while now, simply to disable a number of the poor security design choices Apple made.

One thing I just noticed this last week after upgrading to 18.x is that lockdown mode also disables RCS. I found I couldn't enable RCS, so turned lockdown mode off, found RCS now worked, then turned lockdown back on.

I can live without RCS mode.

For me, the one real annoyance of lockdown mode is that it disables 2G connectivity. Oh well, I guess one can carry a second 2G capable feature phone.

dfawcus··on A filmmaker and a crooked lawyer shattered Denmark's self-image
The media does when writing such things up, stylistic choices.

It is also likely to be "one in two" rather than "one out of two", in speech "half", "three quarters", "seven eighths" etc is more likely.

dfawcus··on A filmmaker and a crooked lawyer shattered Denmark's self-image
Because that is just what we do.

Expressing things as percentages was a late arrival; when until the mid 70s folks had to be able to cope with, and mentally manipulate vulgar fractions.

dfawcus··on A filmmaker and a crooked lawyer shattered Denmark's self-image
> Why not simpler English -- "half of the country has watched it"

I guess as it was aimed at a British audience, and that is not an uncommon way for us to form such sentences.

If you hadn't mentioned it, I'd not even have noticed it, simply parsing it as "half".

dfawcus··on Study casts doubt on gluten as cause of gut ailments among non-coeliacs
I'm not celiac, but something in wheat and barley gives me mouth ulcers.

I only determined that after I got past 40, and started to experience bloating from bread consumption. In giving up bread, I then noticed that my ulcers ceased.

So a bit of experimentation established that I can consume small quantities, but if I eat wheat products for more than a couple of days in a row, the ulcers come back. I later determined that barley has a similar effect due to a specific seasonal dish also triggering the ulcers.

It is now generally easy enough to largely avoid both grains, and not worry about incidental consumption due to the fact that lots of products include wheat .

As to which fraction of the grains is the cause, I don't really care - I just avoid the two grains.

dfawcus··on Brain Scans of Infants Reveal the Moment We Start Making Memories
Likewise. I have a handful of memories from between 18 and 24 months.

I know they're from that period, as they relate to a place where my parents lived at that time.

dfawcus··on The earliest versions of the first C compiler known to exist
http://cm.bell-labs.co/who/dmr/primevalC.html

" A second, less noticeable, but astonishing peculiarity is the space allocation: temporary storage is allocated that deliberately overwrites the beginning of the program, smashing its initialization code to save space. The two compilers differ in the details in how they cope with this. In the earlier one, the start is found by naming a function; in the later, the start is simply taken to be 0. This indicates that the first compiler was written before we had a machine with memory mapping, so the origin of the program was not at location 0, whereas by the time of the second, we had a PDP-11 that did provide mapping. (See the Unix History paper). In one of the files (prestruct-c/c10.c) the kludgery is especially evident. "

dfawcus··on The earliest versions of the first C compiler known to exist
As to "sizeless" arrays - yes.

Have a look at the early history of C document on DMR's site, it mentions that the initial syntax for pointers was that form.

dfawcus··on Is it safe to travel to the United States with your phone?
Isn't this something which Craig Murray was highlighting in the context of the Julian Assange extradition case?

Namely that the US Government argues that the 1st Amendment "free speech" right only applies to US Citizens.

The deal to drop the extradition of Assange only came about after the UK Judge quizzed in on if Assange would be able to depend upon that protection, rather than simply assert it (and have it denied).

So I'd not be surprised at a French citizen not having "free speech" in the USA.

dfawcus··on France rejects backdoor mandate
Chat Control may well give them a second bite at the cherry, if it get through.

It keeps getting resurrected with slight variations, and if passed, then they'd be obliged to implement some form of back door.

So I guess all one can say is that the war continues, just one battle has been won.

dfawcus··on ‘The Celts: A Modern History’ by Ian Stewart Review
sure soft 'c' is used, e.g. century, celebrate, cease, certain
dfawcus··on The F-35 as a Subscription Service
I'm not sure, but it is possible we do minor servicing on the missiles. e.g. swap out components for spares.

However the missiles are regularly rotated back in to the common pool in the USA for servicing. The schedule is such that the USA could disable our deterrent within a couple of years if they so desired.

So we have the nukes, but no independent way to deliver them.

dfawcus··on Certificate will expire on 14 March – update Firefox to prevent add-on breakage
A "cunning plan" to force upgrades? :-)
dfawcus··on The Lost Art of Logarithms
Having scanned through his book, it makes it seem overly complex.

At middle school, this was taught after having only done simply arithmetic and learning about fractions (rational numbers) in primary school, then decimal fractions in middle school.

The use of logs from the tables was simply a set of basic rules for how to apply them to a few scenarios. I can't recall if it covered trig with those tables, but I doubt it.

I learnt as a child between 10 (when I started middle school), and say around 12 at most. I've forgotten the use, but vaguely recall some way of representing negative numbers in the table (n-bar, with a bar above the digit).

I'm way over 30. I never used log tables after high school, and have forgotten the rules for usage, but recall it didn't take long to learn the first time. *

However for simple uses (multiplication and division) I'd expect I'd be able to pick it up again in at most a weeks worth of practice. It would be made a lot easier now by being able to compare and check calculations with a computer or pocket calculator.

I'd expect any adult able to program a computer to also be able to pick it up in a similar period, or at most a month.

Remember we used to teach this to kids, and expect them to be able to pick it up (if not be accurate in application) in under a weeks worth of lessons.

* Note I didn't even know how to do long multiplication when I learnt, as due to political interference with teaching curriculum, I'd not been taught at primary school.

dfawcus··on The Lost Art of Logarithms
Not long. We were taught logs, and use of log tables, at Middle School. So probably around about age 11.

I also vaguely recall a couple of lessons where we went over Napier's Bones, and they had us produce equivalents on pieces of paper to cut out and move around.

I believe I still have my school day log tables around somewhere. I'd just have to practice for 1/2 hr to remind myself how to use them. That said, they did have usage instructions in the last few pages.

dfawcus··on Children under eight should avoid slushies as glycerol leads to hospitalisations
So does a small quantity of Arrowroot, I used to add that when making my own ice cream.
dfawcus··on The US island that speaks Elizabethan English
How about looking earlier in the thread where we both mentioned which part of the Island we're from.

We're simply comparing ability to distinguish other regional accents on the Island, not putting each other down. Generally folks here get to hear lots of different forms of spoken English.

and no - I ain't no "accent genius", there are parts of the Scouse, Brummie, and Durham accents I have trouble with.

dfawcus··on The US island that speaks Elizabethan English
Again, where is the problem?

Close your eyes and _listen_, don't be distracted by the video.

Just Clarkson hamming things up.

dfawcus··on The US island that speaks Elizabethan English
Yeah - OK. That one took me about 5 plays to be able to distinguish it.
dfawcus··on The US island that speaks Elizabethan English
Yeah - no problem with that section, nor with the rest of the video.

As to Trainspotting, I found the subtitles a daft idea. Totally unnecessary, but then I'm from NE England.

Added: Apparently some folks had difficulty comprehending "Derry Girls".

← PreviousPage 4 of 17Next →