en
Feedback
Alan Urmancheev's blog

Alan Urmancheev's blog

Open in Telegram
219
Subscribers
No data24 hours
+17 days
+530 days

Data loading in progress...

Attracting Subscribers
November '25
November '25
+1
in 0 channels
October '25
+120
in 0 channels
Get PRO
September '250
in 0 channels
Get PRO
August '250
in 2 channels
Get PRO
July '250
in 0 channels
Get PRO
June '250
in 0 channels
Get PRO
May '250
in 0 channels
Get PRO
April '250
in 0 channels
Get PRO
March '250
in 0 channels
Get PRO
February '250
in 0 channels
Get PRO
January '250
in 0 channels
Get PRO
December '240
in 0 channels
Get PRO
November '240
in 0 channels
Get PRO
October '240
in 0 channels
Get PRO
September '240
in 0 channels
Get PRO
August '24
+23
in 0 channels
Get PRO
July '240
in 0 channels
Get PRO
June '24
+14
in 0 channels
Get PRO
May '240
in 0 channels
Get PRO
April '24
+6
in 0 channels
Get PRO
March '240
in 0 channels
Get PRO
February '240
in 0 channels
Get PRO
January '24
+57
in 0 channels
Date
Subscriber Growth
Mentions
Channels
03 November0
02 November+1
01 November0
Channel Posts
Repost from Zhovner Hub
Π˜Ρ‰Π΅ΠΌ Linux мастСра для Π½ΠΎΠ²ΠΎΠ³ΠΎ Flipper One ΠœΡ‹ Π΄Π΅Π»Π°Π΅ΠΌ Π½ΠΎΠ²Ρ‹ΠΉ Flipper One β€” это ARM-ΠΊΠΎΠΌΠΏΡŒΡŽΡ‚Π΅Ρ€ Π½Π° Linux Π½Π° Π±Π°Π·Π΅ процСссора RK3576.
Π˜Ρ‰Π΅ΠΌ Linux мастСра для Π½ΠΎΠ²ΠΎΠ³ΠΎ Flipper One ΠœΡ‹ Π΄Π΅Π»Π°Π΅ΠΌ Π½ΠΎΠ²Ρ‹ΠΉ Flipper One β€” это ARM-ΠΊΠΎΠΌΠΏΡŒΡŽΡ‚Π΅Ρ€ Π½Π° Linux Π½Π° Π±Π°Π·Π΅ процСссора RK3576. ΠœΡ‹ Ρ…ΠΎΡ‚ΠΈΠΌ ΡΠ»Π΅ΠΏΠΈΡ‚ΡŒ для Π½Π΅Π³ΠΎ свой кастомный дистрибутив. ΠœΡ‹ Π½Π΅ Ρ…ΠΎΡ‚ΠΈΠΌ ΠΈΡΠΏΠΎΠ»ΡŒΠ·ΠΎΠ²Π°Ρ‚ΡŒ ΡƒΡΡ‚Π°Ρ€Π΅Π²ΡˆΠΈΠ΅ систСмны обновлСния Π²Ρ€ΠΎΠ΄Π΅ Debian APT. ΠŸΠΎΡ‡Π΅ΠΌΡƒ классичСская систСма ΠΎΠ±Π½ΠΎΠ²Π»Π΅Π½ΠΈΠΉ APT Π½Π°ΠΌ Π½Π΅ ΠΏΠΎΠ΄Ρ…ΠΎΠ΄ΠΈΡ‚: β€’ ОбновлСниС Π»Π΅Π³ΠΊΠΎ ΠΌΠΎΠΆΠ΅Ρ‚ ΡΠ»ΠΎΠΌΠ°Ρ‚ΡŒΡΡ Π½Π° сСрСдинС ΠΈ систСма станСт Π½Π΅ консистСнтна β€’ НСльзя ΠΎΡ‚ΠΊΠ°Ρ‚ΠΈΡ‚ΡŒΡΡ ΠΊ ΠΏΡ€Π΅Π΄Ρ‹Π΄ΡƒΡ‰Π΅ΠΉ вСрсии β€’ НСльзя ΡΠ±Ρ€ΠΎΡΠΈΡ‚ΡŒ настройки Π² Π΄Π΅Ρ„ΠΎΠ»Ρ‚Π½Ρ‹Π΅ ΠŸΠΎΡΡ‚ΠΎΠΌΡƒ ΠΌΡ‹ ΠΈΡ‰Π΅ΠΌ спСца ΠΏΠΎ Linux дистрибутивам, ΠΊΠΎΡ‚ΠΎΡ€Ρ‹ΠΉ спроСктируСт дистрибутив для Flipper One Π½Π° основС ΠΌΠΎΠ΄Π½ΠΎΠΉ ΠΌΠΎΠ΄Π΅Π»ΠΈ с A/B-Ρ€Π°Π·Π΄Π΅Π»Π°ΠΌΠΈ, read-only ΠΊΠΎΡ€Π½Π΅Π²Ρ‹ΠΌ Ρ€Π°Π·Π΄Π΅Π»ΠΎΠΌ ΠΈ Π°Ρ‚ΠΎΠΌΠ°Ρ€Π½Ρ‹ΠΌΠΈ обновлСниями. Π₯ΠΎΡ‚ΠΈΠΌ ΠΈΡΠΏΠΎΠ»ΡŒΠ·ΠΎΠ²Π°Ρ‚ΡŒ Π½Π°Ρ€Π°Π±ΠΎΡ‚ΠΊΠΈ ΡΡƒΡ‰Π΅ΡΡ‚Π²ΡƒΡŽΡ‰ΠΈΡ… ΠΏΡ€ΠΎΠ΅ΠΊΡ‚ΠΎΠ², Ρ‚ΠΈΠΏΠ° SteamOS, OSTree, RAUC ΠΈ Ρ‚.Π΄. Для ΠΏΠΎΠ»ΡŒΠ·ΠΎΠ²Π°Ρ‚Π΅Π»ΡŒΡΠΊΠΈΡ… ΠΏΡ€ΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΠΉ Ρ…ΠΎΡ‚ΠΈΠΌ ΠΏΠ°ΠΊΠ΅Ρ‚ΠΈΡ€ΠΎΠ²Π°Π½ΠΈΠ΅ Ρ‚ΠΈΠΏΠ° β€” Flatpak, AppImage ΠΈΠ»ΠΈ Snap ΠΈΠ»ΠΈ ΠΏΠΎΠ΄ΠΎΠ±Π½ΠΎΠ³ΠΎ. Если Π²Ρ‹ ΡƒΠΌΠ΅Π΅Ρ‚Π΅ Ρ‚Π°ΠΊΠΎΠ΅, ΠΏΡ€ΠΈΡ…ΠΎΠ΄ΠΈΡ‚Π΅ ΠΊ Π½Π°ΠΌ β€” https://flipperdevices.com/jobs

