Compiling And Running Turbo Pascal In The Browser

When a friend of [Lawrence Kesteloot] found a stack of 3.5″ floppy disks, they found that it contained Turbo Pascal code which the two of them had worked on back in the Summer of 1989. Amidst reminiscing about the High School days and watching movies on VHS, [Lawrence] sought a way to bring these graphical applications once more back to life. Not finding an easy way to compile Turbo Pascal code on Mac even back in 2013 when he started the project, he ended up writing a Turbo Pascal compiler in JavaScript, as any reasonable person would do in this situation.

SPIDER.PAS in its full glory. (Credit: Lawrence Kesteloot)
SPIDER.PAS in its full glory. (Credit: Lawrence Kesteloot)

As noted by [Lawrence], the compiler doesn’t implement the full Turbo Pascal 5.5 language, but only the subset that was required to compile and run these applications which they had found on the floppy disks. These include ROSE.PAS and SPIDER.PAS along with three others, and can also be found in the GitHub repository. As can be seen in the online version of the compiler, it captures the feel of programming Pascal in 1989 on the command line.

Naturally, the software situation has changed somewhat over the last decade. We’ve recently seen some promising multi-platform Pascal compilers, and of course you could even run Turbo Pascal in DOSBox or similar. That might make this project seem irrelevant, but being able to write and run Pascal applications in more ways and on more platforms is never a bad thing.

Still Up And Coming: Non-Planar FDM 3D Printing With 3 Or 6 Axes

Printing the non-planar PLA part on top of the non-planar side of the PETG part. (Credit: Michael Wüthrich)
Printing the non-planar PLA part on top of the non-planar side of the PETG part. (Credit: Michael Wüthrich)

Most of the time FDM 3D printing involves laying down layers of thermoplastics, but the layer lines also form the biggest weakness with parts produced this way. Being able to lay out the lines to follow the part’s contours can theoretically strengthen the part and save material in the process. Recently, [Michael Wüthrich] demonstrated an approach that uses a modified Prusa Mini FDM printer to first lay out a part in PETG using non-planar printing, after which this PETG part was used to print on top of in PLA, effectively using the PETG as a ‘printbed’ from which the PLA can be easily removed and leaving the PLA part as fully non-planar on both sides.

The modification to the Prusa Mini printer is covered on Printables along with the required parts. The main change is to give the nozzle as much clearance as possible, for which [Michael] uses the E3D Revo belt nozzle. This nozzle requires a custom holder for the Prusa Mini. After this the printer is ready for non-planar printing, but as [Michael] notes in the Twitter thread, he did not use a slicer for this, as none exists. Instead he used Matlab, a custom script and a lot of manual labor.

Continue reading “Still Up And Coming: Non-Planar FDM 3D Printing With 3 Or 6 Axes”

Mechanisms of pulse current charging for stabilizing the cycling performance of commercial NMC/graphite LIBs. (Credit: Jia Guo et al., 2024)

Why Pulse Current Charging Lithium-Ion Batteries Extends Their Useful Lifespan

For as much capacity lithium-ion batteries have, their useful lifespan is generally measured in the hundreds of cycles. This degradation is caused by the electrodes themselves degrading, including the graphite anode in certain battery configurations fracturing. For a few years it’s been known that pulsed current (PC) charging can prevent much of this damage compared to constant current (CC) charging. The mechanism behind this was the subject of a recent research article by [Jia Guo] and colleagues as published in Advanced Energy Materials.

