News for hackers. Stuff that matters.

diocles

Re:I didn't write any JavaScript, and other shortcuts on Wednesday August 23, 2023 @04:01AM (#37233082)
Support looks pretty reasonable (works for 95% of global users) with some caveats around Safari:

https://caniuse.com/input-datetime

Re:The beauty of CGI and simple design on Saturday January 07, 2023 @08:14AM (#34287704)
(Not the parent but) one cool CGI-specific problem that always comes to mind is HTTPoxy:

https://www.ionos.co.uk/digitalguide/server/configuration/ht...

You could write this off as a library implementation problem, but it comes about because of unfortunate mapping of HTTP parameters to well-known environment variables in CGI, and has tripped up multiple library authors.

Re:Making a Website Under 1kB on Friday September 09, 2022 @06:54PM (#32785859)
I believe the parent comment was thinking of 1 round trip time.

Typically the TCP initial congestion window size is set to 10 packets (RFC 6928), hence ten packets can be sent by the server before waiting for an ACK from the client.

So under 15kB or so (minus TLS certs and the like) website loading has the minimum latency possible given any other network factors.

Re:Ask HN: Dependency Graphs for Cloud Services? on Saturday December 04, 2021 @02:09PM (#29443428)
For GCP you can enumerate and graph the publicly visible dependencies as per this blog post:

https://binx.io/blog/2020/10/03/how-to-find-google-cloud-pla...

However, that does not take account of GCP services being implemented behind the scenes using other GCP technologies in Google-managed projects - e.g. Cloud SQL uses Compute Engine and GCR (search "speckle umbrella"). Cloud Functions relies on Cloud Build to compile the function into a container. AI Platform Training uses a GKE cluster internally.

You can often get hints about these things from the VPC-SC documentation, which explains on a per-service basis which APIs need to be enabled to protect the perimeter:

https://cloud.google.com/vpc-service-controls/docs/supported...

Re:Ask HN: Books for Effective Communication on Saturday June 05, 2021 @05:55PM (#27408744)
"The Pyramid Principle: Logic in Writing and Thinking" by Barbara Minto.

This approach is taught at consultancy firms to help structure clear written business communication, especially if your audience includes time-poor senior executives.

Re:Perl as PID 1 under Docker on Sunday September 03, 2017 @04:35AM (#15160330)
OP here - thanks for that! This blog post represents my slow realisation that PID 1 is even more special than I thought, and the fairly common pattern of running applications without an init system is quite broken.
Re:Scientist: Measure Twice, Cut Over Once on Wednesday February 03, 2016 @05:39PM (#11030448)
I've been thinking about the naming of this library, and I don't think "science" is a good metaphor for what it does.

You can only test hypotheses of the form "A is exactly like B" - no bug fixes are allowed, because they will show up as differences.

So a more accurate (but less cool) name might be "Refactoring" - you assert that all your tests still pass, where your tests are your production data.

Re:MPs win surveillance powers legal challenge on Friday July 17, 2015 @07:39AM (#9902232)
The ruling itself is available - it's quite a long read:

https://www.judiciary.gov.uk/judgments/david-davis-and-other...

Re:The joy of Perl on Tuesday March 20, 2012 @07:06AM (#3728672)
I suspect it's also partly an artifact of the article being from 1998. :)
Re:Show HN: Password validity hinting on Saturday March 10, 2012 @06:04PM (#3688981)
Just for fun, I found a hash collision (hardly surprising on an 8-bit hash):

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

Copying/pasting the above password doesn't immediately get you the full square - something to do with the security provisions mentioned later in the article. Deleting a character and re-typing it works, though.

Is the complex pattern really necessary for this sort of thing to work? If the password doesn't match, why not just show a big red cross (or other form validation error)?

Taking the idea to the next level, why not just auto-submit the form when there's a good likelihood of a match? (Apart from likely breaking user expectations, and the possibility of some unlucky users having a hash collision halfway through their password.)

Re:I built this 'HN inspired' site. What do you think? on Saturday February 12, 2011 @09:46AM (#2210075)
The first thing I spotted was that full domains weren't showing next to the links, so for example, story 3 is currently:

  Hosni Mubarak has resigned (co.uk)
Showing just the last two sections of the domain is clearly unexpected behaviour. :) The intention is clearly "TLD plus one more section", but not all TLDs are as short as ".com".

This reminds me of the difficulties with cookie domain validation - Mozilla actually contains a hardcoded list of top-level domains: https://wiki.mozilla.org/Public_Suffix_List

So you could either copy that, or just show the domain in full.