frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

Fast

https://www.catherinejue.com/fast
312•gaplong•3h ago•90 comments

Optician Sans – A free font based on historical eye charts and optotypes

https://optician-sans.com/
112•exvi•4h ago•20 comments

Launch HN: Lucidic (YC W25) – Debug, test, and evaluate AI agents in production

72•AbhinavX•4h ago•18 comments

Emacs: The macOS Bug

https://xlii.space/eng/emacs-the-macos-bug/
45•xlii•2h ago•23 comments

Sleep all comes down to the mitochondria

https://www.science.org/content/blog-post/it-all-comes-down-mitochondria
477•A_D_E_P_T•11h ago•239 comments

Most Illinois farmland is not owned by farmers

https://www.chicagotribune.com/2025/06/01/illinois-farming-ownership-climate-change/
117•NaOH•2h ago•127 comments

Crush: Glamourous AI coding agent for your favourite terminal

https://github.com/charmbracelet/crush
257•nateb2022•4h ago•149 comments

Problem Solving Is Often a Matter of Cooking Up an Appropriate Markov Chain

https://www.jstor.org/stable/41548580
165•Alifatisk•7h ago•47 comments

Our $100M Series B

https://oxide.computer/blog/our-100m-series-b
546•spatulon•7h ago•363 comments

Every champion needs a rival

https://tombrady.com/posts/every-champion-needs-a-rival
29•pbardea•2h ago•30 comments

Critical Vulnerability in AI Vibe Coding platform Base44

https://www.wiz.io/blog/critical-vulnerability-base44
52•waldopat•4h ago•31 comments

The hype is the product

https://rys.io/en/180.html
81•lr0•2h ago•27 comments

Artie (YC S23) Is Hiring Founding AEs

https://www.ycombinator.com/companies/artie/jobs/CfSrcAH-founding-ae
1•j-cheong•3h ago

Ultra-Rapid Vision in Birds

https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0151099
27•downboots•3d ago•2 comments

The Preserving Machine by Philip K. Dick (1953)

https://archive.org/details/Fantasy_Science_Fiction_v004n06_1953-06
13•akkartik•1h ago•2 comments

A short post on short trains

https://shakeddown.substack.com/p/a-short-post-on-short-trains
6•surprisetalk•6h ago•1 comments

Writing memory efficient C structs

https://tomscheers.github.io/2025/07/29/writing-memory-efficient-structs-post.html
89•aragonite•6h ago•37 comments

Try the Mosquito Bucket of Death

https://www.energyvanguard.com/blog/try-the-mosquito-bucket-of-death/
280•almuhalil•7h ago•235 comments

Polarizing Parsers

https://flak.tedunangst.com/post/polarizing-parsers
16•upofadown•2h ago•1 comments

Traccar: an open source GPS tracking system

https://github.com/traccar/traccar
9•saikatsg•3d ago•4 comments

.NET 10 Preview 6 brings JIT improvements, one-shot tool execution

https://www.infoworld.com/article/4023654/net-10-preview-6-brings-jit-improvements-one-shot-tool-execution.html
131•breve•3d ago•124 comments

From XML to JSON to CBOR

https://cborbook.com/introduction/from_xml_to_json_to_cbor.html
55•GarethX•9h ago•62 comments

I launched 17 side projects. Result? I'm rich in expired domains

105•cesargstn•7h ago•80 comments

The HTML Hobbyist

https://www.htmlhobbyist.com/
186•janandonly•8h ago•99 comments

Australia widens teen social media ban to YouTube, scraps exemption

https://www.reuters.com/legal/litigation/australia-widens-teen-social-media-ban-youtube-scraps-exemption-2025-07-29/
47•Brajeshwar•3h ago•72 comments

Words about Arrays and Tables

https://buttondown.com/hillelwayne/archive/2000-words-about-arrays-and-tables/
47•todsacerdoti•5h ago•19 comments

Scammers unleash flood of online gaming sites

https://krebsonsecurity.com/2025/07/scammers-unleash-flood-of-slick-online-gaming-sites/
35•todsacerdoti•1h ago•26 comments

