News for hackers. Stuff that matters.

chrisdalke

Re:How to build vector tiles from scratch on Friday September 05, 2025 @08:13AM (#45137632)
Exactly! I run a service that handles >1M tile requests per month served directly from PostGIS with ST_AsMVT etc. and file caching.
This is awesome.

What’s your plan for pricing?

In my opinion: you should bundle this as an offline electron app that can save to the filesystem and get integrated into existing PLM. and/or sell a team plan that offers cloud design & library sync

… and partner with that YC company doing wire harness machines for a “buy now” button

It really is great, haunting, nostalgic music that I associate with a formative time in my childhood. Beyond the game it’s also fantastic deep focus & coding soundtrack.

If you haven’t heard it, listen to Sweden or Aria Math.

Re:Our Journey Through Linux/Unix Landscapes on Thursday May 22, 2025 @11:19AM (#44062959)
Oh my bad, I missed that! That's well said. NixOS really does solve a lot of this but with the steepest learning curve I've ever seen.
Re:Our Journey Through Linux/Unix Landscapes on Wednesday May 21, 2025 @10:58AM (#44052178)
No mention of NixOS, which is miles ahead of every other operating system in terms of developer time spent tweaking endless configuration...
You joke, but there was a ferry accident (I think an NJ to Manhattan ferry) where control was lost because the control station… ran out of SD card space for logs and crashed
Cool! As a moonshot fun idea I’ve been interested in MCP as a way to use informal conversations to task robots. I’ll have to play around with this!

One example on unmanned boats: a human could radio to the boat over VHF and say “move 100 meters south”… that speech-to-text would feed to an LLM which extracts the meaning and calls the MCP.

I’ll have to install this and play around.

Re:Show HN: MavLink Input Plugin for Telegraf on Friday May 16, 2025 @03:39PM (#44009076)
I recently contributed this new plugin for Telegraf, Influx's open source telemetry agent.

This lets you collect metrics directly from a Mavlink stream, for example from an ArduPilot drone flight controller.

The end result is that you can now use standard telemetry pipeline tools - Telegraf, InfluxDB/VictoriaMetrics/TimescaleDB, and Grafana - to visualize livestreaming and historical data from drones.

I've been using this for the past few months professionally and it's been awesome to be able to use Grafana's graphing capabilities to plot things like vehicle speed, energy consumption, etc.

Re:Pathfinding on Thursday May 15, 2025 @10:33AM (#43995517)
Writing path planning code is one of the most enjoyable programming tasks. Love the visualizations.

The path following code is also interesting because I bet you'll run into some corner cases where the A* path thinks a path is feasible, but the vehicle overshoots and hits something. Although in a game I guess that adds to the fun & chaos.

On a technical level, this is a perfect use-case for PostGIS, which I'm a huge fan of.

Charts are hand-authored by government hydrography offices and encoded into a format called "S-57". These files contain spatial data for a small area, and different charts cover different zoom levels. This presents a few problems for web apps: Charts of different intended zoom levels cover other data, the full chart dataset is too large to stream, and charts aren't divided into xyz tiles cleanly.

To solve this, I run a bespoke pipeline which processes all nautical chart data into an internal format using PostGIS. From there, I merge all chart data together, overlaying higher accuracy charts over the lower accuracy charts. The pipeline performs a lot of data validation & reconciliation to remove bad data, then simplifies & renders to vector tiles.

PostGIS is critical to this - I started by using a bunch of python geometry manipulation libraries, and slowly shifted more and more of the processing into SQL queries as I realized how fast and intuitive it is.

If you just want to play around with the nautical chart rendering, check out https://app.vectorcharts.com/ - A free nautical chart viewer that demonstrates the vector charts API.

Show HN: Vector Charts – Add Nautical Charts to Your Web App

https://vectorcharts.com/

(TLDR: I made a new API to render maritime maps. If you just want to scroll around for fun, check out https://app.vectorcharts.com/, a free nautical chart viewer. And if you're interested in using nautical charts in your app, just sign up or reach out at https://vectorcharts.com/contact-us/ - I'd love to help you!)Hi HN! I'm making Vector Charts, an API product which allows nautical charts to...

( Read More... | 2 comments | 3 points | on HN )
Re:I Reversed a Drone and Landed It with My PC on Wednesday January 01, 2025 @09:47AM (#42566290)
It's probably the wrong place in the stack to implement this, these are very low-cost commodity microcontrollers running the firmware and the design of flight controller software is focused on time guarantees and reliability.

With the exception of low-cost consumer drones, most larger drones have at least a "Flight Controller" (embedded MCU handling guidance, navigation, and control) and a "Flight Computer" (Higher level *nix based computer running autonomy software), and the flight computer is IMO a more appropriate place to put this.

You could encrypt any Mavlink or proprietary protocol at the application layer if you're using an IP link, or you could also just rely on the telemetry radio to perform encryption between the drone and your ground station.

Re:I Reversed a Drone and Landed It with My PC on Wednesday January 01, 2025 @09:39AM (#42566242)
That was my thought, at least one of those packets in their snooping (src. port 14551 / dest port 14550) is the standard Mavlink port to send to the GCS.

I wonder if the proprietary packet they decoded here is actually just a MAV_CMD_DO_SET_MODE setting the drone into a takeoff flight mode.

Re:Are Immutable Linux Distros right for you? on Thursday December 26, 2024 @09:04PM (#42519387)
Which is… never trivial. I’d say 25-50% of my career so far has been repeatedly “fixing” clunky deployments of ROS, OpenCV, L4T, CUDA, cudnn, libc, etc. in Docker and Nix. Fun stuff!
Re:A Minecraft server written in COBOL on Thursday December 26, 2024 @09:00PM (#42519370)
Oh that’s awesome! I’ll have to try that.
Re:A Minecraft server written in COBOL on Thursday December 26, 2024 @10:58AM (#42515916)
There's actually two completely separate games (Java edition and Bedrock) that can't cross-play with each other. You can buy a Bedrock edition Minecraft for Windows that should be able to cross-play with the switch.

Java Edition is the original game and it's fairly easy to either host your own server (The dedicated server is just a .jar you run) or pay for a server ($10-40/mo) using a game server host.

Unsure about bedrock, there's some instructions here (https://www.reddit.com/r/Minecraft/wiki/bds/#wiki_bedrock_de...).

Re:Are Immutable Linux Distros right for you? on Wednesday December 25, 2024 @08:46AM (#42508747)
There are lots of companies using NixOS for this, BalenaOS (Yocto + Docker), or building their own bespoke tooling on top of a minimal Linux setup.

Although many places start with Ubuntu or Debian in my experience it’s common to invest a lot of time and energy in getting out of that unmanaged setup once the company scales.

Re:How Boston City Hall was born on Friday December 20, 2024 @05:09PM (#42475558)
The whole plaza should be grass and trees, agree it would change the entire look.
This is great. I can't count how many times I've setup an ad-hoc Slack bot that posts to a channel using the API. Each time it's usually the same, a lot of boilerplate to handle each platform's event stream and get the block layout looking nice in Slack.
Re:OpenStreetMap's New Vector Tiles on Tuesday November 19, 2024 @10:23PM (#42190571)
Yup. I work a lot with MVTs and one of the headaches is, after you have your nice shiny state-of-the-art maps, turning them back into PNG raster tiles for all the various clients that can't natively render vector tiles.

This link is shrinking though! There's slowly growing support. Leaflet and OpenLayers are fundamentally limited by being canvas-based, so there's only so much they can do.

QGIS has one of the fastest, cleanest MVT renderers I've seen, but I don't know how easy that would be to extract out.

PostGIS is the best platform for generating vector tiles, but it's extremely clunky. On the projects I'm working on (eg https://vectorcharts.com/) I do extensive processing in PostGIS, but then encode to vector tiles in bespoke C++ code.

Re:Show HN: Doom Inside an SVG on Monday October 21, 2024 @07:59AM (#41903183)
Wow that comment is super detailed, thanks for linking that.

“ IIRC the end solution that every browser went for was to just say "screw this" and drop most SVG features from SVGs loaded through image elements.”

Re:Show HN: Doom Inside an SVG on Sunday October 20, 2024 @09:26PM (#41899920)
I got nerd sniped by a tweet talking about JavaScript in SVG, and set out to find out if I could run DOOM inside an image. And it works, with some caveats.

This is technically an SVG that plays DOOM, including audio and interactivity. Pretty cool, although I'm not sure who had the bright idea to allow Javascript in SVG...

The SVG is just using <foreignObject> to create an HMTL namespace, creating a canvas, and then running js-dos / DOSBox in the canvas.

The big caveat, probably a good thing, is that JavaScript in SVG only works if you load the SVG directly and not inside an <img>, since browsers block this as an XSS prevention.

So this is not portable and can't be embedded in a webpage, but I guess was a fun use of a few hours...

Re:Why Use React for Game Development? on Saturday October 19, 2024 @01:04PM (#41888987)
I'd extend this to suggest vanilla JavaScript, HTML, and CSS is a great choice for recreational game development even if you aren't using React:

- Extremely forgiving syntax, great for quickly hacking around with concepts

- Shareable for effectively free via static sites to any modern device

- Live-reloading tools are ubiquitous

- HTML/CSS provides a significantly better styling & layout framework than any OpenGL UI toolkit

Re:Keep Track: 3D Satellite Toolkit on Monday September 30, 2024 @12:37PM (#41699156)
Only appears that way because of the size of the icons representing them (which at the base zoom level are kilometers wide). If it was drawn at real scale the objects would be insignificant.
For anyone who hasn't heard this story, Jon Bois has a very good audiovisual telling of his story: https://www.youtube.com/watch?v=E7w_v9J7iOc
Re:New Seafloor Map Only 25% Done, with 6 Years to Go on Thursday April 04, 2024 @07:43AM (#39929076)
S-57 charts are a derivative product manually authored based on hydrographic survey data. They differ from the raw data a little because they include extra metadata and hand-tweaked geometry to reflect safety issues.

To my knowledge S-100 is simply an updated “container” for ENC data and is replacing S-57. So it’s not necessarily related to this effort except that the new format may support gridded bathymetry data being encoded?

Re:Please don't make me use another QR code restaurant menu on Saturday January 20, 2024 @01:12PM (#39070481)
Full mobile ordering is great, but there’s lots of places that have the worst of both worlds: a QR code linking to a digital menu, but still take orders with the waiter

Older »