Hacker News new | past | comments | ask | show | jobs | submit | cwojno's comments login

Having used it extensively, it's actually quite nice.


I see what you did there ;)


So... wait... YT is deleting all his comments... except the one that criticized the Dislike button? Wouldn't they just delete that comment?

Something is amiss here.


They probably use a different mechanism to suppress that comment as to reduce the possibility of users finding out that their comments are being deleted. Or at least reduce the impact of that particular user if they are going to keep posting similar comments multiple times.


Google seems to also have a heavy recency bias.

I've tried to search for news articles that were even a month old and have had trouble locating links to stories I know happened. I don't know any tricks to working around this. And if I don't recall specifically when the article came out (say, somewhere around 6 months ago), I'll usually give up.

Any tips on finding "historical" results?


I've gotten so pissed off about this that I compulsively save to disk every interesting article I find.


I agree. I hate that any search I do will show CNN articles from this week. Dude google, if I wanted recent news I would use the news tab.


Search tools -> Any time -> Custom range


Nice. Last I looked into this, I couldn't select a custom range, it was limited to set times like, last 6 months or something. Thanks


search web history that Google has,

Use a bookmark tool such as diigo.


They use dark patterns to hide the web version so that you download the client. I fear they'll yank the plug on the web version one of these days...


and that will be the last Zoom meeting I ever attend.


Having been looking for a way to add comments to a static site for a while now, this is very cool and should get more love. Thanks for the service and the post!


From the title, I thought this was a new consensus algorithm...


This is fantastic, well done. (emotional appeal)


Fantastic research and write-up


I agree with the author that Go is not as easy as Python or Ruby. However, the first example given is bad.

Running delete on a slice is the same as trying to delete an element of an array. It's the wrong data structure if you need that type of access pattern. That's why it's hard. You can cut a tree down with a hammer, but it's going to take a while and you're going to have some blisters.

Go has built-in linked lists. https://golang.org/pkg/container/list/ and I will agree, they're not as easy to use as other languages due to the lack of generics in go, at present. Using the list.* package requires type conversion to evaluate and pull values out of the structure.

I think it's fair to say that Go needs to do a better job explaining the list package or possibly including it in the "Tour of Go" guide. That might help avoid these misconceptions in the future.


I feel like the majority of the time you just have arrays or slices of a manageable size, say <= 25 elements, and you just want to delete an element from it. You don't care about performance because it'll be fast regardless and surely not the bottleneck of your program.

In my experience with Go, a lot of basic functionality is missing and requires you to write your own utility functions. And some things you would expect like mySlice.append(elem) are instead written mySlice = append(mySlice, elem) which isn't as elegant. Plus you have to remember it's not just append(mySlice, elem)

If there's a handful of open source utility function libraries, that will split the Go developer base, kind of like how you used to have both jQuery, Prototype.js, underscore.js and others in Javascript. They should have just standardized all the common functionality you'd want and in an intuitive way.


If the array fits in the cache, deleting from the middle of an array and copying all the subsequent elements one to the left is actually faster than a linked list.

And most arrays fit in the cache.


I don't think the author was concerned with performance. I was providing the list.* type suggestion to make it easier to delete elements syntactically.

However, you're likely right for slices with len < 500 or so due to garbage collector churn on linked lists.


> Running delete on a slice is the same as trying to delete an element of an array. It's the wrong data structure if you need that type of access pattern.

If you keep deleting elements from arrays then maybe, but if you do so once in awhile the cache-friendliness and limited allocations overhead of an array will most likely come out ahead. Especially if you also want arbitrary access.

Removing an element from a linked list is cheap if you’re already at that element (assuming the node itself is exposed), but most operations are way costlier.


Delete on a not-too-long arrays is pretty cheap. Probably even better than iterating over a linked list, but of course it depends on the exact application.


Consider applying for YC's W25 batch! Applications are open till Nov 12.

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

Search: