Better HN
topnewbestaskshowjobs
Log inSign up

karl42

619 karma · joined Mar 19, 2013 (13y ago) · 91 submissions

Ideally, software should be free and simple.

https://www.karl.berlin

Submissions

comment 6mo ago · link · parent

The link is an HTTP proxy to the original content at gemini://zaibatsu.circumlunar.space/~solderpunk/gemlog/lua-as-a-practical-soft-bedrock-language.gmi

2.

Lua as a practical "soft-bedrock" language(portal.mozz.us ↗)

9 points · by karl42 · 6mo ago · 2 comments

comment 7mo ago · link · parent

> What is the better alternative?

One alternative is https://self.xyz . It generates ZK proofs from the digital signature on your e-passport or national ID card. That allows you to prove "human" or "over 18" or "not on the OFAC list" without revealing your name, date of birth or nationality.

Disclosure: I'm an advisor for Self

comment 7mo ago · link · parent

Do you see a way to help and improve the situation?

comment 7mo ago · link · parent

https://djot.net/ seems to be very sane and still very similar to markdown. And after reading the CommonMark spec, I appreciate the saneness very much. CommonMark did a great job at describing all the rules and edge cases, but it clearly shows how messy markdown is.

What do you all think of Djot?

6.

Can We Make Simpler Software with LLMs?(karl.berlin ↗)

2 points · by karl42 · 8mo ago · discuss

comment 8mo ago · link · parent

Fortunately, AI can also be used to reduce complexity. The case I noticed most often is to use the slightly more ugly API, or duplicate some generic code, but avoid pulling in a dependency. Examples are avoiding UI frameworks and directly accessing the DOM in simple web projects, using the CLI arg parser from the stdlib or adding simple helper functions rather than pulling in left-pad like dependencies.

Since managing dependencies is one of the major maintenance burdens in some of my projects (updating them, keeping their APIs in mind, complexity due to overgeneralization), this can help quite a lot.

See also https://www.karl.berlin/simplicity-by-llm.html for some of my thoughts regarding this.

comment 1y ago · link · parent

You could combine both by adding a stack frame each time the error is returned one level up. This could be done explicitly (cumbersome and not everyone will do it) or automatically by the language (weird magic, but useful).

comment 1y ago · link · parent

In a similar vein, I made https://www.wikdict.com/reader/sv-en/ , which adds translation pop-ups to each word in the input text. The cool thing compared to manually looking up words is that it will translate idioms/phrases (if they are in the dictionary) and split compound words (if they are not in the dictionary) into their translatable parts.

I also have some code to add the translations as pop-up footnotes to epub files (I like to use that on my e-reader). That is not mature enough yet for public usage, but if anyone wants to help testing it, I can run some e-books through it. Just let me know!

10.

FixScript, an Extensible Scripting Language(fixscript.org ↗)

1 points · by karl42 · 1y ago · discuss

comment 1y ago · link · parent

It doesn't have to. But if it does not end in .py, you have to add the --script (or -s for short) flag to tell it to interpret the file as a python script.

comment 1y ago · link · parent

You can install to your path with 'uv tool install'.

uvx is just an alias for 'uv tool run'.

comment 2y ago · link · parent

Debian splits their distribution into three components:

  * main (free software)
  * non-fee
  * contrib (free software that depends on software outside of main, so usually non-free software)
While I am not fond of the "contrib" terminology, I think this categorization makes a lot of sense.

comment 3y ago · link · parent

It shows "2023-11-15" below the title for me.

comment 3y ago · link · parent

The creators are encouraged to create engaging/addicting/long content if that is what causes higher payments. Therefore, I much preferred the original Flattr where I defined which creator was beneficial to me.

I don't think that Flattr2 is more true to a free markets vision than Flattr1. Neither do I believe that a free market is necessarily better than a regulated market. Markets are a highly useful tool, not a goal themselves.

comment 3y ago · link · parent

I do not want to support anything that optimizes for "engagement". It penalized all the really useful offerings that I use for a minute to solve my problem and then don't touch again in a long time and instead encourages addictiveness.

comment 3y ago · link · parent

I agree that `envsubst` is a good choice for this. Unfortunately, it is not part of posix, so you can't rely on it being present everywhere. But as part of gettext, it is still very common.

comment 3y ago · link · parent

Author here. Nice to see people appreciate simplicity. If you have any questions, feel free to ask!

comment 3y ago · link · parent

> I found his GEMINI approach quite funny - it strips out most of the formatting with a regexp.

Do you mean the regexp in https://github.com/karlb/karl.berlin/blob/master/blog.sh#L4 ? It doesn't remove the formatting, just HTML comments (because they would show up on the page, otherwise) and rel="me" attributes (because they don't work with md2gemini). Feel free to read the blog post about adding Gemini support for more details: https://www.karl.berlin/gemini-blog.html

comment 3y ago · link · parent

Did you try fugitive as a Magic replacement?

https://github.com/tpope/vim-fugitive

comment 3y ago · link · parent

The one thing that keeps me from using it more often for scripting is the lack of a fail-on-error mode (similar to `set -e` on bash). I know it is hard to get this to behave well in all cases (e.g. pipefail) but I don't want to do much scripting without it.

22.

Dioxus: Fullstack GUI library for desktop, web, mobile, and more(github.com ↗)

32 points · by karl42 · 3y ago · 8 comments

comment 3y ago · link · parent

> If you can figure out a protocol where ads don't work, I'm in.

Is it even theoretically possible to create such a protocol? Preventing tracking is feasible, but telling apart ads from real content does not sound solvable on a protocol level.

comment 3y ago · link · parent

I have that problem, too. Can you recommend any counter-measures?

comment 3y ago · link · parent

Python packages are available for sqlean as well: https://github.com/karlb/sqlite-sqlean/.

comment 3y ago · link · parent

If you are interested in pip installable versions of SQLite's spellfix and ICU extensions, have a look at https://github.com/karlb/sqlite-spellfix and https://github.com/karlb/sqlite-icu.

In contrast to the submission, these can be installed even when no pre-built wheel is available (but ICU requires the ICU-dev package in that case, which limits the advantage). Since these are based on the official SQLite extensions written in C, this is much easier to achieve than with the rust extensions in the submission.

27.

Embed Neovim in Chrome, Firefox and Others(github.com ↗)

35 points · by karl42 · 3y ago · 1 comment

comment 4y ago · link · parent

I fully agree. The parent wrote "before changing directory", so I assumed we are talking about the case where changing directory was necessary.

comment 4y ago · link · parent

> - It may be useful to copy `$PWD` into a variable before changing directory

Why not use pushd/popd instead?

30.

Helix: A post-modern text editor(helix-editor.com ↗)

4 points · by karl42 · 4y ago · 2 comments

1234