Recent submissions

Comment · 1 year ago
D has them both
Comment · 1 year ago
.init is not necessarily 0. For int it is, but for float it's NaN. For char it's 255 and for an enum, it's whatever you have decided it is. enum thing { first = -1, second, etc. } This way, a variable of type thing has -1 as init value.
Comment · 1 year ago
What makes the choice of < > for template parameter bad appears when someone tries to nest templates.

     a<b<arg>> 
and now a means greater becomes a shift right. That's one of the reason that it you had a genious ideo to find domething else in D

a(template params)(runtime params) at declaration a!(template params)(runtime params) at invocation with the type deduction and parenthesis omission making often even disappear completely the template syntax.

thank you

Comment · 1 year ago
I just wrote a somewhat bigger program in D and I mostly used UFCS chains for the toString() overrides to have better debug outputs. There are also some idiomatic forms that are frequent like conversion bar = foo.to!int is much more readable than bar = to!int(foo)
Comment · 1 year ago
D such a fantastic language.
Comment · 2 years ago
Apple /// was 2MHz and it was a disaster.
Comment · 2 years ago
It was not just a bandwidth issue. I remember my first encounter with the Internet was on a HP workstation in Germany connected to South-Africa with telnet. The connection went over a Datex-P (X25) 2400 Baud line. The issue with X25 nets was that it was expensive. The monthly rent was around 500 DM and each packet sent also had to been paid a few cents. You would really try to optimize the use of the line and interactive rsh or telnet trafic was definitely not ideal.
Comment · 2 years ago
There also SDC which is an experimental D compiler not using DMD code. I don't know how complete it is but it is actively updated.
Comment · 2 years ago
NEC V20/V30 not that much but 80186 and all their specialized embedded variants from Intel (80186EA/EB/EC) and AMD (Am186EM) were extremely appreciated as it allowed to use normal MS-DOS compilers and software.

Am186EM we loved that one. 100 pin PQFP with unmultiplexed bus, CMOS up to 40Mhz, including UART, SPI etc.

Comment · 2 years ago
Motorola's embedded cpu's had strange numbers that would make it difficult to recognize to which cpu family it belonged. 68705 were 6800 derived, 68302 were 68000 derived. As for the 6809 it l ooks like that there were no embedded derivatives of it. 68HC16 seems to be a 16 bit extended 6800 using a similar technic as 65816 to extend the 6502.
Comment · 2 years ago
In the list of applications of the 6502 architecture there is one big missing entry. Good old phone line modems using Rockwell chipsets (Hayes modem) that went up to 56Kbit/s. The central controller of the Rockwell chipset was an embedded MPU based on 65C02 kernel that were clocked to up to 75MHz (that's the fasted I had seen). The fact is relatively unknown as NDA with Rockwell were extremely tight.
Comment · 3 years ago
There are also some very questionable statements in the articlle like saying that 6502 instructions only need one cycle. It's 2 to 7 in reality. Over the years the comparison between 6502 vs Z80 tend to show that you have to clock the Z80 at about twice the frequency of the 6502 to get the same performance. 8088 having a slight edge over the Z80 it is clear that a 5 MHz will be quite faster than a 1 MHz 6502 (C64 was even under 1MHz as the VIC chip would steal some cycles every 8th display line)
Comment · 3 years ago
and

    ubyte - 8 bits
    ushort - 16 bits
    uint - 32 bits
    ulong - 64 bits
    ucent - 128 bits
    
    float - 32 bits
    double - 64 bits
    real - maximum precision hardware allows (80 bits on x87).
Comment · 3 years ago
it has defined the type for very long: it's cent and ucent. It hasn't implemented it completely though, but named and defined it is already forever.
Comment · 3 years ago
For bool it's even worse.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton