HNHacker News
TopNewBestAskShowJobs

adamzegelin

543 karma · joined October 22, 2012

submissionscomments
adamzegelin··on The biggest CRT ever made: Sony's PVM-4300
For big screen projected analog sources (aka, a video signal rather than film) there was this amazing piece of tech: https://en.wikipedia.org/wiki/Eidophor

A mirror coated in a thin layer of oil that is deformed by electrostatic charges.

adamzegelin··on Nvidia Open GPU Linux Kernel Driver Soon Be the Default for Turing, Newer GPUs
Anything important and proprietary is now in firmware.
adamzegelin··on How SSH port became 22 (2017)
On Linux, /etc/services often contains a list of at least protocol names and numbers.
adamzegelin··on Libwebsockets: pure C library for http, websockets, MQTT
My comment was suggesting that it's more than just a "lightweight" HTTP/websockets/MQTT library.

The majority of the things I list are optional features of the core library (rather than examples) enabled by cmake flags, some of which look to be enabled by default:

  option(LWS_WITH_JPEG "Enable stateful JPEG stream decoder" ON)
I would be slightly surprised if I saw a dependency on "libwebsockets" and found that it brought in a JPEG decoder, for example.

All these extra features may imply that it's grown past its original goals, and that the other bits and pieces could be split into smaller parts, etc.

adamzegelin··on Libwebsockets: pure C library for http, websockets, MQTT
HTTP, websockets, MQTT, ... plus the kitchen sink it seems:

  - JSON parsing
  - DNS, DHCP and NTP clients
  - SOCKS5 proxy support
  - DBUS client and server
  - Threadpools
  - SSH
  - JPEG and PNG decoding
  - HTML and CSS parsing
  - DOM layout and rendering to a frame buffer
  - OTA update client
  - GPIO, i2c, PWM, SPI
  - SSH server
  - ACME client 
  - ...
adamzegelin··on DIY IP-KVM Based on Raspberry Pi
Probably do-able using Pipewire/Pulseaudio.

I just tried, and I'm able to pair both my Macbook Pro and iPhone to my Linux desktop PC. The PC has Kensington Bluetooth USB dongle. Both the MBP and iPhone can simultaneously play audio over Bluetooth and I can route the incoming audio to a pair of wired headphones. The volume of each stream is independently adjustable via `pavucontrol`.

I also tried pairing a bluetooth headset, but the audio was choppy. Maybe too much bandwidth for 3 devices streaming audio at once? Maybe another dongle would work?

Note that at one point I was experimenting with receiving BT audio on my PC. I can't remember the exact set of configuration changes needed to make this work (if any -- it might've worked out of the box). But the stack is BlueZ + Pipewire on Archlinux.

Pipewire (and Pulse) have a lot of modules and config knobs. Might be possible to get auto-switch working too. They also expose a D-Bus interface, so control from some sort of e.g. Python webapp from your phone is likely.

adamzegelin··on New RAM card, prototype Mac Portable, demo System 7
Impressive that Apple keeps support documentation for such old products.
adamzegelin··on I wrote my own smart home software
> Why does any of it operate on remote cloud API calls when it could operate locally?

Vendor lock-in, and gives them the ability in the future to hold your devices hostage by requiring you to pay a subscription fee.

Various IoT platforms, eg Tyua (which gets rebranded a lot), sell a complete package that is totally cloud oriented. Configure the product behavior online, click order, purchase 10000 controller chips preflashed with firmware implementing said behavior, integrate with devices, slap logo on it, sell.

Also, maybe the developers of these products only know how to write cloud enabled software? (slightly joking)

adamzegelin··on API Mismatch: Why bolting SQL onto noSQL is a bad idea
See also: Cassandra and CQL.
adamzegelin··on Canonical shows ads in the Ubuntu CLI
> installing the bootloader to the MBR

You mean copying bootx64.efi onto the ESP, right?

