Hacker Newsnew | past | comments | ask | show | jobs | submit | pekim's commentslogin

Inserting elements in to a slice can be done quite easily since the introduction of the slices package to the standard library.

https://pkg.go.dev/slices#Insert


You shouldn’t need a library to do this simple operation.

I’m guessing the go language design went too far into “simplicity” at the expense of reasonableness.

For example, we can make a “simpler” language by not supporting multiplication, just use addition and write your own!


The operation is simple in concept, but can be costly from a compute standpoint when n is large. Multiplication has predicable performance. Insert does not. It being a function indicates that it is doing a lot of things and thus offers pause to make sure that the operation is acceptably within your operational bounds.

It could have been a builtin function, I suppose, but why not place it in the standard library? It's not a foundational operation. If you look at the implementation, you'll notice it simply rolls up several foundation operations into one function. That is exactly the kind of thing you'd expect to find in a standard library.


I'm in the UK too. So I read the article courtesy of archive.is.

https://archive.is/X33oQ


Darts might not be considered a sport, but the British Darts Organisation [1] and the Professional Darts Corporation [2] co-existed (somewhat acrimoniously) for nearly 30 years.

[1] https://en.wikipedia.org/wiki/British_Darts_Organisation (BDO)

[2] https://en.wikipedia.org/wiki/Professional_Darts_Corporation (PDC)


> and a fingerprint sensor to identify who’s using the toilet

So it sounds like you would only need one camera for multiple people using the same toilet.


thanks i missed it. eseentially you have to put your finger on a shared device in the bathroom everything time you use the loo.


You already do that assuming that you are flushing.


Touche


So if I'm understanding it correctly, it applies an xor operation on the pairs of cells. For example, click column A then column B. For each of the pairs of cells in the two columns, it performs B = A xor B.


As the animation loops it uses the same set of images over again. But as they all have a Cache-Control header with a value of "public, max-age=0, must-revalidate" the browser makes another request for every one of the images, every loop of the animation. It results in transfer of something of the order of 0.6MB/sec, with no end.


How do we know the frames aren't generated and streamed on-the-fly from mocap on a real live eagle?


The page's html and css are reasonably small, 3.3kB and 1.5kB. There are three fonts, totalling about 51kB. So altogether about 56kB.

But then somewhat spoiling the page's nice light weight is a 576kB favicon.


I suspect that it is related to the M&S and Co-op attacks. https://www.bbc.co.uk/news/articles/cwykgrv374eo


I do https://wordnerd.co/secretword/ most days. It has a similar interface to alphaguess, and I prefer both of them to midword's interface.


It appears to highlight the letters that your guesses have narrowed it down to. For example if you had narrowed it down to after 'sudden' and before 'super', it would highlight 'su'.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: