News for hackers. Stuff that matters.

accatyyc

Re:Let's Destroy C on Thursday January 30, 2020 @03:59AM (#22189955)
How about just

    puts(“Hello, World!”)
which has been in C since the dawn of time?
Re:iOS 13's Music App Sucks on Wednesday January 29, 2020 @06:18PM (#22187107)
How do you start the radio? If you start it from a song of the genre you want to listen to now, or a playlist containing mostly that genre, it won't mix in random stuff you've liked before. I get very nice mood/genre radios just by starting them from some song I liked currently.
Re:Apple Developer Documentation Is Missing on Monday October 28, 2019 @11:01AM (#21377565)
In Objective-C (and some other languages with ternary operators) the same can be written like this:

    int a = b ?: c ?: 0
Re:A Useful Thing in Bash on Thursday October 10, 2019 @05:58AM (#21212647)
Same here, probably something added by oh-my-zsh
Re:KDE is adopting GitLab on Monday September 30, 2019 @04:44AM (#21112956)
For me, using pure git is fine when working on solo projects. The benefits of such services is when there are many developers in the same project. Gives a good overview of issue reports, what commits are linked to what issues, easy "pull request" overviews/quick reviews without checking out branches etc. It's more about the social and less about the source control for me
Personally I think you should skip the /r/ or /i/ part of the paths. Always bothered me that reddit has it - communities are central to these sites so IMO they should be the first part of the path
Re:Dear Email Industry, We’ve Got a GDPR Problem on Friday September 20, 2019 @07:51AM (#21025593)
Then email servers would have to download billions of images of which 99% the corresponding email won't even be opened
Re:Donald Trump Wants to Purchase Greenland from Denmark on Saturday August 24, 2019 @03:30AM (#20785816)
Turns out he was...
Re:The Most Dangerous Writing App on Thursday August 22, 2019 @08:38AM (#20767340)
It feels like a programmer thing, since unsaved files won't be compiled when you run the program. At least that's where I got the habit from
Re:Assholes: A Probing Examination on Friday July 05, 2019 @06:30AM (#20361397)
Why would informing people about the importance of testing make you look like an asshole? You could do it in a polite and helpful way, instead of being an asshole about it.
Re:Reducing notification permission prompt spam in Firefox on Tuesday April 02, 2019 @02:28AM (#19551531)
I’d say Mozilla is right in their wording. Your point here is also included in that - if websites showed the push dialog responsibly, it would be for example in the website settings after the user checked a box called “send me push!”. Many good web services do it this way, and if done this way I suspect the accept rate is closer to 100%.

Some people might want push from news pages, but 97%+ don’t, so it makes no sense to request it immediately.

They probably even lose subscribers. Someone who read some content and liked it, decided that they want push may have already opted out because they didn’t know the site yet.

Re:What Finally Killed AirPower on Saturday March 30, 2019 @02:41AM (#19528148)
Thanks. Updated my post to say smartphones - I have no idea about what EV batteries are exposed to.
Re:What Finally Killed AirPower on Saturday March 30, 2019 @02:40AM (#19528140)
Thanks for the links!

Also, I want to add that what I wrote above is only regarding smartphones. I don’t know how much stress/extra heat etc that EV batteries are subject to, but I imagine they drain/charge at more intense rates relatively.

Re:What Finally Killed AirPower on Saturday March 30, 2019 @02:34AM (#19528122)
Yeah, but a battery gets hot when charging fast. Keeping it connected at 100%, the phone stays cool in my experience. And charging often makes the window where it generates heat from charging smaller
Re:What Finally Killed AirPower on Saturday March 30, 2019 @02:20AM (#19528073)
Constantly charging causes fewer power cycles and extends your battery life.
Re:What Finally Killed AirPower on Saturday March 30, 2019 @02:16AM (#19528064)
The things that kill smartphone batteries today are age and power cycles. It doesn’t matter if you charge from 0% to 100% in one go or from 90% to 100% ten times. Both add up to one power cycle.

To keep your battery fresh for as long as possible, always keep the phone connected to a charger. No battery cycles. It will get worse after a few years anyway.

Re:Swift UTF-8 String on Friday March 22, 2019 @04:21AM (#19460460)
That's just a convenience thing. I've worked in Xcode for nearly 10 years and I never use that feature. Good feature for teaching though. But if you hate it, just don't use it.
Re:How to live without Google (2017) on Monday March 18, 2019 @06:17AM (#19419904)
Ads doesn’t mean they have to track you. I assume (and it seems like) DDG targets their ads based on your search query and not personal information, and afaik they are very open about this.
Re:Wolfenstein: Ray Tracing on Using WebGL1 on Saturday March 16, 2019 @03:28AM (#19406787)
This is very cool. I really like the style that is the result of retro graphics and then raytracing added on top. I hope it will become a common style in games!
Re:Sublime Text 3.2 Released on Thursday March 14, 2019 @05:58AM (#19387774)
Hehe, thanks for the laugh! Yeah, I can totally relate. In fact, to become effective in Emacs I had to start by reading a book (Mastering Emacs, can totally recommend if you ever decide to try again!) and then spending _a lot_ of time fighting configurations. Even now that I’m very comfortable in Emacs I occasionally spend hours to just get a package working correctly (recently it was lsp-mode, which looks like the solution to many problems with Emacs, but I could never get it to work).

So yeah, I can’t really tell you it will be worth it productivity wise to learn Emacs, but for me it has gotten to the point that configuring it is a lot of fun and sort of replaces hobby programming projects for me.

Re:Sublime Text 3.2 Released on Thursday March 14, 2019 @05:48AM (#19387725)
Just looking at the rest of the comments here is one example. And almost every time something about Sublime is posted on HN
Re:Sublime Text 3.2 Released on Wednesday March 13, 2019 @01:32PM (#19381174)
It seems like the general opinion that Sublime Text outclasses vim when it comes to opening large files though
Re:Sublime Text 3.2 Released on Wednesday March 13, 2019 @01:28PM (#19381118)
Now now, I use Emacs myself but I wouldn’t call its UX “refined”. It’s loads of stuff piled on top of eachother and many built-in packages to do the same thing (since everything had to be backwards compatible).

Again, I love emacs and I’m very effective in it with my own configuration, but it’s practically unusable by default. I’ve never seen a serious emacs user without a heavy customised emacs. And I’ve never seen another emacs user whose config I would be nearly able to use :D

I can totally see why people like editors with sane defaults.

Why? Fastmail always complied with warrants to get your data, so nothing changes because if this law. If you want to hide something, encrypt your e-mails before they reach Fastmail (and do the same regardless of provider you use, why trust anyone?)
Re:Bookworm: A Simple, Focused eBook Reader on Tuesday February 19, 2019 @12:19PM (#19200689)
FWIW iTunes is still great for this.
Re:Show HN: DeskGap – Like Electron, but uses the system webview on Wednesday February 13, 2019 @06:32AM (#19152271)
Both code memory and data memory will be shared by any modern OS. The code memory will of course be shared since it's the same, and the data memory will be shared until modified. Then that memory page will be copied for the process that changed it (check out copy-on-write).

And then there's disk memory, which isn't as important IMO but still it will of course be smaller since you don't ship the whole browser stack for each application.

Re:Show HN: DeskGap – Like Electron, but uses the system webview on Wednesday February 13, 2019 @06:27AM (#19152253)
Of course they can. This is what OS engineers have spent decades thinking about and optimizing. And then stuff like Electron appears and circumvents all those optimizations. Which is the main reason I dislike it.
Re:Show HN: DeskGap – Like Electron, but uses the system webview on Wednesday February 13, 2019 @03:16AM (#19151376)
If you’re concerned about RAM, using this approach makes a lot of sense. Every process of your system browser running, (different tabs, different apps with web view), the OS can share memory between since it’s the same binary. With electron, each app bundles their own browser and memory cannot be shared since it’s different binaries.
Re:Show HN: DeskGap – Like Electron, but uses the system webview on Wednesday February 13, 2019 @03:13AM (#19151357)
Because if it uses the same browser binary as your other web apps (tabs or other DeskGap apps), the OS can share memory between them. Not possible with electron since every app bundles its own Chromium binary.

Older »