Drawing for the New Yorker

https://lizadonnelly.substack.com/p/drawing-for-the-new-yorker
13•herbertl•2h ago•2 comments

Maintaining weight loss

https://macrofactorapp.com/maintain-weight-loss/
56•MattSayar•2h ago•52 comments

A Python dict that can report which keys you did not use

https://www.peterbe.com/plog/a-python-dict-that-can-report-which-keys-you-did-not-use
58•gilad•3d ago•34 comments
Open in hackernews

Show HN: Online Ruler – Measuring in inches/centimeters

https://anruler.com/
83•artiomyak•3d ago

Comments

schoen•3d ago
It's really clever, but the screen detection is overconfident; it gave me the green "calibrated" box while guessing a completely wrong display size for my laptop.
artiomyak•3d ago
What is your laptop ?
schoen•3d ago
ThinkPad X1 Carbon.
artiomyak•2d ago
I see the issue, will fix it :)
gus_massa•2d ago
The automatic calibration was like 10% smaller than the real size and I used the credit card method [1] It need to show the "crop lines, no bleed" lines to make the comparison easier https://toastdesignservices.co.uk/resources/what-crop-marks-...

I used something like this before to adjust the zoom in Word or Google Docs with the real size on screen. I prefer to overlap a A4 sheet on the screen. It's semitransparent, so it's easier to see the calibration. Also I'd like to use a transparent rules on the screen and overlap it over the virtual rule for calibration.

[1] For some stupid reason, it sound scary

artiomyak•2d ago
will adjust it thx
rahulbisht•16h ago
The idea is great especially the popup scale.

Issues I faced: I use 27" Qhd monitor at 125% scale. The ruler showed 48cm width intially but when I shifted to 100% scale it became 60cm. If I shift to FHD, it goes to 36cm. I thought an actual size ruler will maintain width. Let me know if I am not using it correctly.

artiomyak•11h ago
I will fix it, thanks to all feedback
senectus1•16h ago
haha it doesnt like a VM in a citrix session
mkl•16h ago
Diagonal measurements aren't accurate with screens with rounded corners. I suggest adding a width-and-height calibration method. Calibration with a ruler would be good too; sit the ruler on the screen and zoom/pan(/rotate?) with multi-touch.
artiomyak•11h ago
Adding it, will fix
SequoiaHope•16h ago
It guessed my phone wrong. It thought iPhone 11 Pro Max but I have the 12 Pro Max (I just double checked in phone settings).
artiomyak•11h ago
Will fix it
tiffanyh•16h ago
Cool idea and I can see myself using this.

My iPhone 14 Pro was incorrectly identified as an iPhone 11 though.

Maybe it doesn’t matter since both have the same screen size, but it can be confusing since the wrong model identified even if it’s the same size.

https://www.apple.com/au/iphone/compare/?modelList=iphone-11...

artiomyak•11h ago
Will fix it :)
LukeShu•15h ago
Fascinating.

My setup: Firefox on X11 on a ThinkPad E15 Gen 2, with X11 misconfigured such that it is 96 DPI instead of the physically-correct 144 DPI.

On initial load, it has the green calibrated box saying "Detected: 24″ FHD Monitor (Auto-calibrated)", and my credit card measures as 131mm. This more-or-less the error that I'd expect given my misconfiguration: 131mm/85.6mm =~ 1.53 ; 144dpi/96dpi = 1.5. (Given those numbers, I figure it should be closer to 23" than 24", but whatever.)

But if I tell it "Standard Laptop", then my credit card measures as 97mm. (97mm/85.6mm =~ 1.13). I can't guess how that number is being arrived at. IME lots of X11 users will have their DPI misconfigured as either 96 DPI or (less likely) 192 DPI, but also lots of non-Apple laptops will have a pixel density of 40%-65% more than 96 DPI (on the rationale that lots misconfigured-as- or hardcoded-as- 96 DPI is common, that things designed to look good at 96 DPI assume a desktop monitor about 28" from your face (CSS3 defines device-independent pixels as such), but laptop use puts the screen 17"-20" from your face; and 28in/20in gives us a factor of 1.4 and 28in/17in gives us a factor of 1.65. But none of these numbers give me the factor of 1.13 that you show me. A good mystery!

