Topics Top articles New articles Updated articles Top users New users New discussions Top discussions New comments+ New article
A compiled executable under
/usr/bin/csvtool
, has an Ubuntu 23.04 package: manpages.ubuntu.com/manpages/lunar/en/man1/csvtool.1.htmlThere seems to be no sane filtering mechanism however: stackoverflow.com/questions/46540752/using-csvtool-call-to-filter-csv-in-bash
The fact that you cannot have trailing commans in lists or dicts as in is one of the most infuriating design choices of all time!!!
3,
at:{
"asdf": [
1,
2,
3,
]
}
echo '[{"a": 1, "b": 2}, {"b": 3}]' | jq '.[] | select(.a) | .a'
1
Represents image pixel by pixel, rather than by mathematical primitives such as done in vector graphics:
Smaller files, scalable image size, and editability. Why would you use anything else for programmatically generated images?!?!
Tinker Tailor Soldier Spy (TV series) by Ciro Santilli 35 Updated 2025-01-10 +Created 1970-01-01
- 1: Jim Prideaux captured. Some ex-colleague invites Smiley to dinner and keeps asking how incompetent people like Alleline climbed to the top of the Circus. Smiley recalled to service to meet Ricki Tarr.
- 2: Ricki Tarr tells his story to Smiley. Peter Guillam starts stealing material from the Circus, find missing page on the communication officer list. Smiley sets up his investigation operation.
- 3: Smiley meets Connie who tells that she was fired for suspecting Poliakov. Flashbacks show the ousting of Control and Smiley.
- 4: Guillam steals more material from the circus. While doing that, he is called by the top officers to inquire about Ricki Tarr being in England, which they suspect because they discovered that his family has come.
- 5: Jim Prideaux tells his story to Smiley, who cannot easily access the Circus reports about it. When he is returned to England, there was basically no debriefing, and Esterhase already knew about the Tinker Tailor codenames, presumably through Merlin.
- 6: Smiley hears the story of yet another ousted man, who heard the Russians knew in advance about Jim Prideaux' coming. Toby Esterhase dismissed him for alcoholism.
How to convert
async
to sync in JavaScript by Ciro Santilli 35 Updated 2025-01-10 +Created 1970-01-01God, it's impossible! You just have to convert the entire fucking call stack all the way up to async functions. It could mean refactoring hundreds of functions.
To be fair, there is a logic to this, if you put yourself within the crappiness of the JavaScript threading model. And Python is not that much better with its Global Interpreter Lock.
The problem is that async was introduced relatively late, previously we just had to use infinitely deep callback trees, which was worse:compared to the new infinitely more readable:But now we are in an endless period of transition between both worlds.
myAsync().then(ret => myAsync2(ret).then(ret2 => myAsync3(re3)))
ret = await myAsync()
ret2 = await myAsync2(ret)
ret3 = await myAsync3(ret3)
It is also worth mentioning that callbacks are still inescapable if you really want to fan out into a non-linear dependency graph, usually with
Promise.all
:await Promise.all([
myAsync(1).then(ret => myAsync2(ret)),
myAsync(2).then(ret => myAsync2(ret)),
])
Bibliography:
- stackoverflow.com/questions/21819858/how-to-wrap-async-function-calls-into-a-sync-function-in-node-js-or-javascript
- stackoverflow.com/questions/9121902/call-an-asynchronous-javascript-function-synchronously
- stackoverflow.com/questions/47227550/using-await-inside-non-async-function
- stackoverflow.com/questions/43832490/is-it-possible-to-use-await-without-async-in-js
- stackoverflow.com/questions/6921895/synchronous-delay-in-code-execution
And then, after many many hours of this work, you might notice that the new code is way, way way slower than before, because making small functions
async
has a large performance impact: madelinemiller.dev/blog/javascript-promise-overhead/. Real world case with a 4x slowdown: github.com/ourbigbook/ourbigbook/tree/async-slow.Anyways, since you Googled here, you might as well learn the standard pattern to convert callbacks functions into async functions using a promise: stackoverflow.com/questions/4708787/get-password-from-input-using-node-js/71868483#71868483
PNG reference implementation. Ahh, if feels good to have a dominating open source reference implementation.
We need a TV adaptation of this, urgently!!!
en.wikipedia.org/wiki/The_Honourable_Schoolboy#Adaptations mentions:
Jonathan Powell, producer of Tinker, Tailor, Soldier, Spy (1979), said the BBC considered producing The Honourable Schoolboy but a production in South East Asia was considered prohibitively expensive and therefore the BBC instead adapted the third novel of the Karla Trilogy, Smiley's People (1979)
Default mathematics typesetting used in OurBigBook Markup.
Key issues:
- github.com/KaTeX/KaTeX/issues/2228
newcommand
did not support optional arguments
XML, ain't nobody ever going to write that manually.
This is good software.
If it only it were written in JavaScript instead of Haskell (!?), then Ciro might have used it as the basis for OurBigBook Markup.
Ciro Santilli was contributing to this, when CommonMark left private mode and killed it, thus wasting many hours of Ciro's time.
See also: Ciro Santilli's minor projects.
Pinned article: ourbigbook/introduction-to-the-ourbigbook-project
Welcome to the OurBigBook Project! Our goal is to create the perfect publishing platform for STEM subjects, and get university-level students to write the best free STEM tutorials ever.
Everyone is welcome to create an account and play with the site: ourbigbook.com/go/register. We belive that students themselves can write amazing tutorials, but teachers are welcome too. You can write about anything you want, it doesn't have to be STEM or even educational. Silly test content is very welcome and you won't be penalized in any way. Just keep it legal!
We have two killer features:
- topics: topics group articles by different users with the same title, e.g. here is the topic for the "Fundamental Theorem of Calculus" ourbigbook.com/go/topic/fundamental-theorem-of-calculusArticles of different users are sorted by upvote within each article page. This feature is a bit like:
- a Wikipedia where each user can have their own version of each article
- a Q&A website like Stack Overflow, where multiple people can give their views on a given topic, and the best ones are sorted by upvote. Except you don't need to wait for someone to ask first, and any topic goes, no matter how narrow or broad
This feature makes it possible for readers to find better explanations of any topic created by other writers. And it allows writers to create an explanation in a place that readers might actually find it. - local editing: you can store all your personal knowledge base content locally in a plaintext markup format that can be edited locally and published either:This way you can be sure that even if OurBigBook.com were to go down one day (which we have no plans to do as it is quite cheap to host!), your content will still be perfectly readable as a static site.
- to OurBigBook.com to get awesome multi-user features like topics and likes
- as HTML files to a static website, which you can host yourself for free on many external providers like GitHub Pages, and remain in full control
- Internal cross file references done right:
- Infinitely deep tables of contents:
All our software is open source and hosted at: github.com/ourbigbook/ourbigbook
Further documentation can be found at: docs.ourbigbook.com
Feel free to reach our to us for any help or suggestions: docs.ourbigbook.com/#contact