Better HN
topnewbestaskshowjobs
Log inSign up

ColonelPhantom

645 karma · joined Oct 28, 2016 (10y ago) · 374 submissions

Submissions

comment 3y ago · link · parent

I'd really rather not have like, 4 giant balloon like buttons, instead of the simple yet powerful menu&toolbar setup that N++ has used for what, multiple decades at this point? And it's great: the menus contain a LOT of functionality, and the toolbar also contains quite a bit of the most-used stuff.

comment 3y ago · link · parent

Personally I would use htmx and roundtrips for all sorts of modification including data (such as reorganizing two rows in a table). But you'd also do that in an SPA, right? How do you prevent desyncs there? Also for e.g. sorting you'd need a server roundtrip anyway in the (likely) case where you use something like pagination or lazy loading.

For sending data, you would just have a reply that instructs HTMX to display a success message. On an SPA you'd have the same. With both, you can interact with the page while the data is being sent.

Of course, sometimes you want purely 'cosmetic' actions, such as an "add row" button that pops open some data entry fields. For something like that you should not use htmx itself, but instead basic vanilla JS or a simple library such as https://alpinejs.dev/ which complements htmx nicely for client-side stuff.

comment 3y ago · link · parent

> Indeed, I now hear acquaintances on the right referring to them derisively as the 'alphabet mafia.' I wonder if maybe it's gotten meaningless when there are so many letters.

Is Christianity also meaningless then? https://en.wikipedia.org/wiki/List_of_Christian_denomination...

comment 3y ago · link · parent

The cheapest NVidia GPU with 11+GB VRAM is probably the 2060 12GB, although the 3060 12GB would be a better choice.

The setup.py file seems to indicate that PyTorch is used, which I think can also run on AMD GPUs, provided you are on Linux.

comment 3y ago · link · parent

However, Linux wants you to submit piecemeal patches. Not patches that are a mess and then fixed with a later "woops" commit.

Instead, every single part of your patch should be in a small standalone commit, as far as I understand it.

comment 3y ago · link · parent

Were you using KDE on X11? On Wayland, I can change my scaling setting per-display.

comment 3y ago · link · parent

I thought rlua was safer than mlua? Am I mistaken there and has the situation perhaps changed, or are you claiming rlua requires you to use unsafe{} in various places?

comment 3y ago · link · parent

My main problem with Nix isn't the language, which is fine. My problem is that Nix shoehorns everything into it; I have to write my nginx config (for example) in Nix for some bespoke nixpkg.

I would much rather just version my nginx config written in nginx config, and let Nix pull that up, or something like that. Then you get all the benefits of Nix (I think?) but my configuration is also readable for someone who doesn't know Nix. Plus I can use my existing knowledge (as well as the wealth of online available docs), instead of something obscure.

comment 3y ago · link · parent

> And even then, the HIP C++ compiler library is bundled as part of Orochi instead of being part of the app. This means that your app using Orochi will not run on a future GPU gen unless it's updated against a newer Orochi runtime.

Ugh. Leave it to AMD to make something that technically works but is an absolute nightmare.

IIRC this machine code nonsense is also the reason that GPU support is such an issue for AMD: to 'support' a chip, they need to bake binaries for that chip in all libraries. So to enable RDNA1, they'd need to ship RDNA1 code in all their libraries, which would make the install size balloon to crazy levels. At least Intel got it right.

I do believe that running oneAPI on AMD is possible, but it still needs HIP/ROCm? Wonder if it would be possible to bake a L0 backend for AMD that just uses SPIR-V like the Intel stuff does, side-stepping this issue entirely.

Frankly I wish AMD and Intel just started working together more on this stuff. Both of them stand to gain from a cross-vendor standard that works well.

comment 3y ago · link · parent

What do you mean by a polyglot compiler infrastructure? Are you referring to the fact that CUDA source is single-file (your host and device code are in the same compilation unit?) Or do you mean that you can ship the same binary to different GPU architectures?

SYCL solves the first issue, and SPIR-V solves the second one. (OpenCL mostly avoids the issue in general though by making you ship source which is then compiled by the driver, but SPIR-V allows you to ship a 'binary' instead).