johnisgood•12h ago
Take a look at https://anruler.com/js/ruler.js, specifically from the autoDetectDevice function.
jasonthorsness•15h ago
My iPhone 13 Pro is incorrectly identified as an iPhone 14
artiomyak•11h ago
Yeah I work to fix it
turtlebits•15h ago
FYI, the calibration modal is unreadable in dark mode.
artiomyak•11h ago
Fixing it :)
Zenst•15h ago
Detected: 14″ FHD @ 125% DPI (Auto-calibrated)

Inches are 2.2" per inch and CM are also over 2 CM in length, almost an inch, just short.

But hey, even CMs are wrong and wonderfully explained in this short - enjoy https://www.youtube.com/shorts/Z2LLcVM2ih4

ildon•15h ago
Looks nice, but on a Google pixel 6 I get

> Unknown device. Using default 96 PPI. Calibrate for better accuracy.

artiomyak•11h ago
Will fix
cwnyth•15h ago
It didn't recognize my Lenovo IdeaPad running Fedora.
johnisgood•13h ago
So, how does it attempt to identify the device? It did not recognize my device either, which could be due to my anti-fingerprint extensions or something else.

Edit: see https://anruler.com/js/ruler.js.

artiomyak•11h ago
I'll fix all this issues
johnisgood•11h ago
The https://amiunique.org/ website can still gather a lot of relevant information accurately (with JavaScript enabled, of course), so you might want to check their methods.
tzs•15h ago
The calibration with a credit card would I think be easier if one corner of the calibration rectangle was in a fixed position, so moving the slider would only change the other three corners. The fixed rectangle should probably be the one on the bottom left.
artiomyak•11h ago
Working on a fix
Valgrim•7h ago
Also my recommendation: -Make the card vertical instead of horizontal (phones are held vertically) -Add a +/- bottom on each end of the slider for fine tuning the ppi by 0.1 increment or lower, -Allow to manually change the value in the field
gnarlouse•14h ago
Petition to change the foot to be the distance light travels in one nanosecond
_kb•11h ago
That measure is a ‘Hopper’: https://americanhistory.si.edu/collections/object/nmah_69246...
madcaptenor•5h ago
At the same time, the meter should be redefined so the speed of light is 300000 km/s. This would have the side effect of making the inch exactly 2.5 cm.
IcyWindows•5h ago
I've been calling that a "metric foot" :)
Placoplatr•13h ago
Nice app! My S10e was detected as a Galaxy Note 10.
artiomyak•11h ago
thanks to all this replay I can fix everything
netfortius•13h ago
https://m.youtube.com/watch?v=JYqfVE-fykk&t=1m41s
wojtek1942•13h ago
Cool! Even though, my iPhone 15 Pro was misidentified as iPhone 16.
artiomyak•11h ago
:) Will fix it
krige•13h ago
Tried a ruler and a measuring tape with my desktop LCD display it was off by 2/30 in both cases, in the same direction. Tried phone - was off by 8/20.

Nope, thanks.

willtemperley•13h ago
Cool. This is actually really useful - I'm building a document editor at the moment. I think having the option for real-world size would be a nice feature.

I've been busy measuring different document editors with a screenshot of the ruler and it seems they all have different interpretations of A4 width (210 mm) at 100% on a Macbook Pro 16in:

- Apple Pages shows about 118mm

- Google docs shows 160mm in Safari

- Linearity Curve gives about 200mm

yapyap•12h ago
it detects the 13 pro as a 14, probably going off of Axx chip
artiomyak•11h ago
Fixing it
HPsquared•12h ago
Don't devices/browsers report the display PPI somehow? If not, that's such a gap in the web standards.
artiomyak•11h ago
No, thx to privacy
HPsquared•11h ago
I mean there are already APIs for location, file access, camera/mic, and more...
rchard2scout•12h ago
This seems really inaccurate to me. I had to manually enter my device (Galaxy A55 5G), and then I held a tape measure next to my phone. What the site claimed was 16cm was actually only 14.3cm.
smarx007•12h ago
A55 5G has a 6.6 inch screen. Also had to enter manually, but it was pretty accurate, fraction of a mm off on 12cm.
artiomyak•11h ago
I'm currently working on fix of all this issues :)
kasbah•12h ago
Is it not possible to use `window.devicePixelRatio` instead of calibration?

