HNHacker News
TopNewBestAskShowJobs

dfawcus

574 karma · joined March 23, 2019

submissionscomments
dfawcus··on I should have loved electrical engineering
Yeah - there was a massive filtering of the students between the 1st year entry, and the second year at my Uni. Largely down to people unable to handle the (not terribly) complex maths at that stage.

I knew a number of folks in the first year who were very good at practical electronics, having come in from a technician side, but simply gave up due to the heavy maths load.

It got more complex when doing Control Theory, what with Laplace and Z transforms, freq domain analysis, and the apocryphal Poles and Zeros.

Further culling ensued at that point.

dfawcus··on Default Methods in Go
Also doesn't this disprove his default methods claim, or have I misunderstood?

    package defmeth
    type I interface { foo(); }
    type defs struct { }
    func (s *defs) foo() { }
    var _ I = (*defs)(nil);
    
    type usage struct { defs; a int; }
    
    var _ I = (*usage)(nil);
dfawcus··on Default Methods in Go
> and there is no canonical way to document that A satisfies B

Surely that is wrong:

    package satisfy
    type I interface { foo(); }
    type S1 struct { a int; }
    type S2 struct { a int; }
    func (s *S1) foo() { s.a = 1; }
    var _ I = (*S1)(nil);
    var _ I = (*S2)(nil);
Then we get:

    $ go build ./satisfy.go 
    # command-line-arguments
    ./satisfy.go:7:11: cannot use (*S2)(nil) (value of type *S2) as type I in variable declaration:
         *S2 does not implement I (missing foo method)
dfawcus··on Teletext in North America
In 1988 I worked for around a year for a company which used NAPLPS for various Data Broadcast advertising devices.

It actually had quite impressive graphics capabilities, although the vector graphics took some time to draw (using NEC V30 CPUs), and an additional graphics processor chip (made my Intel if I recall).

Data Broadcast being a commercial use of the UK TV channel for various things, i.e. essentially a commercialization of the data channel over which Teletext was sent, Teletext had some of the flyback lines, DB had some others.

dfawcus··on Toothpaste made with keratin may protect and repair damaged teeth: study
Or even just eat Rabbits, as they're already a common recognised food animal?
dfawcus··on Facial recognition vans to be rolled out across police forces in England
We shall have to adopt a new fashion for Australian style cork hats:

https://en.wikipedia.org/wiki/Cork_hat

dfawcus··on How Apple could send democracy to the spam folder
I have one of these devices on my landline.

https://www.truecall.co.uk/shop/truecall-call-blocker

Having an equivalent functionality built in to a mobile would definitely be welcome.

dfawcus··on At a Loss for Words: A flawed idea is teaching kids to be poor readers (2019)
Are 'spelling bee' contests only (or mainly) a USA thing?

My first experience of the idea was in US films and TV programs. I never came across it at school in England.