It's 2022... MBR is beyond ancient at this point!

adamzegelin··on An X11 apologist tries Wayland
You can also use Gimp via a RDP or VNC session, which will give much better performance on low-bandwidth connections, since those protocols do damage detection, only sending updates of what's changed, and (lossy) compression.

I'm not an expert, but my understanding is that the whole X11 is network transparent thing worked great when apps used the X11 drawing primitives. These days a significant number of X11 apps just render _everything_ (often including window decorations) "server-side" as bitmaps and then send them over the wire to the client to composite them. Essentially the X11 wire protocol has become a bitmap pipe.

Wayland does the "bitmap pipe" thing more efficiently than X11.

adamzegelin··on WebKit Downloads for macOS and Linux
Chrome doesn't use WebKit. Google forked WK many years ago into Blink [1]

[1] https://en.wikipedia.org/wiki/Blink_(browser_engine)

adamzegelin··on Desktop Environments Resource Usage Comparison
Just a quick experiment:

I started 4 copies of VLC. `top` shows this:

     PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND                                                                                                                                                                  
 1806287 adam      20   0 1091068  74664  56228 S   0.0   0.2   0:00.22 vlc                                                                                                                                                                      
 1806426 adam      20   0 1091064  74548  56128 S   0.0   0.2   0:00.21 vlc                                                                                                                                                                      
 1806537 adam      20   0 1091064  74572  56144 S   0.0   0.2   0:00.22 vlc                                                                                                                                                                      
 1806600 adam      20   0 1091064  74960  56536 S   0.0   0.2   0:00.23 vlc                                                                                                                                                                      
Summing RES (RSS) gives 298744.

VLC loads many shared libraries:

    $ lsof -p 1806426 | grep .so | wc -l
    195
I'd hope some/most of those are shared between the instances of VLC and are included in SHR (if I'm reading the top man page correctly).

Doing RES-SHR isn't totally correct either. Those shared pages might be "marked as shared" (i.e, a .so that's only loaded by one process). But lets assume that most of what VLC uses as SHR is shared libraries, and they're used by each instance.

RES-SHR = 73708

I also ran `free` before and after launching the 4 instances of VLC. Used increased by 66068. Hard to rely on the accuracy of this number since this is a desktop system and I'd imagine used goes up and down all the time. But it's strikingly close to the RES-SHR figure.

IMHO just summing RES isn't correct.

Linux memory usage is complex.

adamzegelin··on Desktop Environments Resource Usage Comparison
Isn't summing RSS going to end up with the wrong numbers?

My understanding is that RSS is memory allocated (heap + stack) + executable pages inclusive of shared libraries.

i.e, if 10 processes load libfoobar which is 10MB of code, each processes RSS value will be 10MB higher. So if you sum RSS you see 10 x 10MB or 100MB extra usage. But the pages for that library will be shared across processes, with the result that "real ram usage" only goes up by 10MB.

Please correct me if I'm wrong. This is based on my understanding of Linux too. FreeBSD might be different.

adamzegelin··on Apache Hop 2.0
Cadence: https://cadenceworkflow.io
adamzegelin··on USB-C hubs and my slow descent into madness (2021)
I've had good success with a 1x4 KVM from Level1Techs. I use it paired with a Alienware AW3418DW 3440x1440 120Hz G-Sync monitor. My PC has a NVIDIA 2080 and G-Sync+120Hz works fine through the KVM. I also have my MBP connected, via a CalDigit dock, and it can push 120Hz to the monitor too.

Level1Techs a small shop that I discovered via their YouTube channel. While they don't manufacturer the KVM themselves (all to common, see the OP link), they look to have done rigorous testing and compatibility analysis. They claim it works up to 3840x2160@120hz because it supports DP 1.4.

https://store.level1techs.com/products/14-display-port-kvm-s...