https://developer.mozilla.org/en-US/docs/Web/API/Window/devi...

brainwad•11h ago
Not really. All major browsers just use the value the OS gives them, which is usually rounded to 0.5 or 0.25, which helps keep integer CSS px values an integer number of device pixels. So you could be off as much as 12% if you are on a device that rounded down from 1.12 to 1.0.

Also, even if they didn't, there's no standard for what the correct DPI should be for a device; it theoretically should depend on viewing distance, but it's impractical to constantly change the screen DPI depending on how far away the user's eyes are :)

OP could, however, use a better default than 96 DPI for mobile devices. Most are targeting ~160-ish.

chrismorgan•11h ago
> All major browsers round this to 0.5 or 0.25, which helps keep integer CSS px values an integer number of device pixels.

This is completely false. No browser that I know of does any such thing, nor would it make any sense to do so (nor would it achieve the goal you specify to any meaningful extent).

The closest thing that does happen is that browsers use integer fractions of pixels as their basic layout unit: Firefox and its kin sixtieths, Chrome and its kin sixty-fourths.

But the rest of your answer is correct; and to add a proper citation: “the reference pixel is the visual angle of one pixel on a device with a device pixel density of 96dpi and a distance from the reader of an arm’s length” <https://drafts.csswg.org/css-values-4/#reference-pixel>.

brainwad•11h ago
Maybe it's better to say that browsers just take what the OS tells them, rather than actually deriving a device pixel ratio from first principles according to the CSS spec. Because, yeah, there's some weird devices with DPRs like 2.625, though _most_ are multiples of 0.25: https://yesviz.com/viewport/. But note how the same DPR can give a varying CSS PPI, which makes using it useless for this purpose.
chrismorgan•11h ago
“Taking whatever the OS tells them” is rather different!

It also gets multiplied by the browser’s zoom, which in both Firefox and Chrome include values like 80%, 90% and 110%.

So for me on HN at 120% on my 1.5× laptop display, devicePixelRatio is… 1.8181818181818181. Huh. Wonder why it’s not 1.8. ¯\_(ツ)_/¯

brainwad•10h ago
1.8 probably would produce a non-integer number of CSS pixels. The browser needs (wants?) to pick a number that divides both the width and height without remainders. For 1920x1080, 1.8 doesn't (works for the height, but not the width) but 1.8̅1̅ does.
chrismorgan•9h ago
Although that has a plausible sound, I don’t think it’s it: the window size is what matters, not the screen size, and you can’t guarantee any sort of divisibility for either anyway. For example, my screen is actually 2560×1440, which is 1706⅔×960 in CSS pixels given the real devicePixelRatio of 1.5. The established rule when you need an integer is, at least on Wayland, to round things down to the nearest integer; I’m not certain about other platforms. Certainly everything that deals in integer pixels sees 1706×960.

Chromium doesn’t exhibit this behaviour; it’s just Firefox on some of its zoom levels. And when I saw 90% being 0.9090909090909091 (90⁄99 instead of 90⁄100) it triggered a memory of observing this five or seven years ago on my Surface Book (3000×2000 @ 2×). I think it is just that they’ve chosen to display different, slightly inaccurate percentage labels.

brainwad•12h ago
96dpi seems like a bad default for mobile devices. The CSS spec says the reference pixel (https://www.w3.org/TR/css-values-3/#reference-pixel) should be 96dpi at ~28" viewing distance. But handheld devices are presumed to not be seen that far away and so are built with a DPI closer to 160 (after dividing by the device pixel ratio).
Gys•2h ago
I save a screenshot for my future reference, is perfect. Maybe a suggestion to include in your website. The screenshot also shows the domain so a good way (for me) to find you again if needed
nektro•8m ago
picks up my macbook 14" doesn't detect framework 13