Better HN
topnewbestaskshowjobs
Log inSign up

GrumpySloth

4,901 karma · joined Sep 13, 2020 (6y ago) · 1,641 submissions

Submissions

comment 4y ago · link · parent

That makes sense. Thanks.

comment 4y ago · link · parent

What do you mean when you say that Gnome is the default in Debian? Every time I installed Debian in the last 10+ years, it showed a list of checkboxes with desktop environments to select in the installer. So you can install 0, 1 or more desktop environments during Debian installation. I'm asking, because I see it repeated in a couple places that Gnome is the default, and I feel that I'm missing something.

comment 4y ago · link · parent

Another species known for recreational drug use is dolphins: <https://www.youtube.com/watch?v=msx3BAhIeQg>

comment 4y ago · link · parent

I've watched an interview on MSDN with one of the developers of .NET (I think she was responsible for the GC), who also used to work on Windows, making those famous workarounds making games work on newer Windows releases, even when they relied on old kernel bugs. I think she said that the best way to get familiar with a complex new codebase is to step through it with a debugger, going through several scenarios. I think it's a great idea. I only wish I had a working visual debugger in my day to day work.

EDIT: Found the interview: <https://docs.microsoft.com/en-us/shows/Careers-Behind-the-Co...>

comment 4y ago · link · parent

Why an interpreter and not a compiler?

comment 4y ago · link · parent

Here is an interesting story from pjmlp about how Wirth bootstrapped Pascal: <https://news.ycombinator.com/item?id=30487264>

comment 4y ago · link · parent

I'd agree, if the result type was the same as the input type. However, notice that the function I wrote returns an unsigned type, so in the case of byte-sized types it would be fn abs(x: i8) -> u8, i.e. there is enough space for 128. Otherwise, good point.

comment 4y ago · link · parent

Yes, that may be read as patronizing. And maybe I should have been better, but if you read the comment I replied to, you may see how it was provoked.

comment 4y ago · link · parent

Someone has to write those libraries you're using, and they need to test it. Maybe you're satisfied with having a job consisting of gluing libraries together, but not everyone is like that and there is no need for being patronizing towards them.

comment 4y ago · link · parent

Maybe it's true for CRUD apps. I was speaking from the experience of writing compilers. From what I've read, logical/algorithmic bugs are also common in gamedev. I'm most interested in algorithmic code though, so that may be a bias.

comment 4y ago · link · parent

I see completely different problem. Just because there are branches in your code, doesn't mean there are branches in its inputs. And just because there are branches in the inputs, doesn't mean they are reflected in the code. So you may have 100% test coverage, but be testing branches which aren't going to be taken, at the same time completely missing the branches that are in the inputs, which you'll fail to handle. Example:

  fn abs(x: i32) -> u32 {
      x as u32
  }

  fn test_abs() {
      assert_eq!(5, abs(5));
  }
Boom, 100% test coverage! But the tests are actually very low quality. There is a bug when x is negative. That's why property-based testing is nice. It uncovers branches in the inputs (although the task of generating a representative set for the inputs is sometimes non-trivial).

After discovering the bug, one may even write a branchless implementation of this function for performance without updating the test, and it will still be 100% coverage. But the arithmetic has "logical branches" which do not look like ifs, instead they generate qualitatively different results for different inputs.

comment 4y ago · link · parent

Has anyone here used xmake in anger? How did it fare?

comment 4y ago · link · parent

To me it looks like this effect: <https://www.theclickcommunity.com/blog/creating-starbursts-i...>

comment 4y ago · link · parent

It depends on the screen and the software. On Linux in Firefox this page's legibility is pretty poor. However, when I was reading this page on iPhone, it was perfectly legible.

Also, Computer Modern on the same screen, but rendered by Okular or Evince, when viewing a LaTeX document, is also perfectly legible.

When it is rendered properly, I find it very pretty and legible.

comment 4y ago · link · parent

The money is created when someone borrows it. But you cannot lend more than a certain multiple of what you have as deposit. This multiple is decided by the central bank.

comment 4y ago · link · parent

