918 karma · joined March 17, 2018
It is a good idea in principle, but it's never really taken off to my knowledge. Parallel programming is hard. Deeply embedded programming is hard. The languages we have are mostly bad at both.
If you want to search for more, the keyword is "processor in memory" or "processing in memory" (PIM). Also "in memory computing" is commonly used as well. A number of groups are working on this right now. The new buss is "memristors" (memristive computing). Whether or not any of it actually ends up working or being commercially viable outside of a lab remains to be seen.
The trick on laptops is to block on sending the signal in the script you use to suspend, so that when the laptop resumes the display is already locked.
I find that having a fully automated setup makes tech problems much less stressful. If something breaks, I can just re-install the system from scratch and be up and running again in an hour or two. It also makes changing hard drives or setting up a new machines very straightforward.
CentOS 8 had been mostly working well for me, barring a few missing packages that were easy to port over myself, and I was really thinking of moving all my boxes to CentOS. I'm glad this news came out before I did; I don't know what I'll use instead, but it definitely won't be CentOS/RHEL.
The cynic in me says this was deliberately pre-planned to garnet free press. That type of behavior would certainly be in-line for the company responsible for the Halloween Documents[2][3].
Even if we give GitHub, and by extension Microsoft the benefit of the doubt here, this is a lesson we should not soon forget: Microsoft will not go to bat for you, not unless you can wield the power of the HN/Reddit/Twitter/etc outrage machine to create a PR problem for them.
Don't rely on Microsoft to be the centralized underpinnings of the open source world. At worst, it paves the way for EEE[4] 2.0. At best, it creates a single centralized target for malicious actors, such as the RIAA.
0 - https://www.riaa.com/about-riaa/riaa-members/
1 - https://blogs.microsoft.com/blog/2018/10/26/microsoft-comple...
2 - http://www.catb.org/~esr/halloween/
3 - https://en.wikipedia.org/wiki/Halloween_documents
4 - https://en.wikipedia.org/wiki/Embrace,_extend,_and_extinguis...
If the lack of open hardware bothers you, there are several non-x86 architectures that are fully open source. Chief among them is RISC-V[0]; SiFive[1] is taping out RISC-V processors to real hardware, selling dev boards, and stuff like that. These are real, competitive, Linux-capable CPUs, although widespread adoption has not happened yet.
On the more minimalist front, the ZipCPU[2] is simpler (though has less software support), and it's author writes some really great blog posts about HDL[3] (Hardware Description Language -- how these CPUs are defined).
You might also enjoy developing for very small embedded systems. I like AVR CPUs such as the ATMega328P (of Arduino fame) for this purpose. Although not open-source, they have quite good and thorough datasheets. AVRs are very small 8 bit systems, but as a result, you can fit most of the important details in your head at once.
If you want to talk more about these topics, feel free to get it touch with me. You can find my contact info on my profile, and on my website (also listed in my profile).
Of course, all of this is arbitrary. Apple just wants to be able to control their platform, they don't actually care about having rules and enforcing them with any semblance of fairness.
It's unfortunate that developers have to put up with this. I say "have to" in that my understanding is that Android users (in general, present company likely excluded) won't pay money for high quality ad-free apps. So if you actually want to make something good and be paid for your trouble, it's iOS or bust.
I guess this is somewhat rhetorical; the people who would be interested in such a tool are I imagine by and large willing and able to either jailbreak or buy an Android. Presumably getting a nice shell-type environment as a PWA would be tricky also considering the limitations of the browser (I know this makes networking hard).
I wish there was a product like an iPad that came with a root shell out of the box. I like the polish of iOS, but I'm not willing to trust random people on the internet with root code execution to jailbreak my iThings.
0 - https://git.sr.ht/~charles/charles-util/tree/dev/bin/query-w...
FPGAs are what you really want when you need to deal with high resolution data that is coming in at very high data rates. Often even a very fast general-purpose processor with hand-tuned assembly simply won't have even the theoretical memory throughput to process your data without "dropping frames". They also have the benefit of deterministic performance, which with modern caching/branch prediction systems you can't guarantee (AFAIK, my computer architecture knowledge isn't that cutting edge).
They can also work really well if you have some computation you want to do that is so far off the beaten path for general-purpose processors (or so memory bound) that FPGAs can take the cake.
There is also some work in sprinkling even more hardlogic into the FPGA dies, like processors or accelerator cores for various applications. FPGAs are great for implementing the glue logic to move data between those.
GP is also correct that DSP/SRAM blocks are critical to performance. FPGAs are not very efficient at raw compute if you have to synthesize everything out of LEs.
The performance benefit of FPGAs, which PIMs also share (in theory, there aren't any PIMs ready for real-world deployment AFAIK) is that they can leverage much larger memory bandwidths than general purpose CPUs can. An FPGA might run at a lower clock rate (low 100s of MHz), but be able to operate on several kb per clock cycle. This can work really well when paired with off-chip logic to convert high rate serial interfaces to lower clock rate parallel interfaces, then back after the FPGA is done processing.
There is also a lot of work going on in the space of time-division multiplexing FPGAs effectively. The two main approaches are overlay architectures and partial reconfiguration. The former implements another high-level fabric on top of the FPGA which will be less general-purpose, but can be reconfigured faster. The latter is a feature vendors have added to some high-end chips where specific regions of the FPGA can be reconfigured without affecting other regions.
One of the features I find most useful is that you can have a window focused without raising it. So if you have some reference material open in a browser over top of part of your terminal, you can switch focus to and even click in the terminal without raising it (in my setup, I alt-click to raise). Admittedly, I'm not sure if this is the default behavior, as many of my settings are non-default.
I also really like the ability to search through window titles. I have alt+/ set to open the window search menu, then I can type a substring of the window title I want to raise, press return, and it's automatically raised and focused.
CWM is really, really nice, and every other WM I've tried before or since has disappointed me by comparison.
If you run some old version of Windows or macOS in a VM with relevant versions of common office productivity software, you will see that the UIs are quite different now from 5, 10, 20, ... years ago.
My perception is that people are sick of learning how to use some operating system, software version, whatever, only to have to re-learn everything because a new version of release. Especially considering that many professionals upgrade when their employer's IT department makes them, not on their own time. As a result, you get the attitude of "why bother learning how to use this when it's going to change out from under me in six months?".
I'm not suggesting that the answer is to never change or improve any UI ever, but I don't think we've struck the right balance, at least in consumer-facing software.
Consider that most of the people on HN have a very different experience. If you live in a UNIX environment, you can often use the same workflow/scripts for decades on end. If a new version of Bash or Vim came out that was backwards-incompatible, it would never be adopted, or would at least take many years to be.
For your $2, you get:
* An internal oscillator which lets you run without an external clock circuit (typically limited to around 8MHz, and can cause clock drift, so not good of accurate timing is important).
* Hardware UART interfacing logic
* Hardware SPI interfacing logic
* Hardware I2C interfacing logic
* Several ADCs
* 23 GPIOs
* 2kB data memory
* 1kB EEPROM
* 32kb flash memroy
There are other microcontrollers out there, each with their own trade-offs. I personally like AVRs, as they have good quality open source compilers, you can mooch off the Arduino community for libraries[3], and in-circuit programmers can be had for cheap[1].
If you want to learn more, I suggest this article[2].
0 - https://www.mouser.com/ProductDetail/Microchip-Technology-At...
1 - https://www.adafruit.com/product/46
2 - https://www.evilmadscientist.com/2007/using-avr-microcontrol...
pv < input.iso > /dev/sdX
Is a more portable way to do that, as "status=progress" is a GNU modification to dd, as I recall. Of course the most portable is to use one of the POSIX mainstays like cat or cp.Sure, if you change the page structure enough you could defeat it, but it would require more than just adding a few divs. XPath easily lets you mix and match matching against not just CSS classes, but also the page's structure itself, inner text, attributes, and so on. As a result, you can get some really powerful queries without having any kind of complex post-processing of the results.
From a pedagogy perspective, the course materials / textbooks haven't really caught up yet. Also, the project I was referring to was in an Architecture class; I would contend that the underlying concepts of how a pipeline works can be taught pretty much any architecture. MIPS is easy to understand, which makes it well suited for teaching.
That said, at my university, we are slowly transitioning to RISC-V, so hopefully within a few years it will have propagated to all of the courses.
As thethirdone said in his comment, the official specification is the most important resource.
The actual body of the simulator is mostly going to be a lot of lookup tables. You'll probably have a struct or class that stores the state of the CPU at a specific instant in time. Your main loop will be calling a next_state() function on that object. For your sanity, I would highly suggest making your state object immutable.
I have found breaking out the ALU, instruction decoder, and control logic into separate functions is a good way to split things apart.
If you want something more "real", MIPS and RISC-V are also not too hard, if you just do a subset of the instruction set and not the whole thing. You can skip most of the instructions that deal in bytes and half-words. It's also easier to implement main memory as being word-addressable only (but this can introduce incompatibilities with real assembler programs).
I wrote a cycle-accurate, pipeline simulator for MIPS for a course, which totaled only about 1200 SLOC. If you didn't need to simulate all the pipeline registers (you probably don't) and use a higher level language, this is probably a <750SLOC project.