HNHacker News
TopNewBestAskShowJobs

ericfontaine

87 karma · joined March 4, 2015

submissionscomments
ericfontaine··on The Boundary Between Hardware And Software
As mentioned earlier, FPGA's do not fit this 3-part distinction.

In addition, CPU microcode doesn't fit this distinction, as the microcode is software (not hardware) that is hidden behind the ISA's interface.

Also, I can think of computers that only have hardware and data input (without any programs or instruction set). Basically number crunchers that run a fixed program (e.g. DSP's or non-general GPU's that perfom a specific function), with only the data input that can change.

You bring up a good point by acknowledging "The Interface". But I would reclassify into a different set of parts, something along the lines of: "Interface" - "Implementation". I/O can be programs and/or data that interface with the implementation which can be hardware and/or software, or another whole computer. (This is potentially recursive classification, so it can include virtual machines.)

ericfontaine··on The Boundary Between Hardware And Software
Clever, they insert an additional chip between the cpu and wifi whose sole purpose is to load wifi firmware, and thus make it non-update-able "efectively circuitry" to bypass the silly FSF rules.

Using the same logic, what if someone ran netflix's proprietary DRM decryption-specific code in a seperate co-processor that interfaced with the main CPU only via the w3c's Encrypted Media Extensions? Assuming this code is never updated and runs isolated from the CPU, according to the FSF silly rules about updatability, they would be OK with this "effective circuitry" (of course ignoring their concerns about DRM itself). But if that same code would be run inside firefox's sandbox for EME plugin's, it would be considered dangerous non-free software.

ericfontaine··on The Boundary Between Hardware And Software
"Firmware that is installed during use is software; firmware that is delivered inside the device and can't be changed is software by nature, but we can treat it as if it were a circuit."

So any code, gate patterns, or microcode (preinstalled or not) that is potentially update-able (regardless of difficulty) would be considered "software". But any code, gate patterns, or microcode that is preinstalled into some rom or fuse memory inside the chip or that is otherwise impossible to be updated would be considered "hardware".

If an entire OS microkernel (like seL4) is burned into some rom inside the same chip with cpu and is physically impossible from being updated, it would be considered hardware by this gnu.org definition, but should be considered software according to wikipedia's definitions:

"[Software] is any set of machine-readable instructions that directs a computer's processor to perform specific operations." "[Hardware] is the collection of physical elements that constitutes a computer system."

Theoretically anything in software can be implemented as hardware and vice-versa. But should updateable-ness really be the differentiating factor? Now lets say that seL4 was compiled into VHDL to put in a fpga. (I am using seL4 as an example because it is small and written in a functional language which would be easier to implement in hardware than a macrokernel written in a sequential language like C, and because it performs a significant function of a computer, even though it may be impracticable to implement in a hardware description language). Is that hardware or software now? I would say hardware, because it is now a collection of physical elements connected together. But gnu.org's definition only seems to care about the updateability-ness.

What if instead the seL4 code was on a rom that couldn't be updated internally, but could instead be physically removed from a socket or unsoldered and replaced (even if not intended to be). I'm not even sure whether this gnu.org definition would consider it hardware or software, but I would guess using the strict updateable-ness criterion alone, by having some manner to be replaced, it would be considered software.

Sometimes organizations choose definitions to provide realizable goals. FSF uses this updateable-ness distinction, and then can for example say that the libreboot X60 runs entirely free "software". But of course my libreboot X60 has a bunch of processors running un-updateable proprietary code, such as the wifi, disk, and graphics chips, even though they are interfacing to the cpu using open source drivers. Also FSF seems to tolerate the preconfigured microcode already on the cpu, but won't tolerate microcode updates loaded at boot. But by using this non-updateable-ness criterion, FSF has a much more manageable but achievable conditions to meet the goal of free computing rather than having to "free all the things".

Maybe FSF is attempting to find definitions relevant to libre-ness. But I don't think making up their own new definition of hardware and software is necessary for achieving goal of free computing, nor terribly useful. I think they should just stick to the 4 freedoms (to run the program, to study how the program works, to redistribute copies, to improve the program) and might be better focusing on using the word "program" instead of having to make up their own new definitions for hardware and software. The word "program" transcends the distinction between hardware and software.

ericfontaine··on The Tricky World of Securing Firmware
I'm not a fan of corporations "securing" my firmware by preventing me from installing my own custom version. Currenty, I use libreboot on my X60s and Macbook2,1 with GRUB in the firmware and configured to only boot kernels signed with my own personal key.
ericfontaine··on Saying goodbye to encrypted SMS/MMS
I'm one of those people who used to use text secure, but didn't like installing google or cyanogenmon on my phone. So I would always have to self compile, but gave up recently cause I don't have any friends to text secure with :(
ericfontaine··on Google Memorial: the small museum of projects abandoned by Google
Google Ride finder • 2007 - 2009

Wow...killed the same year Uber was founded. Missed out on a nice market opportunity...probably just needed to be refined, remarketed and keep it going. (I never even heard about it.)

ericfontaine··on C Questions and Answers
Ok.

What do you think was the reason C took off while Algol use diminished? Was the growth of Unix a significant reason? Do you think C's adoption was misguided?