Raman spectra of a) as-cycled and b) surface-removed graphite anodes aged under CC and Pulse-2000 charging. FE-SEM images of the cross-sections of graphite electrodes aged with CC (c,d) and Pulse-2000 (e,f) charging. d,f) are edge-magnified images of (c,e). g) shows the micrograph and O and C element mapping of the surface of CC-aged graphite electrode. TEM images of h) fresh, i) CC, and j) Pulse-2000 aged graphite anodes. (Credit: Jia Guo et al., 2024)
Raman spectra of a) as-cycled and b) surface-removed graphite anodes aged under CC and Pulse-2000 charging. FE-SEM images of the cross-sections of graphite electrodes aged with CC (c,d) and Pulse-2000 (e,f) charging. d,f) are edge-magnified images of (c,e). g) shows the micrograph and O and C element mapping of the surface of CC-aged graphite electrode. TEM images of h) fresh, i) CC, and j) Pulse-2000 aged graphite anodes. (Credit: Jia Guo et al., 2024)

The authors examined the damage to the electrodes after multiple CC and PC cycles using Raman and X-ray absorption spectroscopy along with lifecycle measurements for CC and PC charging at 100 Hz (Pulse-100) and 2 kHz (Pulse-2000). Matching the results from the lifecycle measurements, the electrodes in the Pulse-2000 sample were in a much better state, indicating that the mechanical stress from pulse current charging is far less than that from constant current charging. A higher frequency with the PC shows increased improvements, though as noted by the authors, it’s not known yet at which frequencies diminishing returns will be observed.

The use of PC vs CC is not a new thing, with the state-of-the-art in electric vehicle battery charging technology being covered in a 2020 review article by [Xinrong Huang] and colleagues as published in Energies. A big question with the many different EV PC charging modes is what the optimum charging method is to maximize the useful lifespan of the battery pack. This also applies to lithium-metal batteries, with a 2017 research article by [Zi Li] and colleagues in Science Advances providing a molecular basis for how PC charging suppresses the formation of dendrites .

What this demonstrates quite well is that the battery chemistry itself is an important part, but the way that the cells are charged and discharged can be just as influential, with the 2 kHz PC charging in the research by [Jia Guo] and colleagues demonstrating a doubling of its cycle life over CC charging. Considering the amount of Li-ion batteries being installed in everything from smartphones and toys to cars, having these last double as long would be very beneficial.

Thanks to [Thomas Yoon] for the tip.

Remembering Peter Higgs And The Gravity Of His Contributions To Physics

There are probably very few people on this globe who at some point in time haven’t heard the term ‘Higgs Boson’  zip past, along with the term ‘God Particle’. As during the 2010s the scientists at CERN were trying to find evidence for the existence of this scalar boson and with it evidence for the existence of the Higgs field that according to the Standard Model gives mass to gauge bosons like photons, this effort got communicated in the international media and elsewhere in a variety of ways.

Along with this media frenzy, the physicist after whom the Higgs boson was named also gained more fame, despite Peter Higgs already having been a well-known presence in the scientific community for decades by that time until his retirement in 1996. With Peter Higgs’ recent death after a brief illness at the age of 94, we are saying farewell to one of the big names in physics. Even if not a household name like Einstein and Stephen Hawking, the photogenic hunt for the Higgs boson ended up highlighting a story that began in the 1960s with a series of papers.

Continue reading “Remembering Peter Higgs And The Gravity Of His Contributions To Physics”

Porting Modern Windows Applications To Windows 95

Windows 95 was an amazing operating system that would forever transform the world of home computing, setting the standard for user interaction on a desktop and quite possibly was the OS which had the longest queue of people lining up on launch day to snag a boxed copy. This raises the question of why we still don’t write software for this amazing OS, because ignoring the minor quibbles of ‘security patches’ and ‘modern hardware compatibility’, it’s still has pretty much the same Win32 API as supported in Windows 11, plus it doesn’t even spy on you, or show you ads. This line of reasoning led [MattKC] recently to look at easy ways to port modern applications to Windows 95.

In the video, the available options are ticked off, starting with straight Win32 API. Of course, nobody writes for the Win32 API for fun or to improve their mental well-being, and frameworks like WxWidgets and QuteQt have dropped support for Windows 9x and generally anything pre-Win2k for years now. The easiest option therefore might be Microsoft’s .NET framework, which in its (still supported) 2.0 iteration actually supports Windows 98 SE, or basically within spitting distance of running it on the original Win95.