adamzegelin··on Reverse engineering the 1988 NeXT keyboard protocol
Check out Sigrok: https://www.sigrok.org
adamzegelin··on LVGL – Light and Versatile Graphics Library
seems like LVGL has direct support for the frame buffer: https://github.com/lvgl/lv_drivers/blob/master/display/fbdev...

other devices are supported too

adamzegelin··on Django for Startup Founders: A better software architecture for SaaS startups
> Their library also contains C extensions with undefined behavior, and telemetry that phones home.

Source for this?

adamzegelin··on Z3 – ZFS to S3 Backup/Restore Tool
Great to see more tooling in the ZFS space, especially around send/receive. I'd like to see more around snapshot management too.

Last release in 2016 though?

adamzegelin··on 100Mbps uploads and downloads should be US broadband standard, senators say
While we're at it, can we convince the Australian govt. too please?

Something like 10/5 is considered "fast enough".

adamzegelin··on It Can Happen to You
The problem is that `s.index` with an `offset` equal to `limitedBy` returns non-nil index, rather than nil, but that index is invalid (out of bounds) and causes the program to blow up...

    let s = "Swift"
    
    print(s.index(s.startIndex, offsetBy: 4, limitedBy: s.endIndex))
    print(s.index(s.startIndex, offsetBy: 5, limitedBy: s.endIndex))
    print(s.index(s.startIndex, offsetBy: 6, limitedBy: s.endIndex))
outputs:

    Optional(Swift.String.Index(_rawBits: 262401))
    Optional(Swift.String.Index(_rawBits: 327681)) <-  this is unexpected
    nil
adamzegelin··on Refactoring the FreeBSD Kernel with Checked C [pdf]
> The "C" in C stands for compatible.

Source?

Wiki says:

> A successor to the programming language B, C was originally developed at Bell Labs by Dennis Ritchie between 1972 and 1973 to construct utilities running on Unix.

> In 1972, Ritchie started to improve B, which resulted in creating a new language C.

https://en.wikipedia.org/wiki/C_%28programming_language

adamzegelin··on Monitoring demystified: A guide for logging, tracing, metrics
> if you're using the Dropwizard Metrics library, for example, you've already lost.

Can you go into a bit more detail here? Curious to know where Dropwizzard goes wrong.

I prefer to use the Prometheus client libraries where possible. Prometheus' data model is "richer" -- metric families and labels, rather than just named metrics. Adapting from Dropwizzard to Prometheus is a pain, and never results in the data feeling "native" to Prometheus.

adamzegelin··on 1991 Macintosh Quadra with Mac OS 8.1 as an Electron App
Missing the best Mac classic game: Lemmings!
adamzegelin··on Teleport 4.3: Modern Replacement for OpenSSH
> It's as if they have no clue what ssh is or does.

It's marketing speak geared towards managers who have no idea what SSH is or does.

adamzegelin··on Scraping Roger Ebert’s reviews and finding his favorite movies on Amazon Prime
Safari too. I just discovered that modern user agents don't include table borders by default in their stylesheets -- at least, choosing Develop -> Disable Styles didn't make the table borders appear.

I'm having flashbacks to the chiseled borders of Netscape.

adamzegelin··on OBS (macOS) Virtual Camera
Soundflower + AULab (download from https://developer.apple.com/download/more/), both free.

Alt AULab link, without the requirement of an Apple ID to download: https://www.apple.com/ca/itunes/mastered-for-itunes/

adamzegelin··on Mary Dash's Writing Tips
When is it best to use formal (bureaucratic) vs informal (conversational) language?

When writing reports and documentation I prefer formal language, but for blogs I switch over to informal.

adamzegelin··on REBOL Oneliners
PPC definitely won't work on Catalina. PPC support was dropped from macOS years ago.

The Intel binary is 32-bit only. Catalina will only run 64-bit binaries.

    $ file rebol 
    rebol: Mach-O executable i386
Page 1 of 3Next →