I think C's took off because C fit the sweet spot of ability to produce fast code while still being cross-platform and human-readable.

ericfontaine··on C Questions and Answers
I forgot about segments... Thanks for clarifications...I guess I don't know C. :)
ericfontaine··on C Questions and Answers
Right.

My understanding of history is compiled Algol wasn't nearly as fast as compiled C, which was needed for operating systems and performance-critical code.

ericfontaine··on Show HN: Slack Meets GitHub Issues
"Open" to me leads me to think it is open source, but it isn't. I suppose common folk may not have that presumption. But I don't even think "Open" is descriptive to what your product does (other than maybe how it is quick to open). Loop is fine, as it express to me how you can be "in the loop". If you are getting rid of the Z or thinking of other names, I suggest using parts of another commentor's suggested tagline: "chat is your to-do list, and your to-list is your chat" for the name: e.g. "ChatToDo", "TagToDo", "LoopToDo", "TagChatDo", or even simply "InTheLoop" is better. Something along those lines that is more direct, specific, & descriptive than OpenLoopz, so that an uninitiated potential consumer has a bit of an idea about what it is your app does before even considering to click your link.

(Regarding the www., I was another of those who just visited the naked url, and I immediately thought negative thoughts like, it's down, and almost didn't try again. You should atleast redirect the naked url to a valid url or landing page.)

ericfontaine··on C Questions and Answers
thanks for clarification!
ericfontaine··on C Questions and Answers
what I mean in my paragraph is that C has all these (nasty) details that are necessary due to C's position as being almost assembly language (but not quite) AND being cross-platform. Macro assembles like MASM and TASM use ISA-specific assembly languages, so you can't write cross platform code. I suppose one could image a sortof cross-platform LLVM IR structured macro assembler might be an example of something lower than C that is still architecture-independent that you would then pass to an machine-specific optimizing compiler.

Algol is higher level than C.

ericfontaine··on C Questions and Answers
#1. Tentative definitions are historical baggage from Fortan Common blocks (https://blogs.oracle.com/ali/entry/what_are_tentative_symbol...), which may have helped adoption of C by Fortran users. Although it remains in the C language specification, this feature can be ignored.

#2. Treating dereferencing a NULL pointer as undefined behavior means that the compiler is not required to generate additional instructions such as asserts or crashes to guard against potentially dangerous side effects. C compiler assumes that the programmer is in control of his/her code. In this example, it can be assumed that a careful C programmer has already guaranteed that the pointer will not be null when it is dereferenced. This C feature is an optimization to avoid generating redundant or unnecessary asserts or handling code.

3. C allows the programmer to handing pointers, allowing for such low-level optimizations that may not be possible in higher-level languages. A careful C programmer may have taken steps outside the function to handle the situation where yp==zp, or may otherwise be unconcerned about a particular case, for performance reasons.

4. A correct implementation of IEEE 754.

5. Since C is designed to efficiently compile to any computer architecture, it needs to be aware of the distinction between the arithmetic width of an instruction set vs the width of addresses. Ints are optimized to default to the natural arithmetic width of an instruction set (so that compilation doesn't produce unnecessary packing/unpacking instructions whenever they are accessed) but is guaranteed to be atleast 16 bits wide. However, since data structure can be as large as addressable memory, it is necessary for size_t to be the width of addresses.

6. Allowing size_t to be unsigned allows all bits of a size_t variable to be utilized for expressing size.

7. Undefined behavior is, again, an optimization feature, allowing each compiler to implement as it sees fit.

8. Comma operator is useful when first operand has desirable side effects, such as compactly representing parallel assignment or side effects in for loops.

9. C allows unsigned integers to wrap around 0 and UINT_MAX. This feature can be utilized as an optimization, for example as a free (no additional instruction) deliberate modulus operation. This is usually how unsigned integers behave in assembly.

10 & 11 & 12. Some ISA's, like MIPS, treat overflow of signed numbers as an exception. Others simply treat the result as a valid two's-compliment value. Since C is machine independent, C's official specification for overlow of signed numbers must be compatible for all ISA's. Simply treating the result as undefined does the trick, and means the compiler doesn't have to make guarantees or version for each ISA.

ericfontaine··on C Questions and Answers
Although most comments use these examples to argue that C is a bad language, I would argue the opposite, that these examples show how C is an extremely useful language. C has occupied a niche position as the lowest commonly-used language that is both human-readable (at the level of expressing algorithms, data structures, functionality, and control flow) but not specific to any one instruction set architecture (and thus can compile to any architecture). Each C construct or statement maps efficiently into machine instructions, while not being an assembly language. I have trouble imagining how to make something like C any lower without becoming architecture-specific or cumbered with details that are more economically-suited for a compiler. But if too much higher, then the programmer becomes detached from this close relationship to the computer. The programmer can focus on implementing important speed & space performance details of an algorithm while not getting bogged down by more mundane details (such as register allocation, matching jump statements to their targets labels, keeping track of the return stack of a function, etc.) that are better suited for a compiler to handle. (That being said, I think Rust or something like it is a strong successor and can additionally express concurrency).

These examples illustrate well-intended and useful features of C, not flaws. I will explain why for each in a comment below:

← PreviousPage 2 of 2