Continue reading “Porting Modern Windows Applications To Windows 95”

Beating IBM’s Eagle Quantum Processor On An Ising Model With A Classical Tensor Network

The central selling point of qubit-based quantum processors is that they can supposedly solve certain types of tasks much faster than a classical computer. This comes however with the major complication of quantum computing being ‘noisy’, i.e. affected by outside influences. That this shouldn’t be a hindrance was the point of an article published last year by IBM researchers where they demonstrated a speed-up of a Trotterized time evolution of a 2D transverse-field Ising model on an IBM Eagle 127-qubit quantum processor, even with the error rate of today’s noisy quantum processors. Now, however, [Joseph Tindall] and colleagues have demonstrated with a recently published paper in Physics that they can beat the IBM quantum processor with a classical processor.

In the IBM paper by [Yougseok Kim] and colleagues as published in Nature, the essential take is that despite fault-tolerance heuristics being required with noisy quantum computers, this does not mean that there are no applications for such flawed quantum systems in computing, especially when scaling and speeding up quantum processors. In this particular experiment it concerns an Ising model, a statistical mechanical model, which has many applications in physics, neuroscience, etc., based around phase transitions.

Unlike the simulation running on the IBM system, the classical simulation only has to run once to get accurate results, which along with other optimizations still gives classical systems the lead. Until we develop quantum processors with built-in error-tolerance, of course.

Cryo-EM: Freezing Time To Take Snapshots Of Myosin And Other Molecular Systems

Using technologies like electron microscopy (EM) it is possible to capture molecular mechanisms in great detail, but not when these mechanisms are currently moving. The field of cryomicroscopy circumvents this limitation by freezing said mechanism in place using cryogenic fluids. Although initially X-ray crystallography was commonly used, the much more versatile EM is now the standard approach in the form of cryo-EM, with recent advances giving us unprecedented looks at the mechanisms that quite literally make our bodies move.

Myosin-5 working stroke and walking on F-actin. (Credit: Klebl et al., 2024)
Myosin-5 working stroke and walking on F-actin. (Credit: Klebl et al., 2024)

The past years has seen many refinements in cryo-EM, with previously quite manual approaches shifting to microfluidics to increase the time resolution at which a molecular process could be frozen, enabling researchers to for example see the myosin motor proteins go through their motions one step at a time. Research articles on this were published previously, such as by [Ahmet Mentes] and colleagues in 2018 on myosin force sensing to adjust to dynamic loads. More recently, [David P. Klebl] and colleagues published a research article this year on the myosin-5 powerstroke through ATP hydrolysis, using a modified (slower) version of myosin-5. Even so, the freezing has to be done with millisecond accuracy to capture the myosin in the act of priming (pre-powerstroke).

The most amazing thing about cryo-EM is that it allows us to examine processes that used to be the subject of theory and speculation as we had no means to observe the motion and components involved directly. The more we can increase the time resolution on cryo-EM, the more details we can glimpse, whether it’s the functioning of myosins in muscle tissue or inside cells, the folding of proteins, or determining the proteins involved in a range of diseases, such as the role of TDP-43 in amytrophic lateral sclerosis (ALS) in a 2021 study by [Diana Arseni] and colleagues.

As our methods of freezing these biomolecular moments in time improve, so too will our ability to validate theory with observations. Some of these methods combine cryogenic freezing with laser pulses to alternately freeze and resume processes, allowing processes to be recorded in minute detail in sub-millisecond resolution. One big issue that remains yet is that although some of these researchers have even open sourced their cryo-EM methods, commercial vendors have not yet picked up this technology, limiting its reach as researchers have to cobble something together themselves.

Hopefully before long (time-resolved) cryo-EM will be as common as EM is today, to the point where even a hobby laboratory may have one lounging around.