News for hackers. Stuff that matters.

errnoh

Re:Go(lang): Robust generic functions on slices on Saturday February 24, 2024 @08:47AM (#39491449)
Ah, my bad for not reading the article before the comments :)

As that's the case it's indeed hard to defend it. Data structure-wise it still kind of makes sense since as you mentioned the slice metadata is changed, but it basically making the old slice invalid is rather annoying.

For the := example sure, it's a bit far fetched example and likely would not pass any code review, but there are cases where shadowing is indeed valid. So is the `s := slices.Compact(s)` in this example not working as expected then?

EDIT: looking at another reply to the parent the := being broken likely is trying to point that using := also modifies the slice and thus the original slice is broken when one tries to use it in the original scope. That's really bad practice, but true indeed.

Re:Go(lang): Robust generic functions on slices on Saturday February 24, 2024 @07:53AM (#39491152)
Possibly that's mostly out of familiarity with the language? The only thing in your example that does things in-place (and thus looks out-of-place) is Sort(), but that's the way I'd at least expect it to work? If you take that away from the list all of them behave similarly to each other and return the modified slice:

    slices.Compact(s)       // modified slice in the return value is ignored
    s  = slices.Compact(s)  // s now points to the new changed slice
    s := slices.Compact(s)  // s already exists, this is not valid Go syntax.
    slices.Delete(s, …)     // modified slice in the return value is ignored
    s = slices.Delete(s, …) // s now points to the new changed slice
No, that's wrong. Multiple news sites are getting that wrong but Apple announcement is very clear that the fee applies to even App Store:

> Core Technology Fee — iOS apps distributed from the App Store and/or an alternative app marketplace will pay €0.50 for each first annual install per year over a 1 million threshold.

source: https://www.apple.com/newsroom/2024/01/apple-announces-chang...

At least based on my observations it's been common practice in ML papers for some years already. Usually releasing Github hosted project page and a repository with the same information, then releasing the code on that repo afterwards at some point.

I don't feel that's an issue. A lot more people are able to see what's happening on the bleeding edge than if they'd just release the paper without accompanying demo page, and faster than if they'd wait for the code to be ready for release? Of course one can argue that "they should just release whatever code they have instantly", but that's their choice if they want to clean it up, remove secrets etc.

45it/s (0.1~s per image) on 7900XTX here, so it's still one magnitude faster on GPU with a lot higher power draw than the macs. Doing 10x slower with non-tethered is quite nice outcome.
Re:AMD May Get Across the CUDA Moat on Saturday October 07, 2023 @04:42AM (#37800102)
While I agree that it's much more effort to get things working on AMD cards than it is with Nvidia, I was a bit surprised to see this comment mention Whisper being an example of "5-10x as performant".

https://www.tomshardware.com/news/whisper-audio-transcriptio... is a good example of Nvidia having no excuses being double the price when it comes to Whisper inference, with 7900XTX being directly comparable with 4080, albeit with higher power draw. To be fair it's not using ROCm but Direct3D 11, but for performance/price arguments sake that detail is not relevant.

EDIT: Also using CTranslate2 as an example is not great as it's actually a good showcase why ROCm is so far behind CUDA: It's all about adapting the tech and getting the popular libraries to support it. Things usually get implemented in CUDA first and then would need additional effort to add ROCm support that projects with low amount of (possibly hobbyist) maintainers might not have available. There's even an issue in CTranslate2 where they clearly state no-one is working to get ROCm supported in the library. ( https://github.com/OpenNMT/CTranslate2/issues/1072#issuecomm... )

Re:The Linux Foundation has practically abandoned Linux on Tuesday October 03, 2023 @05:50AM (#37749756)
I'm not familiar with the author, but seems like they have quite identical post from 2021 as well: https://lunduke.substack.com/p/linux-foundation-spends-just-...
I was planning on mentioning Zoom as well. The Linux client especially is insanely bad, iirc it also drew itself on top of everything.

My suggestion on Linux at least is to use the web client. Just get the url, do a 's#/j/#/wc/join/#' to it and open it in browser of your choice. You'll need to copy the password manually, sometimes it might require captcha etc, but at least it's somewhat usable.

Re:What Does 1GB of Mobile Data Cost in Every Country? on Friday July 10, 2020 @05:21PM (#23796637)
Can't speak for everyone, but since pretty much everyone seems to have unlimited data and the speeds aren't that bad the consumer behavior probably doesn't change at all if you're on wifi or not.

That said, 35GB average still seems rather high. I'm interested how much I'm using, but I only have usage data from the past four months and those months aren't really that representative of what I would call normal use.

By using only basic functionality that's easy enough to remember I guess I'd go with something like

`echo -e "foo bar baz" | tr -s ' ' | rev | cut -d ' ' -f 1-2 | rev | awk '{print $2 " " $1}`

Everything except the awk part is something that I use all the time and is easy to type & remember.

To be honest I'd use `choose` if it was available everywhere, but for string manipulation I can't justify using nonstandard tools since they aren't always available.

Every now and then there are some new ones I actually start to use. For example `ripgrep` mostly replaced `grep -R` for me some time ago, a lot of it has to do with the fact that if `rg` is not found I can fallback to normal grep and get the same result, just a bit slower.

I guess my point is that while I do appreciate innovation & making better tooling, the hard part always is getting the tool where it's most needed.

Re:Hyperdrive v10 – a peer-to-peer filesystem on Thursday May 14, 2020 @01:25PM (#23182450)
Color me interested. I've been wanting to use IPFS for similar use case but there's always something that annoys me or documentation that's lacking.

While reading Hyperdrive/Hyperswarm docs I actually managed to find everything I wanted to know without much effort (most of all it seems like setting up this on private network should be doable)

Re:Coming to Chrome: a new way to use tabs on Thursday May 14, 2020 @02:50AM (#23176242)
Oh, there are kindred spirits here. I've recommended this on other tab-related discussions but Tab Stats is one of the few Firefox addons that have been worth using as a tab hoarder. Allows me to see which pages are open in multiple tabs and then deduplicate them if needed, or just looking at (or closing) open tabs based on domain.

(I'm not affiliated with the creator and it's not without its own annoyances, but still easily recommendable to anyone with thousands of tabs open)

Decided to try this out.

The instructions are mostly up-to-date, main thing that has changed seems to be that the multiple inboxes option is now under Settings->Inbox->Inbox type->Multiple Inboxes

I think my tabs mostly belong to one of two categories:

* Research about a subject (that I didn't close when I continued to the next one)

* "Oh that's interesting, I'll read it later"

I do remember that 10+ years ago I used to have a nice collection of bookmarks, each with relevant tags. Then one day I had to switch browsers due to performance issues, the new browser didn't support tags from the previous one so lost everything. Ended up just keeping tabs open after that and every now and then I just go through them until 500 or so remain.

For the "read it later" scenario I'm aware that there are a lot of services that try to solve that problem, none that I've tried just seem to fit my workflow.

2333 tabs open (Firefox 75.0), split between three windows atm. Using ~3GB, about 50/50 split between main process and plugin-containers.

There's no clear reason for page to be on any specific window though. Usually I just end up with 15 pages open next to each other about some specific topic that I'm interested at that time.

Running quite minimal amount of add-ons. Tab Stats is one I'd recommend for people with large amount of tabs. Provides easy way to prune duplicates etc.

Re:Linux was first released to the world from here 17.9.1991 on Thursday March 19, 2020 @09:46AM (#22627422)
A lot of quality photos of old maps in one of the links: http://ftp.funet.fi/pub/sci/geo/carto/maakirjakartat/

For example a book of old maps dated to 1643.

Re:Cloudflare is turning off the internet for me on Tuesday January 21, 2020 @06:17PM (#22112827)
This is an interesting subject indeed. Even though both of them are in the "try to grab as big portion of internet traffic as possible" business I wouldn't compare them that easily.

Cloudflare is actually rather good in doing what they do (DDoS side of things). They rarely break normal internet use, the only time when that happens is when a site is put into the "I'm under attack" mode that forces browser to do javascript proof. They do get huge amounts of traffic information though, but that is pretty much required to their core business (DDoS prevention, not the tinfoil kind)

Google/ReCaptcha is another thing. I have hard time understanding any reason to put captcha on any site that a normal incremental delay between login tries & ban sources that keep doing that for too long wouldn't already prevent. They're getting traffic data and ML training data and neither one is required for the thing captcha is trying to solve. Sites are just feeding their business and captcha is actually making the internet worse place for humans.

(Captcha requirement for things like posting on a discussion could be handled by simple spam/bot detection, captcha is just overkill)

Re:Show HN: A remote browser product, open-sourced on Monday November 18, 2019 @05:58AM (#21563328)
As a non-chrome user things have been getting a lot worse lately. I've also noticed more and more pages using recaptcha even there's no clear way for bots to spam content.

Are people really that eager to send google all traffic information? Is this really the best solution? Couldn't one for example parse the actual content that the bots are trying to create and filter/ban them based on that? I believe spam detection is quite effective these days.

This whole captcha hell is making web really annoying for normal users and mostly just benefits google.

Re:Sunsetting Mercurial Support in Bitbucket on Wednesday August 21, 2019 @05:08AM (#20755610)
The Software Heritage [1] was mentioned in another thread today. They seem to archive source code from most of the popular locations, but Bitbucket doesn't seem to be on the list?

If Bitbucket is planning on actually removing Mercurial repos it seems like a good idea to crawl and archive those before that happens.

[1] https://www.softwareheritage.org/archive/

There's a great book about the thing you're describing, called "Drift into Failure"
Re:Rethinking Visual Programming with Go on Wednesday June 05, 2019 @09:45AM (#20104243)
Interesting topic. I haven't gone as deep in this rabbit hole but I've also written "similar" tool that I've used as a visual help [1] when reading programs written by other people. It's been useful in understanding bottlenecks and weird code patterns / dependencies. I've even printed the graph sometimes and written down notes on the paper, drawing circles around logical groups, etc.

I ended up going with separate color for each type / package.

[1] Screenshot of a simple piece of code: https://imgur.com/a/Pr9dkkd

Re:How not to replace email: lessons from Google Wave on Sunday February 18, 2018 @06:38AM (#16405572)
I've seen a lot of failures in this space as well, but I still think Flowdock was the only product so far that got the second layer right.

It never tried to hide messages from you, the threads worked more like filters. Instead of finding the discussion you wanted you filtered out messages that weren't related to that discussion.

Re:Firefox 57.0 Released on Tuesday November 14, 2017 @03:08PM (#15698664)
You're probably better off not updating yet. I'm unable to open my old session after the 57.0 update.

1283 tabs open in the session that I'm trying to open. FF56.0 the session opens in around 20 seconds. FF57.0 I let it try to open the session for 40 minutes and still wasn't finished.

Not sure how it would perform if it would manage to open all the tabs but currently it's pretty much unusable for tab-heavy user.

When starting a new profile and starting session from scratch the browser seems really nice. I'll try nightly at some point and see if it's any better. If not I guess I'll write some tickets for them.

Re:How to Recognize Burnout Before You’re Burned Out on Wednesday September 06, 2017 @07:34AM (#15182811)
Thanks for the link! DiscoverDev looks like a site that I'll visit a lot in the future.

P.S. I'll try not to go offtopic from the original topic too much, but my intuition was to click the hashtags in order to get list of posts that match that hashtag. Didn't work as expected.

Re:Why are browsers so slow? on Wednesday December 21, 2016 @10:04AM (#13229619)
I have to one up this one.

After being burned by incompatible bookmark formats years ago (I used to keep everything in bookmarks that were tagged within firefox) I ended up with a habit that whenever I have something that I want to read (or refer to) later I leave it open in a tab.

Only browser that could handle this habit was indeed Firefox, running on Windows 7. How it usually went down was that whenever I hit 1000 tabs I reserved some time to read what was worth reading and close tabs that weren't interesting anymore, until I was down to about 200-500. I didn't use addons much, I remember only having vertical tab list, one of the (ad)blockers and an addon that displayed current tab count below the tab list.

That setup had 8GB of RAM, and I didn't have problems playing games without closing the browser. IIRC it usually reserved around 2-4GB. When I installed Windows 10 on the same machine the browser had 1370 tabs open. I know I still have the sessionstore.js backup somewhere, but I did start from 0 again with the new install.

I'm quite sure that some Mozilla people have noticed my crash reports every now and then :) (though mostly the browser was running fine without problems)

I've since started to use things like Google Keep and Stash to keep the tab count down a bit. Browser that I'm currently on has 229 tabs open, mostly temporary, work related things.

This was already on Musk's Master Plan Pt2 [0], listed under "Sharing". Though it's true that the name of the service and release schedule was not known before.

[0] https://www.tesla.com/blog/master-plan-part-deux

Re:Babushka – Test-Driven Sysadmin on Wednesday April 20, 2016 @05:30AM (#11533187)
There's also Marelle [0], written in SWI-Prolog.

[0]: http://larsyencken.github.io/marelle/

Older »