sigmoid.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
A social space for people researching, working with, or just interested in AI!

Server stats:

583
active users

#json

11 posts10 participants3 posts today

Why #GIMP #AppImage #crashes on #Linux then trying to export / #save files to #tmpfs? A #bug ?

/tmp/.mount_GIMP-3ChpMMA/usr/lib/x86_64-linux-gnu/gimp/3.0/plug-ins/script-fu/script-fu: fatal error: GIMP crashed

(script-fu:34154): LibGimp-WARNING **: 13:15:26.695: script-fu: gimp_flush(): error: Broken pipe
fish: Job 1, 'GIMP-3.0.4-x86_64.AppImage --ve…' terminated by signal SIGSEGV (Address boundary error)

After some testing, and getting crazy about it, I debugged moar. It seems that the problem is a .json file in the tmpfs dir, it seems to crash GIMP. There’s clearly something very wrong.

Just for fun I created this file: gimp-denial-of-service-attack.json

Feel free to use that to troll colleagues. Place it is some directory they’re likely going to use with GIMP, just for lulz. - Don’t ask me, why it crashes GIMP. #json #gimp #crash

Fascinating, sometimes json-files get broke, e.g if more but one process writes them or a process crashes during writing or something…

I found a way to fix this, jq seems to have a sane error correction so I do something like

cat original.json | jq . > tempfile
mv original.json original.json.broke
mv tempfile original.json

and it's just fixed. Sure some data will be lost or whatever, but I have mechanisms to find wrong data, but this is easy to fix syntax errors.

I have a #Python string that contains a JSON serialized dict. It might be relatively large and I'm only interested in the value of a single top level key.

Is there an existing solution - a kind of streaming SAX parser for #JSON - that could handle such a scenario?

I would like to have proper JSON parsing to be sure that the data is valid. But I don't want to build the full dict in memory and just pick one single value.

Any recommendations? @faassen perhaps?

Edit: xq has an option --xml-force-list <node> that can be used to force the tool to recognize the given nodes as a list. This fixes things for me. Thanks for all the help. 🙂

Any good recommendations for a Linux CLI tool to query XML documents? Until now I've used xq, but I ran into an edge case that's relevant to me.
xq uses jq under the hood and transforms the XML to JSON for that.
However, if you've got something like

<list>
  <entry>
   ...
  </entry>
</list>

xq doesn't know that list should be a list, making the jq query fail if there's only one entry.

A curse on all those who generate JSON data with subfielded keys.

...I'm looking at you Dell PERC, with all your "Drive /c0/e32/s9 - Detailed Information" nonsense. - I KNOW what the device attachment is (I GAVE you that on the command line), what I want is CONSISTENT key names I can use JQ to filter on (This key should be "Drive Detailed Information" - or something even LESS of a mouthful).

En cette journée de célébration du patrimoine, félicitations au wikimédien Ayack qui a migré les données des monuments historiques 🇫🇷 vers le nouveau système d'affichage des graphiques ! Pour faire de même :

- Données commons.wikimedia.org/wiki/Dat
- Graphique commons.wikimedia.org/wiki/Dat
- Transclusion fr.wikipedia.org/wiki/Monument

🛢️ Tabiew — зручний інструмент для перегляду таблиць прямо в терміналі. Підтримує роботу в стилі Vim і дозволяє робити #SQL-запити до даних.

Основні можливості:
🔸Підтримка #CSV, #Parquet, #Arrow, #Excel, #JSON та інших форматів
🔸Вбудований SQL-двигун для фільтрації та аналізу даних в терміналі
🔸Vim-подібні хоткеї
🔸Неявний пошук і мульти-табличні операції
🔸Вбудовані теми оформлення

Сумісний з macOS та Linux, встановлюється через пакетний менеджер або Cargo.

github.com/shshemi/tabiew

KSON: A 💌 to the humans maintaining computer configurations

KSON combines the strengths of YAML and JSON. With KSON you can write files that are easy to read, edit, and debug—without worrying about invisible whitespace errors or missing commas.

🛠️ kson.org

kson.orgKSON.orgKSON - A love letter to the humans maintaining computer configurations. Robust and efficient like JSON, clean and readable like YAML.
#kson#code#config