Better HN
topnewbestaskshowjobs
Log inSign up

NiceGuy_Ty

152 karma · joined Nov 17, 2016 (10y ago) · 57 submissions

Submissions

comment 6y ago · link · parent

What value does this comment add?

comment 7y ago · link · parent

All of the pros of JWTs _do_ apply to Disney+

comment 7y ago · link · parent

This is why even the most basic form of generics would be amazing for reducing boilerplate: https://go-review.googlesource.com/c/go/+/187317/3/src/go/pa...

comment 7y ago · link · parent

I'm a Scala dev using vim as my daily editor, if you're using sbt then you can use ale's sbtserver linter: https://github.com/w0rp/ale/blob/master/doc/ale-scala.txt

comment 7y ago · link · parent

My secret: got a dog. My awake/sleep cycle shifted 3 hours earlier overnight.

comment 7y ago · link · parent

Firefox Focus is the fastest android browser experience. I use that as my default browser, and only swap to normal Firefox when using a site I need to login to

comment 8y ago · link · parent

Seems like a very useful library. Any similar libraries for other languages?

comment 8y ago · link · parent

Not ready to outright delete Linkedin, but it was the noisiest mobile app on my phone. Luckily the mobile site works decently, so it has been assigned to a firefox tab for the foreseeable future.

comment 8y ago · link · parent

Eh, seems like a stretch to me. At the end of the day making usable UIs is hard, and any decent guideline that a non-visual person like me can follow is a good thing. My thanks goes out to all the designers and UI engineers that have put the time into producing high quality documentation.

comment 8y ago · link · parent

I believe that's because Alacritty focused on optimizing for throughput instead of latency. That is it will take less time to render a large chunk of output, such as running yes.

comment 8y ago · link · parent

You can't just use a windows restore disk to get a new windows installation. When installed, it will ask you for your license key, and will not function fully until you have done so.

The only thing this guy was doing was making it so customers don't have to download the iso on a USB or CD themselves, and recycling e-waste in the process.

comment 8y ago · link · parent

Augmented Reality (e.g., Pokemon Go)

comment 8y ago · link · parent

I'd be terrified about #4 with any laptop that I use.

I run Fedora on an XPS 13. I've never run into #1 or #2. I hit super+L by habit before closing the screen so I don't know about #3, but closing it while typing this comment put it to sleep. I've only reinstalled the OS once to get rid of the built in Ubuntu in favor of Fedora for #5. For #6 I haven't had it crash on me, but I have been RAM-swapped to death after having too many Firefox tabs and Docker builds at once. The only audio/network/charging problem I've run into is that Spotify doesn't bind to the keyboard Play/Pause events.

comment 8y ago · link · parent

Ultra portability. And there shouldn't be any startup scripts, however, the binary does need to be compiled for the target platform.

I'm pretty sure the use case of this is more akin to an electron replacement, and not a production web server. So the user would just download and run the binary, and interact with the app from their browser.

comment 8y ago · link · parent

Are you talking about statically linking the database itself? Seems like it'd be better to keep the database separate from the binary, unless you're working with a read-only database.

For static-linking the sqlite3 library, if you're using rusqlite you can just specify the bundled feature in Cargo.toml.

``` [dependencies.rusqlite] version = "your-version-number" features = ["bundled"] ```

comment 8y ago · link · parent

Putting the string in the binary is really only useful for trying to do ultra-portable deployments like this imo. The overhead of copying the string into memory is pretty meaningless in the use case where you only expect a single, home-desktop user.

Now if this was a production server having to service thousands of clients than the sendfile optimization becomes much more important.

comment 8y ago · link · parent

To be fair, this sample of code includes macro usage (every function call that ends in an exclamation point is actually a macro). The syntax inside the macros is different from normal, legal rust syntax.

Still, I agree that Rust's syntax approaches C++ level of complexity at times. I find that writing actual statements and expressions is simple enough, but writing structs, lambdas, and function definitions requires knowing how to specify types, type bounds (if using generics), lifetimes (if using references), and Fully Qualified Syntax (for referencing types/items in other modules). And that's before actually having to come to terms with the borrow checker.

For what it's worth, once you get over the initial learning curve the cognitive burden goes down. Rust's syntax, to me, is actually visually distinctive enough that it's easy to parse out types, expressions, declarations, etc. from just a quick glance.

comment 8y ago · link · parent

I love me some akka. Actix would be the actual rust comparison, since it's also an actor system being leveraged to provide web features. You have to dig into Tokio/futures to get access to streams, which atm is still not at 1.0.

comment 8y ago · link · parent

Doesn't this just make the argument that having kids is bad for them? That doesn't affect whether or not it has a positive impact on the lives of the couple.

Also, this assumes that you ascribe to the anti-natalism viewpoint, which to me seems like as much of a thought experiment as nihilism.

comment 8y ago · link · parent

Maybe course withdrawal rates could be used, but getting access to the necessary statistics seems like it'd be a chore. I just checked with my university and the only statistics I can find are centered around graduation rates. One would likely have to contact all the registrars among a sample of universities individually, as I haven't found a university offering these statistics yet.

comment 8y ago · link · parent

This is a well written article, and I absolutely agree with the idea that profiling and analysis is more important than language choice in order to eke out performance wins.

That being said, some of these optimization techniques completely took me by surprise. Defining the sort function as a cache lookup that converts the sorting template to a string and then builds an anonymous function out of that string which is finally used as the exported function seems, to me, like an extremely roundabout way to achieve inlining the comparator. And the argument-count adapter having such high overhead on V8 seems like something that should generate a warning for the developer.

The cache analysis and algorithmic improvements seemed fairly straight forward, but when you're at the point of having to manually implement memory buffers to alleviate GC pressure, you're diving below the level of abstraction that the language itself provides you. At that point, I think the argument to switch to a language designed to operate at that level of abstraction holds some sway.

comment 8y ago · link · parent

5 for $5.00 at my whole foods

comment 8y ago · link · parent

Huh. That's incredibly simple and seems pretty effective. Of course, the sponsored sites could try to track user preferences themselves by fingerprinting Firefox visitors across distinct sites, but at least Firefox does have some anti-tracking features enabled by default.

comment 8y ago · link · parent

> SQLite backend > Because comments are not Big Data.

For small scale applications, I 100% agree. Sqlite3 is so easy to back up and configure.

comment 8y ago · link · parent

I did this before when using ripgrep, and accidentally created a several hundred GB file. Now ripgrep checks if this is the case and handles it gracefully: https://github.com/BurntSushi/ripgrep/pull/310

comment 8y ago · link · parent

I got the touch screen for the better resolution. I also disabled the touch screen capabilities by toggling an option in BIOS

comment 8y ago · link · parent

Has anyone done detailed comparisons of the differences in attempting to complete the same workflow on Windows vs Mac?

comment 8y ago · link · parent

Using an HTTP based search engine should be explicitly opt-in, imo. Moving it to https by default seems like the right choice for non-technical users.

comment 9y ago · link · parent

The only requirement to make macros work in a statically typed environment is to create a suitable type to represent the source code, and provide the operations to transform the said type. For instance, Rust has a macro system that's pretty nice to work with.

https://danielkeep.github.io/tlborm/book/README.html

comment 9y ago · link · parent

I on Fedora and the latest version is available via dnf. But still I use nightly, and all I had to do to j install it was untar it into my opt directory and symlink the binary.
12