HNHacker News
TopNewBestAskShowJobs

hornetblack

255 karma · joined June 2, 2012

submissionscomments
hornetblack··on YouTube CEO on Facebook video ambitions: 'They should get back to baby pictures'
Also notifications.

All my notifications are groups these days.

hornetblack··on Meltdown Update Kernel doesnt boot
Web assembly.

Llvm won't use it for anything. (I think it starts putting things at 8). Trying to access it explicitly in C will generate `unreachable` instructions.

hornetblack··on Sway 1.0 is not going to support the Nvidia proprietary driver
Nope. You use Vulkan WSI and Swapchain extensions instead of EGL. https://www.khronos.org/registry/vulkan/specs/1.0-wsi_extens...
hornetblack··on Sway 1.0 is not going to support the Nvidia proprietary driver
There's also the new external imaage/fence and semaphore support in Vulkan. Which looks like it perform the parts done by gbm without referencing gbm explicitly.

Last I checked it was only in a mesa dev version. But it would be a standard hopefully everyone using Vulkan can support

hornetblack··on Benefits of named return values in Go
Oh. That actually make more sense.
hornetblack··on Undefined Behavior in 2017
An important point: if you provide a safe wrapper around some unsafe code it's up to the programmer to ensure the above is true.
hornetblack··on Benefits of named return values in Go
Originally it compiled to Plan9 assembly which is cross platform. They have an SSA backend for some architectures now.
hornetblack··on Apple Dylan IDE (2014)
C has some fun ones:

a * b;

Is either: a times b if a is a var, or declare a varible b with type a. If a is a typedef.

Also:

some_type b = {a, b, c, d};

Is only valid if some_type is an array or a struct. Which is possibly defined elsewhere in the source.

(I tend to see this syntax in some code bases (some_type) { a, b, c, d }, which is a bit better).

hornetblack··on If It Weren’t for Apple, Hybrid App Development Would Be the Winner Over Native
I think Intent services do this on Android. I'm not sure as I am new to it.
hornetblack··on Kill Google AMP before it kills the web
> it breaks the decade-old system-wide iOS behavior of being able to tap the status bar to scroll to the top of any scrollable view

Is that what was happening. It just felt like scroll was spazzing out. Usually I was just trying to push a button near the top of the screen.

hornetblack··on A proposal to move Gnome to GitLab
Seems to be used by Firefox. Seems to only have a C++ api. Which might limit adaptation, although I suspect that most potential users might be using C++ anyway.

Edit: Servo has rust bindings for it, so they might also be using it.