FWIW, my reading lessons (both at school in the early '70s), and at home at the same time used a form of phonics.

Although I never knew that term until over 30 years later. We simply knew it as breaking the word apart in to pronounceable pieces.

As mentioned in the article, I still occasionally use the technique if and when I come across an unknown word.

dfawcus··on Go’s race detector has a mutex blind spot
Generally, in any language, I'd suggest of you're fiddling with lots of locks (be they mutexes, or whatever), then one is taking the wrong approach.

Specifically for Go, I'd try to address the problem in CSP style, so as to avoid explicit locks unless absolutely necessary.

Now for the case you mention, one can actually achieve the same in Go, it just takes a bit of prior work to set up the infra.

  type Foo struct {sync.Mutex; s string}
  
  func doLocked[T sync.Locker](data T, fn func(data T)) {
      data.Lock(); defer data.Unlock(); fn(data)
  }
  
  func main() {
      foo := &Foo{s: "Hello"}
      doLocked(foo, func(foo *Foo) {
        /* ... */
      })
      /* do the slow stuff */
  }
dfawcus··on The borrowchecker is what I like the least about Rust
Alef (arguably one of the antecedent of Go) had stackful couroutines/fibers yet it could have had such a seamless FFI to the standard C API/ABI.

The plan9 libthread (which reimplemented the Alef concurrency model for C) did have seamless use of the C API/ABI.

The mechanism was that it had threads and coroutines, a function needing to make use of the C API in a seamless manner would simply run as a thread rather than a coroutine. It was then easy to share data as the CSP model (with channels) worked between both coroutines, threads, and coroutines within a thread.

So if one wishes to use stackful coroutines, and still have that seamless compatibility, an approach mixing the Go and Alef approaches would seem necessary. i.e. the Go migrating coroutines as a default, but with the option to use Alef like thread bound coroutines when necessary.

dfawcus··on Strategies for Fast Lexers
FWIW, Alef also used a 'become' keyword for a tail-call version of 'return'.

That in a quite C-like language.

dfawcus··on Why English doesn't use accents
Oddly enough, I pronounce 'legged' that way, but not 'winged'.

e.g. "Long legged monster"

dfawcus··on Why English doesn't use accents
Þe 'ae' glyph is still used in printed English, e.g. spelling of 'Encyclopaedia', 'paedophile'

Similarly þhe 'oe' glyph is also used, often in medical contexts.

Þe loss of þorn is somewhat sad, as it is still easily understood by native speakers when substituted for its modern digraph.

dfawcus··on I write type-safe generic data structures in C
Well, obviously speed when one is on the clock.

All power tools have trade offs vs the manual alternates, often tipping towards their use, but not always.

I have had success on an occasion using a belt fed screw gun when fitting plaster boards, especially for ceiling boards.

However I don't do joinery often enough to justify the use of a nail gun.

dfawcus··on I write type-safe generic data structures in C
Nah - one would simply use a punch with the hammer.

So nail the architrave with the hammer until the nail is say 1/8" proud, then punch it home.

dfawcus··on Seven replies to the viral Apple reasoning paper and why they fall short
Maybe they can, but what the human is able to do is examine the tower of Hanoi problem, and the derive the general rule for solving (odd or even number of disks).

Based upon that comprehension, we then need little working memory (tokens) to solve the problem, it just becomes tedious to execute the algorithm.. But the algorithm was derived after considering the first 3 or 4 cases.

Whereas for the moment, LLMS are just pattern matching; whereas we do the pattern match, then derive the generalised rule.

dfawcus··on Self-hosting your own media considered harmful according to YouTube
Except the official report stated something different.

Report here: https://hmicfrs.justiceinspectorates.gov.uk/publications/pol...

The below from the FSU page:

> However, HMICFRS explicitly found “no conclusive or compelling evidence” that the disorder “was deliberately premeditated and co-ordinated by any specific group or network.” Most offenders were local, often young, and had no ties to extremism. The report also cites the Children’s Commissioner, who similarly concluded that conversations with those arrested “do not support the prevailing narrative… that online misinformation, racism or other right-wing influences were to blame.” Although ‘harmful’ online content may have circulated, the report acknowledges the causal factors were “more complex than were initially evident,” including longstanding social deprivation, loss of trust in policing, and generalised political disaffection.

Found via: https://freespeechunion.org/southport-riot-report-undermines...

dfawcus··on Iron Spring PL/I Compiler
There is also a CP/M PL/I compiler, and apparently also CPM-86 and DOS versions.

Simply because some of the source file (1 or 2) for CPM are written in PL/1, rather than the majority having been written in PL/M, then eventually translated to assembler.

Here we go:

http://www.cpm.z80.de/binary.html

    PLI-80 BINARY : 146K This is the PLI compiler. It is very compatible with the IBM PLI compiler used on the 360. The only functions I found missing were DATE and TIME, which were easy to fake out. (Apparently this is version 1.0).

    PLI-80 version 1.3 : 111K Here is the PLI-80 version 1.3 compiler and libraries.

    PL/I-80 version 1.4: 188K - version 1.4 including quite a few example files
dfawcus··on Iron Spring PL/I Compiler
Would that be this, using the current version of the TUHS archive?

https://www.tuhs.org/pipermail/tuhs/2021-November/024695.htm...

dfawcus··on SMS 2FA is not just insecure, it's also hostile to mountain people
Isn't SMS 2FA immune to SIM swapping attacks when the SIM is an unregistered PAYG one?

i.e. there is no way to contact the carrier and get the number reassigned to a new SIM unless one first registers the SIM, and hence binds the number to a known identity.

dfawcus··on SMS 2FA is not just insecure, it's also hostile to mountain people
> anon SIM are no longer allowed in the EU

Surely Ireland still allows them? If not, they're trivial to source from NI.

dfawcus··on Anubis saved our websites from a DDoS attack
Then have the server error response vend the Anubis JS as a fallback?
dfawcus··on Cheating the Reaper in Go
I'd suggest a lot of the reason behind choosing Go, may well be the GC by default, which can simplify a lot. Then only needing to optimise a subset of memory use cases.

Maybe an alternative would be choose D, as it also has a GC, and allows more controlled memory layout than Go, with parallel allocations both in the GC and outwith the GC.

Assuming the only other offering is Rust, I'd interpret such choices as said folks not being convinced that the pain from using Rust is worth the gain for their particular use case.

dfawcus··on A Map of British Dialects (2023)
The English may be the same, but the accents are different, and often so are the speech patterns.

Folks in GB can generally distinguish someone with a Northern Irish accent from someone with a more southerly Irish accent.

e.g. Belfast, or Derry accent vs Dublin accent.

dfawcus··on A Map of British Dialects (2023)
An amusing anecdote, especially the Superman comparison at the end...

  "but I had nothing on bar me jocks"
dfawcus··on A Map of British Dialects (2023)
It is a traditional one which fell out of fashion.

https://weather.metoffice.gov.uk/learn-about/weather/seasons...

https://twominenglish.com/autumn-vs-fall/

Now if we start saying "diaper" again instead of "nappy", you can start to worry.

dfawcus··on A Map of British Dialects (2023)
As a Brit, so did I. That said, a "rotor" would be pronounced as "rOATer" and has a completely different meaning.

isn't English fun !

dfawcus··on A Map of British Dialects (2023)
Not 'virtually', Scots is a different language to English, and Doric is a dialect of Scots.

English and Scots are sibling languages, c.f. some of the geographically close Scandinavian languages.

If you want a quick guide to languages in Britain, the site has an additional article which the original links to:

https://starkeycomics.com/2019/03/01/every-native-british-an...

dfawcus··on The Subjective Charms of Objective-C
Try ObjFW instead, a largely self contained set of tools and framework, and if I recall correctly it contains its own base root class.

I certainly managed to use it for some test programs a number of years ago.

https://objfw.nil.im/home

https://github.com/ObjFW/ObjFW

dfawcus··on Problems with Go channels (2016)
I had a need for that, on TCP and UDP connections. The former behind a net.Conn.

Rather than fiddle with Close() calls, from memory what I found worked was setting a short (or in the past) deadline on the Conn (SetReadDeadline). This as it is documented as applying even to an existing blocked call, and makes that blocked call eventually return an error.

So when I wanted to tear down the TCP connection and clean up the various goroutines associated with using the connection, I'd unblock any blocking i/o, then eventually one had an easy Close() call on the connection.

UDP was simpler, as each i/o operation had a short timeout. I've not investigated what could be done for pipe and fifo i/o.

← PreviousPage 3 of 17Next →