1.  

    I cannot stress enough how important type hinting is to large-scale python applications. If you use it properly you can have high guarantees that your code will not have issues like this.

    Source: building a quantum computer OS/control system in python.

    1. 20

      This is good stuff. We’ve been working (lightly) with sourcehut for this and it’s in my eyes one of the big steps forward.

      IRC might be an old protocol, but the number one issue is purely one of client UX. Better on ramps and clients to get people to the communities where people are is the number one issue. I really strongly believe that this is improvements like this one will keep IRC competitive with proprietary systems like discord and slack.

      1. 7

        Of course it’s a good thing to have alternatives, but as it is a paid service I still think it’s spam.

        1. 28

          I’m perfectly happy with paid up services that run entirely and exclusively on Free software. This ends up being a well tested and supported stack that anyone can run themselves, or have sr.ht host it for them.

          What matters to me is that there’s a variety of free software tools to compete with proprietary stuff, and this is such an example.

          1. 8

            Yes, I’m sure we all agree on that. :)

            But compared to articles about IRCv3, modern-irc, or the internal workings of the service, this announcement is not exactly on-topic.

          2. 7

            It’s only a paid service if you use the sr.ht instance, sourcehut itself, including the stack that runs chats.sr.ht is entirely open source. You can host it yourself if you want.

            1. 3

              Yes, and still not the 2 application reps were linked but this.

            2. 1

              would it be spam if it were a nominally free proprietary service which you pay for in data and attention?

              1. 3

                rephrasing the title as “company/org X is offering irc bouncers” still would make it “news as in product announcment” for me, so still offtopic, just because many of us use IRC… Same as announcing a new free mail provider. The fact that it is paid is just another category of offtopic.

                Had someone posted “Hey here’s an alternative to thelounge and irccloud” and “btw, sr.ht made this and offers this” would’ve been a good comment.

                Just from the point of a normal user, I’m not mad at sr.ht or anything.

          1. 36

            Personally, I think the Debian model of having a free core but allowing a non-free area is better for building a community and thus a distribution. Actively restricting conversation in official channels about non-free software and hardware(!) is user hostile. Being a purist may make you feel self-righteous, but very few people in this world can afford such luxuries and will just move on.

            1. 9

              Honestly, the guix model is very similar to Debian. There is no nonfree allowed in “official” channels, but everyone in the “official” channels knows about #nonguix which is the equivalent of Debian nonfree.

              1. 18

                The culture is very different. People on the Guix subreddit get attacked when they mention nonguix. I was curious about Guix, so I googled how to install proprietary Nvidia drivers, which I need for work. Not only are they not supported, Guix users get angry when people try to help others install them on even non-official forums like Reddit.

                1. 4

                  On a subreddit? That’s just weirdly hypocritical…

                  I mostly hang out in the IRC

                  1. 3

                    Meanwhile on Arch

                    pacman -S nvidia
                    
                  2. 1

                    ehhhh. The GNU community is rather hostile to non-free software overall. I mean, what do you expect, it’s an organization dedicated to a software that intentionally makes it hard to use with non-free software (GPL).

                1. 2

                  Did you learn to hate protobuf and gRPC as much as I have, at least with Python? Working with gRPC and by extension protobuf is a nightmare.

                  1. 2

                    I like it a lot, especially the implementation of the Java server and the request contexts. We use it with Swift, Java, Kotlin, Python and Typescript for both client-to-service and service-to-service communication, running in GCP. I poked into the guts of the Java impl, made interceptors (context propagation for distributed tracing for example), integration test tooling, configuration loaders (yaml, enforced proto schema), request validators, etc.

                    Limitations so far:

                    • subpar Swift and Python implementations
                    • only unary requests for web (typescript/js)
                    • confusing as heck at the beginning (this book, and Google’s API design guidelines helped)

                    What made you dislike it on the Python side?

                    1. 1

                      The Python implementation is pretty bad. It relies on shitty code-gen that fails linting/typechecking unless you install a 3rd party plugin (from DropBox), has really weird object behaviors for the message objects (for my usecase I had to write a bunch of code to go from our internal business objects to message objects, which is tedious and shouldn’t be necessary), only supports ThreadPoolExecutor which has some limitations with resource management and is limited by the GIL.

                  1. 8

                    A local font stack is all well and good, but Helvetica and Arial, et al are just…well…boring.

                    This is my only disagreement with the article. I prefer to just use the user’s default font. Sure, that is boring but I personally don’t find much value in every site having their own “exciting” font. I just want to see my nice, readable default font almost everywhere. (Some things like games have a reasonable excuse to use their own.)

                    So drop the font stack altogether and just leave the default. Or if you really must font: sans-serif (or serif). Or the newfangled ui-sans-serif (if I remember that correctly).

                    Of course the downside is that a lot of browsers use garbage default fonts by default…

                    1. 8

                      Of course the downside is that a lot of browsers use garbage default fonts by default…

                      This is the real underlying problem. The overwhelming vast majority of users don’t even know they can change the default font much less know how to.

                      1. 6

                        100%. Which is super disappointing because it would take browsers very little effort to fix.

                        Firefox doesn’t even default to my system font by default (which is quite nice) so I need to teach it to follow my system font which ~0% of users will do.

                      2. 7

                        Helvetica and Arial, et al are just…well…boring.

                        Boring is good! Most of the time, typography’s job is to get out of the way. Browser-default sans-serif is usually what you want, with a slight bump to the size.

                        1. 4

                          If everyone needs to bump the size maybe we should petition browsers to make the default bigger…

                          1. 2

                            Agree! font-size: 16pt; is a much better default.

                        2. 4

                          I just want to see my nice, readable default font almost everywhere.

                          This is why I disable custom fonts entirely i my browser. Makes me laugh when a bad website (looking at anything created by Google) uses idiotic icon fonts, but whatever, those sites aren’t worth using anyway.

                          1. 2

                            I’ve done this on-and-off but I’m not completely sold. Luckily icon fonts are somewhat falling out of style but I think there are legitimate uses for custom fonts, especially for things that are more wacky and fun. I think it is just a shame that they are abused (IMHO) on just about every website.

                            1. 4

                              Not somewhat. Fonts for icons have not been a recommended practice in since 2014 when the people shifted to SVG icons via symbols. Prevalence is likely devs that learned about icon fonts at one point, especially in the past when IE compatibility took away many options, and those people do not do enough front-end to bother keeping up with most trends.

                          2. 3

                            The people who think to change their browser’s default font are probably the same people who can figure out how to force websites to use the default font.

                            Shipping a font with a site is the same as any other styling: helpful for the average user, overridable by the power user.

                            1. 2

                              I’m kind of interested right now in both improving my website’s typography and getting rid of things like background images and web fonts. The page is already pretty light, but it can be lighter, and I’m questioning the value of the fonts I’m using. I do want to exercise some choice in fonts, though. The ui-sans-serif (etc) look like good options, but so far they’re only supported on Safari. I’m probably going to do some research on a local font stack that doesn’t include awful fonts like Helvetica and Times New Roman, has a reasonable chance of working cross-platform, and falls back to serif, sans-serif, and monospace.

                              1. 4

                                I don’t know that many people think Helvetica is “awful”.

                                Just cut things. Cut the background images entirely; replace with a nice single color. Start by cutting all the web fonts: specify serif and sans-serif and no more than four or five sizes of each. Make sure your margins are reasonable and text column widths are enjoyable. How many colors are you using? Is there enough contrast?

                                Once you’ve stripped everything back to a readable, comfortable page, see what you actually need to distinguish yourself rather that trying a bunch of trends. What image are you trying to project? Classic and authoritative? Modern? Comedic? Simple? Fashionable? Pick one approach and try to align things to that feel.

                                1. 1

                                  Helvetica and Times New Roman are de facto standards for a reason. They’re solid, utilitarian typefaces. I wish more sites used them.

                              1. 1

                                IIUIC, it looks like the CoC update was issued after @peterbourgon permanent ban from Go communities, cause of this complaint – Go CoC Report. IMHO it’s over reaction… or it’s just me having a thicker skin?

                                1. 3

                                  I think the key element is (from the linked CoC):

                                  Persistent borderline behavior. Infractions may seem insignificant in isolation, but repeated over time they create a pattern of behavior that doesn’t match our Gopher Values and that adds up to substantial harm.

                                  We’ve had some people like this on Lobsters too: viewing most messages in isolation doesn’t give a clear “wow, this is terrible, please do something about this guy immediately!”-response, and is more of a “okay, not too great, but not too bad either 🤷”. But if you have this every day then it adds up, especially for regulars who at some point just get tired of it and leave. Most of these people are now banned on Lobsters by the way; the most recent one was @soc, but there have been a few others.

                                  These cases are really hard to deal with as a moderator; when exactly is it too much? And explaining it too other people is double hard because you can’t point to a single message or action; it’s more of a general atmosphere of unpleasantness spread out over many small incidents, many of which pass more or less unnoticed. I personally wouldn’t have made a CoC report over this incident in particular (I don’t really are much for “reporting someone” in general), but I did have a rather similar incident some years ago and I just stopped visiting the #general room in Gophers slack because of it 🤷

                                  In short, it’s not only about this particular incident. Plus, there are several ways to deal with such a conflict, even when you think it’s a load of nonsense. To say it wasn’t exactly handled with grace by Peter would be a bit of an understatement. I suspect that this part in particular was really the drop that overflowed the bucket.

                                  1. 3

                                    The ‘permanent’ part of that came from him evading a temporary ban and escalating on Twitter, so IMO it’s not really an overreaction. That being said, I’m very disappointed in both how this was handled (zero transparency from the CoC committee) and the general trend this sets up: the willingness and precedent of this committee to enforce post-hoc rules. It really does seem the CoC was updated directly as a result of this situation, which itself isn’t a problem (actually a good thing for this type of document to evolve), but it really seems that his initial ban came from a rule that was not published or part of the CoC at the time.

                                  1. 9

                                    This looks like a simpler version of tilde.team. Awesome!

                                    1. 2

                                      and without IRC which is muuuch more accessible and privacy friendly

                                    1. 21

                                      I can’t wait for universities to completely ignore this release and still only allow usage of Java 8.

                                      1. 4

                                        I can’t wait to upgrade past java 8 update 192 for critical services at work…

                                        1. 7

                                          I can’t wait for universities to ignore Java.

                                          1. 2

                                            What would you like them to teach / use instead?

                                            1. 0

                                              I would prefer them to teach fundamental principles while exposing students to a wide variety of technologies that embody a wide spectrum of paradigms. From assembly, to C, to Lisp, to Haskell, etc.

                                              While some small exposure to Java might be useful (at least as a negative example), basing entire curriculums on a proprietary language that rots your mind is not.

                                          2. 3

                                            I switched jobs in April and I could finally leave 8 behind. We are on 11, let’s see when we can go to 17.

                                            1. 1

                                              Eh, I’m stuck supporting C++14. The pain is universal…

                                              1. 3

                                                Python 3.5 here…

                                          1. 1

                                            Going out of town and visiting some friends. Maybe putting together some stools from IKEA on Sunday depending on when I get back

                                            1. 6

                                              I tried this out yesterday and generated a 10MB SVG of my home city (Madison, WI). The result is really pleasant to look at: https://ttm.sh/tr7.png

                                              1. 6

                                                this looks cool, and kudos for using LMDB. The 35MB binary size leapt out at me, though — what contributes to that? (LMDB itself is only ~100KB.) Lots of stemming tables and stop-word lists?

                                                1. 4

                                                  Rust isn’t entirely svelte either. It doesn’t take too many transitive dependencies before you’re at 10MB.

                                                  1. 3

                                                    How do you call yourself minimalist when you’re pulling in that many dependencies?

                                                    1. 11

                                                      To be clear, I’m not the author. But if I were, this would come off more as a personal dig than a real question. Be kind. :)

                                                      1. -2

                                                        Holy passive aggressiveness, batman :)

                                                        Remind me to avoid rhetorical questions in the future.

                                                      2. 7

                                                        It depends what you compare it to. An Elasticsearch x86-64 gzipped tarball is at > 340MB https://www.elastic.co/downloads/elasticsearch

                                                    2. 4

                                                      If anyone wants to figures this out, two tools to use are:

                                                      I am 0.3 certain that at least one significant component is serialization code: rust serialization is fast, but is rumored to inflate binaries quite a bit. I haven’t measured that directly, but I did observe compile time hits due to serialization.

                                                      1. 3

                                                        My guess is assets for the web UI are packed into the binary

                                                      1. 1

                                                        I like this article, but I’m not sure why the title says “bare metal” when the tool is wrapping HDFS?

                                                        1. 12

                                                          It doesn’t need to use HDFS, and in fact that’s not the usual mode of operation. Normally it manages its own storage.

                                                          But in any case they’re using “bare metal” to mean that you can run it on actual computers, and not just as a component of some “cloud system” or other. Computing in the 21st century is weird.

                                                          1. 6

                                                            It will plunk it’s files wherever you want. We’re running it on top of ZFS at my work, but it was previously on EXT4 (until we created too many files and discovered issues with truncated MD4 hash collision bugs with EXT4)

                                                            1. 4

                                                              until we created too many files and discovered issues with truncated MD4 hash collision bugs with EXT4

                                                              This, alone, is fascinating. Is there a bug report or write up I could look over to learn more? It might make a good Lobsters submission on its own.

                                                              1. 6

                                                                I should preface this by saying we had create billions hundreds of millions of files before this was a problem. I believe this blog post goes over the symptoms and cause pretty well.

                                                          1. 7

                                                            Yes you need a job orchestrator to abstract away your machines.

                                                            You should be running Hashicorp’s Nomad unless you are a Really Massive Shop With People To Spare On Operating Kubernetes.

                                                            In nomad I can run arbitrary jobs as well as run and orchestrate docker containers. This is something Kubernetes can’t do.

                                                            In nomad I can upgrade without many gymnastics. That feels good.

                                                            1. 13

                                                              Operating a simple kubernetes cluster isn’t that bad, especially with distributions such as k3s and microk8s.

                                                              You should be running Hashicorp’s Nomad unless you are a Really Massive Shop With People To Spare On Operating Kubernetes.

                                                              You should do what works for your team/company/whatever. There’s more than just Nomad and Kubernetes and people should be equipped to make decisions based on their unique situation better than someone on the internet saying they should be using their particular favorite orchestration tool.

                                                              1. 6

                                                                There’s more than just Nomad and Kubernetes

                                                                For serious deployment of containerised software, is there really? I did quite a bit of digging and the landscape is pretty much Nomad/Kubernetes, or small attempts at some abstraction like Rover, or Dokku for a single node. Or distros like OpenShift which are just another layer on Kubernetes.

                                                                I’m still sad about rkt going away…

                                                                1. 1

                                                                  LXD is still around and developed!

                                                                  1. 3

                                                                    LXD is for system containers, not application containers. Pets, not cattle.

                                                                    I really enjoy using LXD for that purpose, though. Feels like Solaris Zones on Linux (but to be honest, way less integrated than it should be because Linux is grown and illumosen are designed).

                                                                2. 2

                                                                  Well said ngp. Whether you want to talk about Kubernetes or the class of orchestrators like it, it’s clear that there are enough tangible benefits to the developer and devops workflow that at least some of the paradigms or lessons are here to stay.

                                                                3. 2

                                                                  No, I do not.

                                                                  1. 2

                                                                    I’ve only heard “you should run Nomad instead” in online comments, every time I hear about Nomad in person (eg from infra at Lob) it’s “we’re migrating from Nomad to X (usually Kubernetes) because Y”

                                                                    1. 1

                                                                      I haven’t tried Nomad yet, even though I heard nice things about it, and it seems they like Nix. What would be Ys that others list, what are the corner cases where one should avoid Nomad?

                                                                      1. 1

                                                                        I think when a lot of work would be saved by using existing helm charts.

                                                                        Or when you need to integrate with specific tooling.

                                                                        Or when you need to go to a managed service and it’s easier to find k8s.

                                                                        And finally I think when you need to hire experienced admins and they all have k8s and not nomad.

                                                                  1. 2

                                                                    The viewing angle for that monitor seems unpleasant. It looks fantastic, but my neck hurts just looking at it

                                                                    1. 1

                                                                      This is pretty interesting, but should we be concerned with migrating to quantum resistant ciphers?

                                                                      The arxiv link is here, https://arxiv.org/pdf/2106.14734.pdf

                                                                      1. 5

                                                                        Not for another 10 years most likely. Shor’s algorithm requires a lot of error correction, and we are firmly in the “NISQ” (Noice Intermediate-Scale Quantum) era of quantum computing.

                                                                        1. 2

                                                                          Thanks ngp, I’ll read more into NISQ. Fascinating stuff.

                                                                          1. 3

                                                                            I work in the quantum computing space, I’m happy to answer questions or point you towards resources to satisfy curiosity :)

                                                                            1. 1

                                                                              Thank you for that, do you have any good starter books ( easy reads ) for someone who comes from a unix/network admin background? I am not quite a CS major, but fancy myself an adept scripter har har

                                                                              At any rate, I know enough to want to stay abreast of this technology.

                                                                              1. 1

                                                                                I’ve not gone through it myself, but this book/website is well regarded: https://quantum.country/

                                                                        2. 1

                                                                          You really have to squint hard at this (or the Google result it’s being compared to) to view it as meaningful progress. The outputs are incredibly noisy, and probably impossible to adapt to cryptographically relevant calculations.

                                                                          1. 2

                                                                            The more deeply I look into news articles, the less substance I find. I suppose it has always been like that, but finding good quality news is rare, and I have more faith in individual journalists than news sources e.g. brian krebs from krebsonsecurity.com

                                                                        1. 3

                                                                          Fast forward to a couple of months ago when I decided to learn how to touch type, which is a story for another day, and realized that touch typing aligned very well with vim

                                                                          I can really relate to this. I think touch typing is a joy enhancer for VI. I don’t know if I actually would use VI without touch typing.

                                                                          1. 13

                                                                            I find it somewhat surprising that someone can sit in front of a computer all day writing code and not know how to touch-type. Kudos to them for making a conscious decision to learn it.

                                                                            1. 5

                                                                              My father has been a programmer for 40 years and he still hunt and pecks with two fingers. I’ve been touch-typing for 20 years. The difference between us is that I also played computer games since I was little, and the impetus to learn to type quickly came from needing to both type out information and heal my party at the same time.

                                                                              1. 2

                                                                                I like to think I can type fast (85-90 wpm) and type a bit wonky, not by hunting and pecking but definitely not touch typing. What would you say is the best way to learn how to actually touch type properly?

                                                                                1. 4

                                                                                  If you’re just using muscle memory and not looking at the keyboard, I think it’s still touch-typing. It’s harder to unlearn years of muscle memory, but what they had us do when I was in school was put a blind over the keyboard and do typing tests. There’s a bunch of simple games out there to help you practice typing, those help.

                                                                                  1. 3

                                                                                    Thanks, yeah I guess I hadn’t thought of it that way. I occasionally look at the keyboard but I’d wager 95% of the time I don’t, so that’s good enough in my book. I basically just want to learn real touch typing for use with Vim, but I should probably actually start using Vim regularly first.

                                                                                    1. 2

                                                                                      I don’t do “real” touch-typing either, technically. I rarely use the right ctrl/shift/alt keys and still have to glance at my keyboard for the top number row and some symbols on occasion.

                                                                                  2. 2

                                                                                    When I was 17, I broke my right wrist and so had to type everything for a bit. I learned to type quite quickly using only my left hand. I am now completely uncapable of using any split keyboards, because I use my left hand for anything to the left of the j key, though some thing in the middle I will type with either hand, depending on which hand typed the previous character. It makes people who learned to touch type properly very uncomfortable if they watch.

                                                                                2. 2

                                                                                  On the other hand I have never understood why movement keys are HJKL. They’re one key off from the rest position of the right hand, which is JKL: and feels much more natural to me, so… I doubt that these keys were choosen by an experienced touch typist.

                                                                                  Edit: Looks like HJKL is even older than vi: https://catonmat.net/why-vim-uses-hjkl-as-arrow-keys

                                                                                1. 6

                                                                                  Woo! Finally! No more nightly builds that I occasionally pull and rebuild every couple of weeks.

                                                                                  1. 8

                                                                                    I’ve found this comment by hackerfantastic:

                                                                                    If you do order one of these, be very aware that the bottom of the case doubles as a CPU heat sink and should be used on a flat-surface to prevent overheating. That is literally the only gripe I have with it and not knowing this resulted in one being destroyed. Keep it on a table

                                                                                    A bit dissapointing if you want to use it anywhere.

                                                                                    1. 2

                                                                                      Never been a problem for my PBP, at least for “normal doing stuff” usage as opposed to “running old DOS games at max framerate for hours”. Having it on my lap is fine, on my lap on a blanket is fine, and I don’t have to worry about blocking fan vents.

                                                                                      1. 1

                                                                                        Crap I should have noticed it with the seemingly exposed cpu to the backplate

                                                                                        So much for lying around on the carpet although I used to keep a tray for my old Alienware

                                                                                        1. 1

                                                                                          So can you use it on your lap?

                                                                                          1. 3

                                                                                            I won’t deny that person’s lived experience, but mine has been different. My pinebook pro works just fine on my lap, and has since late December 2020. Perhaps my workload is so modest that it just doesn’t push the same thermal limits as theirs.

                                                                                        1. 13

                                                                                          Unreadable without FF reader view.

                                                                                          Keep your cool h4ck3r aesthetics if you wish, but maybe consider the consequences on how your content is read and perceived. Since most of the content is <pre> rendered text, making the entire thing available as a zip would be better.

                                                                                          Accessibility matters.

                                                                                          1. 21

                                                                                            Not sure what you mean, it renders perfectly fine for me in Firefox, without reader view. eww in emacs handles it perfectly as well.

                                                                                            Complaining about readability seems a bit silly when all content is contained within a single pre tag. I don’t see how a zip file would make it any easier to read; to me a zip file would make it harder, not easier.

                                                                                            1. 11

                                                                                              They mention on the page that all the pages are available as txt files.

                                                                                              They also have a zip download: https://tmpout.sh/1/tmp.0ut.1.txt.zip

                                                                                              If you used a fraction of a second actually viewing the website, you would maybe have noticed these facts.

                                                                                              1. 1
                                                                                                1. 2

                                                                                                  I’m not sure why you think this person made a mistake. Neither posters made a mistake, the website just changed in the interrim.

                                                                                                  1. 2

                                                                                                    I think the mistake @L-P refers to was of @opfez assuming that, if @L-P had used a fraction of a second more, they would’ve noticed something that was not in fact there at the time they viewed the website.

                                                                                                    1. 1

                                                                                                      That’s not a mistake – it’s a lack of knowledge. It would have been kinder, rather than to call it a mistake, to instead say “It has changed to add those since then”, or some other factual response that does not pass judgement.

                                                                                                      1. 1

                                                                                                        I don’t disagree. They were responding to some pretty intensely accusatory language, so I can understand using less kind language in response.

                                                                                                  2. 1

                                                                                                    Ah I see. I apologize, please excuse my ignorance.

                                                                                                2. 4

                                                                                                  I can read it just fine, though the font is a tad small

                                                                                                  1. 2

                                                                                                    Best Viewed With Lynx!

                                                                                                    1. 2

                                                                                                      Maybe you jest, but it’s actually perfectly fine with lynx.

                                                                                                  1. 13

                                                                                                    I got this problem when interviewing for my first programming job. I brillantly solved it by arguing that a winning board in tictactoe is equivalent to having 3 numbers from 1-9 that add up to 15, and then summing all of each player’s 3-subsets.

                                                                                                    I did not get the job.

                                                                                                    1. 3

                                                                                                      Could you elaborate on how the positions on the board map to the numbers? The following layout doesn’t seem correct, since 1+2+3=6 but that’s still a win for X.

                                                                                                      123      XXX
                                                                                                      456  =>  O
                                                                                                      789      OO
                                                                                                      
                                                                                                      1. 7

                                                                                                        You map it to a magic square instead:

                                                                                                        276
                                                                                                        951
                                                                                                        438
                                                                                                        
                                                                                                        1. 1

                                                                                                          Nice! Did you come up with it on the spot?

                                                                                                          1. 1

                                                                                                            This is the key to that solution. As someone responsible for giving technical interviews (not at google lol), you would have passed as far as I’m concerned.

                                                                                                          2. 1

                                                                                                            You can change rows by adding/subtracting 9, and change columns by adding subtracting 3. This is equivalent to shifting the row/col towards/away from the center. The property that the numbers add to 15 only holds around the center.

                                                                                                            But still, this doesn’t solve the question how to avoid flagging e.g. 3, 4, 8 as a winning position.