News for hackers. Stuff that matters.

Alexendoo

Re:The Rust Foundation's New Trademark Policy Draft Is Just Wrong on Saturday September 02, 2023 @02:44PM (#37364286)
The feedback form was open for some amount of time and closed as scheduled, there are only so many things to be said about the draft after all. All of the things mentioned in the blog post have been said hundreds of times over by this point

Where are you getting that they might accept the draft from? That seems like a particularly uncharitable reading of the follow up post

https://foundation.rust-lang.org/news/rust-trademark-policy-...

Re:Rust – A hard decision pays off on Wednesday August 24, 2022 @02:55PM (#32584077)
TrustedLen will mean it can safely take the upper bound, but Vec for example will still use the lower bound of the hint when something isn't TrustedLen

https://doc.rust-lang.org/src/alloc/vec/spec_from_iter_neste...

Re:DUR: The Debian User Repository on Saturday June 26, 2021 @08:53AM (#27641427)
The idea is you read the PKGBUILD/install files so it's no longer arbitrary code, they're usually very short files. On updates you can review just a diff. AUR helpers present this to you so it's not a manual process

Many packages are compiled from source rather than using prebuilt binaries, but when binaries are fetched it is something you'd see in the PKGBUILD itself. The binaries aren't included in the AUR itself, they'd usually be from the first-party of the software you're installing. For example google-chrome[1]'s package fetches the .deb from Google's server and unpacks it

[1]: https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=googl...

Re:WebAssembly on Sunday February 28, 2021 @09:59AM (#26293812)
None of these scriptlets would break if a site uses WASM, they're utilities for things like adding/removing/mutating elements from the DOM, modifying localStorage, stopping alert()

executesitefunction.js could arguably be effected, but that relies on a site installing a particular function on window, which isn't required when using JS, and could be still done where the function is backed by WASM

Re:Why Uber Engineering Switched from Postgres to MySQL (2016) on Saturday February 27, 2021 @10:00AM (#26285240)
uft8mb4 does not use more bytes than utf8mb3, for anything representable by utf8mb3 the size in uft8mb4 is identical. Anything that would be 4 bytes in uft8mb4 is not able to be stored in utf8mb3

utf8mb3 is definitely a broken subset, it's deprecated at the very least

Re:WebAssembly Studio on Thursday December 31, 2020 @05:26PM (#25597893)
Everything is rendered directly to a canvas, at the very least it lacks subpixel rendering
Re:Use long flags when scripting (2013) on Friday September 18, 2020 @06:29PM (#24522480)
The long form of `-a` would be `--archive`, for the same reason that you write `-a` and not `-dR --preserve=all`
Re:Proposal: A built-in Go error check function, try on Wednesday June 05, 2019 @06:55AM (#20103082)
For 3., For use in defer the error return does have to be declared as you'd expect, in the examples it's done in the function signature

  func CopyFile(src, dst string) (err error) {
                                  ^^^
                                  here
It might have been --declarationMap, part of Typescript 2.9

https://github.com/Microsoft/TypeScript/wiki/What's-new-in-T...

Jumping to definition works with typescript projects correctly when this is turned on, but it's still not a solution for JS projects with definition files

Re:Show HN: Pipe To Me – Stream data over HTTP using curl on Thursday March 07, 2019 @11:18AM (#19329248)
The browser will start displaying the contents of a response before it has entirely downloaded. So in this case the browser sees it as a really slow server (you can see the loading icon is still there in the demo) that sends a bit of content every so often
Re:Android Studio 3.2 on Tuesday September 25, 2018 @06:34AM (#18065076)
There is quite a large downside to app bundles, that is that it requires you (the developer) to hand over your app signing key to Google. The fact that updates from the play store are signed end to end is pretty great in my opinion, this doesn't apply so much if you give away your signing key.

As far as I can tell it's not a technical reason why they ask for your key - bundletool [1] supports generating a set of signed APKs (.apks, APK set archive) in the same way the play store would from an app bundle. Android Studio's GUI could just as easily generate that to upload directly to the play store instead of an app bundle. This would net the same benefits to the end users and the same level of convenience to the developer, all whilst keeping your private keys private.

[1] https://developer.android.com/studio/command-line/bundletool

Re:Not Sucking at TypeScript: 3 Tips on Saturday September 22, 2018 @02:15PM (#18047183)
I would recommend avoiding adding your own global types if you can avoid it, for example TypeScript has a full type definition for Array.prototype.find [1]. You can enable it without changing the target and breaking things by adding es2015 to lib in your tsconfig compilerOptions

[1] https://github.com/Microsoft/TypeScript/blob/5fb39769ada9ff7...

Re:TypeScript at Google on Sunday September 02, 2018 @09:30AM (#17896933)
Yeah you should be able to, the minimum typescript version required and the one they test at is 2.8 for now but the LibraryManagedAttributes type is present [1]. On 2.8 and 2.9 it has no effect but if you're using 3.0 you should see it working.

[1] https://github.com/DefinitelyTyped/DefinitelyTyped/blob/1d96...

Re:TypeScript at Google on Sunday September 02, 2018 @06:53AM (#17896523)
For the default props side of things, as of typescript 3 and the latest @types/react it should work as you would expect:

https://github.com/Microsoft/TypeScript/wiki/What%27s-new-in...

Re:"@" on Twitter on Saturday April 28, 2018 @05:12PM (#16949437)
Sort of - there's a jQuery API that does content sniffing called .data(), it's for storing and retrieving arbitrary data on elements. The problem was that they used this API to read from an element where they should have used .attr(), which returns a string.