Investigating changes in the writing style of HackerNews users since the advent of LLMs.

Intro

An investigation into whether its possible to detect if a user has changed their writing style from looking at their comments. Could this be a potential method to detect users using LLMs? Or maybe just useful way to gain insight into how users have changed how they write and interact with the HackerNews site?

Given enough words a body of text can be “fingerprinted” – in better detail this is also known as “stylometry” – the measurement of a writing style. Can we detect if fingerprints change over time, and what would that tell us?

You can skip to the discussion, but overall, it looks like most active users are not using LLMs but there are patterns of normal usage that could be seen.

Try it: https://timwaters.github.io/HNfinger/

Project Home: https://github.com/timwaters/HNfinger

About

Like many on HackerNews (HN) I’m worried about AI slop masquerading as human, and wondered if some users were using LLMs in their comments. Detecting LLM writing is a kind of pattern recognition for me, I can smell when something seems off although its not really something I can set into a set of clear rules but if you are interested in that Wikipeda has a page about these signs.

I wanted to look at two things: 1) has a user changed their writing style and 2) could this new style be identified as LLM text? This project can only really answer the first question. The assumption is that if a user changed after the date of mass LLM adoption it might be possible that the change was due to them using LLM generated text.

Try it with your own username: https://timwaters.github.io/HNfinger/

This project shows how a user has changed their style over time, and shows the top 100 of users who may have changed the most after 2023. It uses the Clickhouse Playground to query Hacker News comments.

This project was inspired by this post about Antirez’s project Reproducing Hacker News writing style fingerprinting and by the comment underneath this submission by user zX41ZdbW https://news.ycombinator.com/item?id=43734314 the query of which was adapted in this project. Antirez’s tools and investigations looked at the stylometric fingerprint signature of users and compared it to users with similar writing styles.

The project was also inspired by https://news.ycombinator.com/item?id=46829029 which finally encouraged me to try this and put it behind a little interactive web page which queries the ClickHouse Playground: https://timwaters.github.io/HNfinger/

The dataset on ClickHouse Playground, added by zX41ZdbW `hackernews_history` is used. Free users of the playground cannot create tables, so we have to change the example query to use sub queries but substantially it’s similar.

The `hackernews_history` table may contain multiple versions of a comment. A comment may have been flag killed or deleted or otherwise edited. So there’s some deduplication so that only one comment text per comment row is recorded. There is a `hackernews` table on clickhouse playground without the history but this hasn’t been updated since 2023.

The method is a simple hashed-word cosine similarity. Words within a comment are split, hashed and put into one of 512 bins.

Only users with comments before Jan 2023 (mass adoption of LLMs) are counted.

Users must be somewhat active users.

It counts how many words users make in blocks of every half year (6 months). Users should have written more than 500 words in each half year block.

There are two queries: for a specific user, and for a batch of users. There is a python script that performs batches and then merges together the results, giving a final top_100.csv file of the users most likely to have changed style from before and after 2023.

For a specific user, a cumulative score of before 2023 is calculated and the output shows each active 6 month block before and after and gives similarity to that.

For the batch of users, a slightly different calculation is given in which users must have at least three 6 month blocks before and after 2023 where they have written more than 500 words.

The thumbnail / stylometric method used here is simple. Better methods could and should be used, for example, Burrows Delta calculates a reference text distribution. For example we could create a baseline distribution from all comments from all users and then that method would be good to see which users are most similar to other users. Ideally we want to determine two things, did the user change their writing and is the new writing identified as LLM text, so any similarity method can only really help with the former.

Results

For a user, the table will give a similarity score and difference to a baseline of “before 2023”. The larger the difference and the lower the similarity, the bigger the difference in the type of words used before and after. There are scores for each first and last half year periods too, as well as the number of tokens where 1 token is pretty much equal to 1 word. My own score was quite low because I’ve not posted much in recent years.

PeriodTokensSimilarity / 100Difference from before

For the top 100 users, it shows the number of first or last half year periods, the number of tokens pre and post 2023 and the similarity and difference compared to the 2023 baseline

