News for hackers. Stuff that matters.

1wd

Fun! Tested on Android in Italy. So far it didn't really line up vertically. Does it know I'm not at sea level?
Re:A love letter to the CSV format (2024) on Wednesday September 10, 2025 @07:07AM (#45195991)
Only if the Windows Regional Settings List Separators happens to be "comma", which is not the case in most of Europe (even in regions that use the decimal point) so only CSV files with SEP=, as the first line work reliably with Excel.
Re:Firefox Moves to GitHub on Tuesday May 13, 2025 @05:18AM (#43971061)
heptapod is GitLab with Mercurial support.
Oberon?
Re:Launch HN: Silurian (YC S24) – Simulate the Earth on Monday September 16, 2024 @11:58AM (#41557420)
Does anyone predict economy/population/... by simulating individual people based on real census information? Monte carlo simulation of major events (births, death, ...) based on known statistics based on age, economic background, location, education, profession, etc.? It seems there are not that many people that this would be computationally infeasible, and states and companies have plenty of data to feed into such systems. Is it not needed because other alternatives give better results, or is it already being done?
Re:The Third Atomic Bomb on Friday August 09, 2024 @03:17AM (#41199493)
Feynman has an interesting story about critical mass:

> Los Alamos was going to make the bomb, but at Oak Ridge they were trying to separate the isotopes of uranium ... he saw them wheeling a tank carboy of water, green water - which is uranium nitrate solution. He says, “Uh, you're going to handle it like that when it's purified too? Is that what you're going to do?" They said, “Sure -- why not?" "Won't it explode?" he says. Huh! Explode?" ... he noticed certain boxes in big lots in a room, but he didn't notice a lot of boxes in another room on the other side of the same wall ... what you would have to do to fix this. It's rather easy. You put cadmium in solutions to absorb the neutrons in the water, and you separate the boxes so they are not too dense ...

https://calteches.library.caltech.edu/34/3/FeynmanLosAlamos....

Paper linked above https://peerj.com/articles/16349/ links to .wav sound files in the Data Availability section https://datadryad.org/stash/dataset/doi:10.5061/dryad.ht76hd... and 20 minute .mp4 files https://zenodo.org/records/8247515 (and R code in a PDF) and a "Timeline of Interaction" PDF. Seems that's the closest to a "transcript".
Re:Turrican 2 AGA – Released on Tuesday February 07, 2023 @01:23PM (#34696774)
Bionic Commando?
The quoted document has two similar sentences, one on page 3 includes Rust, one on page 5 does not:

> Examples of memory safe language include C#, Go, Java®, Ruby™, Rust®, and Swift®.

> Some examples of memory safe languages are C#, Go, Java, Ruby™, and Swift®.

https://media.defense.gov/2022/Nov/10/2003112742/-1/-1/0/CSI...

Stroustrup quotes the second one without Rust.

Re:Single-file scripts that download their dependencies on Sunday January 15, 2023 @10:19AM (#34389996)
pipx might get this ability: https://github.com/pypa/pipx/pull/916
Re:The Horrors of the Alpha Channel [video] on Monday October 24, 2022 @07:16AM (#33315225)
TIFF has an associated alpha metadata tag to indicate if the alpha channel is premultiplied or not. https://www.awaresystems.be/imaging/tiff/tifftags/extrasampl...

The tiffinfo command line tools shows it as: Extra Samples: 1<unassoc-alpha> or: Extra Samples: 1<assoc-alpha>

The Python tifffile library changed the default at some point, but it can be set explicitly: tifffile.imwrite("example.tiff", data, extrasamples=tifffile.TIFF.EXTRASAMPLE.ASSOCALPHA)

Re:Advice for the next dozen Rust GUIs on Saturday July 16, 2022 @01:31AM (#32115475)
WPF is now open source (MIT licensed [1]), and its XAML control templates provide _as data_ a full declarative description of how a native Windows control is supposed to look like (in multiple Windows themes like Aero for Win7, Aero2 for Win10, Luna + Royale for WinXP, and Classic for Win95 look and feel [2]).

This includes everything like the exact colors and gradient stops and animation timing and vector shapes and accessibility behavior etc. of buttons and scrollbars and everything. Example: [3]

I wonder what one could learn / achieve trying to "port WPF to rust" / implement a XAML control template renderer in Rust. If you can "simply" parse and interpret those XAML files do you instantly get a native-like GUI that supports the exact look and feel of these different Windows themes? (on any OS!)

Somehow I think it is not realized how amazing that is!

[1] https://github.com/dotnet/wpf/blob/main/LICENSE.TXT [2] https://github.com/dotnet/wpf/tree/main/src/Microsoft.DotNet... [3] https://github.com/dotnet/wpf/blob/main/src/Microsoft.DotNet...

Re:Decompiler Explorer on Wednesday July 13, 2022 @01:11PM (#32085638)
Thanks. I had tried Reko and your description matches my impression.

I hoped to try hunt down the DOS Tetris easter egg described on the original authors website. https://vadim.oversigma.com/Tetris.htm

The executable is linked in the image.

I managed to decipher some functions (video memory pointers were actually kind of helpful) but didn't get far.

Re:Decompiler Explorer on Wednesday July 13, 2022 @06:03AM (#32080699)
Are there any decompilers for old x86 DOS com files?
"EGA to VGA transformation" like it was done for games like Indy3 would be nice. http://www.superrune.com/tutorials/indy3_ega.php (Even though some people still prefer the EGA version.)
Re:Supporting half-precision floats is annoying on Friday August 06, 2021 @10:49AM (#28087918)
What are the reasons for changing the allocation of bits in bf16 vs. f16? Why are there no (few?) similar alternative allocation schemes for f32 and f64? Was IEEE's choice perfect for f32 / f64? How did they know? Why not for f16?

Does any hardware offer "configurable" bit allocation like f16[e=4,m=11]?

Re:Any Encoding, Ever – ztd.text and Unicode for C++ on Thursday July 01, 2021 @01:48AM (#27696610)
Python 3 by default still opens text files using the legacy locale encoding.
Re:Indiana Jones and the Last Crusade EGA/VGA Comparison on Wednesday March 17, 2021 @07:14PM (#26497966)
Exactly right. I specifically remember someone excitedly telling me at the time that the VGA Indiana Jones "is completely photo-realistic!"
It still does not parse all ISO 8601 format strings: "ISO 8601, RFC 3339 and datetime.isoformat() are three slightly different and in some senses incompatible datetime serialization formats" https://bugs.python.org/issue35829 For example it rejects typical strings produced by Javascript using Z instead of +00:00 as the timezone suffix.
Re:Show HN: 3D Meshes of Signed Distance Functions in Python on Wednesday February 17, 2021 @01:57AM (#26163510)
Nice! Do you have any plans to publish to PyPI? Is there an API to access numpy array containing the evaluated SDF volume?
Seems to be available on Amazon. (And worth watching!)
Re:Oberon OS Walkthrough (2009) on Friday January 15, 2021 @02:07AM (#25787892)
The initial Oberon OS is indeed from 1987, but there are many Oberons. The original Oberon GUI was the everything-is-executable-text one, not the ZUI.

The ZUI was part of Thomas M. Frey's work for his dissertation "Bluebottle : A Thread-safe Multimedia and GUI Framework for Active Oberon" [2] (Bluebottle OS) submitted in 2005.

This was built on top of Pieter J. Muller's work for his dissertation "The Active Object System" [1] (AOS) submitted in 2002.

There are many more ETH (PhD and student) projects based on Oberon before and after (ARM Oberon, WinOberon, UnixOberon, Oberon.NET, ...) mainly in Jürg Gutknecht's group.

[1] https://www.research-collection.ethz.ch/handle/20.500.11850/... [2] https://www.research-collection.ethz.ch/handle/20.500.11850/...

Re:If-then-else had to be invented on Monday December 14, 2020 @01:23AM (#25414139)
Furthermore: "otherwise" translates to "andernfalls", which is basically "im anderen Fall" i.e. "in the other case".
Re:Str: Yet another string library for C language on Thursday November 26, 2020 @01:41AM (#25217478)
Function names starting with "str" followed by a lowercase letter are reserved. So technically "str" itself and "str_" are not.
Re:Attempts to make Python fast on Wednesday October 21, 2020 @11:09AM (#24848565)
I did a similar test some years ago: https://imgur.com/a/jQUav#xVgi2ZA (Have you tried plotting some data?) I found some interesting and perhaps surprising results. (But I also acknowledge that it was very far from real-world code, any conclusions drawn from that were only for fun.)

Older »