HNHacker News
TopNewBestAskShowJobs

gardaani

1,590 karma · joined August 31, 2018

submissionscomments
gardaani··on Chrome ships WebGPU
JavaScript is the programming language for the Web. WGSL syntax should have been based on JavaScript syntax. It would have made writing shaders easier for millions of existing Web developers. Now they have to learn a new syntax.
gardaani··on TinyVG – an alternative binary encoded vector graphics format
Google also has Vector Drawables for Android [1]. I'm sure they'll also create the other 12 competing successors, because each of their platforms need a new separate format.

[1] https://developer.android.com/develop/ui/views/graphics/vect...

gardaani··on TinyVG – an alternative binary encoded vector graphics format
SVG Native was supposed to fix that [1]. SVG Native uses only one coordinate system, no CSS styling, no filters, no animation, no scripting and no text or fonts. However, it didn't get much interest and it's starting to look like a dead version of SVG.

Maybe there isn't any need for a simpler vector graphics format because no one is using TinyVG, either.

[1] https://w3c.github.io/svgwg/specs/svg-native/index.html

gardaani··on TinyVG – an alternative binary encoded vector graphics format
The spec v1.0 was written two years ago. Is anyone using this new file format?
gardaani··on When Rust hurts
I have been hurt by issues similar to inc(&mut self) in the "Functional abstraction" section so many times. I have been considering using macros as a workaround, but so far I have just written the same code multiple times. DRY isn't easy in Rust.
gardaani··on Google's live from Paris event private/deleted immediately
Maybe related to that failed event: Google stock price is falling, it's currently -7%.
gardaani··on Rust's Ugly Syntax
Rust made a strange decision abbreviating keywords which are significant (pub, fn) and making things verbose where it isn't needed (separate declaration of P). Here's how my dream syntax for Rust would look like:

    public func read(path: AsRef<Path>) -> io.Result<Vector<u8>> {
      func inner(path: &Path) -> io.Result<Vector<u8>> {
        var file = File.open(path)?;
        var bytes = Vector.new();
        file.readToEnd(&mut bytes)?;
        return Ok(bytes);
      }
      return inner(path.asRef());
    }
I have replaced pub with public, replaced fn with func, removed separate declaration for P, replaced :: with ., replaced Vec with Vector, replaced let mut with var, replaced snake_case with camelCase, added return keywords. Note that all these are syntax changes. Semantics hasn't been changed at all. One more thing would be to remove the semicolons..

Compare that to the original. Which one is more readable?

gardaani··on Show HN: I “wrote” a kid's book with ChatGPT and Midjourney
I have been trying to use GPT-J or GPT-NeoX to create stories, but they all come out very strange. Here's one I generated using https://textsynth.com/playground.html and a prompt "Once upon a time there was a mouse called Miisa. One day she":

"Once upon a time there was a mouse called Miisa. One day she was driving through the woods and she saw a beautiful castle in the middle of nowhere. She didn’t go in but wanted to. Then she saw a door which said “The Secret Passage.” She went inside and met the owner who was the witch of the woods. “I’ve been lonely for a while and would like to live with you” said Miisa. The witch agreed. “But there’s one condition,” she said. “No matter how many times I ask you to do something, you must do it.” Then the witch asked Miisa to put a hat on her, which would make her invisible. Miisa was terrified. But she did it any way. Then the witch asked Miisa to kill a mouse which lives in her home. The witch wanted to have the mouse’s blood. “I can’t do that,” Miisa said. “I hate mice.” “Well,” said the witch. “You can’t kill a living thing. So then you must torture a living thing.” Miisa was getting scared but then a thought came into her head. She asked the witch, “Does this mean that I can torture a mouse?” The witch didn’t say anything, so Miisa said that she didn’t want to do it and started to leave the castle. The witch was so sad that she threw a fireball to stop Miisa. And that was that."

gardaani··on HoloKit relaunched, $129 AR Headset accessory for iPhone
Flight sims are great in VR. E.g. Varjo XR-3 is part of a virtual reality-based training solution for aviation training. The headset has high enough resolution so that all instruments and their texts are readable.

https://varjo.com/company-news/varjo-and-vrm-switzerland-mak...

gardaani··on Rust front-end merged in GCC trunk
It's certain that there will be fragmentation. There isn't any gnu project, which hasn't added its own extensions to standards or specs. Few examples: gcc front end for C/C++, bash, grep..

It means that crates.io will have crates which compile only with gcc and its extensions.

gardaani··on Xcode 14 unintentionally increases app size
Would stripping binary symbols affect stack traces in crash reports?
gardaani··on Womp 3D – The New Way to 3D
YouTube has better videos, like this: https://www.youtube.com/watch?v=-DnRehtfCbo

Womp looks like https://www.vectary.com with few additional features.

gardaani··on The case for JPEG XL
I hope Edge and Safari will enable JPEG XL, but not AVIF. AVIF has several disadvantages, for instance, it takes much longer to encode than JPEG XL and it doesn't support progressing decoding.

Google just doesn't like formats created outside their own company. They prefer WebP and AVIF (created by themselves), but dislike JPEG XL (not created by them).

gardaani··on Vectis IP Announces Call for Patents Essential to the Opus codec
Yes, of course. Sisvel is already selling a license for their AV1 patent pool: https://www.sisvel.com/licensing-programs/audio-and-video-co...

AOMedia fights against this with its defense program: "Established the AOMedia patent defense program to help protect AV1 ecosystem participants in the event of patent claims" https://aomedia.org/press%20releases/the-alliance-for-open-m...