hornetblack··on Linux Programming: Signals the easy way
Last time I used C I set a SIGSEGV handler that printed a stack-trace and exited. Which made debugging somewhat easier. (Although It was often segfaulting in libwayland, which didn't help as much as I would like)

SIGBUS is simialr to SIGSEGV (It happens if a mmap is larger that the backing file and you try to read the unbacked memory). You basically have to handle it if you don't control the backing file, Eg: with shared memory when the other process resizes it after you've mmap'd it. libwayland-server can install one for you that replaces the map with 0'd memory.

hornetblack··on Testing the Windows Subsystem for Linux
For some context: amd64 has 256TiB of address space. So 1 dozen is half a percent of what seems like a mind boggling amount of address space.
hornetblack··on Going native
>> The advantages of having a cross platform application developed in 1/3rd the time especially for new applications are huge (faster time to market, larger number of people for validation) > I'm not entirely sure the premise here is accurate. I suspect that an experienced Qt developer could produce a basic native application in roughly the same time as an Electron developer, but with a fraction of the overhead.

One difference here is there a lot of JS developers available to hire an much fewer Qt or even C++ devs.

hornetblack··on 2038: Only 21 years away
People get bans on XBox Live until 9999-12-31 I guess it's probably just an Input validation thing. Also I think it's fair to given most people their account back after that amount of time.
hornetblack··on Real-time notifications from systemd to Slack
Thanks. I figured this was possible. I just never got around to looking at loginctl's options.
hornetblack··on Real-time notifications from systemd to Slack
systemd has --user option, which makes it a service manager for a particular user, if that's what you mean. I used it for some time to run an emacs daemon. (until I found that it closed between logouts and changed to using the system manager isntead)
hornetblack··on Rust's Type System Is Turing-Complete: Type-Level Programming in Rust
From memory I solved it using more CPS and currying. Well manually currying with functions like curry1, curry2, etc...

Although I'm pretty sure you can overload the Fn* traits to implement currying in Rust. (Fn traits are unstable). Which is neat.

    // Something like this:
    impl<F, A, B, R> (FnOnce(A) -> Curry<F, A, B>)  for  F
        where F: FnOnce(A, B) -> R,
    { ... }

    // and
    impl<F, A, B, R> (FnOnce(B) -> R) for Curry<F, A, B>
        where F: FnOnce(A, B) -> R

I think I got it working... but you would need some work for more arguments. (And it worked different on different versions of rust-nightly :/)
hornetblack··on Rust's Type System Is Turing-Complete: Type-Level Programming in Rust
I have managed to hit the recursion limit in rust before: https://is.gd/7IH5gE

What happens in rust closures have a unique type[1]. So the recursive call in cps_factorial, instantiates a new cps_factorial which contains a new unique closure type which instantiates a new cps_factorial...

[1] This is done so that closure calls can be determined statically reducing run-time overhead and helps optimisation.

hornetblack··on Mathematical Notation in Emacs
In Haskell's unicode package `undefined` is the bottom symbol (⊥, UP TACK). Which is probably closer to None than the Empty set.

(However because UP TACK is a mathematical symbol, so Haskell parses it as an Operator and so it must be wrapped in brackets: `(⊥)`)

hornetblack··on Why Do Americans Refrigerate Their Eggs?
I've heard that they remove the surface of the shell as well.
hornetblack··on Facebook Has No First Amendment Right to Send Unauthorized Texts, Says Court
There is also m.messenger.com.

Although trying that it seems the certificate isn't trusted by iOS Safari.

hornetblack··on Facebook Has No First Amendment Right to Send Unauthorized Texts, Says Court
Just using facebook or just using messenger without the other is a pain. Also first time I used FB Messenger on a new phone (an iPhone after using android). Went through several screens of "Add your phone number", "Constantly upload all your contacts!" and "Invite your friends to messenger". all with well hidden ui for skipping each step (particularly the last one).

If I wanted to contact people on messenger they would already have messenger.

hornetblack··on Posix Has Become Outdated (2016) [pdf]
It might be worth noting that the original unix designers introduced containers to unix (as "Namespaces") in Plan9.
hornetblack··on Apple proposes new web 3D graphics API
The WebGPU code there looks a lot like vulkan. Just no big struct's or vk prefixes.
hornetblack··on Short intro to C++ for Rust developers: Ownership and Borrowing
Kinda but:

    trait Copy: Clone {}
Copy is nearly always done by memcpy/memmove. When Copy is invoked it won't use the `Clone::clone` method: https://is.gd/2hMyNP. i.e. Clone is always explicit.

Added: Essentially Copy is the same as a move, but the original value is still valid.

hornetblack··on Lavabit Reloaded
Hex maybe?
hornetblack··on Debian 8.7 released
Mesa was the only for a while. (You need libgbm and a DRM+KMS driver to make a compositor and/or EGL_WL_bind_wayland_display for an embedded one). So that only worked with Intel and AMD GPUs. Nvidia now has EGLDevice and EGLStream for their drivers, and they provided patches for Weston and GNOME has added support as well.
hornetblack··on Semi-hosting on ARM with Rust
> The "volatile" option indicates that the code has side-effects and should not be by removed by optimizations.

I think volatile also means don't change the order with respect to other volatile operations.

hornetblack··on How breakpoints are set
There is also remote debugging. Via network or JTAG.
← PreviousPage 2 of 7Next →