Threads for kas

  1. 6

    “Eventually, I realized that my favorite everyday “software calculator” was simply the Google search engine, its major drawback being the requirement for an Internet access.”

    Aside from the Numerical Truth issues and such the author details and focusing just on user experience, Has the author considered notepad-style text calculators like calca.io or parsify desktop? I found myself rather devoted to calca and recently been trying parsify after switching to Linux.

    1. 5

      My favorite app for this is Soulver on macOS https://soulver.app/

      1. 3

        I was a bit surprised to not see soulver mentioned.

      2. 4
          1. 1

            Numbr shows the same value for “1.001”, “1,001”, and “1001”. That’s not cool.

            1. 1

              Does not do this for me.

              1. 2

                It does so here because the locale on my pc uses a period as thousands separator. The author has just acknowleged that it is a bug that will be corrected.

            2. 1

              I also found this one: https://bbodi.github.io/notecalc3/

          1. 2

            Would exec cat $@ be better?

            1. 1

              Done

              1. 6

                Isn’t the $@ supposed to be quoted? "$@"

            1. 2

              Doesn’t the timer file need a service point?

              And shouldn’t the “enable and start” command be systemctl … rather than systemd?

              And shouldn’t there be a WantedBy=timers.target?

              1. 4

                Timer files do not need a unit defined. By default, they run the service unit that matches the same name, ignoring “.timer”. Yes, I’m not sure where my copy and paste of the WantedBy went.

                As for the commands, yes typos. I’ll fix. (edit, fixed! thanks)

                1. 1

                  Also, I don’t understand why it should wait 5 minutes before activation?

                  1. 2

                    That’s activating the timer to begin updating the file’s modification time, which was an arbitrary value after bootup. You can set it lower if you want, and if your reboot took longer than 17 minutes, it well run sooner anyways. The clock is set from the mtime well before that.

                    1. 1

                      Thanks

                      1. 1

                        I’ve added a note to the post mentioning this was an arbitrary decision.

                1. 3

                  I would replace your bash example with:

                  function ll {
                    llama "$@" 2>&1 | read -r PATH
                    if [[ -d "$PATH" ]]; then
                      cd "$PATH"
                    fi
                  }
                  

                  That temp file is unnecessary and makes me a little nervous. It’d be simpler if llama returned the path on stdout instead of stderr.

                  1. 4

                    $PATH is already “taken” by the shell and shouldn’t be overwritten. Use $path (or something else) instead.

                    1. 1

                      Oops, yes. Very much so.

                    2. 1

                      Stdout used for interactive stuff)

                      1. 6

                        You should check how fzf (and alternatives) works, they use the terminal (tty) directly for interaction with the user, and still use the stout to return the results.

                    1. 6

                      What is this site about exactly ? I miss the point ^^”

                      1. 12

                        It’s like an interactive telephone book, you can index all of the users of the domain with “finger @plan.cat” and you can look up for a sepecific user like “finger glitch@plan.cat.

                        1. 5

                          It would be awesome if mail providers started to provide finger so you can quickly have information about someone (which would be, of course, the information the want to make public)

                          1. 3

                            Most servers started to close the finger port for incoming connections in the late ’90s because the protocol was a great way of enumerating the valid accounts on the system. If your mail provider enables it then you can find all of the addresses that will work and that makes sending spam to that provider a lot easier.

                            I first saw finger in 2000 and even then it only worked on the local network and was blocked at the firewall for the machines that hosted a web server / email.

                            1. 3

                              I have writing PIM in my “TODO one day”, and it would be nice feature to add.

                          2. 3

                            It’s a social network from way back when: https://linux.die.net/man/1/finger

                            1. 2

                              Back in Days of Yore, before the internet went mainstream and security Got Serious, most UNIX systems supported a protocol called finger.

                              You could say finger feoh@gnu.org and, if I updated my .plan file, see what I had written there and, depending on the server, maybe even what I was running on the machine at the moment.

                              People took advantage of this for all kinds of strange and wonderful things, including internet connected coffee and soda machines where you could [finger them for status].

                              This site resurrects the protocol but gives you a place to advertise your status without opening up a security hole in workstations you actually use/care about, and in its own way creates a kind of social network :)

                              1. 1

                                Were you going to link something at [finger them for status]?

                            1. 3

                              There’s also dateutils with commands like dateadd, dateseq, and others: https://www.fresse.org/dateutils/

                              1. 2

                                Wow! This is great!

                                1. 1

                                  this is cool.

                                1. 5

                                  The longest word in Danish that is also valid base64 is “undervisningsdifferentiering”.

                                  https://en.wikipedia.org/wiki/Differentiated_instruction

                                  1. 2

                                    That actually seems great. Does anybody see any drawback (besides the overhead of starting a subshell) with using this tip?

                                    1. 9

                                      Forks are slow so starting a subshell is not an insignificant cost. It also makes it impossible to return values besides an exit status back from a function.

                                      Zsh has “private” variables which are lexically scoped. ksh93 also switched to lexical scoping instead of dynamic scoping but note that in ksh, you need to use function name { syntax instead of name() { to get local variables.

                                      1. 9

                                        Also, in zsh you can just use always to solve the problem in the article:

                                        {
                                             foo
                                        } always {
                                             cleanup stuff
                                        }
                                        
                                        1. 3

                                          Every time I learn a new thing about zsh, I’m struck by how practical the feature is and how amazing it is that I didn’t know about said feature the past dozen times I really, really needed it. I looked around the internet for documentation of this, and I found:

                                      2. 2

                                        A guy on the orange site timed subshell functions to take roughly twice as long.

                                      1. 3

                                        Python ought to adopt a package scheme like

                                          …/site-packages/$pkgname/$pkgver/
                                        

                                        such that multiple versions can be installed at the same time, and such that if a program doesn’t request a specific version of a package, then it will get the newest (or the one that is configured as the default version).

                                        1. 1

                                          Nice, I remember there is nntplib in Python stdlib. But I am always wondering is there anybody still actively using it?

                                          1. 1

                                            I am using it daily to post on Usenet.

                                            1. 1

                                              Is Usenet actually used outside of piracy these days? I might use the aforementioned library to write a bridge to YOSPOS, but only for the aesthetic value.

                                              1. 1

                                                Usenet has certainly shrunk since its heydays, but there are still newsgroups worth visiting for their discussions.

                                            1. 23

                                              And Urbit speaks IPv4 only.

                                              And a planet cannot DM its own moons.

                                              1. 5

                                                Wait it can’t? How would you do planet->moon communication then?

                                                1. 12

                                                  I’m unsure. Perhaps you need to create a private group and use that.

                                                  I have tried initiating DMs on the planet as well as on its moon, it just doesn’t work. The funny thing is, a planet can |hi its moons, and vice versa, so it’s not a routing problem.

                                                  We are led to believe that moons can be useful for IOT stuff, it’s just hard to imagine how when the ships can’t DM each other (the memory requirements alone also makes IOT an unlikely scenario).

                                                  Another weird thing: While you can post image links in groups/channels/DMs, you have to host the images elsewhere.

                                                  Like the blog poster, I’m not impressed by urbit.

                                                  1. 5

                                                    Oh lord you may need to make a custom channel to your moons yeah. Wow, that’s kinda crap lol.

                                                2. 1

                                                  Update: After the latest OTA (basehash 4dii7, 2021-06-02) a planet can now DM its moons.

                                                1. 5

                                                  The Mudita phone is huge for the few things it does, isn’t it? it’s almost as big as my Samsung Galaxy S8. In particular, the Mudita is ~5 cm thicker that the S8. That’s gonna feel bulky in the pocket of my jeans.

                                                  1. 7

                                                    I thought you’d made a mistake here, from the photos I’d assumed it was relatively small. That was part of its appeal to me.

                                                    Nope, it is indeed massive. My TV remote is not far off this size.

                                                    1. 3

                                                      Exactly. I made the same mistake and thought it was a small, handy phone. Not so. It’s big and bulky (and expensive).

                                                  1. 12

                                                    This article leaves aside the most useful special parameter for elegant conditional: the “most recent argument”, $_.

                                                    Example of use: test -f /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh && source $_ || echo "zsh-syntax-highlighting not installed" >&2

                                                    1. 6

                                                      Even

                                                      test -f /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh \
                                                      && source "$_" \
                                                      || echo "${_##*/} is not installed" >&2
                                                      

                                                      😎

                                                      1. 3

                                                        TIL. Thank you for sharing, I never knew that one.

                                                        1. 2

                                                          Brilliant! Wasn’t aware. Added it in the post.

                                                        1. 1

                                                          There’s also slsh, which is a shell for the S-Lang programming language ⌘ https://www.jedsoft.org/slang/slsh.html

                                                          1. 3

                                                            I thought I’d share this next follow-up post to something I shared last week here - I hope that’s OK with respect to etiquette here, please let me know if it’s not. Thanks!

                                                            1. 2

                                                              Keep them coming!

                                                            1. 4

                                                              Does anyone use Jami for chatting or calling? What are your experiences?

                                                              1. 3

                                                                I’ve been trying it out with a couple of crustaceans today, and at least on android, basic two-person chats seem to work well. They don’t have group conversations yet, but work is underway: https://jami.net/swarm-introducing-a-new-generation-of-group-conversations/

                                                                1. 3

                                                                  Also, while you can link your account to several devices, messages sent from one device does not show up on the linked devices. Pretty frustrating.

                                                                  1. 1

                                                                    It’s on the way, swarm chat give the ability to sync messages across devices (cf the article from munksgaard)

                                                                    1. 1

                                                                      Sounds good. Thanks.

                                                                  2. 2

                                                                    caution: video conference are done since the beginning. There’s only 1-1 text chat though.

                                                                    (I got fooled too and was corrected by a Jami dev: https://lobste.rs/s/gm1xqu/gnu_jami_together_release_enriched_video#c_hxknps)

                                                                  3. 2

                                                                    I tried it yesterday, there is no way to explicitly reply to a certain message and afaict the only emoji is the thumbs up emoji but besides that it was surprisingly good, it just worked.

                                                                    There was a sync issue at one point and I was like “this sucks I am spoiled” but it turns out the person on the other end had closed the app for a second and since it’s literally p2p it’s not surprising that the messages failed to deliver as instantly as they had been when we were both present.

                                                                    Looking forward to group conversations, I think using a DHT for routing, TLS for e2e connections and git for the underlying sync model is brilliant. All of this technology is super battle tested and the result seems to work quite good.

                                                                    Edit: feel free to add me, I have the same username here as there.

                                                                  1. 7

                                                                    What about GNU Jami? It’s a truly decentralized messaging system based on OpenDHT.

                                                                    1. 2

                                                                      I’d never heard of Jami before! Definitely looks interesting. Have you tried it? What has been your experience with it?

                                                                      1. 2

                                                                        I have installed, but I don’t have anyone to chat with. I tried to chat between my phone and my PC, but it’s just a test.

                                                                        Anyway, I think the technology is quite interesting and promising.

                                                                        1. 3

                                                                          I’ve just created a user with the name munksgaard. Feel free to contact me on there, I’m curious to try it out.

                                                                          1. 3

                                                                            I’ve just contacted you in Danish. :)

                                                                            1. 2

                                                                              Takeaway:

                                                                              Jami — formerly Ring — is distributed and E2E encrypted, and you can link several devices to one account.

                                                                              However, while text messages sent from contacts are echoed to every device, my own messages only appear on the device from where it was sent. This is a highly frustrating experience.

                                                                              Also, Jami does not support groups yet.

                                                                              If the latter two issues were fixed, I would probably prefer Jami to both Signal and Telegram when I ditch WhatsApp soon.

                                                                    1. 3

                                                                      The EV cert requirement makes no sense to me. The image isn’t stored in the cert, it’s DNS+HTTPS. Could work fine with any cert.

                                                                      1. 1

                                                                        I agree, the EV certificate is a showstopper.

                                                                        1. 1

                                                                          The problem is that anyone can set their own DNS+HTTPS to serve a PayPal-looking logo. It needs a human to say “no, this logo looks misleading, it’s not yours”.

                                                                          1. 2

                                                                            EV never worked to prevent this, though. Major browsers all either have dropped or are in the process of dropping any special address-bar indicator of EV cert, precisely because it didn’t help and the workarounds were always trivial anyway – everything from stolen identity documents (no obstacle for someone already committed to a criminal enterprise), to just straight-up registering a throwaway business somewhere (which was Ian Carroll’s infamous example; he registered a new company in Kentucky under the name “Stripe, Inc.”) can get you an EV cert.

                                                                            1. 1

                                                                              I think this time it’s substantially different to give it another shot:

                                                                              • It’s a familiar logo in a prominent location in a relatively uncluttered list that user actively clicks on. That’s different than a slightly different flavor of a padlock, displayed passively out of the view, next to spoofable favicons, between half a dozen of other gadgets.

                                                                              • It’s riding the trademark law. Companies know how to zealously defend that. Apple sues companies with a pear in their logo.

                                                                              There’s still the jurisdiction loophole, which sucks. But at least trademarks are per country, not per state. Maybe they could require either a more widely registered trademarks, or e-mail clients could be smart enough to display the logo only when the user’s country is within trademark’s jurisdiction. This is another advantage over company registration: you can have company registered in one place and trade world-wide, but you’re supposed to have your trademark registered everywhere you trade.

                                                                            2. 1

                                                                              Yes, but… the logo is not in the EV cert. So even if they check the DNS record and URL before giving out the cert (unlikely, since it’s an unrelated spec) you could just change the logo image after you get the cert.

                                                                              1. 3

                                                                                The article omits this, but the BIMI spec does have a Mark Verified Certificate that validates the image itself. I hope nobody is going to deploy this without verifying the cert, as otherwise that’d be nothing but a complicated favicon.

                                                                                1. 1

                                                                                  Would you happen to have a link to the format (or just a sample) of a Mark Verified Certificate? I spent a few minutes casting around for one and could only find press releases from CAs harboring ambitions of issuing them or unlinked references that weren’t specific enough for me to find a draft in the IETF. The descriptions I did find left me a little uncertain whether the artifacts for relying parties would actually carry the logo itself as opposed to a URL controlled by the entity that is being certified.

                                                                          1. 2

                                                                            Not to be confused with the Pike programming language: https://pike.lysator.liu.se/

                                                                            1. 4

                                                                              Pike is based on LPC, which you might have used if you were a creator / wizard / admin on an LPmud. I believe there’s some kind of continuity in development too; the lysator.liu.se domain hosted a lot of MUD content.

                                                                              1. 2

                                                                                Wow, that takes me back! Roxen AB, one of the backers of Pike, is named after the lake and apparently pike can be fished there.

                                                                              1. 4

                                                                                One of the images says armv7l, which is a 32bit architecture. The RPi400 itself is 64bit. Can I get and install a 64bit OS on the device?

                                                                                1. 4

                                                                                  Yes. For weird historical reasons, the default Rasbian OS claims to be 32-bit, but the CPU is a 64-bit ARM. You can install stock 64-bit Debian or Ubuntu on it if yo want, or any of a bunch of other OSes.

                                                                                  1. 2

                                                                                    What I really would like is to have ArchLinux as the OS.

                                                                                    I have a traditional RPi4 running ArchLinuxARM, and /proc/cpuinfo says “model name: ARMv7 Processor rev 3 (v7l)”. However, it also says “Hardware: BCM2711”, which is listed under ARMv8: https://archlinuxarm.org/platforms/armv8/broadcom/raspberry-pi-4

                                                                                    So should I be able to use the ARMv8 image for the RPi 400 (and my traditional RPi, provided I had the spoons to reinstall everything)?

                                                                                    edit: typo

                                                                                    1. 2

                                                                                      Grab a fresh SD card & try it out? It ought to work, but I’ve never tried Arch.

                                                                                      1. 1

                                                                                        Good idea. Thanks!

                                                                                      2. 2

                                                                                        I too love Arch Linux. I’ve never run it on the Pi, however. I’m going to download and burn a copy of it and try it out next week. I will probably write about it as well.

                                                                                        1. 1

                                                                                          I’d love to hear about it. :)