The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,860 other subscribers

Archive for April 24th, 2025

Finding most recent forks of gists and github repositories

Posted by jpluimers on 2025/04/24

A while ago I found out that gist.github.com/lynatan/673e574faa8343fa01d7a91e75065c54 which I mentioned before in Delphi analog to C# ?? null-coalescing operator and Light Table like debugger evaluation and I wanted to

  1. find it back
  2. find the most recent forks of it

The reason was that I was working on the [WaybackSave/Archive] bit Time Professionals on X: “Live now: “Hidden Gems of Delphi Language: Operator Overloading and Class/Record helpers” @jpluimers” session which I presented at [Wayback/Archive] ITDevCon 2024 | Home where I also could enjoy the company of the other [Wayback/Archive] ITDevCon 2024 | Speakers and the famous [Wayback/Archive] IT DevCon 2024 speaker dinner (which attendees can also join for a slight surcharge).

The presentation is at [Wayback/Archive] ITDevCon2024/delphi_language_hidden_gems/delphi_language_hidden_gems.md at main · jpluimers/ITDevCon2024 · GitHub and pictures of the event at [Wayback/Archive] ITDevCon2024 – Google Photos.

Back to the problem at hand

Read the rest of this entry »

Posted in Conference Topics, Conferences, Delphi, Development, DVCS - Distributed Version Control, Event, gist, GitHub, ITDevCon, Software Development, Source Code Management | Leave a Comment »

TIL you can run SQL queries directly against CSV files as a one-liner using the default sqlite3 command line utility

Posted by jpluimers on 2025/04/24

[Wayback/Archive] One-liner for running queries against CSV files with SQLite | Simon Willison’s TILs

I figured out how to run a SQL query directly against a CSV file using the sqlite3 command-line utility:
sqlite3 :memory: -cmd '.mode csv' -cmd '.import taxi.csv taxi' \
  'SELECT passenger_count, COUNT(*), AVG(total_amount) FROM taxi GROUP BY passenger_count'
This uses the special :memory: filename to open an in-memory database. Then it uses two -cmd options to turn on CSV mode and import the taxi.csv file into a table called taxi. Then it runs the SQL query.
Instead of setting the mode with .mode you can use .import -csv like this (thanks, [Wayback/Archive] Mark Lawrence):
sqlite3 :memory: -cmd '.import -csv taxi.csv taxi' \
  'SELECT passenger_count, COUNT(*), AVG(total_amount) FROM taxi GROUP BY passenger_count'

Via [Wayback/Archive] Simon Willison on Twitter: “TIL you can run SQL queries directly against CSV files as a one-liner using the default sqlite3 command line utility”

Read the rest of this entry »

Posted in CSV, Database Development, Development, Software Development, SQLite | Leave a Comment »