It has poor support for input formats though. E.g. it still doesn't support CR3. I prefer RawTherapee which supports CR3, doesn't look like a space station and still is miles ahead of Lightroom in terms of capability.

comment 4y ago · link · parent

You make it sound as if pop singers used autotune selectively, judging when it's better than natural technique. I wrote my comment in the context of large swaths of pop singers who use autotune indiscriminately in all their songs, throughout. (At least that's my impression from songs recommended to me by YouTube in incognito mode.) Now show me an acclaimed pianist who keeps their foot down on a single pedal throughout all their performances. I'd be surprised if the most common motivation for using autotune wasn't being unable to hit the right notes.

comment 4y ago · link · parent

I think Concurrent ML (1991) had select before Go. Go itself took it from Newsqueak (1994) and Limbo (1995) I think. The name itself probably comes from the UNIX select(2) syscall, which first appeared in 4.2BSD (1983).

comment 4y ago · link · parent

There is no single thing that makes a song interesting or memorable, but technical proficiency is one of factors. Of course, I don't think that being "at the top" in technical proficiency makes a song any better than being just among a broader set of "best performers", but autotune makes people sound flat, generic, robotic, which is on the opposite end of the spectrum. That it doesn't contribute positively to a song is an understatement.

comment 4y ago · link · parent

No changing of compression settings affected the issue in any way.

comment 4y ago · link · parent

Regarding remoting, I've found that running firefox through ssh -X makes sshd on the server max out the CPU and cause a very slow repaint. But eliminate ssh from the equation (use X11 forwarding without ssh, just let the remote firefox talk directly to your local X11 server) and firefox performance is indistinguishable from running it locally. Of course, for insecure network it's a bit of a hazard, but my usecase is forwarding a firefox instance running in a local virtual machine, so it's fine. Firefox over ssh -X brought me to the edge of sanity. I recommend trying direct X11 forwarding if someone has a similar problem and usecase (security-wise).

comment 4y ago · link · parent

I feel similarly about macOS. The Snow Leopard/Mojave-era rounded-edges were at least passable. But what they did in Big Sur (re edges, padding and colours) is straight up comedic. Unfortunately, it appears to be the platform with the best selection of desktop apps.

comment 4y ago · link · parent

Every single element of design featured on this page looks terrible: the apps and websites visible in screenshots, the blog itself. The excessively rounded ages make me feel as if I was in a children's house, where everything was rounded so that children don't hurt themselves hitting their heads on corners, or even on a children's carousel. The text on the website isn't evenly centred inside the boxes (top padding is smaller than bottom padding). Generally the spacing between elements, and between elements and text makes the site cause nausea. Also, compare how much space there is between the word "Date" and the enclosing box (claustrophobic) with how much space there is between the "+" sign and the enclosing box (agoraphobic).

Overall, modern design is awful.[1]

Regards,

A Gen Z-er bitter that Win11 is going to bring round edges back[1]

[1]: Yes, it looks like I've run out of positivity for the day.

[2]: Rough edges of Win10 were the best thing about its design, that was otherwise questionable in other places.

comment 4y ago · link · parent

Nit: practically everyone believes in invisible things, e.g. electrons, or black holes. :)

comment 4y ago · link · parent

It has been my impression that most actors are American, followed by Russian. I couldn't find any numbers to corroborate that though.

comment 4y ago · link · parent

Thank you very much for your detailed explanation.