2
More shell tricks: first class lists, jq, and the es shell On the web: https://alurm.github.io/blog/2025-08-07-first-class-lists-in-shells.html Preamble It's not a secret that most common shells don't have first class lists. Sure, you can pass a list to a program by passing each element in argv (e.g. with "$@" or "${list_variable[@]}"), but what if you want to *return* a list? There are a couple of options. The challenge As a more practical example of this, let's implement split-by-double-dash, a function (or a program) that would return two lists: args that come before -- and ones that come after. That's a common format used by command line utilities. So, for example, split-by-double-dash a b c -- d e f should return the lists [a, b, c] and [d, e, f], *somehow*. One possible use case for this would be a wrapper around a utility that accepts arguments in this form. The quoting way with jq Some utilities can return text quoted in the syntax of shell. For examples, getopt and jq can do that. getopt can indeed help us solve the problem of parsing cli options, but we'll focus on jq here. > Side note: jq is an amazing utility (in fact, a programming language) that can manipulate structured data in all kinds of ways. Here's an example: jq -nr '["foo", "baz", "baz quux"] | @sh' 'foo' 'baz' 'baz quux' We ask jq to turn a list into a string suitable for consumption with shell's eval. -n tells that there's no input to read, -r tells jq to output text, not JSON. So let's see how to use the output in the shell: eval set -- "$(jq -nr '["foo", "bar", "baz quux"] | @sh')" # Now, let's verify that arguments has been passed correctly, by printing each one on a separate line with printf. printf 'arg: %s\n' "$@" # Output: # arg: foo # arg: bar # arg: baz quux You might think: "wait, you can't use eval". But that's actually safe, since jq does the escaping for us. Actually, I don't think there's a way to do this without eval, since the list is dynamic and has to be interpreted by the shell. In fact, lists can be nested, which is what we want, since we want to return two lists. The outputs gets a bit unwieldy at this point though: jq -nr '[["foo", "bar"], ["baz", "baz quux"]] | map(@sh) | @sh' # Output: # ''\''foo'\'' '\''bar'\''' ''\''baz'\'' '\''baz quux'\''' What happens with | map(@sh) | @sh is that we first apply quoting to each of the lists to get a list of strings, and then we quote *that*. But, if we want to implement split-by-double-dash, we need a way to process the arguments passed to jq. Can we do this? Of course we can. jq '$ARGS.positional' -n --args -- a b c # Output: ["a", "b", "c"] In fact, jq has much more (check out the manual), so I'll skip right ahead to the solution. We'll use the #!/usr/bin/env shebang and we'll pass -f to jq to make this a proper script: #!/usr/bin/env -S jq -nrf --args -- # Usage: eval set -- "$(split-by-double-dash ...)" # Or, in Bash: eval array=("$(split-by-double-dash ...)") $ARGS.positional | reduce .[] as $arg ( { before: [], after: [], found: false, }; if .["found"] then . | .after += [$arg] elif $arg == "--" then . | .found = true else . | .before += [$arg] end ) | { before, after } | map(@sh) | @sh Here's how to use this (in Bash, but you can use this in sh as well): eval array=("$(./split-by-double-dash a b c -- d e f)") eval before=("${array[0]}") eval after=("${array[1]}") # Example: printf '%s\n' "${before[@]}" # Output: # a # b # c (Continued in the comments...)
860
3
ΠŸΡ€ΠΎΠ²Ρ‘Π» Π»Π΅ΠΊΡ†ΠΈΡŽ ΠΏΡ€ΠΎ Nix Π² @f0rthsp4ce. Nix это Ρ‚Π°ΠΊΠΎΠΉ язык программирования/ΠΏΠ°ΠΊΠ΅Ρ‚Π½Ρ‹ΠΉ ΠΌΠ΅Π½Π΅Π΄ΠΆΠ΅Ρ€/способ ΠΎΠΏΠΈΡΡ‹Π²Π°Ρ‚ΡŒ окруТСния Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚ΠΊΠΈ. По-русски. https://youtube.com/watch?v=noEbul27dHE
3 251