Number of pre-23 periodsNumber of post-23 periodsbefore ’23 wordsafter ’23 wordsraw distanceafter 2023 similarity scoredifference from before 2023

CAVEAT: This data is almost probably wrong and should not imply anything about the users in general or any specific user.

CAVEAT: People should adapt and investigate themselves if they want to take this further. I am no expert in stylometry or LLM detection, or even performant SQL for that matter.

Overall, it looks like most active users are not using LLMs.

From the top 100 users, the range was 88 out of 100 to, at the top, 54 out of 100. The general picture with some closer examination of these accounts is that they do not seem to show LLM usage, but more like a change in how they comment and use the site (see below)

Discussion

There was more variation when the number of words in a time period was lowered, and this also lead to more “active” periods. These additional time periods had less activity and so the words written in these times would carry more weight. I decided 500 words in 6 months was a good compromise, but it might be smoothing over actual differences.

Probably more change will be calculated if there are less sample buckets – if the user signed up in 2022 and only posted a few times before and since, for example. Maybe instead of 6 months periods, we could look at 1 year?

The limit of 500 words per 6 months may filter out some LLM usage or small amount of text in many comments.

Note that users are not allowed to use AI generated text in comments, but this no LLM rule was introduced in 2026 (6ish months ago https://news.ycombinator.com/item?id=47340079). Before that some users may have used it, or may have mixed in with their normal writing from time to time. Determining that might be tricky.

Logically and generally most older users are not going to be changing their usage of social media substantially. While they may be early adopters generally I think they would also be most invested and care about the site.

Baseline calculation. While Jan 2023 was set as the time of mass LLM adoption as this was when the chatGPT was released into the wild (An AI Eternal September), for normal users it’s probably only in more recent years i.e. 2025 – 2026 that more and more people are actually using it for more things.

Change in topics. Since 2023 was a watershed moment, the topics that were discussed on HN also changed. The vocabulary we use when talking about LLMs have changed the overall vocabulary. It could be that any changes before and after may reflect these changes in topics.

Change in usage:
* Some types of comments, like the replies under “Ask HN: Who Wants To Be Hired” posts are formatted differently than usual comments and people will use different words. So if a user talked normally before and is now just using it to find jobs, the results would probably show this change.
* Show HNs also seem to be formatted differently from regular comments.
* As users grow and change their vocabulary changes in how they talk about things. (For me, depending on my reading habits I notice my own style changing to sometimes reflect my reading!)
* Many of the top users are changed their usage into being helpful users such as:
* Showing duplication submissions and past comments.
* Posting links to archival alternatives to submissions
* Comments about the guidelines, helping new users etc.

Improvements

Some things to do to make it more useful:

* Allow users to change the cutoff date for the queries.
* Automatically detect the dates of any major changes in writing styles.
* Use a better fingerprinting / stylometric algorithm.

My own LLM usage for this project

I used gtp-6.1-sol to help write the sql queries, the python batch script and the javascript in the html files. Totalling about 30 requests and 290K tokens spent

I don’t use LLM to write HN comments. And this blog post is 100% my own words too which is why it’s a bit hard to read!

—-

Try it: https://timwaters.github.io/HNfinger/
Project Home: https://github.com/timwaters/HNfinger


Please consider a donation if you liked this blog post https://www.paypal.me/timdevelops

OKLS – A Knowledge Learning System using LLM Agents

OKLS Knowledge Learning System is a portable, self-contained learning system built on top of an agentic coding framework – I’m using opencode with this project.

The system asks questions to gauge your understanding of a topic, and creates a learning plan for you. It then continues to ask and teach you based on where you are. You can also, if you are curious, see how your understanding develops over time.

Caveat: I’m not actually using this as an aid for learning stuff. Generally I don’t learn in this way and find talking to machines icky but I won’t rule out using it in theory for some things! I haven’t come up with a suitable subject I want to learn using this route but I had a slight desire to learn quantum computing (of which I know very little) and so that’s what I’m using with this. Its a very simplified teaching and learning system and I didn’t put a great thought into actual pedagogical processes here.

But I found it interesting and you might too…

Why did I do this?

Mainly to get familiar with opencode, agents and subagents. The code https://github.com/timwaters/okls is probably all in the wrong places but it seems to work.
I also wanted to explore how a LLM might be used for tailored learning about a topic.

How?

There are three main parts:

1. An initial interview to gauge initial understanding and create a skills gap document
The agent asks one question at a time in a kind of interview. It scores your answers, records the answers and continues until it maps at least five concept areas to make a skills gap document.
Usually the first question would be something like “how would you describe quantum computing to a friend?”

2. Create learning plan
The agent reviews the skills gap document, and based on that writes up a learning plan.

3. Teaching
During each session, the agent reads your learning plan and recorded knowledge gaps. It tries to teaches one concept at a time then updates stuff after every turn.

And the end of a session it updates any gaps and the context document – a kind of shared memory teacher notes so that next time it can pick up where it left off as well as recording the progress in the session itself.

Future

You can imagine that different subagents could use different LLMs, more expensive ones might be used for the writing the initial learning plan, less expensive ones for evaluating responses and writing files. I’m just using opencodes free Big Pickle provider for this example.

A larger software project might use this wrapped up as a specific agent so you might do /teach or /learn and it would switch into that mode to help the developer do a deep dive on a subject.

One thing I would like to add is a kind of “headteacher” agent which evaluates the quality of the teaching and can give feedback.


Better pedagogy:

This system is very simple and basic and doesn’t attempt to replicate how a teacher teaches or how a student learns. With some human expert input it could improve.

Generally these LLMs tend to be overly verbose and try to cram as much information as possible in one response, and ask multiple questions. I would prefer a simpler kind of learning, less information, one question, more interactivity perhaps. You can say “lets go back to this part” and review some earlier point but it kind of assumes that once it has given a lesson that you will understand it.


Code

Code: https://github.com/timwaters/okls

Did it help me learn quantum computing? Not really, but it did help in showing me how much I don’t know about the subject!

3D time enabled historical streetscapes re.city Kartta Labs with Google Research

Kartta Labs and re.city was a really cool Google Research project that I was involved in a few years ago. It enabled users to view, interact and contribute to historical streetscapes with a timeline. Working from historical maps, geo-rectifying them, tracing and digitizing buildings, adding historical photographs of buildings and with a catalogue of three dimensional models it produced a fascinating and engaging time enabled view into our past. The project was much bigger than I write about here so feel free to explore the videos at the end and linked blog posts and papers produced.

The project was launched on the Google AI Blog: Recreating Historical Streetscapes Using Deep Learning and Crowdsourcing
Covered by Venture Beat: Google launches Kartta Labs to recreate historical maps in 3D
And on Fast Company: This incredible Google experiment lets you time travel to your hometown 200 years ago
It was initially announced on the Google Open Source blog in late 2020.

Intro

Three dimensional city streetscapes were created with a timeslider control. The buildings were modelled using photographs of the frontages of the buildings, and the footprints from historical maps.

re.city kartta labs 3D streetscape from fastcompany
Animations from Google: https://research.google/blog/recreating-historical-streetscapes-using-deep-learning-and-crowdsourcing/

I work with museums, galleries and archives on a number of historical crowdsourced mapping projects. Notably the New York Public Library’s Map Warper platform. Today this lives on in https://mapwarper.net and on Wikimedia’s Map Warper https://warper.wmflabs.org. I’m also familiar with the OpenStreetMap stack of applications, vector and raster tiles, cartography and a bit of server infrastructure – all these came into play during this project.

The components and applications of the project all ran on Google Cloud Project and with Kubernetes via the Google Kubernetes Engine (GKE). It used Google single sign on so users need only log into one place and authenticate for the different applications.


Animation from Google: https://research.google/blog/recreating-historical-streetscapes-using-deep-learning-and-crowdsourcing/

Main components

The front page showed an interactive map with pan and zoom control, a time slider at the top, links to the other applications, and help and about pages etc. The main applications are the Warper, Editor and Reservoir.
This front page is where users can explore the map, select buildings to see or add historic photos of buildings and see the building footprints, and enter the interactive 3D view.

The maps layer was a custom style – to look vintage – using the colours inspired by 19th century street maps and with a subtle paper texture background.

Noter – application to allow a user to connect a building footprint and a face of a building based on geometry of a historic photo of a building

noter

Reservoir  – a repository of 3D models of buildings.

Reservoir

Warper was enhanced

Look for some of these improvements coming to the main mapwarper application soon. If there’s some you think are better than others let me know.

Quick Place

A new interface was added to help users quickly and easily place map images geographically. Users would see the collection of maps and could choose one to “quick place”.

There’s a simple scale and drag rotate the image on a map. You can either hit one “looks good” button, skip to do another or manually find a map to work on.

OCR for Geocoding

Using image processing + Google Cloud Vision for Optical Character Recognition, the map images are processed to extract any road names and any place names. Together with any map metadata, this can be help automatically locate the map, and could potentially be used for editing the features. This also helps users to rectify the maps, giving a good starting location.

I imagine that today’s more advanced AI image reading tools might give much better results.

Versioning

Maps had versions, enabling maps to be rolled back to other versions after a change in adding control points.

Social improvements

The users who worked on the map were stored and linked to so that a user could see who helped on the map, or see a call to action if no users had started on it.

Vector Tiles

Within the warper, vector tiles were added for rectification, and with a time slider, so users could see and rectify historic maps while looking at this map.

Other updates

The warper was updated to work via Docker and with Kubernetes. The Rails version was updated and OpenLayers was updated. As before, the vector tiles and time slider was integrated. (I note: One thing users of mapwarper.net suggest is that control points could be snapped to vector features).
The Trace tab was changed so that you could load the rectified map into the Editor’s ID editor as a background image with the time tags so the user can quickly get started tracing over the historical map directly into the database.
Mapwarper’s code was also updated to run with a later version of OpenLayers and the whole system with Docker.

Editor website

The editor website was a fork of the OpenStreetMap website and stack with the Id Editor and was Dockerized to work with Kubernetes and a GCP Cloud SQL Postgres server. This serves as the API where geometries of the buildings are kept.
One edit for the website was to pass through some query parameters to the iD editor, so for example to load a rectified historic map or default historic dates to the editor. The id editor was customised to have a better interface for start and end times for features.

Vector Tiles

Tegola vector tile server was used and also run in Docker and in Kubernetes. The data was exported from the API as a planet and replication files created, and added into another GCP Cloud SQL Postgres server for vector tiles. Postgres was also uses to make the replication and planet service. The vector features had time properties within them so the maps are able to filter it.

AI / Machine Learning / Neural Networks

The output of the crowdsourcing mapping process fed into a workflow that heavily used AI to help create the 3D rendered cityscapes. We also considered using AI to assist with the georectification process.

The following comes from https://research.google/blog/recreating-historical-streetscapes-using-deep-learning-and-crowdsourcing/

Starting with footprints on maps and façade regions in historical images (both are annotated by crowdsourcing or detected by automatic algorithms), the footprint of one input building is extruded upwards to generate its coarse 3D structure. The height of this extrusion is set to the number of floors from the corresponding metadata in the maps database.

In parallel, instead of directly inferring the detailed 3D structures of each façade as one entity, the 3D reconstruction pipeline recognizes all individual constituent components (e.g., windows, entries, stairs, etc.) and reconstructs their 3D structures separately based on their categories. Then these detailed 3D structures are merged with the coarse one for the final 3D mesh. The results are stored in a 3D repository and ready for 3D rendering.

The key technology powering this feature is a number of state-of-art deep learning models:

  • Faster region-based convolutional neural networks (RCNN) were trained using the façade component annotations for each target semantic class (e.g., windows, entries, stairs, etc), which are used to localize bounding-box level instances in historical images.
  • DeepLab, a semantic segmentation model, was trained to provide pixel-level labels for each semantic class.
  • A specifically designed neural network was trained to enforce high-level regularities within the same semantic class. This ensured that windows generated on a façade were equally spaced and consistent in shape with each other. This also facilitated consistency across different semantic classes such as stairs to ensure they are placed at reasonable positions and have consistent dimensions relative to the associated entry ways.

Videos

The project is over now but a bunch of videos covering all the components can be found on the YouTube channel:  https://www.youtube.com/@re-city8789


Present Time

Kartta Labs is now maintained by the Kartta Foundation associated (I think) with the University of Minnesota: https://kartta-foundation.github.io/

The Kartta Foundation is currently focused on spotting, linking and extracting text from historical maps, and have published a range of papers and lots of open source software. For example The mapKurator System: A Complete Pipeline for Extracting and Linking Text from Historical Maps (2023) and Hyper-Local Deformable Transformers for Text Spotting on Historical Maps (2024)

OpenHistoricalMap (OHM)

Want to do the same kind of project today? I’d suggest to start using OpenHistoricalMap.
I was involved in development and hosting of the OpenHistoricalMap project from the beginning and evangelize for the project at a number of conferences and whenever I can!

In some ways this project and OHM’s redesign happened at the same time, but for different purposes. re.city’s data is Open Data License (ODBL) which enables the use of OpenStreetMap’s data which is useful for existing city streets and buildings.  Users can then work back from today’s map into the past. This project was focused on cities. OpenHistoricalMap data is CC0 / Public Domain which potentially limits it’s ability to use OSM data but which which focuses on much wider historical timeframes and lots of existing historical data is public domain.

Terminalia 2026 Walking Sticks of Rock in York

The walk started from the theatre cafe and across the road was the Rock Garden. This rock garden was full of specimens of rocks around the region and theres a Rock Map in the middle.

From there it was on the search for rock sticks, but I first passed a hippy shop selling rocks, minerals and crystals.

Next stop was the Anglican Cathedral where the stoneyard worked rock and made them into gargoyles. I chatted with some american tourists about them.

Next stop was the first sweet shop for Sticks of Rock. I chose a “carnival” type the multicoloured one. For one pound. I then opened it and begun sucking it and licking it as I went.

I visited the cathedral shop and was told off for eating the rock. I left quickly.

Next I wandered the streets, holding the rock in my hand like a tourist might hold a “magic” wand from a harry potter themed shop.

At one point the stick suddenly broke and snapped off. And part of it crashed to the road and splintered. Tourists kicked bits of it down to the crossroads. At the exact point where it snapped was another sweet shop which sold sticks of rock. I took this as a sign but as what I dont know.

I think if there was many in the group it would be like a baton race. at this point someone else would buy one and take over. It could be good and performative if the group were all licking sticks of rock. I didn’t see anyone eating rock, but there were a few with ice creams. Walking around the shops just licking the rock stick (which lasted a long time and I didnt finish) is a kind of odd thing to do.

The “York Rock” had york lettering and a picture of the cathedral on it.

Back to a FOSS4G Conference, this time in Leeds

FOSS4G:UK was on last week, here in Leeds and I really enjoyed the two days. Here are some highlights and thoughts.

I think the highlight talk for me was Weiming Huang “Pretraining Geospatial Foundation Models with OpenStreetMap”. Weiming is a new geographer in Leeds University School of Geography. The talk was about AI model and OSM data. Foundation models are not generative models (like chatGPT for example) and they are not task specific models. They are representative model, self supervised. The models are not focused on the use but on the data. They can then be used for multiple tasks. CityFM City Foundation Model.

For each feature in the model (e.g. from OSM) we can look at it from 3 perspectives, visual, textual and locational. For each road we can see that it contains nearby Points of interest, roads and routes. We can associate features with other features. e.g. hospital vs cafe. The models have to be trained by area. I asked Weiming if his models could run on a browser. Potentially. He also used LORA to fine tune a llama to determine OSM Points of Interest. E.g. what are the names and location of cafes in this city. Something to look into. The models generally cant be used to compare between different areas. I wondered if they could be used to express the folksonomy, the way things are mapped and categorised – essentially making a taginfo of sorts?

Yuchi Lai did an interesting talk looking at bike trips in London. The tfl publish data about bike hire but only time and start and end destination. She used bike routing APIs to make routes between the two points. h3 polygons was used. Could be used to determine where best to put in new cycle paths. Cycle routes in area with trips.

Asli Doga Kanturk talked about geotagged and sentiment analysis of social media posts. Foursquare reviews were looked at for analysis of leisure hubs. It reminded me of the work with Geoiq on the twitter firehose a decade ago.

There were two historic talks, Unlocking Historic Planning Data which was about extracting plans from static pdfs, using computer vision. Georeferencing was a hard problem for them. There were many questions related to data quality and AI hallucinations. And Barry Rowlingson did a talk on “how I accidentally become an expert in an obscure WW2 coordinate system” with meditations on his life and how cities change over time.

Corridor chat pointed me to Lonboard: https://developmentseed.org/lonboard/latest/ to look at. Corridor chat – look at taxi driver brain scan navigation. Oxford circus tube station navigation studies by UCL. I also enjoyed talks on remote sensing (hyperspectral) and postgis tips and tricks (views and event triggers) amongst many others

Overall the conference was very interesting and inspiring. I remembered and was remembered by several attendees from past events! The conference was energizing. Many people mentioned psychogeography – and my gut tells me there may be some interesting AI applications here enough to propose a session for next time.

Animated taxi trips, close passes and statistical analysis with Geobase

I helped to make a Geobase blueprint application of mapping and analysing taxis, https://github.com/decision-labs/geobase-blueprint-taxi-analysis and also narrated the video:

Geobase, a serverless geospatial platform has a vector tile server, database functions, PostGIS, H3 and the MobilityDB extensions (amongst much more!) built in, and this quickstart blueprint uses all of them. On the front end we are using deck.gl and maplibre and typescript and react.

The application shows animated trails representing taxi trips in Porto, Portugal:

In the above animation you can see pulsing blue circles. These are where 2 taxis have passed close by next to each other within 10 metres. The point is actually the shortest distance between the two trips, where the taxis got the closest. Often it’s passing by on the street, and starting off by taxi ranks or dropping off in the same locations.

MobilityDB was mostly used, to represent the taxi trips as lines-with-time, in the vector tileserver function to serve these temporally aware lines, in the outlier detection and cleaning steps and in the close pass analysis steps.

The outlier detection step identifies and removes parts of the trip with impossible speeds. In the following image, the blue and red lines are the taxi trips, but the blue ones have many very straight and very long segments. These will have very high speeds. The red lines is the cleaned dataset

I’m impressed with MobilityDB, in the next image, the green polygon is a h3 hexagon. The purple line is one taxi trip, the light blue is the trip clipped to the hexagon, and the dark blue is the trip within the hexagon and clipped to a particular time frame.

Moreover, because Geobase is also PostGIS in the cloud, we can connect to it in QGIS, and here are the query layers in QGIS

Showing the clipped with time
The line is clipped to the timespan:
{[POINT(-965739.7745940761 5036826.935711992)@2013-07-01 09:27:07+00, POINT(-966081.4141113205 5036898.801939623)@2013-07-01 09:27:22+00, POINT(-966272.7055242998 5036942.099465625)@2013-07-01 09:27:30+00]}
showing the clipped to geometry

The processing is mostly performed with PostGIS. For example, to identify trips with outlier periods:

whenTrue(speed(temporal_geom) #> 55) AS high_speed_periods 

And then to remove these “high_speed_periods” from the trips:

  WHEN high_speed_periods IS NOT NULL THEN
    minusTime(temporal_geom, spanset(span(high_speed_periods)))
  ELSE
    temporal_geom

I hope you enjoy the video, I used OBS for the screen recording which gave me more control over it with the audio. My voice can sometimes be quiet so I hope the video is engaging for you.

And, if you have a Geobase project, I hope you can give the Geobase Blueprint for Taxis Analysis a try!

Video: Geobase Ship Movement Blueprint: Build Animated Maritime Maps

I helped make a video about how to get started with Geobase https://geobase.app/ with the ship movement blueprint quickstart. It’s using AIS (ship tracking) data, kind of like GPS for ships but with lots of extra info.


https://www.youtube.com/watch?v=XSfeKSQ-JG0

Geobase has automatically creates and serves vector tiles from any table or database function. With MobilityDB (and many other extensions) installed and enabled, we use a function to create vector tiles of the ship movements trajectories and because we have the timestamps we can have a timeline control too. On the front end it uses deck.gl to animate the trails.

The ship movements is a MobilityDB type, basically a special linestring of points-with-timestamp. And we can do things like work out the speed of the ship and compare to the reported speed in knots and see any difference. Simplification functions can be done on the data taking into consideration time and movement. So we could simplify based on the distance travelled, or the time taken, or just good old classic douglas peucker!

There’s also a function to query the ship data to create h3 hexagons of activity by drawing on the map. I hope it gives a quick and easy introduction into how Geobase can be used.

Geobase.app itself is very cool. There’s no free tier at the moment however – it’s just getting started. In a nutshell it’s Supabase (cloud based postgres) + PostGIS + Tile Server.

I’ll be needing better enunciation or a throat sweet for the future, but in the meantime you will have to listen to my softly spoken voice!

Code: https://github.com/decision-labs/geobase-blueprint-ship-movement

Python Website Uptime Telegram bot

I wanted to have a simple uptime script that checked one or two things: if a site was available of not, and/or if it had some specific text on the page.

For example if it was a website which showed a list of paintings, selecting for a string “artist” might give you a good gauge if the web application itself was working. Better than just whether the website was responding or not.

I built a Python script that uses the Telegram API to send messages to a specified account. I run it via cron so it can check the sites at regular intervals.

Interestingly, internally it uses the build in python library “shelve” https://docs.python.org/3/library/shelve.html to store data as simple database. It needs to store data so that it knows whether a site is up or not, and so not to send duplicate messages.

Config is simple bit of yaml where each site needs to have a unique name as that is what is stored as the key in the shelve database.

telegram_token: your_telegram_bot_token
telegram_chat: your_telegram_chat_id
sites:
  - name: uptime website 
    url: https://example.com
    monitor: head
  - name: example contains
    url: https://example.com
    string: example
    monitor: text

The full code is here: https://github.com/timwaters/cron_py_uptime

Whoots updates: Some changes, and add new PHP version

Whoots is a simple tile server proxy for WMS servers. WMS > TMS. So if you have an application that only works with ZYX Google-style tiles and all you have is a WMS server, you can use it to re-route the request.

It was created way back in 2010! Here’s the post announcing it: WhooTS a small wms to tile proxy – WMS in Potlatch

There’s been few recent changes.

  • Some validations to the code was added to make it a bit more secure.
  • image/png and image/jpeg will now work. Defaults to png. Optionally pass in ?format=image/jpeg for jpeg
  • You don’t need to have a map= param in the URL for it to work now.
  • Puma server configs added
  • new php port of the code
  • The server at whoots.mapwarper.net was moved to a shared host and is now running the php version

The code is at https://github.com/timwaters/whoots

Mapwarper.net emails improved

The Mapwarper.net server should be sending emails with the correct internals set up so they are less likely to end up in your spam inboxes now!

For many weeks users have emailed saying that they were having problems accessing their emails. Over the years some email providers have increased email sending requirements to protect against spam e.g. https://support.google.com/a/answer/81126?hl=en#zippy=%2Crequirements-for-all-senders so that at least SPF and DKIM are set up. Mapwarper.net should now have these. (It doesn’t currently have dmarc though.)

If you are interested in these things, with regards to spam, it seems that spammers set these up better than the rest of us! Spammers are better at SPF, DKIM, and DMARC than everyone else HN discussion: https://news.ycombinator.com/item?id=43468995