1. 1

    Interacting with project mailing lists makes me wish they were really newsgroups. Having two disjoint interfaces for the archive and updates is frustrating.

    1. 4

      One might add that the easiest way of running acme on Windows, Mac OS X and Linux with the same setup is to use the Inferno OS version which runs in a VM and there is a prepackaged form of it: acme-sac. I have used this for years to have a consistent editor on all thes OSs with minimal fuss to set it up.

      1. 1

        I found the Inferno environment to work subtly differently than plan9port’s in a way that I don’t remember but was infuriating at the time.

        1. 1

          Yes it is slightly different, mostly the mountpoints are. It is still usable though and the system is documented rather well… The Programming in Inferno book also helps…

      1. 1

        This really seems like fork+join as a python context manager, which is just a bit of sugar on a pattern just about everyone has written.

        Also, this doesn’t solve the problem he claims it does: any thread of execution inside a nursery can still call fork or equivalent and have a thread of execution that outlives scope.

        1. 1

          Does anyone know what Kore is? There’s no links in the post, and the closest I could find was https://github.com/kframework/kore but I’m not entirely sure it is

          1. 5

            I think it’s more likely https://kore.io/

            1. 5

              Indeed, that’s the correct link. Kore is an easy to use web platform for writing scalable web APIs in C.

            2. 4

              I used to work for an information security company called KoreLogic; we referred to ourselves internally as “Kore”.

              Whenever I talked to someone from outside the company it would go like this:

              “I work for KoreLogic Security. Not CoreLogic with a ‘C’. Not Core Security. Not Kore IO. KoreLogic with a ‘K’, but not the KoreLogic with a ‘K’ in the United Kingdom.”

              (And for future reference, you should absolutely talk to the KoreLogic people if you need information security consulting. I cannot say enough nice things about them.)

              1. 1

                Also not OpenKore, a bot software for an MMO ;)

                1. 1

                  huh, until I read this comment I automatically assumed it was pronounced “ko-ray”

              1. 1

                I cringe when I see practice of putting clear passwords in any text file, especially the dreaded .netrc.

                Supposedly secstore(1) could help with that, but I have never ventured further in those. Can somebody say anything about the security aspect of these programs in plan9port?

                1. 1

                  With msmtp(1) you should use the passwordeval option which will evaluate an expression and use whatever is returned on stdout as the password:

                  gpg2 --no-tty -q -d ~/.msmtp-password.gpg
                  

                  Install pinentry-gtk2 and you’ll get a nice dialog box.

                  I intended to mention the passwordeval option, but the writing went into the wee hours and it was lost. :D I’ve updated the $HOME/.msmtprc example with a note referencing it.

                  As for secstore(1), that’s a backing store for factotum(4). I think you could use passwordeval with factotum(4).

                  1. 1

                    How does one set up factotum with secstore? Can I use it the same way I use pass? If I don’t explicitly use secstore will I have to set the secret everytime I start factotum?

                    1. 1

                      iirc, yeah, you’ll get prompted. Well, may get prompted. I don’t think things like auth/fgui(1) got brought over.

                1. 2

                  I’ve played with using a program called amail to read mail in acme, but can’t recommend it. It’s written in a literate style, which means the actual code produced is just a giant pile of slinkys and impossible to read by itself.

                  It’s on my long list of projects to write a maildir adapter for Mail or add maildir support directly so that I can continue to use my mbsync+msmtp workflow.

                  1. 2

                    This might be overkill, but setup dovecot(1) on your local system. Let it serve email to Acme via IMAP. Your current workflow should continue to work.

                    I used to do something similar when I used gnus on Emacs. The only difference is I used the doveadm(1) sync command to keep the local in sync with the primary server. For dovecot-to-dovecot syncing, doveadm(1) is the way to go.

                  1. 5

                    There are various ORMs/mappers, but most advice you’ll find (and what I’ll say, also) is to not use them. Wrap a database connection in a struct that has methods to do what you want. Something I’ve found conditionally useful are generators to write the function to populate a struct from a database row.

                    The community will also say to not use web frameworks, and again I’d agree. The stdlib http package provides a stable foundation for what you want to do. You’ll have more luck looking for packages that do what specific thing you want, rather than thinking in terms of frameworks.

                    All that said, some coworkers like echo but I can’t for the life of me understand why. Any web-oriented package shouldn’t need to give a shit if it’s hooked up to a tty or not.

                    1. 3

                      The problem is that when you do search and filtering on various conditions (like in a shop) you don’t want to resort to sql string stitching, I wasn’t able to find anything nice when I looked at the docs, for example in gorm:

                      db.Where("name = ? AND age >= ?", "jinzhu", "22") - I expect that when you have 20 conditions with different operators and data types you will end up having a bad time.

                      1. 4

                        I’m at a small scale but I just write the query entirely and or do string concatenation. I’m having a fine time though. I just use sqlx.

                        1. 2

                          sqlx

                          https://godoc.org/github.com/jmoiron/sqlx#In is pretty useful when you need it.

                          1. 3

                            I admit I don’t understand how to use that from the doc string. Could you show a simple example or elaborate?

                            1. 4

                              It’s useful for queries using the IN keyword, like this:

                              query, params, errIn := sqlx.In("SELECT column1 FROM table WHERE something IN (?);", some_slice)
                              // if errIn != nil...
                              rows, errQuery := db.Query(query, params...)
                              
                          2. 2

                            We built something in house that is very similar in spirit to sqlx but adds a bunch of helpers.

                            https://github.com/blendlabs/spiffy

                          3. 4

                            https://github.com/Masterminds/squirrel (which kallax uses) seems somewhat akin to the SQLAlchemy expression API. (And yeah, to me, that’s a great part of SQLAlchemy; I’ve hardly used its ORM in comparison.)

                            I went from Python + heavy use of the SQLAlchemy expression API to Go and got by OK with just stdlib, but part of that was that the work in Go had far less complicated queries most of the time. So, not the best comparison maybe.

                            1. 2

                              I support the advice to not use mappers like ORMs, but I also agree with what you said. The middle ground seems to be query builders.

                              If you use Postgres as your DBMS by any chance, I advise you to make sure that the query abstraction layer of your choice doesn’t do query parameterization by string interleaving but utilizes PQexecParams underneath instead.

                              1. 1

                                I haven’t used it but I think Dropbox built a library for that. https://godoc.org/github.com/dropbox/godropbox/database/sqlbuilder

                            1. 3

                              Maybe someone will make a bitlbee plugin for slack? There seems to be one for Discord at least.

                              1. 2

                                The Bitlbee team has cited the existence of the gateway as a reason specifically for refusing to implement Slack support, so hopefully this can change their mind.

                                1. 1

                                  I didn’t know about bitlbee’s Discord support, that’s great.

                                  I tried to get weechat-discord into a working state but have come to the same conclusion as the author, that discord’s “API” is giant pile.

                                  1. 1

                                    Also hoping for libpurple…

                                  1. 1

                                    I use nix every day with a Goldbergian setup to manage my environment and configs.

                                    1. 42

                                      This whole article is a trashfire.

                                      The author seems unable to grasp that, to the extent bandwidth-hungry services like Netflix tax an ISP’s infrastructure, it’s because the ISP’s subscribers are requesting those services, not because megabits are just getting thrown around by Netflix for no reason.

                                      There’s an unquestioned assumption of “competition’s” ability to drive “better” service, which flies in the face of history, namely that the telecom sector has been getting less competitive with less regulation.

                                      I had to quit reading after this gem:

                                      Second, the public, pro-net neutrality advocates, and other stakeholders should acknowledge and consider current alternative market-based practices on the local level. Throughout Europe and across parts of the US, folks enjoy high-speed, unrestricted, and low-cost Internet access via municipally or cooperatively owned carrier-neutral fiber.

                                      As if it weren’t the ISPs killing programs like these.

                                      1. 14

                                        As if it weren’t the ISPs killing programs like these.

                                        You ain’t kidding. They are actively lobbying for local legislation to prevents municipal broadband. There are already laws on the books in several states. For a recent example, see: https://arstechnica.com/tech-policy/2017/01/virginia-broadband-deployment-act-would-kill-municipal-broadband-deployment/

                                      1. 14

                                        In addition, Filecoin shows certain characteristics of a Ponzi scheme but the trust built by the team members in the past leads to believe otherwise.

                                        “It looks like a duck and quacks like a duck, but c’mon… they’re good guys.”

                                        1. 2

                                          I’ve converted my mail flow to use mblaze. Along with fsf and a few helper scripts, it’s perfect for my use. Used in conjunction with offlineimap + msmtp, and $EDITOR.

                                          Never looking back.

                                          1. 1

                                            What is fsf in this context? For that matter, what is mblaze?

                                            1. 2

                                              I think mblaze is this and I think fsf would be some sort of fuzzyfinder?

                                              1. 2

                                                Maybe fzf? I could see that being a nice workflow.

                                                1. 2

                                                  Correct. I just hooked it up to my script and forgot about it. It does nicely with the –preview command. There’s probably more I could do with that, but for now it solves pretty much all of my mail consumption related issues

                                                  1. 1

                                                    I’d be interested in a more in-depth explanation of your setup, if you’d like to share it…

                                                    1. 2

                                                      Aside from a regular offlineimap setup and an also-regular msmtp setup, I have two scripts to help me with mblaze: one called “mymail” and one called “mshowwithawk” (which is a mouthful, but I never invoke it by hand so I don’t care.

                                                      mshowwithawk is:

                                                      #!/bin/bash
                                                      
                                                      mshow $(echo $1 | awk '{print $2}')
                                                      

                                                      and mymail is:

                                                      #!/bin/bash
                                                      mlist -s ~/Mail/$1/$2 | msort -d | mseq -S | mscan 2> /dev/null | fzf --preview="mshowwithawk {}"
                                                      

                                                      Usage is: mymail <any ~/Mail/ subdir that contains maildirs> . Reason for this script is I have two accounts, and I often switch between my work and personal email, so I often call it like “mymail otremblay INBOX” or “mymail work INBOX”. Next improvements are gonna be defaulting to INBOX and allowing for the -s flag to be passed or not from the mymail script (because sometimes, I need to see old mail too.)

                                                      The output is a list of selectable items, with a preview of the currently selected item on the right. Yes, right in the terminal. The list is populated by mail prefixed with an ID I can then use with mshow if I need better output (say, in case the email provided a worthless (but still present) text/plain thing. I use elinks to dump out text/html messages (configurable in mblaze).

                                                      I use mblaze’s “minc” to pass messages from the maildir’s new to cur, and mflag -S to flag everything as read once I’m done.

                                                      I like the workflow because it is just a construction of a collection of small specialized programs working together. I mean, if needed, I can still just invoke mlist by itself and grep through email headers, if I so desire. Or pump the whole output elsewhere to any other unix-standard utility if I want to. Heck, it would be trivial to include spamassassin header parsing, or any other kind of header parsing. I’m also a sucker for CLI interfaces, mostly on account of it being the easiest way I know to compose software with one another out of small blocks. I feel like I should probably start a blog about my crap, but I’m afraid that said crap would be too trivial for people to enjoy.

                                            2. 1

                                              mblaze is indeed pretty nice (similar to mu. I use it to automate some tasks with n my email workflow (archiving, marking as done, digging up the full thread when a mail arrives, …) it helps me a ton. But when it comes to actually read and reply to mails, it doesn’t cut it, so I use mutt for that.

                                            1. 9

                                              It’s almost like math isn’t a replacement for a regulatory system.

                                              Almost like that.

                                              1. 3

                                                It’s not like this is a problem in Ethereum or any Blockchain. It’s the stupidity of users being abused. Not suprising at all.

                                                1. 12

                                                  When the expected outcome of average users using your service is that they get scammed out of all their money, the service is broken and it’s not the users at fault.

                                                  1. 4

                                                    Exactly. All these comments negative of the traditional system aren’t coming with plentiful examples of regulated banks opening up, taking a lot of deposits, and then closing keeping the money. It might happen but I can’t recall one instance in recent years. Shit happens all the time with these crypto currencies and exchanges.

                                                    People wanting more trustworthy banking can just start a credit union or non-profit bank with protections in its charter. Charge fair prices with Stripe-like payment processing. Maybe try to make transfers as cheap or free as possible. Offer secure methods with assurance going up as monthly/yearly fees do. Invest in stuff to keep money coming in. And so on.

                                              1. 10

                                                The list doesn’t point out Plan 9, which is my personal favorite not-UNIX. A consistent, network transparent interface for everything is still something I want.

                                                1. 4

                                                  Thanks for reminder. I meant to put that one on there. This is the old one from a restored backup.

                                                  EDIT: If I added Plan 9, I’d also have to add the distributed, mainframe OS that was deployed by mid-80’s. Unisys found CTOS threatening enough to buy and shut down haha.

                                                  https://en.m.wikipedia.org/wiki/Convergent_Technologies_Operating_System

                                                1. 14

                                                  Probably not.

                                                  Hey, that was easy.

                                                  1. 2

                                                    This was down-voted, but I think your assessment is spot-on.

                                                    https://en.wikipedia.org/wiki/Betteridge’slawof_headlines

                                                    Easy.

                                                  1. 2

                                                    Java’s results are super surprising. I hold the JVM’s GC in extremely high regard, so I would love to see comments from someone who is more familiar with it’s implementation.

                                                    1. 10

                                                      Java is optimized for throughput, Go is optimized for latency. There is no free lunch.

                                                      1. 3

                                                        After reading into this more, it looks like the Java runtime has a number of GC algorithms available, and will use heuristics to pick one as the program runs. The goal of this is to allow it to perform well with either low latency or high throughput requirements.

                                                        In the Java benchmark results listed in the blog post, one version lets the runtime decide which algorithm to use, and the other explicitly uses the G1 collector. After reading the HotSpot docs, it looks like the concurrent mark and sweep (similar to Go’s) GC might perform well with low latency requirements.

                                                      2. 7

                                                        The reddit user jcipar managed to get the max pause down to 22ms by tweaking parameters.

                                                        He also mentioned that the JVM GC does a lot of online tuning, so the max pause times may drop over a longer run of the program. This is similar to the Racket GC, where the maximum pauses are >100ms at the start of the run, but converge to around 20ms as the program continues to run.

                                                        It would be nice to run the benchmarks for a longer period of time, and only measure max pause times once this “ramp up” period is over.

                                                        1. 1

                                                          Ya - I was going to say. The magic of Java (and .NET actually) is that they’re much better given long run times with their Server GC’s. I’d like to see the benchmarks over the course of a day or even a week.

                                                        2. 4

                                                          Gil Tene suggests a part of this is the lack of compaction in Go

                                                          .@jamie_allen Go’s (current) collectors don’t compact. Different problem space. Not compacting in Java mean not running very long.

                                                          1. 2

                                                            I wonder how they deal with heap fragmentation in that case?

                                                            1. 1

                                                              This makes sense at first blush. Java is pointer-mad.

                                                          1. 6

                                                            I enjoy writing Ken C when the occasion arises. Embedded structs, the %r verb, mk, and the header rules all make it feel nicer than standard C.

                                                            1. 3

                                                              Go has tooling to do this: see go oracle. Most editors have decent integration for this.

                                                              1. 1

                                                                My only gripe with the oracle is that you can’t ask it to ignore files that don’t build. So make sure the bit you’re working on is stubbed out, first.

                                                              1. 8

                                                                At work I mostly write in Ruby, sometimes in Java. I do most of my work in acme (and have for a while), at first on OS X, and for the past month I’ve been experimenting with Windows.

                                                                Odd things about my setup (all acme induced): I use real tabs in all programming languages, and I convert them to soft-tabs using git’s filter system and a custom, round-trip safe version of (un)expand I call detab and retab. I also have a preference for command line applications that print line at a time as opposed to using the entire terminal as a framebuffer of sorts. Finally, I’ve learned to like working without syntax highlighting and fixed width fonts.

                                                                I have a tendency to foolishly seek novelty in my tools (see Windows, heh), so I’m as surprised as anyone that I’ve stuck with acme for this long.

                                                                Disclaimer: I work for Microsoft. They let me use whatever computer or software I want, and they don’t know about this post.

                                                                1. 3

                                                                  acme

                                                                  Hi fellow tool wanderlust sufferer. I’ve used acme on and off for a while and really appreciate the constraints (syntax highlighting is a blight, and fixed width fonts too) but never manage to stick with it for all that long.

                                                                  Any tips? Do you use plumber much, what other external programs are in your acme toolbox, etc.

                                                                  1. 2

                                                                    The constraints are key. Yes, you can minimize and even hide open files in acme, but you have to do it on purpose, it’s not like that by default. Having a very obvious visual indication that I’ve scatterbrained allows me to regain focus.

                                                                    That’s probably the best feature for me. If I ever switch, my next editor will need this.

                                                                    I love how after pushing through for two months on the no-syntax highlighting thing, I know never skim code anymore.

                                                                    Tips, yes:

                                                                    • Three button mouse is a must. I got this one, but I wish it were wireless. I think I might Frankenstein a cheap wireless mouse into it one of these days, once the cable is done fraying.
                                                                    • I don’t add much to the plumber rules. At first I thought about a million rules to add, but I end up forgetting they exist. Now I just add one for git sha’s and another for JIRA tickets. Between those and the filename:linenumber I’m set.

                                                                    As far as external programs, I have:

                                                                    1. a+ and a- for indentation.
                                                                    2. nbsptab converts tabs to non-breaking spaces, which lets me post code in places that strip indentation.
                                                                    3. rem (adds or removes comments from selected lines, language aware).
                                                                    4. gg (which is just git grep).
                                                                    5. GB is git blame of the currently open file.
                                                                    6. SuPut which lets me save files I don’t have permission to save.

                                                                    Other than that I end up using sort, fmt, sed (still don’t grok the sam syntax :/), etc.

                                                                    1. 2

                                                                      This is all gold for working with acme. I have that same mouse, it’s great. Gitfiles is a utility like Netfiles (which is currently broken because of sftp…) that does magic with git repos, you may or may not find it useful.

                                                                  2. 2

                                                                    Acme is pretty great.

                                                                    I found some tools to make writing Go nicer (auto format on Put and some nice wrappers around guru and friends) and wrote a few scripts to clean up win panes and such. I ended up writing a jira browser so that I could leave it less. It’s probably one of the easiest interactive editors to extend.

                                                                    1. 2

                                                                      Can you share your win cleanup tools? I still do Edit ,d

                                                                      1. 3
                                                                        #!/home/hank/plan9/bin/9 rc
                                                                        echo 'Edit ,x v/^% /d' | 9p write acme/$winid/body
                                                                        echo -n '/Edit ,x v\/\^% \/d/' | 9p write acme/$winid/addr
                                                                        echo -n 'dot=addr' | 9p write acme/$winid/ctl
                                                                        9p read acme/$winid/addr | awk '{printf("MX%s %s\n", $1, $2)}' | 9p write acme/$winid/event
                                                                        

                                                                        This is probably maximally ineffecient, but gets the job done. It writes out an edit line, then button 2’s it.

                                                                        1. 2

                                                                          Thanks for this! Software needs to be as polished as it needs to be :)

                                                                  1. 8

                                                                    This doesn’t mention my favorite technique, “load less shit.”