The reason I asked is because when I saw Background(1:200, ground), I did not know what made Javis use this background. To me it looked like creating an object and immediately discarding it. Global state explains it, but by default I'd assume that I can e.g. create two animations simultaneously (not necessarily meaning parallelism or concurrency, just multiple animation objects coexisting in memory at the same time, with code applying modifications to one in line N and to the other in line M e.g.) In that case I don't know how Javis would distinguish which background should be applied to which animation, as the code doesn't explicitly show any connection between the video variable and the Background(1:200, ground). From your explanation I assume you can only create one animation at a time. It makes sense. It makes it similar to creating plots in gnuplot. Keep in mind that I don't program in Julia (I'm considering learning it though), so I may still be totally off the mark in my understanding.

When I learn a library, tracing how data flows through example programs is the guide I use. When I don't see the explicit connection facilitating this flow of data, the library feels a bit less predictable to me and I need to rely more on copy-pasting ready-made examples to get something working through trial-and-error instead of relying on an accurate mental model of what happens. I know that such explicitness can feel verbose sometimes, but there are methods of escaping the verbosity without losing explicitness. Two examples: iterator pipelines in Rust/streams in Java, builder pattern in any language with method call syntax. In the first example, usually the pipeline starts with the name of the source of data and is followed by transformations connected by dots, e.g.:

  let names = vec!["Jane", "Jill", "Jack", "John"];

  let total_bytes = names
      .iter()
      .map(|name: &&str| name.len())
      .fold(0, |acc, len| acc + len );
The important thing here is that the dots signal that all those operations are applied to the result of the previous operations in pipeline (yet you don't need to name all the intermediate results). It's both terse and explicit.

Builder pattern is similar: you have an object with methods which modify this object and return self/this, so that you don't need to repeat the name of the object being created in every line setting something in this object. E.g. I have this code in one of my Rust project using the clap library to parse CLI arguments:

  let app = App::new(pkg_name)
      .bin_name(bin_name)
      .version(version.as_str())
      .about("Compares directories file by file")
      .arg(Arg::with_name("brief")
          .short("q")
          .long("brief")
          .help("Report only when directories differ")
          .display_order(1))
      .arg(Arg::with_name("null")
          .short("0")
          .long("null")
          .help("Print raw NUL-separated paths")
          .display_order(2))
      .arg(Arg::with_name("color")
          .long("color")
          .value_name("when")
          .help("Print output in color")
          .takes_value(true)
          .possible_values(&["never", "always", "auto"])
          .default_value("auto")
          .display_order(3))
      .arg(Arg::with_name("progress")
          .long("progress")
          .value_name("when")
          .help("Print progress reports")
          .takes_value(true)
          .possible_values(&["never", "always", "auto"])
          .default_value("auto")
          .display_order(4))
      .arg(Arg::with_name("block-size")
          .short("b")
          .long("block-size")
          .value_name("block-size")
          .help("Read files in blocks of <block-size> bytes")
          .takes_value(true)
          .validator(is_valid_block_size)
          .display_order(5))
      .help_message("Print help information and exit")
      .version_message("Print version information and exit")
      .arg(Arg::with_name("old")
          .value_name("old")
          .required_unless_one(&["help", "version"])
          .hidden(true)
          .index(1))
      .arg(Arg::with_name("new")
          .value_name("new")
          .required_unless_one(&["help", "version"])
          .hidden(true)
          .index(2));
I think the builder pattern could be a good fit for Javis. But that's just a complete outsider's opinion who doesn't even program in Julia, so don't take that too seriously. I think the API being a bit more like gnuplot is just fine for Javis' apparent purpose.

To answer your question more directly, yes, I do think that knowing a bit about internals helps me understand how I should be using it.

Cheers

comment 4y ago · link · parent

What do you mean by "lost"?

comment 4y ago · link · parent

Thanks.

comment 4y ago · link · parent

I don't know any Julia and I've looked at one example: <https://juliaanimators.github.io/Javis.jl/stable/tutorials/t...>

In the first code snippet, I don't understand how Background(1:200, ground) is picked up. It looks to me like a statement disconnected from the others. I also don't understand how calling background("black") and sethue("white") in function ground affects anything. Are those some dynamic scope shenanigans? Or do those just modify some global variables? Generally, a lot of parts of the code don't seem connected in any way, I don't see how the data flows through code. Could someone familiar with Julia ELI5?

comment 4y ago · link · parent

If the comments aren't published automatically, but await your manual review, then why didn't you go with "comment by emailing me"? Was speed the motivation? (Obviously sending mails is far from fast.) Or did you consider a textbox to be a "smoother" experience for your users? Or just for the fun of implementing the comment system?
1
373839
55