No clue as for debugging and IDE tooling, but I did find a rocgdb binary on my Linux ROCm installation (which is for HIP, not SYCL). No clue what oneAPI offers for debugging.

Furthermore, Clang (and hence clangd) speaks HIP and I think SYCL too. So the non-runtime IDE tooling should work.

Finally, a lot of GPU libraries are I think available for ROCm/HIP too. It's unfortunate that the HIP stack sucks enormously in other ways.

comment 3y ago · link · parent

A big part of the reason is that Blender on Nvidia supports hardware accelerated ray tracing using OptiX. HIP-RT exists, but is not used in Blender yet. I think the Intel oneAPI backend for Arc GPUs also misses RT acceleration.

AMD claims to have HIP-RT working internally, but not yet suitable for posting publically. Intel is planning it, I think. Both should land around Blender 3.6, if I'm not mistaken.

If you take the raw FLOPS, CUDA (not OptiX) and HIP are actually nearly equivalent in performance last I remember. I think RDNA2 just does "more with less", at least in terms of gaming performance per FLOP (e.g. due to the huge cache).

comment 3y ago · link · parent

The problem described is not that you have to statically link your HIP kernels. (I think they even have https://gpuopen.com/orochi/ which explicitly allows compiling a single binary for both ROCm and CUDA).

The problem is that using machine code makes it machine-specific. So if I compile a HIP program for my gfx803 (RX 580) card, I won't be able to run the same binary on someone else's 6800 XT (gfx103x) system. (I think technically you can put both in a single binary, but that's still a terrible solution).

CUDA instead ships NVPTX, which is an IR that can be compiled by the driver to machine code as long as the GPU has the right compute capability, similar to how it works in the graphics world (you submit your GLSL/HLSL source code or SPIR bytecode) to the driver which compiles it for the right GPU.

Intel's oneAPI/Level Zero API ships SPIR-V, afaik (or maybe regular SPIR?). oneAPI can also work on top of OpenCL instead of L0. SPIR-V is neat because it's an open standard, so in theory you can get L0 working on non-Intel GPUs (and iirc Intel also uses it for e.g. FPGA's). But both SPIR-V and NVPTX solve the "machine-specific" problem AMD has.

comment 3y ago · link · parent

I'm not sure if I've entirely grokked the idea of components, but can't you define them server-side? So write them as some template magic that creates the "inner HTML". Then you just need some HTMX to enable using the component in a richer way.

It's not really Web Components as specified, but iirc those are generally pretty much JS-dependent? But hypermedia's reliance on server side rendering means that you can just move this logic to the server.

comment 3y ago · link · parent

Congratulations? I'm not saying you need to care or whatever, I'm just saying you shouldn't dismiss people who do need to care for whatever reason.

Great that you always have access to a computer with 64+ GB RAM, but not everyone is quite so lucky.

comment 3y ago · link · parent

GNOME 3 isn't the current version anymore. GNOME 3.40 got released as GNOME 40 instead, which was succeeded by 41, 42 and now 43.

Personally I understand the criticism of GNOME 3, but I liked it a lot more than the GNOME 40 series. I've switched to KDE Plasma around this summer, I think from GNOME 42.

comment 3y ago · link · parent

I thought Meta is usually Alt? Or am I confusing it with Mod?

AFAIK Haiku has things like copy on Alt. So you'd have to press Alt+C to copy.

Personally, I would prefer to keep the "Windows"/Super key free for OS-wide shortcuts, e.g. tap=search, hold=drag window with mouse, Super+enter=terminal, Super+h=minimize (as in GNOME), Super+w = overview (as in KDE), etc. Using Alt for that and Super for commands would also work, but is somewhat counterintuitive to me as Super has the logo of an OS on it. On the other hand it is the same key order as used by macOS.

comment 3y ago · link · parent

That's some crazy powerful hardware, and would be a significant upgrade for most people.

My main and only laptop (apart from some ancient ones) has a quadcore i5-8350U and 8GB RAM. (I kind of want to upgrade its RAM though)

I also have a PC, that I upgraded to a Ryzen 7 5800 and 32GB RAM recently, but a few months ago it was an i7-4790K with 8GB RAM.

Sure, 8GB RAM is quite little, but it's still within the mainstream. In laptops quad-core CPUs also only became mainstream in the last few years, let alone more than that.

FWIW, I don't have any real performance issues with Jetbrains IDEs on either of my machines, but I don't use them much either as I don't like the convoluted user interface.

comment 4y ago · link · parent

I'm also slightly puzzled at saying "compilation is too slow!" followed by "I want to do anything during compilation". I think these are somewhat opposed to each other.

Obviously it's not the only reason for slowness (stuff like templates vs vtables for example are also a huge impact), but at some point I tried to do some more advanced comptime stuff in Zig (it's pretty long ago, around Zig 0.6 or 0.7), and it became incredibly slow to compile. I'd assume it's gotten better with the newer and faster self-hosting compiler, but it still shows that with full comptime programming you can make your compiler as slow as your comptime program.

comment 4y ago · link · parent

The only difference between exceptions and Result are that you need to change your return type to Result, and that you need to add a ? after calls that might fail.

There's also a bit of annoying typing stuff involved, but generally with something like the anyhow crate you can handwave that away too.

comment 4y ago · link · parent

Rust has many convenient shorthands like the ? operator, where `let x = foo()?` is equivalent to

  let x = match foo() {
      Ok(value) -> value,
      Err(e) -> return Err(e),
  }

comment 4y ago · link · parent

I believe LuaJIT also has a C FFI that should allow for faster function calls compared to the native Lua API.

comment 4y ago · link · parent

Purely technical telemetry like this is indeed useful. The problem comes when telemetry is used to justify deleting useful features such as compact mode.

The "make it hard to find" to "nobody uses it" to "let's delete it" pipeline is very real. Reminds me of the "defund it" -> "it does not work" -> "let's privatize it" pipeline in right-wing governments.

comment 4y ago · link · parent

Yes, but when you suddenly die, you don't think "hey, let's bring down this website" like Elon has: https://twitter.com/elonmusk/status/1592177471654604800

comment 4y ago · link · parent

On the other hand, I don't think any other vendors aim for compatibility with CUDA. Intel is laser focused on oneAPI which is just SYCL iirc. Sure, SYCL is cool and all, but you cannot trivially translate most CUDA programs to SYCL like you can with HIP.

comment 4y ago · link · parent

I think the main problem is lack of expressiveness (what does True mean?). Since your examples seem to be in Python, I would solve it there with named parameters, maybe even giving them default values. That way the code may be abstract, but it is also informative.

comment 4y ago · link · parent

The main problem I imagine is that you do not have a real way to deal with errors; you need to reply with 200 OK before you send anything else. There's also no separate channel for errors analogous to stderr.

comment 4y ago · link · parent

Even if JetBrains does support your language more "natively", what makes it better than using a language server?

As a student I can use JetBrains tools for free but personally, I'd much rather use something like VSCode combined with clangd than e.g. CLion, as I don't see anything that would make CLion better, while the JetBrains UI is downright cluttered.

As for keyboard use, the command pallete (Ctrl+Shift+P) is right there and should be able to do anything. And thanks to the magic of language servers you can use any editor you like, including (Neo)Vim or Emacs, while keeping most of the capability for language specific stuff.

comment 4y ago · link · parent

I think the opposite is true; I haven't experienced much if any bugs in VSCode (although it's a resource hog), and other editors including Neovim can get a ton of modern IDE-like functionality with LSP servers.

LSP has made it much easier to use something like Neovim instead of a big IDE without feeling like you're missing out on much.

comment 4y ago · link · parent

Sure; companies would expect their employees to check the license. Remember that a lot of them consider GPL (especially AGPL) software "radioactive", so it will still effectively dissuade them.

However, it is likely that many engineers will skip checking their sources. I guess for this to work Copilot should include the attribution automatically in a comment.

The real problem is that doing this is not possible for Copilot, because the tool itself does not know the source.

comment 4y ago · link · parent

Then I contact the copyright holder (or one of the many, in case of e.g. the Linux kernel). They probably care, or else they would not use the GPL. I also believe there are organizations that can help such as the Software Freedom Conservancy.
1
8910
13