Archive for the ‘Development’ Category
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.
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 »
Posted by jpluimers on 2025/04/23
[Wayback/Archive] How TINY Can I go? The BEST Power Board is here! – YouTube – GreatScott!
I will try to remake an AliExpress PCB. It is a very handy voltage converter that can take a varying battery voltage and convert it into 3.3V or 5V while only requiring very little current (25uA) on the input. Sounds awesome, but the board is way too huge. That is why I try to push the size limits in this video to the minimum.
Via: [Wayback/Archive] Making a Tiny PCB Design #electronics #diy #greatscott #science #engineering #pcb #tiny – YouTube
--jeroen
Read the rest of this entry »
Posted in Development, Electronics Development, Hardware, Hardware Development, Power User, USB, USB-C | Tagged: DIY, electronics, engineering, greatscott, pcb, science, tiny | Leave a Comment »
Posted by jpluimers on 2025/04/23
A while ago, I needed to investigate reboot events on some Windows 10 systems. I wanted to use the console instead of the eventvwr GUI Event Viewer.
There is a tool for that called wevtutil which – like eventvwr – uses XPath query parameters and produces XML output.
Postprocessing XML can be a thing, but since .NET has great XML support, you can use PowerShell for that (which for me often is way easier than going the XSLT route, for instance because Windows lacks built-in console XSLT tooling).
Based on the help and the below links, my query command then on these machines turned out to be this: Read the rest of this entry »
Posted in Batch-Files, CommandLine, Development, PowerShell, PowerShell, Scripting, Software Development, XML, XML/XSD, XPath, XSLT | Leave a Comment »
Posted by jpluimers on 2025/04/22
Waar velen al over waarschuwden gebeurt ook in het Nederlandstalige gebied: AI-gegenereerde web-pagina’s komen hoog in de zoekresultaten en vervuilen daarmee Large Language Models van nieuwe AI-tools.
Voorbeelden die ik tegenkwam:
Ze zijn echt heel makkelijk te ontkrachten, ondanks dat de tekst er heel mooi en netjes uitziet: de inhoud klopt gewoon, en juist dat de tekst er zo mooi en netjes uitziet maakte het voor mij verdacht.
De eerste site is het oude domain van [Wayback/Archive] Baarnse Onafhankelijke Partij wat al heel snel na het opheffen van die partij (zie Baarnse Onafhankelijke Partij – Wikipedia) werd overgenomen.
De domains behoren beide tot SEO sites.
Queries die zowel laten zien hoe hoog sommige pagina’s komen als hoe eenvoudig hun inhoud te ontkrachten is:
--jeroen
Posted in AI and ML; Artificial Intelligence & Machine Learning, Development, LLM, Software Development | Leave a Comment »
Posted by jpluimers on 2025/04/22
From a long time ago, but the (impressive!) leaderboard still has the same order (the Rust implementation did get faster!).
[Wayback/Archive] Towards Inserting One Billion Rows in SQLite Under A Minute – blag
Recently, I ran into a situation where I needed a test database with lots of rows and needed it fast. So I did what any programmer would do: wrote a Python script to generate the DB. Unfortunately, it was slow. Really slow. So I did what any programmer would do: went down the rabbit hole of learning more about SQLite, Python, and eventually Rust… in my quest to get a 1B row database under a minute. This blog post is a summary of this fun and educational exercise.
Repository at [Wayback/Archive] avinassh/fast-sqlite3-inserts: Some bunch of test scripts to generate a SQLite DB with 1B rows in fastest possible way
Leaderboard
(for 100M insertions)
| Variant |
Time |
| Rust |
23 seconds |
| PyPy |
126 seconds |
| CPython |
210 seconds |
Via: [Wayback/Archive] Shawn Wildermuth #000000 { lives: matter; } 🇺🇦 on Twitter: “Towards Inserting One Billion Rows in SQLite Under A Minute””
--jeroen
Read the rest of this entry »
Posted in Database Development, Development, SQLite | Tagged: 000000 | Leave a Comment »
Posted by jpluimers on 2025/04/16
Just in case I ever think “oh, I might try want to go the Variadic function arguments way in Delphi” again, I must remember “maybe not a good idea” and re-read these posts:
- [Wayback/Archive] Variadic function – Wikipedia which in C is implemented with in [Wayback/Archive]
varargs.h – Wikipedia (now in [Wayback/Archive] stdarg.h – Wikipedia) with the identifiers va_list, va_start, va_arg, and va_end.
- [Wayback/Archive] Delphi “array of const” to “varargs” – Stack Overflow with great insights from former Delphi compiler developer [Wayback/Archive] Barry Kelly.
- [Wayback/Archive] E2591 Only
cdecl functions may use varargs (Delphi) – RAD Studio (I already knew this, but it is good to have that bit linked here as well)
- [Wayback/Archive] gmp-wrapper-for-delphi/gmp_lib.pas at master · EricGrange/gmp-wrapper-for-delphi · GitHub with an example how
varargs support got introduced in Delphi 6: for external cdecl functions.
- [Wayback/Archive] Rudy’s Delphi Corner – Pitfalls of converting (still *the* reference article on translating C/C++ headers to Delphi) has this on
varargs:
Fortunately, since Delphi 6, you can declare external functions like wsprintf using the varargs directive.
- [Wayback/Archive] How to create a Delphi variadic method similar to Write/Writeln without requiring brackets for arguments? – Algorithms, Data Structures and Class Design – Delphi-PRAXiS [en] has a nice 64-bit Delphi example using the undocumented Delphi identifiers
TVarArgList, VarArgStart, VarArgGetValue, and VarArgEnd.
Note that this example, despite the description indicates it is, it is actually not varargs by array of const (which requires using TVarRec as under the hood it is an open array of TVarRec): [Wayback/Archive] How to create functions that can accept variable number of parameters such as Format().
Then some Free Pascal links, which is different from, but also similar to Delphi:
Queries:
--jeroen
Posted in .NET, C, C#, Delphi, Development, FreePascal, Pascal, Software Development | Leave a Comment »
Posted by jpluimers on 2025/04/16
From a few years back when Lightning debugging cables were either expensive, hard or not to get at all: [Wayback/Archive] DEF CON 30 – stacksmashing – The Hitchhacker’s Guide to iPhone Lightning and JTAG Hacking – YouTube.
Basically it is a Raspberry Pi Zero with adapted firmware connected to half a lightning extension cable.
A textual description (I wish it was linked from the above video) is at [Wayback/Archive] stacksmashing – The hitchhacker’s guide to iPhone Lightning & JTAG hacking – DEF CON Forums, which in turn refers to:
Read the rest of this entry »
Posted in Development, Hardware Development, iOS, iPhone, Power User, Red team, Security | Tagged: checkm8 | Leave a Comment »
Posted by jpluimers on 2025/04/15
Empirically, these are show the same behaviour where “command 2″and “command 3″are documented, but still present a lot as the only solution in blog posts and help sites:
git config commands
command 1: list |
command 2: --list |
command 3: -l |
what config is shown |
git config list --local |
git config --list --local |
git config -l --local |
--local config for current repository |
git config list --global |
git config --list --global |
git config -l --global |
--global config for the current user |
git config list --system |
git config --list --system |
git config -l --system |
--system config for all users |
git config list |
git config --list |
git config -l |
all 3 levels of config combined, for convenience
without telling which configuration setting is on which level |
Based on [Wayback/Archive] git config: list all variables and their default values – Stack Overflow (thanks [Wayback/Archive] Matteo Meil): Read the rest of this entry »
Posted in Development, DVCS - Distributed Version Control, git, Software Development, Source Code Management, Versioning | Leave a Comment »