gardaani··on How did people get apps on their computer before the Internet?
Dial up modems and BBSs
gardaani··on Penpot: Open-source design and prototyping platform
How they pay the hosting and storage fees? What is the business model?
gardaani··on Adobe to acquire Figma for $20B
The founders of Figma must be very happy: "Adobe announced it has entered into a definitive merger agreement to acquire Figma, a leading web-first collaborative design platform, for approximately $20 billion in cash and stock."
gardaani··on Color fonts on Google Fonts
SVG Fonts have never had good support in web browsers. SVG-in-OpenType fonts has some support, for instance in Firefox.

Google Chrome teams refuses to implement SVG-in-OT. Instead, they wanted to implemented their COLRv1. https://bugs.chromium.org/p/chromium/issues/detail?id=306078...

gardaani··on Diffusion Bee: Stable Diffusion GUI App for M1 Mac
I found the reason why it was using CPU only. I was running macOS 12.2. I upgraded to 12.5.1. and it's now using GPU. Activity Monitor shows it. Also, the time for 50 steps dropped to 175 secs. 25 steps is about 80 secs, which is closer to the MacBook Pro time..
gardaani··on Diffusion Bee: Stable Diffusion GUI App for M1 Mac
> 55 seconds on a M1 Pro MacBook with 16GB RAM to generate a picture

I've been running webui [1] on M1 MacBook Air 16GB RAM: 512x512, 50 steps takes almost 300 seconds. I'm suspecting that it is running on CPU, because the script says "Max VRAM used for this generation: 0.00G" and Activity Monitor says that it's using lots of CPU % and no GPU % at all. When M1 users are running stable diffusion, does the Activity Monitor show the GPU usage correctly?

[1] https://github.com/lstein/stable-diffusion

gardaani··on Why we write elementary apps in Vala (2014)
Jakt looks very much like Swift. Objects are reference counted, structs are always value types, all function arguments require labels, no semicolons.. it's clear that Kling has worked for Apple.

I like the language! It is so much more readable than Rust. I might switch from Rust to Jakt once version 1.0 has been published.

gardaani··on USB 4 version 2 promises 80 Gbps speeds over existing cables
Certified USB cables have markings indicating what type of cable it is. Power can be 60W or 240W. Speed can be 20Gbps or 40Gbps. Here's how the logos look like https://audioxpress.com/news/new-certified-usb-logo-program-...

If you buy a certified USB4 cable, it has the markings and should work as you expect it to work.

If you buy a cheap Chinese cable, it won't have any markings or it has wrong markings. It won't be possible to mandate that every cheap Chinese cable has correct markings. It would require Amazon or Walmart to do some kind of quality checking for all their sellers, which won't happen. They allow SSD scams, so they also allow USB scams. https://news.ycombinator.com/item?id=32628381

gardaani··on Uses for an old Android device
If the old Android device doesn't get security updates, then it isn't safe to keep it connected to the Internet. Someone can hack into it and turn on the mic and camera. Or use it for mining cryptocurrencies.

LineageOS helps ( if the phone is supported by it: https://lineageos.org )

gardaani··on Apple: Using a camera cover might damage your MacBook's display
There is a physical indicator LED for the camera. The LED indicator can't be seen if the camera isn't in use. Try launching Photo Booth and you'll see the LED indicator.

But, the latest Macs don't have a LED for the mic, which is a disappointment. Good old MacBooks had a LED indicator for the mic.

EDIT: sorry, my memory failed me. The old MacBooks didn't have a LED for the mic. On white plastic MacBooks (2006), there's two black dots around the camera. The dot on the right side is a LED for the camera. The dot on the left side is the mic, not the LED indicator for it. Thanks for correcting me!

gardaani··on MegaPortraits: One-Shot Megapixel Neural Head Avatars
European politicians were also fooled by deep fake video calls: https://www.theguardian.com/world/2022/jun/25/european-leade...
gardaani··on In Utah, researchers are trying to make geothermal energy a reality
A geothermal plant running on full capacity may deplete its geothermal well in 50 years. It may take 1000 years before the geothermal system becomes a resource again [1]. Is that human timescale?

[1] https://www.savingiceland.org/2010/10/geothermal-energy-runn...

gardaani··on Apple, Google, Facebook's AV1 standards group under EU antitrust investigation
Here's more details about it: https://mlexmarketinsight.com/news-hub/editors-picks/area-of... - some of the EU antitrust questions:

"It is also querying companies on AV1's compatibility with other video codec standards, such as whether a smartphone or a browser can support both AV1/VP9 and competing codecs HEVC and VVC simultaneously."

"And if AV1 were to turn into a new market standard, the commission asked, what would be the impact on companies’ ability to compete with AV1’s AOM licensing conditions, and their incentives to work on alternative video codec technology that may be non-royalty free?"

"Brussels is trying to understand the rationale of companies that didn't choose AOM and instead have chosen to license the AV1 and VP9 standard-essential patents through Sisvel's pool."

gardaani··on SwiftUI for Mac 2022
UIKit's constraint-based layout system isn't as easy as SwiftUI's layout system. SwiftUI layout system is similar to the CSS layout system, so it's easier to learn.
gardaani··on Rulex – A new, portable, regular expression language
Swift introduces RegexBuilder to make regex easier, but I think it is a bit too verbose: https://developer.apple.com/documentation/regexbuilder?chang...
gardaani··on Ask HN: Why the EU did a law only for phone chargers and not, say, laptops?
It's coming: "As of 2024, all new handheld mobile phones, tablets, digital cameras, handheld videogame consoles, headphones, headsets, portable speakers, e-readers, keyboards, mice, portable navigation systems, and earbuds will have to be equipped with a USB-C charging port. The deadline for laptops is 2026." https://ec.europa.eu/commission/presscorner/detail/en/ip_22_...
← PreviousPage 3 of 9Next →